diff --git a/.env b/.env deleted file mode 100644 index 433008e8712e123e425b3273c2b6e2b69c4558d0..0000000000000000000000000000000000000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -NGINX_DEFAULT_REQUEST=index.html -NGINX_ROOT=dist \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1d2299918a9a578bc3eea04bda618b9cb2f31a0c..6f0011521546002dfd68f7fab7d8db9e584d6fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,9 @@ graphql/lib .yarn/* !.yarn/releases/* **/.yarn/* + +# db file for liveenv +docker/live-env/data/** + +# workspace settings +.vscode/settings.json \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c6a70954d1e4f8fa913c0aa02b200ca2918307db..74649df398dbdc8f6b0542f188347e9be63334b7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,73 +1,92 @@ +# You can override the included template(s) by including variable overrides +# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings +# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/pipeline/#customization +# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings +# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings +# Note that environment variables can be set in several places +# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence image: node:20 stages: - - test - - buildimage +- test +- buildimage variables: VER: rolling-${CI_PIPELINE_ID} - ID: ${CI_COMMIT_SHORT_SHA} + ID: "${CI_COMMIT_SHORT_SHA}" GIT_SUBMODULE_STRATEGY: recursive CI_REGISTRY_IMAGE: frontend CI_REGISTRY: gitlab.fi.muni.cz:5050/inject/container-registry/$CI_REGISTRY_IMAGE - IMAGE_TAG: $CI_REGISTRY:$VER - IMAGE_LATEST: $CI_REGISTRY:latest - # using "docker" as the host is only possible if you alias the service below - DOCKER_HOST: tcp://docker:2375 - # could be wrong here but although Docker defaults to overlay2, - # Docker-in-Docker (DIND) does not according to the following GitLab doc: - # https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-overlayfs-driver + IMAGE_TAG: "$CI_REGISTRY:$VER" + IMAGE_LATEST: "$CI_REGISTRY:latest" + DOCKER_HOST: tcp://docker:2375 DOCKER_DRIVER: overlay2 - DOCKER_TLS_CERTDIR: "" - - + DOCKER_TLS_CERTDIR: '' default: tags: - - inject - -# here we can use one cache for all jobs + - inject cache: key: yarn-cache - paths: [ .yarn ] - + paths: + - ".yarn" unit-test-job: stage: test script: - - yarn test + - yarn test before_script: - - yarn - + - yarn lint-test-job: stage: test script: - - yarn lint + - yarn lint before_script: - - yarn - + - yarn tsc-test-job: stage: test script: - - yarn workspace @inject/frontend tsc -b - - yarn workspace @inject/frontend tsc + - yarn workspace @inject/frontend tsc -b + - yarn workspace @inject/frontend tsc before_script: - - yarn + - yarn + +sast: + variables: + SAST_EXCLUDED_PATHS: backend + allow_failure: true + +dependency_scanning: + variables: + DS_EXCLUDED_PATHS: backend + allow_failure: true + +secret_detection: + allow_failure: false create-image: image: docker:20.10.16 services: - - name: docker:20.10.16-dind - alias: docker - command: ["--tls=false"] + - name: docker:20.10.16-dind + alias: docker + command: + - "--tls=false" stage: buildimage - only: - refs: - - main + rules: + - if: "$CI_COMMIT_BRANCH == 'main'" + when: manual + - if: "$CI_COMMIT_TAG =~ /^v(?:\\d+.){2}(?:\\d+)$/" + when: manual before_script: - - echo "Docker registry url is $CI_REGISTRY" - - echo "Docker registry username is $CI_REGISTRY_USER" - - echo "Docker registry repo is $CI_REGISTRY_IMAGE" - - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD + - echo "Docker registry url is $CI_REGISTRY" + - echo "Docker registry username is $CI_REGISTRY_USER" + - echo "Docker registry repo is $CI_REGISTRY_IMAGE" + - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD timeout: 12h script: - - docker pull $IMAGE_LATEST || true - - docker build --cache-from $IMAGE_LATEST -t $IMAGE_TAG -t $IMAGE_LATEST ${CI_PROJECT_DIR} - - docker push $IMAGE_TAG - - docker push $IMAGE_LATEST + - docker pull $IMAGE_LATEST || true + - docker build --cache-from $IMAGE_LATEST --build-arg BUILD_NUMBER=$CI_PIPELINE_ID + -t $IMAGE_TAG -t $IMAGE_LATEST ${CI_PROJECT_DIR} + - docker push $IMAGE_TAG + - docker push $IMAGE_LATEST + +include: + - template: Security/Dependency-Scanning.gitlab-ci.yml + - template: Security/SAST.gitlab-ci.yml + - template: Jobs/Secret-Detection.gitlab-ci.yml diff --git a/.prettierrc.cjs b/.prettierrc.cjs new file mode 100644 index 0000000000000000000000000000000000000000..a2f6d8c320d3569a0baacfaf30be0d94212cc5cb --- /dev/null +++ b/.prettierrc.cjs @@ -0,0 +1,15 @@ +/** @type {import("prettier").Options} */ +module.exports = { + trailingComma: 'es5', + printWidth: 80, + singleQuote: true, + semi: false, + tabWidth: 2, + useTabs: false, + bracketSpacing: true, + bracketSameLine: false, + jsxSingleQuote: true, + arrowParens: 'avoid', + endOfLine: 'auto', + plugins: [require.resolve('prettier-plugin-organize-imports')], +} diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index a2a46f95387f8fa0c884220ba1c00c4dd20daa9b..0000000000000000000000000000000000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "trailingComma": "es5", - "printWidth": 80, - "singleQuote": true, - "semi": false, - "tabWidth": 2, - "useTabs": false, - "bracketSpacing": true, - "bracketSameLine": false, - "jsxSingleQuote": true, - "arrowParens": "avoid", - "endOfLine": "auto", - "plugins": ["prettier-plugin-organize-imports"] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9b1fa312fd333925801b538fe10cfe04acd4b090..0000000000000000000000000000000000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "typescript.tsdk": ".yarn/sdks/typescript/lib", - "javascript.updateImportsOnFileMove.enabled": "never", - "typescript.updateImportsOnFileMove.enabled": "never", - "search.exclude": { - "**/.yarn": true, - "**/.pnp.*": true - }, - "prettier.prettierPath": ".yarn/sdks/prettier/index.cjs", - "typescript.enablePromptUseWorkspaceTsdk": true, - "eslint.nodePath": ".yarn/sdks" -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c8e8ea0917d73554377b667c5dbd748c289f076..14709d5807e698e4411aad828eb5a7901a375ee8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +2024-06-15 - add persistent storage to docker deployment +2024-06-13 - extend cache +2024-06-12 - remove html and htm support from file viewer +2024-06-03 - add user deletion and credentials reset +2024-05-30 - change default font to inter +2024-05-28 - fix responsive page title +2024-05-28 - move export-import to exercise panel, hide it from non-admin users +2024-05-28 - fix user edit (only send the fields that change) +2024-05-26 - improve user UI +2024-05-23 - add BCC to emails +2024-05-21 - improve PDF filed viewer UI, set continuous scroll as the default view +2024-05-21 - make unread channel buttons more noticeable +2024-05-21 - add User management UI 2024-05-16 - add emails forwarding 2024-05-15 - add role and exercise info into team selectors 2024-05-15 - fix draft persistance diff --git a/Dockerfile b/Dockerfile index 71bffa0910df240de5faf58c52b5743d9c003ea9..8900e2ca610656ea968e51ba12536cca240f2387 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,9 @@ COPY . . RUN yarn workspace @inject/frontend prebuild -RUN yarn workspace @inject/frontend build +ARG BUILD_NUMBER + +RUN VITE_BUILD_NUMBER=${BUILD_NUMBER} yarn workspace @inject/frontend build FROM nginx:1-alpine @@ -30,4 +32,7 @@ COPY nginx.conf /etc/nginx/conf.d/default.conf COPY --from=build /usr/src/app/dist /usr/app COPY ./frontend/substituteEnv.sh /docker-entrypoint.d/01-substitute-env.sh +ENV NGINX_DEFAULT_REQUEST=index.html \ + NGINX_ROOT=dist + EXPOSE 80 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 91b199b172af4f7c054e41f6a9ba643d10d8f92c..aca2dabc7fb13d0668d7b6c822b6509574eddca1 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,21 @@ Then build the `dist/` artifact from the frontend repository: yarn build ``` +## Live Environment + +Monorepo contains a specialized Docker compose which aids in easier development of either frontend or backend. This compose is located in folder `docker/live-env/`. To run the compose you may start with `docker compose up`, to shut down `docker compose down`. For headless mode `docker compose up -d`. + +Live Environment pre-generates logins on initialization and has persistent storage enabled. Logins are following: +- `t_staff@t.com` (Instructor) +- `t_user@t.com` (User) +- `t_super@t.com` (Superuser) + +Password for all accounts is `t`. To access the deployment, it's located under `inject.localhost` localhost domain. + +Live Environment has issues on WSL2/Windows Docker deployment with hot reloading of code, on Linux it should work. Please mind that the deployment runs development builds of IXP, not production. Thus in some cases it may not show certain bugs which are present in production builds. + +To test out production environment it's adviced to use Nginx deployment for non-HTTPS deployment and set `INJECT_DOMAIN` to `inject.localhost`. This deployment fully replicates how the production environment runs. + ## Generating Codegen headers To aid in development and work with GraphQL, the project uses a tool called Codegen, which pulls the API described by the GraphQL Schema and generates appropriate Typescript library files that can be used with the project. @@ -96,3 +111,7 @@ The repo is littered with various README.md and GUIDELINES.md files that dictate - GraphQL Codegen (allows for automatic typing of GraphQL queries) - BlueprintJS (for UI) - emotion CSS (for CSS-in-JS and type control) + +## Usage of the repository in documentation + +Parts of this repository are used automatically via a pipeline in the INJECT documentation. For more details, see the script that downloads and handles these files: [utilities.sh](https://gitlab.fi.muni.cz/inject/inject-docs/-/blob/main/utilities.sh?ref_type=heads). Some `.md` files may also include an attribute in the frontmatter `tags: used_in_docs` to indicate that they are used in the docs. \ No newline at end of file diff --git a/backend b/backend index e72586326c2c6d9ed8a57e8bbabc86a86b4e661c..3218d245f5ba5610798eb9d615e1fdfa42d2f475 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit e72586326c2c6d9ed8a57e8bbabc86a86b4e661c +Subproject commit 3218d245f5ba5610798eb9d615e1fdfa42d2f475 diff --git a/codegen/LICENSE b/codegen/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/codegen/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/codegen/codegen.ts b/codegen/codegen.ts index c0a650c85bf5ee20587438660f70fe80203319e6..594f10e52c249bc056ab9df8f2c6d276db5376e4 100644 --- a/codegen/codegen.ts +++ b/codegen/codegen.ts @@ -6,6 +6,7 @@ const config: CodegenConfig = { 'gql-cache/**/*.graphql', ], verbose: true, + noSilentErrors: true, ignoreNoDocuments: true, // for better experience with the watcher config: { scalars: { diff --git a/codegen/gql/fragments/ActionLog.graphql b/codegen/gql/fragments/ActionLog.graphql index 0d807a2c0d07602dd34e1136fe39fde3d13a5f25..9b228a44c8f0179bea33dca87f5a603eb28dfdcf 100644 --- a/codegen/gql/fragments/ActionLog.graphql +++ b/codegen/gql/fragments/ActionLog.graphql @@ -25,5 +25,5 @@ fragment ActionLog on ActionLogType { ...QuestionnaireDetails } } - readReceipt @client + readReceipt @client(always: true) } diff --git a/codegen/gql/fragments/Channel.graphql b/codegen/gql/fragments/Channel.graphql index 1eaea562877f681c9deb7564a32feceb4f1a9d02..2ab6e7010f2adb37ee9917f9023f126eae9dbbe0 100644 --- a/codegen/gql/fragments/Channel.graphql +++ b/codegen/gql/fragments/Channel.graphql @@ -2,8 +2,8 @@ fragment Channel on DefinitionChannelType { id name type - readReceipt @client { - readReceipt + readReceipt @client(always: true) { + isUnread teamId } } diff --git a/codegen/gql/fragments/CustomInjectDetails.graphql b/codegen/gql/fragments/CustomInjectDetails.graphql index a147bca5df07202000fdb4553d65ae258746f1f3..56504860f33b849d4e98d04d612e394afea0776f 100644 --- a/codegen/gql/fragments/CustomInjectDetails.graphql +++ b/codegen/gql/fragments/CustomInjectDetails.graphql @@ -3,4 +3,7 @@ fragment CustomInjectDetails on CustomInjectDetailsType { content { ...Content } + overlay { + ...Overlay + } } diff --git a/codegen/gql/fragments/Email.graphql b/codegen/gql/fragments/Email.graphql index f1843e0e7d8738286914827a3c681ce8624a5890..3b1872362f424799437068926b3ea57d3784e039 100644 --- a/codegen/gql/fragments/Email.graphql +++ b/codegen/gql/fragments/Email.graphql @@ -13,5 +13,5 @@ fragment Email on EmailType { ...Overlay } timestamp - readReceipt @client + readReceipt @client(always: true) } diff --git a/codegen/gql/fragments/EmailDetails.graphql b/codegen/gql/fragments/EmailDetails.graphql index 0b6e1d576a67ee67be12f9687341e9d1bd205d89..3cd64da5c5568185d03bce2d8b38f2d6fffc947f 100644 --- a/codegen/gql/fragments/EmailDetails.graphql +++ b/codegen/gql/fragments/EmailDetails.graphql @@ -13,5 +13,5 @@ fragment EmailDetails on EmailType { ...Overlay } timestamp - readReceipt @client + readReceipt @client(always: true) } diff --git a/codegen/gql/fragments/EmailThread.graphql b/codegen/gql/fragments/EmailThread.graphql index fb3ce712c21f246b1af45eddc781b631ba33f439..5f48d339221f1f6800077cf322f65f32ab7521e2 100644 --- a/codegen/gql/fragments/EmailThread.graphql +++ b/codegen/gql/fragments/EmailThread.graphql @@ -11,5 +11,8 @@ fragment EmailThread on EmailThreadType { lastEmail { ...Email } - readReceipt @client + readReceipt @client(always: true) { + isUnread + teamId + } } diff --git a/codegen/gql/fragments/ExtendedToolType.graphql b/codegen/gql/fragments/ExtendedTool.graphql similarity index 73% rename from codegen/gql/fragments/ExtendedToolType.graphql rename to codegen/gql/fragments/ExtendedTool.graphql index 6849edabacfe23b0fc19211426a1e35ff470cbc8..0725848a1c6d28ac6076e713923b9ce033c5af2a 100644 --- a/codegen/gql/fragments/ExtendedToolType.graphql +++ b/codegen/gql/fragments/ExtendedTool.graphql @@ -8,8 +8,4 @@ fragment ExtendedTool on ExtendedToolType { definition { ...ExerciseDefinition } - responses { - ...ToolResponse - } - hasParam @client } diff --git a/codegen/gql/fragments/Group.graphql b/codegen/gql/fragments/Group.graphql deleted file mode 100644 index 84ad8cddf358b7203b6e66bda2b802acbbcdca4f..0000000000000000000000000000000000000000 --- a/codegen/gql/fragments/Group.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment Group on GroupType { - id - name -} \ No newline at end of file diff --git a/codegen/gql/fragments/InjectOption.graphql b/codegen/gql/fragments/InjectOption.graphql deleted file mode 100644 index 6867bab330b82048ad41fd0948d9848fad6c1dd2..0000000000000000000000000000000000000000 --- a/codegen/gql/fragments/InjectOption.graphql +++ /dev/null @@ -1,11 +0,0 @@ -fragment InjectOption on InjectOptionType { - id - sender - name - control { - ...Control - } - content { - ...Content - } -} diff --git a/codegen/gql/fragments/InjectSelections.graphql b/codegen/gql/fragments/InjectSelections.graphql deleted file mode 100644 index 445851e1a17d59153080684e6c95e4992e0816fa..0000000000000000000000000000000000000000 --- a/codegen/gql/fragments/InjectSelections.graphql +++ /dev/null @@ -1,12 +0,0 @@ -fragment InjectSelection on InjectSelectionType { - id - name - timestamp - team { - id - } - options { - ...InjectOption - } - submitted @client -} diff --git a/codegen/gql/fragments/Question.graphql b/codegen/gql/fragments/Question.graphql index cf56d7b7fc3397c82a95bd3db16597732b31b300..fb75eaa46fe8df5c594cdcc42e5e99611ee02688 100644 --- a/codegen/gql/fragments/Question.graphql +++ b/codegen/gql/fragments/Question.graphql @@ -1,6 +1,8 @@ fragment Question on QuestionType { id - text + content { + ...Content + } max correct labels diff --git a/codegen/gql/fragments/RestrictedExercise.graphql b/codegen/gql/fragments/RestrictedExercise.graphql index e8b572903a0e194ce570f3e3f11e75e54e880edb..842c89e99cbb52e225a40deb494d6f7c7971cd44 100644 --- a/codegen/gql/fragments/RestrictedExercise.graphql +++ b/codegen/gql/fragments/RestrictedExercise.graphql @@ -1,3 +1,4 @@ fragment RestrictedExercise on RestrictedExercise { - id -} \ No newline at end of file + id + name +} diff --git a/codegen/gql/fragments/RestrictedUser.graphql b/codegen/gql/fragments/RestrictedUser.graphql index 87c890287c560799d10f5612e98fe002ad9a7b1e..0e9201336d732c35dc68a42714e43d13e352f2ac 100644 --- a/codegen/gql/fragments/RestrictedUser.graphql +++ b/codegen/gql/fragments/RestrictedUser.graphql @@ -1,4 +1,7 @@ fragment RestrictedUser on RestrictedUser { - id - username -} \ No newline at end of file + id + username + firstName + lastName + group +} diff --git a/codegen/gql/fragments/TeamQuestionnaireState.graphql b/codegen/gql/fragments/TeamQuestionnaireState.graphql index c664146f2b6d96ff3c24119b7103bb74c0f39c9f..aee891b87ab084d53efe3d82c850eefdb38aa29c 100644 --- a/codegen/gql/fragments/TeamQuestionnaireState.graphql +++ b/codegen/gql/fragments/TeamQuestionnaireState.graphql @@ -9,4 +9,7 @@ fragment TeamQuestionnaireState on TeamQuestionnaireStateType { answers { ...QuestionnaireAnswer } + questionnaire { + id + } } diff --git a/codegen/gql/fragments/ToolDetails.graphql b/codegen/gql/fragments/ToolDetails.graphql index bf95bf9094ede11dc2626d8b30b400da256f4c5e..0965ea3bd3a469282bf24f8776100066e405db9c 100644 --- a/codegen/gql/fragments/ToolDetails.graphql +++ b/codegen/gql/fragments/ToolDetails.graphql @@ -1,7 +1,7 @@ fragment ToolDetails on ToolDetailsType { id tool { - ...ExtendedTool + ...Tool } argument content { diff --git a/codegen/gql/fragments/ToolResponse.graphql b/codegen/gql/fragments/ToolResponse.graphql deleted file mode 100644 index 47680eead865813340a28197a63ef0f98c2efef4..0000000000000000000000000000000000000000 --- a/codegen/gql/fragments/ToolResponse.graphql +++ /dev/null @@ -1,4 +0,0 @@ -fragment ToolResponse on ToolResponseType { - id - param -} diff --git a/codegen/gql/fragments/User.graphql b/codegen/gql/fragments/User.graphql index 1a140603a3132d5bf991071f34c4dbca327a9c40..e1166d1137266d86a57e0a72c8e4a513d561aaba 100644 --- a/codegen/gql/fragments/User.graphql +++ b/codegen/gql/fragments/User.graphql @@ -1,24 +1,23 @@ fragment User on UserType { - id - lastLogin - username - firstName - lastName - dateJoined - group - isStaff - isSuperuser - isActive - tags { - ...Tag - } - teams { - ...RestrictedTeam - } - exercises { - ...RestrictedExercise - } - definitions { - ...ExerciseDefinition - } -} \ No newline at end of file + id + lastLogin + username + firstName + lastName + dateJoined + group + isActive + isImported + tags { + ...Tag + } + teams { + ...RestrictedTeam + } + exercises { + ...RestrictedExercise + } + definitions { + ...ExerciseDefinition + } +} diff --git a/codegen/gql/mutations/AssignUsersByTags.graphql b/codegen/gql/mutations/AssignUsersByTags.graphql new file mode 100644 index 0000000000000000000000000000000000000000..4e322d9f719c9fbb08d957cfea117410bbb1d954 --- /dev/null +++ b/codegen/gql/mutations/AssignUsersByTags.graphql @@ -0,0 +1,13 @@ +mutation AssignUsersByTags( + $exerciseId: ID! + $tagPrefix: String! + $userIds: [ID!]! +) { + assignUsersByTags( + exerciseId: $exerciseId + tagPrefix: $tagPrefix + userIds: $userIds + ) { + operationDone + } +} diff --git a/codegen/gql/mutations/AssignUsersEqually.graphql b/codegen/gql/mutations/AssignUsersEqually.graphql new file mode 100644 index 0000000000000000000000000000000000000000..8ac1bfeb64e2968e3a7b6e6618227246e79d2c9a --- /dev/null +++ b/codegen/gql/mutations/AssignUsersEqually.graphql @@ -0,0 +1,5 @@ +mutation AssignUsersEqually($exerciseId: ID!, $userIds: [ID!]!) { + assignUsersEqually(exerciseId: $exerciseId, userIds: $userIds) { + operationDone + } +} diff --git a/codegen/gql/mutations/ChangeUserData.graphql b/codegen/gql/mutations/ChangeUserData.graphql index fcd8de9e9940c9d42abeed783d9fa96515f991e5..baddc276e1db406800b87c326d44baf745c03300 100644 --- a/codegen/gql/mutations/ChangeUserData.graphql +++ b/codegen/gql/mutations/ChangeUserData.graphql @@ -1,4 +1,4 @@ -mutation ChangeUserData($userId: UUID!, $group: String, $active: Boolean) { +mutation ChangeUserData($userId: UUID!, $group: AuthGroup, $active: Boolean) { changeUserData( changeUserInput: { userId: $userId, group: $group, active: $active } ) { @@ -6,4 +6,4 @@ mutation ChangeUserData($userId: UUID!, $group: String, $active: Boolean) { ...User } } -} \ No newline at end of file +} diff --git a/codegen/gql/mutations/CopyUsersAssignment.graphql b/codegen/gql/mutations/CopyUsersAssignment.graphql new file mode 100644 index 0000000000000000000000000000000000000000..bc54c63db356f74cd439577aa28e9b2f05bb139b --- /dev/null +++ b/codegen/gql/mutations/CopyUsersAssignment.graphql @@ -0,0 +1,8 @@ +mutation CopyUsersAssignment($fromExerciseId: ID!, $toExerciseId: ID!) { + copyUsersAssignment( + fromExerciseId: $fromExerciseId + toExerciseId: $toExerciseId + ) { + operationDone + } +} diff --git a/codegen/gql/mutations/CreateUser.graphql b/codegen/gql/mutations/CreateUser.graphql new file mode 100644 index 0000000000000000000000000000000000000000..7ba56b33e56ddb035139d7045deda0d749843ab3 --- /dev/null +++ b/codegen/gql/mutations/CreateUser.graphql @@ -0,0 +1,21 @@ +mutation CreateUser( + $email: String! + $firstName: String + $lastName: String + $tags: [String!]! + $group: AuthGroup +) { + createUser( + createUserInput: { + email: $email + firstName: $firstName + lastName: $lastName + tags: $tags + group: $group + } + ) { + newUser { + ...RestrictedUser + } + } +} diff --git a/codegen/gql/mutations/DeleteUsers.graphql b/codegen/gql/mutations/DeleteUsers.graphql new file mode 100644 index 0000000000000000000000000000000000000000..2f472201452b6b580d7045b1cdc8bfd939096480 --- /dev/null +++ b/codegen/gql/mutations/DeleteUsers.graphql @@ -0,0 +1,5 @@ +mutation DeleteUsers($userIds: [ID]!) { + deleteUsers(userIds: $userIds) { + operationDone + } +} diff --git a/codegen/gql/mutations/RegenerateCredentials.graphql b/codegen/gql/mutations/RegenerateCredentials.graphql new file mode 100644 index 0000000000000000000000000000000000000000..029d23c1d9b07c3c7436f1b6b475487a02923415 --- /dev/null +++ b/codegen/gql/mutations/RegenerateCredentials.graphql @@ -0,0 +1,5 @@ +mutation RegenerateCredentials($userIds: [ID]!) { + regenerateCredentials(userIds: $userIds) { + operationDone + } +} diff --git a/codegen/gql/mutations/SelectTeamInjectOption.graphql b/codegen/gql/mutations/SelectTeamInjectOption.graphql deleted file mode 100644 index 9f74a4c8aa951f9d8c1e9d818475fdd6e845ea63..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/SelectTeamInjectOption.graphql +++ /dev/null @@ -1,7 +0,0 @@ -mutation SelectTeamInjectOption( - $selectTeamInjectInput: SelectTeamInjectInput! -) { - selectTeamInjectOption(selectTeamInjectInput: $selectTeamInjectInput) { - operationDone - } -} diff --git a/codegen/gql/mutations/SendCustomInject.graphql b/codegen/gql/mutations/SendCustomInject.graphql new file mode 100644 index 0000000000000000000000000000000000000000..f9e1b212ed63a42f6312be2d99d870d0574cb10b --- /dev/null +++ b/codegen/gql/mutations/SendCustomInject.graphql @@ -0,0 +1,5 @@ +mutation SendCustomInject($customInjectInput: CustomInjectInput!) { + sendCustomInject(customInjectInput: $customInjectInput) { + operationDone + } +} diff --git a/codegen/gql/queries/clientonly/ReturnLocalEmailDraft.graphql b/codegen/gql/mutations/clientonly/DeleteEmailDraft.graphql similarity index 69% rename from codegen/gql/queries/clientonly/ReturnLocalEmailDraft.graphql rename to codegen/gql/mutations/clientonly/DeleteEmailDraft.graphql index 28e886218a41f367ae51d5a792045cb09bd58187..6ff9a496971ad429e317b7b581292d5363547241 100644 --- a/codegen/gql/queries/clientonly/ReturnLocalEmailDraft.graphql +++ b/codegen/gql/mutations/clientonly/DeleteEmailDraft.graphql @@ -1,13 +1,13 @@ -query ReturnLocalEmailDraft( +mutation DeleteEmailDraft( $teamId: ID! $instructor: Boolean! $emailThreadId: ID ) { - returnLocalEmailDraft( + deleteEmailDraft( teamId: $teamId instructor: $instructor emailThreadId: $emailThreadId ) @client { - ...EmailDraft + operationDone } } diff --git a/codegen/gql/mutations/clientonly/ResetReadReceiptChannel.graphql b/codegen/gql/mutations/clientonly/ResetReadReceiptChannel.graphql deleted file mode 100644 index f009a85780e46890a00faf1d93a7b0968fbb0f93..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/ResetReadReceiptChannel.graphql +++ /dev/null @@ -1,6 +0,0 @@ -mutation ResetReadReceiptChannel($channelId: ID!, $teamId: ID!) { - resetReadReceiptChannel(channelId: $channelId, teamId: $teamId) @client { - channelId - readReceipt - } -} diff --git a/codegen/gql/mutations/clientonly/ResetReadReceiptEmailThread.graphql b/codegen/gql/mutations/clientonly/ResetReadReceiptEmailThread.graphql deleted file mode 100644 index fd6e143389ef0f5ac9ebba8179f593ebf493f303..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/ResetReadReceiptEmailThread.graphql +++ /dev/null @@ -1,6 +0,0 @@ -mutation ResetReadReceiptEmailThread($emailThreadId: ID!) { - resetReadReceiptEmailThread(emailThreadId: $emailThreadId) @client { - emailThreadId - readReceipt - } -} diff --git a/codegen/gql/mutations/clientonly/SetEmailDraft.graphql b/codegen/gql/mutations/clientonly/SetEmailDraft.graphql new file mode 100644 index 0000000000000000000000000000000000000000..7a4a6aaf3a7c790c483967a0810c946aff5719fd --- /dev/null +++ b/codegen/gql/mutations/clientonly/SetEmailDraft.graphql @@ -0,0 +1,5 @@ +mutation SetEmailDraft($emailDraft: EmailDraftInput!) { + setEmailDraft(emailDraft: $emailDraft) @client { + ...EmailDraft + } +} diff --git a/codegen/gql/mutations/clientonly/SetIsUnreadChannel.graphql b/codegen/gql/mutations/clientonly/SetIsUnreadChannel.graphql new file mode 100644 index 0000000000000000000000000000000000000000..f2db81304e801e89291e57265a68a4b89e200679 --- /dev/null +++ b/codegen/gql/mutations/clientonly/SetIsUnreadChannel.graphql @@ -0,0 +1,13 @@ +mutation setIsUnreadChannel( + $channelId: ID! + $teamId: ID! + $isUnread: Boolean! +) { + setIsUnreadChannel( + channelId: $channelId + teamId: $teamId + isUnread: $isUnread + ) @client { + operationDone + } +} diff --git a/codegen/gql/mutations/clientonly/SetIsUnreadEmailThread.graphql b/codegen/gql/mutations/clientonly/SetIsUnreadEmailThread.graphql new file mode 100644 index 0000000000000000000000000000000000000000..0214f199781d37139e01aaea2cdb3f62a25c9752 --- /dev/null +++ b/codegen/gql/mutations/clientonly/SetIsUnreadEmailThread.graphql @@ -0,0 +1,13 @@ +mutation setIsUnreadEmailThread( + $threadId: ID! + $teamId: ID! + $isUnread: Boolean! +) { + setIsUnreadEmailThread( + threadId: $threadId + teamId: $teamId + isUnread: $isUnread + ) @client { + operationDone + } +} diff --git a/codegen/gql/mutations/clientonly/WriteEmailDraft.graphql b/codegen/gql/mutations/clientonly/WriteEmailDraft.graphql deleted file mode 100644 index 38d415c438b31810e5ed008f227fcfca9a0f95b0..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/WriteEmailDraft.graphql +++ /dev/null @@ -1,5 +0,0 @@ -mutation WriteEmailDraft($emailDraft: EmailDraftInput!) { - writeEmailDraft(emailDraft: $emailDraft) @client { - ...EmailDraft - } -} diff --git a/codegen/gql/mutations/clientonly/WriteInjectSelectionConfirmation.graphql b/codegen/gql/mutations/clientonly/WriteInjectSelectionConfirmation.graphql deleted file mode 100644 index 5359ac028aff488d83f86d6e368e30d2c1e12e9e..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/WriteInjectSelectionConfirmation.graphql +++ /dev/null @@ -1,7 +0,0 @@ -mutation WriteInjectSelectionConfirmation($injectSelectionId: ID!) { - writeInjectSelectionConfirmation(injectSelectionId: $injectSelectionId) - @client { - injectSelectionId - submitted - } -} diff --git a/codegen/gql/mutations/clientonly/WriteReadReceiptChannel.graphql b/codegen/gql/mutations/clientonly/WriteReadReceiptChannel.graphql deleted file mode 100644 index 628524ada4ea5baa8f03110d0df63bf5e926d650..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/WriteReadReceiptChannel.graphql +++ /dev/null @@ -1,6 +0,0 @@ -mutation writeReadReceiptChannel($channelId: ID!, $teamId: ID!) { - writeReadReceiptChannel(channelId: $channelId, teamId: $teamId) @client { - channelId - readReceipt - } -} diff --git a/codegen/gql/mutations/clientonly/WriteReadReceiptEmailThread.graphql b/codegen/gql/mutations/clientonly/WriteReadReceiptEmailThread.graphql deleted file mode 100644 index 727da8ff2b6ad33616fa634a40d0afc889d361e1..0000000000000000000000000000000000000000 --- a/codegen/gql/mutations/clientonly/WriteReadReceiptEmailThread.graphql +++ /dev/null @@ -1,6 +0,0 @@ -mutation WriteReadReceiptEmailThread($emailThreadId: ID!) { - writeReadReceiptEmailThread(emailThreadId: $emailThreadId) @client { - emailThreadId - readReceipt - } -} diff --git a/codegen/gql/queries/GetAutoInjects.graphql b/codegen/gql/queries/GetAutoInjects.graphql index 66d1dc507248164bea4767d007135463e20578fe..f2e9738b126f901ad6327d3b6d4d68a2ddf75778 100644 --- a/codegen/gql/queries/GetAutoInjects.graphql +++ b/codegen/gql/queries/GetAutoInjects.graphql @@ -1,5 +1,5 @@ query GetAutoInjects($exerciseId: ID!) { - autoInjects(exerciseId: $exerciseId) { + injects(exerciseId: $exerciseId) { ...DefinitionInject } } diff --git a/codegen/gql/queries/GetExerciseConfig.graphql b/codegen/gql/queries/GetExerciseConfig.graphql index 59ed4810e9f8bd730476abe3ca7a2a563bca37cc..77a2fbc207d1cf71122a55a06d2d96f1d9e59f9c 100644 --- a/codegen/gql/queries/GetExerciseConfig.graphql +++ b/codegen/gql/queries/GetExerciseConfig.graphql @@ -1,5 +1,8 @@ -query GetExerciseConfig($exerciseId: ID!) { +query GetExerciseConfig($exerciseId: ID!, $teamId: ID!) { exerciseConfig(exerciseId: $exerciseId) { ...ExerciseConfig } + teamTools(teamId: $teamId) { + ...Tool + } } diff --git a/codegen/gql/queries/GetExtendedTeamTools.graphql b/codegen/gql/queries/GetExtendedTeamTools.graphql deleted file mode 100644 index 75394985ff36e42d1e21811bd80a663de9d43c85..0000000000000000000000000000000000000000 --- a/codegen/gql/queries/GetExtendedTeamTools.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query GetExtendedTeamTools($teamId: ID!) { - extendedTeamTools(teamId: $teamId) { - ...ExtendedTool - } -} diff --git a/codegen/gql/queries/GetGroups.graphql b/codegen/gql/queries/GetGroups.graphql deleted file mode 100644 index 5dacc96715358d2039458a2b45cf2dee4de5aac6..0000000000000000000000000000000000000000 --- a/codegen/gql/queries/GetGroups.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query GetGroups { - groups { - ...Group - } -} \ No newline at end of file diff --git a/codegen/gql/queries/GetTeamChannelLogs.graphql b/codegen/gql/queries/GetTeamChannelLogs.graphql new file mode 100644 index 0000000000000000000000000000000000000000..df70a49938e2103e4a4a797b5287bedf434ff346 --- /dev/null +++ b/codegen/gql/queries/GetTeamChannelLogs.graphql @@ -0,0 +1,5 @@ +query GetTeamChannelLogs($teamId: ID!, $channelId: ID!) { + teamChannelLogs(teamId: $teamId, channelId: $channelId) { + ...ActionLog + } +} \ No newline at end of file diff --git a/codegen/gql/queries/GetTeamInjectSelections.graphql b/codegen/gql/queries/GetTeamInjectSelections.graphql deleted file mode 100644 index d1db444c9340c1244546e6ccac1aa691086f1dcd..0000000000000000000000000000000000000000 --- a/codegen/gql/queries/GetTeamInjectSelections.graphql +++ /dev/null @@ -1,5 +0,0 @@ -query GetTeamInjectSelections($teamId: ID!) { - teamInjectSelections(teamId: $teamId) { - ...InjectSelection - } -} diff --git a/codegen/gql/queries/GetUsers.graphql b/codegen/gql/queries/GetUsers.graphql index 91e35a14bc8431221a7cea3693a797d158f9713d..38c997b1855eb8bc9b91da2d328360bf335d20ea 100644 --- a/codegen/gql/queries/GetUsers.graphql +++ b/codegen/gql/queries/GetUsers.graphql @@ -1,5 +1,5 @@ -query GetUsers { - users { +query GetUsers($active: Boolean, $groups: [AuthGroup], $tags: [String]) { + users(filterUsersInput: { active: $active, groups: $groups, tags: $tags }) { ...User } -} \ No newline at end of file +} diff --git a/codegen/gql/queries/clientonly/GetEmailDraft.graphql b/codegen/gql/queries/clientonly/GetEmailDraft.graphql new file mode 100644 index 0000000000000000000000000000000000000000..855bdce0119757bba369e030c106dbde5ae76494 --- /dev/null +++ b/codegen/gql/queries/clientonly/GetEmailDraft.graphql @@ -0,0 +1,9 @@ +query GetEmailDraft($teamId: ID!, $instructor: Boolean!, $emailThreadId: ID) { + getEmailDraft( + teamId: $teamId + instructor: $instructor + emailThreadId: $emailThreadId + ) @client { + ...EmailDraft + } +} diff --git a/codegen/gql/queries/clientonly/GetEmailDrafts.graphql b/codegen/gql/queries/clientonly/GetEmailDrafts.graphql new file mode 100644 index 0000000000000000000000000000000000000000..bd5f30b18fea44c3a74c209f6eb6891d163b8c12 --- /dev/null +++ b/codegen/gql/queries/clientonly/GetEmailDrafts.graphql @@ -0,0 +1,5 @@ +query GetEmailDrafts($teamId: ID!, $instructor: Boolean!) { + getEmailDrafts(teamId: $teamId, instructor: $instructor) @client { + ...EmailDraft + } +} diff --git a/codegen/gql/subscriptions/TeamInjectSelections.graphql b/codegen/gql/subscriptions/TeamInjectSelections.graphql deleted file mode 100644 index 9df13e9bdc9765f6ec4f51424a53961ec8ce72da..0000000000000000000000000000000000000000 --- a/codegen/gql/subscriptions/TeamInjectSelections.graphql +++ /dev/null @@ -1,7 +0,0 @@ -subscription teamInjectSelections($teamId: ID!) { - injectSelection: injectSelections(teamId: $teamId) { - injectSelection { - ...InjectSelection - } - } -} diff --git a/codegen/gql/subscriptions/TeamMilestones.graphql b/codegen/gql/subscriptions/TeamMilestones.graphql index 78301455b0904a3508f29f411c1951d43efc9abe..f59a39f71e9b606712b2291c9fec79969e94ffd6 100644 --- a/codegen/gql/subscriptions/TeamMilestones.graphql +++ b/codegen/gql/subscriptions/TeamMilestones.graphql @@ -1,5 +1,5 @@ subscription teamMilestones($teamId: ID!) { - milestones: milestones(teamId: $teamId) { + milestones: milestones(teamId: $teamId, visibleOnly: false) { milestones { ...MilestoneState } diff --git a/codegen/package.json b/codegen/package.json index a20b8db53e6da95645574b0cd4372d33a3610327..ad73cec73ab4078ed35d650545775f49a48e0850 100644 --- a/codegen/package.json +++ b/codegen/package.json @@ -1,24 +1,25 @@ { - "name": "@inject/codegen", - "version": "0.3.0", - "description": "GraphQL API Codegen Setup for the Inject Backend", - "main": "index.js", - "dependencies": { - "@apollo/client": "3.9.7", - "graphql": "16.8.1", - "graphql-tag": "2.12.6" - }, - "devDependencies": { - "@graphql-codegen/add": "5.0.2", - "@graphql-codegen/cli": "5.0.2", - "@graphql-codegen/import-types-preset": "3.0.0", - "@graphql-codegen/introspection": "4.0.3", - "@graphql-codegen/named-operations-object": "3.0.0", - "@graphql-codegen/near-operation-file-preset": "3.0.0", - "@graphql-codegen/typescript": "4.0.6", - "@graphql-codegen/typescript-apollo-client-helpers": "^3.0.0", - "@graphql-codegen/typescript-operations": "4.2.0", - "@graphql-codegen/typescript-react-apollo": "4.3.0", - "@graphql-codegen/typescript-resolvers": "^4.0.6" - } + "name": "@inject/codegen", + "version": "0.3.0", + "description": "GraphQL API Codegen Setup for the Inject Backend", + "main": "index.js", + "license": "MIT", + "dependencies": { + "@apollo/client": "3.9.7", + "graphql": "16.8.1", + "graphql-tag": "2.12.6" + }, + "devDependencies": { + "@graphql-codegen/add": "5.0.2", + "@graphql-codegen/cli": "5.0.2", + "@graphql-codegen/import-types-preset": "3.0.0", + "@graphql-codegen/introspection": "4.0.3", + "@graphql-codegen/named-operations-object": "3.0.0", + "@graphql-codegen/near-operation-file-preset": "3.0.0", + "@graphql-codegen/typescript": "4.0.6", + "@graphql-codegen/typescript-apollo-client-helpers": "^3.0.0", + "@graphql-codegen/typescript-operations": "4.2.0", + "@graphql-codegen/typescript-react-apollo": "4.3.0", + "@graphql-codegen/typescript-resolvers": "^4.0.6" + } } diff --git a/docker/live-env/.env b/docker/live-env/.env new file mode 100644 index 0000000000000000000000000000000000000000..b2df65c1e7eea804f92e0c4a230c8e1cc68685cc --- /dev/null +++ b/docker/live-env/.env @@ -0,0 +1,16 @@ +# sets up appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost + +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key + +# host parametres that should be setup for client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=inject.localhost +CORS_ALLOWED_ORIGINS=http://inject.localhost + +# enable logging to a specific file +INJECT_LOGS=/backend/data/text.log + +# enable debug mode for the backend +INJECT_DEBUG=true \ No newline at end of file diff --git a/docker/live-env/Dockerfile.be b/docker/live-env/Dockerfile.be new file mode 100644 index 0000000000000000000000000000000000000000..25973be368c1a349ac2f1bed78e9a693fd3d1811 --- /dev/null +++ b/docker/live-env/Dockerfile.be @@ -0,0 +1,16 @@ +FROM python:3.8-alpine + +ENV POETRY_NO_INTERACTION=1 \ + POETRY_VIRTUALENVS_IN_PROJECT=1 \ + POETRY_VIRTUALENVS_CREATE=1 \ + POETRY_CACHE_DIR=/tmp/poetry_cache + +WORKDIR /backend + +# Install poetry +RUN apk add gcc musl-dev libffi-dev && \ + rm -rf /var/cache/apk/ +RUN pip install poetry==1.8.2 --no-cache + +ENTRYPOINT [ "/bin/sh", "be-dev.sh" ] +EXPOSE 8000 \ No newline at end of file diff --git a/docker/live-env/Dockerfile.fe b/docker/live-env/Dockerfile.fe new file mode 100644 index 0000000000000000000000000000000000000000..7acbfde0fad8e786886864985476b89339d74b85 --- /dev/null +++ b/docker/live-env/Dockerfile.fe @@ -0,0 +1,7 @@ +FROM node:20 + +WORKDIR /usr/src/app + +ENTRYPOINT [ "/bin/sh", "fe-dev.sh" ] + +EXPOSE 80 diff --git a/docker/live-env/README.md b/docker/live-env/README.md new file mode 100644 index 0000000000000000000000000000000000000000..256f7dd1fecdd78b3778ac93ef1af550a30bb75d --- /dev/null +++ b/docker/live-env/README.md @@ -0,0 +1,10 @@ +Docker Live Environment + +Runs live development environment for Frontend and Backend + +Known limitations: +- hot reloading does not work under WSL2 (Windows) Docker environment + - to have support you can enable polling (not recommended for high CPU usage) + - you simply don't use it and use Linux instead +- if scripts don't work proper or yell that they're not executable, please chmod +x them ;) + - this is a Git issue diff --git a/docker/live-env/be-dev.sh b/docker/live-env/be-dev.sh new file mode 100644 index 0000000000000000000000000000000000000000..0432e992e5dfba41f9719b2fb940869617e26131 --- /dev/null +++ b/docker/live-env/be-dev.sh @@ -0,0 +1,6 @@ +poetry install +poetry run python manage.py migrate +poetry run python manage.py shell -c 'from user.models import User; User.objects.create_superuser(username="t_super@t.com", password="t")' +poetry run python manage.py shell -c 'from user.models import User; User.objects.create_staffuser(username="t_staff@t.com", password="t")' +poetry run python manage.py shell -c 'from user.models import User; User.objects.create_user(username="t_user@t.com", password="t")' +poetry run python manage.py runserver 0.0.0.0:8000 \ No newline at end of file diff --git a/docker/live-env/docker-compose.yml b/docker/live-env/docker-compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..bffefc08fd0685e19b3e17a62e361b6fde04e3d3 --- /dev/null +++ b/docker/live-env/docker-compose.yml @@ -0,0 +1,51 @@ +services: + frontend: + build: + context: ../../ + dockerfile: docker/live-env/Dockerfile.fe + networks: + inject-network: + aliases: + - frontend + volumes: + - ../../:/usr/src/app:rw + - ./fe-dev.sh:/usr/src/app/fe-dev.sh:ro + - yarn:/root/.yarn:rw + env_file: + - .env + depends_on: + - backend + nginx: + image: nginx:latest + networks: + - inject-network + env_file: + - .env + ports: + - 80:80 + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + depends_on: + - frontend + - backend + backend: + build: + context: ../../backend + dockerfile: ../docker/live-env/Dockerfile.be + env_file: + - .env + volumes: + - ../../backend/:/backend:rw + - ./be-dev.sh:/backend/be-dev.sh:ro + - venv:/backend/.venv:rw + - ./data:/backend/data:rw + networks: + inject-network: + aliases: + - backend +volumes: + venv: + yarn: +networks: + inject-network: + driver: bridge \ No newline at end of file diff --git a/docker/live-env/fe-dev.sh b/docker/live-env/fe-dev.sh new file mode 100644 index 0000000000000000000000000000000000000000..94fa597a4226246912f75e2b64a9f84ea66221ec --- /dev/null +++ b/docker/live-env/fe-dev.sh @@ -0,0 +1,2 @@ +yarn +yarn dev --port 80 --host \ No newline at end of file diff --git a/docker/live-env/nginx.conf b/docker/live-env/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..00ae874bbc01132077b8bd9bee6377ceadd6a907 --- /dev/null +++ b/docker/live-env/nginx.conf @@ -0,0 +1,57 @@ +events { + worker_connections 512; +} +http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + upstream websocket { + server backend:8000; + } + + server { + return 403; + } + + server { + listen 80; + server_name inject.localhost; + + location /inject/api/v1/subscription { + proxy_pass http://websocket/inject/api/v1/subscription; + proxy_http_version 1.1; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 10m; + client_body_buffer_size 128k; + + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + } + location /inject/ { + proxy_pass http://backend:8000/inject/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 100m; + } + location / { + proxy_pass http://frontend/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + + client_max_body_size 100m; + } + } +} \ No newline at end of file diff --git a/docker/nginx-deployment/.env b/docker/nginx-deployment/.env index 0ce56e32dcbd8e778f2d6b213c4283936afb2824..92d5cca56498bf806b01e1b6f69d087e9077f0c1 100644 --- a/docker/nginx-deployment/.env +++ b/docker/nginx-deployment/.env @@ -1,15 +1,18 @@ # sets up appropriate hostname for the Nginx server -EXTERNAL_HOST=inject.localhost +INJECT_DOMAIN=inject.localhost -# disable AAI, uncomment the next two lines to enable it -INJECT_NOAUTH=true -VITE_NOAUTH=$INJECT_NOAUTH +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key -# host parametres that should be setup for client and server to interact correctly -INJECT_HOST_ADDRESSES=$EXTERNAL_HOST -VITE_HTTP_HOST=$EXTERNAL_HOST -VITE_HTTP_WS=ws://$EXTERNAL_HOST/inject/api/v1/subscription -CORS_ALLOWED_ORIGINS=http://$EXTERNAL_HOST +# enable AAI, uncomment the next line to disable it +# INJECT_NOAUTH=true + +# host parametres that should be setup for client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=ws://$INJECT_DOMAIN/inject/api/v1/subscription +CORS_ALLOWED_ORIGINS=http://$INJECT_DOMAIN # for certbot generation, use with certbot-generator.yml CERTBOT_EMAIL=noemail@inject.localhost @@ -20,13 +23,8 @@ INJECT_EMAIL_PORT= INJECT_EMAIL_HOST_USER= INJECT_EMAIL_HOST_PASSWORD= INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= # enable logging to a specific file -# INJECT_LOGS= - -# enable debug mode for the backend -INJECT_DEBUG= +# INJECT_LOGS=data/ -# nginx settings, do not touch unless you know what you are doing -NGINX_DEFAULT_REQUEST=index.html -NGINX_ROOT=dist diff --git a/docker/nginx-deployment/01-substitute-env.sh b/docker/nginx-deployment/01-substitute-env.sh index 106f33ec8a4bb11500661b57f27bfb6e06bc4f58..2d2919fa8eb4afcc3a88d2434832f9fafca530b9 100755 --- a/docker/nginx-deployment/01-substitute-env.sh +++ b/docker/nginx-deployment/01-substitute-env.sh @@ -1,4 +1,4 @@ #!/usr/bin/env sh echo 'Substituting environment variables in nginx.conf.template' -envsubst '${EXTERNAL_HOST}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf \ No newline at end of file +envsubst '${INJECT_DOMAIN}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf \ No newline at end of file diff --git a/docker/nginx-deployment/README.md b/docker/nginx-deployment/README.md index 954ae48fc3cb8a1cf7f62621eea173725894d918..37e81bec8c4ea0d0f0e6e645d842039d25895b44 100644 --- a/docker/nginx-deployment/README.md +++ b/docker/nginx-deployment/README.md @@ -1,66 +1,165 @@ -# Deployment (Nginx) +--- +tags: used_in_docs +--- +## Deployment using Nginx -INJECT in additional to basal deployment of Frontend and Backend containers, it's also to possible to utilize a simplified deployment method via Docker Compose. This method simplifies the deployment by creating necessary settings, pairings between Frontend and Backend and also creates a singular endpoint for accessing INJECT. +INJECT Exercise Platform provides a simplified deployment method via Docker Compose. +This method simplifies the deployment by creating necessary settings and pairings between the frontend and backend and also creating a singular endpoint for accessing INJECT Exercise Platform. -This solution consists of 3+1 containers: Frontend, Backend, Nginx Proxy (as a front-facing router) and CertBot. +This solution consists of 3+1 containers: frontend, backend, Nginx Proxy (as a front-facing router) and [Certbot](https://certbot.eff.org/). -Frontend and Backend in this configuration are setup to communicate under a single endpoint, this is then handled by Nginx Proxy which forwards appropriate requests either to Frontend (for fetching static app data) or Backend (for interacting the proxy). Certbot handles generation of HTTPS certificates and it's only included for usage if it's assumed to host via HTTPS. +Frontend and Backend are setup to communicate under a single endpoint handled by Nginx Proxy. The Proxy forwards appropriate requests either to Frontend or Backend. +Certbot handles the generation of HTTPS certificates if needed. +Currently it only simplifies the creation of new certificates, but it is not automated. -Certbot in the current state only simplifies creation of new certificates but it's not automated. +Deployment is setup with persistent storage under a Docker Compose volume called `backend-data`. This volume contains any data generated by INJECT. At current state it's adviced if there is any manipulation to be done on said containers (ex. restarting, shutting them down, updating, etc.) to ensure that no exercises are running at given point of time. -# Environment variables +## Environment variables -For environment variables please refer to `.env`. The example file in the repository contains ideal set of environment variables allowing user to setup the platform. +For environment variables, please refer to the `.env` file. +The example file contains an ideal set of environment variables to set up the platform. +Below, the variables are categorized and described for better understanding. -```env -# sets up appropriate hostname for the Nginx server -EXTERNAL_HOST=inject.localhost +### General Configuration +``` +# sets up an appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost -# disable AAI, uncomment the next two lines to enable it -INJECT_NOAUTH=true -VITE_NOAUTH=$INJECT_NOAUTH +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key +``` -# host parametres that should be setup for client and server to interact correctly -INJECT_HOST_ADDRESSES=$EXTERNAL_HOST -VITE_HTTP_HOST=$EXTERNAL_HOST -VITE_HTTP_WS=ws://$EXTERNAL_HOST/ttxbackend/api/v1/subscription -CORS_ALLOWED_ORIGINS=http://$EXTERNAL_HOST -# for certbot generation, use with certbot-generator.yml -CERTBOT_EMAIL=noemail@inject.localhost +- INJECT_DOMAIN: Defines the hostname for the Nginx server. This should be set to the **domain name** that points to your server's IP address. +- INJECT_SECRET_KEY: Used to provide cryptographic signing. Must be at least 50 characters long. Can be anything. + + +### Authentication, Authorization and Identification (AAI) +AAI enables user authentication and sending user credentials via email. +The emails are sent out using an external SMTP server. + +The settings for sending emails is configured the following environment variables in `.env` file. + +``` # for email sending of AAI mails INJECT_EMAIL_HOST= INJECT_EMAIL_PORT= INJECT_EMAIL_HOST_USER= INJECT_EMAIL_HOST_PASSWORD= INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= +``` + +- INJECT_NOAUTH: Comment this out to to enable AAI (enabled by default). + +#### Email Configuration for AAI + +- INJECT_EMAIL_HOST: SMTP server address for sending emails. +- INJECT_EMAIL_PORT: Port for the SMTP server. +- INJECT_EMAIL_HOST_USER: Username for the SMTP server. +- INJECT_EMAIL_HOST_PASSWORD: Password for the SMTP server. +- INJECT_EMAIL_SENDER_ADDRESS: Email address used as the sender for outgoing emails. +- INJECT_EMAIL_PROTOCOL: Preferred protocol for communication with SMTP server. The choices (values) can be _ssl_ or _tls_ (case insensitive). This variable can also be left undefined - no encryption will be used. + +## HTTPS Deployment + +For HTTPS deployment, you need to generate HTTPS certificates. + +Use the `generate-cert.sh` script, which calls [Certbot](https://certbot.eff.org/) and outputs certificates in the `./certbot` directory of the Compose script for the given `INJECT_DOMAIN` setup in the `.env` file. Before full deployment ensure that `.env` file has correctly set protocols for HTTP communication. That is - `https` and `wss`, failing to do so may lead to connection issues. This applies for `CORS_ALLOWED_ORIGINS` and `VITE_HTTP_WS` +For more information on configuration of this script, please refer to [CertBot Configuration](#certbot-configuration) + +When the certificates are generated, execute `deploy-with-https.sh` which will run INJECT Exercise Platform. +This script launches three Docker Compose layers that form a complete script. +The first one is the basal binding compose file (`docker-compose.yml`), which establishes the basic bindings between frontend, backend, and Nginx Proxy. +The second one (`compose-from-registry.yml`) sets up appropriate import paths for frontend and backend images. +The last one (`compose-with-nginx-https.yml`) sets up Nginx Proxy to run in HTTPS mode under ports `80` and `443` and generates the necessary nginx configuration from `nginx-https.conf.template`. + +## HTTP Deployment + +Although HTTPS is the recommended and default deployment method, you can still deploy the platform using HTTP. Before full deployment ensure that `.env` file has correctly set protocols for HTTP communication. That is - `http` and `ws`, failing to do so may lead to connection issues. This applies for `CORS_ALLOWED_ORIGINS` and `VITE_HTTP_WS` + +For HTTP deployment, please refer to the `deploy.sh` script in the root of the folder. +The script is similar to `deploy-with-https.sh` with one caveat, and that's the usage of `compose-with-nginx.yml` instead of `compose-with-nginx-https.yml` which by essence does the same but uses a different NGINX template (`nginx.conf.template`) and runs on port `80`. + +## Creating an Admin + +After deployment, you might need to create a admin to manage the platform. Follow these steps in order to create a admin: + + - List the running Docker containers to find the **NAME** of the backend container: + ``` + docker ps + ``` + - Execute a shell session in the backend container. Replace `CONTAINERNAME` with the actual container **NAME** of the backend service: + ``` + docker exec -it CONTAINERNAME python manage.py shell + ``` + +- Create a admin using the Django shell. Replace `email@test.com` and `password` with your desired admin credentials.: + + ``` python + from user.models import User + User.objects.create_superuser(username="email@test.com", password="password") + ``` + +## Optional and additional settings + +### Disabling AAI + +To disable AAI, modify the `.env` file and uncomment the `INJECT_NOAUTH` variable. Doing so disables the AAI. + +### CertBot Configuration + +If you want to use HTTPS, you can generate certificates using CertBot. Configure the following environment variable in your `.env` file: + +``` +# for certbot generation, use with certbot-generator.yml +CERTBOT_EMAIL=noemail@inject.localhost +``` + +- CERTBOT_EMAIL: Email address used for generating HTTPS certificates with CertBot. + +### Logging and Debugging + +If you need to enable logging or debugging for the backend, configure the following environment variables in your .env file: + +``` # enable logging to a specific file -# INJECT_LOGS= +# INJECT_LOGS=data/ # enable debug mode for the backend INJECT_DEBUG= - -# nginx settings, do not touch unless you know what you are doing -NGINX_DEFAULT_REQUEST=index.html -NGINX_ROOT=dist ``` -Special care needs to be given to host parameters block, which establishes the link between the clients (users of the frontend application) and the server (backend). In case it's necessary to setup HTTPS it's needed to ensure that the connection strings set the protocol appopriately (`http` vs `https`, `ws` vs `wss`). The most important config of all is `EXTERNAL_HOST` which commands under which domain the INJECT platform will run on. - -# HTTP Deployment +- INJECT_LOGS: Path to the log file. Uncomment and set this variable to enable logging. +- INJECT_DEBUG: If set, enables debug mode for the backend. -For HTTP deployment please refer to `deploy.sh` script in the folder, this script launches three Docker compose layers which form a complete script. The first one is the basal binding compose file (`docker-compose.yml`), which establishes the basic bindings between Frontend, Backend and Nginx Proxy. The second one (`compose-from-registry.yml`) sets up appopriate import paths for Frontend and Backend images, this can be interchangibly swapped for `compose-from-monorepo.yml` for development purposes. The last one (`compose-with-nginx.yml`) sets up Nginx Proxy to run in HTTP mode under port `80` and generates necessary nginx configuration from `nginx.conf.template`. +### Host and Connection Settings +``` +# host parameters that should be set up for the client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=ws://$INJECT_DOMAIN/ttxbackend/api/v1/subscription +CORS_ALLOWED_ORIGINS=http://$INJECT_DOMAIN +``` -# HTTPS Deployment +- INJECT_HOST_ADDRESSES: Specifies the address where the backend can be reached. +- VITE_HTTP_HOST: Defines the HTTP host for the frontend. +- VITE_HTTP_WS: Sets up the WebSocket address for the frontend. +- CORS_ALLOWED_ORIGINS: Lists the origins allowed for Cross-Origin Resource Sharing (CORS). Implicitly set-up values by backend include: `http://localhost:5173`, `http://127.0.0.1:5173`, `http://localhost:8000`, `http://127.0.0.1:8000`. -In comparision to HTTP Deployment, HTTPS differs majorly in one way which is requirement to have HTTPS certificates generated. These certificates can be generated via `generate-cert.sh` script which will output certificates in the `./certbot` directory of the compose script for given `EXTERNAL_HOST` setup in `.env` file. +## Troubleshooting -It's necessary to ensure that `VITE_HTTP_HOST`, `VITE_HTTP_WS`, `CORS_ALLOWED_ORIGINS` have correctly setup prepending protocols, i.e. `https` and `wss`. If not, it will cause connection errors. +If you encounter issues during deployment, consider the following steps: -When the certificates are generated, the only step needed to take is to execute `deploy-with-https.sh` which will run INJECT in HTTPS mode. The script is similar to `deploy.sh` with one caveat and that's usage of `compose-with-nginx-https.yml` instead of `compose-with-nginx.yml` which by essence does the same but uses different NGINX template (`nginx-https.conf.template`) and runs on ports `80`, `443`. +- **Executable Permissions**: Ensure that the deployment scripts have executable permissions. Run the following command to set the appropriate permissions: + ``` + chmod +x deploy.sh 01-substitute-env.sh + chmod +x deploy-with-https.sh generate-cert.sh # If using HTTPS deployment + ``` -# Disabling AAI +- **INJECT_DOMAIN Setting**: Verify that the INJECT_DOMAIN environment variable is set to a domain name and not a static IP address. The platform requires a domain name to function correctly. For local test deployments please use reserved TLD `.localhost` (example: `inject.localhost`) -To disable AAI please refer to `.env` file and patch env variables `INJECT_NOAUTH` and `VITE_NOAUTH`. +- **Frontend's error log in Developer Console is reporting mixed-origin connection issues**: Verify that connection settings in the environment varibles are setup correctely. If using HTTP deployment, that they use `http://` and `ws://` protocol, and when using HTTPS, then `https://` and `wss://`. After fixing the issues please reset your cookies and local storage. diff --git a/docker/nginx-deployment/certbot-generator.yml b/docker/nginx-deployment/certbot-generator.yml index 45a448942e8baa8fd95973da7eac548e98d2ca30..a95da9ba7f2142c51b605fd2b68f65695a222525 100644 --- a/docker/nginx-deployment/certbot-generator.yml +++ b/docker/nginx-deployment/certbot-generator.yml @@ -18,4 +18,4 @@ services: volumes: - ./certbot/www/:/var/www/certbot/:rw - ./certbot/conf/:/etc/letsencrypt/:rw - command: certonly --webroot --webroot-path=/var/www/certbot --email $CERTBOT_EMAIL --agree-tos --no-eff-email --force-renewal -d $EXTERNAL_HOST \ No newline at end of file + command: certonly --webroot --webroot-path=/var/www/certbot --email $CERTBOT_EMAIL --agree-tos --no-eff-email --force-renewal -d $INJECT_DOMAIN \ No newline at end of file diff --git a/docker/nginx-deployment/docker-compose.yml b/docker/nginx-deployment/docker-compose.yml index 3f14c5238ffc92b03d28fdc6f2dca75fdce0727d..bc35a8abeae5ba976caa19daede71f8082fb87e5 100644 --- a/docker/nginx-deployment/docker-compose.yml +++ b/docker/nginx-deployment/docker-compose.yml @@ -28,7 +28,11 @@ services: inject-network: aliases: - backend + volumes: + - "backend-data:/backend/data/:rw" networks: inject-network: - driver: bridge \ No newline at end of file + driver: bridge +volumes: + backend-data: \ No newline at end of file diff --git a/docker/nginx-deployment/nginx-certbot.conf.template b/docker/nginx-deployment/nginx-certbot.conf.template index 6322b7ddbb06254308ade04b7c474a6ed2619600..e4e6de6389af9a3a50416c675c0078d0f5d61bc3 100644 --- a/docker/nginx-deployment/nginx-certbot.conf.template +++ b/docker/nginx-deployment/nginx-certbot.conf.template @@ -6,7 +6,7 @@ http { server { listen 80; - server_name $EXTERNAL_HOST; + server_name $INJECT_DOMAIN; server_tokens off; diff --git a/docker/nginx-deployment/nginx-https.conf.template b/docker/nginx-deployment/nginx-https.conf.template index e1e0bc5a1fd7ca7de70c1fe35fca36ed32acf436..48171311acd91fdce0346fdd204308e88c632253 100644 --- a/docker/nginx-deployment/nginx-https.conf.template +++ b/docker/nginx-deployment/nginx-https.conf.template @@ -15,7 +15,7 @@ http { server { listen 80; - server_name $EXTERNAL_HOST; + server_name $INJECT_DOMAIN; server_tokens off; @@ -26,10 +26,10 @@ http { server { listen 443 ssl; - server_name $EXTERNAL_HOST; + server_name $INJECT_DOMAIN; - ssl_certificate /etc/letsencrypt/live/$EXTERNAL_HOST/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/$EXTERNAL_HOST/privkey.pem; + ssl_certificate /etc/letsencrypt/live/$INJECT_DOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$INJECT_DOMAIN/privkey.pem; location /inject/api/v1/subscription { proxy_pass http://websocket/inject/api/v1/subscription; @@ -53,6 +53,8 @@ http { proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_pass_request_headers on; + + client_max_body_size 100m; } location / { proxy_pass http://frontend/; @@ -60,6 +62,8 @@ http { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; + + client_max_body_size 100m; } } } \ No newline at end of file diff --git a/docker/nginx-deployment/nginx.conf.template b/docker/nginx-deployment/nginx.conf.template index 591efca633cdfed8773e1463f119212b225b9d71..8df3519d92fcab75d7c09b7ede48bdc693d912c5 100644 --- a/docker/nginx-deployment/nginx.conf.template +++ b/docker/nginx-deployment/nginx.conf.template @@ -15,7 +15,7 @@ http { server { listen 80; - server_name localhost $EXTERNAL_HOST; + server_name localhost $INJECT_DOMAIN; location /inject/api/v1/subscription { proxy_pass http://websocket/inject/api/v1/subscription; @@ -39,6 +39,8 @@ http { proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_pass_request_headers on; + + client_max_body_size 100m; } location / { proxy_pass http://frontend/; @@ -46,6 +48,8 @@ http { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; + + client_max_body_size 100m; } } } \ No newline at end of file diff --git a/docker/nginx/README.md b/docker/nginx/README.md new file mode 100644 index 0000000000000000000000000000000000000000..ee174befa15ddd29d42037e0a01728d431cf06df --- /dev/null +++ b/docker/nginx/README.md @@ -0,0 +1,108 @@ +## Deployment using Nginx + +INJECT Exercise Platform provides a simplified deployment method via Docker Compose. +This method simplifies the deployment by creating necessary settings and pairings between the frontend and backend and also creating a singular endpoint for accessing INJECT Exercise Platform. + +### Docker Setup + +This solution consists of 3 containers: frontend, backend, Nginx Proxy (as a front-facing router). + +Frontend and Backend are setup to communicate under a single endpoint handled by Nginx Proxy. +The Proxy forwards appropriate requests either to Frontend or Backend. + +Deployment is setup with persistent storage under a Docker Compose volume called `backend-data`. This volume contains any data generated by INJECT and current configuration of the platform. At current state the platform can be effectively backed up assuming you backup `backend-data` volume and `INJECT_SECRET_KEY` environment variable. + +For HTTPS deployment it's needed to have HTTPS certificates. At current state, there is a prepared configuration and script for deployment via Let's Encrypt certificates. This script necessitates downtime of IXP to fully refresh or instantiate new SSL certificates. + +### Environment Variables + +All of the technical configuration is done with environment variables. These are prefixed under `INJECT_`, in addition the deployments contain internal environment variables that are automatically inferred from `INJECT_` prefixed environment variables. + +#### General Configuration + + +``` +# sets up an appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost + +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key +``` + + +- INJECT_DOMAIN: Defines the hostname for the Nginx server. This should be set to the **domain name** that points to your server's IP address. +- INJECT_SECRET_KEY: Used to provide cryptographic signing. Must be at least 50 characters long. Can be anything. +- INJECT_LINK: The URL (link) of the deployed instance fo the INJECT platform with used protocol (http or https). The following URL is an example: _https://my-inject-domain.com_. This link is used in the welcome email. +- INJECT_MAX_UPLOAD_SIZE: Specifies the maximum body size of requests, including file uploads. The unit of this variable is bytes. The default value is set to 10MB (10485760 bytes). + +#### Authentication, Authorization and Identification (AAI) + +AAI modules ensured user authentication and sending of user credentials via email invitations. +The emails are sent out using an external SMTP server. + +The settings for sending emails is configured via the following environment variables. + +``` +# for email sending of AAI mails +INJECT_EMAIL_HOST= +INJECT_EMAIL_PORT= +INJECT_EMAIL_HOST_USER= +INJECT_EMAIL_HOST_PASSWORD= +INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= +``` + + +- INJECT_EMAIL_HOST: SMTP server address for sending emails. +- INJECT_EMAIL_PORT: Port for the SMTP server. Port must be always set. +- INJECT_EMAIL_HOST_USER: Username for the SMTP server. +- INJECT_EMAIL_HOST_PASSWORD: Password for the SMTP server. +- INJECT_EMAIL_SENDER_ADDRESS: Email address used as the sender for outgoing emails. +- INJECT_EMAIL_PROTOCOL: Preferred protocol for communication with SMTP server. The choices (values) can be _ssl_ or _tls_ (case insensitive). This variable can also be left undefined - no encryption will be used. Please note, that setting of `INJECT_EMAIL_PROTOCOL` does not automatically set the port and port must be always set. +- INJECT_EMAIL_TIMEOUT: Specifies a timeout in seconds for blocking operations tied to emails like the connection attempt to SMTP. The default value is 10 seconds. + +In the current release, AAI can be disabled by setting `INJECT_NOAUTH` to any arbitrary value. +This feature will be deprecated in upcoming release. + +#### Logging and Debugging + +If you need to enable logging, configure the following environment variable in your .env file: + +``` +# enable logging to a specific file +# INJECT_LOGS=data/ + +``` + +- INJECT_LOGS: Path to the log file. Uncomment and set this variable to enable logging. + +#### Host and Connection Settings + +These parameters are setup by default in the `.env` file, it's adviced to not modify them unless you want to specifically modify how IXP interacts with Frontend and Backend. Individual Docker compose setups these settings setup accordingly to the set level of communication. + +``` +# host parameters that should be set up for the client and server to interact correctly +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=wss://$INJECT_DOMAIN/ttxbackend/api/v1/subscription +CORS_ALLOWED_ORIGINS=https://$INJECT_DOMAIN +``` + +- INJECT_HOST_ADDRESSES: Comma-separated list of addresses where the backend can be reached. Misconfiguration may lead to an inaccessible Backend instance. +- VITE_HTTP_HOST: Defines the HTTP host for which the frontend application should connect to, the hostname should point to an instance of Backend application. +- VITE_HTTP_WS: Sets up the WebSocket address for the frontend. In case of HTTPS it's necessary to change the prefixed protocol from `ws` to `wss` +- CORS_ALLOWED_ORIGINS: Comma-separated list of origins allowed for Cross-Origin Resource Sharing (CORS). In case of HTTPS it's necessary to change the prefixed protocol from `http` to `https`. Implicitly set-up values by backend include: `http://localhost:5173`, `http://127.0.0.1:5173`, `http://localhost:8000`, `http://127.0.0.1:8000`. + + +## Good practices + +At current state it's adviced: +- if there is any manipulation to be done on said containers (ex. restarting, shutting them down, updating, etc.) to ensure that no exercises are running at given point of time. +- to backup data located in `backend-data` volume +- to backup `INJECT_SECRET_KEY`, these keys are critical to ensure proper functioning of AAI, loss of said keys renders logins to be unusable + +## Deprecations + +At current state: +- AAI can be optionally disabled in the current version. In the future releases, this won't be possible any longer. +- Database driver is SQLite in current release, in the future it will be migrated to a different solution due to known performance issues related to the chosen database backend. diff --git a/docker/nginx/TROUBLESHOOTING.md b/docker/nginx/TROUBLESHOOTING.md new file mode 100644 index 0000000000000000000000000000000000000000..c9907d27930b8257cb576eed941cff831b09cd50 --- /dev/null +++ b/docker/nginx/TROUBLESHOOTING.md @@ -0,0 +1,17 @@ +## Troubleshooting + +If you encounter issues during deployment, consider the following steps: + +- **Executable Permissions**: Ensure that the deployment scripts have executable permissions. Run the following command to set the appropriate permissions: + ``` + chmod +x deploy.sh 01-substitute-env.sh + chmod +x deploy-with-https.sh generate-cert.sh # If using HTTPS deployment + ``` + +- **INJECT_DOMAIN Setting**: Verify that the INJECT_DOMAIN environment variable is set to a domain name and not a static IP address. The platform requires a domain name to function correctly. For local test deployments please use reserved TLD `.localhost` (example: `inject.localhost`) + +- **Backend is not returning any valid response**: Verify that the `INJECT_DOMAIN` and `INJECT_HOST_ADDRESSES` is setup correctly. The platform requires that the addresses are setup to hostnames where the platform is expected to be accessed from. + +- **Frontend's error log in Developer Console is reporting mixed-origin connection issues**: Verify that connection settings in the environment varibles are setup correctely. If using HTTP deployment, that they use `http://` and `ws://` protocol, and when using HTTPS, then `https://` and `wss://`. + +- **Application is connecting to an incorrect backend instance**: Clean up your cookies and session storage to enforce rebinding of the Frontend client. \ No newline at end of file diff --git a/docker/nginx/USERS.md b/docker/nginx/USERS.md new file mode 100644 index 0000000000000000000000000000000000000000..e467f13937a522b93c508e02e1e46f5dcfe8c39a --- /dev/null +++ b/docker/nginx/USERS.md @@ -0,0 +1,30 @@ +## Initial user creation + +INJECT Exercise Platform without prior setup does not generate any standard admin user, that you may use to login and manage the platform. + +There are currently two ways how you may generate said Admin user. + +### Direct creation via Docker + +After launching the deployment, please wait for all migrations to finish and execute following command. Navigate your shell to the folder of your Docker compose configuration directly and + +- Execute a shell session in the backend container, please make sure to navigate your shell to the folder where your Docker compose resides at + + ``` + docker compose exec backend python manage.py shell + ``` + +- Create a admin using the Django shell. Replace `email@test.com` and `long_and_secure_password` with your desired admin credentials.: + + ``` python + from user.models import User + User.objects.create_superuser(username="email@test.com", password="long_and_secure_password") + ``` + +- These steps may be further simplified/automized by merging both of these commands accordingly + + ``` + docker compose exec backend python manage.py shell -c "from user.models import User; User.objects.create_superuser(username="email@test.com", password="long_and_secure_password");" + ``` + +After creation of the user, you may login into the IXP. diff --git a/docker/nginx/http/.env b/docker/nginx/http/.env new file mode 100644 index 0000000000000000000000000000000000000000..4aa2983be9bcb71915d322b0f2428daf105cbf18 --- /dev/null +++ b/docker/nginx/http/.env @@ -0,0 +1,25 @@ +# sets up appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost + +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key + +# host parametres that should be setup for client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=ws://$INJECT_DOMAIN/inject/api/v1/subscription +CORS_ALLOWED_ORIGINS=http://$INJECT_DOMAIN + +# for email sending of AAI mails +INJECT_EMAIL_HOST= +INJECT_EMAIL_PORT= +INJECT_EMAIL_HOST_USER= +INJECT_EMAIL_HOST_PASSWORD= +INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= +INJECT_LINK=http://${INJECT_DOMAIN}/ + +# enable logging to a specific file +# INJECT_LOGS=data/ + diff --git a/docker/nginx/http/01-substitute-env.sh b/docker/nginx/http/01-substitute-env.sh new file mode 100644 index 0000000000000000000000000000000000000000..1ed44ec7358a6cd338973ff2174acc3adf33cebf --- /dev/null +++ b/docker/nginx/http/01-substitute-env.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +echo 'Substituting environment variables in Nginx configuration template' +envsubst '${INJECT_DOMAIN}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf \ No newline at end of file diff --git a/docker/nginx/http/README.md b/docker/nginx/http/README.md new file mode 100644 index 0000000000000000000000000000000000000000..543cf9c61831c9d5e8003673365c9fe9979dcefb --- /dev/null +++ b/docker/nginx/http/README.md @@ -0,0 +1,10 @@ +## HTTP Deployment + +Although HTTPS is the recommended and default deployment method, you can still deploy the platform using HTTP. + +Please ensure that: +- `INJECT_DOMAIN` is setup to your desired hostname in the `.env` file enclosed in the `docker/nginx/http` directory +- `INJECT_SECRET_KEY` is changed to a truly random string of characters of at least 50 characters long +- `01-substitute-env.sh` is executable via `chmod +x 01-substitute-env.sh`. + +Then you may execute `docker compose up -d` and your deployment is up and running \ No newline at end of file diff --git a/docker/nginx/http/compose.yml b/docker/nginx/http/compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..f9a80c235e781eef02f668a784cde2836b5f7340 --- /dev/null +++ b/docker/nginx/http/compose.yml @@ -0,0 +1,41 @@ +services: + frontend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/frontend:latest + networks: + inject-network: + aliases: + - frontend + env_file: + - .env + depends_on: + - backend + nginx: + image: nginx:latest + networks: + - inject-network + env_file: + - .env + ports: + - 80:80 + volumes: + - ./nginx.conf.template:/etc/nginx/nginx.conf.template:ro + - ./01-substitute-env.sh:/docker-entrypoint.d/01-substitute-env.sh:ro + depends_on: + - frontend + - backend + backend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/backend:latest + env_file: + - .env + networks: + inject-network: + aliases: + - backend + volumes: + - "backend-data:/backend/data/:rw" + +networks: + inject-network: + driver: bridge +volumes: + backend-data: \ No newline at end of file diff --git a/docker/nginx/http/nginx.conf.template b/docker/nginx/http/nginx.conf.template new file mode 100644 index 0000000000000000000000000000000000000000..c1577ad46b324c8ff182fc96423170f874b5edd9 --- /dev/null +++ b/docker/nginx/http/nginx.conf.template @@ -0,0 +1,55 @@ +events {} +http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + upstream websocket { + server backend:8000; + } + + server { + return 403; + } + + server { + listen 80; + server_name localhost $INJECT_DOMAIN; + + location /inject/api/v1/subscription { + proxy_pass http://websocket/inject/api/v1/subscription; + proxy_http_version 1.1; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 100m; + client_body_buffer_size 128k; + + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + } + location /inject/ { + proxy_pass http://backend:8000/inject/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 100m; + } + location / { + proxy_pass http://frontend/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + + client_max_body_size 100m; + } + } +} \ No newline at end of file diff --git a/docker/nginx/https-owncert/.env b/docker/nginx/https-owncert/.env new file mode 100644 index 0000000000000000000000000000000000000000..788fecfb988428cf2b03355e4f5a888baa81a8b0 --- /dev/null +++ b/docker/nginx/https-owncert/.env @@ -0,0 +1,25 @@ +# sets up appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost + +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key + +# host parametres that should be setup for client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=wss://$INJECT_DOMAIN/inject/api/v1/subscription +CORS_ALLOWED_ORIGINS=https://$INJECT_DOMAIN + +# for email sending of AAI mails +INJECT_EMAIL_HOST= +INJECT_EMAIL_PORT= +INJECT_EMAIL_HOST_USER= +INJECT_EMAIL_HOST_PASSWORD= +INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= +INJECT_LINK=https://${INJECT_DOMAIN}/ + +# enable logging to a specific file +# INJECT_LOGS=data/ + diff --git a/docker/nginx/https-owncert/01-substitute-env.sh b/docker/nginx/https-owncert/01-substitute-env.sh new file mode 100644 index 0000000000000000000000000000000000000000..1ed44ec7358a6cd338973ff2174acc3adf33cebf --- /dev/null +++ b/docker/nginx/https-owncert/01-substitute-env.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +echo 'Substituting environment variables in Nginx configuration template' +envsubst '${INJECT_DOMAIN}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf \ No newline at end of file diff --git a/docker/nginx/https-owncert/README.md b/docker/nginx/https-owncert/README.md new file mode 100644 index 0000000000000000000000000000000000000000..584ee70207fcdbd9a73a2e6eff7fc44a7224eb7f --- /dev/null +++ b/docker/nginx/https-owncert/README.md @@ -0,0 +1,13 @@ +## HTTPS Deployment with your own certificates (advanced) + +For HTTPS deployment with your own certicates include `fullchain.pem` and `privkey.pem` into the `docker/nginx/https-owncert/certificates/` directory. +If the format of the keys or selection of keys does not suffice, it's adviced to modify the `nginx.conf.template` file and change the related configuration in line `:32-33`. +Docker compose mounts the `./certificates` folder as `/etc/nginx/certificates/` in the Nginx container. +Name of the nginx configuration file is intentionally named as such due to `01-substitute-env.sh` script which substitutes `INJECT_DOMAIN` variable with environment variable value. + +Please ensure that: +- `INJECT_DOMAIN` is setup to your desired hostname in the `.env` file enclosed in the `docker/nginx/https-owncert` directory +- `INJECT_SECRET_KEY` is changed to a truly random string of characters of at least 50 characters long +- `01-substitute-env.sh` is executable via `chmod +x 01-substitute-env.sh`. + +Then you may execute `docker compose up -d` and your deployment is up and running \ No newline at end of file diff --git a/docker/nginx/https-owncert/certificates/CERTIFICATES HERE b/docker/nginx/https-owncert/certificates/CERTIFICATES HERE new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docker/nginx/https-owncert/compose.yml b/docker/nginx/https-owncert/compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..58e4530bf478b426ee8e3e67deadadd82e5b7456 --- /dev/null +++ b/docker/nginx/https-owncert/compose.yml @@ -0,0 +1,43 @@ +services: + frontend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/frontend:latest + networks: + inject-network: + aliases: + - frontend + env_file: + - .env + depends_on: + - backend + nginx: + image: nginx:latest + networks: + - inject-network + env_file: + - .env + ports: + - 80:80 + volumes: + - ./nginx.conf.template:/etc/nginx/nginx.conf.template:ro + - ./01-substitute-env.sh:/docker-entrypoint.d/01-substitute-env.sh:ro + - ./certificates/:/etc/nginx/certificates/:ro + depends_on: + - frontend + - backend + backend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/backend:latest + env_file: + - .env + networks: + inject-network: + aliases: + - backend + volumes: + - "backend-data:/backend/data/:rw" + +networks: + inject-network: + driver: bridge + name: inject_internal_network +volumes: + backend-data: \ No newline at end of file diff --git a/docker/nginx/https-owncert/nginx.conf.template b/docker/nginx/https-owncert/nginx.conf.template new file mode 100644 index 0000000000000000000000000000000000000000..e7d0ba601db5529b7e09404f2362fc12553a550c --- /dev/null +++ b/docker/nginx/https-owncert/nginx.conf.template @@ -0,0 +1,70 @@ +events {} +http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + upstream websocket { + server backend:8000; + } + + server { + return 403; + } + + server { + listen 80; + server_name $INJECT_DOMAIN; + + server_tokens off; + + location / { + return 301 https://$host$request_uri; + } + } + + server { + listen 443 ssl; + server_name $INJECT_DOMAIN; + +# SSL certificates, please modify accordingly if necessary + ssl_certificate /etc/nginx/certificates/fullchain.pem; + ssl_certificate_key /etc/nginx/certificates/privkey.pem; + + location /inject/api/v1/subscription { + proxy_pass http://websocket/inject/api/v1/subscription; + proxy_http_version 1.1; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 10m; + client_body_buffer_size 128k; + + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + } + location /inject/ { + proxy_pass http://backend:8000/inject/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 100m; + } + location / { + proxy_pass http://frontend/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + + client_max_body_size 100m; + } + } +} \ No newline at end of file diff --git a/docker/nginx/https/.env b/docker/nginx/https/.env new file mode 100644 index 0000000000000000000000000000000000000000..788fecfb988428cf2b03355e4f5a888baa81a8b0 --- /dev/null +++ b/docker/nginx/https/.env @@ -0,0 +1,25 @@ +# sets up appropriate hostname for the Nginx server +INJECT_DOMAIN=inject.localhost + +# Secret key for cryptographic signing +INJECT_SECRET_KEY=your-at-least-fifty-or-more-characters-long-secret-key + +# host parametres that should be setup for client and server to interact correctly, +# do not touch unless you know what you are doing +INJECT_HOST_ADDRESSES=$INJECT_DOMAIN +VITE_HTTP_HOST=$INJECT_DOMAIN +VITE_HTTP_WS=wss://$INJECT_DOMAIN/inject/api/v1/subscription +CORS_ALLOWED_ORIGINS=https://$INJECT_DOMAIN + +# for email sending of AAI mails +INJECT_EMAIL_HOST= +INJECT_EMAIL_PORT= +INJECT_EMAIL_HOST_USER= +INJECT_EMAIL_HOST_PASSWORD= +INJECT_EMAIL_SENDER_ADDRESS= +INJECT_EMAIL_PROTOCOL= +INJECT_LINK=https://${INJECT_DOMAIN}/ + +# enable logging to a specific file +# INJECT_LOGS=data/ + diff --git a/docker/nginx/https/01-substitute-env.sh b/docker/nginx/https/01-substitute-env.sh new file mode 100644 index 0000000000000000000000000000000000000000..1ed44ec7358a6cd338973ff2174acc3adf33cebf --- /dev/null +++ b/docker/nginx/https/01-substitute-env.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +echo 'Substituting environment variables in Nginx configuration template' +envsubst '${INJECT_DOMAIN}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf \ No newline at end of file diff --git a/docker/nginx/https/README.md b/docker/nginx/https/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7881fe7b99bec106a950e1864a21ba3b71e2a8ee --- /dev/null +++ b/docker/nginx/https/README.md @@ -0,0 +1,14 @@ +## HTTPS Deployment + +For HTTPS deployment, you need to generate HTTPS certificates. In this configuration these certificates are generated via Certbot by Lets Encrypt. + +This can be done via `./cert_script.sh` script which automatically launches Certbot and generates the certificate in the directory of your Docker Compose. To execute the script, you need to write in your email address, where letter of expiry will be sent to you when the certificate needs to be refreshed and domain for which you're generating the certificate. Ex. `./cert_script.sh admin@inject.fi.muni.cz inject.fi.muni.cz` + +Please note that by executing this script you're agreeing to Certbot's TOS and Privacy Policy, and your email will be used for essential communication about expiration notices. + +After generating the certificates, please ensure that: +- `INJECT_DOMAIN` is setup to your desired hostname in the `.env` file enclosed in the `docker/nginx/https` directory +- `INJECT_SECRET_KEY` is changed to a truly random string of characters of at least 50 characters long +- `01-substitute-env.sh` is executable via `chmod +x 01-substitute-env.sh`. + +Then you may execute `docker compose up -d` and your deployment is up and running \ No newline at end of file diff --git a/docker/nginx/https/cert_script.sh b/docker/nginx/https/cert_script.sh new file mode 100644 index 0000000000000000000000000000000000000000..a4978afd4e9972a4ac919d4b10df5a6206928c67 --- /dev/null +++ b/docker/nginx/https/cert_script.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Script serves as an aid for generating the necessary Certbot certificates + +CERTBOT_EMAIL=$1 +INJECT_DOMAIN=$2 + +if [[ ! $# -eq 2 ]]; then + echo "./cert_script.sh EMAIL_ADDRESS INJECT_DOMAIN" + exit -1 +fi + +if [[ $(docker compose ps -q | wc -l ) -gt 0]]; then + echo "Please ensure that the Docker compose is shut down via `docker compose down`" + exit -2 +fi + +echo "[INJECT] Requesting CertBot for certificate" +docker run -p 80:80 -v ./certbot/conf/:/etc/letsencrypt/ --rm -it certbot/certbot:latest certonly --standalone --email $CERTBOT_EMAIL --agree-tos --no-eff-email --force-renewal -d $INJECT_DOMAIN \ No newline at end of file diff --git a/docker/nginx/https/compose.yml b/docker/nginx/https/compose.yml new file mode 100644 index 0000000000000000000000000000000000000000..502f1a6982a75bf4ddc9e9165c141b63ca5fd7b0 --- /dev/null +++ b/docker/nginx/https/compose.yml @@ -0,0 +1,44 @@ +services: + frontend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/frontend:latest + networks: + inject-network: + aliases: + - frontend + env_file: + - .env + depends_on: + - backend + nginx: + image: nginx:latest + networks: + - inject-network + env_file: + - .env + ports: + - 80:80 + volumes: + - ./nginx.conf.template:/etc/nginx/nginx.conf.template:ro + - ./01-substitute-env.sh:/docker-entrypoint.d/01-substitute-env.sh:ro + - ./certbot/www/:/var/www/certbot/:ro + - ./certbot/conf/:/etc/letsencrypt/:ro + depends_on: + - frontend + - backend + backend: + image: gitlab.fi.muni.cz:5050/inject/container-registry/backend:latest + env_file: + - .env + networks: + inject-network: + aliases: + - backend + volumes: + - "backend-data:/backend/data/:rw" + +networks: + inject-network: + driver: bridge + name: inject_internal_network +volumes: + backend-data: \ No newline at end of file diff --git a/docker/nginx/https/nginx.conf.template b/docker/nginx/https/nginx.conf.template new file mode 100644 index 0000000000000000000000000000000000000000..cefd4a63773ee3d380684f121b20340a69c37547 --- /dev/null +++ b/docker/nginx/https/nginx.conf.template @@ -0,0 +1,69 @@ +events {} +http { + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + upstream websocket { + server backend:8000; + } + + server { + return 403; + } + + server { + listen 80; + server_name $INJECT_DOMAIN; + + server_tokens off; + + location / { + return 301 https://$host$request_uri; + } + } + + server { + listen 443 ssl; + server_name $INJECT_DOMAIN; + + ssl_certificate /etc/letsencrypt/live/$INJECT_DOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/$INJECT_DOMAIN/privkey.pem; + + location /inject/api/v1/subscription { + proxy_pass http://websocket/inject/api/v1/subscription; + proxy_http_version 1.1; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 10m; + client_body_buffer_size 128k; + + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + } + location /inject/ { + proxy_pass http://backend:8000/inject/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + proxy_pass_request_headers on; + + client_max_body_size 100m; + } + location / { + proxy_pass http://frontend/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header Host $host; + + client_max_body_size 100m; + } + } +} \ No newline at end of file diff --git a/docker/schema-gen/docker-compose.yml b/docker/schema-gen/docker-compose.yml index 6ada334a39de2bd37c8a56c8fb2484882d95526f..805f94449451225bea5b61df0393a81e31a0b100 100644 --- a/docker/schema-gen/docker-compose.yml +++ b/docker/schema-gen/docker-compose.yml @@ -2,7 +2,7 @@ services: backend-gen: build: context: ../../backend - dockerfile: Dockerfile + dockerfile: build/Dockerfile volumes: - type: bind source: ../../graphql/schemas @@ -12,6 +12,11 @@ services: source: schemas target: /backend/schemas entrypoint: /bin/sh + environment: + - INJECT_DB_HOST=inject-postgres + - INJECT_DB_USER=inject + - INJECT_DB_PASS=inject + - INJECT_SECRET_KEY=valuevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevaluevalue command: > -c "python manage.py graphql_schema --schema ttxbackend.schema.schema --out=schema.json && cp schemasLocal/* schemas/ && @@ -37,6 +42,6 @@ services: - type: bind source: ../../graphql/ target: /usr/src/app/generated - + volumes: schemas: diff --git a/frontend/LICENSE b/frontend/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/frontend/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frontend/ThirdPartyLicense.txt b/frontend/ThirdPartyLicense.txt new file mode 100644 index 0000000000000000000000000000000000000000..3381acf4b5dec97ecea32dee80a77a827480d3ae --- /dev/null +++ b/frontend/ThirdPartyLicense.txt @@ -0,0 +1,5785 @@ +Name: react +Version: 18.3.1 +License: MIT +Private: false +Description: React is a JavaScript library for building user interfaces. +Repository: https://github.com/facebook/react.git +Homepage: https://reactjs.org/ +License Copyright: +=== + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/sheet +Version: 1.2.2 +License: MIT +Private: false +Description: emotion's stylesheet +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: stylis +Version: 4.2.0 +License: MIT +Private: false +Description: A Light–weight CSS Preprocessor +Repository: undefined +Homepage: https://github.com/thysultan/stylis.js +Author: Sultan Tarimo <sultantarimo@me.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2016-present Sultan Tarimo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/memoize +Version: 0.8.1 +License: MIT +Private: false +Description: emotion's memoize utility +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/cache +Version: 11.11.0 +License: MIT +Private: false +Description: emotion's cache +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @babel/runtime +Version: 7.24.4 +License: MIT +Private: false +Description: babel's modular runtime helpers +Repository: https://github.com/babel/babel.git +Homepage: https://babel.dev/docs/en/next/babel-runtime +Author: The Babel Team (https://babel.dev/team) +License Copyright: +=== + +MIT License + +Copyright (c) 2014-present Sebastian McKenzie and other contributors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: react-is +Version: 16.13.1 +License: MIT +Private: false +Description: Brand checking of React Elements. +Repository: https://github.com/facebook/react.git +Homepage: https://reactjs.org/ +License Copyright: +=== + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: hoist-non-react-statics +Version: 3.3.2 +License: BSD-3-Clause +Private: false +Description: Copies non-react specific statics from a child component to a parent component +Repository: git://github.com/mridgway/hoist-non-react-statics.git +Author: Michael Ridgway <mcridgway@gmail.com> +License Copyright: +=== + +Software License Agreement (BSD License) +======================================== + +Copyright (c) 2015, Yahoo! Inc. All rights reserved. +---------------------------------------------------- + +Redistribution and use of this software in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be + used to endorse or promote products derived from this software without + specific prior written permission of Yahoo! Inc. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +Name: @emotion/utils +Version: 1.2.1 +License: MIT +Private: false +Description: internal utils for emotion +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/hash +Version: 0.9.1 +License: MIT +Private: false +Description: A MurmurHash2 implementation +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/unitless +Version: 0.8.1 +License: MIT +Private: false +Description: An object of css properties that don't accept values with units +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/serialize +Version: 1.1.4 +License: MIT +Private: false +Description: serialization utils for emotion +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/use-insertion-effect-with-fallbacks +Version: 1.0.1 +License: MIT +Private: false +Description: A wrapper package that uses `useInsertionEffect` or a fallback for it +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/react +Version: 11.11.4 +License: MIT +Private: false +Repository: undefined +Author: Emotion Contributors +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: tslib +Version: 2.6.2 +License: 0BSD +Private: false +Description: Runtime library for TypeScript helper functions +Repository: https://github.com/Microsoft/tslib.git +Homepage: https://www.typescriptlang.org/ +Author: Microsoft Corp. +License Copyright: +=== + +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +--- + +Name: ts-invariant +Version: 0.10.3 +License: MIT +Private: false +Description: TypeScript implementation of invariant(condition, message) +Repository: git+https://github.com/apollographql/invariant-packages.git +Homepage: https://github.com/apollographql/invariant-packages +Author: Ben Newman <ben@apollographql.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2019 Apollo GraphQL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @apollo/client +Version: 3.9.7 +License: MIT +Private: false +Description: A fully-featured caching GraphQL client. +Repository: git+https://github.com/apollographql/apollo-client.git +Homepage: https://www.apollographql.com/docs/react/ +Author: packages@apollographql.com +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2022 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: graphql +Version: 16.8.1 +License: MIT +Private: false +Description: A Query Language and Runtime which can target any service. +Repository: https://github.com/graphql/graphql-js.git +Homepage: https://github.com/graphql/graphql-js +License Copyright: +=== + +MIT License + +Copyright (c) GraphQL Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @wry/trie +Version: 0.5.0 +License: MIT +Private: false +Description: https://en.wikipedia.org/wiki/Trie +Repository: git+https://github.com/benjamn/wryware.git +Homepage: https://github.com/benjamn/wryware +Author: Ben Newman <ben@eloper.dev> + +--- + +Name: @wry/caches +Version: 1.0.1 +License: MIT +Private: false +Description: Various cache implementations +Repository: git+https://github.com/benjamn/wryware.git +Homepage: https://github.com/benjamn/wryware +Author: Ben Newman <ben@eloper.dev> +License Copyright: +=== + +MIT License + +Copyright (c) 2019-2021 Ben Newman <ben@eloper.dev> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @wry/trie +Version: 0.4.3 +License: MIT +Private: false +Description: https://en.wikipedia.org/wiki/Trie +Repository: git+https://github.com/benjamn/wryware.git +Homepage: https://github.com/benjamn/wryware +Author: Ben Newman <ben@eloper.dev> +License Copyright: +=== + +MIT License + +Copyright (c) 2019-2021 Ben Newman <ben@eloper.dev> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @wry/context +Version: 0.7.4 +License: MIT +Private: false +Description: Manage contextual information needed by (a)synchronous tasks without explicitly passing objects around +Repository: git+https://github.com/benjamn/wryware.git +Homepage: https://github.com/benjamn/wryware +Author: Ben Newman <ben@eloper.dev> + +--- + +Name: optimism +Version: 0.18.0 +License: MIT +Private: false +Description: Composable reactive caching with efficient invalidation. +Repository: git+https://github.com/benjamn/optimism.git +Homepage: https://github.com/benjamn/optimism#readme +Author: Ben Newman <ben@benjamn.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2016 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: zen-observable-ts +Version: 1.2.5 +License: MIT +Private: false +Description: Thin wrapper around zen-observable and @types/zen-observable, to support ESM exports as well as CommonJS exports +Repository: git+https://github.com/apollographql/zen-observable-ts.git +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @wry/equality +Version: 0.5.7 +License: MIT +Private: false +Description: Structural equality checking for JavaScript values +Repository: git+https://github.com/benjamn/wryware.git +Homepage: https://github.com/benjamn/wryware +Author: Ben Newman <ben@eloper.dev> +License Copyright: +=== + +MIT License + +Copyright (c) 2019 Ben Newman + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: graphql-tag +Version: 2.12.6 +License: MIT +Private: false +Description: A JavaScript template literal tag that parses GraphQL queries +Repository: git+https://github.com/apollographql/graphql-tag.git +Homepage: https://github.com/apollographql/graphql-tag#readme +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2021 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: rehackt +Version: 0.0.6 +License: MIT +Private: false +Description: A wrapper around React that will hide hooks from the React Server Component compiler +Repository: git+https://github.com/phryneas/rehackt.git +Homepage: https://github.com/phryneas/rehackt +Author: Lenz Weber-Tronic +License Copyright: +=== + +MIT License + +Copyright (c) 2024 Lenz Weber-Tronic + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @blueprintjs/core +Version: 5.10.0 +License: Apache-2.0 +Private: false +Description: Core styles & components +Repository: git@github.com:palantir/blueprint.git +Author: Palantir Technologies +License Copyright: +=== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +Name: @fontsource/inter +Version: 5.0.18 +License: OFL-1.1 +Private: false +Description: Self-host the Inter font in a neatly bundled NPM package. +Repository: https://github.com/fontsource/font-files.git +Homepage: https://fontsource.org/fonts/inter +Author: Google Inc. +License Copyright: +=== + +Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. + +--- + +Name: normalize.css +Version: 8.0.1 +License: MIT +Private: false +Description: A modern alternative to CSS resets +Repository: undefined +Homepage: https://necolas.github.io/normalize.css +License Copyright: +=== + +# The MIT License (MIT) + +Copyright © Nicolas Gallagher and Jonathan Neal + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-dom +Version: 18.3.1 +License: MIT +Private: false +Description: React package for working with the DOM. +Repository: https://github.com/facebook/react.git +Homepage: https://reactjs.org/ +License Copyright: +=== + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: scheduler +Version: 0.23.2 +License: MIT +Private: false +Description: Cooperative scheduler for the browser environment. +Repository: https://github.com/facebook/react.git +Homepage: https://reactjs.org/ +License Copyright: +=== + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @blueprintjs/colors +Version: 5.1.0 +License: Apache-2.0 +Private: false +Description: Blueprint color definitions +Repository: git@github.com:palantir/blueprint.git +Author: Palantir Technologies +License Copyright: +=== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +Name: classnames +Version: 2.5.1 +License: MIT +Private: false +Description: A simple utility for conditionally joining classNames together +Repository: git+https://github.com/JedWatson/classnames.git +Author: Jed Watson +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2018 Jed Watson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: lower-case +Version: 2.0.2 +License: MIT +Private: false +Description: Transforms the string to lower case +Repository: git://github.com/blakeembrey/change-case.git +Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/lower-case#readme +Author: Blake Embrey <hello@blakeembrey.com> (http://blakeembrey.me) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: no-case +Version: 3.0.4 +License: MIT +Private: false +Description: Transform into a lower cased string with spaces between words +Repository: git://github.com/blakeembrey/change-case.git +Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/no-case#readme +Author: Blake Embrey <hello@blakeembrey.com> (http://blakeembrey.me) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: pascal-case +Version: 3.1.2 +License: MIT +Private: false +Description: Transform into a string of capitalized words without separators +Repository: git://github.com/blakeembrey/change-case.git +Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/pascal-case#readme +Author: Blake Embrey <hello@blakeembrey.com> (http://blakeembrey.me) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: dot-case +Version: 3.0.4 +License: MIT +Private: false +Description: Transform into a lower case string with a period between words +Repository: git://github.com/blakeembrey/change-case.git +Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/dot-case#readme +Author: Blake Embrey <hello@blakeembrey.com> (http://blakeembrey.me) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: snake-case +Version: 3.0.4 +License: MIT +Private: false +Description: Transform into a lower case string with underscores between words +Repository: git://github.com/blakeembrey/change-case.git +Homepage: https://github.com/blakeembrey/change-case/tree/master/packages/snake-case#readme +Author: Blake Embrey <hello@blakeembrey.com> (http://blakeembrey.me) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: @blueprintjs/icons +Version: 5.8.0 +License: Apache-2.0 +Private: false +Description: Components, fonts, icons, and css files for creating and displaying icons. +Repository: git@github.com:palantir/blueprint.git +Author: Palantir Technologies +License Copyright: +=== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +Name: prop-types +Version: 15.8.1 +License: MIT +Private: false +Description: Runtime type checking for React props and similar objects. +Repository: undefined +Homepage: https://facebook.github.io/react/ +License Copyright: +=== + +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: dom-helpers +Version: 5.2.1 +License: MIT +Private: false +Description: tiny modular DOM lib for ie9+ +Repository: git+https://github.com/react-bootstrap/dom-helpers.git +Homepage: https://github.com/react-bootstrap/dom-helpers#readme +Author: Jason Quense <monastic.panic@gmail.com> +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2015 Jason Quense + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-transition-group +Version: 4.4.5 +License: BSD-3-Clause +Private: false +Description: A react component toolset for managing animations +Repository: https://github.com/reactjs/react-transition-group.git +Homepage: https://github.com/reactjs/react-transition-group#readme +License Copyright: +=== + +BSD 3-Clause License + +Copyright (c) 2018, React Community +Forked from React (https://github.com/facebook/react) Copyright 2013-present, Facebook, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +Name: react-uid +Version: 2.3.3 +License: MIT +Private: false +Description: Render-less container for ID generation +Repository: git+https://github.com/thearnica/react-uid.git +Homepage: https://github.com/thearnica/react-uid#readme +Author: Marina Korzunova (thearnica@gmail.com) +License Copyright: +=== + +MIT License + +Copyright (c) 2016 Anton + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: use-sync-external-store +Version: 1.2.0 +License: MIT +Private: false +Description: Backwards compatible shim for React's useSyncExternalStore. Works with any React that supports hooks. +Repository: https://github.com/facebook/react.git +License Copyright: +=== + +MIT License + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-popper +Version: 2.3.0 +License: MIT +Private: false +Description: Official library to use Popper on React projects +Repository: https://github.com/popperjs/react-popper +Homepage: https://popper.js.org/react-popper +Author: Travis Arnold <travis@souporserious.com> (http://souporserious.com) +Contributors: + Federico Zivolo <federico.zivolo@gmail.com> (https://fezvrasta.github.io) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2018 React Popper authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @popperjs/core +Version: 2.11.8 +License: MIT +Private: false +Description: Tooltip and Popover Positioning Engine +Repository: undefined +Author: Federico Zivolo <federico.zivolo@gmail.com> +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2019 Federico Zivolo + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: react-fast-compare +Version: 3.2.2 +License: MIT +Private: false +Description: Fastest deep equal comparison for React. Great for React.memo & shouldComponentUpdate. Also really fast general-purpose deep comparison. +Repository: https://github.com/FormidableLabs/react-fast-compare +Homepage: https://github.com/FormidableLabs/react-fast-compare +Author: Chris Bolin +License Copyright: +=== + +MIT License + +Copyright (c) 2018 Formidable Labs +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: warning +Version: 4.0.3 +License: MIT +Private: false +Description: A mirror of Facebook's Warning +Repository: https://github.com/BerkeleyTrue/warning.git +Homepage: https://github.com/BerkeleyTrue/warning +Author: Berkeley Martinez <berkeley@berkeleytrue.com> (http://www.berkeleytrue.com) +License Copyright: +=== + +MIT License + +Copyright (c) 2013-present, Facebook, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @inject/shared +Version: 0.3.0 +License: null +Private: false +Description: Top-Level library for shared code between the client modules and graphql + +--- + +Name: @emotion/css +Version: 11.11.2 +License: MIT +Private: false +Description: The Next Generation of CSS-in-JS. +Repository: undefined +Homepage: https://emotion.sh +Author: Kye Hohenberger +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: ahooks +Version: 3.7.10 +License: MIT +Private: false +Description: react hooks library +Repository: undefined +Homepage: https://github.com/alibaba/hooks + +--- + +Name: dayjs +Version: 1.11.10 +License: MIT +Private: false +Description: 2KB immutable date time library alternative to Moment.js with the same modern API +Repository: https://github.com/iamkun/dayjs.git +Homepage: https://day.js.org +Author: iamkun +License Copyright: +=== + +MIT License + +Copyright (c) 2018-present, iamkun + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @inject/graphql +Version: 0.3.0 +License: null +Private: false +Description: GraphQL API Bindings for the Inject Backend + +--- + +Name: @remix-run/router +Version: 1.15.3 +License: MIT +Private: false +Description: Nested/Data-driven/Framework-agnostic Routing +Repository: https://github.com/remix-run/react-router +Author: Remix Software <hello@remix.run> +License Copyright: +=== + +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-router +Version: 6.22.3 +License: MIT +Private: false +Description: Declarative routing for React +Repository: https://github.com/remix-run/react-router +Author: Remix Software <hello@remix.run> +License Copyright: +=== + +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-router-dom +Version: 6.22.3 +License: MIT +Private: false +Description: Declarative routing for React web applications +Repository: https://github.com/remix-run/react-router +Author: Remix Software <hello@remix.run> +License Copyright: +=== + +MIT License + +Copyright (c) React Training LLC 2015-2019 +Copyright (c) Remix Software Inc. 2020-2021 +Copyright (c) Shopify Inc. 2022-2023 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: subscriptions-transport-ws +Version: 0.11.0 +License: MIT +Private: false +Description: A websocket transport for GraphQL subscriptions +Repository: git+https://github.com/apollostack/subscriptions-transport-ws.git +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2015 - 2016 Meteor Development Group, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: backo2 +Version: 1.0.2 +License: MIT +Private: false +Description: simple backoff based on segmentio/backo +Repository: undefined + +--- + +Name: eventemitter3 +Version: 3.1.2 +License: MIT +Private: false +Description: EventEmitter3 focuses on performance while maintaining a Node.js AND browser compatible interface. +Repository: git://github.com/primus/eventemitter3.git +Author: Arnout Kazemier +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Arnout Kazemier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: symbol-observable +Version: 1.2.0 +License: MIT +Private: false +Description: Symbol.observable ponyfill +Repository: undefined +Author: Ben Lesh <ben@benlesh.com> +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) +Copyright (c) Ben Lesh <ben@benlesh.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: react-apollo-network-status +Version: 5.2.1 +License: MIT +Private: false +Description: Brings information about the global network status from Apollo into React. +Repository: undefined +Homepage: https://github.com/molindo/react-apollo-network-status +Author: Jan Amann <jam@molindo.at> +License Copyright: +=== + +MIT License + +Copyright (c) 2019 Molindo GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @generouted/react-router +Version: 1.18.5 +License: MIT +Private: false +Description: Generated file-based routes for React Router and Vite +Repository: undefined +Homepage: https://github.com/oedotme/generouted#readme +Author: Omar Elhawary <oedotme@gmail.com> (https://omarelhawary.me) + +--- + +Name: @floating-ui/utils +Version: 0.2.1 +License: MIT +Private: false +Description: Utilities for Floating UI +Repository: https://github.com/floating-ui/floating-ui.git +Homepage: https://floating-ui.com +Author: atomiks +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Floating UI contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: @floating-ui/react +Version: 0.26.9 +License: MIT +Private: false +Description: Floating UI for React +Repository: https://github.com/floating-ui/floating-ui.git +Homepage: https://floating-ui.com/docs/react +Author: atomiks +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Floating UI contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: @floating-ui/core +Version: 1.6.0 +License: MIT +Private: false +Description: Positioning library for floating elements: tooltips, popovers, dropdowns, and more +Repository: https://github.com/floating-ui/floating-ui.git +Homepage: https://floating-ui.com +Author: atomiks +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Floating UI contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: @floating-ui/dom +Version: 1.6.3 +License: MIT +Private: false +Description: Floating UI for the web +Repository: https://github.com/floating-ui/floating-ui.git +Homepage: https://floating-ui.com +Author: atomiks +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Floating UI contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: @floating-ui/react-dom +Version: 2.0.8 +License: MIT +Private: false +Description: Floating UI for React DOM +Repository: https://github.com/floating-ui/floating-ui.git +Homepage: https://floating-ui.com/docs/react-dom +Author: atomiks +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Floating UI contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: tabbable +Version: 6.2.0 +License: MIT +Private: false +Description: Returns an array of all tabbable DOM nodes within a containing node. +Repository: git+https://github.com/focus-trap/tabbable.git +Homepage: https://github.com/focus-trap/tabbable#readme +Author: David Clark (http://davidtheclark.com/) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2015 David Clark + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: d3-array +Version: 3.2.4 +License: ISC +Private: false +Description: Array manipulation, ordering, searching, summarizing, etc. +Repository: https://github.com/d3/d3-array.git +Homepage: https://d3js.org/d3-array/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2023 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: internmap +Version: 2.0.3 +License: ISC +Private: false +Description: Map and Set with automatic key interning +Repository: https://github.com/mbostock/internmap.git +Homepage: https://github.com/mbostock/internmap/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-scale +Version: 4.0.2 +License: ISC +Private: false +Description: Encodings that map abstract data to visual representation. +Repository: https://github.com/d3/d3-scale.git +Homepage: https://d3js.org/d3-scale/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-color +Version: 3.1.0 +License: ISC +Private: false +Description: Color spaces! RGB, HSL, Cubehelix, Lab and HCL (Lch). +Repository: https://github.com/d3/d3-color.git +Homepage: https://d3js.org/d3-color/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-interpolate +Version: 3.0.1 +License: ISC +Private: false +Description: Interpolate numbers, colors, strings, arrays, objects, whatever! +Repository: https://github.com/d3/d3-interpolate.git +Homepage: https://d3js.org/d3-interpolate/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-format +Version: 3.1.0 +License: ISC +Private: false +Description: Format numbers for human consumption. +Repository: https://github.com/d3/d3-format.git +Homepage: https://d3js.org/d3-format/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-time +Version: 3.1.0 +License: ISC +Private: false +Description: A calculator for humanity’s peculiar conventions of time. +Repository: https://github.com/d3/d3-time.git +Homepage: https://d3js.org/d3-time/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2022 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-time-format +Version: 4.1.0 +License: ISC +Private: false +Description: A JavaScript time formatter and parser inspired by strftime and strptime. +Repository: https://github.com/d3/d3-time-format.git +Homepage: https://d3js.org/d3-time-format/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-scale-chromatic +Version: 3.1.0 +License: ISC +Private: false +Description: Sequential, diverging and categorical color schemes. +Repository: https://github.com/d3/d3-scale-chromatic.git +Homepage: https://d3js.org/d3-scale-chromatic/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2024 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +Apache-Style Software License for ColorBrewer software and ColorBrewer Color Schemes + +Copyright 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State University + +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software distributed +under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. + +--- + +Name: tslib +Version: 2.5.0 +License: 0BSD +Private: false +Description: Runtime library for TypeScript helper functions +Repository: https://github.com/Microsoft/tslib.git +Homepage: https://www.typescriptlang.org/ +Author: Microsoft Corp. +License Copyright: +=== + +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +--- + +Name: @emotion/is-prop-valid +Version: 1.2.1 +License: MIT +Private: false +Description: A function to check whether a prop is valid for HTML and SVG elements +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: stylis +Version: 4.3.1 +License: MIT +Private: false +Description: A Light–weight CSS Preprocessor +Repository: undefined +Homepage: https://github.com/thysultan/stylis.js +Author: Sultan Tarimo <sultantarimo@me.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2016-present Sultan Tarimo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @emotion/unitless +Version: 0.8.0 +License: MIT +Private: false +Description: An object of css properties that don't accept values with units +Repository: undefined +License Copyright: +=== + +MIT License + +Copyright (c) Emotion team and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: styled-components +Version: 6.1.8 +License: MIT +Private: false +Description: CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility. +Repository: git+https://github.com/styled-components/styled-components.git +Homepage: https://styled-components.com +Author: Glen Maddern +License Copyright: +=== + +MIT License + +Copyright (c) 2016-present Glen Maddern and Maximilian Stoiber + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @cyntler/react-doc-viewer +Version: 1.14.1 +License: Apache License 2.0 +Private: false +Description: File viewer for React. +Repository: https://github.com/cyntler/react-doc-viewer +Homepage: https://cyntler.github.io/react-doc-viewer +Author: Matthew Mogford / Damian Cyntler +License Copyright: +=== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright (c) 2020 Alcumus Group + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--- + +Name: mustache +Version: 4.2.0 +License: MIT +Private: false +Description: Logic-less {{mustache}} templates with JavaScript +Repository: https://github.com/janl/mustache.js.git +Homepage: https://github.com/janl/mustache.js +Author: mustache.js Authors <http://github.com/janl/mustache.js> +License Copyright: +=== + +The MIT License + +Copyright (c) 2009 Chris Wanstrath (Ruby) +Copyright (c) 2010-2014 Jan Lehnardt (JavaScript) +Copyright (c) 2010-2015 The mustache.js community + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: pdfjs-dist +Version: 3.11.174 +License: Apache-2.0 +Private: false +Description: Generic build of Mozilla's PDF.js library. +Repository: https://github.com/mozilla/pdfjs-dist +Homepage: http://mozilla.github.io/pdf.js/ +License Copyright: +=== + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +Name: react-pdf +Version: 7.5.0 +License: MIT +Private: false +Description: Display PDFs in your React app as easily as if they were images. +Repository: https://github.com/wojtekmaj/react-pdf.git +Author: Wojciech Maj <kontakt@wojtekmaj.pl> +License Copyright: +=== + +MIT License + +Copyright (c) 2017–2023 Wojciech Maj + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: make-event-props +Version: 1.6.2 +License: MIT +Private: false +Description: Returns an object with on-event callback props curried with provided args. +Repository: https://github.com/wojtekmaj/make-event-props.git +Author: Wojciech Maj <kontakt@wojtekmaj.pl> +License Copyright: +=== + +MIT License + +Copyright (c) 2018–2023 Wojciech Maj + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: make-cancellable-promise +Version: 1.3.2 +License: MIT +Private: false +Description: Make any Promise cancellable. +Repository: https://github.com/wojtekmaj/make-cancellable-promise.git +Author: Wojciech Maj <kontakt@wojtekmaj.pl> +License Copyright: +=== + +MIT License + +Copyright (c) 2019–2023 Wojciech Maj + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: clsx +Version: 2.1.1 +License: MIT +Private: false +Description: A tiny (239B) utility for constructing className strings conditionally. +Repository: undefined +Author: Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com) +License Copyright: +=== + +MIT License + +Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: tiny-invariant +Version: 1.3.3 +License: MIT +Private: false +Description: A tiny invariant function +Repository: https://github.com/alexreardon/tiny-invariant.git +Author: Alex Reardon <alexreardon@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2019 Alexander Reardon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: tiny-warning +Version: 1.0.3 +License: MIT +Private: false +Description: A tiny warning function +Repository: https://github.com/alexreardon/tiny-warning.git +Author: Alex Reardon <alexreardon@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2019 Alexander Reardon + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: merge-refs +Version: 1.2.2 +License: MIT +Private: false +Description: A function that merges React refs into one. +Repository: https://github.com/wojtekmaj/merge-refs.git +Author: Wojciech Maj <kontakt@wojtekmaj.pl> +License Copyright: +=== + +MIT License + +Copyright (c) 2017–2023 Wojciech Maj + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: papaparse +Version: 5.4.1 +License: MIT +Private: false +Description: Fast and powerful CSV parser for the browser that supports web workers and streaming large files. Converts CSV to JSON and JSON to CSV. +Repository: https://github.com/mholt/PapaParse.git +Homepage: http://papaparse.com +Author: Matthew Holt (https://twitter.com/mholt6) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2015 Matthew Holt + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: react-pdf +Version: 7.7.1 +License: MIT +Private: false +Description: Display PDFs in your React app as easily as if they were images. +Repository: git+https://github.com/wojtekmaj/react-pdf.git +Author: Wojciech Maj <kontakt@wojtekmaj.pl> +License Copyright: +=== + +MIT License + +Copyright (c) 2017–2023 Wojciech Maj + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: dequal +Version: 2.0.3 +License: MIT +Private: false +Description: A tiny (304B to 489B) utility for check for deep equality +Repository: undefined +Author: Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: @blueprintjs/select +Version: 5.1.2 +License: Apache-2.0 +Private: false +Description: Components related to selecting items from a list +Repository: git@github.com:palantir/blueprint.git +Author: Palantir Technologies +License Copyright: +=== + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +--- + +Name: d3-axis +Version: 3.0.0 +License: ISC +Private: false +Description: Displays automatic reference lines for scales. +Repository: https://github.com/d3/d3-axis.git +Homepage: https://d3js.org/d3-axis/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-selection +Version: 3.0.0 +License: ISC +Private: false +Description: Data-driven DOM manipulation: select elements and join them to data. +Repository: https://github.com/d3/d3-selection.git +Homepage: https://d3js.org/d3-selection/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: save-svg-as-png +Version: 1.4.17 +License: MIT +Private: false +Description: Convert a browser SVG to PNG or dataUri +Repository: https://github.com/exupero/saveSvgAsPng +Homepage: https://github.com/exupero/saveSvgAsPng +Author: Eric Shull +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014 Eric Shull + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: d3-dispatch +Version: 3.0.1 +License: ISC +Private: false +Description: Register named callbacks and call them with arguments. +Repository: https://github.com/d3/d3-dispatch.git +Homepage: https://d3js.org/d3-dispatch/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-drag +Version: 3.0.0 +License: ISC +Private: false +Description: Drag and drop SVG, HTML or Canvas using mouse or touch input. +Repository: https://github.com/d3/d3-drag.git +Homepage: https://d3js.org/d3-drag/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-timer +Version: 3.0.1 +License: ISC +Private: false +Description: An efficient queue capable of managing thousands of concurrent animations. +Repository: https://github.com/d3/d3-timer.git +Homepage: https://d3js.org/d3-timer/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-transition +Version: 3.0.1 +License: ISC +Private: false +Description: Animated transitions for D3 selections. +Repository: https://github.com/d3/d3-transition.git +Homepage: https://d3js.org/d3-transition/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: d3-ease +Version: 3.0.1 +License: BSD-3-Clause +Private: false +Description: Easing functions for smooth animation. +Repository: https://github.com/d3/d3-ease.git +Homepage: https://d3js.org/d3-ease/ +Author: Mike Bostock (http://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock +Copyright 2001 Robert Penner +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +Name: d3-brush +Version: 3.0.0 +License: ISC +Private: false +Description: Select a one- or two-dimensional region using the mouse or touch. +Repository: https://github.com/d3/d3-brush.git +Homepage: https://d3js.org/d3-brush/ +Author: Mike Bostock (https://bost.ocks.org/mike) +License Copyright: +=== + +Copyright 2010-2021 Mike Bostock + +Permission to use, copy, modify, and/or distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright notice +and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF +THIS SOFTWARE. + +--- + +Name: lodash +Version: 4.17.21 +License: MIT +Private: false +Description: Lodash modular utilities. +Repository: undefined +Homepage: https://lodash.com/ +Author: John-David Dalton <john.david.dalton@gmail.com> +Contributors: + John-David Dalton <john.david.dalton@gmail.com> + Mathias Bynens <mathias@qiwi.be> +License Copyright: +=== + +Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/> + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. + +--- + +Name: @graphiql/toolkit +Version: 0.9.1 +License: MIT +Private: false +Description: Utility to build a fetcher for GraphiQL +Repository: https://github.com/graphql/graphiql +Homepage: http://github.com/graphql/graphiql/tree/master/packages/graphiql-toolkit#readme +Contributors: + Rikki Schulte <rikki.schulte@gmail.com> (https://rikki.dev) +License Copyright: +=== + +MIT License + +Copyright (c) 2021 GraphQL Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: meros +Version: 1.3.0 +License: MIT +Private: false +Description: A fast 642B utility that makes reading multipart responses simple +Repository: undefined +Author: Marais Rossow <me@marais.dev> (https://marais.io) +License Copyright: +=== + +MIT License + +Copyright (c) Marais Rossouw <hi@marais.io> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @n1ru4l/push-pull-async-iterable-iterator +Version: 3.2.0 +License: MIT +Private: false +Repository: undefined +Author: Laurin Quast <laurinquast@googlemail.com> (https://github.com/n1ru4l) +License Copyright: +=== + +MIT License + +Copyright (c) 2020-present Laurin Quast (laurinquast@googlemail.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: clsx +Version: 1.2.1 +License: MIT +Private: false +Description: A tiny (228B) utility for constructing className strings conditionally. +Repository: undefined +Author: Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com) +License Copyright: +=== + +MIT License + +Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: graphql-language-service +Version: 5.2.0 +License: MIT +Private: false +Description: The official, runtime independent Language Service for GraphQL +Repository: http://github.com/graphql/graphiql +Homepage: https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service#readme +Contributors: + GraphQL Contributors +License Copyright: +=== + +MIT License + +Copyright (c) 2021 GraphQL Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: vscode-languageserver-types +Version: 3.17.5 +License: MIT +Private: false +Description: Types used by the Language server for node +Repository: https://github.com/Microsoft/vscode-languageserver-node.git +Author: Microsoft Corporation +License Copyright: +=== + +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: nullthrows +Version: 1.1.1 +License: MIT +Private: false +Description: flow typed nullthrows +Repository: undefined +Author: Andres Suarez <zertosh@gmail.com> +License Copyright: +=== + +The MIT License (MIT) +Copyright (c) 2016 Andres Suarez + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: is-primitive +Version: 3.0.1 +License: MIT +Private: false +Description: Returns `true` if the value is a primitive. +Repository: undefined +Homepage: https://github.com/jonschlinkert/is-primitive +Author: Jon Schlinkert (https://github.com/jonschlinkert) +Contributors: + hemanth.hm (http://h3manth.com) + Jon Schlinkert (http://twitter.com/jonschlinkert) + Jordan Harband (https://twitter.com/ljharb) + Nick Bottomley (https://github.com/bttmly) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: isobject +Version: 3.0.1 +License: MIT +Private: false +Description: Returns true if the value is an object and not an array or null. +Repository: undefined +Homepage: https://github.com/jonschlinkert/isobject +Author: Jon Schlinkert (https://github.com/jonschlinkert) +Contributors: + null (https://github.com/LeSuisse) + Brian Woodward (https://twitter.com/doowb) + Jon Schlinkert (http://twitter.com/jonschlinkert) + Magnús Dæhlen (https://github.com/magnudae) + Tom MacWright (https://macwright.org) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: is-plain-object +Version: 2.0.4 +License: MIT +Private: false +Description: Returns true if an object was created by the `Object` constructor. +Repository: undefined +Homepage: https://github.com/jonschlinkert/is-plain-object +Author: Jon Schlinkert (https://github.com/jonschlinkert) +Contributors: + Jon Schlinkert (http://twitter.com/jonschlinkert) + Osman Nuri OkumuÅŸ (http://onokumus.com) + Steven Vachon (https://svachon.com) + null (https://github.com/wtgtybhertgeghgtwtg) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014-2017, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: set-value +Version: 4.1.0 +License: MIT +Private: false +Description: Set nested properties on an object using dot notation. +Repository: undefined +Homepage: https://github.com/jonschlinkert/set-value +Author: Jon Schlinkert <jon.schlinkert@sellside.com> (https://github.com/jonschlinkert) +Contributors: + Jon Schlinkert (http://twitter.com/jonschlinkert) + null (https://github.com/wtgtybhertgeghgtwtg) + Vadim Demedes (https://vadimdemedes.com) +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2014-present, Jon Schlinkert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- + +Name: toggle-selection +Version: 1.0.6 +License: MIT +Private: false +Description: Toggle current selected content in browser +Repository: git+https://github.com/sudodoki/toggle-selection +Author: sudodoki <smd.deluzion@gmail.com> (sudodoki.name) +Contributors: + Aleksej Shvajka (https://github.com/shvaikalesh) + +--- + +Name: copy-to-clipboard +Version: 3.3.3 +License: MIT +Private: false +Description: Copy stuff into clipboard using JS with fallbacks +Repository: git+https://github.com/sudodoki/copy-to-clipboard +Author: sudodoki <smd.deluzion@gmail.com> +Contributors: + Aleksej Shvajka (https://github.com/shvaikalesh) +License Copyright: +=== + +MIT License + +Copyright (c) 2017 sudodoki <smd.deluzion@gmail.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @radix-ui/primitive +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-compose-refs +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-context +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-use-layout-effect +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-id +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-use-callback-ref +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-use-controllable-state +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-slot +Version: 1.0.2 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-primitive +Version: 1.0.3 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-use-escape-keydown +Version: 1.0.3 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-dismissable-layer +Version: 1.0.5 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-focus-scope +Version: 1.0.4 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-portal +Version: 1.0.4 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-presence +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-focus-guards +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: react-remove-scroll-bar +Version: 2.3.6 +License: MIT +Private: false +Description: Removes body scroll without content _shake_ +Repository: undefined +Author: Anton Korzunov <thekashey@gmail.com> + +--- + +Name: use-callback-ref +Version: 1.3.2 +License: MIT +Private: false +Description: The same useRef, but with callback +Repository: undefined +Author: theKashey <thekashey@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2017 Anton Korzunov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: use-sidecar +Version: 1.1.2 +License: MIT +Private: false +Description: Sidecar code splitting utils +Repository: https://github.com/theKashey/use-sidecar +Homepage: https://github.com/theKashey/use-sidecar +Author: theKashey <thekashey@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2017 Anton Korzunov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-remove-scroll +Version: 2.5.5 +License: MIT +Private: false +Description: Disables scroll outside of `children` node. +Repository: undefined +Author: Anton Korzunov <thekashey@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2017 Anton Korzunov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: get-nonce +Version: 1.0.1 +License: MIT +Private: false +Description: returns nonce +Repository: undefined +Homepage: https://github.com/theKashey/get-nonce +Author: Anton Korzunov <thekashey@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2020 Anton Korzunov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: react-style-singleton +Version: 2.2.1 +License: MIT +Private: false +Description: Just create a single stylesheet... +Homepage: https://github.com/theKashey/react-style-singleton#readme +Author: Anton Korzunov (thekashey@gmail.com) + +--- + +Name: aria-hidden +Version: 1.2.4 +License: MIT +Private: false +Description: Cast aria-hidden to everything, except... +Repository: git+https://github.com/theKashey/aria-hidden.git +Homepage: https://github.com/theKashey/aria-hidden#readme +Author: Anton Korzunov <thekashey@gmail.com> +License Copyright: +=== + +MIT License + +Copyright (c) 2017 Anton Korzunov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @radix-ui/react-dialog +Version: 1.0.5 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-visually-hidden +Version: 1.0.3 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-collection +Version: 1.0.3 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-direction +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-use-size +Version: 1.0.1 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-popper +Version: 1.1.3 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-roving-focus +Version: 1.0.4 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-menu +Version: 2.0.6 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @radix-ui/react-dropdown-menu +Version: 2.0.6 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: mdurl +Version: 2.0.0 +License: MIT +Private: false +Description: URL utilities for markdown-it +Repository: undefined +License Copyright: +=== + +Copyright (c) 2015 Vitaly Puzrin, Alex Kocharin. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +.parse() is based on Joyent's node.js `url` code: + +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +--- + +Name: uc.micro +Version: 2.1.0 +License: MIT +Private: false +Description: Micro subset of unicode data files for markdown-it projects. +Repository: undefined +License Copyright: +=== + +Copyright Mathias Bynens <https://mathiasbynens.be/> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: entities +Version: 4.5.0 +License: BSD-2-Clause +Private: false +Description: Encode & decode XML and HTML entities with ease & speed +Repository: git://github.com/fb55/entities.git +Author: Felix Boehm <me@feedic.com> +License Copyright: +=== + +Copyright (c) Felix Böhm +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + +Name: markdown-it +Version: 14.1.0 +License: MIT +Private: false +Description: Markdown-it - modern pluggable markdown parser. +Repository: undefined +License Copyright: +=== + +Copyright (c) 2014 Vitaly Puzrin, Alex Kocharin. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: linkify-it +Version: 5.0.0 +License: MIT +Private: false +Description: Links recognition library with FULL unicode support +Repository: undefined +License Copyright: +=== + +Copyright (c) 2015 Vitaly Puzrin. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: punycode.js +Version: 2.3.1 +License: MIT +Private: false +Description: A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms. +Repository: https://github.com/mathiasbynens/punycode.js.git +Homepage: https://mths.be/punycode +Author: Mathias Bynens (https://mathiasbynens.be/) +Contributors: + Mathias Bynens (https://mathiasbynens.be/) +License Copyright: +=== + +Copyright Mathias Bynens <https://mathiasbynens.be/> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: framer-motion +Version: 6.5.1 +License: MIT +Private: false +Description: A simple and powerful React animation library +Repository: undefined +Author: Framer +License Copyright: +=== + +The MIT License (MIT) + +Copyright (c) 2018 Framer B.V. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: hey-listen +Version: 1.0.8 +License: MIT +Private: false +Description: Warning and invariant dev-ex messaging. +Repository: git+https://github.com/Popmotion/hey-listen.git +Homepage: https://github.com/Popmotion/hey-listen#readme +Author: Matt Perry +License Copyright: +=== + +MIT License + +Copyright (c) 2018 Popmotion + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: style-value-types +Version: 5.0.0 +License: MIT +Private: false +Description: Parsers, transformers and tests for special value types, eg: %, hex codes etc. +Repository: https://github.com/Popmotion/popmotion/tree/master/packages/style-value-types +Homepage: https://popmotion.io +Author: Matt Perry +License Copyright: +=== + +The MIT License (MIT) +Copyright (c) 2018 Popmotion + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: popmotion +Version: 11.0.3 +License: MIT +Private: false +Description: The animator's toolbox +Repository: https://github.com/Popmotion/popmotion/tree/master/packages/popmotion +Homepage: https://popmotion.io +Author: Matt Perry +License Copyright: +=== + +The MIT License (MIT) + +Copyright © 2019 Framer BV + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- + +Name: framesync +Version: 6.0.1 +License: MIT +Private: false +Description: A frame-synced render loop for JavaScript +Repository: git+https://github.com/Popmotion/popmotion.git +Homepage: https://popmotion.io +Author: Matt Perry +License Copyright: +=== + +MIT License + +Copyright © 2019 Framer BV + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @radix-ui/react-tooltip +Version: 1.0.7 +License: MIT +Private: false +Repository: git+https://github.com/radix-ui/primitives.git +Homepage: https://radix-ui.com/primitives + +--- + +Name: @tanstack/virtual-core +Version: 3.4.0 +License: MIT +Private: false +Description: Headless UI for virtualizing scrollable elements in TS/JS + Frameworks +Repository: git+https://github.com/tanstack/virtual.git +Homepage: https://github.com/tanstack/virtual#readme +Author: Tanner Linsley +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Tanner Linsley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @tanstack/react-virtual +Version: 3.4.0 +License: MIT +Private: false +Description: Headless UI for virtualizing scrollable elements in React +Repository: git+https://github.com/tanstack/virtual.git +Homepage: https://github.com/tanstack/virtual#readme +Author: Tanner Linsley +License Copyright: +=== + +MIT License + +Copyright (c) 2021-present Tanner Linsley + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: @headlessui/react +Version: 1.7.19 +License: MIT +Private: false +Description: A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS. +Repository: git+https://github.com/tailwindlabs/headlessui.git + +--- + +Name: @graphiql/react +Version: 0.21.0 +License: MIT +Private: false +Repository: https://github.com/graphql/graphiql +Homepage: http://github.com/graphql/graphiql/tree/master/packages/graphiql-react#readme +License Copyright: +=== + +MIT License + +Copyright (c) 2021 GraphQL Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Name: graphiql +Version: 3.2.0 +License: MIT +Private: false +Description: An graphical interactive in-browser GraphQL IDE. +Repository: http://github.com/graphql/graphiql +Homepage: http://github.com/graphql/graphiql/tree/master/packages/graphiql#readme +Contributors: + Hyohyeon Jeong <asiandrummer@fb.com> + Lee Byron <lee@leebyron.com> (http://leebyron.com/) +License Copyright: +=== + +MIT License + +Copyright (c) 2021 GraphQL Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 1c25173ef92b19ff6099af900daa1c1eaab02a87..79e96578aa835bac50fafcd0511afc2673b89080 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,7 +13,6 @@ // the following variables will override the default connection settings window.VITE_HTTP_HOST = undefined // 'localhost:8000' window.VITE_HTTP_WS = undefined // 'ws://localhost:8000/inject/v1/subscription' - window.INJECT_NOAUTH = undefined // true </script> <script type="module" src="/src/main.tsx"></script> </body> diff --git a/frontend/package.json b/frontend/package.json index b92bfeb714f325cb5bdee2b6d02431d7aac30f6e..8b836e3fc321038db5c622dbe8d91a7d95aa1f63 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,6 +3,7 @@ "version": "0.3.0", "description": "Main wrapper for rendering INJECT Frontend", "main": "index.js", + "license": "MIT", "scripts": { "dev": "vite", "build": "tsc && vite build --empty-out-dir", @@ -27,20 +28,24 @@ "graphiql": "^3.2.0", "graphql": "^16.8.1", "lightningcss": "^1.24.1", + "rollup-plugin-license": "^3.4.0", + "sass": "1.70.0", "terser": "^5.29.2", "typescript": "5.3.2" }, "dependencies": { + "@blueprintjs/colors": "^5.1.1", "@blueprintjs/core": "*", "@blueprintjs/icons": "*", "@blueprintjs/select": "*", "@emotion/css": "11.11.2", "@emotion/react": "^11.11.4", + "@fontsource/inter": "^5.0.18", "@generouted/react-router": "1.18.5", "@inject/graphql": "workspace:graphql", "@inject/shared": "workspace:shared", "@vitejs/plugin-react-swc": "3.6.0", - "ahooks": "3.7.10", + "ahooks": "3.8.0", "d3-array": "^3.2.4", "d3-axis": "^3.0.0", "d3-brush": "^3.0.0", @@ -54,8 +59,8 @@ "dexie-react-hooks": "^1.1.7", "lodash": "4.17.21", "normalize.css": "8.0.1", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "react-router-dom": "6.22.3", "rollup-plugin-visualizer": "5.12.0", "save-svg-as-png": "^1.4.17", diff --git a/frontend/src/_overrideDefault.scss b/frontend/src/_overrideDefault.scss new file mode 100644 index 0000000000000000000000000000000000000000..8d4a97a99d38d5a750057dc0d8678b411409500a --- /dev/null +++ b/frontend/src/_overrideDefault.scss @@ -0,0 +1,28 @@ +// Overrides for BlueprintJS default values + +$pt-grid-size: 12px; +$pt-font-family: 'Inter', 'Verdana', 'Arial', sans-serif; + +/** + * BlueprintJS default values are set-arbitrarily, this change makes them + * responsive to $pt-grid-size + * + * `(default_value / default_grid_size) * $pt-grid-size` + * + * The default for $pt-grid-size is set to 10px in + * @blueprintjs/core/src/common/variables + * + * The default values for headings come from + * @blueprintjs/core/src/typography + */ +@function getNewHeading($size, $lineHeight) { + @return ($size / 10px * $pt-grid-size, $lineHeight / 10px * $pt-grid-size); +} +$headings: ( + 'h1': getNewHeading(36px, 40px), + 'h2': getNewHeading(28px, 32px), + 'h3': getNewHeading(22px, 25px), + 'h4': getNewHeading(18px, 21px), + 'h5': getNewHeading(16px, 19px), + 'h6': getNewHeading(14px, 16px), +); diff --git a/frontend/src/global.css b/frontend/src/_scrollbar.scss similarity index 57% rename from frontend/src/global.css rename to frontend/src/_scrollbar.scss index e158e8e19abe2906abb76b56b4e14ac5d8e545d1..6554676e41aadc7ee7fd1ed8eccddaf99b885c22 100644 --- a/frontend/src/global.css +++ b/frontend/src/_scrollbar.scss @@ -1,47 +1,3 @@ -html, body, #root { - height: 100vh; - width: 100vw; -} - -html { - overflow-x: hidden; -} - -body.bp5-dark { - background-color: #2f343c; -} - -* { - box-sizing: border-box; -} - -h1 { - margin-top: 0.33em; - margin-bottom: 0.66em; -} - -h2 { - margin-top: 0.16em; - margin-bottom: 0.33em; -} - -h3 { - margin-top: 0.08em; - margin-bottom: 0.16em; -} - -h4, -h5, -h6 { - margin-top: 0.04em; - margin-bottom: 0.08em; -} - -.bp5-portal { - /* let toast notifications appear on top */ - z-index: 39; -} - ::-webkit-scrollbar { width: 16px; } diff --git a/frontend/src/actionlog/ActionLog/components/ActionLogTimeline.tsx b/frontend/src/actionlog/ActionLog/components/ActionLogTimeline.tsx deleted file mode 100644 index d7908263e9b265da68fd45164bd790b5bd00da5b..0000000000000000000000000000000000000000 --- a/frontend/src/actionlog/ActionLog/components/ActionLogTimeline.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import InjectMessage from '@/actionlog/InjectMessage' -import { Button, NonIdealState } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' -import { - useEffect, - useMemo, - useRef, - type FC, - type MouseEventHandler, -} from 'react' - -const view = css` - height: 100%; - overflow-y: auto; - display: flex; - flex-direction: column; - justify-content: space-between; -` - -const bottom = css` - display: flex; - justify-content: flex-end; -` - -interface ActionLogTimelineProps { - actionLogs: ActionLog[] - exerciseId: string - teamId: string - getOnInspect: (actionLogId: string) => MouseEventHandler - inInstructor: boolean -} - -const ActionLogTimeline: FC<ActionLogTimelineProps> = ({ - actionLogs, - exerciseId, - teamId, - getOnInspect, - inInstructor, -}) => { - const unreadLogsStartRef = useRef<HTMLDivElement | null>(null) - const bottomRef = useRef<HTMLDivElement | null>(null) - - /** - * this prevents the change of actionLogs from triggering a - * re-calculation of the firstUnreadIndex - * - * actionLog.readReceipt will update as soon as the InjectMessage is - * rendered, but the actionLog needs to still be rendered as unread - */ - const firstUnreadIndex = useMemo(() => { - const index = actionLogs.findIndex(actionLog => !actionLog.readReceipt) - return index === -1 ? actionLogs.length : index - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - useEffect(() => { - if (bottomRef.current) { - bottomRef.current.scrollIntoView({ behavior: 'instant' }) - } - }, []) - useEffect(() => { - if (bottomRef.current) { - bottomRef.current.scrollIntoView({ behavior: 'smooth' }) - } - }, [actionLogs]) - const handleTopOfUnread = () => { - if (unreadLogsStartRef.current) { - unreadLogsStartRef.current.scrollIntoView({ behavior: 'smooth' }) - } - } - - return ( - <div className={view}> - {actionLogs.length > 0 ? ( - <> - <div> - {actionLogs.map((actionLog, index) => ( - <div key={index}> - {index === firstUnreadIndex && <div ref={unreadLogsStartRef} />} - { - <InjectMessage - key={actionLog.id} - exerciseId={exerciseId} - teamId={teamId} - actionLog={actionLog} - onInspect={getOnInspect(actionLog.id)} - inInstructor={inInstructor} - allowFileRedirect - /> - } - </div> - ))} - </div> - - <div ref={bottomRef} className={bottom}> - <Button - icon='arrow-up' - minimal - onClick={handleTopOfUnread} - disabled={firstUnreadIndex === actionLogs.length} - > - See all unread - </Button> - </div> - </> - ) : ( - <NonIdealState - icon='low-voltage-pole' - title='No notifications' - description='Please wait for new notifications to come in' - /> - )} - </div> - ) -} - -export default ActionLogTimeline diff --git a/frontend/src/actionlog/ActionLog/index.tsx b/frontend/src/actionlog/ActionLog/index.tsx index 93bac8a05242b94448a6bb190e82ae1078ac67c0..2d3212055618fa2499c4ca2b47efe83607bbd957 100644 --- a/frontend/src/actionlog/ActionLog/index.tsx +++ b/frontend/src/actionlog/ActionLog/index.tsx @@ -1,16 +1,40 @@ -import ErrorMessage from '@/components/ErrorMessage' -import { Spinner } from '@blueprintjs/core' -import useGetChannelLogs from '@inject/graphql/custom/useGetVisibleActionLogs' +import InjectMessage from '@/actionlog/InjectMessage' +import type { NonIdealStateProps } from '@blueprintjs/core' +import { Button, NonIdealState } from '@blueprintjs/core' +import { css } from '@emotion/css' +import { useGetTeamChannelLogsSuspenseQuery } from '@inject/graphql/queries/GetTeamChannelLogs.generated' import useInInstructor from '@inject/shared/hooks/useInInstructor' -import type { FC, MouseEventHandler } from 'react' -import { memo } from 'react' -import ActionLogTimeline from './components/ActionLogTimeline' +import notEmpty from '@inject/shared/utils/notEmpty' +import type { ReactNode } from 'react' +import { + memo, + useEffect, + useMemo, + useRef, + type FC, + type MouseEventHandler, +} from 'react' + +const view = css` + height: 100%; + overflow-y: auto; + display: flex; + flex-direction: column; + justify-content: space-between; +` + +const bottom = css` + display: flex; + justify-content: flex-end; +` interface ActionLogProps { teamId: string exerciseId: string channelId: string getOnInspect: (actionLogId: string) => MouseEventHandler + bottomOverride?: ReactNode + noDataProps?: NonIdealStateProps } /** @@ -21,33 +45,97 @@ const ActionLog: FC<ActionLogProps> = ({ exerciseId, channelId, getOnInspect, + bottomOverride, + noDataProps, }) => { const inInstructor = useInInstructor() - const { data, loading, error } = useGetChannelLogs(channelId, { - variables: { teamId }, + const { data } = useGetTeamChannelLogsSuspenseQuery({ + variables: { teamId, channelId }, + fetchPolicy: 'cache-first', }) + const actionLogs = (data.teamChannelLogs || [])?.filter(notEmpty) - if (loading) { - return <Spinner /> - } - if (error) { - return ( - <ErrorMessage> - <h1>Error occurred!</h1> - <p>{error.message}</p> - </ErrorMessage> - ) + const unreadLogsStartRef = useRef<HTMLDivElement | null>(null) + const bottomRef = useRef<HTMLDivElement | null>(null) + + /** + * this prevents the change of actionLogs from triggering a + * re-calculation of the firstUnreadIndex + * + * actionLog.readReceipt will update as soon as the InjectMessage is + * rendered, but the actionLog needs to still be rendered as unread + */ + const firstUnreadIndex = useMemo(() => { + const index = actionLogs.findIndex(actionLog => !actionLog.readReceipt) + return index === -1 ? actionLogs.length : index + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + // TODO: we should change it to a proper look-ahead algorithm and use actionLog's ID for indicating the read state, or use something better + + useEffect(() => { + if (bottomRef.current) { + bottomRef.current.scrollIntoView({ behavior: 'instant' }) + } + }, []) + useEffect(() => { + if (bottomRef.current) { + bottomRef.current.scrollIntoView({ behavior: 'smooth' }) + } + }, [actionLogs]) + const handleTopOfUnread = () => { + if (unreadLogsStartRef.current) { + unreadLogsStartRef.current.scrollIntoView({ behavior: 'smooth' }) + } } return ( - <ActionLogTimeline - actionLogs={data.actionLogs} - teamId={teamId} - exerciseId={exerciseId} - getOnInspect={getOnInspect} - inInstructor={inInstructor} - /> + <div className={view}> + {actionLogs.length > 0 && ( + <> + <div> + {actionLogs.map((actionLog, index) => ( + <div key={actionLog.id}> + {index === firstUnreadIndex && <div ref={unreadLogsStartRef} />} + { + <InjectMessage + key={actionLog.id} + exerciseId={exerciseId} + teamId={teamId} + actionLog={actionLog} + onInspect={getOnInspect(actionLog.id)} + inInstructor={inInstructor} + allowFileRedirect + /> + } + </div> + ))} + </div> + + <div ref={bottomRef} className={bottom}> + <Button + icon='arrow-up' + minimal + onClick={handleTopOfUnread} + disabled={firstUnreadIndex === actionLogs.length} + > + See all unread + </Button> + </div> + </> + )} + {bottomOverride && ( + <div style={{ height: 'max-content' }}>{bottomOverride}</div> + )} + {actionLogs.length === 0 && !bottomOverride && ( + <NonIdealState + icon='low-voltage-pole' + title='No notifications' + description='Please wait for new notifications to come in' + {...noDataProps} + /> + )} + </div> ) } diff --git a/frontend/src/actionlog/InjectMessage/Content/CustomInjectContent.tsx b/frontend/src/actionlog/InjectMessage/Content/CustomInjectContent.tsx index b7e00185622beb3b713bcae20967c1a3140dd661..dc667078833371453849a585caab31ea57a40a84 100644 --- a/frontend/src/actionlog/InjectMessage/Content/CustomInjectContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/CustomInjectContent.tsx @@ -1,6 +1,6 @@ import FileButton from '@/components/FileViewRedirectButton/FileButton' import type { CustomInjectDetails } from '@inject/graphql/fragments/CustomInjectDetails.generated' -import type { FC } from 'react' +import { forwardRef } from 'react' interface CustomInjectContentProps { details: CustomInjectDetails @@ -10,23 +10,22 @@ interface CustomInjectContentProps { allowFileRedirect: boolean } -const CustomInjectContent: FC<CustomInjectContentProps> = ({ - details, - teamId, - exerciseId, - inInstructor, - allowFileRedirect, -}) => ( +// eslint-disable-next-line react/display-name +const CustomInjectContent = forwardRef< + HTMLDivElement, + CustomInjectContentProps +>(({ details, teamId, exerciseId, inInstructor, allowFileRedirect }, ref) => ( <> <div dangerouslySetInnerHTML={{ __html: details.content.rendered, }} + ref={ref} /> {details.content.fileInfo && ( <div style={{ - marginTop: details.content.rendered ? '10px' : undefined, + marginTop: details.content.rendered ? '0.5rem' : undefined, }} > <FileButton @@ -39,6 +38,6 @@ const CustomInjectContent: FC<CustomInjectContentProps> = ({ </div> )} </> -) +)) export default CustomInjectContent diff --git a/frontend/src/actionlog/InjectMessage/Content/EmailContent.tsx b/frontend/src/actionlog/InjectMessage/Content/EmailContent.tsx index 2712caa13e8c97837d2dfe91bf8169f41e47fa18..57fc92f7059c8a1b8c51d34a016a72aa604ea193 100644 --- a/frontend/src/actionlog/InjectMessage/Content/EmailContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/EmailContent.tsx @@ -1,6 +1,6 @@ import FileButton from '@/components/FileViewRedirectButton/FileButton' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' -import type { FC } from 'react' +import { forwardRef } from 'react' interface EmailContentProps { details: EmailDetails @@ -10,35 +10,33 @@ interface EmailContentProps { allowFileRedirect: boolean } -const EmailContent: FC<EmailContentProps> = ({ - details, - teamId, - exerciseId, - inInstructor, - allowFileRedirect, -}) => ( - <> - <div - dangerouslySetInnerHTML={{ - __html: details.content.rendered, - }} - /> - {details.content.fileInfo && ( +// eslint-disable-next-line react/display-name +const EmailContent = forwardRef<HTMLDivElement, EmailContentProps>( + ({ details, teamId, exerciseId, inInstructor, allowFileRedirect }, ref) => ( + <> <div - style={{ - marginTop: details.content.rendered ? '10px' : undefined, + dangerouslySetInnerHTML={{ + __html: details.content.rendered, }} - > - <FileButton - teamId={teamId} - fileInfo={details.content.fileInfo} - exerciseId={exerciseId} - inInstructor={inInstructor} - allowRedirect={allowFileRedirect} - /> - </div> - )} - </> + ref={ref} + /> + {details.content.fileInfo && ( + <div + style={{ + marginTop: details.content.rendered ? '0.5rem' : undefined, + }} + > + <FileButton + teamId={teamId} + fileInfo={details.content.fileInfo} + exerciseId={exerciseId} + inInstructor={inInstructor} + allowRedirect={allowFileRedirect} + /> + </div> + )} + </> + ) ) export default EmailContent diff --git a/frontend/src/actionlog/InjectMessage/Content/InjectContent.tsx b/frontend/src/actionlog/InjectMessage/Content/InjectContent.tsx index 05d96f4da81a103cebb0cabbf40ae8d11bc469fc..57eafd03661f1f16766a90b5fefdf9947704d7c8 100644 --- a/frontend/src/actionlog/InjectMessage/Content/InjectContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/InjectContent.tsx @@ -1,6 +1,7 @@ import FileButton from '@/components/FileViewRedirectButton/FileButton' +import { css } from '@emotion/css' import type { InjectDetails } from '@inject/graphql/fragments/InjectDetails.generated' -import type { FC } from 'react' +import { forwardRef } from 'react' interface InjectContentProps { details: InjectDetails @@ -10,35 +11,40 @@ interface InjectContentProps { allowFileRedirect: boolean } -const InjectContent: FC<InjectContentProps> = ({ - details, - teamId, - exerciseId, - inInstructor, - allowFileRedirect, -}) => ( - <> - <div - dangerouslySetInnerHTML={{ - __html: details.content.rendered, - }} - /> - {details.content.fileInfo && ( +const removeFirst = css` + & > *:first-child { + margin-top: 0; + } +` + +// eslint-disable-next-line react/display-name +const InjectContent = forwardRef<HTMLDivElement, InjectContentProps>( + ({ details, teamId, exerciseId, inInstructor, allowFileRedirect }, ref) => ( + <> <div - style={{ - marginTop: details.content.rendered ? '10px' : undefined, + dangerouslySetInnerHTML={{ + __html: details.content.rendered, }} - > - <FileButton - teamId={teamId} - fileInfo={details.content.fileInfo} - exerciseId={exerciseId} - inInstructor={inInstructor} - allowRedirect={allowFileRedirect} - /> - </div> - )} - </> + className={removeFirst} + ref={ref} + /> + {details.content.fileInfo && ( + <div + style={{ + marginTop: details.content.rendered ? '0.5rem' : undefined, + }} + > + <FileButton + teamId={teamId} + fileInfo={details.content.fileInfo} + exerciseId={exerciseId} + inInstructor={inInstructor} + allowRedirect={allowFileRedirect} + /> + </div> + )} + </> + ) ) export default InjectContent diff --git a/frontend/src/actionlog/InjectMessage/Content/InstructorQuestionnaireContent.tsx b/frontend/src/actionlog/InjectMessage/Content/InstructorQuestionnaireContent.tsx index 36e55e18ba5b9a857c3827fdd88608ea1f6dc346..f55a38f27261d5abef3338984417b8eacd523db0 100644 --- a/frontend/src/actionlog/InjectMessage/Content/InstructorQuestionnaireContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/InstructorQuestionnaireContent.tsx @@ -2,6 +2,7 @@ import ErrorMessage from '@/components/ErrorMessage' import type { OptionProps } from '@blueprintjs/core' import { Colors, + Divider, NonIdealState, Radio, RadioGroup, @@ -13,16 +14,21 @@ import type { QuestionnaireDetails } from '@inject/graphql/fragments/Questionnai import type { AnswerInput } from '@inject/graphql/types' import useTeamQuestionnaireStateSubscription from '@inject/graphql/utils/useTeamQuestionnaireStateSubscription' import type { FC } from 'react' -import { useEffect, useState } from 'react' -import { - INVALID_CHOICE, - questions, - wrapper, -} from './TraineeQuestionnaireContent' +import { Fragment, useEffect, useState } from 'react' +import { INVALID_CHOICE, questionNumber } from './TraineeQuestionnaireContent' + +const wrapper = css` + height: 100%; + width: 100%; + overflow-y: auto; + display: grid; + grid-template-columns: auto auto 1fr; + row-gap: 0.5rem; +` const radio = (correct: boolean) => css` - padding-bottom: 2px; - border-bottom: 2px solid ${correct ? Colors.GREEN5 : 'transparent'}; + padding-bottom: 0.2rem; + border-bottom: 0.2rem solid ${correct ? Colors.GREEN5 : 'transparent'}; ` interface InstructorQuestionnaireContentProps { @@ -59,7 +65,7 @@ const InstructorQuestionnaireContent: FC< })) ) }, [data, details.questions]) - if (loading) { + if (loading && !data) { return <Spinner /> } if (error) { @@ -98,13 +104,24 @@ const InstructorQuestionnaireContent: FC< return ( <div className={wrapper}> - <div className={questions}> - {details.questions.map((question, questionIndex) => ( + {details.questions.map((question, questionIndex) => ( + <Fragment key={question.id}> + {details.questions.length > 1 && ( + <> + <div className={questionNumber}>{`${questionIndex + 1}.`}</div> + <Divider /> + </> + )} <RadioGroup - key={question.id} disabled inline - label={`${questionIndex + 1}. ${question.text}`} + label={ + <div + dangerouslySetInnerHTML={{ + __html: question.content.rendered, + }} + /> + } selectedValue={ answers[questionIndex].choice === INVALID_CHOICE ? undefined @@ -121,8 +138,8 @@ const InstructorQuestionnaireContent: FC< /> ))} </RadioGroup> - ))} - </div> + </Fragment> + ))} </div> ) } diff --git a/frontend/src/actionlog/InjectMessage/Content/ToolContent.tsx b/frontend/src/actionlog/InjectMessage/Content/ToolContent.tsx index 9cdefa1d2db62ac5447156608bd43c6be236c6b9..2ba8a4a173e4f5fd7b1675cdfa603e8dd23680de 100644 --- a/frontend/src/actionlog/InjectMessage/Content/ToolContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/ToolContent.tsx @@ -1,7 +1,7 @@ import FileButton from '@/components/FileViewRedirectButton/FileButton' import { css } from '@emotion/css' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' -import type { FC } from 'react' +import { forwardRef } from 'react' const wrapper = css` display: flex; @@ -24,43 +24,37 @@ interface ToolContentProps { allowFileRedirect: boolean } -const ToolContent: FC<ToolContentProps> = ({ - details, - teamId, - exerciseId, - inInstructor, - allowFileRedirect, -}) => ( - <div className={wrapper}> - {details.tool.hasParam && ( - <> - <div className={emphasized}>argument:</div> - <div>{details.argument}</div> - <div /> - <div className={emphasized}>response:</div> - </> - )} - <div - dangerouslySetInnerHTML={{ - __html: details.content.rendered, - }} - /> - {details.content.fileInfo && ( +// eslint-disable-next-line react/display-name +const ToolContent = forwardRef<HTMLDivElement, ToolContentProps>( + ({ details, teamId, exerciseId, inInstructor, allowFileRedirect }, ref) => ( + <div className={wrapper}> + <div className={emphasized}>argument:</div> + <div>{details.argument}</div> + <div /> + <div className={emphasized}>response:</div> <div - style={{ - marginTop: details.content.rendered ? '10px' : undefined, + dangerouslySetInnerHTML={{ + __html: details.content.rendered, }} - > - <FileButton - teamId={teamId} - fileInfo={details.content.fileInfo} - exerciseId={exerciseId} - inInstructor={inInstructor} - allowRedirect={allowFileRedirect} - /> - </div> - )} - </div> + ref={ref} + /> + {details.content.fileInfo && ( + <div + style={{ + marginTop: details.content.rendered ? '0.5rem' : undefined, + }} + > + <FileButton + teamId={teamId} + fileInfo={details.content.fileInfo} + exerciseId={exerciseId} + inInstructor={inInstructor} + allowRedirect={allowFileRedirect} + /> + </div> + )} + </div> + ) ) export default ToolContent diff --git a/frontend/src/actionlog/InjectMessage/Content/TraineeQuestionnaireContent.tsx b/frontend/src/actionlog/InjectMessage/Content/TraineeQuestionnaireContent.tsx index ee7007082276ac1ed62d758a217cf9e98d5fc596..50cf218a4d68e1f5ca320fc2e389fd03972f6444 100644 --- a/frontend/src/actionlog/InjectMessage/Content/TraineeQuestionnaireContent.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/TraineeQuestionnaireContent.tsx @@ -1,42 +1,60 @@ import ErrorMessage from '@/components/ErrorMessage' -import type { OptionProps } from '@blueprintjs/core' -import { Button, NonIdealState, RadioGroup, Spinner } from '@blueprintjs/core' +import type { ButtonProps, OptionProps } from '@blueprintjs/core' +import { + Button, + Callout, + Divider, + NonIdealState, + RadioGroup, + Spinner, +} from '@blueprintjs/core' import { css } from '@emotion/css' import type { Question } from '@inject/graphql/fragments/Question.generated' import type { QuestionnaireDetails } from '@inject/graphql/fragments/QuestionnaireDetails.generated' import { useAnswerQuestionnaire } from '@inject/graphql/mutations/AnswerQuestionnaire.generated' -import { - GetTeamQuestionnaireStateDocument, - useGetTeamQuestionnaireState, -} from '@inject/graphql/queries/GetTeamQuestionnaireState.generated' +import { useGetTeam } from '@inject/graphql/queries/GetTeam.generated' +import { GetTeamQuestionnaireStateDocument } from '@inject/graphql/queries/GetTeamQuestionnaireState.generated' import type { AnswerInput } from '@inject/graphql/types' +import useTeamQuestionnaireStateSubscription from '@inject/graphql/utils/useTeamQuestionnaireStateSubscription' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' -import { useEffect, useState } from 'react' +import { Fragment, useEffect, useMemo, useState } from 'react' -export const wrapper = css` +const wrapper = css` display: flex; flex-direction: column; align-items: flex-start; height: 100%; width: 100%; - gap: 0.5rem; + gap: 1rem; ` -export const questions = css` - width: 100%; +const content = css` + flex: 1; overflow-y: auto; display: flex; flex-direction: column; - gap: 1rem; + gap: 0.5rem; + width: 100%; +` + +const body = css` + display: grid; + grid-template-columns: auto auto 1fr; + row-gap: 0.5rem; + flex: 1; ` const footer = css` - width: 100%; display: flex; justify-content: flex-end; ` +export const questionNumber = css` + text-align: right; +` + export const INVALID_CHOICE = -1 export interface TraineeQuestionnaireContentProps { @@ -70,15 +88,26 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ questInput: { answers, questionnaireId: details.id, teamId }, }, refetchQueries: [GetTeamQuestionnaireStateDocument], - onCompleted: () => { - notify('Answers submitted') - }, onError: error => notify(error.message, { intent: 'danger' }), }) - const { data, loading, error } = useGetTeamQuestionnaireState({ - variables: { teamId, questionnaireId: details.id }, - }) + // TODO: ensure this works once backend is updated + /* + * currently, teamData.team.userSet will always be an empty array + * when called by a trainee + * + * Should be fixed by the following MR: + * https://gitlab.fi.muni.cz/inject/backend/-/merge_requests/237 + */ + const { + data: teamData, + loading: teamLoading, + error: teamError, + } = useGetTeam({ variables: { teamId } }) + const { data, loading, error } = useTeamQuestionnaireStateSubscription( + teamId, + details.id + ) useEffect(() => { if (!data || !data.questionnaireState) { return @@ -94,7 +123,22 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ })) ) }, [data, details.questions]) - if (loading) { + + const { status } = data?.questionnaireState || {} + + const { title, disabled } = useMemo<ButtonProps>(() => { + if (status === 'ANSWERED') { + return { title: 'Answers have already been submitted', disabled: true } + } + + if (answers.some(answer => answer.choice === INVALID_CHOICE)) { + return { title: 'Answer all questions before submitting', disabled: true } + } + + return { title: undefined, disabled: false } + }, [answers, status]) + + if (loading || teamLoading) { return <Spinner /> } if (error) { @@ -105,7 +149,15 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ </ErrorMessage> ) } - if (!data || !data.questionnaireState) { + if (teamError) { + return ( + <ErrorMessage> + <h1>Error occurred!</h1> + <p>{teamError.message}</p> + </ErrorMessage> + ) + } + if (!data?.questionnaireState || !teamData?.team) { return ( <NonIdealState icon='low-voltage-pole' @@ -114,8 +166,7 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ /> ) } - - const { status } = data.questionnaireState + const numUsers = teamData.team.userSet?.filter(notEmpty).length || 0 const handleChange = ( choice: number, @@ -132,16 +183,6 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ ]) } - const validateAnswers = () => - answers.every(answer => answer.choice !== INVALID_CHOICE) - const handleSubmit = () => { - if (!validateAnswers()) { - notify('Please answer all questions', { intent: 'danger' }) - return - } - mutate() - } - const getOptions = ( question: Question ): readonly OptionProps<string | number>[] | undefined => @@ -160,42 +201,64 @@ const TraineeQuestionnaireContent: FC<TraineeQuestionnaireContentProps> = ({ return ( <div className={wrapper}> - <div className={questions}> - {details.questions.map((question, questionIndex) => ( - <RadioGroup - key={question.id} - disabled={status === 'A_4'} - inline - label={`${questionIndex + 1}. ${question.text}`} - selectedValue={ - answers[questionIndex].choice === INVALID_CHOICE - ? undefined - : answers[questionIndex].choice - } - options={getOptions(question)} - onChange={event => - handleChange( - Number(event.currentTarget.value), - question.id, - questionIndex - ) - } - /> - ))} - </div> - <div className={footer}> - <Button - intent='primary' - onClick={handleSubmit} - disabled={status === 'A_4'} - title={ - status === 'A_4' - ? 'The answers have already been submitted' - : undefined - } - > - Submit - </Button> + {status !== 'ANSWERED' && numUsers > 1 && ( + <Callout icon='warning-sign'> + <b>Answers can be submitted only once per team!</b> + <br /> + <span>Make sure all team members agree before submitting</span> + </Callout> + )} + + <div className={content}> + <div className={body}> + {details.questions.map((question, questionIndex) => ( + <Fragment key={question.id}> + {details.questions.length > 1 && ( + <> + <div + className={questionNumber} + >{`${questionIndex + 1}.`}</div> + <Divider /> + </> + )} + <RadioGroup + disabled={status === 'ANSWERED'} + inline + label={ + <div + dangerouslySetInnerHTML={{ + __html: question.content.rendered, + }} + /> + } + selectedValue={ + answers[questionIndex].choice === INVALID_CHOICE + ? undefined + : answers[questionIndex].choice + } + options={getOptions(question)} + onChange={event => + handleChange( + Number(event.currentTarget.value), + question.id, + questionIndex + ) + } + /> + </Fragment> + ))} + </div> + + <div className={footer}> + <Button + intent='primary' + onClick={mutate} + disabled={disabled} + title={title} + > + Submit + </Button> + </div> </div> </div> ) diff --git a/frontend/src/actionlog/InjectMessage/Content/index.tsx b/frontend/src/actionlog/InjectMessage/Content/index.tsx index 180361d53adaf54ca735a71cd8a4174fa6d32283..f2b1642e7d9d5628bad19c70ca40dfaa05525b3c 100644 --- a/frontend/src/actionlog/InjectMessage/Content/index.tsx +++ b/frontend/src/actionlog/InjectMessage/Content/index.tsx @@ -1,10 +1,11 @@ +import { OPEN_COMPOSE_EVENT_TYPE } from '@/email/EmailFormOverlay' import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' import type { CustomInjectDetails } from '@inject/graphql/fragments/CustomInjectDetails.generated' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' import type { InjectDetails } from '@inject/graphql/fragments/InjectDetails.generated' import type { QuestionnaireDetails } from '@inject/graphql/fragments/QuestionnaireDetails.generated' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' -import type { FC } from 'react' +import { createRef, useEffect, type FC } from 'react' import CustomInjectContent from './CustomInjectContent' import EmailContent from './EmailContent' import InjectContent from './InjectContent' @@ -27,6 +28,23 @@ const Content: FC<ContentProps> = ({ inInstructor, allowFileRedirect, }) => { + const injectRef = createRef<HTMLDivElement>() + useEffect(() => { + if (injectRef.current) { + injectRef.current.querySelectorAll('a[href^=mailto]').forEach(x => { + ;(x as HTMLLinkElement).onclick = e => { + e.preventDefault() + window.dispatchEvent( + new CustomEvent(OPEN_COMPOSE_EVENT_TYPE, { + detail: { + email: (x as HTMLLinkElement).href.slice(7), // to remove mailto:! + }, + }) + ) + } + }) + } + }) switch (actionLog.type) { case 'INJECT': return ( @@ -36,6 +54,7 @@ const Content: FC<ContentProps> = ({ exerciseId={exerciseId} inInstructor={inInstructor} allowFileRedirect={allowFileRedirect} + ref={injectRef} /> ) case 'CUSTOM_INJECT': @@ -46,6 +65,7 @@ const Content: FC<ContentProps> = ({ exerciseId={exerciseId} inInstructor={inInstructor} allowFileRedirect={allowFileRedirect} + ref={injectRef} /> ) case 'TOOL': @@ -56,6 +76,7 @@ const Content: FC<ContentProps> = ({ exerciseId={exerciseId} inInstructor={inInstructor} allowFileRedirect={allowFileRedirect} + ref={injectRef} /> ) case 'FORM': @@ -78,6 +99,7 @@ const Content: FC<ContentProps> = ({ exerciseId={exerciseId} inInstructor={inInstructor} allowFileRedirect={allowFileRedirect} + ref={injectRef} /> ) default: diff --git a/frontend/src/actionlog/InjectMessage/index.tsx b/frontend/src/actionlog/InjectMessage/index.tsx index 1d05f74a4426dccda6627cc48a0c3c782c1b61df..051c798133e746d237d5aa36dab4f40af741241e 100644 --- a/frontend/src/actionlog/InjectMessage/index.tsx +++ b/frontend/src/actionlog/InjectMessage/index.tsx @@ -1,4 +1,4 @@ -import { Button, Classes, Colors, Divider, Icon } from '@blueprintjs/core' +import { Button, Classes, Colors, Icon } from '@blueprintjs/core' import type { IconName } from '@blueprintjs/icons' import { css } from '@emotion/css' import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' @@ -8,53 +8,12 @@ import type { QuestionnaireDetails } from '@inject/graphql/fragments/Questionnai import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' import { useWriteReadReceipt } from '@inject/graphql/mutations/clientonly/WriteReadReceipt.generated' import type { LogType } from '@inject/graphql/types' +import Message from '@inject/shared/components/Message' +import HeaderItem from '@inject/shared/components/Message/HeaderItem' import Timestamp from '@inject/shared/components/Timestamp' import { useEffect, useMemo, type FC, type MouseEventHandler } from 'react' import Content from './Content' -const injectMessage = css` - display: flex; - flex-direction: column; - overflow-y: auto; - margin: 1rem; - padding: 0.5rem; - /* subtract the margin */ - width: calc(100% - 2rem); - - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 0.5rem; - .bp5-dark & { - border-color: rgba(255, 255, 255, 0.2); - } - - box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 15px; - transition: box-shadow 0.2s ease; - &:hover { - box-shadow: rgba(0, 0, 0, 0.3) 0px 5px 15px; - } -` - -const fillHeight = css` - /* subtract the margin */ - height: calc(100% - 2rem); -` - -const header = css` - display: flex; - justify-content: space-between; - align-items: center; -` - -const headerItem = css` - display: flex; - gap: 0.5rem; -` - -const content = css` - padding: 0.5rem; - overflow-y: auto; -` - const title = css` font-weight: bold; ` @@ -127,39 +86,44 @@ const InjectMessage: FC<InjectMessageProps> = ({ }, [actionLog.readReceipt, mutate]) return ( - <div className={`${injectMessage} ${fill ? fillHeight : ''}`}> - <div className={header}> - <div className={headerItem}> - <Icon className={Classes.TEXT_MUTED} icon={getIcon(actionLog.type)} /> - <span className={title}>{getTitle(actionLog)}</span> - </div> - <div className={headerItem}> - <Timestamp - minimal - datetime={new Date(actionLog.timestamp || 0)} - style={{ - backgroundColor: initialReadReceipt - ? `${Colors.GREEN3}4d` - : `${Colors.ORANGE3}4d`, - alignSelf: 'center', - }} - /> - {onInspect && ( - <Button minimal icon='fullscreen' onClick={onInspect} /> - )} - </div> - </div> - <Divider /> - <div className={content}> - <Content - actionLog={actionLog} - teamId={teamId} - exerciseId={exerciseId} - inInstructor={inInstructor} - allowFileRedirect={allowFileRedirect} - /> - </div> - </div> + <Message + fill={fill} + header={ + <> + <HeaderItem> + <Icon + className={Classes.TEXT_MUTED} + style={{ paddingLeft: '0.25rem' }} + icon={getIcon(actionLog.type)} + /> + <span className={title}>{getTitle(actionLog)}</span> + </HeaderItem> + <HeaderItem> + <Timestamp + minimal + datetime={new Date(actionLog.timestamp || 0)} + style={{ + backgroundColor: initialReadReceipt + ? `${Colors.GREEN3}4d` + : `${Colors.ORANGE3}4d`, + alignSelf: 'center', + }} + /> + {onInspect && ( + <Button minimal icon='fullscreen' onClick={onInspect} /> + )} + </HeaderItem> + </> + } + > + <Content + actionLog={actionLog} + teamId={teamId} + exerciseId={exerciseId} + inInstructor={inInstructor} + allowFileRedirect={allowFileRedirect} + /> + </Message> ) } diff --git a/frontend/src/actionlog/ToolAction/components/GrapheneForm.tsx b/frontend/src/actionlog/ToolAction/components/GrapheneForm.tsx index 64cb63bd2b33139be9c0bd01deb45623c2c31d82..1f62dc607ae0a2ce7ef6f49f3fa8986e071f5c87 100644 --- a/frontend/src/actionlog/ToolAction/components/GrapheneForm.tsx +++ b/frontend/src/actionlog/ToolAction/components/GrapheneForm.tsx @@ -1,27 +1,43 @@ import { Button, Callout, InputGroup } from '@blueprintjs/core' -import type { ExtendedTool } from '@inject/graphql/fragments/ExtendedToolType.generated' +import { css } from '@emotion/css' +import type { Tool } from '@inject/graphql/fragments/Tool.generated' import { usePerformTeamToolAction } from '@inject/graphql/mutations/PerformTeamToolAction.generated' -import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import type { FC, KeyboardEventHandler } from 'react' import { useState } from 'react' +const wrapper = css` + display: flex; + flex-direction: column; +` + +const submit = css` + margin-top: 0.2rem; + align-self: flex-end; +` + interface GrapheneFormProps { - grapheneTool: ExtendedTool + grapheneTool: Tool teamId: string setOpen(arg0: boolean): void + disabled?: boolean + disabledTitle?: string } const GrapheneForm: FC<GrapheneFormProps> = ({ grapheneTool, teamId, setOpen, + disabled, + disabledTitle, }) => { const { tooltipDescription, id } = grapheneTool const [mutate] = usePerformTeamToolAction() const [value, setValue] = useState<string>('') - const { notify } = useNotifyContext() const mutateData = () => { + if (value.trim() === '') { + return + } mutate({ variables: { teamId, @@ -29,7 +45,6 @@ const GrapheneForm: FC<GrapheneFormProps> = ({ toolArgument: value.trim(), }, }) - notify('Submitted') setOpen(false) setValue('') } @@ -38,17 +53,26 @@ const GrapheneForm: FC<GrapheneFormProps> = ({ } return ( - <Callout> + <Callout className={wrapper}> <p>{tooltipDescription}</p> - {grapheneTool.hasParam && ( - <InputGroup - placeholder={grapheneTool.hint || 'Argument'} - value={value} - onChange={e => setValue(e.currentTarget.value)} - onKeyDown={handleEnter} - /> - )} - <Button onClick={mutateData}>Submit</Button> + <InputGroup + placeholder={grapheneTool.hint || 'Argument'} + value={value} + onChange={e => setValue(e.currentTarget.value)} + onKeyDown={handleEnter} + readOnly={disabled} + title={disabled ? disabledTitle : undefined} + /> + <Button + className={submit} + outlined + minimal + onClick={mutateData} + disabled={disabled} + title={disabled ? disabledTitle : undefined} + > + Submit + </Button> </Callout> ) } diff --git a/frontend/src/actionlog/ToolAction/index.tsx b/frontend/src/actionlog/ToolAction/index.tsx index 5fb34808e96021253eb158c4868ab8a4430a6a96..a6dbb9e3bb7bc385bd097d0691cb61a9e67044d5 100644 --- a/frontend/src/actionlog/ToolAction/index.tsx +++ b/frontend/src/actionlog/ToolAction/index.tsx @@ -1,15 +1,22 @@ import { Button, Collapse } from '@blueprintjs/core' -import type { ExtendedTool } from '@inject/graphql/fragments/ExtendedToolType.generated' +import type { Tool } from '@inject/graphql/fragments/Tool.generated' import type { FC } from 'react' import { useState } from 'react' import GrapheneForm from './components/GrapheneForm' interface ToolActionProps { - grapheneTool: ExtendedTool + grapheneTool: Tool teamId: string + disabled?: boolean + disabledTitle?: string } -const ToolAction: FC<ToolActionProps> = ({ grapheneTool, teamId }) => { +const ToolAction: FC<ToolActionProps> = ({ + grapheneTool, + teamId, + disabled, + disabledTitle, +}) => { const [open, setOpen] = useState<boolean>(false) const { tooltipDescription } = grapheneTool const newName = grapheneTool.name?.split('_')[1] ?? grapheneTool.name @@ -30,6 +37,8 @@ const ToolAction: FC<ToolActionProps> = ({ grapheneTool, teamId }) => { grapheneTool={grapheneTool} teamId={teamId} setOpen={setOpen} + disabled={disabled} + disabledTitle={disabledTitle} /> </Collapse> </> diff --git a/frontend/src/analyst/ActionLog/index.tsx b/frontend/src/analyst/ActionLog/index.tsx index 11192a62a4e49aeaf53295b80eed8bcbaf227ce5..b7b7b432c50b8231123382ba4b2110d83523202f 100644 --- a/frontend/src/analyst/ActionLog/index.tsx +++ b/frontend/src/analyst/ActionLog/index.tsx @@ -1,8 +1,9 @@ import useActionLogs from '@/analyst/dataHooks/useActionLogs' import useMilestoneStates from '@/analyst/dataHooks/useMilestoneStates' import { useRelativeTime } from '@/clientsettings/vars/relativeTime' -import { Icon } from '@blueprintjs/core' -import { css } from '@emotion/css' +import { textFromRenderedContent } from '@/utils' +import { Icon, NonIdealState } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' import type { ActionLog as ActionLogFragment } from '@inject/graphql/fragments/ActionLog.generated' import type { CustomInjectDetails } from '@inject/graphql/fragments/CustomInjectDetails.generated' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' @@ -22,12 +23,17 @@ import { compareDates, ellipsized, getTeamById, + highlightedOnActive, highlightedOnHover, } from '../utilities' +const nonIdeal = css` + align-self: center; +` + const td = css` ${ellipsized}; - padding: 8px; + padding: 0.5rem; cursor: pointer; ` @@ -58,19 +64,19 @@ const getContent = (actionLog: ActionLogFragment) => { switch (actionLog.type) { case 'INJECT': details = actionLog.details as InjectDetails - return details.content.raw + return textFromRenderedContent(details.content.rendered) case 'CUSTOM_INJECT': details = actionLog.details as CustomInjectDetails - return details.content.raw + return textFromRenderedContent(details.content.rendered) case 'TOOL': details = actionLog.details as ToolDetails - return `${details.tool.name} ${details.argument} → ${details.content.raw}` + return `${details.tool.name}, ${details.argument} → ${textFromRenderedContent(details.content.rendered)}` case 'FORM': details = actionLog.details as QuestionnaireDetails return details.title case 'EMAIL': details = actionLog.details as EmailDetails - return `${details.sender.address} → ${getRecipients(details)}: ${details.content.raw}` + return `${details.sender.address} → ${getRecipients(details)}: ${textFromRenderedContent(details.content.rendered)}` default: throw new Error(`unknown actionLog type: ${actionLog.type}`) } @@ -147,50 +153,57 @@ const ActionLog: FC<ActionLogProps> = ({ selectedDispatch }) => { }) ) - return items ? ( - <table style={{ borderCollapse: 'collapse' }}> - <tbody style={{ display: 'block' }}> - {items - .sort( - (a, b) => - -compareDates( - new Date(a.timestamp || ''), - new Date(b.timestamp || '') - ) - ) - .map(item => ( - <tr - key={item.id} - className={highlightedOnHover} - style={{ - display: 'table', - tableLayout: 'fixed', - width: '100%', - }} - onClick={item.handleClick} - > - <td - className={td} - style={{ width: 32 /* icon size + padding */ }} - > - {item.icon} - </td> - <td - className={td} + return items.length > 0 ? ( + <div style={{ flex: 1 }}> + <table style={{ borderCollapse: 'collapse' }}> + <tbody style={{ display: 'block' }}> + {items + .sort( + (a, b) => + -compareDates( + new Date(a.timestamp || ''), + new Date(b.timestamp || '') + ) + ) + .map(item => ( + <tr + key={item.id} + className={cx(highlightedOnHover, highlightedOnActive)} style={{ - width: timeRelative ? '12%' : '25%', - textAlign: 'center', + display: 'table', + tableLayout: 'fixed', + width: '100%', }} + onClick={item.handleClick} > - {formatTimestamp(item.timestamp)} - </td> - <td className={td}>{item.text}</td> - </tr> - ))} - </tbody> - </table> + <td + className={td} + style={{ width: 32 /* icon size + padding */ }} + > + {item.icon} + </td> + <td + className={td} + style={{ + width: timeRelative ? '12%' : '25%', + textAlign: 'center', + }} + > + {formatTimestamp(item.timestamp)} + </td> + <td className={td}>{item.text}</td> + </tr> + ))} + </tbody> + </table> + </div> ) : ( - 'No actions to display' + <NonIdealState + className={nonIdeal} + icon='search' + title='No action logs' + description='There are no action logs to display' + /> ) } diff --git a/frontend/src/analyst/Emails/index.tsx b/frontend/src/analyst/Emails/index.tsx index 88e19b908dfb5eb8f750dd8ebdba4695d7481e19..a3bf19c1f923ba7f3e7ed7889f82b36cf90eade9 100644 --- a/frontend/src/analyst/Emails/index.tsx +++ b/frontend/src/analyst/Emails/index.tsx @@ -8,12 +8,12 @@ import { Popover, } from '@blueprintjs/core' import type { Team } from '@inject/graphql/fragments/Team.generated' -import type { CSSProperties, FC } from 'react' +import type { FC } from 'react' import { useContext, useState } from 'react' import TeamEmails from '../../email/TeamEmails' import ExerciseContext from '../ExerciseContext' import TabButton from '../OverflowTabs/TabButton' -import { EmailSelection, HIGHLIGHTED_COLOR } from '../utilities' +import { EmailSelection } from '../utilities' interface EmailsProps { exerciseId: string @@ -30,10 +30,6 @@ const Emails: FC<EmailsProps> = ({ exerciseId, tab, threadId }) => { const [selectedTeam, setSelectedTeam] = useState<Team>(exercise.teams[0]) const handleClick = (item: Team) => () => setSelectedTeam(item) - const getButtonStyle = (item: Team): CSSProperties => ({ - backgroundColor: - selectedTeam.id === item.id ? HIGHLIGHTED_COLOR : undefined, - }) const overflowRenderer = (overflowItems: Team[]) => ( <div style={{ marginLeft: 'auto' }}> @@ -43,7 +39,7 @@ const Emails: FC<EmailsProps> = ({ exerciseId, tab, threadId }) => { {overflowItems.map(item => ( <TabButton key={item.id} - buttonStyle={getButtonStyle(item)} + active={selectedTeam.id === item.id} onClick={handleClick(item)} > {item.name} @@ -59,7 +55,7 @@ const Emails: FC<EmailsProps> = ({ exerciseId, tab, threadId }) => { ) const visibleItemRenderer = (item: Team) => ( - <TabButton buttonStyle={getButtonStyle(item)} onClick={handleClick(item)}> + <TabButton active={selectedTeam.id === item.id} onClick={handleClick(item)}> {item.name} </TabButton> ) @@ -85,18 +81,15 @@ const Emails: FC<EmailsProps> = ({ exerciseId, tab, threadId }) => { exerciseId={exercise.id} teamId={selectedTeam.id} emailThreads={filteredEmailThreads} - allowTabs selectedTab={tab} - onSelectReceived={() => - nav('/analyst/:exerciseId/emails/:tab', { - params: { exerciseId, tab: EmailSelection.RECEIVED }, - }) - } - onSelectSent={() => - nav('/analyst/:exerciseId/emails/:tab', { - params: { exerciseId, tab: EmailSelection.SENT }, - }) - } + receivedLink={[ + '/analyst/:exerciseId/emails/:tab', + { params: { exerciseId, tab: EmailSelection.RECEIVED } }, + ]} + sentLink={[ + '/analyst/:exerciseId/emails/:tab', + { params: { exerciseId, tab: EmailSelection.SENT } }, + ]} selectedEmailThread={filteredEmailThreads.find( emailThread => emailThread.id === threadId )} diff --git a/frontend/src/analyst/ExerciseSelector/index.tsx b/frontend/src/analyst/ExerciseSelector/index.tsx index 27fafc51ff463a769c6844f012a9b96beecefa65..6ad3d2078a6334c22a25494cba355ee1c848c7c1 100644 --- a/frontend/src/analyst/ExerciseSelector/index.tsx +++ b/frontend/src/analyst/ExerciseSelector/index.tsx @@ -1,32 +1,20 @@ import ExerciseListWrapper from '@/components/ExerciseList/ExerciseListWrapper' import type { ButtonProps } from '@blueprintjs/core' -import { - Button, - ButtonGroup, - Overlay2, - Section, - SectionCard, -} from '@blueprintjs/core' -import { useHost } from '@inject/graphql/connection/host' +import { Button, Overlay2, Section, SectionCard } from '@blueprintjs/core' import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' -import useExercisesSubscription from '@inject/graphql/utils/useExercisesSubscription' -import { exportImportUrl } from '@inject/shared/config' import type { FC } from 'react' -import { useState } from 'react' +import { useCallback, useState } from 'react' import { useLocation, useNavigate } from 'react-router-dom' import { useParams } from '../../router' -import ImportDialog from './ImportDialog' interface ExerciseSelectorProps { buttonProps?: ButtonProps | undefined } -const ExerciseSelector: FC<ExerciseSelectorProps> = ({ buttonProps }) => { - const host = useHost() +const ExerciseSelector: FC<ExerciseSelectorProps> = ({ buttonProps = {} }) => { const nav = useNavigate() const [isOpen, setIsOpen] = useState(false) - const [isImportOpen, setIsImportOpen] = useState(false) const { exerciseId } = useParams('/analyst/:exerciseId') const { pathname } = useLocation() @@ -40,7 +28,13 @@ const ExerciseSelector: FC<ExerciseSelectorProps> = ({ buttonProps }) => { ) const suffix = match.at(2) || '' - const { data, loading, error, refetch } = useExercisesSubscription() + const handleSelect = useCallback( + (exercise: Exercise) => { + setIsOpen(false) + nav(`/analyst/${exercise.id}${suffix}`) + }, + [nav, suffix] + ) return ( <> @@ -50,47 +44,20 @@ const ExerciseSelector: FC<ExerciseSelectorProps> = ({ buttonProps }) => { {...buttonProps} /> <Overlay2 isOpen={isOpen} onClose={() => setIsOpen(false)}> - <Section - title='Exercise selector' - rightElement={ - <ButtonGroup minimal> - <a href={exportImportUrl(host || '')}> - <Button icon='export'>Export</Button> - </a> - <Button onClick={() => setIsImportOpen(true)} icon='import'> - Import - </Button> - </ButtonGroup> - } - > + <Section title='Exercise selector'> <SectionCard> <ExerciseListWrapper - data={data} - loading={loading} - error={error} isSelected={(exercise: Exercise) => exercise.id === exerciseId} type='selecting' - details={{ - onSelect: exercise => { - setIsOpen(false) - nav(`/analyst/${exercise.id}${suffix}`) - }, - }} + details={(exercise: Exercise) => ({ + onSelect: () => handleSelect(exercise), + })} /> </SectionCard> </Section> </Overlay2> - <ImportDialog - isOpen={isImportOpen} - onClose={() => setIsImportOpen(false)} - onImport={() => refetch()} - /> </> ) } -ExerciseSelector.defaultProps = { - buttonProps: {}, -} - export default ExerciseSelector diff --git a/frontend/src/analyst/HelpIcon/index.tsx b/frontend/src/analyst/HelpIcon/index.tsx index 769cfd1626cab97b04a216abb28846d7200a40fe..22030b8badcee785a83c2e171c7959685dcfa0f3 100644 --- a/frontend/src/analyst/HelpIcon/index.tsx +++ b/frontend/src/analyst/HelpIcon/index.tsx @@ -1,14 +1,20 @@ -import { Icon, Tooltip } from '@blueprintjs/core' +import { Classes, Icon, Tooltip } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { FC } from 'react' +const content = css` + max-width: clamp(20rem, 90vw, 40rem); + white-space: pre-wrap; +` + interface HelpIconProps { text: string } const HelpIcon: FC<HelpIconProps> = ({ text }) => ( <div style={{ cursor: 'pointer' }}> - <Tooltip content={<pre>{text}</pre>}> - <Icon icon='help' className='bp5-text-muted' /> + <Tooltip content={<div className={content}>{text}</div>}> + <Icon icon='help' className={Classes.TEXT_MUTED} /> </Tooltip> </div> ) diff --git a/frontend/src/analyst/MilestoneTable/index.tsx b/frontend/src/analyst/MilestoneTable/index.tsx index 8994779aec22119084739f4e28eb96e06912bc35..2e0affc7b5fb394a2acff0db46f009f6787584e5 100644 --- a/frontend/src/analyst/MilestoneTable/index.tsx +++ b/frontend/src/analyst/MilestoneTable/index.tsx @@ -1,8 +1,8 @@ import useMilestoneStates from '@/analyst/dataHooks/useMilestoneStates' import useMilestones from '@/analyst/dataHooks/useMilestones' import Filters from '@/components/Filters' -import type { Column, ValueType } from '@/components/SortableTable' import SortableTable from '@/components/SortableTable' +import type { Column, ValueType } from '@/components/SortableTable/typing' import { Checkbox, Switch } from '@blueprintjs/core' import type { Team } from '@inject/graphql/fragments/Team.generated' import { useContext, useState } from 'react' @@ -28,6 +28,7 @@ const MilestoneTable = () => { if (value === Infinity) return 'not reached' return `+ ${new Date(value).toISOString().substring(11, 19)}` } + if (typeof value === 'boolean') return value ? 'yes' : 'no' return formatTimestamp(value.toISOString()) } diff --git a/frontend/src/analyst/Milestones/AllTeamsMilestoneCard.tsx b/frontend/src/analyst/Milestones/AllTeamsMilestoneCard.tsx index 3fb29c6f7be914d03e395698d91fb0e5603e469b..c6c1555cde8289294c78be4d02cde199e4181e05 100644 --- a/frontend/src/analyst/Milestones/AllTeamsMilestoneCard.tsx +++ b/frontend/src/analyst/Milestones/AllTeamsMilestoneCard.tsx @@ -1,5 +1,5 @@ import useMilestoneStates from '@/analyst/dataHooks/useMilestoneStates' -import { Callout, H6 } from '@blueprintjs/core' +import { Callout, Classes, H6 } from '@blueprintjs/core' import type { Milestone } from '@inject/graphql/fragments/Milestone.generated' import type { Dispatch, FC } from 'react' import { useContext } from 'react' @@ -9,11 +9,13 @@ import { getIntent } from '../utilities' import { milestoneCard } from './MilestoneCard' interface AllTeamsMilestoneCardProps { + isSelected?: boolean milestone: Milestone selectedDispatch: Dispatch<selectedReducerActionProps> } const AllTeamsMilestoneCard: FC<AllTeamsMilestoneCardProps> = ({ + isSelected, milestone, selectedDispatch, }) => { @@ -39,7 +41,7 @@ const AllTeamsMilestoneCard: FC<AllTeamsMilestoneCardProps> = ({ return ( <Callout - className={milestoneCard} + className={milestoneCard(isSelected)} intent={getIntent(progress)} icon={null} onClick={() => @@ -50,7 +52,7 @@ const AllTeamsMilestoneCard: FC<AllTeamsMilestoneCardProps> = ({ } > <H6 style={{ marginBottom: 0 }}>{milestone.name}</H6> - <span style={{ fontSize: 12 }}> + <span className={Classes.TEXT_SMALL}> {`reached by ${teamIdsReached.size}/${exercise.teams.length}`} </span> </Callout> diff --git a/frontend/src/analyst/Milestones/MilestoneCard.tsx b/frontend/src/analyst/Milestones/MilestoneCard.tsx index a66a5bfef76d71298ea50a94bfb385750728b889..a017efb192c854ef67dd60c1ee312be501f84e91 100644 --- a/frontend/src/analyst/Milestones/MilestoneCard.tsx +++ b/frontend/src/analyst/Milestones/MilestoneCard.tsx @@ -1,11 +1,11 @@ -import { Callout, H6 } from '@blueprintjs/core' +import { Callout, Classes, H6 } from '@blueprintjs/core' import { css } from '@emotion/css' import type { MilestoneState } from '@inject/graphql/fragments/MilestoneState.generated' import type { Dispatch, FC } from 'react' import type { selectedReducerActionProps } from '../Overview/selectedReducer' import useFormatTimestamp from '../useFormatTimestamp' -export const milestoneCard = css` +export const milestoneCard = (isSelected?: boolean) => css` flex: 0; flex-grow: 0; white-space: nowrap; @@ -13,21 +13,29 @@ export const milestoneCard = css` height: 69; cursor: pointer; - &:hover { - box-shadow: 0 2px 6px rgb(17 20 24 / 10%); - } + ${isSelected + ? css` + box-shadow: 0 0.125rem 0.25rem rgb(17 20 24 / 15%); + ` + : css` + &:hover { + box-shadow: 0 0.125rem 0.25rem rgb(17 20 24 / 10%); + } - &:active { - box-shadow: 0 2px 6px rgb(17 20 24 / 15%); - } + &:active { + box-shadow: 0 0.125rem 0.25rem rgb(17 20 24 / 15%); + } + `} ` interface MilestoneCardProps { + isSelected?: boolean milestoneState: MilestoneState selectedDispatch: Dispatch<selectedReducerActionProps> } const MilestoneCard: FC<MilestoneCardProps> = ({ + isSelected, milestoneState, selectedDispatch, }) => { @@ -35,7 +43,7 @@ const MilestoneCard: FC<MilestoneCardProps> = ({ return ( <Callout - className={milestoneCard} + className={milestoneCard(isSelected)} intent={milestoneState.reached ? 'success' : undefined} icon={null} onClick={() => @@ -51,7 +59,7 @@ const MilestoneCard: FC<MilestoneCardProps> = ({ {milestoneState.milestone.name} </H6> {milestoneState.reached ? ( - <span style={{ fontSize: 12 }}> + <span className={Classes.TEXT_SMALL}> {formatTimestamp(milestoneState.timestampReached)} </span> ) : ( diff --git a/frontend/src/analyst/Milestones/MilestoneCards.tsx b/frontend/src/analyst/Milestones/MilestoneCards.tsx index b2a1d5ffd3d0031245608b2d59d090bf137038be..5d1925703488656ec449dc75dcd18f341264fbb7 100644 --- a/frontend/src/analyst/Milestones/MilestoneCards.tsx +++ b/frontend/src/analyst/Milestones/MilestoneCards.tsx @@ -1,5 +1,6 @@ import useMilestoneStates from '@/analyst/dataHooks/useMilestoneStates' import useMilestones from '@/analyst/dataHooks/useMilestones' +import type { MilestoneState } from '@inject/graphql/fragments/MilestoneState.generated' import type { Dispatch, FC } from 'react' import type { selectedReducerActionProps } from '../Overview/selectedReducer' import AllTeamsMilestoneCard from './AllTeamsMilestoneCard' @@ -7,11 +8,13 @@ import MilestoneCard from './MilestoneCard' interface MilestoneCardsProps { teamId: string | undefined + selectedState?: MilestoneState selectedDispatch: Dispatch<selectedReducerActionProps> } const MilestoneCards: FC<MilestoneCardsProps> = ({ teamId, + selectedState, selectedDispatch, }) => { const milestoneStates = useMilestoneStates() @@ -23,7 +26,7 @@ const MilestoneCards: FC<MilestoneCardsProps> = ({ display: 'flex', flexWrap: 'wrap', justifyContent: 'center', - gap: '10px', + gap: '0.5rem', }} > {teamId === undefined @@ -33,6 +36,7 @@ const MilestoneCards: FC<MilestoneCardsProps> = ({ <AllTeamsMilestoneCard key={milestone.id} milestone={milestone} + isSelected={selectedState?.milestone.id === milestone.id} selectedDispatch={selectedDispatch} /> )) @@ -48,6 +52,7 @@ const MilestoneCards: FC<MilestoneCardsProps> = ({ <MilestoneCard key={milestoneState.milestone.id} milestoneState={milestoneState} + isSelected={selectedState?.id === milestoneState.id} selectedDispatch={selectedDispatch} /> ))} diff --git a/frontend/src/analyst/Milestones/Title.tsx b/frontend/src/analyst/Milestones/Title.tsx index 27ea7aa7d425c3072ad509a0f17aee0113c8506c..c8b4d3fb0d56ffc7f3ecdae845d4475dc506c4de 100644 --- a/frontend/src/analyst/Milestones/Title.tsx +++ b/frontend/src/analyst/Milestones/Title.tsx @@ -1,17 +1,17 @@ import useMilestoneStates from '@/analyst/dataHooks/useMilestoneStates' import { ProgressBar } from '@blueprintjs/core' import type { Team } from '@inject/graphql/fragments/Team.generated' -import type { CSSProperties, FC } from 'react' +import type { FC } from 'react' import TabButton from '../OverflowTabs/TabButton' import { getIntent } from '../utilities' interface TitleProps { team: Team | undefined onClick: () => void - buttonStyle: CSSProperties | undefined + active?: boolean } -const Title: FC<TitleProps> = ({ team, onClick, buttonStyle }) => { +const Title: FC<TitleProps> = ({ team, onClick, active }) => { const milestoneStates = useMilestoneStates() const filteredMilestoneStates = team @@ -26,7 +26,7 @@ const Title: FC<TitleProps> = ({ team, onClick, buttonStyle }) => { ).length / filteredMilestoneStates.length return ( - <TabButton buttonStyle={buttonStyle} onClick={onClick}> + <TabButton active={active} onClick={onClick}> <div style={{ display: 'flex', diff --git a/frontend/src/analyst/Milestones/index.tsx b/frontend/src/analyst/Milestones/index.tsx index 5b175ea5f8dafb6286f7dcc78ab35a7249e9da82..c8e9588f87a45960f7e0737123e4e5bc27926919 100644 --- a/frontend/src/analyst/Milestones/index.tsx +++ b/frontend/src/analyst/Milestones/index.tsx @@ -1,37 +1,35 @@ import { Boundary, - Button, ButtonGroup, Classes, OverflowList, Popover, } from '@blueprintjs/core' +import type { MilestoneState } from '@inject/graphql/fragments/MilestoneState.generated' import type { Team } from '@inject/graphql/fragments/Team.generated' -import type { CSSProperties, Dispatch, FC } from 'react' -import { memo, useContext, useState } from 'react' +import type { Dispatch, FC } from 'react' +import { useContext, useState } from 'react' import ExerciseContext from '../ExerciseContext' import type { selectedReducerActionProps } from '../Overview/selectedReducer' -import { HIGHLIGHTED_COLOR } from '../utilities' import MilestoneCards from './MilestoneCards' import Title from './Title' interface MilestonesProps { + selectedState?: MilestoneState selectedDispatch: Dispatch<selectedReducerActionProps> } -const Milestones: FC<MilestonesProps> = ({ selectedDispatch }) => { +const Milestones: FC<MilestonesProps> = ({ + selectedState, + selectedDispatch, +}) => { const { exercise } = useContext(ExerciseContext) - const [isOpen, setIsOpen] = useState(true) const [selectedId, setSelectedId] = useState<string | undefined>() const handleClick = (item: Team | undefined) => () => { setSelectedId(item?.id) - setIsOpen(true) } - const getButtonStyle = (item: Team | undefined): CSSProperties => ({ - backgroundColor: selectedId === item?.id ? HIGHLIGHTED_COLOR : undefined, - }) const overflowRenderer = (overflowItems: (Team | undefined)[]) => ( <div style={{ marginLeft: 'auto' }}> @@ -43,7 +41,7 @@ const Milestones: FC<MilestonesProps> = ({ selectedDispatch }) => { key={item?.id || 'AllTeamsTab'} team={item} onClick={handleClick(item)} - buttonStyle={getButtonStyle(item)} + active={selectedId === item?.id} /> ))} </ButtonGroup> @@ -60,23 +58,12 @@ const Milestones: FC<MilestonesProps> = ({ selectedDispatch }) => { key={item?.id || 'AllTeamsTab'} team={item} onClick={handleClick(item)} - buttonStyle={getButtonStyle(item)} + active={selectedId === item?.id} /> ) return ( - <> - <Button - style={{ - float: 'right', - backgroundColor: HIGHLIGHTED_COLOR, - marginLeft: 12, - }} - minimal - icon={isOpen ? 'chevron-up' : 'chevron-down'} - onClick={() => setIsOpen(prev => !prev)} - /> - + <div> <OverflowList style={{ alignItems: 'center', marginBottom: 8 }} collapseFrom={Boundary.END} @@ -85,17 +72,13 @@ const Milestones: FC<MilestonesProps> = ({ selectedDispatch }) => { visibleItemRenderer={visibleItemRenderer} /> - {isOpen && ( - <MilestoneCards - teamId={selectedId} - selectedDispatch={selectedDispatch} - /> - )} - </> + <MilestoneCards + teamId={selectedId} + selectedState={selectedState} + selectedDispatch={selectedDispatch} + /> + </div> ) } -export default memo( - Milestones, - (prev, next) => prev.selectedDispatch === next.selectedDispatch -) +export default Milestones diff --git a/frontend/src/analyst/NavigationBar/index.tsx b/frontend/src/analyst/NavigationBar/index.tsx index f6cabfbfbc89c2af58812717777552cd313bd9ab..12bbb5cf8e886f8fd3b109cfe8a04df64ae7f141 100644 --- a/frontend/src/analyst/NavigationBar/index.tsx +++ b/frontend/src/analyst/NavigationBar/index.tsx @@ -3,6 +3,8 @@ import { useRelativeTime, } from '@/clientsettings/vars/relativeTime' import ExitButton from '@/components/ExitButton' +import type { LinkType } from '@/components/LinkButton' +import LinkButton from '@/components/LinkButton' import type { Section } from '@/components/Sidebar' import Sidebar from '@/components/Sidebar' import useHideButton from '@/components/Sidebar/useHideButton' @@ -13,23 +15,21 @@ import useEmailsEnabled from '@inject/graphql/utils/useEmailsEnabled' import useToolsEnabled from '@inject/graphql/utils/useToolsEnabled' import type { FC, PropsWithChildren } from 'react' import { Suspense, useContext, useMemo } from 'react' -import { matchPath, useLocation } from 'react-router-dom' -import type { Path } from '../../router' -import { useNavigate, useParams } from '../../router' +import { generatePath, matchPath, useLocation } from 'react-router-dom' +import { useParams } from '../../router' import ExerciseContext from '../ExerciseContext' import ExerciseSelector from '../ExerciseSelector' import SVGContext from '../SVGContext' import { EmailSelection } from '../utilities' type PathType = { - to: Path + link: LinkType icon: IconName text: string } const NavigationBar: FC<PropsWithChildren> = ({ children }) => { const { pathname } = useLocation() - const navigate = useNavigate() const { exerciseId } = useParams('/analyst/:exerciseId') const emailsEnabled = useEmailsEnabled({ @@ -60,26 +60,29 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => { const paths: PathType[] = [] paths.push({ - to: '/analyst/:exerciseId', + link: ['/analyst/:exerciseId', { params: { exerciseId } }], icon: 'control', text: 'Dashboard', }) paths.push({ - to: '/analyst/:exerciseId/milestones', + link: ['/analyst/:exerciseId/milestones', { params: { exerciseId } }], icon: 'flag', text: 'Milestones', }) if (emailsEnabled) { paths.push({ - to: '/analyst/:exerciseId/emails/:tab', + link: [ + '/analyst/:exerciseId/emails/:tab', + { params: { exerciseId, tab: EmailSelection.SENT } }, + ], icon: 'envelope', text: 'Emails', }) } if (toolsEnabled) { paths.push({ - to: '/analyst/:exerciseId/tools', - icon: 'build', + link: ['/analyst/:exerciseId/tools', { params: { exerciseId } }], + icon: 'console', text: 'Tools', }) } @@ -112,7 +115,7 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => { /> {/* if the exercise hasn't started yet, the time should be shown relative to the start of time */} {exerciseId && exercise.exerciseStart && <TimeSwitch />} - <ExitButton /> + <ExitButton hideLabel={hide} /> </> ), }, @@ -124,28 +127,28 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => { node: ( <> {paths.map(path => ( - <Button - key={path.to} - fill - minimal - alignText='left' - icon={path.icon} - text={!hide && path.text} - active={ - matchPath( - { - path: path.to, - // allow subpaths for all but the Dashboard page - end: path.text === 'Dashboard', - }, - pathname - ) !== null - } - onClick={() => - navigate(path.to, { - params: { exerciseId, tab: EmailSelection.SENT }, - }) - } + <LinkButton + key={path.text} + link={path.link} + button={{ + fill: true, + minimal: true, + alignText: 'left', + icon: path.icon, + text: !hide && path.text, + active: + matchPath( + { + path: generatePath( + path.link[0].toString(), + path.link[1]?.params + ), + // allow subpaths for all but the Dashboard page + end: path.text === 'Dashboard', + }, + pathname + ) !== null, + }} /> ))} </> @@ -164,7 +167,14 @@ const NavigationBar: FC<PropsWithChildren> = ({ children }) => { <div style={{ height: '100%', display: 'flex' }}> <Sidebar position='left' sections={sections} hideNames={hide} showLogo /> - <div style={{ overflow: 'auto', flex: 1 }}> + <div + style={{ + overflowX: 'hidden', + overflowY: 'auto', + flex: 1, + padding: '0.5rem', + }} + > {exerciseId ? ( <SVGContext.Provider value={SVGContextValue}> <Suspense fallback={<Spinner />}>{children}</Suspense> diff --git a/frontend/src/analyst/OverflowTabs/TabButton.tsx b/frontend/src/analyst/OverflowTabs/TabButton.tsx index 8796d7939440333b948723c90e4f35ba80c28c31..3dbef7ad20ba9ce3294a28d70de07d7c582349e6 100644 --- a/frontend/src/analyst/OverflowTabs/TabButton.tsx +++ b/frontend/src/analyst/OverflowTabs/TabButton.tsx @@ -1,18 +1,18 @@ import { Button } from '@blueprintjs/core' -import type { CSSProperties, FC, PropsWithChildren } from 'react' +import type { FC, PropsWithChildren } from 'react' interface TabButtonProps extends PropsWithChildren { onClick: () => void - buttonStyle: CSSProperties | undefined + active?: boolean } -const TabButton: FC<TabButtonProps> = ({ children, onClick, buttonStyle }) => ( +const TabButton: FC<TabButtonProps> = ({ children, onClick, active }) => ( <Button minimal style={{ minWidth: 'fit-content', - ...buttonStyle, }} + active={active} onClick={onClick} > {children} diff --git a/frontend/src/analyst/Overview/ActionDetail.tsx b/frontend/src/analyst/Overview/ActionDetail.tsx index 51c7cd057ced89ab6261c11ae6a9cc71e758ba72..c2a0804dc84fda8486e8dbb57cba7c68c6344dc6 100644 --- a/frontend/src/analyst/Overview/ActionDetail.tsx +++ b/frontend/src/analyst/Overview/ActionDetail.tsx @@ -179,23 +179,25 @@ const ActionDetail: FC<ActionDetailProps> = ({ actionLog }) => { const formatTimestamp = useFormatTimestamp() return ( - <table> - <tbody> - <tr> - <th className={th}>Action type</th> - <td className={td}>{actionLog.type}</td> - </tr> - <tr> - <th className={th}>Timestamp</th> - <td className={td}>{formatTimestamp(actionLog.timestamp)}</td> - </tr> - <tr> - <th className={th}>Team</th> - <td className={td}>{actionLog.team.name}</td> - </tr> - {getContent(actionLog, exercise.id)} - </tbody> - </table> + <div> + <table> + <tbody> + <tr> + <th className={th}>Action type</th> + <td className={td}>{actionLog.type}</td> + </tr> + <tr> + <th className={th}>Timestamp</th> + <td className={td}>{formatTimestamp(actionLog.timestamp)}</td> + </tr> + <tr> + <th className={th}>Team</th> + <td className={td}>{actionLog.team.name}</td> + </tr> + {getContent(actionLog, exercise.id)} + </tbody> + </table> + </div> ) } diff --git a/frontend/src/analyst/Overview/ActionTooltip.tsx b/frontend/src/analyst/Overview/ActionTooltip.tsx index 1263decf8cf1093f5797c01539ac80884a3144a9..f7f3e09b2c6f3e267cbce3585e977563f34bb03e 100644 --- a/frontend/src/analyst/Overview/ActionTooltip.tsx +++ b/frontend/src/analyst/Overview/ActionTooltip.tsx @@ -1,3 +1,4 @@ +import { textFromRenderedContent } from '@/utils' import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' import type { CustomInjectDetails } from '@inject/graphql/fragments/CustomInjectDetails.generated' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' @@ -22,7 +23,7 @@ const getContent = (actionLog: ActionLog) => { </> )} <strong>Content: </strong> - <span>{details.content.raw}</span> + <span>{textFromRenderedContent(details.content.rendered)}</span> </> ) case 'CUSTOM_INJECT': @@ -30,7 +31,7 @@ const getContent = (actionLog: ActionLog) => { return ( <> <strong>Content: </strong> - <span>{details.content.raw}</span> + <span>{textFromRenderedContent(details.content.rendered)}</span> </> ) case 'TOOL': @@ -40,15 +41,11 @@ const getContent = (actionLog: ActionLog) => { <strong>Tool: </strong> <span>{details.tool.name}</span> <br /> - {details.tool.hasParam && ( - <> - <strong>Argument: </strong> - <span>{details.argument}</span> - <br /> - </> - )} + <strong>Argument: </strong> + <span>{details.argument}</span> + <br /> <strong>Response: </strong> - <span>{details.content.raw}</span> + <span>{textFromRenderedContent(details.content.rendered)}</span> </> ) case 'FORM': @@ -70,7 +67,7 @@ const getContent = (actionLog: ActionLog) => { <span>{details.thread.subject}</span> <br /> <strong>Content: </strong> - <span>{details.content.raw}</span> + <span>{textFromRenderedContent(details.content.rendered)}</span> </> ) default: diff --git a/frontend/src/analyst/Overview/CategoryDetail.tsx b/frontend/src/analyst/Overview/CategoryDetail.tsx index ebba30176f20e2319165c67353b17a429175b1e1..a16ce1dbe8c9891428a1227fdef7f210265358d6 100644 --- a/frontend/src/analyst/Overview/CategoryDetail.tsx +++ b/frontend/src/analyst/Overview/CategoryDetail.tsx @@ -1,3 +1,4 @@ +import { css } from '@emotion/css' import type { DefinitionInject } from '@inject/graphql/fragments/DefinitionInject.generated' import type { FC } from 'react' import { useContext } from 'react' @@ -6,6 +7,12 @@ import useFormatTimestamp from '../useFormatTimestamp' import { MIN_TO_MS } from '../utilities' import { td, th } from './detailStyles' +const wrapper = css` + display: flex; + flex-direction: column; + gap: 1rem; +` + interface CategoryDetailProps { injectGroup: DefinitionInject[] } @@ -15,7 +22,7 @@ const CategoryDetail: FC<CategoryDetailProps> = ({ injectGroup }) => { const formatTimestamp = useFormatTimestamp() return ( - <> + <div className={wrapper}> {injectGroup.map((inject, i) => ( <div key={inject.id}> {injectGroup.length > 1 && ( @@ -51,7 +58,7 @@ const CategoryDetail: FC<CategoryDetailProps> = ({ injectGroup }) => { </table> </div> ))} - </> + </div> ) } diff --git a/frontend/src/analyst/Overview/Detail.tsx b/frontend/src/analyst/Overview/Detail.tsx index a1c4da5e9000dde265dccc943fcabbbb47982f55..5fef4de4082dad27efcb57d901e11634814728e3 100644 --- a/frontend/src/analyst/Overview/Detail.tsx +++ b/frontend/src/analyst/Overview/Detail.tsx @@ -1,3 +1,5 @@ +import { NonIdealState } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' import type { FC } from 'react' import ActionDetail from './ActionDetail' @@ -6,6 +8,10 @@ import EmailDetail from './EmailDetail' import MilestoneDetail from './MilestoneDetail' import type { selectedReducerStateProps } from './selectedReducer' +const nonIdeal = css` + align-self: center; +` + interface DetailsProps { selectedState: selectedReducerStateProps displayInjectCategories: boolean @@ -50,7 +56,14 @@ const Detail: FC<DetailsProps> = ({ /> ) default: - return 'Select an element to view detail about' + return ( + <NonIdealState + className={nonIdeal} + icon='search' + title='No element selected' + description='Select an element to view detail about' + /> + ) } } diff --git a/frontend/src/analyst/Overview/EmailDetail.tsx b/frontend/src/analyst/Overview/EmailDetail.tsx index 7e97ab02414bcabbe2d07819d5a26839e1a00558..4d4ac65b375a7de359daef0765b3da2a4aad9921 100644 --- a/frontend/src/analyst/Overview/EmailDetail.tsx +++ b/frontend/src/analyst/Overview/EmailDetail.tsx @@ -18,51 +18,55 @@ const EmailDetail: FC<EmailDetailProps> = ({ emailDetails }) => { .at(0)?.team?.id return ( - <table> - <tbody> - <tr> - <th className={th}>Thread subject</th> - <td className={td}>{emailDetails.thread.subject}</td> - </tr> - <tr> - <th className={th}>Thread participants</th> - <td className={td}> - {emailDetails.thread.participants - .map(participant => participant.address) - .join(', ')} - </td> - </tr> - <tr> - <th className={th}>Timestamp</th> - <td className={td}>{formatTimestamp(emailDetails.timestamp)}</td> - </tr> - <tr> - <th className={th}>Sender</th> - <td className={td}>{emailDetails.sender.address}</td> - </tr> - <tr> - <th className={th}>Content</th> - <td - className={td} - aria-label='renderedContent' - dangerouslySetInnerHTML={{ __html: emailDetails.content.rendered }} - /> - </tr> - {emailDetails.content.fileInfo && teamId && ( + <div> + <table> + <tbody> <tr> - <th className={th}>Attached file</th> + <th className={th}>Thread subject</th> + <td className={td}>{emailDetails.thread.subject}</td> + </tr> + <tr> + <th className={th}>Thread participants</th> <td className={td}> - <FileViewRedirectButton - fileInfo={emailDetails.content.fileInfo} - teamId={teamId} - exerciseId={exercise.id} - inInstructor - /> + {emailDetails.thread.participants + .map(participant => participant.address) + .join(', ')} </td> </tr> - )} - </tbody> - </table> + <tr> + <th className={th}>Timestamp</th> + <td className={td}>{formatTimestamp(emailDetails.timestamp)}</td> + </tr> + <tr> + <th className={th}>Sender</th> + <td className={td}>{emailDetails.sender.address}</td> + </tr> + <tr> + <th className={th}>Content</th> + <td + className={td} + aria-label='renderedContent' + dangerouslySetInnerHTML={{ + __html: emailDetails.content.rendered, + }} + /> + </tr> + {emailDetails.content.fileInfo && teamId && ( + <tr> + <th className={th}>Attached file</th> + <td className={td}> + <FileViewRedirectButton + fileInfo={emailDetails.content.fileInfo} + teamId={teamId} + exerciseId={exercise.id} + inInstructor + /> + </td> + </tr> + )} + </tbody> + </table> + </div> ) } diff --git a/frontend/src/analyst/Overview/EmailTooltip.tsx b/frontend/src/analyst/Overview/EmailTooltip.tsx index adc044fc501a05f21e02124bdf42fadba6f123f2..b1a3eef8afce9cebcd1f7437400484e60c7766d1 100644 --- a/frontend/src/analyst/Overview/EmailTooltip.tsx +++ b/frontend/src/analyst/Overview/EmailTooltip.tsx @@ -1,3 +1,4 @@ +import { textFromRenderedContent } from '@/utils' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' import type { FC } from 'react' import useFormatTimestamp from '../useFormatTimestamp' @@ -18,7 +19,7 @@ const EmailTooltip: FC<EmailTooltipProps> = ({ emailDetails }) => { <span>{emailDetails.thread.subject}</span> <br /> <strong>Content: </strong> - <span>{emailDetails.content.raw}</span> + <span>{textFromRenderedContent(emailDetails.content.rendered)}</span> <br /> <strong>Timestamp: </strong> <span>{formatTimestamp(emailDetails.timestamp)}</span> diff --git a/frontend/src/analyst/Overview/MilestoneDetail.tsx b/frontend/src/analyst/Overview/MilestoneDetail.tsx index edf1ec9c0993dc0d4fb41a968f1aa3f547026a91..b15cee0f4939c840362c4b0be38113e6b8ba685e 100644 --- a/frontend/src/analyst/Overview/MilestoneDetail.tsx +++ b/frontend/src/analyst/Overview/MilestoneDetail.tsx @@ -11,26 +11,28 @@ const MilestoneDetail: FC<MilestoneDetailProps> = ({ milestone }) => { const formatTimestamp = useFormatTimestamp() return ( - <table> - <tbody> - <tr> - <th className={th}>Name</th> - <td className={td}>{milestone.milestone.name}</td> - </tr> - {milestone.reached && ( + <div> + <table> + <tbody> <tr> - <th className={th}>Timestamp</th> - <td className={td}> - {formatTimestamp(milestone.timestampReached)} - </td> + <th className={th}>Name</th> + <td className={td}>{milestone.milestone.name}</td> </tr> - )} - <tr> - <th className={th}>Teams</th> - <td className={td}>{milestone.teamIds?.join(', ')}</td> - </tr> - </tbody> - </table> + {milestone.reached && ( + <tr> + <th className={th}>Timestamp</th> + <td className={td}> + {formatTimestamp(milestone.timestampReached)} + </td> + </tr> + )} + <tr> + <th className={th}>Teams</th> + <td className={td}>{milestone.teamIds?.join(', ')}</td> + </tr> + </tbody> + </table> + </div> ) } diff --git a/frontend/src/analyst/Overview/detailStyles.tsx b/frontend/src/analyst/Overview/detailStyles.tsx index d7406b5a39e9a4da8a9b41bca33b924f96280617..aff6568f670b44919495c84633aead8ee774fe0d 100644 --- a/frontend/src/analyst/Overview/detailStyles.tsx +++ b/frontend/src/analyst/Overview/detailStyles.tsx @@ -9,5 +9,5 @@ export const th = css` export const td = css` white-space: pre-wrap; vertical-align: text-top; - padding: 5px 10px; + padding: 0.5rem 1rem; ` diff --git a/frontend/src/analyst/Overview/index.tsx b/frontend/src/analyst/Overview/index.tsx index 51e3dfa537b851ced71e3d22eae4fad725070d0d..3f458e6b696a6298dae471a920d278370ac39653 100644 --- a/frontend/src/analyst/Overview/index.tsx +++ b/frontend/src/analyst/Overview/index.tsx @@ -17,6 +17,42 @@ import type { selectedReducerStateProps, } from './selectedReducer' +const wrapper = css` + flex: 1; + overflow: auto; + display: flex; + flex-direction: column; +` + +const options = css` + display: flex; + justify-content: space-between; +` + +const plot = (teamsCount: number) => css` + height: ${4 * teamsCount + 20}vh; + overflow: hidden; +` + +const footer = css` + flex: 1; + display: flex; + overflow: auto; + min-height: 20rem; + + @media (max-width: 80rem) { + flex-direction: column; + } +` + +const footerElement = css` + flex: 1; + overflow: auto; + min-height: 20rem; + display: flex; + max-height: 70vh; +` + const padded = css` /* the size of a checkbox is 16x16 px, the border line should be centered to it */ margin-left: 7.5px; @@ -257,39 +293,34 @@ const Overview: FC<OverviewProps> = ({ selectedState, selectedDispatch }) => { }, []) return ( - <> - <div> - <div style={{ display: 'flex', justifyContent: 'space-between' }}> - <HelpIcon text={HELP_TEXT} /> - <Filters - content={filters} - position='bottom-right' - onSelectAll={() => { - setAllDisplayStates(true) - }} - onDeselectAll={() => { - setAllDisplayStates(false) - }} - /> - </div> + <div className={wrapper}> + <div className={options}> + <HelpIcon text={HELP_TEXT} /> + <Filters + content={filters} + position='bottom-right' + onSelectAll={() => { + setAllDisplayStates(true) + }} + onDeselectAll={() => { + setAllDisplayStates(false) + }} + /> + </div> - <div style={{ height: `${4 * exercise.teams.length + 20}vh` }}> - <FilterContext.Provider value={filterContextValue}> - <OverviewPlot - selectedState={selectedState} - selectedDispatch={selectedDispatch} - /> - </FilterContext.Provider> - </div> + <div className={plot(exercise.teams.length)}> + <FilterContext.Provider value={filterContextValue}> + <OverviewPlot + selectedState={selectedState} + selectedDispatch={selectedDispatch} + /> + </FilterContext.Provider> </div> + <Divider /> - <div style={{ display: 'flex', maxHeight: '500px' }}> - <div - style={{ - flex: 2, - overflowY: 'auto', - }} - > + + <div className={footer}> + <div className={footerElement}> <Detail selectedState={selectedState} displayInjectCategories={displayInjectCategories} @@ -297,17 +328,11 @@ const Overview: FC<OverviewProps> = ({ selectedState, selectedDispatch }) => { /> </div> <Divider /> - <div - style={{ - flex: 3, - overflowY: 'auto', - overflowX: 'auto', - }} - > + <div className={footerElement}> <ActionLog selectedDispatch={selectedDispatch} /> </div> </div> - </> + </div> ) } diff --git a/frontend/src/analyst/Plots/DownloadSnapshot.tsx b/frontend/src/analyst/Plots/DownloadSnapshot.tsx index 82293bd5d163b66cbd3aaf98e2f33bba103d38af..5ae9f0aa839ead4da22dfdbeb45d4622be24c6ae 100644 --- a/frontend/src/analyst/Plots/DownloadSnapshot.tsx +++ b/frontend/src/analyst/Plots/DownloadSnapshot.tsx @@ -1,11 +1,12 @@ -import { Button, ControlGroup, Divider, HTMLSelect } from '@blueprintjs/core' +import { Button, ButtonGroup, Divider, MenuItem } from '@blueprintjs/core' +import { Select } from '@blueprintjs/select' import type { FC } from 'react' import { useState } from 'react' import { saveSvgAsPng } from 'save-svg-as-png' const getSnapshotFilename = () => { const now = new Date() - return `inject-overview-${now.toLocaleDateString()}-${now.toLocaleTimeString()}` + return `inject-overview-${now.toISOString()}` } const downloadSVG = (elementId: string) => { @@ -33,9 +34,8 @@ const DownloadSnapshot: FC<DownloadSnapshotProps> = ({ elementId }) => { const [format, setFormat] = useState('.png') return ( - <ControlGroup> + <ButtonGroup minimal> <Button - minimal onClick={() => { format === '.png' ? downloadPNG(elementId) : downloadSVG(elementId) }} @@ -43,12 +43,28 @@ const DownloadSnapshot: FC<DownloadSnapshotProps> = ({ elementId }) => { Download snapshot </Button> <Divider /> - <HTMLSelect - minimal - options={['.png', '.svg']} - onChange={event => setFormat(event.currentTarget.value)} - /> - </ControlGroup> + <Select<'.png' | '.svg'> + fill + onItemSelect={format => setFormat(format)} + items={['.png', '.svg']} + popoverProps={{ minimal: true }} + itemRenderer={(item, { handleClick }) => ( + <MenuItem + onClick={handleClick} + text={item} + active={item === format} + /> + )} + filterable={false} + > + <Button + alignText='left' + fill + rightIcon='double-caret-vertical' + text={format} + /> + </Select> + </ButtonGroup> ) } diff --git a/frontend/src/analyst/Plots/LegendText.tsx b/frontend/src/analyst/Plots/LegendText.tsx index 454985a09d9dc81b1194184b1db3ded78e9b9c86..a3f849b5cb0e8f6bff23faba76a909408f186c74 100644 --- a/frontend/src/analyst/Plots/LegendText.tsx +++ b/frontend/src/analyst/Plots/LegendText.tsx @@ -1,9 +1,10 @@ +import { Classes } from '@blueprintjs/core' import { css } from '@emotion/css' import type { FC } from 'react' import { LEGEND_ELEMENT_SIZE } from '../utilities' const legendText = css` - .bp5-dark & { + .${Classes.DARK} & { fill: #fefffe; } ` @@ -13,15 +14,7 @@ interface LegendTextProps { } const LegendText: FC<LegendTextProps> = ({ text }) => ( - <text - className={legendText} - x={LEGEND_ELEMENT_SIZE} - y={5} - textAnchor='start' - style={{ - fontSize: '15px', - }} - > + <text className={legendText} x={LEGEND_ELEMENT_SIZE} y={5} textAnchor='start'> {text} </text> ) diff --git a/frontend/src/analyst/Plots/ResponsivePlot.tsx b/frontend/src/analyst/Plots/ResponsivePlot.tsx index 0ccc0f38168964af9ef702f94d3ab635c1b3fd06..64f186ebe232ecf767543ffcd57200187aaf96c1 100644 --- a/frontend/src/analyst/Plots/ResponsivePlot.tsx +++ b/frontend/src/analyst/Plots/ResponsivePlot.tsx @@ -11,14 +11,14 @@ const ResponsivePlot: FC<ResponsivePlotProps> = ({ selectedGroupName, type, details, - dependencies, + dependencies = [], }) => { const ref = useRef(null) const { width, height } = useDimensions(ref, dependencies) return ( - <div ref={ref} style={{ height: '100%' }}> + <div ref={ref} style={{ height: '100%', overflow: 'hidden' }}> {type === 'bar' ? ( <BarPlot id={id} @@ -45,8 +45,4 @@ const ResponsivePlot: FC<ResponsivePlotProps> = ({ ) } -ResponsivePlot.defaultProps = { - dependencies: [], -} - export default ResponsivePlot diff --git a/frontend/src/analyst/ToolUsage/AggregatedToolUsage/Table.tsx b/frontend/src/analyst/ToolUsage/AggregatedToolUsage/Table.tsx index 8610a4d6bddcea7db1cee120cf65d4b27250d0e8..8c21a64c8d9846873eec5b19b51e476bc806073b 100644 --- a/frontend/src/analyst/ToolUsage/AggregatedToolUsage/Table.tsx +++ b/frontend/src/analyst/ToolUsage/AggregatedToolUsage/Table.tsx @@ -1,8 +1,9 @@ import useActionLogs from '@/analyst/dataHooks/useActionLogs' import useEmailThreads from '@/analyst/dataHooks/useEmailThreads' import useTools from '@/analyst/dataHooks/useTools' -import type { Column, ValueType } from '@/components/SortableTable' -import SortableTable, { SortingFunction } from '@/components/SortableTable' +import SortableTable from '@/components/SortableTable' +import type { Column, ValueType } from '@/components/SortableTable/typing' +import { SortingFunction } from '@/components/SortableTable/typing' import type { Tool } from '@inject/graphql/fragments/Tool.generated' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' import { useContext, useMemo } from 'react' diff --git a/frontend/src/analyst/ToolUsage/Card.tsx b/frontend/src/analyst/ToolUsage/Card.tsx index 6c7104a4b4901f5d5ef7b83d2343d816bcfe7d9a..9db18b4335dafd9678847dd2f51428339c955bd8 100644 --- a/frontend/src/analyst/ToolUsage/Card.tsx +++ b/frontend/src/analyst/ToolUsage/Card.tsx @@ -1,9 +1,27 @@ import { Button } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { FC, ReactNode } from 'react' -import { useState } from 'react' -import { HIGHLIGHTED_COLOR, VIEW } from '../utilities' +import { useMemo, useState } from 'react' +import { VIEW } from '../utilities' import Label from './Label' +const wrapper = css` + display: flex; + flex-direction: column; + height: 100%; + gap: 0.5rem; +` + +const titleWrapper = css` + display: flex; + align-items: stretch; + gap: 0.5rem; +` + +const button = css` + box-shadow: none !important; +` + interface CardProps { tableView?: ReactNode | undefined plotView?: ReactNode | undefined @@ -13,35 +31,40 @@ interface CardProps { const Card: FC<CardProps> = ({ tableView, plotView, label }) => { const [view, setView] = useState(tableView ? VIEW.TABLE : VIEW.PLOT) + const { disabled, onClick, title } = useMemo(() => { + if (!tableView) + return { + disabled: true, + onClick: () => {}, + title: 'No table view available', + } + if (!plotView) + return { + disabled: true, + onClick: () => {}, + title: 'No plot view available', + } + return { + disabled: false, + onClick: () => + setView(prev => (prev === VIEW.TABLE ? VIEW.PLOT : VIEW.TABLE)), + title: + view === VIEW.TABLE ? 'Switch to plot view' : 'Switch to table view', + } + }, [plotView, tableView, view]) + if (!tableView && !plotView) return <div /> return ( - <div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}> - <div - style={{ - display: 'flex', - alignItems: 'flex-end', - gap: '10px', - marginBottom: '5px', - }} - > - {tableView && plotView && ( - <Button - style={{ - backgroundColor: HIGHLIGHTED_COLOR, - }} - minimal - icon={view === VIEW.TABLE ? VIEW.PLOT : VIEW.TABLE} - onClick={() => - setView(prev => (prev === VIEW.TABLE ? VIEW.PLOT : VIEW.TABLE)) - } - title={ - view === VIEW.TABLE - ? 'switch to plot view' - : 'switch to table view' - } - /> - )} + <div className={wrapper}> + <div className={titleWrapper}> + <Button + icon={view === VIEW.TABLE ? VIEW.PLOT : VIEW.TABLE} + disabled={disabled} + onClick={onClick} + title={title} + className={button} + /> <Label text={label} /> </div> @@ -52,9 +75,4 @@ const Card: FC<CardProps> = ({ tableView, plotView, label }) => { ) } -Card.defaultProps = { - tableView: undefined, - plotView: undefined, -} - export default Card diff --git a/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLog.tsx b/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLog.tsx index 42fb643f06c8a1157d2f224577e73327a773ec6a..3f92ed1774b59f4763c75ae9403175dd30405994 100644 --- a/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLog.tsx +++ b/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLog.tsx @@ -10,7 +10,7 @@ interface CommandActionLogProps { timestamp: string | null toolName: string color: string - argument: string | null + argument: string response: string opacity: number onClick: () => void diff --git a/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLogTooltip.tsx b/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLogTooltip.tsx index 2b54d486d4d6314d1d4b8dd7dc63f146a16aa3b6..cba3c9aaba01837d2a61401d97e64418a71cc123 100644 --- a/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLogTooltip.tsx +++ b/frontend/src/analyst/ToolUsage/InTimeToolUsage/CommandActionLogTooltip.tsx @@ -5,7 +5,7 @@ interface CommandActionLogTooltipProps { teamName: string | undefined timestamp: string | null toolName: string - argument: string | null + argument: string response: string } @@ -30,13 +30,9 @@ const CommandActionLogTooltip: FC<CommandActionLogTooltipProps> = ({ <strong>Tool: </strong> <span>{toolName}</span> <br /> - {argument !== null && ( - <> - <strong>Argument: </strong> - <span>{argument}</span> - <br /> - </> - )} + <strong>Argument: </strong> + <span>{argument}</span> + <br /> <strong>Response: </strong> <span>{response}</span> <br /> diff --git a/frontend/src/analyst/ToolUsage/InTimeToolUsage/Plot.tsx b/frontend/src/analyst/ToolUsage/InTimeToolUsage/Plot.tsx index f70acecc07761bdaf95a8e456d263cec87d174e2..5ad548fd42544a4faaa526019838f2c5e4aad59b 100644 --- a/frontend/src/analyst/ToolUsage/InTimeToolUsage/Plot.tsx +++ b/frontend/src/analyst/ToolUsage/InTimeToolUsage/Plot.tsx @@ -3,6 +3,7 @@ import SVGContext from '@/analyst/SVGContext' import useActionLogs from '@/analyst/dataHooks/useActionLogs' import useToolsWithEmailsSent from '@/analyst/dataHooks/useToolsWithEmailsSent' import useToolsWithEmailsSentColor from '@/analyst/dataHooks/useToolsWithEmailsSentColor' +import { textFromRenderedContent } from '@/utils' import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' @@ -57,13 +58,6 @@ const Plot = () => { [selectedState.team] ) - const getArgument = useCallback((details: ToolDetails) => { - if (details.tool.hasParam) { - return details.argument - } - return null - }, []) - const dataRenderer: ScatterPlotDataRenderer = useCallback( ({ xScale, yScale, dotSize }) => actionLogs.filter(actionLogsFilter).map(actionLog => { @@ -73,11 +67,13 @@ const Plot = () => { : injectEmailTool const argument = actionLog.type === 'TOOL' - ? getArgument(actionLog.details as ToolDetails) + ? (actionLog.details as ToolDetails).argument : getInjectEmailArgument(actionLog.details as EmailDetails) const response = actionLog.type === 'TOOL' - ? (actionLog.details as ToolDetails).content.raw + ? textFromRenderedContent( + (actionLog.details as ToolDetails).content.rendered + ) : getInjectEmailResponse() return ( diff --git a/frontend/src/analyst/ToolUsage/InTimeToolUsage/Table.tsx b/frontend/src/analyst/ToolUsage/InTimeToolUsage/Table.tsx index 981b0eed9beddd3ba33b89a74f5a33d7a1106f76..88ce1997b7d2fdb1f99cb4c3831bdc19157a1037 100644 --- a/frontend/src/analyst/ToolUsage/InTimeToolUsage/Table.tsx +++ b/frontend/src/analyst/ToolUsage/InTimeToolUsage/Table.tsx @@ -1,7 +1,8 @@ import useActionLogs from '@/analyst/dataHooks/useActionLogs' import useFormatTimestamp from '@/analyst/useFormatTimestamp' -import type { Column, ValueType } from '@/components/SortableTable' import SortableTable from '@/components/SortableTable' +import type { Column, ValueType } from '@/components/SortableTable/typing' +import { textFromRenderedContent } from '@/utils' import type { ActionLog } from '@inject/graphql/fragments/ActionLog.generated' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' @@ -64,7 +65,9 @@ const Table = () => { getValue: (actionLog: ActionLog) => { switch (actionLog.type) { case 'TOOL': - return (actionLog.details as ToolDetails).content.raw + return textFromRenderedContent( + (actionLog.details as ToolDetails).content.rendered + ) case 'EMAIL': return getInjectEmailResponse() default: diff --git a/frontend/src/analyst/ToolUsage/Label.tsx b/frontend/src/analyst/ToolUsage/Label.tsx index 07c344a7a947eeaa7728d9e8a5c6cdc9002a3f42..c44ce0f05061baf2c7b78182c775edc3dc6c1bb9 100644 --- a/frontend/src/analyst/ToolUsage/Label.tsx +++ b/frontend/src/analyst/ToolUsage/Label.tsx @@ -1,26 +1,26 @@ +import { Colors } from '@blueprintjs/colors' +import { Card } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { FC } from 'react' -import { HIGHLIGHTED_COLOR } from '../utilities' + +const label = css` + background-color: ${Colors.DARK_GRAY4} !important; + box-shadow: none !important; + + padding: 0 0 0 0.5rem; + white-space: nowrap; + text-overflow: ellipsis; + display: flex; + align-items: center; + flex-grow: 1; +` interface LabelProps { text: string } const Label: FC<LabelProps> = ({ text }) => ( - <span - style={{ - backgroundColor: HIGHLIGHTED_COLOR, - lineHeight: '30px', - padding: '0 5px 0 8px', - borderRadius: '2px', - flexGrow: 1, - whiteSpace: 'nowrap', - overflow: 'hidden', - textOverflow: 'ellipsis', - }} - title={text} - > - {text} - </span> + <Card className={label}>{text}</Card> ) export default Label diff --git a/frontend/src/analyst/ToolUsage/Selectors/TeamSelector.tsx b/frontend/src/analyst/ToolUsage/Selectors/TeamSelector.tsx index 2e8575920c85c666d0a6b9e921df9c400e57760f..8724037b0878feb420ac8014545e41de3b2f7387 100644 --- a/frontend/src/analyst/ToolUsage/Selectors/TeamSelector.tsx +++ b/frontend/src/analyst/ToolUsage/Selectors/TeamSelector.tsx @@ -6,11 +6,9 @@ import { Popover, } from '@blueprintjs/core' import type { Team } from '@inject/graphql/fragments/Team.generated' -import type { CSSProperties } from 'react' import { useContext } from 'react' import ExerciseContext from '../../ExerciseContext' import TabButton from '../../OverflowTabs/TabButton' -import { HIGHLIGHTED_COLOR } from '../../utilities' import SelectedContext from '../SelectedContext' const TeamSelector = () => { @@ -20,10 +18,6 @@ const TeamSelector = () => { const handleClick = (item: Team | undefined) => () => selectedDispatch({ type: 'selectTeam', team: item }) - const getButtonStyle = (item: Team | undefined): CSSProperties => ({ - backgroundColor: - selectedState.team?.id === item?.id ? HIGHLIGHTED_COLOR : undefined, - }) const overflowRenderer = (overflowItems: (Team | undefined)[]) => ( <div style={{ marginLeft: 'auto' }}> @@ -33,7 +27,7 @@ const TeamSelector = () => { {overflowItems.map(item => ( <TabButton key={item?.id || 'AllTeamsTab'} - buttonStyle={getButtonStyle(item)} + active={selectedState.team?.id === item?.id} onClick={handleClick(item)} > {item?.name || 'All teams'} @@ -51,7 +45,7 @@ const TeamSelector = () => { const visibleItemRenderer = (item: Team | undefined) => ( <TabButton key={item?.id || 'AllTeamsTab'} - buttonStyle={getButtonStyle(item)} + active={selectedState.team?.id === item?.id} onClick={handleClick(item)} > {item?.name || 'All teams'} diff --git a/frontend/src/analyst/ToolUsage/Selectors/ToolSelector.tsx b/frontend/src/analyst/ToolUsage/Selectors/ToolSelector.tsx index fd7146a8a957d5ff22974c2b3b6602e5112c76ec..64704ffc293147f009c28587ff07cdd2c86a143c 100644 --- a/frontend/src/analyst/ToolUsage/Selectors/ToolSelector.tsx +++ b/frontend/src/analyst/ToolUsage/Selectors/ToolSelector.tsx @@ -9,11 +9,9 @@ import { } from '@blueprintjs/core' import type { Tool } from '@inject/graphql/fragments/Tool.generated' import useEmailsEnabled from '@inject/graphql/utils/useEmailsEnabled' -import type { CSSProperties } from 'react' import { useContext } from 'react' import ExerciseContext from '../../ExerciseContext' import TabButton from '../../OverflowTabs/TabButton' -import { HIGHLIGHTED_COLOR } from '../../utilities' import SelectedContext from '../SelectedContext' const ToolSelector = () => { @@ -31,10 +29,6 @@ const ToolSelector = () => { const handleClick = (item: Tool | undefined) => () => selectedDispatch({ type: 'selectTool', tool: item }) - const getButtonStyle = (item: Tool | undefined): CSSProperties => ({ - backgroundColor: - selectedState.tool?.id === item?.id ? HIGHLIGHTED_COLOR : undefined, - }) const overflowRenderer = (overflowItems: (Tool | undefined)[]) => ( <div style={{ marginLeft: 'auto' }}> @@ -44,7 +38,7 @@ const ToolSelector = () => { {overflowItems.map(item => ( <TabButton key={item?.id || 'AllToolsTab'} - buttonStyle={getButtonStyle(item)} + active={selectedState.tool?.id === item?.id} onClick={handleClick(item)} > {item?.name || 'All tools'} @@ -62,7 +56,7 @@ const ToolSelector = () => { const visibleItemRenderer = (item: Tool | undefined) => ( <TabButton key={item?.id || 'AllToolsTab'} - buttonStyle={getButtonStyle(item)} + active={selectedState.tool?.id === item?.id} onClick={handleClick(item)} > {item?.name || 'All tools'} diff --git a/frontend/src/analyst/ToolUsage/ToolArgumentUsage/Table.tsx b/frontend/src/analyst/ToolUsage/ToolArgumentUsage/Table.tsx index 41d86348c239cfbbe3a474d6127883fea7c5149d..a54eb02dc6314fc3fbd0d4f5aa2fcedb82a07c1f 100644 --- a/frontend/src/analyst/ToolUsage/ToolArgumentUsage/Table.tsx +++ b/frontend/src/analyst/ToolUsage/ToolArgumentUsage/Table.tsx @@ -1,15 +1,16 @@ import useActionLogs from '@/analyst/dataHooks/useActionLogs' -import type { Column, ValueType } from '@/components/SortableTable' -import SortableTable, { SortingFunction } from '@/components/SortableTable' +import SortableTable from '@/components/SortableTable' +import type { Column, ValueType } from '@/components/SortableTable/typing' +import { SortingFunction } from '@/components/SortableTable/typing' import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.generated' -import type { ExtendedTool } from '@inject/graphql/fragments/ExtendedToolType.generated' +import type { Tool } from '@inject/graphql/fragments/Tool.generated' import type { ToolDetails } from '@inject/graphql/fragments/ToolDetails.generated' import { useContext, useMemo } from 'react' import { getInjectEmailArgument, injectEmailTool } from '../../utilities' import SelectedContext from '../SelectedContext' interface TableDataElement { - tool: ExtendedTool + tool: Tool argument: string timesUsed: number } diff --git a/frontend/src/analyst/dataHooks/useCategories.ts b/frontend/src/analyst/dataHooks/useCategories.ts index e7c59d1edc9f23d43c7d5a09e03e1f1b82b038d5..60187a0fc6e2becac22fb22c5337ff140ae7a34e 100644 --- a/frontend/src/analyst/dataHooks/useCategories.ts +++ b/frontend/src/analyst/dataHooks/useCategories.ts @@ -10,9 +10,7 @@ const useCategories = () => { variables: { exerciseId: exercise.id }, }) - return categoriesData && categoriesData.autoInjects - ? categoriesData.autoInjects.filter(notEmpty) - : [] + return categoriesData?.injects?.filter(notEmpty) || [] } export default useCategories diff --git a/frontend/src/analyst/utilities.ts b/frontend/src/analyst/utilities.ts index 6d2c8e095ea2dc264d79f104df8e891ec60c5e3a..3a7bf8d19b0371248effb24601179a262e0b6b4a 100644 --- a/frontend/src/analyst/utilities.ts +++ b/frontend/src/analyst/utilities.ts @@ -3,8 +3,8 @@ import type { EmailDetails } from '@inject/graphql/fragments/EmailDetails.genera import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' import type { ExerciseConfig } from '@inject/graphql/fragments/ExerciseConfig.generated' -import type { ExtendedTool } from '@inject/graphql/fragments/ExtendedToolType.generated' import type { Team } from '@inject/graphql/fragments/Team.generated' +import type { Tool } from '@inject/graphql/fragments/Tool.generated' import type { LogType } from '@inject/graphql/types' import { scaleOrdinal } from 'd3-scale' import { schemeDark2 } from 'd3-scale-chromatic' @@ -22,7 +22,7 @@ import type { SVGProps } from 'react' export const formatTimestamp = (timestamp: string | null) => { const date = new Date(timestamp || '') - return `${date.toLocaleDateString()}, ${date.toLocaleTimeString()}` + return `${date.toISOString().substring(0, 10)} ${date.toLocaleTimeString()}` } export const formatTimestampRelative = ( @@ -99,6 +99,7 @@ export const HEALTH_CHECK_INTERVAL = 3000 export enum EmailSelection { SENT = 'sent', RECEIVED = 'received', + DRAFTS = 'drafts', } export enum VIEW { @@ -128,7 +129,7 @@ export const getRecipients = (emailDetails: EmailDetails) => participant => participant.id !== emailDetails.sender.id ) -export const injectEmailTool: ExtendedTool = { +export const injectEmailTool: Tool = { id: '0', name: 'INJECT email', roles: '', @@ -139,8 +140,6 @@ export const injectEmailTool: ExtendedTool = { id: null, name: null, }, - responses: [], - hasParam: false, } export const getInjectEmailArgument = (emailDetails: EmailDetails) => `to: ${getRecipients(emailDetails) @@ -150,6 +149,7 @@ export const getInjectEmailResponse = () => 'For more information about INJECT emails, go to the Emails page' export const HIGHLIGHTED_COLOR = 'rgba(143, 153, 168, 0.15)' +export const ACTIVE_COLOR = 'rgba(143, 153, 168, 0.3)' export const getTeamById = (teams: Team[], id: string) => teams.filter(team => team.id === id).at(0) @@ -196,9 +196,18 @@ export interface PlotContextProps<X, Y> { yScale: Y } +export const highlighted = css` + background-color: ${HIGHLIGHTED_COLOR}; +` + export const highlightedOnHover = css` &:hover { - background: ${HIGHLIGHTED_COLOR}; + background-color: ${HIGHLIGHTED_COLOR}; + } +` +export const highlightedOnActive = css` + &:active { + background-color: ${ACTIVE_COLOR}; } ` @@ -210,10 +219,10 @@ export const ellipsized = css` export const plotDataElement = css` stroke: transparent; - stroke-width: 5px; + stroke-width: 0.25rem; &:hover { - filter: drop-shadow(0 0 2px #202020); + filter: drop-shadow(0 0 0.125rem #202020); opacity: 1; } ` diff --git a/frontend/src/application.tsx b/frontend/src/application.tsx index 05d6fa52528eb0227f8fe990fceac1b2261646c0..243e33efdc80b605b793ba9a316e4f9c0d448644 100644 --- a/frontend/src/application.tsx +++ b/frontend/src/application.tsx @@ -3,14 +3,25 @@ import ApolloProviderWrapped from '@inject/graphql/client' import Connection from '@inject/graphql/connection' import SubscriptionEngine from '@inject/graphql/context' import PopupEngine from '@inject/shared/popup/PopupEngine' +import { useCallback } from 'react' import { RouterProvider, createBrowserRouter } from 'react-router-dom' +import useColorMode from './clientsettings/ColorMode/useColorMode' +import useNotificationLimit from './clientsettings/NotificationLimit/useNotificationLimit' const Application = () => { const router = createBrowserRouter(routes) - const onFailedAuth = (msg: string) => { - console.log(msg) - router.navigate('/login') - } + const onFailedAuth = useCallback( + () => (msg: string) => { + console.log(msg) + router.navigate('/login') + }, + [router] + ) + + // settings have to be imported here to sync across tabs + useColorMode() + useNotificationLimit() + return ( <Connection host={window.VITE_HTTP_HOST || 'localhost:8000'} diff --git a/frontend/src/clientsettings/ColorMode/index.tsx b/frontend/src/clientsettings/ColorMode/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2a271fa615a1c7ebd749f070d89002f3cf978305 --- /dev/null +++ b/frontend/src/clientsettings/ColorMode/index.tsx @@ -0,0 +1,38 @@ +import { Button, Icon, Switch } from '@blueprintjs/core' +import { useMemo } from 'react' +import SettingsSection from '../SettingsSection' +import useColorMode from './useColorMode' + +const ColorMode = () => { + const [darkValue, setDark] = useColorMode() + const dark = useMemo( + () => + darkValue === null + ? window.matchMedia('(prefers-color-scheme: dark)').matches + : darkValue, + [darkValue] + ) + + return ( + <SettingsSection + title='Color mode' + subtitle='Change the color mode of the application' + > + <Icon icon={dark ? 'moon' : 'circle'} /> + <Switch + style={{ margin: 0 }} + checked={dark} + title='Toggle color mode' + onChange={() => setDark(!dark)} + /> + <Button + icon='reset' + minimal + onClick={() => setDark(null)} + title='Reset to automatic color mode' + /> + </SettingsSection> + ) +} + +export default ColorMode diff --git a/frontend/src/clientsettings/ColorMode/useColorMode.tsx b/frontend/src/clientsettings/ColorMode/useColorMode.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8b77af8f12a8e5939440fac69cd7d0ab5699235f --- /dev/null +++ b/frontend/src/clientsettings/ColorMode/useColorMode.tsx @@ -0,0 +1,26 @@ +import { Classes } from '@blueprintjs/core' +import { + makeVar, + useLocalStorageReactiveVar, +} from '@inject/graphql/client/reactive' + +const KEY = 'dark' +const darkReactiveVar = makeVar<boolean | null>(null) + +const useColorMode = () => + useLocalStorageReactiveVar(darkReactiveVar, KEY, { + onChange: value => { + const dark = + value === null + ? window.matchMedia('(prefers-color-scheme: dark)').matches + : value + + if (dark) { + document.body.classList.add(Classes.DARK) + } else { + document.body.classList.remove(Classes.DARK) + } + }, + }) + +export default useColorMode diff --git a/frontend/src/clientsettings/NotificationLimit/index.tsx b/frontend/src/clientsettings/NotificationLimit/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ed0e4d38ef8e12c08b876382a89d11610b3dea6d --- /dev/null +++ b/frontend/src/clientsettings/NotificationLimit/index.tsx @@ -0,0 +1,23 @@ +import { NumericInput } from '@blueprintjs/core' +import SettingsSection from '../SettingsSection' +import useNotificationLimit from './useNotificationLimit' + +const NotificationLimit = () => { + const [limitValue, setLimit] = useNotificationLimit() + + return ( + <SettingsSection + title='Notifications' + subtitle='Change the number of notifications to store' + > + <NumericInput + fill + min={0} + value={limitValue} + onValueChange={value => setLimit(value)} + /> + </SettingsSection> + ) +} + +export default NotificationLimit diff --git a/frontend/src/clientsettings/NotificationLimit/useNotificationLimit.tsx b/frontend/src/clientsettings/NotificationLimit/useNotificationLimit.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a829878fa593bad2b9fe6e425f1f5dfc8d1f4320 --- /dev/null +++ b/frontend/src/clientsettings/NotificationLimit/useNotificationLimit.tsx @@ -0,0 +1,12 @@ +import { + makeVar, + useLocalStorageReactiveVar, +} from '@inject/graphql/client/reactive' + +const KEY = 'notificationLimit' +const limitReactiveVar = makeVar<number>(10) + +const useNotificationLimit = () => + useLocalStorageReactiveVar(limitReactiveVar, KEY) + +export default useNotificationLimit diff --git a/frontend/src/clientsettings/SettingsSection.tsx b/frontend/src/clientsettings/SettingsSection.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e421322889b3f10d81babf19709127d5e6c109e5 --- /dev/null +++ b/frontend/src/clientsettings/SettingsSection.tsx @@ -0,0 +1,25 @@ +import { Section } from '@blueprintjs/core' +import type { FC, PropsWithChildren } from 'react' + +interface SettingsSectionProps extends PropsWithChildren { + title: string + subtitle?: string +} + +const SettingsSection: FC<SettingsSectionProps> = ({ + title, + subtitle, + children, +}) => ( + <Section + title={title} + subtitle={subtitle} + rightElement={ + <div style={{ display: 'flex', gap: '0.25rem', alignItems: 'center' }}> + {children} + </div> + } + /> +) + +export default SettingsSection diff --git a/frontend/src/clientsettings/components/ColorMode.tsx b/frontend/src/clientsettings/components/ColorMode.tsx deleted file mode 100644 index e3031053ef3853817f163800aceeb71a1d7c0308..0000000000000000000000000000000000000000 --- a/frontend/src/clientsettings/components/ColorMode.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import { Button, Icon, Section, Switch } from '@blueprintjs/core' -import { colormode, getColormode, useColormode } from '../vars/colormode' - -const ColorMode = () => { - const View = () => { - const color = useColormode() - const currentColor = color !== null ? color : getColormode() - return ( - <> - <Icon icon={currentColor ? 'moon' : 'circle'} /> - <Switch - style={{ margin: '0' }} - checked={currentColor} - title='Toggle color mode.' - onChange={() => colormode(!currentColor)} - /> - <Button - style={{ margin: '0' }} - icon='refresh' - minimal - onClick={() => colormode(null)} - title='Reset to automatic color mode.' - /> - </> - ) - } - return ( - <Section - title='Color Mode' - subtitle='Change the color mode of the application.' - rightElement={ - <div style={{ display: 'flex', gap: '0.25rem', alignItems: 'center' }}> - <View /> - </div> - } - /> - ) -} - -export default ColorMode diff --git a/frontend/src/clientsettings/components/Connection.tsx b/frontend/src/clientsettings/components/Connection.tsx index 3b2c819b2f2d2f8df85202da322f67ba377a6173..e3bd4ea49f18b6418bf7d18f68e0848c1dc32e3c 100644 --- a/frontend/src/clientsettings/components/Connection.tsx +++ b/frontend/src/clientsettings/components/Connection.tsx @@ -7,19 +7,20 @@ const Connection = () => { const wsVar = useWs() const ResetButton = () => ( <Button + icon='reset' onClick={() => { host(null) ws(null) }} fill > - Reset connection + Reset </Button> ) return ( <Section - title='Connection Info' + title='Connection' subtitle='Current client parameters (set by the administrator)' rightElement={<ResetButton />} > diff --git a/frontend/src/clientsettings/components/Experimental.tsx b/frontend/src/clientsettings/components/Experimental.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e11989ed3192f44299b4b07d33c6b241628d82a4 --- /dev/null +++ b/frontend/src/clientsettings/components/Experimental.tsx @@ -0,0 +1,13 @@ +import { experimentalV2, useExperimentalV2 } from '../vars/experimentalV2' +import SwitchSetting from './generic/SwitchSetting' + +const Experimental = () => ( + <SwitchSetting + title='Experimental' + subtitle='Enable experimental features' + useVar={useExperimentalV2} + variable={experimentalV2} + /> +) + +export default Experimental diff --git a/frontend/src/clientsettings/components/GraphiQL.tsx b/frontend/src/clientsettings/components/GraphiQL.tsx index f32819f7cd2b9c7e7dce358690a1e826a1ebbf30..8348bfeeb1539433bdcd05100b93d3bf75f9962c 100644 --- a/frontend/src/clientsettings/components/GraphiQL.tsx +++ b/frontend/src/clientsettings/components/GraphiQL.tsx @@ -4,14 +4,16 @@ import { useNavigate } from 'react-router-dom' const GraphiQL = () => { const nav = useNavigate() - const { isSuperuser } = useAuthIdentity(!!window.INJECT_NOAUTH) + const { isSuperuser } = useAuthIdentity() return isSuperuser ? ( <Section - title={'GraphiQL interface'} - subtitle={'Explore the GraphQL API with GraphiQL'} + title='GraphiQL' + subtitle='Interact with the GraphQL API' rightElement={ - <Button onClick={() => nav('/graphiql')}>Open GraphiQL</Button> + <Button icon='open-application' onClick={() => nav('/graphiql')}> + Open + </Button> } /> ) : ( diff --git a/frontend/src/clientsettings/components/InstructorTeams.tsx b/frontend/src/clientsettings/components/InstructorTeams.tsx deleted file mode 100644 index c120e13392c8edd76aaae0f8a0b2b93ec6e59359..0000000000000000000000000000000000000000 --- a/frontend/src/clientsettings/components/InstructorTeams.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import TeamLabel from '@/components/TeamLabel' -import useTeamStateValidator from '@/instructor/InstructorTeamSelector/useTeamStateValidator' -import { - Button, - CardList, - CheckboxCard, - NonIdealState, - Section, - SectionCard, -} from '@blueprintjs/core' -import { toggleTeam, unsetTeams, useTeamStateMap } from '../vars/teams' - -const InstructorTeams = () => { - const teamStateMap = useTeamStateMap() - const validator = useTeamStateValidator() - - return ( - <Section - title={'Instructor Subscribed Teams'} - subtitle={`Current amount of synchronized teams: ${ - Object.keys(teamStateMap).length - }`} - rightElement={ - <div - style={{ - display: 'flex', - margin: '0.5rem', - flexDirection: 'column', - gap: '0.25rem', - alignItems: 'center', - }} - > - <Button - fill - onClick={() => { - validator() - }} - > - Revalidate subscribed teams - </Button> - <Button - fill - onClick={() => { - unsetTeams() - }} - > - Unset subscribed teams - </Button> - </div> - } - > - <SectionCard> - {Object.keys(teamStateMap).length === 0 && ( - <div style={{ padding: '1rem' }}> - <NonIdealState - icon='low-voltage-pole' - description='Currently there are no active teams to manage' - /> - </div> - )} - {Object.keys(teamStateMap).length > 0 && ( - <CardList> - {Object.entries(teamStateMap).map(([key, value]) => ( - <CheckboxCard - key={key} - alignIndicator='right' - showAsSelectedWhenChecked={false} - checked={value.show} - onClick={e => { - e.preventDefault() - toggleTeam(key) - }} - > - <TeamLabel - teamId={value.team.id} - teamName={value.team.name} - exerciseName={value.team.exercise.name} - teamRole={value.team.role} - /> - </CheckboxCard> - ))} - </CardList> - )} - </SectionCard> - </Section> - ) -} - -export default InstructorTeams diff --git a/frontend/src/clientsettings/components/Notification.tsx b/frontend/src/clientsettings/components/Notification.tsx deleted file mode 100644 index 5af3e3bce84127d08cc73677ae9013da4532f948..0000000000000000000000000000000000000000 --- a/frontend/src/clientsettings/components/Notification.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import { Button, InputGroup, Section } from '@blueprintjs/core' -import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import { useLocalStorageState } from 'ahooks' - -const Notification = () => { - const FormCleaner = () => { - const { clearNotify } = useNotifyContext() - return ( - <Button fill onClick={clearNotify}> - Clear All Notifications - </Button> - ) - } - const FormSetter = () => { - const [count, setCount] = useLocalStorageState('notificationLimit', { - defaultValue: 10, - deserializer: v => Number(v), - serializer: v => v.toString(), - }) - return ( - <InputGroup - fill - type='number' - value={(count as number).toString()} - onChange={e => setCount(Number(e.target.value))} - /> - ) - } - - return ( - <Section - title='Notifications' - subtitle='Change the number of notifications to display.' - rightElement={ - <div - style={{ - display: 'flex', - margin: '0.5rem', - flexDirection: 'column', - gap: '0.25rem', - alignItems: 'center', - }} - > - <FormSetter /> - <FormCleaner /> - </div> - } - /> - ) -} - -export default Notification diff --git a/frontend/src/clientsettings/components/RelativeTime.tsx b/frontend/src/clientsettings/components/RelativeTime.tsx deleted file mode 100644 index 0d5ae687664ee04895add99d62c8fb3f652f0a69..0000000000000000000000000000000000000000 --- a/frontend/src/clientsettings/components/RelativeTime.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Section, Switch } from '@blueprintjs/core' -import { relativeTime, useRelativeTime } from '../vars/relativeTime' - -const RelativeTime = () => { - const View = () => { - const relativeTimeVar = useRelativeTime() - return ( - <> - <span>{relativeTimeVar ? 'Relative time' : 'Absolute time'}</span> - <Switch - style={{ margin: '0' }} - checked={relativeTimeVar} - onChange={() => relativeTime(!relativeTimeVar)} - /> - </> - ) - } - return ( - <Section - title={'Relative Time'} - subtitle={ - 'Change the representation of time in analyst view, either relatively or absolutely.' - } - rightElement={ - <div style={{ display: 'flex', gap: '0.25rem', alignItems: 'center' }}> - <View /> - </div> - } - /> - ) -} - -export default RelativeTime diff --git a/frontend/src/clientsettings/components/generic/SwitchSetting.tsx b/frontend/src/clientsettings/components/generic/SwitchSetting.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d14cb423ac57ba131ac44db13a9448fa89730e62 --- /dev/null +++ b/frontend/src/clientsettings/components/generic/SwitchSetting.tsx @@ -0,0 +1,47 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Section, Switch } from '@blueprintjs/core' +import type { makeVar } from '@inject/graphql/client/reactive' +import type { FC } from 'react' + +const SwitchSetting: FC<{ + useVar: () => any + variable: ReturnType<typeof makeVar<any>> + title: string + subtitle?: string + trueValue?: string + falseValue?: string +}> = ({ + useVar, + variable, + title, + subtitle, + trueValue = 'Yes', + falseValue = 'No', +}) => { + const View = () => { + const reactiveVar = useVar() + return ( + <> + <span>{reactiveVar ? trueValue : falseValue}</span> + <Switch + style={{ margin: '0' }} + checked={reactiveVar} + onChange={() => variable(!reactiveVar)} + /> + </> + ) + } + return ( + <Section + title={title} + subtitle={subtitle} + rightElement={ + <div style={{ display: 'flex', gap: '0.25rem', alignItems: 'center' }}> + <View /> + </div> + } + /> + ) +} + +export default SwitchSetting diff --git a/frontend/src/clientsettings/vars/colormode.ts b/frontend/src/clientsettings/vars/colormode.ts deleted file mode 100644 index 2a7388189223ddb8e36083cf83420e45b76344f4..0000000000000000000000000000000000000000 --- a/frontend/src/clientsettings/vars/colormode.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { makeVar, useReactiveVar } from '@inject/graphql/client/reactive' - -export const getColormode = () => - localStorage.getItem('colormode') === 'true' || - (localStorage.getItem('colormode') === null && - window.matchMedia && - window.matchMedia('(prefers-color-scheme: dark)').matches) - -const initialSettings: boolean = getColormode() - -export const colormode = makeVar<boolean | null>(initialSettings) -export const useColormode = () => useReactiveVar(colormode) - -function changeColor(value: boolean | null) { - if (value === null) { - localStorage.removeItem('colormode') - value = getColormode() - } else { - localStorage.setItem('colormode', value.toString()) - } - if (value) { - document.body.classList.add('bp5-dark') - } else { - document.body.classList.remove('bp5-dark') - } -} - -changeColor(initialSettings) -colormode.onNextChange(function onNext() { - changeColor(colormode()) - colormode.onNextChange(onNext) -}) diff --git a/frontend/src/clientsettings/vars/experimentalV2.ts b/frontend/src/clientsettings/vars/experimentalV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..4caac3d44d5a230293ee2949616fe1789c7312c7 --- /dev/null +++ b/frontend/src/clientsettings/vars/experimentalV2.ts @@ -0,0 +1,16 @@ +import { makeVar, useReactiveVar } from '@inject/graphql/client/reactive' + +const key = 'useExperimentalV2' +const initialSettings: boolean = localStorage.getItem(key) === 'true' + +export const experimentalV2 = makeVar<boolean>(initialSettings) +export const useExperimentalV2 = () => useReactiveVar(experimentalV2) + +function change(value: boolean) { + localStorage.setItem(key, value.toString()) +} + +experimentalV2.onNextChange(function onNext() { + change(experimentalV2()) + experimentalV2.onNextChange(onNext) +}) diff --git a/frontend/src/clientsettings/vars/teams.ts b/frontend/src/clientsettings/vars/teams.ts index 4dc092c5d2c51fe647059d3c0c367eaa30521d62..a0b57ff222999117c9e99155730e9fcf7c55005b 100644 --- a/frontend/src/clientsettings/vars/teams.ts +++ b/frontend/src/clientsettings/vars/teams.ts @@ -1,3 +1,4 @@ +import { shallowCompareKeys } from '@blueprintjs/core/lib/esm/common/utils' import { makeVar, useReactiveVar } from '@inject/graphql/client/reactive' import type { Team } from '@inject/graphql/fragments/Team.generated' @@ -23,6 +24,21 @@ function change(value: TeamStateMap) { localStorage.setItem(key, JSON.stringify(value)) } +window.addEventListener( + 'storage', + ({ key: keystorage, newValue, oldValue }) => { + if (keystorage === key) { + const newMap = JSON.parse(newValue || '{}') + if ( + newValue !== oldValue && + !shallowCompareKeys(newMap, teamStateMap()) + ) { + teamStateMap(newMap) + } + } + } +) + export const toggleTeam = (teamId: string) => { const prev = teamStateMap() as TeamStateMap const chosenTeam = prev[teamId] diff --git a/frontend/src/components/ContentArea/index.tsx b/frontend/src/components/ContentArea/index.tsx index 88de541a13fa49b7b29a4aacf4bbb1ba648e4e3e..ae0443a291de59c4b428fb78745f6272622be33b 100644 --- a/frontend/src/components/ContentArea/index.tsx +++ b/frontend/src/components/ContentArea/index.tsx @@ -23,7 +23,6 @@ const ContentArea: FC<ContentAreaProps> = ({ content, setContent }) => { resize: 'none', overflowY: 'auto', flex: 1, - marginBottom: '0.25rem', }} placeholder='Message' onChange={handleContentChange} diff --git a/frontend/src/components/ExerciseList/DownloadLogsButton.tsx b/frontend/src/components/ExerciseList/DownloadLogsButton.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b62b025af090823db2b54d096d0756ebcbb6e528 --- /dev/null +++ b/frontend/src/components/ExerciseList/DownloadLogsButton.tsx @@ -0,0 +1,49 @@ +import { AnchorButton, Button, ButtonGroup, Popover } from '@blueprintjs/core' +import { css } from '@emotion/css' +import { useHost } from '@inject/graphql/connection/host' +import { downloadLogUrl } from '@inject/shared/config' +import type { FC } from 'react' + +const content = css` + padding: 0.5rem; +` + +interface DownloadLogsButtonProps { + exerciseId: string +} + +const DownloadLogsButton: FC<DownloadLogsButtonProps> = ({ exerciseId }) => { + const host = useHost() + + return ( + <Popover + content={ + <ButtonGroup className={content} vertical alignText='left'> + <AnchorButton + icon='people' + href={downloadLogUrl(host || '', exerciseId, false)} + target='_blank' + rel='noreferrer' + > + Standard + </AnchorButton> + <AnchorButton + icon='blocked-person' + href={downloadLogUrl(host || '', exerciseId, true)} + target='_blank' + rel='noreferrer' + > + Anonymized + </AnchorButton> + </ButtonGroup> + } + placement='right' + > + <Button icon='download' rightIcon='caret-right'> + Download logs + </Button> + </Popover> + ) +} + +export default DownloadLogsButton diff --git a/frontend/src/components/ExerciseList/ExerciseCard.tsx b/frontend/src/components/ExerciseList/ExerciseCard.tsx index e6045fe1e45ddc58d81221aa264923bfbdf33c8c..2568c88de5afe60cf65b2f4541fe9ee8839e2d12 100644 --- a/frontend/src/components/ExerciseList/ExerciseCard.tsx +++ b/frontend/src/components/ExerciseList/ExerciseCard.tsx @@ -1,20 +1,40 @@ import { HIGHLIGHTED_COLOR, formatTimestamp } from '@/analyst/utilities' -import { useNavigate } from '@/router' -import type { ButtonProps } from '@blueprintjs/core' +import DeleteAlert from '@/exercisepanel/DeleteAlert' import { Button, ButtonGroup, Card } from '@blueprintjs/core' -import { useHost } from '@inject/graphql/connection/host' +import { css } from '@emotion/css' import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' -import { downloadLogUrl } from '@inject/shared/config' -import { useMemo, type FC, type ReactNode } from 'react' +import { useMemo, useState, type FC, type ReactNode } from 'react' +import LinkButton from '../LinkButton' +import DownloadLogsButton from './DownloadLogsButton' -type SelectingDetails = { +const card = css` + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: auto; +` + +const infoWrapper = css` + overflow: auto; +` + +const title = css` + overflow: hidden; + text-overflow: ellipsis; +` + +export type SelectingDetails = { onSelect: () => void } -type ManagingDetails = { - startButtonProps: ButtonProps - removeButtonProps: ButtonProps - pauseButtonProps: ButtonProps +export type ManagingDetails = { + runningAny: boolean + onStart: () => void + startLoading?: boolean + onDelete: () => void + deleteLoading?: boolean + onPause: () => void + pauseLoading?: boolean } type ExerciseCardProps = { @@ -34,8 +54,7 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ type, details, }) => { - const host = useHost() - const nav = useNavigate() + const [alertOpen, setAlertOpen] = useState(false) const buttons: ReactNode = useMemo( () => @@ -48,39 +67,47 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ ) : ( <> {!exercise.running && !exercise.finished && ( - <Button icon='play' {...details.startButtonProps}> + <Button + icon='play' + onClick={details.onStart} + loading={details.startLoading} + disabled={details.runningAny} + title={ + details.runningAny + ? 'Only one exercise can run at a time' + : undefined + } + > {exercise.exerciseStart ? 'Resume' : 'Start'} </Button> )} {exercise.running && ( - <Button icon='pause' {...details.pauseButtonProps}> + <Button + icon='pause' + onClick={details.onPause} + loading={details.pauseLoading} + > Pause </Button> )} - {!exercise.running && ( - <Button icon='cross' {...details.removeButtonProps}> - Remove - </Button> - )} <Button - icon='people' - onClick={() => - nav('/users/exercise/:exerciseId', { - params: { exerciseId: exercise.id }, - }) + icon='trash' + onClick={() => setAlertOpen(true)} + disabled={exercise.running} + title={ + exercise.running ? 'Cannot delete a running exercise' : undefined } > - Participants + Delete </Button> - {(exercise.running || exercise.finished) && ( - <a - href={downloadLogUrl(host || '', exercise.id)} - target='_blank' - rel='noreferrer' - > - <Button icon='download'>Download logs</Button> - </a> - )} + <LinkButton + link={[ + '/exercise-panel/exercise/:exerciseId', + { params: { exerciseId: exercise.id } }, + ]} + button={{ icon: 'people', text: 'Participants' }} + /> + <DownloadLogsButton exerciseId={exercise.id} /> </> ), [ @@ -89,7 +116,6 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ exercise.finished, exercise.id, exercise.running, - host, isSelected, type, ] @@ -97,16 +123,22 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ return ( <Card + className={card} style={{ backgroundColor: isSelected ? HIGHLIGHTED_COLOR : undefined, - display: 'flex', - flexDirection: 'column', - justifyContent: 'space-between', }} > - <div> - <h3>{`Exercise: ${exercise.name}`}</h3> - <h4>{`Definition: ${exercise.definition?.name || exercise.definition?.id}`}</h4> + <div className={infoWrapper}> + <h3 + className={title} + title={exercise.name} + >{`Exercise: ${exercise.name}`}</h3> + <h4 + className={title} + title={ + exercise.definition?.name || exercise.definition?.id?.toString() + } + >{`Definition: ${exercise.definition?.name || exercise.definition?.id}`}</h4> <p> {`${exercise.running ? 'Running' : 'Not running'}, \ ${exercise.finished ? 'Finished' : 'Not finished'}`} @@ -127,6 +159,20 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ {buttons} </ButtonGroup> </div> + + {type === 'managing' && ( + <DeleteAlert + open={alertOpen} + setOpen={setAlertOpen} + onDelete={details.onDelete} + loading={details.deleteLoading} + > + <p> + Are you sure you want to delete the selected exercise? This action + is irreversible. + </p> + </DeleteAlert> + )} </Card> ) } diff --git a/frontend/src/components/ExerciseList/ExerciseListWrapper.tsx b/frontend/src/components/ExerciseList/ExerciseListWrapper.tsx index 5691a4c600703dadf16aa15202e008ea44278a44..914444fcc544fd0f0206c8988c5be84cc75e0084 100644 --- a/frontend/src/components/ExerciseList/ExerciseListWrapper.tsx +++ b/frontend/src/components/ExerciseList/ExerciseListWrapper.tsx @@ -1,23 +1,22 @@ import type { BaseExerciseListProps } from '@/components/ExerciseList' import ExerciseListComponent from '@/components/ExerciseList' import { NonIdealState, Spinner } from '@blueprintjs/core' -import type { GetExercises } from '@inject/graphql/queries/GetExercises.generated' +import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' +import useExercisesSubscription from '@inject/graphql/utils/useExercisesSubscription' import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' import ErrorMessage from '../../components/ErrorMessage' type ExerciseListWrapperProps = BaseExerciseListProps & { - data: GetExercises | undefined - loading: boolean - error: Error | undefined + filter?: (exercise: Exercise) => boolean } const ExerciseListWrapper: FC<ExerciseListWrapperProps> = ({ - data, - loading, - error, + filter, ...props }) => { + const { data, loading, error } = useExercisesSubscription() + if (loading) { return <Spinner /> } else if (error) { @@ -37,7 +36,7 @@ const ExerciseListWrapper: FC<ExerciseListWrapperProps> = ({ ) } - const exercises = data.exercises.filter(notEmpty) + const exercises = data.exercises.filter(notEmpty).filter(filter || Boolean) if (exercises.length === 0) { return ( <NonIdealState diff --git a/frontend/src/components/ExerciseList/index.tsx b/frontend/src/components/ExerciseList/index.tsx index 34964e263fb010e53e7cb4036090feacf4e998f0..e30c7d4c3e33faab6fee8bbdad7ec08bb11286c6 100644 --- a/frontend/src/components/ExerciseList/index.tsx +++ b/frontend/src/components/ExerciseList/index.tsx @@ -1,27 +1,17 @@ -import { type ButtonProps } from '@blueprintjs/core' import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' import CardList from '@inject/shared/components/CardList' import { type FC } from 'react' +import type { ManagingDetails, SelectingDetails } from './ExerciseCard' import ExerciseCard from './ExerciseCard' -type SelectingDetails = { - onSelect: (exercise: Exercise) => void -} - -type ManagingDetails = { - startButtonProps: (exercise: Exercise) => ButtonProps - removeButtonProps: (exercise: Exercise) => ButtonProps - pauseButtonProps: (exercise: Exercise) => ButtonProps -} - export type BaseExerciseListProps = { isSelected?: (exercise: Exercise) => boolean } & ( | { type: 'selecting' - details: SelectingDetails + details: (exercise: Exercise) => SelectingDetails } - | { type: 'managing'; details: ManagingDetails } + | { type: 'managing'; details: (exercise: Exercise) => ManagingDetails } ) type ExerciseListProps = BaseExerciseListProps & { @@ -42,7 +32,7 @@ const ExerciseListComponent: FC<ExerciseListProps> = ({ exercise={exercise} isSelected={isSelected ? isSelected(exercise) : undefined} type='selecting' - details={{ onSelect: () => details.onSelect(exercise) }} + details={details(exercise)} /> ) : ( <ExerciseCard @@ -50,11 +40,7 @@ const ExerciseListComponent: FC<ExerciseListProps> = ({ exercise={exercise} isSelected={exercise.running} type='managing' - details={{ - startButtonProps: details.startButtonProps(exercise), - removeButtonProps: details.removeButtonProps(exercise), - pauseButtonProps: details.pauseButtonProps(exercise), - }} + details={details(exercise)} /> ) )} diff --git a/frontend/src/components/ExitButton/index.tsx b/frontend/src/components/ExitButton/index.tsx index b592a4eddfbb250186eeb39adc0321749647f2be..46542d2b733f7620b0a79cbb6c253d4cb81283d3 100644 --- a/frontend/src/components/ExitButton/index.tsx +++ b/frontend/src/components/ExitButton/index.tsx @@ -1,26 +1,21 @@ import { useNavigate } from '@/router' -import { - Button, - Dialog, - DialogBody, - DialogFooter, - Text, -} from '@blueprintjs/core' +import { Alert, Button } from '@blueprintjs/core' import type { FC } from 'react' import { useState } from 'react' interface ExitButtonProps { hideLabel?: boolean + noConsent?: boolean } -const ExitButton: FC<ExitButtonProps> = ({ hideLabel }) => { +const ExitButton: FC<ExitButtonProps> = ({ hideLabel, noConsent }) => { const nav = useNavigate() - const [open, setOpen] = useState(false) + const [alertOpen, setAlertOpen] = useState(false) return ( <> <Button - active={open} + active={alertOpen} icon='cross-circle' intent='danger' alignText='left' @@ -28,30 +23,24 @@ const ExitButton: FC<ExitButtonProps> = ({ hideLabel }) => { minimal text={!hideLabel && 'Exit'} title='Exit' - onClick={() => setOpen(true)} + onClick={() => (noConsent ? nav('/') : setAlertOpen(true))} /> - <Dialog - title='Exit' - icon='log-out' - onClose={() => setOpen(false)} - isOpen={open} - > - <DialogBody> - <Text>Are you sure you want to return to the main menu?</Text> - </DialogBody> - <DialogFooter - actions={ - <> - <Button intent='danger' onClick={() => nav('/')} text='Exit' /> - <Button - intent='primary' - onClick={() => setOpen(false)} - text='Cancel' - /> - </> - } - /> - </Dialog> + {!noConsent && ( + <Alert + isOpen={alertOpen} + canEscapeKeyCancel + canOutsideClickCancel + cancelButtonText='Cancel' + onCancel={() => setAlertOpen(false)} + confirmButtonText='Exit' + icon='cross-circle' + intent='danger' + onConfirm={() => nav('/')} + onClose={() => setAlertOpen(false)} + > + <p>Are you sure you want to return to the main menu?</p> + </Alert> + )} </> ) } diff --git a/frontend/src/components/FileArea/index.tsx b/frontend/src/components/FileArea/index.tsx index 10a50a51d2c3062716a6c0684f39c0e1c2c4bb74..5eb1aac2a1f92aa4eb815492f079e0746fee31a0 100644 --- a/frontend/src/components/FileArea/index.tsx +++ b/frontend/src/components/FileArea/index.tsx @@ -7,7 +7,7 @@ import { uploadFileUrl } from '@inject/shared/config' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import csrfFetch from '@inject/shared/utils/csrfFetch' import type { ChangeEvent, Dispatch, FC, SetStateAction } from 'react' -import { useCallback } from 'react' +import { useCallback, useState } from 'react' const ellipsize = css` max-width: 100%; @@ -24,6 +24,7 @@ interface FileAreaProps { const FileArea: FC<FileAreaProps> = ({ teamId, fileInfo, setFileInfo }) => { const host = useHost() const { notify } = useNotifyContext() + const [loading, setLoading] = useState(false) const [getFileInfo] = useGetFileInfoLazyQuery() @@ -42,6 +43,7 @@ const FileArea: FC<FileAreaProps> = ({ teamId, fileInfo, setFileInfo }) => { const formData = new FormData() formData.append('file', e.target.files[0]) + setLoading(true) csrfFetch(uploadFileUrl(host || '', teamId), { method: 'POST', body: formData, @@ -49,27 +51,28 @@ const FileArea: FC<FileAreaProps> = ({ teamId, fileInfo, setFileInfo }) => { }) .then(res => res.json()) .then((res: { status: string; detail: string }) => { - notify(`File uploaded successfully`) - getFileInfo({ variables: { fileInfoId: res.detail }, onCompleted: data => setFileInfo(data.fileInfo || undefined), }) }) .catch((err: { status: string; detail: string }) => { - notify(`${err.status} - ${err.detail}`, { + notify(`${err.status}: ${err.detail}`, { intent: 'danger', }) }) + .finally(() => setLoading(false)) }, [getFileInfo, host, notify, setFileInfo, teamId] ) + if (loading) return <Button loading minimal /> + return fileInfo ? ( <Button style={{ maxWidth: '100%' }} - text={fileInfo.fileName} - minimal + text={fileInfo?.fileName} + alignText='left' icon='cross' onClick={() => setFileInfo(undefined)} textClassName={ellipsize} diff --git a/frontend/src/components/FileViewRedirectButton/FileButtonComponent.tsx b/frontend/src/components/FileViewRedirectButton/FileButtonComponent.tsx index 03d2a34aefed199649667f304b8b4533cf6f79e9..6d2e490d716d8ae231f3d79eb6ea9bb2a3fd6e3e 100644 --- a/frontend/src/components/FileViewRedirectButton/FileButtonComponent.tsx +++ b/frontend/src/components/FileViewRedirectButton/FileButtonComponent.tsx @@ -1,4 +1,4 @@ -import { Icon } from '@blueprintjs/core' +import { Classes, Icon } from '@blueprintjs/core' import type { FC, MouseEventHandler, PropsWithChildren } from 'react' interface FileButtonComponentProps extends PropsWithChildren { @@ -14,7 +14,7 @@ const FileButtonComponent: FC<FileButtonComponentProps> = ({ <div> <Icon icon='paperclip' - className='bp5-text-muted' + className={Classes.TEXT_MUTED} style={{ paddingRight: '0.5em' }} /> <a onClick={onClick} href={href}> diff --git a/frontend/src/components/FileViewRedirectButton/index.tsx b/frontend/src/components/FileViewRedirectButton/index.tsx index 6f51e3b29fe1da6c5229b1b9fc4397067f94291f..f1b4a05f8024320cefa500c3b094e7651b45f253 100644 --- a/frontend/src/components/FileViewRedirectButton/index.tsx +++ b/frontend/src/components/FileViewRedirectButton/index.tsx @@ -2,8 +2,10 @@ import { useNavigate } from '@/router' import { useHost } from '@inject/graphql/connection/host' import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' import { downloadFileUrl } from '@inject/shared/config' -import { type FC } from 'react' -import { useLocation } from 'react-router-dom' +import type { MouseEventHandler } from 'react' +import { useMemo, type FC } from 'react' +import { generatePath, useHref, useLocation } from 'react-router-dom' +import type { LinkType } from '../LinkButton' import FileButtonComponent from './FileButtonComponent' interface DocumentViewButtonProps { @@ -21,8 +23,6 @@ interface DocumentViewButtonProps { const SUPPORTED_FILE_EXTENSIONS = [ 'bmp', 'gif', - 'htm', - 'html', 'jpg', 'jpeg', 'pdf', @@ -31,13 +31,26 @@ const SUPPORTED_FILE_EXTENSIONS = [ 'txt', ] +/** + * Renders a button component that redirects to a file view + * or triggers a file download if the file extension is not supported. + * + * The redirect is content-aware and will redirect to the + * trainee/instructor/analyst page based on the current location. + * + * @param fileInfo - The information about the file. + * @param teamId - The ID of the team. + * @param exerciseId - The ID of the exercise. + * @param inInstructor - Indicates whether the user is an instructor. + * @returns The rendered FileViewRedirectButton component. + */ const FileViewRedirectButton: FC<DocumentViewButtonProps> = ({ fileInfo, teamId, exerciseId, inInstructor, }) => { - const navigate = useNavigate() + const nav = useNavigate() const loc = useLocation().pathname const host = useHost() @@ -46,42 +59,67 @@ const FileViewRedirectButton: FC<DocumentViewButtonProps> = ({ parsedFilename[parsedFilename.length - 1] || '' ) - const handleClick = () => { - if (!isSupported) { - return - } - + const link: LinkType | undefined = useMemo(() => { if (loc.startsWith('/trainee')) { - navigate('/trainee/:exerciseId/:teamId/file/:fileId', { - params: { exerciseId, fileId: fileInfo.id, teamId }, - }) + return [ + '/trainee/:exerciseId/:teamId/file/:fileId', + { params: { exerciseId, fileId: fileInfo.id, teamId } }, + ] } if (loc.startsWith('/instructor')) { - navigate('/instructor/:exerciseId/:teamId/file/:fileId', { - params: { exerciseId, fileId: fileInfo.id, teamId }, - }) + return [ + '/instructor/:exerciseId/:teamId/file/:fileId', + { params: { exerciseId, fileId: fileInfo.id, teamId } }, + ] } if (loc.startsWith('/analyst')) { - navigate('/analyst/:exerciseId/:teamId/file/:fileId', { - params: { exerciseId, fileId: fileInfo.id, teamId }, - }) + return [ + '/analyst/:exerciseId/:teamId/file/:fileId', + { params: { exerciseId, fileId: fileInfo.id, teamId } }, + ] + } + }, [exerciseId, fileInfo.id, loc, teamId]) + + const handleClick: MouseEventHandler = e => { + if (!isSupported || !link) { + return } + + // prevent default navigation using anchor to avoid page reload + e.preventDefault() + + /* + * this has to be done with apply to ensure type safety between + * link.to and link.params + */ + // eslint-disable-next-line prefer-spread + nav.apply(null, link) } + const supportedHref = useHref( + /* + * this has to be done with apply to ensure type safety between + * link.to and link.params + */ + isSupported && link + ? generatePath.apply(null, [link[0].toString(), link[1]?.params]) + : '.' + ) + const href = useMemo( + () => + isSupported && link + ? supportedHref + : downloadFileUrl( + host || '', + teamId, + fileInfo.id, + inInstructor ?? false + ), + [fileInfo.id, host, inInstructor, isSupported, link, supportedHref, teamId] + ) + return ( - <FileButtonComponent - onClick={handleClick} - href={ - isSupported - ? undefined - : downloadFileUrl( - host || '', - teamId, - fileInfo.id, - inInstructor ?? false - ) - } - > + <FileButtonComponent onClick={handleClick} href={href}> {fileInfo.fileName} </FileButtonComponent> ) diff --git a/frontend/src/components/Filters/index.tsx b/frontend/src/components/Filters/index.tsx index 0ea321d9e0cadaaaca7ef31d68b8f743a476a22f..e995f6e3ab276bb1c4a15295abe339bd7f043532 100644 --- a/frontend/src/components/Filters/index.tsx +++ b/frontend/src/components/Filters/index.tsx @@ -1,5 +1,12 @@ -import type { PopoverPosition } from '@blueprintjs/core' -import { Button, ButtonGroup, Divider, Popover } from '@blueprintjs/core' +import type { MaybeElement, PopoverPosition } from '@blueprintjs/core' +import { + Button, + ButtonGroup, + Classes, + Divider, + Popover, +} from '@blueprintjs/core' +import type { BlueprintIcons_16Id } from '@blueprintjs/icons/lib/esm/generated/16px/blueprint-icons-16' import { css } from '@emotion/css' import type { FC, ReactElement } from 'react' import { useState } from 'react' @@ -9,32 +16,48 @@ const sticky = css` top: 0; z-index: 10; background-color: white; - padding: 5px; + padding: 0.25rem; - .bp5-dark & { + .${Classes.DARK} & { background-color: #2f343c; } ` +const contentWrapper = css` + min-width: 18rem; + max-height: 20rem; + padding: 0 0.5rem; + overflow-y: auto; +` + interface FiltersProps { heading?: string + noWrap?: boolean content: string | ReactElement | undefined position: PopoverPosition onSelectAll: () => void onDeselectAll: () => void + fill?: boolean + disabled?: boolean + icon?: BlueprintIcons_16Id | MaybeElement } const Filters: FC<FiltersProps> = ({ - heading, + noWrap, + heading = 'Filters', content, position, onSelectAll, onDeselectAll, + fill, + disabled, + icon, }) => { const [open, setOpen] = useState(false) return ( <Popover + fill={fill} minimal position={position} content={ @@ -49,30 +72,26 @@ const Filters: FC<FiltersProps> = ({ <Divider /> </div> - <div - style={{ - minWidth: 300, - maxHeight: 300, - padding: '0 10px', - overflowY: 'auto', - }} - > - {content} - </div> + <div className={contentWrapper}>{content}</div> </div> } isOpen={open} onClose={() => setOpen(false)} > - <Button icon='filter' minimal onClick={() => setOpen(true)}> + <Button + style={{ whiteSpace: noWrap ? 'nowrap' : undefined }} + active={open} + icon={icon || 'filter'} + disabled={disabled} + alignText='left' + fill={fill} + minimal + onClick={() => setOpen(true)} + > {heading} </Button> </Popover> ) } -Filters.defaultProps = { - heading: 'Filters', -} - export default Filters diff --git a/frontend/src/components/GitVersion/index.tsx b/frontend/src/components/GitVersion/index.tsx index ec74d7f9d2c10652eb47a0de457b467ce8900d47..3db86aa36009f94c53a97463e654388ec8a8e1d8 100644 --- a/frontend/src/components/GitVersion/index.tsx +++ b/frontend/src/components/GitVersion/index.tsx @@ -2,9 +2,20 @@ import { Callout } from '@blueprintjs/core' const GitVersion = () => ( <Callout intent='none'> - <p>Commit: {import.meta.env.VITE_GIT_COMMIT_HASH}</p> - <p>Branch: {import.meta.env.VITE_GIT_BRANCH_NAME}</p> - <p>Last commit message: {import.meta.env.VITE_GIT_LAST_COMMIT_MESSAGE}</p> + {import.meta.env.VITE_GIT_COMMIT_HASH && ( + <p>Commit: {import.meta.env.VITE_GIT_COMMIT_HASH}</p> + )} + {import.meta.env.VITE_GIT_BRANCH_NAME && ( + <p>Branch: {import.meta.env.VITE_GIT_BRANCH_NAME}</p> + )} + {import.meta.env.VITE_GIT_LAST_COMMIT_MESSAGE && ( + <p>Last commit message: {import.meta.env.VITE_GIT_LAST_COMMIT_MESSAGE}</p> + )} + {import.meta.env.VITE_BUILD_NUMBER && ( + <p> + Frontend Build: <code>{import.meta.env.VITE_BUILD_NUMBER}</code> + </p> + )} </Callout> ) diff --git a/frontend/src/components/LinkButton/index.tsx b/frontend/src/components/LinkButton/index.tsx index b639af494c7b309a22418f4ddd25d7bd82d2d6a1..1941ebd093918c3a53d64fc511e30d34f628a610 100644 --- a/frontend/src/components/LinkButton/index.tsx +++ b/frontend/src/components/LinkButton/index.tsx @@ -1,27 +1,45 @@ import { useNavigate } from '@/router' -import type { ButtonProps } from '@blueprintjs/core' -import { Button } from '@blueprintjs/core' -import type { FC } from 'react' +import type { AnchorButtonProps } from '@blueprintjs/core' +import { AnchorButton } from '@blueprintjs/core' +import { type FC } from 'react' +import { generatePath, useHref } from 'react-router-dom' export type LinkType = Parameters<ReturnType<typeof useNavigate>> export interface LinkButtonProps { - link: LinkType - button: ButtonProps + link?: LinkType + button: AnchorButtonProps } const LinkButton: FC<LinkButtonProps> = ({ link, button }) => { const nav = useNavigate() + const href = useHref( + /* + * this has to be done with apply to ensure type safety between + * link.to and link.params + */ + link ? generatePath.apply(null, [link[0].toString(), link[1]?.params]) : '.' + ) + return ( - <Button + <AnchorButton {...button} - onClick={event => { - button.onClick?.(event) + href={link ? href : undefined} + onClick={e => { + button.onClick?.(e) + + if (link) { + // prevent default navigation using anchor to avoid page reload + e.preventDefault() - // prefer-spread is broken in TS, so we have to use apply - // eslint-disable-next-line prefer-spread - nav.apply(null, link) + /* + * this has to be done with apply to ensure type safety between + * link.to and link.params + */ + // eslint-disable-next-line prefer-spread + nav.apply(null, link) + } }} /> ) diff --git a/frontend/src/components/Navbar/UserTitle.tsx b/frontend/src/components/Navbar/UserTitle.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9561e0724a5cd7406d380b61cccf010867e6b486 --- /dev/null +++ b/frontend/src/components/Navbar/UserTitle.tsx @@ -0,0 +1,43 @@ +import useHandleLogout from '@/logic/Login/useHandleLogout' +import { Button } from '@blueprintjs/core' +import usePopoverElement from '@inject/shared/popover/usePopoverElement' +import { useState, type FC } from 'react' + +interface UserTitleProps { + username: string +} + +const UserTitle: FC<UserTitleProps> = ({ username }) => { + const handleLogout = useHandleLogout() + + const [open, setOpen] = useState(false) + + const { children, getReferenceProps, setReference } = usePopoverElement({ + open, + setOpen, + placement: 'top', + children: ( + <Button intent='danger' icon='log-out' onClick={handleLogout}> + Logout + </Button> + ), + }) + + return ( + <> + <Button + ref={setReference} + icon='user' + active={open} + minimal + onClick={() => setOpen(prev => !prev)} + {...getReferenceProps} + > + {username} + </Button> + {children} + </> + ) +} + +export default UserTitle diff --git a/frontend/src/components/Navbar/index.tsx b/frontend/src/components/Navbar/index.tsx index 7f4148625c7e058242093ed0bdb87f2da80a9d8f..963edf13d35d03825b5d4d68a619f20942e33c0d 100644 --- a/frontend/src/components/Navbar/index.tsx +++ b/frontend/src/components/Navbar/index.tsx @@ -1,46 +1,63 @@ import type { LinkButtonProps } from '@/components/LinkButton' import LinkButton from '@/components/LinkButton' -import { css } from '@emotion/css' -import { useAuthIdentity } from '@inject/graphql/auth' +import { ButtonGroup, Classes, Colors, Divider } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import useAuthIdentity from '@inject/graphql/auth' +import responsiveButtonGroup from '@inject/shared/css/responsiveButtonGroup' import NotificationDropdown from '@inject/shared/notification/NotificationDropdown' +import type { FC, PropsWithChildren } from 'react' import { useMemo } from 'react' +import UserTitle from './UserTitle' -const float = css` +const wrapper = css` + height: 100%; + display: flex; + flex-direction: column; +` + +const outlet = css` + flex: 1; + overflow: auto; + + // make sure the navbar doesn't cover any toggles + @media (min-width: 40rem) { + padding-bottom: 3rem; + } +` + +const navbar = css` position: fixed; bottom: 0; right: 0; - left: 0; -` + // appear on top of buttons + z-index: 11; -const navbar = css` width: max-content; max-width: 100vw; margin-left: auto; - flex-grow: 0; - justify-content: right; + padding: 0.5rem; + display: flex; + justify-content: right; gap: 1rem; + flex-grow: 0; + white-space: nowrap; - padding: 0.5rem; - background-color: white; - border: 1px solid rgba(17, 20, 24, 0.15); - border-right: 0; - border-bottom: 0; - @media (max-width: 768px) { - .bp5-button .bp5-icon { - margin-right: 0; - } - .bp5-button-text { - display: none; - } + @media (max-width: 50rem) { + position: static; border-left: 0; justify-content: center; width: 100%; } - .bp5-dark & { - background-color: #2f343c; + border: 1px solid rgba(17, 20, 24, 0.15); + border-right: 0; + border-bottom: 0; + + background-color: ${Colors.WHITE}; + .${Classes.DARK} & { + background-color: ${Colors.DARK_GRAY3}; border-color: rgba(255, 255, 255, 0.15); } ` @@ -50,28 +67,25 @@ const superuserLinks: LinkButtonProps[] = [ link: ['/exercise-panel'], button: { icon: 'torch', - text: 'Exercise Panel', - title: 'Exercise Panel', + text: 'Exercise panel', + title: 'Exercise panel', + minimal: true, + }, + }, + { + link: ['/users'], + button: { + icon: 'people', + text: 'Users', + title: 'Users', minimal: true, }, }, - ...(!window.INJECT_NOAUTH - ? ([ - { - link: ['/users'], - button: { - icon: 'people', - text: 'Users', - title: 'Users', - minimal: true, - }, - }, - ] as LinkButtonProps[]) - : []), ] -const Navbar = () => { - const { isStaff, isSuperuser } = useAuthIdentity(!!window.INJECT_NOAUTH) +const Navbar: FC<PropsWithChildren> = ({ children }) => { + const { whoAmI, isStaff, isSuperuser } = useAuthIdentity() + const username = whoAmI?.username || '' const links: LinkButtonProps[] = useMemo( () => [ @@ -84,9 +98,7 @@ const Navbar = () => { minimal: true, }, }, - ...((isStaff || isSuperuser) && !window.INJECT_NOAUTH - ? superuserLinks - : []), + ...(isStaff || isSuperuser ? superuserLinks : []), { link: ['/settings'], button: { @@ -97,16 +109,21 @@ const Navbar = () => { }, }, ], - [isSuperuser] + [isStaff, isSuperuser] ) return ( - <div className={float}> - <div className={navbar}> - {links.map(child => ( - <LinkButton key={child.link[0] as string} {...child} /> - ))} - <NotificationDropdown placement='top' hideLabel /> + <div className={wrapper}> + <div className={outlet}>{children}</div> + <div className={cx(navbar, responsiveButtonGroup)}> + <ButtonGroup> + {links.map(child => ( + <LinkButton key={child.link?.[0].toString()} {...child} /> + ))} + <Divider /> + <NotificationDropdown placement='top' hideLabel /> + </ButtonGroup> + {username && <UserTitle username={username} />} </div> </div> ) diff --git a/frontend/src/components/Sidebar/NoBorderDivider.tsx b/frontend/src/components/Sidebar/NoBorderDivider.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8d1ec07a1a8721921e0e014ced50445bcad8341c --- /dev/null +++ b/frontend/src/components/Sidebar/NoBorderDivider.tsx @@ -0,0 +1,11 @@ +import { Divider } from '@blueprintjs/core' +import { css } from '@emotion/css' + +const divider = css` + border: 0; + margin-left: 0; +` + +const NoBorderDivider = () => <Divider className={divider} /> + +export default NoBorderDivider diff --git a/frontend/src/components/Sidebar/index.tsx b/frontend/src/components/Sidebar/index.tsx index 60f2f55bc7e490745a9b3af39484fd216eaf69e5..185843d70a61c107780178b77734f204dfe7d106 100644 --- a/frontend/src/components/Sidebar/index.tsx +++ b/frontend/src/components/Sidebar/index.tsx @@ -1,33 +1,26 @@ import { Divider } from '@blueprintjs/core' -import { css } from '@emotion/css' +import { css, cx } from '@emotion/css' import type { FC, ReactNode } from 'react' import InjectLogo from '../../assets/inject-logo.svg?react' +import NoBorderDivider from './NoBorderDivider' -const container = ( - position: 'left' | 'right' | undefined, - width: number | undefined -) => css` +const container = css` display: flex; height: 100%; - width: ${width}px; - margin-left: ${position && position === 'left' ? '4px' : '0'}; - margin-right: ${position && position === 'right' ? '4px' : '0'}; ` const sidebar = css` flex: 1; - margin: 4px 0; + margin: 0.25rem 0; overflow-y: auto; ` const sectionName = css` - margin: 0 0 0.5rem 0.5rem; - font-size: 1rem; + margin: 0 0 0.25rem 0.5rem; ` const sidebarTitle = css` - margin: 0 0 0.5rem 0.5rem; - font-size: 1.2rem; + margin: 0 0 0.25rem 0.5rem; text-align: center; ` @@ -39,10 +32,10 @@ export interface Section { interface SidebarProps { position?: 'left' | 'right' hideNames?: boolean - width?: number sections: Section[] showLogo?: boolean title?: string + className?: string } const Sidebar: FC<SidebarProps> = ({ @@ -50,11 +43,12 @@ const Sidebar: FC<SidebarProps> = ({ sections, showLogo, hideNames, - width, title, + className, }) => ( - <div className={container(position, width)}> + <div className={cx(container, ...(className ? [className] : []))}> {position === 'right' && <Divider />} + {position === 'left' && <NoBorderDivider />} <div className={sidebar}> {title && ( @@ -68,9 +62,9 @@ const Sidebar: FC<SidebarProps> = ({ <> <InjectLogo style={{ - width: '69px', + width: '5rem', height: 'auto', - padding: '5px 10px', + padding: '0.25rem 0.5rem', display: 'block', margin: 'auto', }} @@ -92,6 +86,7 @@ const Sidebar: FC<SidebarProps> = ({ </div> {position === 'left' && <Divider />} + {position === 'right' && <NoBorderDivider />} </div> ) diff --git a/frontend/src/components/SortableTable/Body.tsx b/frontend/src/components/SortableTable/Body.tsx new file mode 100644 index 0000000000000000000000000000000000000000..9a63e11543fa1443f48672e630497f032f409c9e --- /dev/null +++ b/frontend/src/components/SortableTable/Body.tsx @@ -0,0 +1,117 @@ +import { + ellipsized, + highlighted, + highlightedOnActive, + highlightedOnHover, +} from '@/analyst/utilities' +import { Checkbox, NonIdealState, Spinner } from '@blueprintjs/core' +import { cx } from '@emotion/css' +import { useCallback, type FC } from 'react' +import { checkbox, clickable, preWrappedOnHover, tableCell } from './classes' +import type { Row, SelectingRow, ValueType } from './typing' +import { SortingFunction } from './typing' +import { ascSorting, descSorting } from './utils' + +type BodyProps = { + columnsLength: number + formatValue?: (value: ValueType) => string + loading?: boolean + selectedColumnIndex: number + sortingFunction: SortingFunction[] +} & ( + | { rows: Row[]; selectingRows?: never } + | { rows?: never; selectingRows: SelectingRow[] } +) + +const Body: FC<BodyProps> = ({ + columnsLength, + rows, + selectingRows, + formatValue, + loading, + selectedColumnIndex, + sortingFunction, +}) => { + const rowClass = useCallback( + (row: Row | SelectingRow) => { + const className = cx(highlightedOnHover, row.class, { + [clickable]: row.onClick !== undefined, + [highlightedOnActive]: row.onClick !== undefined, + }) + + if (selectingRows === undefined) return className + return cx(className, { [highlighted]: (row as SelectingRow).isSelected }) + }, + [selectingRows] + ) + + const MaybeCheckbox = ({ row }: { row: Row | SelectingRow }) => { + if (selectingRows === undefined) return null + + const selectingRow = row as SelectingRow + return ( + <td className={tableCell}> + <Checkbox + className={checkbox} + checked={selectingRow.isSelected} + onChange={selectingRow.onClick} + /> + </td> + ) + } + + if (loading || rows?.length === 0 || selectingRows?.length === 0) { + return ( + <tbody> + <tr> + <td colSpan={columnsLength} className={tableCell}> + {loading ? ( + <Spinner /> + ) : ( + <NonIdealState + title='No data' + icon='low-voltage-pole' + description='There is no data to display' + /> + )} + </td> + </tr> + </tbody> + ) + } + + return ( + <tbody> + {(rows || selectingRows) + .sort((a, b) => + sortingFunction[selectedColumnIndex] === SortingFunction.ASC + ? ascSorting( + a.values[selectedColumnIndex], + b.values[selectedColumnIndex] + ) + : descSorting( + a.values[selectedColumnIndex], + b.values[selectedColumnIndex] + ) + ) + .map((row, i) => ( + <tr key={i} className={rowClass(row)} onClick={row.onClick}> + <MaybeCheckbox row={row} /> + {row.columns.map((column, j) => ( + <td + key={column.name} + className={cx(tableCell, ellipsized, preWrappedOnHover)} + style={{ + ...column.style, + ...column.valueStyle, + }} + > + {formatValue!(row.values[j])} + </td> + ))} + </tr> + ))} + </tbody> + ) +} +export default Body diff --git a/frontend/src/components/SortableTable/Head.tsx b/frontend/src/components/SortableTable/Head.tsx new file mode 100644 index 0000000000000000000000000000000000000000..d8b43356a6d33fb57c8001750562d5a9deaffa41 --- /dev/null +++ b/frontend/src/components/SortableTable/Head.tsx @@ -0,0 +1,108 @@ +import { ellipsized } from '@/analyst/utilities' +import { Checkbox, Icon } from '@blueprintjs/core' +import { cx } from '@emotion/css' +import type { Dispatch, SetStateAction } from 'react' +import { useCallback, type FC } from 'react' +import { checkbox, selectHeaderCell, sticky, tableCell } from './classes' +import type { Column } from './typing' +import { SortingFunction } from './typing' + +type HeadProps = { + columns: Omit<Column, 'display'>[] + defaultSortByColumn?: number + defaultSortingFunction?: SortingFunction + selectedColumnIndex: number + setSelectedColumnIndex: Dispatch<SetStateAction<number>> + sortingFunction: SortingFunction[] + setSortingFunction: Dispatch<SetStateAction<SortingFunction[]>> +} & ( + | { + allSelected?: never + onSelectAll?: never + onDeselectAll?: never + } + | { + allSelected: boolean + onSelectAll: () => void + onDeselectAll: () => void + } +) + +const Head: FC<HeadProps> = ({ + columns, + selectedColumnIndex, + setSelectedColumnIndex, + sortingFunction, + setSortingFunction, + allSelected, + onSelectAll, + onDeselectAll, +}) => { + const handleClick = useCallback( + (index: number) => { + if (selectedColumnIndex === index) { + setSortingFunction(prev => [ + ...prev.slice(0, index), + prev[index] === SortingFunction.ASC + ? SortingFunction.DESC + : SortingFunction.ASC, + ...prev.slice(index + 1, prev.length), + ]) + } else { + setSelectedColumnIndex(index) + } + }, + [selectedColumnIndex, setSelectedColumnIndex, setSortingFunction] + ) + + return ( + <thead> + <tr> + {onSelectAll && ( + <th className={cx(sticky, tableCell, selectHeaderCell)}> + <Checkbox + className={checkbox} + checked={allSelected} + onChange={allSelected ? onDeselectAll : onSelectAll} + /> + </th> + )} + {columns.map((column, i) => ( + <th + key={column.name} + className={cx(sticky, tableCell, ellipsized)} + style={column.style} + title={column.name} + > + <div + className={ellipsized} + style={{ display: 'flex', justifyContent: 'space-between' }} + > + <div className={ellipsized} title={column.name}> + {column.name} + </div> + <Icon + icon={ + sortingFunction[i] === SortingFunction.ASC + ? 'arrow-up' + : 'arrow-down' + } + color={ + selectedColumnIndex === i + ? 'rgb(95, 107, 124)' + : 'rgba(95, 107, 124, 0.5)' + } + style={{ cursor: 'pointer' }} + size={18} + onClick={() => { + handleClick(i) + }} + /> + </div> + </th> + ))} + </tr> + </thead> + ) +} +export default Head diff --git a/frontend/src/components/SortableTable/classes.ts b/frontend/src/components/SortableTable/classes.ts new file mode 100644 index 0000000000000000000000000000000000000000..c8ea949538ecd1e91e40338dd43fc64ab0824adc --- /dev/null +++ b/frontend/src/components/SortableTable/classes.ts @@ -0,0 +1,38 @@ +import { Classes, Colors } from '@blueprintjs/core' +import { css } from '@emotion/css' + +export const tableCell = css` + padding: 0.5rem 1rem; + vertical-align: text-top; +` + +export const selectHeaderCell = css` + width: calc(2rem + 16px); +` + +export const checkbox = css` + margin: 0; + padding: 0; +` + +export const sticky = css` + z-index: 1; + position: sticky; + top: 0; + background-color: ${Colors.WHITE}; + + .${Classes.DARK} & { + background-color: ${Colors.DARK_GRAY4}; + } +` + +export const preWrappedOnHover = css` + &:hover { + overflow: visible; + white-space: pre-wrap; + } +` + +export const clickable = css` + cursor: pointer; +` diff --git a/frontend/src/components/SortableTable/index.tsx b/frontend/src/components/SortableTable/index.tsx index 458ef101383f318bf3de90eead5429f8e2671f79..20695dac287ce8b1925cf3ee8ecd17be4a090ac9 100644 --- a/frontend/src/components/SortableTable/index.tsx +++ b/frontend/src/components/SortableTable/index.tsx @@ -1,91 +1,59 @@ -import { ellipsized, highlightedOnHover } from '@/analyst/utilities' -import { Icon } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { CSSProperties, FC } from 'react' -import { useState } from 'react' - -const tableCell = css` - padding: 8px 16px; - vertical-align: text-top; -` - -const sticky = css` - position: sticky; - top: 0; - background-color: white; - - .bp5-dark & { - background-color: #2f343c; - } -` - -const preWrappedOnHover = css` - &:hover { - overflow: visible; - white-space: pre-wrap; - } -` - -export type ValueType = string | number | Date | null - -export interface Column { - name: string - style: CSSProperties | undefined - valueStyle?: CSSProperties | undefined -} - -export interface Row { +import type { FC } from 'react' +import { useMemo, useState } from 'react' +import Body from './Body' +import Head from './Head' +import type { Column, Row, SelectingRow, ValueType } from './typing' +import { SortingFunction } from './typing' +import { defaultFormatValue } from './utils' + +type SortableTableProps = { columns: Column[] - values: ValueType[] - onClick?: () => void - class?: string | undefined -} - -export enum SortingFunction { - ASC, - DESC, -} - -interface SortableTableProps { - columns: Column[] - rows: Row[] - formatValue?: (value: ValueType) => string sortByColumn?: number defaultSortingFunction?: SortingFunction -} - -const ascSorting = (a: ValueType, b: ValueType) => { - if (a === null && b === null) return 0 - if (a === null) return 1 - if (b === null) return -1 - - if (typeof a === 'string' || typeof b === 'string') { - return a - .toString() - .toLocaleLowerCase() - .localeCompare(b.toString().toLocaleLowerCase()) - } - - if (a < b) return -1 - if (a > b) return 1 - return 0 -} -const descSorting = (a: ValueType, b: ValueType) => -ascSorting(a, b) + className?: string + loading?: boolean +} & ( + | { + rows: Row[] + allSelected?: never + onSelectAll?: never + onDeselectAll?: never + } + | { + rows: SelectingRow[] + allSelected: boolean + onSelectAll: () => void + onDeselectAll: () => void + } +) const SortableTable: FC<SortableTableProps> = ({ - columns, + columns: columnsUnfiltered, rows, - formatValue, - sortByColumn: defaultSortByColumn, - defaultSortingFunction, + formatValue = defaultFormatValue, + sortByColumn: defaultSortByColumn = 0, + defaultSortingFunction = SortingFunction.ASC, + className, + loading, + allSelected, + onSelectAll, + onDeselectAll, }) => { - const sortByColumn = - defaultSortByColumn && - defaultSortByColumn >= 0 && - defaultSortByColumn < columns.length - ? defaultSortByColumn - : 0 + const columns = useMemo( + () => columnsUnfiltered.filter(column => column.display !== false), + [columnsUnfiltered] + ) + + const sortByColumn = useMemo( + () => + defaultSortByColumn && + defaultSortByColumn >= 0 && + defaultSortByColumn < columns.length + ? defaultSortByColumn + : 0, + [columns.length, defaultSortByColumn] + ) const [selectedColumnIndex, setSelectedColumnIndex] = useState(sortByColumn) const [sortingFunction, setSortingFunction] = useState<SortingFunction[]>( @@ -96,19 +64,18 @@ const SortableTable: FC<SortableTableProps> = ({ ) ) - const handleClick = (index: number) => { - if (selectedColumnIndex === index) { - setSortingFunction(prev => [ - ...prev.slice(0, index), - prev[index] === SortingFunction.ASC - ? SortingFunction.DESC - : SortingFunction.ASC, - ...prev.slice(index + 1, prev.length), - ]) - } else { - setSelectedColumnIndex(index) - } - } + // can't do this directly in the props because of a false-positive TS error + const selectingHeadProps = useMemo( + () => + allSelected !== undefined + ? { allSelected, onSelectAll, onDeselectAll } + : {}, + [allSelected, onDeselectAll, onSelectAll] + ) + const selectingBodyProps = useMemo( + () => (allSelected !== undefined ? { selectingRows: rows } : { rows }), + [allSelected, rows] + ) return ( <div style={{ height: '100%', overflowY: 'auto' }}> @@ -118,95 +85,27 @@ const SortableTable: FC<SortableTableProps> = ({ tableLayout: 'fixed', width: '100%', }} + className={className} > - <thead> - <tr> - {columns.map((column, i) => ( - <th - key={column.name} - className={`${sticky} ${tableCell} ${ellipsized}`} - style={column.style} - title={column.name} - > - <div - className={ellipsized} - style={{ display: 'flex', justifyContent: 'space-between' }} - > - <div className={ellipsized} title={column.name}> - {column.name} - </div> - <Icon - icon={ - sortingFunction[i] === SortingFunction.ASC - ? 'arrow-up' - : 'arrow-down' - } - color={ - selectedColumnIndex === i - ? 'rgb(95, 107, 124)' - : 'rgba(95, 107, 124, 0.5)' - } - style={{ cursor: 'pointer' }} - size={18} - onClick={() => { - handleClick(i) - }} - /> - </div> - </th> - ))} - </tr> - </thead> - <tbody> - {rows - .sort((a, b) => - sortingFunction[selectedColumnIndex] === SortingFunction.ASC - ? ascSorting( - a.values[selectedColumnIndex], - b.values[selectedColumnIndex] - ) - : descSorting( - a.values[selectedColumnIndex], - b.values[selectedColumnIndex] - ) - ) - .map((row, i) => ( - <tr - key={i} - className={`${highlightedOnHover} ${row.class}`} - onClick={row.onClick} - > - {row.columns.map((column, j) => ( - <td - key={column.name} - className={`${tableCell} ${ellipsized} ${preWrappedOnHover}`} - style={{ - ...column.style, - ...column.valueStyle, - }} - > - {formatValue!(row.values[j])} - </td> - ))} - </tr> - ))} - </tbody> + <Head + columns={columns} + selectedColumnIndex={selectedColumnIndex} + setSelectedColumnIndex={setSelectedColumnIndex} + sortingFunction={sortingFunction} + setSortingFunction={setSortingFunction} + {...selectingHeadProps} + /> + <Body + columnsLength={columns.length} + selectedColumnIndex={selectedColumnIndex} + sortingFunction={sortingFunction} + formatValue={formatValue} + loading={loading} + {...selectingBodyProps} + /> </table> </div> ) } -const defaultFormatValue = (value: ValueType) => { - if (value === null) return '' - if (typeof value === 'string') return value - if (typeof value === 'number') return value.toString() - return `${value.toLocaleDateString()}, ${value.toLocaleTimeString()}` -} - -SortableTable.defaultProps = { - formatValue: defaultFormatValue, - sortByColumn: 0, - defaultSortingFunction: SortingFunction.ASC, -} - export default SortableTable diff --git a/frontend/src/components/SortableTable/typing.ts b/frontend/src/components/SortableTable/typing.ts new file mode 100644 index 0000000000000000000000000000000000000000..de1d69ead974433c1c1d3c9aa0348edd64acc866 --- /dev/null +++ b/frontend/src/components/SortableTable/typing.ts @@ -0,0 +1,27 @@ +import type { CSSProperties } from 'react' + +export type ValueType = string | number | boolean | Date | null + +export interface Column { + name: string + display?: boolean + style: CSSProperties | undefined + valueStyle?: CSSProperties | undefined +} + +export interface Row { + columns: Column[] + values: ValueType[] + onClick?: () => void + class?: string | undefined +} + +export interface SelectingRow extends Row { + isSelected: boolean + onClick: () => void +} + +export enum SortingFunction { + ASC, + DESC, +} diff --git a/frontend/src/components/SortableTable/utils.ts b/frontend/src/components/SortableTable/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..5cc420239f87e38880eb59c1aa00a78a8b42592d --- /dev/null +++ b/frontend/src/components/SortableTable/utils.ts @@ -0,0 +1,34 @@ +import type { ValueType } from './typing' + +export const ascSorting = (a: ValueType, b: ValueType) => { + if (a === null && b === null) return 0 + if (a === null) return 1 + if (b === null) return -1 + + if (typeof a === 'string' || typeof b === 'string') { + return a + .toString() + .toLocaleLowerCase() + .localeCompare(b.toString().toLocaleLowerCase()) + } + + if (typeof a === 'boolean' && typeof b === 'boolean') { + if (a === b) return 0 + if (b) return 1 + return -1 + } + + if (a < b) return -1 + if (a > b) return 1 + return 0 +} + +export const descSorting = (a: ValueType, b: ValueType) => -ascSorting(a, b) + +export const defaultFormatValue = (value: ValueType) => { + if (value === null) return '' + if (typeof value === 'string') return value + if (typeof value === 'number') return value.toString() + if (typeof value === 'boolean') return value ? 'yes' : 'no' + return `${value.toISOString().substring(0, 10)} ${value.toLocaleTimeString()}` +} diff --git a/frontend/src/components/Status/index.tsx b/frontend/src/components/Status/index.tsx index c515738e2c4d30e3856fcdbe372c6c83314c1b28..0549b14774a2d8b9df2d8e4da0159aea9cf6b25e 100644 --- a/frontend/src/components/Status/index.tsx +++ b/frontend/src/components/Status/index.tsx @@ -6,7 +6,7 @@ import type { FC } from 'react' import TeamLabel from '../TeamLabel' const header = css` - padding: 5px 10px; + padding: 0.25rem 0.5rem; display: flex; gap: 0.5rem; justify-content: center; diff --git a/frontend/src/components/TeamLabel/index.tsx b/frontend/src/components/TeamLabel/index.tsx index 6557d8ab24690b01809a9b87f2e520ad31056cf9..79f4b2b61a278b144c42b5b57f058bb0694dd1bf 100644 --- a/frontend/src/components/TeamLabel/index.tsx +++ b/frontend/src/components/TeamLabel/index.tsx @@ -40,8 +40,10 @@ const TeamLabel: FC<TeamLabelProps> = ({ () => ( <ColorBox style={{ + // the size of Blueprint icons width: '16px', height: '16px', + // TODO: this should be the same as the margin of an icon in a button marginRight: hideLabel ? undefined : '7px', }} id={Number(teamId)} diff --git a/frontend/src/email/EmailContactSelector/index.tsx b/frontend/src/email/EmailContactSelector/index.tsx index 430e86bb34dc29b3f981fd079cd8f8d050c1a191..208e586133e115a8e742c4422087fe32860177b0 100644 --- a/frontend/src/email/EmailContactSelector/index.tsx +++ b/frontend/src/email/EmailContactSelector/index.tsx @@ -1,30 +1,41 @@ -import { MenuItem, Tooltip } from '@blueprintjs/core' +import { Icon, MenuItem, Tooltip } from '@blueprintjs/core' import type { ItemRenderer } from '@blueprintjs/select' import { MultiSelect } from '@blueprintjs/select' import type { EmailParticipant } from '@inject/graphql/fragments/EmailParticipant.generated' import { useValidateEmailAddressLazyQuery } from '@inject/graphql/queries/ValidateEmailAddress.generated' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import type { Dispatch, FC, MouseEventHandler, SetStateAction } from 'react' -import { memo, useCallback, useMemo } from 'react' +import { useCallback, useMemo } from 'react' import type { ExtendedItemRenderer } from '../typing' interface EmailContactSelectorProps { emailContacts: EmailParticipant[] - senderAddress?: string | undefined selectedContacts: string[] setSelectedContacts: Dispatch<SetStateAction<string[]>> inInstructor: boolean exerciseId: string + placeholder?: string + teamAddress?: string } +// TODO: add custom tag renderer not to render the "x" button for team address const EmailContactSelector: FC<EmailContactSelectorProps> = ({ + placeholder, emailContacts, - selectedContacts, - senderAddress, + selectedContacts: initialSelectedContacts, setSelectedContacts, inInstructor, exerciseId, + teamAddress, }) => { + const selectedContacts = useMemo( + () => + teamAddress + ? [teamAddress, ...initialSelectedContacts] + : initialSelectedContacts, + [initialSelectedContacts, teamAddress] + ) + const suggestedItems = useMemo( () => emailContacts.map(x => x?.address || '') || [], [emailContacts] @@ -37,7 +48,6 @@ const EmailContactSelector: FC<EmailContactSelectorProps> = ({ const itemRenderer: ExtendedItemRenderer<string> = useCallback( (i, { handleClick, handleFocus, modifiers, hasTooltip }) => ( <MenuItem - icon={hasTooltip ? 'small-info-sign' : undefined} active={modifiers.active} disabled={modifiers.disabled} onClick={handleClick} @@ -45,7 +55,15 @@ const EmailContactSelector: FC<EmailContactSelectorProps> = ({ roleStructure='listoption' selected={selectedContacts.includes(i)} shouldDismissPopover={false} - text={i} + text={ + <div> + <Icon + icon='small-info-sign' + style={{ visibility: hasTooltip ? undefined : 'hidden' }} + /> + {i} + </div> + } key={i} /> ), @@ -70,8 +88,8 @@ const EmailContactSelector: FC<EmailContactSelectorProps> = ({ ) const itemDisabled = useCallback( - (i: string) => i === senderAddress || selectedContacts.includes(i), - [selectedContacts, senderAddress] + (i: string) => i === teamAddress, + [teamAddress] ) const onItemSelect = useCallback( async (i: string) => { @@ -125,7 +143,7 @@ const EmailContactSelector: FC<EmailContactSelectorProps> = ({ return ( <MultiSelect<string> - placeholder='Recipients' + placeholder={placeholder} itemRenderer={inInstructor ? instructorItemRenderer : itemRenderer} items={suggestedItems} itemDisabled={itemDisabled} @@ -147,14 +165,4 @@ const EmailContactSelector: FC<EmailContactSelectorProps> = ({ ) } -EmailContactSelector.defaultProps = { - senderAddress: undefined, -} - -export default memo( - EmailContactSelector, - (prev, next) => - prev.emailContacts === next.emailContacts && - prev.selectedContacts === next.selectedContacts && - prev.senderAddress === next.senderAddress -) +export default EmailContactSelector diff --git a/frontend/src/email/EmailForm/InstructorEmailForm.tsx b/frontend/src/email/EmailForm/InstructorEmailForm.tsx index 87b05e1c71d33c1c8fbe97d2670f5e05b7773e2d..c5cc055f853eeaeecb630214f8fa464b6f6f4215 100644 --- a/frontend/src/email/EmailForm/InstructorEmailForm.tsx +++ b/frontend/src/email/EmailForm/InstructorEmailForm.tsx @@ -12,7 +12,7 @@ import type { FC } from 'react' import { memo, useCallback, useMemo } from 'react' import { MainDrawer } from './css' import HeaderArea from './modules/HeaderArea' -import type { EmailFormProps } from './typing' +import type { EmailFormProps, OnSendEmailInput } from './typing' import useThreadSubmission from './useThreadSubmission' const footer = css` @@ -42,6 +42,8 @@ const InstructorEmailForm: FC<EmailFormProps> = ({ setSenderAddress, selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, template, @@ -54,11 +56,16 @@ const InstructorEmailForm: FC<EmailFormProps> = ({ const { onSend } = useThreadSubmission({ ...(emailThread ? { existingThreadId: emailThread.id } - : { participantAddresses: selectedContacts, subject }), + : { + participantAddresses: selectedContacts, + subject, + bccAddresses: bccSelectedContacts, + }), exerciseId, + senderAddress, content, fileId: fileInfo?.id, - onSendEmail: threadId => { + onSendEmail: ({ threadId, allowActivateMilestone }: OnSendEmailInput) => { sendEmailMutate({ variables: { sendEmailInput: { @@ -66,15 +73,23 @@ const InstructorEmailForm: FC<EmailFormProps> = ({ senderAddress, content, fileId: fileInfo?.id, - activateMilestone, - deactivateMilestone, + activateMilestone: allowActivateMilestone + ? activateMilestone + : undefined, + deactivateMilestone: allowActivateMilestone + ? deactivateMilestone + : undefined, }, }, onCompleted: () => { - discardDraft(false) - notify('Email sent successfully') + discardDraft() onSuccess() }, + onError: err => { + notify(err.message, { + intent: 'danger', + }) + }, }) }, }) @@ -124,7 +139,7 @@ const InstructorEmailForm: FC<EmailFormProps> = ({ ) const onDiscard = useCallback(() => { - discardDraft(true) + discardDraft() onSuccess() }, [discardDraft, onSuccess]) @@ -147,6 +162,8 @@ const InstructorEmailForm: FC<EmailFormProps> = ({ : { selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, })} diff --git a/frontend/src/email/EmailForm/TraineeEmailForm.tsx b/frontend/src/email/EmailForm/TraineeEmailForm.tsx index 1f108c38ec1363e39a664a47b59e7d7e73f585c1..664f19a75a68fc20f56c75e7234051886bf00bf4 100644 --- a/frontend/src/email/EmailForm/TraineeEmailForm.tsx +++ b/frontend/src/email/EmailForm/TraineeEmailForm.tsx @@ -10,7 +10,7 @@ import type { FC } from 'react' import { memo, useCallback } from 'react' import { MainDrawer } from './css' import HeaderArea from './modules/HeaderArea' -import type { EmailFormProps } from './typing' +import type { EmailFormProps, OnSendEmailInput } from './typing' import useThreadSubmission from './useThreadSubmission' const footer = css` @@ -35,6 +35,8 @@ const TraineeEmailForm: FC<EmailFormProps> = ({ storeDraft, selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, }, @@ -48,11 +50,13 @@ const TraineeEmailForm: FC<EmailFormProps> = ({ : { participantAddresses: [...selectedContacts, senderAddress], subject, + bccAddresses: bccSelectedContacts, }), exerciseId, + senderAddress, content, fileId: fileInfo?.id, - onSendEmail: threadId => { + onSendEmail: ({ threadId }: OnSendEmailInput) => { sendEmailMutate({ variables: { sendEmailInput: { @@ -63,10 +67,14 @@ const TraineeEmailForm: FC<EmailFormProps> = ({ }, }, onCompleted: () => { - discardDraft(false) - notify('Email sent successfully') + discardDraft() onSuccess() }, + onError: err => { + notify(err.message, { + intent: 'danger', + }) + }, }) }, }) @@ -81,7 +89,7 @@ const TraineeEmailForm: FC<EmailFormProps> = ({ const traineeList = (emailContacts?.emailContacts || []).filter(notEmpty) const onDiscard = useCallback(() => { - discardDraft(true) + discardDraft() onSuccess() }, [discardDraft, onSuccess]) @@ -100,11 +108,13 @@ const TraineeEmailForm: FC<EmailFormProps> = ({ : { selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, })} contacts={traineeList} - senderAddress={senderAddress} + teamAddress={senderAddress} exerciseId={exerciseId} /> <Divider style={{ margin: '0.5rem 0' }} /> diff --git a/frontend/src/email/EmailForm/css.ts b/frontend/src/email/EmailForm/css.ts index 68afe66e5a87ded948954791ed93f447575c7057..c64136e32e8f9985465a84761c668e5ac04da4fb 100644 --- a/frontend/src/email/EmailForm/css.ts +++ b/frontend/src/email/EmailForm/css.ts @@ -1,7 +1,7 @@ import { css } from '@emotion/css' export const MainDrawer = css` - height: 100%; + width: 100%; padding: 0.5rem 1rem; display: flex; flex-direction: column; diff --git a/frontend/src/email/EmailForm/modules/HeaderArea.tsx b/frontend/src/email/EmailForm/modules/HeaderArea.tsx index ad112c68a30b44a96013049e2145548550ae4912..539370b2affb8da09bb298700e68656ad7a41c2b 100644 --- a/frontend/src/email/EmailForm/modules/HeaderArea.tsx +++ b/frontend/src/email/EmailForm/modules/HeaderArea.tsx @@ -1,7 +1,7 @@ import EmailContactSelector from '@/email/EmailContactSelector' import EmailTemplates from '@/email/EmailTemplates' import SenderSelector from '@/email/SenderSelector' -import { InputGroup } from '@blueprintjs/core' +import { Button, InputGroup } from '@blueprintjs/core' import { css } from '@emotion/css' import type { EmailParticipant } from '@inject/graphql/fragments/EmailParticipant.generated' import type { EmailTemplate } from '@inject/graphql/fragments/EmailTemplate.generated' @@ -9,19 +9,26 @@ import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generate import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' import notEmpty from '@inject/shared/utils/notEmpty' import type { Dispatch, FC, SetStateAction } from 'react' -import { useEffect, useMemo } from 'react' +import { useEffect, useMemo, useState } from 'react' const gridContainer = css` display: grid; grid-template-columns: auto 1fr; - grid-column-gap: 10px; + grid-column-gap: 0.5rem; ` const gridItem = css` - height: 30px; display: flex; align-items: center; - font-size: 16px; +` + +const contactSelectorWrapper = css` + width: 100%; + display: flex; +` + +const contactSelector = css` + flex: 1; ` type HeaderAreaProps = ( @@ -30,6 +37,8 @@ type HeaderAreaProps = ( emailThread?: undefined selectedContacts: string[] setSelectedContacts: Dispatch<SetStateAction<string[]>> + bccSelectedContacts: string[] + setBccSelectedContacts: Dispatch<SetStateAction<string[]>> subject: string | undefined setSubject: Dispatch<SetStateAction<string | undefined>> } @@ -38,6 +47,8 @@ type HeaderAreaProps = ( emailThread: EmailThread selectedContacts?: undefined setSelectedContacts?: undefined + bccSelectedContacts?: undefined + setBccSelectedContacts?: undefined subject?: undefined setSubject?: undefined } @@ -54,6 +65,8 @@ type HeaderAreaProps = ( template: EmailTemplate | undefined setTemplate: Dispatch<SetStateAction<EmailTemplate | undefined>> teamId: string + senderAddress: string + teamAddress?: never } | { // trainee @@ -66,9 +79,10 @@ type HeaderAreaProps = ( template?: undefined setTemplate?: undefined teamId?: undefined + senderAddress?: never + teamAddress: string } ) & { - senderAddress: string contacts: EmailParticipant[] exerciseId: string } @@ -80,6 +94,8 @@ const HeaderArea: FC<HeaderAreaProps> = ({ contacts, selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, setSenderAddress, @@ -91,15 +107,15 @@ const HeaderArea: FC<HeaderAreaProps> = ({ setTemplate, teamId, exerciseId, + teamAddress, }) => { const emailThreadParticipants = useMemo( () => (emailThread?.participants || []) .filter(notEmpty) .map(p => p.address) - .filter(x => !senderAddress || x !== senderAddress) .join(', '), - [emailThread, senderAddress] + [emailThread] ) useEffect(() => { @@ -111,6 +127,8 @@ const HeaderArea: FC<HeaderAreaProps> = ({ } }, [senderList, setSenderAddress]) + const [bccOpen, setBccOpen] = useState(false) + return ( <div className={gridContainer}> <div className={gridItem}>From:</div> @@ -122,29 +140,61 @@ const HeaderArea: FC<HeaderAreaProps> = ({ setSenderAddress={setSenderAddress} /> ) : ( - <div className={gridItem}>{senderAddress}</div> + <InputGroup readOnly value={teamAddress} /> )} - <div className={gridItem}>To:</div> + <div className={gridItem}>Participants:</div> {emailThread ? ( - <div className={gridItem}>{emailThreadParticipants}</div> + <InputGroup readOnly value={emailThreadParticipants} /> ) : ( - <EmailContactSelector - emailContacts={contacts} - selectedContacts={selectedContacts} - senderAddress={senderAddress} - setSelectedContacts={setSelectedContacts} - inInstructor={senderList !== undefined} - exerciseId={exerciseId} - /> + <div className={contactSelectorWrapper}> + <div className={contactSelector}> + <EmailContactSelector + placeholder='Add participants...' + emailContacts={contacts} + selectedContacts={selectedContacts} + setSelectedContacts={setSelectedContacts} + inInstructor={senderList !== undefined} + exerciseId={exerciseId} + teamAddress={teamAddress} + /> + </div> + <Button + minimal + outlined + active={bccOpen} + onClick={() => { + setBccOpen(prev => !prev) + if (!bccOpen) { + setBccSelectedContacts([]) + } + }} + > + Bcc + </Button> + </div> + )} + + {!emailThread && bccOpen && ( + <> + <div className={gridItem}>Bcc:</div> + <EmailContactSelector + placeholder='Add blind copy recipients...' + emailContacts={contacts} + selectedContacts={bccSelectedContacts} + setSelectedContacts={setBccSelectedContacts} + inInstructor={senderList !== undefined} + exerciseId={exerciseId} + /> + </> )} <div className={gridItem}>Subject:</div> {emailThread ? ( - <div className={gridItem}>{emailThread.subject}</div> + <InputGroup readOnly value={emailThread.subject} /> ) : ( <InputGroup - placeholder='Subject' + placeholder='Add a subject...' value={subject || ''} onChange={event => setSubject(event.currentTarget.value)} /> diff --git a/frontend/src/email/EmailForm/typing.ts b/frontend/src/email/EmailForm/typing.ts index 7a22a3187708e055ee57bd1c4b762ddd9058c07d..95ae1b3d2eb251867e8be99fb8bd91aa16d39ccb 100644 --- a/frontend/src/email/EmailForm/typing.ts +++ b/frontend/src/email/EmailForm/typing.ts @@ -8,3 +8,8 @@ export type EmailFormProps = { onSuccess: () => void formState: FormState } + +export type OnSendEmailInput = { + threadId: string + allowActivateMilestone: boolean +} diff --git a/frontend/src/email/EmailForm/useFormState.ts b/frontend/src/email/EmailForm/useFormState.ts index 7ce4808701aac6b28082d8b22aef99f389c9e5ba..265ae30c7004d9be36b65f0103f02c48b70025c4 100644 --- a/frontend/src/email/EmailForm/useFormState.ts +++ b/frontend/src/email/EmailForm/useFormState.ts @@ -1,9 +1,11 @@ import type { EmailTemplate } from '@inject/graphql/fragments/EmailTemplate.generated' import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' -import { useWriteEmailDraft } from '@inject/graphql/mutations/clientonly/WriteEmailDraft.generated' +import { useDeleteEmailDraft } from '@inject/graphql/mutations/clientonly/DeleteEmailDraft.generated' +import { useSetEmailDraft } from '@inject/graphql/mutations/clientonly/SetEmailDraft.generated' import { useGetEmailTemplateLazyQuery } from '@inject/graphql/queries/GetEmailTemplate.generated' import { useGetFileInfoLazyQuery } from '@inject/graphql/queries/GetFileInfo.generated' -import { useReturnLocalEmailDraftLazyQuery } from '@inject/graphql/queries/clientonly/ReturnLocalEmailDraft.generated' +import { useGetEmailDraftLazyQuery } from '@inject/graphql/queries/clientonly/GetEmailDraft.generated' +import { GetEmailDraftsDocument } from '@inject/graphql/queries/clientonly/GetEmailDrafts.generated' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import notEmpty from '@inject/shared/utils/notEmpty' import type { Dispatch, SetStateAction } from 'react' @@ -14,6 +16,7 @@ export interface FormStateInput { emailThreadId: string | undefined senderAddress?: string selectedContacts?: string[] + bccSelectedContacts?: string[] subject?: string | undefined template?: EmailTemplate | undefined activateMilestone?: string @@ -27,6 +30,8 @@ export interface FormState { setSenderAddress: Dispatch<SetStateAction<string>> selectedContacts: string[] setSelectedContacts: Dispatch<SetStateAction<string[]>> + bccSelectedContacts: string[] + setBccSelectedContacts: Dispatch<SetStateAction<string[]>> subject: string | undefined setSubject: Dispatch<SetStateAction<string | undefined>> template: EmailTemplate | undefined @@ -40,7 +45,7 @@ export interface FormState { fileInfo: FileInfo | undefined setFileInfo: Dispatch<SetStateAction<FileInfo | undefined>> storeDraft: () => void - discardDraft: (notifyOnSuccess: boolean) => void + discardDraft: () => void reload: (input: FormStateInput) => void } @@ -54,10 +59,10 @@ const useFormState = ({ teamAddress?: string }): FormState => { const [emailThreadId, setEmailThreadId] = useState<string | undefined>() - const [loadDraft, setLoadDraft] = useState<boolean>() const [senderAddress, setSenderAddress] = useState<string>(teamAddress || '') const [selectedContacts, setSelectedContacts] = useState<string[]>([]) + const [bccSelectedContacts, setBccSelectedContacts] = useState<string[]>([]) const [subject, setSubject] = useState<string | undefined>() const [template, setTemplate] = useState<EmailTemplate>() @@ -69,8 +74,9 @@ const useFormState = ({ const { notify } = useNotifyContext() - const [draftMutate] = useWriteEmailDraft() - const [getDraft] = useReturnLocalEmailDraftLazyQuery() + const [getDraft] = useGetEmailDraftLazyQuery() + const [setDraft] = useSetEmailDraft() + const [deleteDraft] = useDeleteEmailDraft() const [getFileInfo] = useGetFileInfoLazyQuery() const [getTemplate] = useGetEmailTemplateLazyQuery() @@ -83,8 +89,9 @@ const useFormState = ({ instructor: inInstructor, emailThreadId: emailThreadId || null, }, + fetchPolicy: 'no-cache', onCompleted: data => { - const draft = data?.returnLocalEmailDraft + const draft = data?.getEmailDraft if (!draft) { return } @@ -133,15 +140,16 @@ const useFormState = ({ deactivateMilestone, fileInfo, selectedContacts, + bccSelectedContacts, senderAddress, subject, template, }: FormStateInput) => { - setLoadDraft(loadDraft) setEmailThreadId(emailThreadId) setSenderAddress(senderAddress || teamAddress || '') setSelectedContacts(selectedContacts || []) + setBccSelectedContacts(bccSelectedContacts || []) setSubject(subject) setTemplate(template) setActivateMilestone(activateMilestone || '') @@ -157,7 +165,7 @@ const useFormState = ({ ) const storeDraft = () => { - draftMutate({ + setDraft({ variables: { emailDraft: { teamId, @@ -173,15 +181,13 @@ const useFormState = ({ templateId: template?.id, }, }, - }) - .then(() => { - notify('Draft saved') - }) - .catch(err => { - notify(`Error: ${err.message}`, { + refetchQueries: [GetEmailDraftsDocument], + onError: err => { + notify(err.message, { intent: 'danger', }) - }) + }, + }) } /** @@ -189,7 +195,7 @@ const useFormState = ({ * a draft, the draft will be discarded * (currently, that means updating its values to the initial values). */ - const discardDraft = (notifyOnSuccess: boolean) => { + const discardDraft = () => { setSenderAddress(teamAddress || '') setContent('') setActivateMilestone('') @@ -199,39 +205,19 @@ const useFormState = ({ setSubject(undefined) setTemplate(undefined) - if (!loadDraft) { - notify('Draft discarded') - return - } - - // TODO: remove draft instead of updating it - draftMutate({ + deleteDraft({ variables: { - emailDraft: { - teamId, - instructor: inInstructor, - emailThreadId, - senderAddress: teamAddress || '', - content: '', - activateMilestone: '', - deactivateMilestone: '', - fileId: undefined, - selectedContacts: [], - subject: undefined, - templateId: undefined, - }, + teamId, + instructor: inInstructor, + emailThreadId: emailThreadId || null, }, - }) - .then(() => { - if (notifyOnSuccess) { - notify('Draft discarded') - } - }) - .catch(err => { - notify(`Error: ${err.message}`, { + refetchQueries: [GetEmailDraftsDocument], + onError: err => { + notify(err.message, { intent: 'danger', }) - }) + }, + }) } return { @@ -239,6 +225,8 @@ const useFormState = ({ setSenderAddress, selectedContacts, setSelectedContacts, + bccSelectedContacts, + setBccSelectedContacts, subject, setSubject, template, diff --git a/frontend/src/email/EmailForm/useThreadSubmission.ts b/frontend/src/email/EmailForm/useThreadSubmission.ts index a19d99d8b81381448725a4f2729a50da5ba5954c..d25a23624d221dec792445fbbc575e3e69f14025 100644 --- a/frontend/src/email/EmailForm/useThreadSubmission.ts +++ b/frontend/src/email/EmailForm/useThreadSubmission.ts @@ -1,12 +1,14 @@ import { useCreateThread } from '@inject/graphql/mutations/CreateThread.generated' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import { useCallback } from 'react' +import type { OnSendEmailInput } from './typing' type ThreadSubmissionProps = ( | { // existing thread existingThreadId: string participantAddresses?: undefined + bccAddresses?: undefined subject?: undefined } | { @@ -14,18 +16,22 @@ type ThreadSubmissionProps = ( existingThreadId?: undefined participantAddresses: string[] subject: string | undefined + bccAddresses?: string[] } ) & { exerciseId: string content?: string fileId?: string - onSendEmail: (threadId: string) => void + senderAddress: string + onSendEmail: (input: OnSendEmailInput) => void } const useThreadSubmission = ({ exerciseId, existingThreadId, participantAddresses, + senderAddress, + bccAddresses, subject, onSendEmail, content, @@ -35,53 +41,86 @@ const useThreadSubmission = ({ const { notify } = useNotifyContext() const onSend = useCallback(async () => { - if (!content && !fileId) { - notify('Add a message or an attachment', { - intent: 'danger', - }) - return - } - - let threadId: string - if (existingThreadId === undefined) { - if (participantAddresses.length === 0) { - notify('Select at least one recipient', { + if (participantAddresses.length < 2) { + notify('Select at least two participants', { intent: 'danger', }) return } - if (!subject) { notify('Add a subject', { intent: 'danger', }) return } + } - const thread = await createThread({ - variables: { - exerciseId, - participantAddresses, - subject, - }, - onError: err => { - notify(`Error: ${err.message}`, { - intent: 'danger', - }) - }, + if (!senderAddress) { + notify('Select a sender', { + intent: 'danger', }) - if (!thread) { - return - } + return + } + if (!content && !fileId) { + notify('Add a message or an attachment', { + intent: 'danger', + }) + return + } - threadId = thread.data?.createThread?.thread?.id || '' - } else { - threadId = existingThreadId + if (existingThreadId !== undefined) { + onSendEmail({ threadId: existingThreadId, allowActivateMilestone: true }) + return } - onSendEmail(threadId) + await createThread({ + variables: { + exerciseId, + participantAddresses, + // false positive TS error + subject: subject || '', + }, + onError: err => { + notify(err.message, { + intent: 'danger', + }) + }, + onCompleted: data => { + onSendEmail({ + threadId: data.createThread?.thread?.id || '', + allowActivateMilestone: true, + }) + + if (!bccAddresses) { + return + } + + bccAddresses.forEach(async bccAddress => { + await createThread({ + variables: { + exerciseId, + participantAddresses: [bccAddress, senderAddress], + // false positive TS error + subject: subject || '', + }, + onError: err => { + notify(err.message, { + intent: 'danger', + }) + }, + onCompleted: data => { + onSendEmail({ + threadId: data.createThread?.thread?.id || '', + allowActivateMilestone: false, + }) + }, + }) + }) + }, + }) }, [ + bccAddresses, content, createThread, exerciseId, @@ -90,6 +129,7 @@ const useThreadSubmission = ({ notify, onSendEmail, participantAddresses, + senderAddress, subject, ]) diff --git a/frontend/src/email/EmailFormOverlay/index.tsx b/frontend/src/email/EmailFormOverlay/index.tsx index 8fb163816edb62232d8852f40be9927064cc97c4..583f94e576f6aeaf55083570e45f11bf25a26515 100644 --- a/frontend/src/email/EmailFormOverlay/index.tsx +++ b/frontend/src/email/EmailFormOverlay/index.tsx @@ -1,21 +1,50 @@ -import { Button, Card, Overlay2 } from '@blueprintjs/core' -import { css } from '@emotion/css' +import { Button, ButtonGroup, Card, Overlay2 } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' +import { maximizedDialog } from '@inject/shared/css/dialog' import type { FC } from 'react' import { useCallback, useEffect, useState } from 'react' import InstructorEmailForm from '../EmailForm/InstructorEmailForm' import TraineeEmailForm from '../EmailForm/TraineeEmailForm' import useFormState from '../EmailForm/useFormState' +const header = css` + display: flex; + gap: 1rem; + align-items: center; + justify-content: space-between; +` + +const headerText = css` + margin-left: 0.5rem; +` + const card = css` - height: 50vh; - width: 40vw; + min-height: 50vh; + min-width: 40vw; padding: 0 !important; display: flex; flex-direction: column; - right: 1vw; + right: 0; bottom: 0; + margin: 0 1rem; +` + +const cardMaximized = css` + right: calc(50% - min(60rem, 90vw) / 2); + bottom: calc(50% - 90vh / 2); +` + +const cardMinimized = css` + min-height: unset; + min-width: unset; +` + +const emailFormComponent = css` + overflow-y: auto; + flex: 1; + display: flex; ` export const OPEN_COMPOSE_EVENT_TYPE = 'openCompose' @@ -33,6 +62,7 @@ interface ComposeInitialValues { content?: string fileInfo?: FileInfo subject?: string + email?: string } type OpenComposeEventPayload = ComposeInitialValues | undefined @@ -49,6 +79,8 @@ const EmailFormOverlay: FC<EmailFormOverlayProps> = ({ }) => { const [open, setOpen] = useState(false) const [emailThread, setEmailThread] = useState<EmailThread | undefined>() + const [maximized, setMaximized] = useState(false) + const [minimized, setMinimized] = useState(false) const formState = useFormState({ teamAddress: emailForm === 'trainee' ? teamAddress : undefined, @@ -57,24 +89,37 @@ const EmailFormOverlay: FC<EmailFormOverlayProps> = ({ }) const { reload } = formState + const handleOpen = useCallback(() => { + setOpen(true) + setMaximized(false) + setMinimized(false) + }, []) + const handleClose = useCallback(() => { + setOpen(false) + setMaximized(false) + setMinimized(false) + }, []) + const handleOpenCompose = useCallback( (event: CustomEvent<OpenComposeEventPayload>) => { - setOpen(true) + handleOpen() setEmailThread(undefined) if (event.detail) { - const { content, fileInfo, subject } = event.detail + const { content, fileInfo, subject, email } = event.detail reload({ emailThreadId: undefined, loadDraft: false, content, fileInfo, subject, + selectedContacts: email ? [email] : undefined, }) } else { reload({ emailThreadId: undefined, loadDraft: true }) } }, + // eslint-disable-next-line react-hooks/exhaustive-deps [reload] ) useEffect(() => { @@ -92,10 +137,11 @@ const EmailFormOverlay: FC<EmailFormOverlayProps> = ({ const handleOpenReply = useCallback( (event: CustomEvent<OpenReplyEventPayload>) => { - setOpen(true) + handleOpen() setEmailThread(event.detail.emailThread) reload({ emailThreadId: event.detail.emailThread.id, loadDraft: true }) }, + // eslint-disable-next-line react-hooks/exhaustive-deps [reload] ) useEffect(() => { @@ -112,42 +158,75 @@ const EmailFormOverlay: FC<EmailFormOverlayProps> = ({ }, [handleOpenReply]) useEffect(() => { - setOpen(false) + handleClose() + // eslint-disable-next-line react-hooks/exhaustive-deps }, [teamId]) return ( <Overlay2 isOpen={open} autoFocus={false} - canEscapeKeyClose={false} - canOutsideClickClose={false} + canEscapeKeyClose={maximized} + canOutsideClickClose={maximized} enforceFocus={false} - hasBackdrop={false} + hasBackdrop={maximized} transitionDuration={0} + onClose={() => { + setMaximized(false) + }} > - <Card className={card} compact elevation={4}> - <Button - minimal - icon='cross' - style={{ marginLeft: 'auto' }} - onClick={() => setOpen(false)} - /> - {emailForm === 'trainee' ? ( - <TraineeEmailForm - onSuccess={() => setOpen(false)} - teamId={teamId} - exerciseId={exerciseId} - emailThread={emailThread} - formState={formState} - /> - ) : ( - <InstructorEmailForm - onSuccess={() => setOpen(false)} - teamId={teamId} - exerciseId={exerciseId} - emailThread={emailThread} - formState={formState} - /> + <Card + className={cx({ + [card]: true, + [cardMaximized]: maximized, + [maximizedDialog]: maximized, + [cardMinimized]: minimized, + })} + compact + elevation={4} + > + <div className={header}> + {minimized && <span className={headerText}>New email</span>} + + <ButtonGroup minimal style={{ marginLeft: 'auto' }}> + <Button + icon={minimized ? 'chevron-up' : 'minus'} + onClick={() => { + setMaximized(false) + setMinimized(prev => !prev) + }} + /> + <Button + icon={maximized ? 'minimize' : 'maximize'} + onClick={() => { + setMinimized(false) + setMaximized(prev => !prev) + }} + /> + <Button icon='cross' onClick={handleClose} /> + </ButtonGroup> + </div> + + {!minimized && ( + <div className={emailFormComponent}> + {emailForm === 'trainee' ? ( + <TraineeEmailForm + onSuccess={handleClose} + teamId={teamId} + exerciseId={exerciseId} + emailThread={emailThread} + formState={formState} + /> + ) : ( + <InstructorEmailForm + onSuccess={handleClose} + teamId={teamId} + exerciseId={exerciseId} + emailThread={emailThread} + formState={formState} + /> + )} + </div> )} </Card> </Overlay2> diff --git a/frontend/src/email/EmailTemplates/TemplateCard.tsx b/frontend/src/email/EmailTemplates/TemplateCard.tsx index a69cf27de50d90c2d5acd4b019ebe01c9c1936df..4e25e18ffa19f55e73987680fe425fcafac2a963 100644 --- a/frontend/src/email/EmailTemplates/TemplateCard.tsx +++ b/frontend/src/email/EmailTemplates/TemplateCard.tsx @@ -8,13 +8,14 @@ const th = css` text-align: left; vertical-align: text-top; white-space: nowrap; - width: 150px; + padding: 0.25rem 0.5rem; ` const td = css` white-space: pre-wrap; vertical-align: text-top; - padding: 5px 10px; + padding: 0.25rem 0.5rem; + width: 100%; ` const card = css` diff --git a/frontend/src/email/EmailTemplates/index.tsx b/frontend/src/email/EmailTemplates/index.tsx index 16af3324fa71a7882db30ae50f620820490612cd..0079e4725b714691988e8fd7bc5cc37c66cd9aad 100644 --- a/frontend/src/email/EmailTemplates/index.tsx +++ b/frontend/src/email/EmailTemplates/index.tsx @@ -1,20 +1,14 @@ import { Button, Dialog, NonIdealState } from '@blueprintjs/core' -import { css } from '@emotion/css' import type { EmailTemplate } from '@inject/graphql/fragments/EmailTemplate.generated' import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' import { useGetEmailTemplates } from '@inject/graphql/queries/GetEmailTemplates.generated' import { useGetThreadTemplates } from '@inject/graphql/queries/GetThreadTemplates.generated' +import { maximizedDialog } from '@inject/shared/css/dialog' import notEmpty from '@inject/shared/utils/notEmpty' import type { Dispatch, FC, SetStateAction } from 'react' -import { memo, useState } from 'react' +import { memo, useMemo, useState } from 'react' import TemplateCard from './TemplateCard' -const dialog = css` - width: 50vw; - max-height: 90vh; - overflow: auto; -` - type EmailTemplatesProps = { setSenderAddress: Dispatch<SetStateAction<string>> setContent: Dispatch<SetStateAction<string>> @@ -92,10 +86,24 @@ const EmailTemplates: FC<EmailTemplatesProps> = ({ setOpen(false) } + const text = useMemo(() => { + if (template) { + return template.context + } + + if (templates.length === 0) { + return 'No templates available' + } + + return 'Select a template...' + }, [template, templates.length]) + return ( <> <Button - type='button' + active={open} + outlined + minimal rightIcon='search-template' disabled={templates.length === 0} title={ @@ -106,11 +114,11 @@ const EmailTemplates: FC<EmailTemplatesProps> = ({ onClick={() => setOpen(true)} alignText='left' > - {template ? template.context : 'Select a template'} + {text} </Button> <Dialog - className={dialog} + className={maximizedDialog} icon='search-template' isOpen={open} onClose={() => setOpen(false)} diff --git a/frontend/src/email/SenderSelector/index.tsx b/frontend/src/email/SenderSelector/index.tsx index 20edfb1b19e3a4eba7a239ee1e6dce0218e1014f..7073c96b2f8be6db48c5b3070be5fe9b17234b3c 100644 --- a/frontend/src/email/SenderSelector/index.tsx +++ b/frontend/src/email/SenderSelector/index.tsx @@ -1,4 +1,4 @@ -import { InputGroup, MenuItem, Tooltip } from '@blueprintjs/core' +import { Icon, InputGroup, MenuItem, Tooltip } from '@blueprintjs/core' import type { ItemRenderer } from '@blueprintjs/select' import { Select } from '@blueprintjs/select' import type { EmailParticipant } from '@inject/graphql/fragments/EmailParticipant.generated' @@ -22,7 +22,6 @@ const SenderSelector: FC<SenderSelectorProps> = ({ const itemRenderer: ExtendedItemRenderer<string> = useCallback( (address, { handleClick, handleFocus, modifiers, hasTooltip }) => ( <MenuItem - icon={hasTooltip ? 'small-info-sign' : undefined} active={modifiers.active} disabled={modifiers.disabled} onClick={handleClick} @@ -30,7 +29,15 @@ const SenderSelector: FC<SenderSelectorProps> = ({ roleStructure='listoption' selected={senderAddress === address} shouldDismissPopover={false} - text={address} + text={ + <div> + <Icon + icon='small-info-sign' + style={{ visibility: hasTooltip ? undefined : 'hidden' }} + /> + {address} + </div> + } key={address} /> ), @@ -67,11 +74,12 @@ const SenderSelector: FC<SenderSelectorProps> = ({ style: { maxHeight: '50vh', overflowY: 'auto', overflowX: 'hidden' }, }} > + {/* placeholder can't be used, because it doesn't update dynamically */} <InputGroup value={ senderList.length > 0 - ? senderAddress - : 'Select at least one non-team recipient' + ? senderAddress || 'Select sender...' + : 'Select at least one non-team participant' } fill disabled={senderList.length === 0} diff --git a/frontend/src/email/TeamEmails/EmailCard.tsx b/frontend/src/email/TeamEmails/EmailCard.tsx index 71d196ab51ca381bbd57e07e379cc28ec0dc6250..9b1a589eefc8e28ba48c34bf3dd941fba7db8b99 100644 --- a/frontend/src/email/TeamEmails/EmailCard.tsx +++ b/frontend/src/email/TeamEmails/EmailCard.tsx @@ -16,6 +16,14 @@ import Timestamp from '@inject/shared/components/Timestamp' import type { FC } from 'react' import { useEffect, useMemo } from 'react' import { OPEN_COMPOSE_EVENT_TYPE } from '../EmailFormOverlay' +import getForwardContent from './getForwardContent' + +const section = css` + .${Classes.SECTION_HEADER} { + flex-wrap: wrap; + gap: unset; + } +` const rightElement = css` display: flex; @@ -33,6 +41,7 @@ interface EmailCardProps { allowForwarding?: boolean forwardButtonTitle?: string subject: string + to: string } const EmailCard: FC<EmailCardProps> = ({ @@ -44,6 +53,7 @@ const EmailCard: FC<EmailCardProps> = ({ allowForwarding, forwardButtonTitle, subject, + to, }) => { const formatTimestamp = useFormatTimestamp() @@ -61,6 +71,7 @@ const EmailCard: FC<EmailCardProps> = ({ return ( <Section + className={section} style={{ background: initialReadReceipt ? undefined : HIGHLIGHTED_COLOR, overflow: 'unset', @@ -106,9 +117,9 @@ const EmailCard: FC<EmailCardProps> = ({ window.dispatchEvent( new CustomEvent(OPEN_COMPOSE_EVENT_TYPE, { detail: { - content: email.content.raw, + content: getForwardContent(email, to), fileInfo: email.content.fileInfo, - subject, + subject: `Fwd: ${subject}`, }, }) ) diff --git a/frontend/src/email/TeamEmails/InstructorTeamEmails.tsx b/frontend/src/email/TeamEmails/InstructorTeamEmails.tsx index ac651ebff9244e388216ec971be51616e62fc0a2..193821c17abb342f0e95565b365fce9fe883e282 100644 --- a/frontend/src/email/TeamEmails/InstructorTeamEmails.tsx +++ b/frontend/src/email/TeamEmails/InstructorTeamEmails.tsx @@ -1,4 +1,5 @@ import type { EmailSelection } from '@/analyst/utilities' +import type { LinkType } from '@/components/LinkButton' import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' import type { FC } from 'react' import TeamEmails from '.' @@ -7,9 +8,10 @@ interface InstructorTeamEmailsProps { exerciseId: string teamId: string emailThreads: EmailThread[] - selectedTab?: EmailSelection - onSelectReceived?: () => void - onSelectSent?: () => void + selectedTab: EmailSelection + receivedLink: LinkType + sentLink: LinkType + draftsLink: LinkType selectedEmailThreadId: string | undefined onClick: (emailThread: EmailThread) => void } @@ -19,8 +21,9 @@ const InstructorTeamEmails: FC<InstructorTeamEmailsProps> = ({ teamId, emailThreads, selectedTab, - onSelectReceived, - onSelectSent, + receivedLink, + sentLink, + draftsLink, selectedEmailThreadId, onClick, }) => { @@ -39,10 +42,10 @@ const InstructorTeamEmails: FC<InstructorTeamEmailsProps> = ({ exerciseId={exerciseId} teamId={teamId} emailThreads={emailThreads} - allowTabs selectedTab={selectedTab} - onSelectReceived={onSelectReceived} - onSelectSent={onSelectSent} + receivedLink={receivedLink} + sentLink={sentLink} + draftsLink={draftsLink} selectedEmailThread={selectedEmailThread} onClick={onClick} allowComposing diff --git a/frontend/src/email/TeamEmails/ThreadHeaderCard/InstructorAddressLabel.tsx b/frontend/src/email/TeamEmails/ThreadHeaderCard/InstructorAddressLabel.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7acddedc64bd4401905f8a44a8d781b689b6cc3f --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadHeaderCard/InstructorAddressLabel.tsx @@ -0,0 +1,29 @@ +import { EntityTitle, Tooltip } from '@blueprintjs/core' +import { css } from '@emotion/css' +import type { EmailParticipant } from '@inject/graphql/fragments/EmailParticipant.generated' +import type { FC } from 'react' + +const title = css` + gap: 0; +` + +interface InstructorAddressLabelProps { + participant: EmailParticipant +} + +const InstructorAddressLabel: FC<InstructorAddressLabelProps> = ({ + participant, +}) => + participant.definitionAddress ? ( + <Tooltip content={participant.definitionAddress.description}> + <EntityTitle + className={title} + icon='small-info-sign' + title={participant.address} + /> + </Tooltip> + ) : ( + <EntityTitle title={participant.address} /> + ) + +export default InstructorAddressLabel diff --git a/frontend/src/email/TeamEmails/ThreadHeaderCard/Subtitle.tsx b/frontend/src/email/TeamEmails/ThreadHeaderCard/Subtitle.tsx new file mode 100644 index 0000000000000000000000000000000000000000..61f7bb1144a525e55218a216c972c45a36a36a08 --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadHeaderCard/Subtitle.tsx @@ -0,0 +1,35 @@ +import { css } from '@emotion/css' +import type { EmailParticipant } from '@inject/graphql/fragments/EmailParticipant.generated' +import type { FC } from 'react' +import InstructorAddressLabel from './InstructorAddressLabel' + +const wrapper = css` + display: flex; + gap: 0.5rem; + align-items: end; +` + +const instructorAddressLabel = css` + display: flex; +` + +interface SubtitleProps { + showDescription: boolean + participants: EmailParticipant[] +} + +const Subtitle: FC<SubtitleProps> = ({ showDescription, participants }) => + showDescription ? ( + <div className={wrapper}> + {participants.map((participant, index) => ( + <div key={participant.id} className={instructorAddressLabel}> + <InstructorAddressLabel participant={participant} /> + {index < participants.length - 1 && ', '} + </div> + ))} + </div> + ) : ( + participants.map(participant => participant.address).join(', ') + ) + +export default Subtitle diff --git a/frontend/src/email/TeamEmails/ThreadHeaderCard.tsx b/frontend/src/email/TeamEmails/ThreadHeaderCard/index.tsx similarity index 66% rename from frontend/src/email/TeamEmails/ThreadHeaderCard.tsx rename to frontend/src/email/TeamEmails/ThreadHeaderCard/index.tsx index 6339481d7895e4994488256b3910318abb45c949..a7927d5646a49e3fce0ba2bdd8c708431e3852b2 100644 --- a/frontend/src/email/TeamEmails/ThreadHeaderCard.tsx +++ b/frontend/src/email/TeamEmails/ThreadHeaderCard/index.tsx @@ -1,9 +1,10 @@ import { Button, Classes } from '@blueprintjs/core' -import type { FC } from 'react' +import { cx } from '@emotion/css' +import type { FC, ReactNode } from 'react' interface ThreadHeaderCardProps { title: string - subtitle?: string + subtitle?: ReactNode allowReplying: boolean replyButtonTitle?: string onReply?: () => void @@ -11,19 +12,17 @@ interface ThreadHeaderCardProps { const ThreadHeaderCard: FC<ThreadHeaderCardProps> = ({ title, - subtitle, + subtitle = '', allowReplying, replyButtonTitle, onReply, }) => ( - <div style={{ display: 'flex', padding: '10px 20px 0' }}> + <div style={{ display: 'flex', padding: '0.5rem 1rem 0' }}> <div> - <h6 className={`${Classes.HEADING} ${Classes.SECTION_HEADER_TITLE}`}> + <h6 className={cx(Classes.HEADING, Classes.SECTION_HEADER_TITLE)}> {title} </h6> - <div - className={`${Classes.TEXT_MUTED} ${Classes.SECTION_HEADER_SUB_TITLE}`} - > + <div className={cx(Classes.TEXT_MUTED, Classes.SECTION_HEADER_SUB_TITLE)}> {subtitle} </div> </div> @@ -41,8 +40,4 @@ const ThreadHeaderCard: FC<ThreadHeaderCardProps> = ({ </div> ) -ThreadHeaderCard.defaultProps = { - subtitle: '', -} - export default ThreadHeaderCard diff --git a/frontend/src/email/TeamEmails/ThreadLog/DraftLogCard.tsx b/frontend/src/email/TeamEmails/ThreadLog/DraftLogCard.tsx new file mode 100644 index 0000000000000000000000000000000000000000..90dc6d63d65a9f7bdb293bfe0dd30b380671c6ad --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadLog/DraftLogCard.tsx @@ -0,0 +1,102 @@ +import { ellipsized } from '@/analyst/utilities' +import { Card, Classes, Icon } from '@blueprintjs/core' +import { cx } from '@emotion/css' +import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' +import type { EmailDraft } from '@inject/graphql/fragments/clientonly/EmailDraft.generated' +import { useGetEmailThread } from '@inject/graphql/queries/GetEmailThread.generated' +import notEmpty from '@inject/shared/utils/notEmpty' +import { useMemo, type FC } from 'react' + +interface DraftLogCardProps { + teamId: string + emailDraft: EmailDraft + isSelected: boolean + onClick: (emailThread?: EmailThread | null) => void +} + +const DraftLogCard: FC<DraftLogCardProps> = ({ + teamId, + emailDraft, + isSelected, + onClick, +}) => { + const { data } = useGetEmailThread({ + variables: { + threadId: emailDraft.emailThreadId || '', + }, + skip: !emailDraft.emailThreadId, + }) + + const subject = useMemo(() => { + if (data?.emailThread?.subject) { + return `Reply to: ${data.emailThread.subject}` + } + if (emailDraft.subject) { + return `New email: ${emailDraft.subject}` + } + return `New email` + }, [data?.emailThread?.subject, emailDraft.subject]) + const recipients = useMemo(() => { + if (data?.emailThread) { + return data.emailThread.participants + .filter(participant => participant.team?.id !== teamId) + .map(participant => participant.address) + .join(', ') + } + if (emailDraft.selectedContacts) { + return emailDraft.selectedContacts.filter(notEmpty).join(', ') + } + return '' + }, [data?.emailThread, emailDraft.selectedContacts, teamId]) + + return ( + <Card + interactive + onClick={() => onClick(data?.emailThread)} + style={{ + background: isSelected ? 'rgba(45, 114, 210, 0.2)' : undefined, + display: 'flex', + justifyContent: 'space-between', + gap: '0.25rem', + }} + > + <div className={cx(Classes.SECTION_HEADER_LEFT, ellipsized)}> + <div className={ellipsized}> + {recipients && ( + <div className={ellipsized}> + <span + style={{ + fontStyle: 'italic', + }} + > + {'to: '} + </span> + {recipients} + </div> + )} + <h6 + className={cx( + Classes.HEADING, + Classes.SECTION_HEADER_TITLE, + ellipsized + )} + > + {emailDraft.fileId && ( + <Icon + icon='paperclip' + className={Classes.TEXT_MUTED} + style={{ paddingRight: '0.25em' }} + /> + )} + {subject} + </h6> + {emailDraft.content} + </div> + </div> + <div className={Classes.SECTION_HEADER_RIGHT}> + <Icon icon='chevron-right' className={Classes.TEXT_MUTED} /> + </div> + </Card> + ) +} +export default DraftLogCard diff --git a/frontend/src/email/TeamEmails/ThreadLog/DraftLogCards.tsx b/frontend/src/email/TeamEmails/ThreadLog/DraftLogCards.tsx new file mode 100644 index 0000000000000000000000000000000000000000..096faad328354075b4677b449df09cef0170336b --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadLog/DraftLogCards.tsx @@ -0,0 +1,49 @@ +import { Card, CardList } from '@blueprintjs/core' +import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' +import { useGetEmailDrafts } from '@inject/graphql/queries/clientonly/GetEmailDrafts.generated' +import notEmpty from '@inject/shared/utils/notEmpty' +import { type FC } from 'react' +import DraftLogCard from './DraftLogCard' + +interface DraftLogCardsProps { + teamId: string + inInstructor?: boolean + selectedEmailThreadId?: string + onClick: (emailThread?: EmailThread | null) => void +} + +const DraftLogCards: FC<DraftLogCardsProps> = ({ + teamId, + inInstructor = false, + selectedEmailThreadId, + onClick, +}) => { + const { data } = useGetEmailDrafts({ + variables: { instructor: inInstructor, teamId }, + fetchPolicy: 'no-cache', + }) + const emailDrafts = data?.getEmailDrafts?.filter(notEmpty) || [] + + return ( + <CardList bordered={false}> + {emailDrafts.length > 0 ? ( + emailDrafts.map((emailDraft, index) => ( + <DraftLogCard + key={index} + teamId={teamId} + isSelected={ + notEmpty(emailDraft.emailThreadId) && + emailDraft.emailThreadId === selectedEmailThreadId + } + emailDraft={emailDraft} + onClick={onClick} + /> + )) + ) : ( + <Card>No drafts</Card> + )} + </CardList> + ) +} + +export default DraftLogCards diff --git a/frontend/src/email/TeamEmails/ThreadLogCard.tsx b/frontend/src/email/TeamEmails/ThreadLog/ThreadLogCard.tsx similarity index 69% rename from frontend/src/email/TeamEmails/ThreadLogCard.tsx rename to frontend/src/email/TeamEmails/ThreadLog/ThreadLogCard.tsx index 5a7f07d98ad92e58cc73643185a6f9c6f6a311b9..355f33589f07079e9511c073560cd1032902c38f 100644 --- a/frontend/src/email/TeamEmails/ThreadLogCard.tsx +++ b/frontend/src/email/TeamEmails/ThreadLog/ThreadLogCard.tsx @@ -1,18 +1,19 @@ import useFormatTimestamp from '@/analyst/useFormatTimestamp' import { HIGHLIGHTED_COLOR, ellipsized } from '@/analyst/utilities' +import { textFromRenderedContent } from '@/utils' import { Card, Classes, Colors, Icon } from '@blueprintjs/core' -import { css } from '@emotion/css' +import { css, cx } from '@emotion/css' import type { Email } from '@inject/graphql/fragments/Email.generated' import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' -import { useWriteReadReceiptEmailThread } from '@inject/graphql/mutations/clientonly/WriteReadReceiptEmailThread.generated' +import { useSetIsUnreadEmailThread } from '@inject/graphql/mutations/clientonly/SetIsUnreadEmailThread.generated' import Timestamp from '@inject/shared/components/Timestamp' -import type { FC } from 'react' +import { useMemo, type FC } from 'react' -const content = css` - * { - font-size: 14px; - font-weight: 400; - display: inline; +const timestamp = css` + white-space: nowrap; + + @media (max-width: 80rem) { + display: none; } ` @@ -35,33 +36,41 @@ const ThreadLogCard: FC<ThreadLogCardProps> = ({ }) => { const formatTimestamp = useFormatTimestamp() - const [mutate] = useWriteReadReceiptEmailThread({ + const [setIsRead] = useSetIsUnreadEmailThread({ variables: { - emailThreadId: emailThread.id, + threadId: emailThread.id, + isUnread: false, + teamId, }, }) + const isUnread = useMemo( + () => + emailThread.readReceipt.some( + readReceipt => readReceipt.teamId === teamId && readReceipt.isUnread + ), + [emailThread.readReceipt, teamId] + ) + return ( <Card interactive onClick={event => { - if (!emailThread.readReceipt) { - mutate() - } + setIsRead() onClick(event) }} style={{ background: isSelected ? 'rgba(45, 114, 210, 0.2)' - : emailThread.readReceipt === null + : isUnread ? HIGHLIGHTED_COLOR : undefined, display: 'flex', justifyContent: 'space-between', - gap: '5px', + gap: '0.25rem', }} > - <div className={`${Classes.SECTION_HEADER_LEFT} ${ellipsized}`}> + <div className={cx(Classes.SECTION_HEADER_LEFT, ellipsized)}> <div className={ellipsized}> <div className={ellipsized}> <span @@ -80,7 +89,11 @@ const ThreadLogCard: FC<ThreadLogCardProps> = ({ : lastEmail.sender.address} </div> <h6 - className={`${Classes.HEADING} ${Classes.SECTION_HEADER_TITLE} ${ellipsized}`} + className={cx( + Classes.HEADING, + Classes.SECTION_HEADER_TITLE, + ellipsized + )} > {lastEmail.content.fileInfo && ( <Icon @@ -91,14 +104,11 @@ const ThreadLogCard: FC<ThreadLogCardProps> = ({ )} {emailThread.subject} </h6> - <div - className={`${Classes.TEXT_MUTED} ${Classes.SECTION_HEADER_SUB_TITLE} ${ellipsized} ${content}`} - dangerouslySetInnerHTML={{ __html: lastEmail.content.rendered }} - /> + {textFromRenderedContent(lastEmail.content.rendered)} </div> </div> <div className={Classes.SECTION_HEADER_RIGHT}> - <span style={{ whiteSpace: 'nowrap' }}> + <span className={timestamp}> {inAnalyst ? ( formatTimestamp(lastEmail.timestamp) ) : ( @@ -106,9 +116,9 @@ const ThreadLogCard: FC<ThreadLogCardProps> = ({ minimal datetime={new Date(lastEmail.timestamp)} style={{ - backgroundColor: emailThread.readReceipt - ? `${Colors.GREEN3}4d` - : `${Colors.ORANGE3}4d`, + backgroundColor: isUnread + ? `${Colors.ORANGE3}4d` + : `${Colors.GREEN3}4d`, alignSelf: 'center', }} /> diff --git a/frontend/src/email/TeamEmails/ThreadLog/ThreadLogCards.tsx b/frontend/src/email/TeamEmails/ThreadLog/ThreadLogCards.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8be26a6f15de5d77a2aa519dc4ded0569e8de012 --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadLog/ThreadLogCards.tsx @@ -0,0 +1,90 @@ +import { EmailSelection, compareDates } from '@/analyst/utilities' +import { Card, CardList } from '@blueprintjs/core' +import type { Email } from '@inject/graphql/fragments/Email.generated' +import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' +import { useMemo, type FC } from 'react' +import ThreadLogCard from './ThreadLogCard' + +interface ThreadLogCardsProps { + teamId: string + emailThreads: EmailThread[] + selectedTab: EmailSelection.RECEIVED | EmailSelection.SENT + selectedEmailThreadId?: string + onClick: (emailThread: EmailThread) => void + inAnalyst?: boolean +} + +const ThreadLogCards: FC<ThreadLogCardsProps> = ({ + teamId, + emailThreads, + selectedTab, + selectedEmailThreadId, + onClick, + inAnalyst = false, +}) => { + const emailThreadsWithLastEmails = useMemo( + () => + emailThreads + .reduce< + { + emailThread: EmailThread + lastEmail: Email + }[] + >((accumulator, emailThread) => { + const lastEmail = emailThread.emails + .filter(email => + selectedTab === EmailSelection.RECEIVED + ? email.sender.team?.id !== teamId + : email.sender.team?.id === teamId + ) + .sort( + (a, b) => + -compareDates(new Date(a.timestamp), new Date(b.timestamp)) + ) + .at(0) + + if (lastEmail) { + accumulator.push({ + emailThread, + lastEmail, + }) + } + + return accumulator + }, []) + .sort( + (a, b) => + -compareDates( + new Date(a.lastEmail.timestamp), + new Date(b.lastEmail.timestamp) + ) + ), + [emailThreads, selectedTab, teamId] + ) + + return ( + <CardList bordered={false}> + {emailThreadsWithLastEmails.length > 0 ? ( + emailThreadsWithLastEmails.map(element => ( + <ThreadLogCard + key={element.emailThread.id} + emailThread={element.emailThread} + lastEmail={element.lastEmail} + teamId={teamId} + isSelected={element.emailThread.id === selectedEmailThreadId} + onClick={() => onClick(element.emailThread)} + inAnalyst={inAnalyst} + /> + )) + ) : ( + <Card>{`No emails${ + selectedTab === undefined + ? '' + : ` ${selectedTab === EmailSelection.SENT ? 'sent' : 'received'}` + }`}</Card> + )} + </CardList> + ) +} + +export default ThreadLogCards diff --git a/frontend/src/email/TeamEmails/ThreadLog/index.tsx b/frontend/src/email/TeamEmails/ThreadLog/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..24d0fcf335cc4a9317a77c88c85945a825db7e36 --- /dev/null +++ b/frontend/src/email/TeamEmails/ThreadLog/index.tsx @@ -0,0 +1,171 @@ +import { EmailSelection } from '@/analyst/utilities' +import type { LinkType } from '@/components/LinkButton' +import LinkButton from '@/components/LinkButton' +import { + OPEN_COMPOSE_EVENT_TYPE, + OPEN_REPLY_EVENT_TYPE, +} from '@/email/EmailFormOverlay' +import { useNavigate } from '@/router' +import { Button, ButtonGroup, Divider } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' +import { type FC } from 'react' +import DraftLogCards from './DraftLogCards' +import ThreadLogCards from './ThreadLogCards' + +const threadLog = css` + display: flex; + flex-shrink: 10; + flex-direction: column; + overflow: auto; + flex: 1; +` + +const header = css` + padding: 0.5rem 1rem 0; + display: flex; + flex-wrap: wrap; + justify-content: space-between; +` + +const buttons = (inInstructor?: boolean) => css` + flex-wrap: wrap; + + @media (max-width: ${inInstructor ? '52rem' : '42rem'}) { + flex-direction: column; + } +` +const buttonsVertical = (inInstructor?: boolean) => css` + @media (max-width: ${inInstructor ? '130rem' : '100rem'}) { + flex-direction: column; + } +` + +interface ThreadLogProps { + teamId: string + emailThreads: EmailThread[] + selectedTab: EmailSelection + receivedLink: LinkType + sentLink: LinkType + draftsLink?: LinkType + selectedEmailThreadId?: string + onClick: (emailThread: EmailThread) => void + inInstructor?: boolean + inAnalyst?: boolean + allowComposing?: boolean + composeButtonTitle?: string + onCompose?: () => void +} + +const ThreadLog: FC<ThreadLogProps> = ({ + teamId, + emailThreads, + selectedTab, + receivedLink, + sentLink, + inInstructor, + draftsLink, + selectedEmailThreadId, + onClick, + inAnalyst = false, + allowComposing = false, + composeButtonTitle, + onCompose, +}) => { + const nav = useNavigate() + + return ( + <div className={threadLog}> + <div className={header}> + <ButtonGroup + minimal + className={cx({ + [buttons(inInstructor)]: true, + [buttonsVertical(inInstructor)]: + selectedEmailThreadId !== undefined, + })} + > + <LinkButton + link={receivedLink} + button={{ + text: `Received${inInstructor ? ' by team' : ''}`, + icon: 'inbox', + active: selectedTab === EmailSelection.RECEIVED, + }} + /> + <Divider /> + <LinkButton + link={sentLink} + button={{ + text: `Sent${inInstructor ? ' by team' : ''}`, + icon: 'send-message', + active: selectedTab === EmailSelection.SENT, + }} + /> + {draftsLink && ( + <> + <Divider /> + <LinkButton + link={draftsLink} + button={{ + text: 'Drafts', + icon: 'document', + active: selectedTab === EmailSelection.DRAFTS, + }} + /> + </> + )} + </ButtonGroup> + <div> + <Button + minimal + intent='primary' + text='Compose' + icon='edit' + onClick={onCompose} + disabled={!allowComposing} + title={composeButtonTitle} + /> + </div> + </div> + + <Divider /> + + {selectedTab === EmailSelection.DRAFTS ? ( + <DraftLogCards + onClick={emailThread => { + if (emailThread) { + onClick(emailThread) + window.dispatchEvent( + new CustomEvent(OPEN_REPLY_EVENT_TYPE, { + detail: { + emailThread, + }, + }) + ) + } else { + if (!draftsLink) return + // eslint-disable-next-line prefer-spread + nav.apply(null, draftsLink) + window.dispatchEvent(new CustomEvent(OPEN_COMPOSE_EVENT_TYPE)) + } + }} + teamId={teamId} + inInstructor={inInstructor} + selectedEmailThreadId={selectedEmailThreadId} + /> + ) : ( + <ThreadLogCards + teamId={teamId} + emailThreads={emailThreads} + selectedTab={selectedTab} + onClick={onClick} + inAnalyst={inAnalyst} + selectedEmailThreadId={selectedEmailThreadId} + /> + )} + </div> + ) +} + +export default ThreadLog diff --git a/frontend/src/email/TeamEmails/ThreadLogCards.tsx b/frontend/src/email/TeamEmails/ThreadLogCards.tsx deleted file mode 100644 index b716ee99355a241f5ca89e4ba53a4508374f9125..0000000000000000000000000000000000000000 --- a/frontend/src/email/TeamEmails/ThreadLogCards.tsx +++ /dev/null @@ -1,169 +0,0 @@ -import { EmailSelection, compareDates } from '@/analyst/utilities' -import { Button, ButtonGroup, Card, CardList, Divider } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { Email } from '@inject/graphql/fragments/Email.generated' -import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' -import type { FC } from 'react' -import ThreadLogCard from './ThreadLogCard' - -const threadLog = css` - display: flex; - flex-shrink: 10; - flex-direction: column; - overflow: auto; - flex: 1; -` - -const header = css` - padding: 10px 20px 0; - display: flex; - flex-wrap: wrap; - justify-content: space-between; -` - -const cardList = css`` - -interface ThreadLogCardsProps { - teamId: string - emailThreads: EmailThread[] - allowTabs?: boolean - selectedTab?: EmailSelection - onSelectReceived?: () => void - onSelectSent?: () => void - selectedEmailThreadId?: string - onClick: (emailThread: EmailThread) => void - inAnalyst?: boolean - allowComposing?: boolean - composeButtonTitle?: string - onCompose?: () => void -} - -const ThreadLogCards: FC<ThreadLogCardsProps> = ({ - teamId, - emailThreads, - allowTabs, - selectedTab, - onSelectReceived, - onSelectSent, - selectedEmailThreadId, - onClick, - inAnalyst, - allowComposing, - composeButtonTitle, - onCompose, -}) => { - const emailThreadsWithLastEmails: { - emailThread: EmailThread - lastEmail: Email - }[] = [] - emailThreads.forEach(emailThread => { - let lastEmail: Email | undefined | null - - if (!allowTabs) { - lastEmail = emailThread.lastEmail - } else { - ;[...emailThread.emails] - .sort( - (a, b) => -compareDates(new Date(a.timestamp), new Date(b.timestamp)) - ) - .forEach(email => { - if (!lastEmail) { - if ( - selectedTab === EmailSelection.SENT - ? email.sender.team?.id === teamId - : email.sender.team?.id !== teamId - ) { - lastEmail = email - } - } - }) - } - - if (!lastEmail) return - - emailThreadsWithLastEmails.push({ - emailThread, - lastEmail, - }) - }) - - const threadLogCards = emailThreadsWithLastEmails - .sort( - (a, b) => - -compareDates( - new Date(a.lastEmail.timestamp), - new Date(b.lastEmail.timestamp) - ) - ) - .map(element => ( - <ThreadLogCard - key={element.emailThread.id} - emailThread={element.emailThread} - lastEmail={element.lastEmail} - teamId={teamId} - isSelected={element.emailThread.id === selectedEmailThreadId} - onClick={() => onClick(element.emailThread)} - inAnalyst={inAnalyst} - /> - )) - - return ( - <div className={threadLog}> - {allowTabs && ( - <> - <div className={header}> - <ButtonGroup minimal> - <Button - text='Received' - icon='inbox' - active={selectedTab === EmailSelection.RECEIVED} - onClick={onSelectReceived} - /> - <Divider /> - <Button - text='Sent' - icon='send-message' - active={selectedTab === EmailSelection.SENT} - onClick={onSelectSent} - /> - </ButtonGroup> - <div> - <Button - minimal - intent='primary' - text='Compose' - icon='edit' - onClick={onCompose} - disabled={!allowComposing} - title={composeButtonTitle} - /> - </div> - </div> - - <Divider /> - </> - )} - - <CardList bordered={false} className={cardList}> - {' '} - {threadLogCards.length > 0 ? ( - threadLogCards - ) : ( - <Card>{`No emails${ - selectedTab === undefined - ? '' - : ` ${selectedTab === EmailSelection.SENT ? 'sent' : 'received'}` - }`}</Card> - )} - </CardList> - </div> - ) -} - -ThreadLogCards.defaultProps = { - allowTabs: false, - allowComposing: false, - inAnalyst: false, -} - -export default ThreadLogCards diff --git a/frontend/src/email/TeamEmails/TraineeTeamEmails.tsx b/frontend/src/email/TeamEmails/TraineeTeamEmails.tsx index d78312d2bebbcbfe1ec2498b493ffe2d27d19f01..8f12ffb80a9ddf4674b1e0dc9c4a576ef14c3356 100644 --- a/frontend/src/email/TeamEmails/TraineeTeamEmails.tsx +++ b/frontend/src/email/TeamEmails/TraineeTeamEmails.tsx @@ -1,4 +1,5 @@ import type { EmailSelection } from '@/analyst/utilities' +import type { LinkType } from '@/components/LinkButton' import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' import type { FC } from 'react' import TeamEmails from '.' @@ -7,9 +8,10 @@ interface TraineeTeamEmailsProps { exerciseId: string teamId: string emailThreads: EmailThread[] - selectedTab?: EmailSelection - onSelectReceived?: () => void - onSelectSent?: () => void + selectedTab: EmailSelection + receivedLink: LinkType + sentLink: LinkType + draftsLink: LinkType selectedEmailThreadId: string | undefined onClick: (emailThread: EmailThread) => void } @@ -19,8 +21,9 @@ const TraineeTeamEmails: FC<TraineeTeamEmailsProps> = ({ teamId, emailThreads, selectedTab, - onSelectReceived, - onSelectSent, + receivedLink, + sentLink, + draftsLink, selectedEmailThreadId, onClick, }) => { @@ -33,10 +36,10 @@ const TraineeTeamEmails: FC<TraineeTeamEmailsProps> = ({ exerciseId={exerciseId} teamId={teamId} emailThreads={emailThreads} - allowTabs selectedTab={selectedTab} - onSelectReceived={onSelectReceived} - onSelectSent={onSelectSent} + receivedLink={receivedLink} + sentLink={sentLink} + draftsLink={draftsLink} selectedEmailThread={selectedEmailThread} onClick={onClick} allowComposing diff --git a/frontend/src/email/TeamEmails/getForwardContent.tsx b/frontend/src/email/TeamEmails/getForwardContent.tsx new file mode 100644 index 0000000000000000000000000000000000000000..977b0f976588789fee46ce37dd9b2f54c260e55f --- /dev/null +++ b/frontend/src/email/TeamEmails/getForwardContent.tsx @@ -0,0 +1,14 @@ +import type { Email } from '@inject/graphql/fragments/Email.generated' + +const getForwardContent = (email: Email, to: string) => ` + +----- Forwarded message ----- +From: ${email.sender.address} +To: ${to} +Date: ${new Date(email.timestamp).toUTCString()} + + +${email.content.raw} +` + +export default getForwardContent diff --git a/frontend/src/email/TeamEmails/index.tsx b/frontend/src/email/TeamEmails/index.tsx index 7b43687fe0be42f97ac006f8283e43f769fea275..3934d29887998d15835ee00c9f421bf99eea7049 100644 --- a/frontend/src/email/TeamEmails/index.tsx +++ b/frontend/src/email/TeamEmails/index.tsx @@ -1,4 +1,5 @@ import type { EmailSelection } from '@/analyst/utilities' +import type { LinkType } from '@/components/LinkButton' import { Divider } from '@blueprintjs/core' import { css } from '@emotion/css' import type { EmailThread } from '@inject/graphql/fragments/EmailThread.generated' @@ -10,7 +11,8 @@ import { } from '../EmailFormOverlay' import EmailCard from './EmailCard' import ThreadHeaderCard from './ThreadHeaderCard' -import ThreadLogCards from './ThreadLogCards' +import Subtitle from './ThreadHeaderCard/Subtitle' +import ThreadLog from './ThreadLog' const emailThread = css` flex: 2; @@ -24,17 +26,17 @@ const emailCardList = css` flex: 1; overflow-y: auto; gap: 1rem; - padding: 10px 20px; + padding: 0.5rem 1rem; ` interface TeamEmailsProps { exerciseId: string teamId: string emailThreads: EmailThread[] - allowTabs?: boolean - selectedTab?: EmailSelection - onSelectReceived?: () => void - onSelectSent?: () => void + selectedTab: EmailSelection + receivedLink: LinkType + sentLink: LinkType + draftsLink?: LinkType selectedEmailThread: EmailThread | undefined onClick: (emailThread: EmailThread) => void inAnalyst?: boolean @@ -51,18 +53,18 @@ const TeamEmails: FC<TeamEmailsProps> = ({ exerciseId, teamId, emailThreads, - allowTabs, selectedTab, - onSelectReceived, - onSelectSent, + receivedLink, + sentLink, + draftsLink, selectedEmailThread, onClick, - inAnalyst, + inAnalyst = false, allowComposing, composeButtonTitle, allowReplying, replyButtonTitle, - inInstructor, + inInstructor = false, allowForwarding, forwardButtonTitle, }) => { @@ -72,6 +74,10 @@ const TeamEmails: FC<TeamEmailsProps> = ({ ...(selectedEmailThread?.emails.map(email => ({ ...email, subject: selectedEmailThread.subject, + to: selectedEmailThread.participants + .filter(participant => participant.address !== email.sender.address) + .map(participant => participant.address) + .join(', '), })) || []), ].reverse(), [selectedEmailThread] @@ -85,16 +91,17 @@ const TeamEmails: FC<TeamEmailsProps> = ({ height: '100%', }} > - <ThreadLogCards + <ThreadLog emailThreads={emailThreads} teamId={teamId} - allowTabs={allowTabs} selectedTab={selectedTab} - onSelectReceived={onSelectReceived} - onSelectSent={onSelectSent} + receivedLink={receivedLink} + sentLink={sentLink} + draftsLink={draftsLink} selectedEmailThreadId={selectedEmailThread?.id} onClick={onClick} - inAnalyst={inAnalyst!} + inInstructor={inInstructor} + inAnalyst={inAnalyst} allowComposing={allowComposing} composeButtonTitle={composeButtonTitle} onCompose={() => @@ -106,9 +113,12 @@ const TeamEmails: FC<TeamEmailsProps> = ({ <div className={emailThread}> <ThreadHeaderCard title={selectedEmailThread.subject} - subtitle={selectedEmailThread.participants - .map(participant => participant.address) - .join(', ')} + subtitle={ + <Subtitle + participants={selectedEmailThread.participants} + showDescription={inInstructor || inAnalyst} + /> + } allowReplying={allowReplying} replyButtonTitle={replyButtonTitle} onReply={() => @@ -132,6 +142,7 @@ const TeamEmails: FC<TeamEmailsProps> = ({ allowForwarding={allowForwarding} forwardButtonTitle={forwardButtonTitle} subject={email.subject} + to={email.to} /> ))} </div> @@ -144,9 +155,4 @@ const TeamEmails: FC<TeamEmailsProps> = ({ ) } -TeamEmails.defaultProps = { - inAnalyst: false, - inInstructor: false, -} - export default TeamEmails diff --git a/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx b/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx index 6f59675441d2eb0737ef5345ac83d08105f86c35..b607fe58d86973b064ad8e2cc87c575ff4578e3d 100644 --- a/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx +++ b/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx @@ -1,77 +1,86 @@ -import { useNavigate } from '@/router' +import LinkButton from '@/components/LinkButton' +import DeleteAlert from '@/exercisepanel/DeleteAlert' import { Button, ButtonGroup, Card } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { Definition } from '@inject/graphql/fragments/Definition.generated' import { useDeleteDefinition } from '@inject/graphql/mutations/DeleteDefinition.generated' import { GetDefinitionsDocument } from '@inject/graphql/queries/GetDefinitions.generated' import { GetExercisesDocument } from '@inject/graphql/queries/GetExercises.generated' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import type { FC } from 'react' -import { memo, useCallback } from 'react' +import { memo, useState } from 'react' + +const card = css` + display: flex; + flex-direction: column; + justify-content: space-between; + overflow: auto; +` + +const title = css` + overflow: hidden; + text-overflow: ellipsis; +` interface DefinitionProps { definition: Definition } const DefinitionComp: FC<DefinitionProps> = ({ definition }) => { + const [alertOpen, setAlertOpen] = useState(false) + const { id, name } = definition - const nav = useNavigate() - const [mutate] = useDeleteDefinition({ + + const { notify } = useNotifyContext() + + const [deleteDefinition, { loading }] = useDeleteDefinition({ variables: { - definitionId: id, + definitionId: definition.id, }, refetchQueries: [GetDefinitionsDocument, GetExercisesDocument], + onError: err => { + notify(err.message, { intent: 'danger' }) + }, }) - const { notify } = useNotifyContext() - const handleRemove = useCallback(() => { - mutate() - .then(() => { - notify(`Definition ${id} removed`) - }) - .catch((error: Error) => { - if (error.message === 'Cannot delete running exercise.') { - notify('Cannot delete a definition with a running exercise', { - intent: 'danger', - icon: 'error', - }) - } else { - throw error - } - }) - }, [id, mutate, notify]) return ( - <Card - style={{ - display: 'flex', - flexDirection: 'column', - justifyContent: 'space-between', - }} - > - <div> - <h3>{name || id}</h3> - </div> - <ButtonGroup - vertical - alignText='left' - style={{ marginTop: '1rem', alignSelf: 'end' }} - > - <Button type='button' onClick={handleRemove} icon='cross'> - Remove - </Button> - <Button - type='button' - onClick={() => - nav('/users/definition/:definitionId', { - params: { definitionId: id }, - }) - } - icon='people' - fill + <> + <Card className={card}> + <h3 className={title} title={name || id}> + {name || id} + </h3> + <ButtonGroup + vertical + alignText='left' + style={{ marginTop: '1rem', alignSelf: 'end' }} > - Access - </Button> - </ButtonGroup> - </Card> + <Button type='button' onClick={() => setAlertOpen(true)} icon='trash'> + Delete + </Button> + <LinkButton + link={[ + '/exercise-panel/definition/:definitionId', + { params: { definitionId: id } }, + ]} + button={{ icon: 'people', fill: true, text: 'Access' }} + /> + </ButtonGroup> + </Card> + + <DeleteAlert + open={alertOpen} + setOpen={setAlertOpen} + onDelete={deleteDefinition} + loading={loading} + > + <p>Are you sure you want to delete the selected definition?</p> + <p> + <b> + All exercises created from the selected definition will be deleted! + </b> + </p> + </DeleteAlert> + </> ) } export default memo(DefinitionComp) diff --git a/frontend/src/exercisepanel/DefinitionManager/index.tsx b/frontend/src/exercisepanel/DefinitionManager/index.tsx index 13761d4f068313d14c85f2cbcc8cedfad8459194..e039d8bb5214d74ac751ad6b33c39c8dd6321eae 100644 --- a/frontend/src/exercisepanel/DefinitionManager/index.tsx +++ b/frontend/src/exercisepanel/DefinitionManager/index.tsx @@ -6,6 +6,7 @@ import { Section, SectionCard, } from '@blueprintjs/core' +import Reloader from '@inject/graphql/components/Reloader' import { useGetDefinitions } from '@inject/graphql/queries/GetDefinitions.generated' import CardList from '@inject/shared/components/CardList' import notEmpty from '@inject/shared/utils/notEmpty' @@ -21,22 +22,16 @@ const DefinitionManager = () => { title='Definitions' rightElement={ <ButtonGroup onClick={e => e.stopPropagation()}> + {/* TODO: set as active when uploader is open */} <Button onClick={() => { open('/instructor/definitionUploader') }} - icon='plus' + icon='upload' > - Add - </Button> - <Button - onClick={() => { - refetch() - }} - icon='reset' - > - Reload + Upload </Button> + <Reloader onRefetch={refetch} /> </ButtonGroup> } collapsible diff --git a/frontend/src/exercisepanel/DeleteAlert.tsx b/frontend/src/exercisepanel/DeleteAlert.tsx new file mode 100644 index 0000000000000000000000000000000000000000..12542a687057f507f746dde4a771f2252465adc8 --- /dev/null +++ b/frontend/src/exercisepanel/DeleteAlert.tsx @@ -0,0 +1,36 @@ +import { Alert } from '@blueprintjs/core' +import type { PropsWithChildren } from 'react' +import { type Dispatch, type FC, type SetStateAction } from 'react' + +interface DeleteAlertProps extends PropsWithChildren { + open: boolean + setOpen: Dispatch<SetStateAction<boolean>> + onDelete: () => void + loading?: boolean +} + +const DeleteAlert: FC<DeleteAlertProps> = ({ + open, + setOpen, + children, + onDelete, + loading, +}) => ( + <Alert + isOpen={open} + canEscapeKeyCancel + canOutsideClickCancel + cancelButtonText='Cancel' + onCancel={() => setOpen(false)} + confirmButtonText='Delete' + icon='trash' + intent='danger' + onConfirm={onDelete} + onClose={() => setOpen(false)} + loading={loading} + > + {children} + </Alert> +) + +export default DeleteAlert diff --git a/frontend/src/exercisepanel/ExerciseManager/components/ExerciseList.tsx b/frontend/src/exercisepanel/ExerciseManager/components/ExerciseList.tsx index 7f5762b2e005ae0d6db411e5e84bb9de0f512eb5..45a99bac78703d4b293703db793a426fd0da3801 100644 --- a/frontend/src/exercisepanel/ExerciseManager/components/ExerciseList.tsx +++ b/frontend/src/exercisepanel/ExerciseManager/components/ExerciseList.tsx @@ -38,7 +38,7 @@ const ExerciseList = () => { const [mutateStart, { loading: loadingStart }] = useStartExercise() const [mutatePause, { loading: loadingPause }] = useStopExercise() - const [mutateRemove, { loading: loadingRemove }] = useDeleteExercise() + const [mutateDelete, { loading: loadingDelete }] = useDeleteExercise() const { notify } = useNotifyContext() @@ -54,8 +54,9 @@ const ExerciseList = () => { id: exercise.id, }, refetchQueries: [GetExercisesDocument, GetRunningExercisesDocument], - }).then(() => { - notify(`Exercise ${exercise.id} started`) + onError: err => { + notify(err.message, { intent: 'danger' }) + }, }) }, [mutateStart, notify] @@ -67,48 +68,26 @@ const ExerciseList = () => { id: exercise.id, }, refetchQueries: [GetExercisesDocument, GetRunningExercisesDocument], - }).then(() => { - notify(`Exercise ${exercise.id} paused`) + onError: err => { + notify(err.message, { intent: 'danger' }) + }, }) }, [mutatePause, notify] ) - const handleRemove = useCallback( + const handleDelete = useCallback( (exercise: Exercise) => { - mutateRemove({ + mutateDelete({ variables: { id: exercise.id, }, refetchQueries: [GetExercisesDocument, GetRunningExercisesDocument], - }).then(() => { - notify(`Exercise ${exercise.id} removed`) + onError: err => { + notify(err.message, { intent: 'danger' }) + }, }) }, - [mutateRemove, notify] - ) - - const startButtonProps = useCallback( - (exercise: Exercise) => ({ - loading: loadingStart, - onClick: () => handleStart(exercise), - disabled: runningAny, - title: runningAny ? 'Only one exercise can run at a time' : undefined, - }), - [handleStart, loadingStart, runningAny] - ) - const removeButtonProps = useCallback( - (exercise: Exercise) => ({ - loading: loadingRemove, - onClick: () => handleRemove(exercise), - }), - [handleRemove, loadingRemove] - ) - const pauseButtonProps = useCallback( - (exercise: Exercise) => ({ - loading: loadingPause, - onClick: () => handlePause(exercise), - }), - [handlePause, loadingPause] + [mutateDelete, notify] ) const exerciseList = useMemo( @@ -123,14 +102,27 @@ const ExerciseList = () => { <ExerciseListComponent exercises={exercises} type='managing' - details={{ - startButtonProps, - removeButtonProps, - pauseButtonProps, - }} + details={(exercise: Exercise) => ({ + runningAny, + onStart: () => handleStart(exercise), + onPause: () => handlePause(exercise), + onDelete: () => handleDelete(exercise), + startLoading: loadingStart, + pauseLoading: loadingPause, + deleteLoading: loadingDelete, + })} /> ), - [exercises, pauseButtonProps, removeButtonProps, startButtonProps] + [ + exercises, + handleDelete, + handlePause, + handleStart, + loadingDelete, + loadingPause, + loadingStart, + runningAny, + ] ) if (loading) { diff --git a/frontend/src/exercisepanel/ExerciseManager/index.tsx b/frontend/src/exercisepanel/ExerciseManager/index.tsx index f0c396e987042cf124be9a266e39aa66e808f72b..8c155b8bd875852ff872940437b50b95c38f99ee 100644 --- a/frontend/src/exercisepanel/ExerciseManager/index.tsx +++ b/frontend/src/exercisepanel/ExerciseManager/index.tsx @@ -1,39 +1,24 @@ import { useModals } from '@/router' -import { Button, ButtonGroup, Section, SectionCard } from '@blueprintjs/core' -import { useGetExercises } from '@inject/graphql/queries/GetExercises.generated' +import { Button, Section, SectionCard } from '@blueprintjs/core' import ExerciseList from './components/ExerciseList' const ExerciseManager = () => { - const { refetch } = useGetExercises({ - fetchPolicy: 'standby', - }) const { open } = useModals() return ( <Section title='Exercises' rightElement={ - <ButtonGroup onClick={e => e.stopPropagation()}> - <Button - onClick={() => { - open('/instructor/exerciseCreator') - }} - icon='plus' - > - Add - </Button> - <Button - type='button' - onClick={e => { - e.preventDefault() - e.stopPropagation() - refetch() - }} - icon='reset' - > - Reload - </Button> - </ButtonGroup> + // TODO: set as active when creator is open + <Button + onClick={event => { + event.stopPropagation() + open('/instructor/exerciseCreator') + }} + icon='add' + > + Create + </Button> } collapsible > diff --git a/frontend/src/analyst/ExerciseSelector/ImportDialog.tsx b/frontend/src/exercisepanel/ExportImport/ImportDialog.tsx similarity index 76% rename from frontend/src/analyst/ExerciseSelector/ImportDialog.tsx rename to frontend/src/exercisepanel/ExportImport/ImportDialog.tsx index f885ebd8cb59aba28276f9f66060b8bd5cbbd580..ecfd5102be5dc296555c849ac814ff2f26cfef2e 100644 --- a/frontend/src/analyst/ExerciseSelector/ImportDialog.tsx +++ b/frontend/src/exercisepanel/ExportImport/ImportDialog.tsx @@ -5,8 +5,12 @@ import { DialogFooter, FileInput, } from '@blueprintjs/core' +import useApolloClient from '@inject/graphql/client/useApolloClient' import { useHost } from '@inject/graphql/connection/host' +import { GetDefinitionsDocument } from '@inject/graphql/queries/GetDefinitions.generated' +import { GetExercisesDocument } from '@inject/graphql/queries/GetExercises.generated' import { exportImportUrl } from '@inject/shared/config' +import { dialog } from '@inject/shared/css/dialog' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import csrfFetch from '@inject/shared/utils/csrfFetch' import type { ChangeEvent, FC } from 'react' @@ -15,12 +19,12 @@ import { useState } from 'react' interface ImportDialogProps { isOpen: boolean onClose: () => void - onImport: () => void } -const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose, onImport }) => { +const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose }) => { const host = useHost() const { notify } = useNotifyContext() + const client = useApolloClient() const [loading, setLoading] = useState(false) @@ -42,9 +46,6 @@ const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose, onImport }) => { data.append('file', file) setLoading(true) - onClose() - notify('Uploading...', { intent: 'none', icon: 'cloud-upload' }) - csrfFetch(exportImportUrl(host || ''), { method: 'POST', body: data, @@ -60,8 +61,10 @@ const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose, onImport }) => { return } - onImport() - notify(res.detail, { intent: 'success', icon: 'tick' }) + client.refetchQueries({ + include: [GetExercisesDocument, GetDefinitionsDocument], + }) + onClose() }) .catch((err: { status: string; detail: string }) => { notify(`${err.status}: ${err.detail}`, { @@ -77,10 +80,11 @@ const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose, onImport }) => { return ( <Dialog + className={dialog} isOpen={isOpen} onClose={onClose} icon='import' - title='Import data into the database' + title='Import' > <DialogBody> <p> @@ -89,12 +93,8 @@ const ImportDialog: FC<ImportDialogProps> = ({ isOpen, onClose, onImport }) => { button. Do not upload logs! </strong> </p> - <p>Importing will not affect data already in the database.</p> - <FileInput - style={{ width: '100%' }} - text={text} - onInputChange={handleFileChange} - /> + <p>Importing will not affect current data.</p> + <FileInput fill text={text} onInputChange={handleFileChange} /> </DialogBody> <DialogFooter actions={ diff --git a/frontend/src/exercisepanel/ExportImport/index.tsx b/frontend/src/exercisepanel/ExportImport/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b627567c26b8edf58482febfc09facd33cfc1ddd --- /dev/null +++ b/frontend/src/exercisepanel/ExportImport/index.tsx @@ -0,0 +1,45 @@ +import { AnchorButton, Button, ButtonGroup, Section } from '@blueprintjs/core' +import { useHost } from '@inject/graphql/connection/host' +import { exportImportUrl } from '@inject/shared/config' +import { useState } from 'react' +import ImportDialog from './ImportDialog' + +const ExportImport = () => { + const host = useHost() + const [isImportOpen, setIsImportOpen] = useState(false) + + return ( + <> + <Section + title='Export and import' + subtitle={ + <span> + Exported data include <b>all definitions, exercises, and users</b> + </span> + } + rightElement={ + <ButtonGroup minimal> + <AnchorButton + icon='export' + href={exportImportUrl(host || '')} + target='_blank' + rel='noreferrer' + > + Export + </AnchorButton> + <Button onClick={() => setIsImportOpen(true)} icon='import'> + Import + </Button> + </ButtonGroup> + } + /> + + <ImportDialog + isOpen={isImportOpen} + onClose={() => setIsImportOpen(false)} + /> + </> + ) +} + +export default ExportImport diff --git a/frontend/src/global.scss b/frontend/src/global.scss new file mode 100644 index 0000000000000000000000000000000000000000..e6d8560d3bcd8071dc9e42de5d8edb90590930f1 --- /dev/null +++ b/frontend/src/global.scss @@ -0,0 +1,61 @@ +/* + * Workaround for missing svg-icon: + * https://github.com/palantir/blueprint/issues/2976#issuecomment-479231949 + */ +$svg-icon-map: ( + '16px/small-minus.svg': + "path fill-rule='evenodd' clip-rule='evenodd' d='M11 7H5c-.55 0-1 .45-1 1s.45 1 1 1h6c.55 0 1-.45 1-1s-.45-1-1-1z' fill='%23fff'/", + '16px/small-tick.svg': + "path fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 0 0-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0 0 12 5z' fill='%23fff'/", + '16px/chevron-right.svg': + "path fill-rule='evenodd' clip-rule='evenodd' d='M10.71 7.29l-4-4a1.003 1.003 0 0 0-1.42 1.42L8.59 8 5.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 0 0 1.71.71l4-4c.18-.18.29-.43.29-.71 0-.28-.11-.53-.29-.71z' fill='%235C7080'/", + '16px/more.svg': + "g fill='%235C7080'%3E%3Ccircle cx='2' cy='8.03' r='2'/%3E%3Ccircle cx='14' cy='8.03' r='2'/%3E%3Ccircle cx='8' cy='8.03' r='2'/%3E%3C/g", +); +@function svg-icon($inline-svg, $fill-color) { + @return url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3C" + map-get( + $svg-icon-map, + $inline-svg + ) + '%3E%3C/svg%3E'); +} + +/* + * INJECT-specific imports + */ +@import 'scrollbar'; +@import 'overrideDefault'; + +/* + * BlueprintJS imports + */ +@import '@blueprintjs/core/src/blueprint.scss'; + +/* + * Global CSS rules + */ +html, +body, +#root { + height: 100vh; + width: 100vw; +} + +html { + overflow-x: hidden; +} + +body.bp5-dark { + background-color: $dark-gray3; +} +:root { + --background-dark: $dark-gray3; +} + +* { + box-sizing: border-box; +} + +.bp5-portal { + /* let toast notifications appear on top */ + z-index: 39; +} diff --git a/frontend/src/instructor/InstructorInject/HeaderArea.tsx b/frontend/src/instructor/InstructorInject/HeaderArea.tsx deleted file mode 100644 index 15bc527147cd7a19c622557d13c0493a7b84fb4a..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorInject/HeaderArea.tsx +++ /dev/null @@ -1,43 +0,0 @@ -import { NumericInput } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { Dispatch, FC, SetStateAction } from 'react' - -const gridContainer = css` - display: grid; - grid-template-columns: auto 1fr; - grid-column-gap: 10px; -` - -const gridItem = css` - height: 30px; - display: flex; - align-items: center; - font-size: 16px; -` - -const REPEAT_MAX = 10 - -interface HeaderAreaProps { - repeat: number | undefined - setRepeat: Dispatch<SetStateAction<number | undefined>> -} - -const HeaderArea: FC<HeaderAreaProps> = ({ repeat, setRepeat }) => ( - <div className={gridContainer}> - <div className={gridItem}>Repeat:</div> - <NumericInput - fill - placeholder='Extra Copies' - min={0} - max={REPEAT_MAX} - value={repeat} - onValueChange={value => { - if (value <= REPEAT_MAX && value >= 0) { - setRepeat(value) - } - }} - /> - </div> -) - -export default HeaderArea diff --git a/frontend/src/instructor/InstructorInject/InjectForm.tsx b/frontend/src/instructor/InstructorInject/InjectForm.tsx index 73356c22b66b8cc7af19992193964e502f565e0e..3eb95b306722cb58fe18ee5132e4af08dc1616c8 100644 --- a/frontend/src/instructor/InstructorInject/InjectForm.tsx +++ b/frontend/src/instructor/InstructorInject/InjectForm.tsx @@ -1,20 +1,45 @@ import ContentArea from '@/components/ContentArea' +import ErrorMessage from '@/components/ErrorMessage' import FileArea from '@/components/FileArea' -import { MainDrawer } from '@/email/EmailForm/css' -import { CUSTOM_INJECT_SELECTION_ID } from '@/utils' -import { Button, ButtonGroup, Divider, FormGroup } from '@blueprintjs/core' +import { + Button, + ButtonGroup, + Divider, + FormGroup, + NonIdealState, + Spinner, +} from '@blueprintjs/core' import { css } from '@emotion/css' import type { FileInfo } from '@inject/graphql/fragments/FileInfo.generated' -import { useSelectTeamInjectOption } from '@inject/graphql/mutations/SelectTeamInjectOption.generated' +import { useSendCustomInject } from '@inject/graphql/mutations/SendCustomInject.generated' +import { useGetExercise } from '@inject/graphql/queries/GetExercise.generated' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import notEmpty from '@inject/shared/utils/notEmpty' import type { Dispatch, SetStateAction } from 'react' import { useState } from 'react' -import InstructorInjectSelector from '../InstructorInjectSelector' -import MilestoneSelector from '../MilestoneSelector/MilestoneSelector' -import HeaderArea from './HeaderArea' +import OverlayForm from './OverlayForm' +import TeamSelector from './TeamSelector' + +export const MainDrawer = css` + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; +` + +const footer = css` + display: flex; + justify-content: space-between; + flex-wrap: wrap; + flex-direction: row-reverse; + gap: 0.5rem; +` -const header = css` - margin-bottom: 1rem; +const teamSelector = css` + display: flex; + gap: 0.5rem; + align-items: center; + margin-bottom: 0.5rem; ` interface InjectComposerProps { @@ -25,83 +50,109 @@ interface InjectComposerProps { const InjectForm = ({ teamId, exerciseId, setIsOpen }: InjectComposerProps) => { const { notify } = useNotifyContext() - const [mutate, { loading }] = useSelectTeamInjectOption() + const [mutate, { loading }] = useSendCustomInject() - const [repeat, setRepeat] = useState<number>() - - const [activateMilestone, setActivateMilestone] = useState<string>('') - const [deactivateMilestone, setDeactivateMilestone] = useState<string>('') + const [selectedTeamIds, setSelectedTeamIds] = useState<string[]>([teamId]) const [content, setContent] = useState('') - + const [isOverlay, setIsOverlay] = useState(false) + const [duration, setDuration] = useState<number | undefined>() const [fileInfo, setFileInfo] = useState<FileInfo>() - const onSentSuccessfully = () => { - notify(`Inject sent successfully`) - setIsOpen(false) + const { + data, + loading: getExerciseLoading, + error, + } = useGetExercise({ variables: { exerciseId } }) + if (getExerciseLoading) { + return <Spinner /> + } + if (error) { + return ( + <ErrorMessage> + <h1>Error occurred!</h1> + <p>{error.message}</p> + </ErrorMessage> + ) } + if (!data?.exerciseId) { + return ( + <NonIdealState + icon='low-voltage-pole' + title='No data' + description='Please wait for the data to come in' + /> + ) + } + const teams = data.exerciseId.teams.filter(notEmpty) const onSend = () => { + if (!content && !fileInfo) { + notify('Add a message or an attachment', { + intent: 'danger', + }) + return + } + if (selectedTeamIds.length === 0) { + notify('Select at least one team', { + intent: 'danger', + }) + return + } + if (isOverlay && !duration) { + notify('Set the duration', { intent: 'danger' }) + return + } + mutate({ variables: { - selectTeamInjectInput: { - teamId, - selectionId: CUSTOM_INJECT_SELECTION_ID, - optionEmail: false, - content: content, - activateMilestone, - deactivateMilestone, + customInjectInput: { + teamIds: selectedTeamIds, + content, + exerciseId, fileId: fileInfo?.id, - repeat, + overlay: + isOverlay && duration + ? { + duration, + } + : undefined, }, }, + onCompleted: () => { + setIsOpen(false) + }, + onError: err => { + notify(err.message, { intent: 'danger' }) + }, }) - .then(() => { - onSentSuccessfully() - }) - .catch(err => notify(`Error: ${err.message}`, { intent: 'danger' })) } return ( <div className={MainDrawer}> - <h3 className={header}>Pre-defined injects:</h3> - <InstructorInjectSelector - teamId={teamId} - exerciseId={exerciseId} - onSentSuccessfully={onSentSuccessfully} - /> - - <Divider style={{ margin: '1rem 0' }} /> - - <h3 className={header}>Custom inject:</h3> + <div className={teamSelector}> + <span style={{ textWrap: 'nowrap' }}>Send to teams:</span> + <TeamSelector + teams={teams} + selectedTeamIds={selectedTeamIds} + setSelectedTeamIds={setSelectedTeamIds} + /> + </div> - <HeaderArea repeat={repeat} setRepeat={setRepeat} /> + <OverlayForm + isOverlay={isOverlay} + setIsOverlay={setIsOverlay} + duration={duration} + setDuration={setDuration} + /> <Divider style={{ margin: '0.5rem 0' }} /> - <MilestoneSelector - teamId={teamId} - activateMilestone={activateMilestone} - setActivateMilestone={setActivateMilestone} - deactivateMilestone={deactivateMilestone} - setDeactivateMilestone={setDeactivateMilestone} - /> - <ContentArea content={content} setContent={setContent} /> + <FileArea fileInfo={fileInfo} setFileInfo={setFileInfo} teamId={teamId} /> <Divider style={{ margin: '0.5rem 0' }} /> - <div - style={{ - display: 'flex', - justifyContent: 'space-between', - }} - > - <FileArea - fileInfo={fileInfo} - setFileInfo={setFileInfo} - teamId={teamId} - /> - + <div className={footer}> <FormGroup disabled={loading} style={{ margin: '0' }}> <ButtonGroup> <Button icon='trash' onClick={() => setIsOpen(false)}> @@ -111,9 +162,9 @@ const InjectForm = ({ teamId, exerciseId, setIsOpen }: InjectComposerProps) => { type='submit' rightIcon='send-message' onClick={onSend} - disabled={loading} + loading={loading} > - {loading ? 'Sending...' : 'Send'} + Send </Button> </ButtonGroup> </FormGroup> diff --git a/frontend/src/instructor/InstructorInject/OverlayForm.tsx b/frontend/src/instructor/InstructorInject/OverlayForm.tsx new file mode 100644 index 0000000000000000000000000000000000000000..72b59c244d47a48548f7d534b6172daf74349caa --- /dev/null +++ b/frontend/src/instructor/InstructorInject/OverlayForm.tsx @@ -0,0 +1,48 @@ +import { Checkbox, Collapse, NumericInput } from '@blueprintjs/core' +import { css } from '@emotion/css' +import type { Dispatch, FC, SetStateAction } from 'react' + +const main = css` + display: flex; + flex-direction: column; +` + +interface OverlayFormProps { + isOverlay: boolean + setIsOverlay: Dispatch<SetStateAction<boolean>> + duration: number | undefined + setDuration: Dispatch<SetStateAction<number | undefined>> +} + +const OverlayForm: FC<OverlayFormProps> = ({ + isOverlay, + setIsOverlay, + duration, + setDuration, +}) => ( + <div className={main}> + <Checkbox + style={{ margin: '0' }} + checked={isOverlay} + title='Send as overlay' + label='Send as overlay' + onClick={() => { + if (isOverlay) setDuration(undefined) + setIsOverlay(prev => !prev) + }} + /> + <Collapse isOpen={isOverlay}> + <NumericInput + value={duration} + onValueChange={value => setDuration(value)} + placeholder='Duration in minutes' + title='Duration in minutes' + fill + min={1} + leftIcon='time' + /> + </Collapse> + </div> +) + +export default OverlayForm diff --git a/frontend/src/instructor/InstructorInject/TeamSelector.tsx b/frontend/src/instructor/InstructorInject/TeamSelector.tsx new file mode 100644 index 0000000000000000000000000000000000000000..5766bdb58392d14c5eeee93ada0c14638edf5ba6 --- /dev/null +++ b/frontend/src/instructor/InstructorInject/TeamSelector.tsx @@ -0,0 +1,123 @@ +import { Divider, Menu, MenuItem } from '@blueprintjs/core' +import type { ItemListRenderer, ItemRenderer } from '@blueprintjs/select' +import { MultiSelect, renderFilteredItems } from '@blueprintjs/select' +import type { Team } from '@inject/graphql/fragments/Team.generated' +import { + useCallback, + useEffect, + useMemo, + useState, + type Dispatch, + type FC, + type SetStateAction, +} from 'react' + +interface TeamSelectorProps { + teams: Team[] + selectedTeamIds: string[] + setSelectedTeamIds: Dispatch<SetStateAction<string[]>> +} + +const TeamSelector: FC<TeamSelectorProps> = ({ + teams, + selectedTeamIds, + setSelectedTeamIds, +}) => { + const [allSelected, setAllSelected] = useState(false) + const [prevSelectedTeamIds, setPrevSelectedTeamIds] = + useState<string[]>(selectedTeamIds) + useEffect(() => { + if (allSelected) { + setPrevSelectedTeamIds(selectedTeamIds) + setSelectedTeamIds(teams.map(team => team.id)) + } else { + setSelectedTeamIds(prevSelectedTeamIds) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [allSelected]) + + const itemListRenderer: ItemListRenderer<Team> = useCallback( + listProps => { + const menuContent = renderFilteredItems(listProps) + + return ( + <Menu + role='listbox' + {...listProps.menuProps} + ulRef={listProps.itemsParentRef} + > + <MenuItem + text='Select all' + active={allSelected} + onClick={() => setAllSelected(prev => !prev)} + selected={allSelected} + shouldDismissPopover={false} + roleStructure='listoption' + /> + <Divider /> + {menuContent} + </Menu> + ) + }, + [allSelected] + ) + + const itemRenderer: ItemRenderer<Team> = useCallback( + (item, { handleClick, handleFocus, modifiers }) => ( + <MenuItem + active={modifiers.active || allSelected} + disabled={modifiers.disabled || allSelected} + onClick={handleClick} + onFocus={handleFocus} + roleStructure='listoption' + selected={selectedTeamIds.includes(item.id) || allSelected} + shouldDismissPopover={false} + text={item.name} + key={item.id} + /> + ), + [allSelected, selectedTeamIds] + ) + + const selectedItems = useMemo( + () => teams.filter(team => selectedTeamIds.includes(team.id)), + [teams, selectedTeamIds] + ) + + const onItemSelect = useCallback( + (team: Team) => + setSelectedTeamIds(prev => { + if (prev.includes(team.id)) { + return prev.filter(item => item !== team.id) + } + return [...prev, team.id] + }), + [setSelectedTeamIds] + ) + + return ( + <MultiSelect<Team> + fill + placeholder={allSelected ? 'All' : 'Select teams...'} + itemRenderer={itemRenderer} + items={teams} + itemPredicate={(query, item) => item.name.startsWith(query)} + onItemSelect={onItemSelect} + onRemove={item => + setSelectedTeamIds(prev => prev.filter(teamId => teamId !== item.id)) + } + popoverProps={{ + minimal: true, + }} + resetOnSelect + selectedItems={allSelected ? [] : selectedItems} + tagRenderer={item => item.name} + itemListRenderer={itemListRenderer} + popoverContentProps={{ + style: { maxHeight: '50vh', overflowY: 'auto', overflowX: 'hidden' }, + }} + /> + ) +} + +export default TeamSelector diff --git a/frontend/src/instructor/InstructorInject/index.tsx b/frontend/src/instructor/InstructorInject/index.tsx index 24f64ae371a900ccbdac6a61fbb37c5d425b113f..99cf32e385dedfafbf2454330803c0a214796d9e 100644 --- a/frontend/src/instructor/InstructorInject/index.tsx +++ b/frontend/src/instructor/InstructorInject/index.tsx @@ -1,4 +1,6 @@ import { Button, Dialog, DialogBody } from '@blueprintjs/core' +import { useGetExerciseChannels } from '@inject/graphql/queries/GetExerciseChannels.generated' +import { dialogBody, maximizedDialog } from '@inject/shared/css/dialog' import type { FC } from 'react' import { useState } from 'react' import InjectForm from './InjectForm' @@ -16,10 +18,19 @@ const InstructorInject: FC<InstructorInjectProps> = ({ }) => { const [isComposerOpen, setIsComposerOpen] = useState(false) + const { data, loading } = useGetExerciseChannels({ + variables: { exerciseId: exerciseId || '-1' }, + skip: !exerciseId, + }) + const channelName = data?.exerciseChannels?.find( + channel => channel?.type === 'INFO' + )?.name + return ( <> <Button active={isComposerOpen} + loading={loading} fill minimal alignText='left' @@ -31,15 +42,16 @@ const InstructorInject: FC<InstructorInjectProps> = ({ /> {teamId && exerciseId && ( <Dialog + className={maximizedDialog} canOutsideClickClose={false} isOpen={isComposerOpen} onClose={() => { setIsComposerOpen(false) }} - title='Send an inject into the INFO channel of the selected team' + title={`Send an inject${channelName ? ` into ${channelName}` : ''}`} icon='annotation' > - <DialogBody> + <DialogBody className={dialogBody}> <InjectForm teamId={teamId} exerciseId={exerciseId} diff --git a/frontend/src/instructor/InstructorInjectSelector/InjectCardOption.tsx b/frontend/src/instructor/InstructorInjectSelector/InjectCardOption.tsx deleted file mode 100644 index 1cbb406998697231eca73d55914bc966f59d0104..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorInjectSelector/InjectCardOption.tsx +++ /dev/null @@ -1,105 +0,0 @@ -import FileButton from '@/components/FileViewRedirectButton/FileButton' -import { Button, Card } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { InjectOption } from '@inject/graphql/fragments/InjectOption.generated' - -const th = css` - text-align: left; - vertical-align: text-top; - white-space: nowrap; - width: 150px; -` - -const td = css` - white-space: pre-wrap; - vertical-align: text-top; - padding: 5px 10px; -` - -const card = css` - display: flex; - flex-direction: column; - justify-content: space-between; - margin: 1rem; -` - -interface InjectOptionGroupProps { - onSend: () => void - selectionId: string - option: InjectOption - loading: boolean - teamId: string - exerciseId: string -} - -const InjectCardOption = ({ - onSend, - selectionId, - option, - loading, - teamId, - exerciseId, -}: InjectOptionGroupProps) => ( - <Card key={selectionId} className={card}> - <table> - <tbody> - <tr> - <th className={th}>Name</th> - <td className={td}>{option.name || '-'}</td> - </tr> - <tr> - <th className={th}>Sender</th> - <td className={td}>{option.sender || '-'}</td> - </tr> - <tr> - <th className={th}>Activate milestones</th> - <td className={td}>{option.control.activateMilestone || '-'}</td> - </tr> - <tr> - <th className={th}>Deactivate milestones</th> - <td className={td}>{option.control.deactivateMilestone || '-'}</td> - </tr> - <tr> - <th className={th}>Content</th> - <td - className={td} - aria-label='renderedContent' - dangerouslySetInnerHTML={{ - __html: option.content.rendered || '-', - }} - /> - </tr> - <tr> - <th className={th}>Attached file</th> - <td className={td}> - {option.content.fileInfo ? ( - <FileButton - fileInfo={option.content.fileInfo} - teamId={teamId} - exerciseId={exerciseId} - allowRedirect={false} - /> - ) : ( - '-' - )} - </td> - </tr> - </tbody> - </table> - - <Button - style={{ marginTop: '1rem', alignSelf: 'end' }} - type='button' - onClick={onSend} - rightIcon='send-message' - > - {loading ? 'Sending...' : 'Send'} - </Button> - </Card> -) - -InjectCardOption.defaultProps = { - disabled: false, -} - -export default InjectCardOption diff --git a/frontend/src/instructor/InstructorInjectSelector/InjectItems.tsx b/frontend/src/instructor/InstructorInjectSelector/InjectItems.tsx deleted file mode 100644 index feae8ad7df8f839be9090f0eb88c282e8c070492..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorInjectSelector/InjectItems.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { NonIdealState } from '@blueprintjs/core' -import { useGetTeamInjectSelections } from '@inject/graphql/queries/GetTeamInjectSelections.generated' -import notEmpty from '@inject/shared/utils/notEmpty' -import type { FC } from 'react' -import InjectOptionGroup from './InjectOptionGroup' - -export interface InjectItemsProps { - teamId: string - exerciseId: string - onSentSuccessfully: () => void -} - -export const InjectItems: FC<InjectItemsProps> = ({ - teamId, - exerciseId, - onSentSuccessfully, -}) => { - const { data } = useGetTeamInjectSelections({ - fetchPolicy: 'cache-only', - variables: { - teamId, - }, - }) - - const dataFiltered = - data?.teamInjectSelections?.filter(notEmpty).filter(x => !x.submitted) || [] - - if (dataFiltered.length === 0) { - return ( - <NonIdealState - title='No inject templates' - description='No inject templates are currently available' - icon='inbox-search' - /> - ) - } - - return ( - <div - style={{ - overflowY: 'scroll', - overflowX: 'hidden', - }} - > - {dataFiltered.map(selection => ( - <InjectOptionGroup - key={selection.id} - selection={selection} - onSentSuccessfully={onSentSuccessfully} - teamId={teamId} - exerciseId={exerciseId} - /> - ))} - </div> - ) -} - -export default InjectItems diff --git a/frontend/src/instructor/InstructorInjectSelector/InjectOptionGroup.tsx b/frontend/src/instructor/InstructorInjectSelector/InjectOptionGroup.tsx deleted file mode 100644 index 4ed0ff255784409fc5c708ed7b4bb43b128630f5..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorInjectSelector/InjectOptionGroup.tsx +++ /dev/null @@ -1,86 +0,0 @@ -import { Callout, H5 } from '@blueprintjs/core' -import notEmpty from '@inject/shared/utils/notEmpty' - -import type { InjectOption } from '@inject/graphql/fragments/InjectOption.generated' -import type { InjectSelection } from '@inject/graphql/fragments/InjectSelections.generated' -import { useSelectTeamInjectOption } from '@inject/graphql/mutations/SelectTeamInjectOption.generated' -import { useWriteInjectSelectionConfirmation } from '@inject/graphql/mutations/clientonly/WriteInjectSelectionConfirmation.generated' -import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import type { FC } from 'react' -import { useCallback } from 'react' -import InjectCardOption from './InjectCardOption' - -interface InjectOptionGroupProps { - selection: InjectSelection - onSentSuccessfully: () => void - teamId: string - exerciseId: string -} - -const InjectOptionGroup: FC<InjectOptionGroupProps> = ({ - selection, - onSentSuccessfully, - teamId, - exerciseId, -}) => { - const { id, name, options } = selection - - const { notify } = useNotifyContext() - const [mutate, { loading }] = useSelectTeamInjectOption() - const [update] = useWriteInjectSelectionConfirmation() - - const onSend = useCallback( - (option: InjectOption) => { - mutate({ - variables: { - selectTeamInjectInput: { - teamId, - selectionId: selection.id, - optionEmail: false, - content: option.content.raw, - activateMilestone: option.control.activateMilestone, - deactivateMilestone: option.control.deactivateMilestone, - fileId: option.content.fileInfo?.id, - sender: option.sender, - }, - }, - }) - .then(() => { - update({ - variables: { - injectSelectionId: selection.id, - }, - }) - onSentSuccessfully() - }) - .catch(err => { - notify(`Error: ${err.message}`, { intent: 'danger' }) - }) - }, - [mutate, notify, onSentSuccessfully, selection.id, teamId, update] - ) - - return ( - <Callout - style={{ - margin: '1em', - }} - key={name} - > - <H5>{name}</H5> - {options.filter(notEmpty).map(option => ( - <InjectCardOption - onSend={() => onSend(option)} - key={option.id} - selectionId={id} - option={option} - loading={loading} - teamId={teamId} - exerciseId={exerciseId} - /> - ))} - </Callout> - ) -} - -export default InjectOptionGroup diff --git a/frontend/src/instructor/InstructorInjectSelector/index.tsx b/frontend/src/instructor/InstructorInjectSelector/index.tsx deleted file mode 100644 index 33ee3f64e01a866d46d2c4a72faf7abeceff4a74..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorInjectSelector/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { Button, Drawer } from '@blueprintjs/core' -import type { FC } from 'react' -import { useState } from 'react' -import { InjectItems } from './InjectItems' - -interface InstructorInjectSelectorProps { - teamId: string - exerciseId: string - onSentSuccessfully: () => void -} - -const InstructorInjectSelector: FC<InstructorInjectSelectorProps> = ({ - teamId, - exerciseId, - onSentSuccessfully, -}) => { - const [isOpen, setIsOpen] = useState(false) - - return ( - <> - <Button - type='button' - rightIcon='multi-select' - onClick={() => setIsOpen(true)} - alignText='left' - > - Select a template - </Button> - <Drawer size='600px' isOpen={isOpen} onClose={() => setIsOpen(false)}> - <InjectItems - teamId={teamId} - exerciseId={exerciseId} - onSentSuccessfully={onSentSuccessfully} - /> - </Drawer> - </> - ) -} -export default InstructorInjectSelector diff --git a/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx b/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx index c29c01942de6e8fc2d818087ee3f752749806f9d..4ff287ab9bf0e6ac864d54cf100cccdfe882cc1f 100644 --- a/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx +++ b/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx @@ -1,10 +1,9 @@ import { Alert, Icon, SwitchCard, Tag, Tooltip } from '@blueprintjs/core' import type { MilestoneState } from '@inject/graphql/fragments/MilestoneState.generated' import { useSetMilestone } from '@inject/graphql/mutations/SetMilestone.generated' -import { GetTeamLearningObjectivesDocument } from '@inject/graphql/queries/GetTeamLearningObjectives.generated' import Timestamp from '@inject/shared/components/Timestamp' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import { useState, type FC } from 'react' +import { useEffect, useState, type FC } from 'react' interface MilestoneIndicatorProps { milestone: MilestoneState @@ -16,27 +15,33 @@ const MilestoneIndicator: FC<MilestoneIndicatorProps> = ({ teamId, }) => { const { reached, timestampReached, milestone, id } = _milestone - const [reachedAt, setReachedAt] = useState(reached) + + /* + * the switch will change its state even if the alert is cancelled; + * we track of the state separately to revert it if the alert is cancelled + */ + const [checked, setChecked] = useState(reached) + useEffect(() => setChecked(reached), [reached]) + const { notify } = useNotifyContext() const [open, setOpen] = useState(false) - const [mutate] = useSetMilestone({ - refetchQueries: [GetTeamLearningObjectivesDocument], - }) + const [mutate] = useSetMilestone() return ( <SwitchCard compact - checked={reachedAt} + checked={checked} showAsSelectedWhenChecked={false} onChange={() => { - setReachedAt(!reachedAt) + setChecked(!checked) setOpen(true) }} > <Alert + intent='warning' isOpen={open} onClose={() => setOpen(false)} - onCancel={() => setReachedAt(reached)} + onCancel={() => setChecked(reached)} onConfirm={() => { mutate({ variables: { @@ -45,7 +50,7 @@ const MilestoneIndicator: FC<MilestoneIndicatorProps> = ({ teamId, }, update: cache => { - setReachedAt(!reached) + setChecked(!reached) cache.modify({ id: cache.identify({ __typename: 'MilestoneState', id }), fields: { @@ -55,7 +60,7 @@ const MilestoneIndicator: FC<MilestoneIndicatorProps> = ({ }) }, onError(error) { - setReachedAt(reached) + setChecked(reached) notify(error.message, { intent: 'danger' }) }, }) diff --git a/frontend/src/instructor/InstructorMilestones/index.tsx b/frontend/src/instructor/InstructorMilestones/index.tsx index 0201cb89478722e2ca9eca6f210d56115857d258..726219c27ec6b106ffe7d8dc5445acdefd782498 100644 --- a/frontend/src/instructor/InstructorMilestones/index.tsx +++ b/frontend/src/instructor/InstructorMilestones/index.tsx @@ -1,7 +1,7 @@ import { CardList } from '@blueprintjs/core' import { useGetTeamMilestones } from '@inject/graphql/queries/GetTeamMilestones.generated' import notEmpty from '@inject/shared/utils/notEmpty' -import type { FC } from 'react' +import { type FC } from 'react' import MilestoneIndicator from './MilestoneIndicator' interface InstructorMilestonesProps { @@ -13,11 +13,7 @@ const InstructorMilestones: FC<InstructorMilestonesProps> = ({ teamId, reached, }) => { - const { data } = useGetTeamMilestones({ - variables: { - teamId, - }, - }) + const { data } = useGetTeamMilestones({ variables: { teamId } }) const milestones = (data?.teamMilestones || []) .filter(notEmpty) @@ -25,6 +21,7 @@ const InstructorMilestones: FC<InstructorMilestonesProps> = ({ milestone => (reached && milestone.reached) || (!reached && !milestone.reached) ) + .sort((a, b) => a.milestone.name.localeCompare(b.milestone.name)) return ( <CardList bordered={false} compact> diff --git a/frontend/src/instructor/InstructorTeamSelector/Reloader.tsx b/frontend/src/instructor/InstructorTeamSelector/Reloader.tsx deleted file mode 100644 index fdca948ac4acfd655e0d7a7ff1f61ee8f63e26ed..0000000000000000000000000000000000000000 --- a/frontend/src/instructor/InstructorTeamSelector/Reloader.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { Button } from '@blueprintjs/core' -import useTeamStateValidator from './useTeamStateValidator' - -const Reloader = () => { - const validator = useTeamStateValidator() - return ( - <Button - rightIcon='refresh' - title='Reload the list of teams, note that this will show only the teams that are currently in the exercise.' - minimal - onClick={() => { - validator() - }} - style={{ marginLeft: 'auto' }} - /> - ) -} - -export default Reloader diff --git a/frontend/src/instructor/InstructorTeamSelector/TeamButton.tsx b/frontend/src/instructor/InstructorTeamSelector/TeamButton.tsx new file mode 100644 index 0000000000000000000000000000000000000000..5b81db5a7562271e4c06b20d0d7ad116110f7bd7 --- /dev/null +++ b/frontend/src/instructor/InstructorTeamSelector/TeamButton.tsx @@ -0,0 +1,75 @@ +import type { TeamState } from '@/clientsettings/vars/teams' +import type { LinkType } from '@/components/LinkButton' +import LinkButton from '@/components/LinkButton' +import TeamLabel from '@/components/TeamLabel' +import type { Path } from '@/router' +import { useMemo, type FC } from 'react' +import { useMatches } from 'react-router-dom' + +interface TeamButtonProps { + teamState: TeamState + selectedTeamId: string | undefined + hideLabel: boolean | undefined +} + +const TeamButton: FC<TeamButtonProps> = ({ + teamState, + selectedTeamId, + hideLabel, +}) => { + const matches = useMatches() + const link: LinkType = useMemo(() => { + // deepest nested route that matches the current URL + const match = matches.at(-1) + + /* + * expected pathname is /instructor/:exerciseId/:teamId/..., + * therefore the pathMatches should be ['', 'instructor', ':exerciseId', ':teamId', ...] + */ + const pathMatches = match?.pathname.split('/') || [] + if (pathMatches.length <= 3) { + return [ + '/instructor/:exerciseId/:teamId', + { + params: { + exerciseId: teamState.team.exercise.id, + teamId: teamState.team.id, + }, + }, + ] + } + return [ + `/instructor/:exerciseId/:teamId/${pathMatches.slice(4).join('/')}` as Path, + { + params: { + exerciseId: teamState.team.exercise.id, + teamId: teamState.team.id, + }, + }, + ] + }, [matches, teamState.team.exercise.id, teamState.team.id]) + + return ( + <LinkButton + key={teamState.team.id} + link={link} + button={{ + active: teamState.team.id === selectedTeamId, + alignText: 'left', + fill: true, + minimal: true, + title: teamState.team.name, + children: ( + <TeamLabel + hideLabel={hideLabel} + teamId={teamState.team.id} + teamName={teamState.team.name} + inactive={teamState.inactive} + /> + ), + }} + /> + ) +} + +export default TeamButton diff --git a/frontend/src/instructor/InstructorTeamSelector/index.tsx b/frontend/src/instructor/InstructorTeamSelector/index.tsx index 9bc0750a7d00e98e0e2f550917b284f0d0f15aed..acd59aeeb3fafccbb7daa302f497211ea40a0780 100644 --- a/frontend/src/instructor/InstructorTeamSelector/index.tsx +++ b/frontend/src/instructor/InstructorTeamSelector/index.tsx @@ -1,5 +1,4 @@ import { toggleTeam, useTeamStateMap } from '@/clientsettings/vars/teams' -import LinkButton from '@/components/LinkButton' import TeamLabel from '@/components/TeamLabel' import { Button, @@ -9,10 +8,12 @@ import { DialogFooter, Divider, } from '@blueprintjs/core' +import Reloader from '@inject/graphql/components/Reloader' import { useSubscriptionContext } from '@inject/graphql/context/SubscriptionContext' +import { dialog, dialogBody } from '@inject/shared/css/dialog' import type { FC } from 'react' -import { useEffect, useState } from 'react' -import Reloader from './Reloader' +import { useEffect, useMemo, useState } from 'react' +import TeamButton from './TeamButton' import useTeamStateValidator from './useTeamStateValidator' interface InstructorTeamSelectorProps { @@ -30,8 +31,14 @@ const InstructorTeamSelector: FC<InstructorTeamSelectorProps> = ({ const [openSelector, setOpenSelector] = useState(false) - const teamStates = Object.values(teamStateMap ?? {}) || [] - const selectedTeamStates = teamStates.filter(teamState => teamState.show) + const teamStates = useMemo( + () => Object.values(teamStateMap ?? {}) || [], + [teamStateMap] + ) + const selectedTeamStates = useMemo( + () => teamStates.filter(teamState => teamState.show), + [teamStates] + ) useEffect(() => { validator() @@ -53,7 +60,7 @@ const InstructorTeamSelector: FC<InstructorTeamSelectorProps> = ({ <> <Button active={openSelector} - icon='select' + icon='team' alignText='left' fill minimal @@ -62,44 +69,23 @@ const InstructorTeamSelector: FC<InstructorTeamSelectorProps> = ({ onClick={() => setOpenSelector(!openSelector)} /> {selectedTeamStates.map(teamState => ( - <LinkButton + <TeamButton key={teamState.team.id} - link={[ - '/instructor/:exerciseId/:teamId', - { - params: { - exerciseId: teamState.team.exercise.id, - teamId: teamState.team.id, - }, - }, - ]} - button={{ - active: teamState.team.id === teamId, - alignText: 'left', - fill: true, - minimal: true, - title: teamState.team.name, - children: ( - <TeamLabel - hideLabel={hideLabel} - teamId={teamState.team.id} - teamName={teamState.team.name} - inactive={teamState.inactive} - /> - ), - }} + hideLabel={hideLabel} + selectedTeamId={teamId} + teamState={teamState} /> ))} <Dialog - style={{ width: 'unset' }} + className={dialog} isOpen={openSelector} onClose={() => setOpenSelector(false)} canOutsideClickClose={false} icon='team' - title='Team Selection' + title='Select teams' > - <DialogBody> + <DialogBody className={dialogBody}> {teamStates.map((teamState, i) => ( <div key={teamState.team.id}> <Checkbox @@ -130,11 +116,12 @@ const InstructorTeamSelector: FC<InstructorTeamSelectorProps> = ({ <Button onClick={() => setOpenSelector(false)} icon='tick' - text='Confirm Selection' + intent='primary' + text='Confirm' /> } > - <Reloader /> + <Reloader onRefetch={validator} minimal /> </DialogFooter> </Dialog> </> diff --git a/frontend/src/instructor/LearningObjectives/LearningActivity.tsx b/frontend/src/instructor/LearningObjectives/LearningActivity.tsx index df574efcea1de337c91ee50c50a1823064c83079..fccbe546cae7442ceb6216cfce5ef3c506c02702 100644 --- a/frontend/src/instructor/LearningObjectives/LearningActivity.tsx +++ b/frontend/src/instructor/LearningObjectives/LearningActivity.tsx @@ -16,13 +16,15 @@ const LearningActivity: FC<LearningActivityProps> = ({ activity, teamId }) => ( > <SectionCard> <CardList bordered={false}> - {activity.milestoneStates.map(milestoneState => ( - <MilestoneIndicator - key={milestoneState.id} - milestone={milestoneState} - teamId={teamId} - /> - ))} + {activity.milestoneStates + .sort((a, b) => a.milestone.name.localeCompare(b.milestone.name)) + .map(milestoneState => ( + <MilestoneIndicator + key={milestoneState.id} + milestone={milestoneState} + teamId={teamId} + /> + ))} </CardList> </SectionCard> </Section> diff --git a/frontend/src/instructor/LearningObjectives/LearningObjective.tsx b/frontend/src/instructor/LearningObjectives/LearningObjective.tsx index 724a2714ed9fa1c3c533c49d0769ddb199866c17..cfcf7cc0dd2ea2b58acb29c7572b66935f923918 100644 --- a/frontend/src/instructor/LearningObjectives/LearningObjective.tsx +++ b/frontend/src/instructor/LearningObjectives/LearningObjective.tsx @@ -20,7 +20,6 @@ const LearningObjective: FC<LearningObjectiveProps> = ({ teamId, }) => ( <Section - style={{ margin: '1rem' }} title={objective.objective.name} subtitle={objective.objective.tags} collapsible diff --git a/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx b/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx index 51c4e18d3b4f1c7fded6e0d5b6c5e78f02d93c50..17b7dd77142b8676fbaf830541773b504a6f8088 100644 --- a/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx +++ b/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx @@ -1,6 +1,5 @@ -import { useNavigate } from '@/router' -import { Button } from '@blueprintjs/core' -import { useCallback, type FC } from 'react' +import LinkButton from '@/components/LinkButton' +import { type FC } from 'react' import { matchPath } from 'react-router-dom' interface LearningObjectivesButtonProps { @@ -15,39 +14,35 @@ const LearningObjectivesButton: FC<LearningObjectivesButtonProps> = ({ teamId, hideLabel, pathname, -}) => { - const nav = useNavigate() - - const handleClick = useCallback(() => { - if (teamId && exerciseId) { - nav('/instructor/:exerciseId/:teamId/learning-objectives', { - params: { exerciseId, teamId }, - }) +}) => ( + <LinkButton + link={ + exerciseId === undefined || teamId === undefined + ? undefined + : [ + '/instructor/:exerciseId/:teamId/learning-objectives', + { params: { exerciseId, teamId } }, + ] } - }, [exerciseId, nav, teamId]) - - return ( - <Button - icon='learning' - active={ + button={{ + icon: 'learning', + active: matchPath( { path: '/instructor/:exerciseId/:teamId/learning-objectives', end: false, }, pathname - ) !== null - } - alignText='left' - fill - disabled={!teamId || !exerciseId} - minimal - text={!hideLabel && 'Learning objectives'} - title='Learning objectives' - onClick={handleClick} - style={{ whiteSpace: 'nowrap' }} - /> - ) -} + ) !== null, + alignText: 'left', + fill: true, + disabled: !teamId || !exerciseId, + minimal: true, + text: !hideLabel && 'Learning objectives', + title: 'Learning objectives', + style: { whiteSpace: 'nowrap' }, + }} + /> +) export default LearningObjectivesButton diff --git a/frontend/src/instructor/LearningObjectives/index.tsx b/frontend/src/instructor/LearningObjectives/index.tsx index 7c6c80b101af1846057a10d1882f766f51fd45d4..af7e075f9f2972cc8d6cb582d9f3ac793cd9d03f 100644 --- a/frontend/src/instructor/LearningObjectives/index.tsx +++ b/frontend/src/instructor/LearningObjectives/index.tsx @@ -1,11 +1,19 @@ import ErrorMessage from '@/components/ErrorMessage' -import { Divider, NonIdealState, Spinner } from '@blueprintjs/core' +import { NonIdealState, Spinner } from '@blueprintjs/core' +import { css } from '@emotion/css' import { useGetTeamLearningObjectives } from '@inject/graphql/queries/GetTeamLearningObjectives.generated' import Container from '@inject/shared/components/Container' import notEmpty from '@inject/shared/utils/notEmpty' import { useMemo, type FC } from 'react' import LearningObjective from './LearningObjective' +const wrapper = css` + display: flex; + flex-direction: column; + gap: 1rem; + padding: 1rem 0; +` + interface LearningObjectivesProps { teamId: string } @@ -49,12 +57,13 @@ const LearningObjectives: FC<LearningObjectivesProps> = ({ teamId }) => { } return ( - <Container> - {objectives.map((objective, index) => ( - <div key={objective.id}> - <LearningObjective objective={objective} teamId={teamId} /> - {index !== objectives.length - 1 && <Divider />} - </div> + <Container className={wrapper}> + {objectives.map(objective => ( + <LearningObjective + key={objective.id} + objective={objective} + teamId={teamId} + /> ))} </Container> ) diff --git a/frontend/src/instructor/MilestoneSelector/MilestoneSelector.tsx b/frontend/src/instructor/MilestoneSelector/MilestoneSelector.tsx index 5efc94b890a4889637fcc67fb2f30d6b70b15a56..bbf2631e1b2e90767bec6866b1e1da3cd1453f76 100644 --- a/frontend/src/instructor/MilestoneSelector/MilestoneSelector.tsx +++ b/frontend/src/instructor/MilestoneSelector/MilestoneSelector.tsx @@ -75,7 +75,6 @@ const MilestoneSelector = ({ setDeactivateMilestone, }: MilestoneSelectorProps) => { const { data } = useGetTeamMilestones({ - fetchPolicy: 'cache-only', variables: { teamId, }, @@ -186,6 +185,9 @@ const MilestoneSelector = ({ popoverProps={{ minimal: true, }} + popoverContentProps={{ + style: { maxHeight: '50vh', overflowY: 'auto', overflowX: 'hidden' }, + }} /> ) } diff --git a/frontend/src/logic/GraphiQL/index.tsx b/frontend/src/logic/GraphiQL/index.tsx index f522d0a2f13ae1d2e1b83b2962dd8732831ea4d3..33995b3934bbe906a175a5c18205e91d28c94a3d 100644 --- a/frontend/src/logic/GraphiQL/index.tsx +++ b/frontend/src/logic/GraphiQL/index.tsx @@ -1,12 +1,13 @@ -import { Button } from '@blueprintjs/core' +import { useNavigate } from '@/router' +import { Alert } from '@blueprintjs/core' import { createGraphiQLFetcher } from '@graphiql/toolkit' import { useAuthIdentity } from '@inject/graphql/auth' import { useHost } from '@inject/graphql/connection/host' import { useWs } from '@inject/graphql/connection/ws' import { httpGraphql } from '@inject/shared/config' -import { usePopupContext } from '@inject/shared/popup/PopupContext' import csrfFetch from '@inject/shared/utils/csrfFetch' -import { Suspense, lazy, useEffect, useState } from 'react' +import { useLocalStorageState } from 'ahooks' +import { Suspense, lazy } from 'react' const GraphiQL = lazy(() => import('graphiql')) import('graphiql/graphiql.css') @@ -14,35 +15,13 @@ import('graphiql/graphiql.css') const GraphiQLPage = /* @__PURE__ */ () => { const ws = useWs() const host = useHost() - const { isStaff } = useAuthIdentity(!!window.INJECT_NOAUTH) - const { showPopup } = usePopupContext() - const [confirmed, setConfirmed] = useState(false) + const { isStaff } = useAuthIdentity() + const [confirmed, setConfirmed] = useLocalStorageState('graphiql-confirmed', { + defaultValue: false, + }) + const nav = useNavigate() - const Dialog = () => ( - <div> - <p> - You are about to access the GraphiQL interface. - <br /> - This interface allows you to interact with the backend directly. - <br /> - <strong> - Do not use this interface unless you know what you are doing. - </strong> - </p> - <p> - <strong>Are you sure you want to proceed?</strong> - <Button fill intent='danger' onClick={() => setConfirmed(true)}> - Yes - </Button> - </p> - </div> - ) - useEffect(() => { - if (!confirmed) { - showPopup(3, <Dialog />) - } - }, [confirmed]) - if (!isStaff || !confirmed) { + if (!isStaff) { return <p>You are not authorized to access this page</p> } @@ -53,8 +32,8 @@ const GraphiQLPage = /* @__PURE__ */ () => { const http = httpGraphql(host) return ( - <Suspense fallback={<p>Loading...</p>}> - <div style={{ height: 'calc(100vh - 3rem)' }}> + <> + <Suspense fallback={<p>Loading...</p>}> <GraphiQL fetcher={createGraphiQLFetcher({ url: http, @@ -62,8 +41,27 @@ const GraphiQLPage = /* @__PURE__ */ () => { fetch: csrfFetch, })} /> - </div> - </Suspense> + </Suspense> + <Alert + isOpen={!confirmed} + cancelButtonText='Cancel' + onCancel={() => nav('/')} + confirmButtonText='Confirm' + icon='warning-sign' + intent='warning' + onConfirm={() => setConfirmed(true)} + > + <p> + You are about to access the GraphiQL interface. This interface allows + you to interact with the backend directly. + </p> + <p> + <strong> + Do not use this interface unless you know what you are doing. + </strong> + </p> + </Alert> + </> ) } diff --git a/frontend/src/logic/Login/index.tsx b/frontend/src/logic/Login/index.tsx index 05a6ebf15e1951ec97c0e7a2865f3ba3df58a189..5f6d66e2ab8fee1d5288aa2afd55a7479c0c6b49 100644 --- a/frontend/src/logic/Login/index.tsx +++ b/frontend/src/logic/Login/index.tsx @@ -1,5 +1,5 @@ import ErrorMessage from '@/components/ErrorMessage' -import { Button, InputGroup, NonIdealState, Spinner } from '@blueprintjs/core' +import { Button, InputGroup, NonIdealState } from '@blueprintjs/core' import { css } from '@emotion/css' import useApolloClient from '@inject/graphql/client/useApolloClient' import { useLogin } from '@inject/graphql/mutations/Login.generated' @@ -14,7 +14,7 @@ const loginForm = css` flex-direction: column; gap: 1rem; margin: 0 auto; - max-width: 400px; + max-width: 30rem; padding: 1rem; width: 100%; ` @@ -64,10 +64,6 @@ const Login = () => { [login] ) - if (window.INJECT_NOAUTH) { - return <div>Auth disabled</div> - } - const LoginForm = () => ( <form onSubmit={handleSubmit(username, password)} className={loginForm}> <InputGroup @@ -80,9 +76,8 @@ const Login = () => { onChange={e => (password.current = e.target.value)} placeholder='Password' /> - <Button type='submit' disabled={loading}> - {!loading && 'Login'} - {loading && <Spinner size={16} />} + <Button type='submit' loading={loading} intent='primary'> + Login </Button> </form> ) diff --git a/frontend/src/clientsettings/components/Logout.tsx b/frontend/src/logic/Login/useHandleLogout.tsx similarity index 61% rename from frontend/src/clientsettings/components/Logout.tsx rename to frontend/src/logic/Login/useHandleLogout.tsx index aea3d2a174597ca1183283568bd6f07b0c4194d0..ee03d18524cd58b2c53a3246f1a65a12978253f6 100644 --- a/frontend/src/clientsettings/components/Logout.tsx +++ b/frontend/src/logic/Login/useHandleLogout.tsx @@ -1,30 +1,24 @@ import { useNavigate } from '@/router' -import { Button, Section } from '@blueprintjs/core' import useApolloClient from '@inject/graphql/client/useApolloClient' import { useLogout } from '@inject/graphql/mutations/Logout.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -const Logout = () => { +const useHandleLogout = () => { const [logout] = useLogout() const nav = useNavigate() const apollo = useApolloClient() + const { clearNotify } = useNotifyContext() - const handleLogout = async () => { + return async () => { await logout() document.cookie = 'sessionid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;' localStorage.clear() apollo.clearStore() apollo.cache.reset() + clearNotify() nav('/login') } - - return ( - <Section - title='Logout' - rightElement={<Button onClick={handleLogout}>Logout</Button>} - subtitle='Logout from the application' - /> - ) } -export default Logout +export default useHandleLogout diff --git a/frontend/src/logic/Reloader/index.tsx b/frontend/src/logic/Reloader/index.tsx deleted file mode 100644 index d589f978af5ab6a4867149d84f84371e1bcde290..0000000000000000000000000000000000000000 --- a/frontend/src/logic/Reloader/index.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import type { ButtonProps } from '@blueprintjs/core' -import { Button } from '@blueprintjs/core' -import useApolloClient from '@inject/graphql/client/useApolloClient' -import { GetRunningExercisesDocument } from '@inject/graphql/queries/GetRunningExercises.generated' -import { useCountDown } from 'ahooks' -import { useState } from 'react' - -const Reloader = ( - props: Omit<ButtonProps, 'rightIcon' | 'title' | 'onClick' | 'children'> -) => { - const client = useApolloClient() - const fn = () => { - setTargetDate(Date.now() + 10500) - client.refetchQueries({ include: [GetRunningExercisesDocument] }) - } - const [targetDate, setTargetDate] = useState(Date.now() + 10500) - const [, { seconds }] = useCountDown({ - targetDate, - onEnd: () => { - fn() - }, - }) - return ( - <Button - rightIcon='refresh' - title='Reload the team list' - onClick={() => { - fn() - }} - {...props} - > - <span - style={{ - minWidth: '3ch', - display: 'inline-block', - textAlign: 'center', - }} - > - {`${seconds}s`} - </span> - </Button> - ) -} - -export default Reloader diff --git a/frontend/src/logic/StaffSelector/index.tsx b/frontend/src/logic/StaffSelector/index.tsx index 936a95bf765bb8f6eec977ee7930be2d58594f33..a083ef2837cd0afe9b035f1cfaf41327cb1aa349 100644 --- a/frontend/src/logic/StaffSelector/index.tsx +++ b/frontend/src/logic/StaffSelector/index.tsx @@ -1,44 +1,50 @@ import { useTeamStateMap } from '@/clientsettings/vars/teams' -import { useNavigate } from '@/router' -import { Button, ButtonGroup } from '@blueprintjs/core' +import LinkButton from '@/components/LinkButton' +import { ButtonGroup } from '@blueprintjs/core' +import { css } from '@emotion/css' +import Reloader from '@inject/graphql/components/Reloader' import { useGetRunningExercises } from '@inject/graphql/queries/GetRunningExercises.generated' import type { FC } from 'react' -import Reloader from '../Reloader' + +const wrapper = css` + display: flex; + justify-content: space-between; + align-items: center; + gap: 0.5rem; +` interface StaffSelectorInterface { enableRefresh?: boolean } const StaffSelector: FC<StaffSelectorInterface> = ({ enableRefresh }) => { - const { data } = useGetRunningExercises() + const { data, refetch } = useGetRunningExercises() const teamStateMap = useTeamStateMap() - const nav = useNavigate() const anyExerciseRunning = (data?.exercises?.length || 0) > 0 return ( - <> + <div className={wrapper}> <ButtonGroup large fill> - <Button - icon='intelligence' - title={ - anyExerciseRunning + <LinkButton + link={['/instructor']} + button={{ + icon: 'intelligence', + title: anyExerciseRunning ? 'Enter Instructor view' - : 'Please wait for the administrator to start the exercises' - } - disabled={ - !anyExerciseRunning && Object.keys(teamStateMap).length === 0 - } - onClick={() => nav('/instructor')} - > - Instructor - </Button> - <Button icon='series-search' onClick={() => nav('/analyst')}> - Analyst - </Button> - {enableRefresh && <Reloader />} + : 'Please wait for the administrator to start the exercises', + disabled: + !anyExerciseRunning && Object.keys(teamStateMap).length === 0, + text: 'Instructor', + }} + /> + <LinkButton + link={['/analyst']} + button={{ icon: 'series-search', text: 'Analyst' }} + /> </ButtonGroup> - </> + {enableRefresh && <Reloader minimal onRefetch={refetch} />} + </div> ) } diff --git a/frontend/src/logic/TeamSelector/components/TeamButton.tsx b/frontend/src/logic/TeamSelector/components/TeamButton.tsx deleted file mode 100644 index 679d4d68b42730615642dea192230ccefb975545..0000000000000000000000000000000000000000 --- a/frontend/src/logic/TeamSelector/components/TeamButton.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { Link } from '@/router' -import { Button } from '@blueprintjs/core' -import type { FC } from 'react' - -interface TeamButtonProps { - teamId: string - name: string - exerciseId: string -} - -const TeamButton: FC<TeamButtonProps> = ({ teamId, name, exerciseId }) => ( - <Link - to='/trainee/:exerciseId/:teamId' - params={{ - exerciseId, - teamId, - }} - > - <Button type='button'>{name}</Button> - </Link> -) - -export default TeamButton diff --git a/frontend/src/logic/TeamSelector/index.tsx b/frontend/src/logic/TeamSelector/index.tsx index bdb338a51a1531b8b414188c28219205bf97c4ce..06597169af69f5241b7729c1bddf722e21028a5f 100644 --- a/frontend/src/logic/TeamSelector/index.tsx +++ b/frontend/src/logic/TeamSelector/index.tsx @@ -1,32 +1,24 @@ import ErrorMessage from '@/components/ErrorMessage' +import LinkButton from '@/components/LinkButton' import TeamLabel from '@/components/TeamLabel' -import { useNavigate } from '@/router' import { - Card, - CardList, + ButtonGroup, Classes, NonIdealState, Section, SectionCard, } from '@blueprintjs/core' import { ChevronRight } from '@blueprintjs/icons' -import { css } from '@emotion/css' +import Reloader from '@inject/graphql/components/Reloader' import type { Team } from '@inject/graphql/fragments/Team.generated' import { useGetRunningExercises } from '@inject/graphql/queries/GetRunningExercises.generated' import notEmpty from '@inject/shared/utils/notEmpty' import { useMemo } from 'react' -import Reloader from '../Reloader' - -const between = css` - justify-content: space-between; - gap: 1rem; -` const TeamSelector = () => { - const { error, data } = useGetRunningExercises({ + const { error, data, refetch } = useGetRunningExercises({ fetchPolicy: 'network-only', }) - const nav = useNavigate() const exercises = useMemo( () => (data?.exercises || []).filter(notEmpty), @@ -45,7 +37,7 @@ const TeamSelector = () => { return ( <Section title='Trainee Team Selection' - rightElement={<Reloader minimal fill />} + rightElement={<Reloader minimal fill onRefetch={refetch} />} > {exercises.length === 0 && ( <div style={{ padding: '1rem' }}> @@ -60,30 +52,29 @@ const TeamSelector = () => { <h3 style={{ paddingBottom: '1rem' }} >{`Exercise: ${exercise.name}`}</h3> - <CardList bordered> + <ButtonGroup vertical fill> {exercise.teams.map((team: Team) => ( - <Card - interactive - onClick={() => - nav('/trainee/:exerciseId/:teamId', { - params: { - exerciseId: exercise.id, - teamId: team.id, - }, - }) - } - className={between} + <LinkButton key={team.id} - > - <TeamLabel - teamId={team.id} - teamName={team.name} - teamRole={team.role} - /> - <ChevronRight className={Classes.TEXT_MUTED} /> - </Card> + link={[ + '/trainee/:exerciseId/:teamId', + { params: { exerciseId: exercise.id, teamId: team.id } }, + ]} + button={{ + style: { padding: '1rem' }, + alignText: 'left', + rightIcon: <ChevronRight className={Classes.TEXT_MUTED} />, + children: ( + <TeamLabel + teamId={team.id} + teamName={team.name} + teamRole={team.role} + /> + ), + }} + /> ))} - </CardList> + </ButtonGroup> </SectionCard> ))} </Section> diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 7e6b0a8f075b086f1f9e43596359bbde9e4d2250..ebe0a5049ec389f3a0926e83158ab366017c748c 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,21 +1,18 @@ -import '@/clientsettings/vars/colormode' -import '@blueprintjs/core/lib/css/blueprint.css' +import '@fontsource/inter' import 'normalize.css' import React from 'react' import ReactDOM from 'react-dom/client' -import './global.css' +import './global.scss' import { OverlaysProvider } from '@blueprintjs/core' -import { NotificationEngine } from '@inject/shared/notification/NotificationEngine' import Application from './application' import './icons' +import NotificationEngine from './notifications/NotificationEngine' declare global { interface Window { VITE_HTTP_HOST: string VITE_HTTP_WS?: string - - INJECT_NOAUTH?: string } } diff --git a/shared/notification/NotificationEngine.tsx b/frontend/src/notifications/NotificationEngine.tsx similarity index 77% rename from shared/notification/NotificationEngine.tsx rename to frontend/src/notifications/NotificationEngine.tsx index cf5d2ffec47e554927eae9aaa08e5e49edeb8022..aec92c3702085e62e88018ed6035d1961c5b258f 100644 --- a/shared/notification/NotificationEngine.tsx +++ b/frontend/src/notifications/NotificationEngine.tsx @@ -1,9 +1,12 @@ +import NotificationListContext from '@inject/shared/notification/contexts/NotificationListContext' +import { NotifyProvider } from '@inject/shared/notification/contexts/NotifyContext' +import toaster from '@inject/shared/notification/toaster' +import type { + NotifyContextProps, + OmittedToastProps, +} from '@inject/shared/notification/typing' import type { PropsWithChildren } from 'react' import { useCallback, useMemo } from 'react' -import NotificationListContext from './contexts/NotificationListContext' -import { NotifyProvider } from './contexts/NotifyContext' -import toaster from './toaster' -import type { NotifyContextProps, OmittedToastProps } from './typing' import useNotificationStorage from './useNotificationStorage' export const NotificationEngine = ({ children }: PropsWithChildren) => { @@ -12,7 +15,9 @@ export const NotificationEngine = ({ children }: PropsWithChildren) => { const removeNotify = useCallback( (timestamp: number) => { setNotifications( - prev => prev?.filter(x => x.timestamp !== timestamp) ?? [] + prev => + prev?.filter(notification => notification.timestamp !== timestamp) ?? + [] ) }, [setNotifications] diff --git a/frontend/src/notifications/useNotificationStorage.ts b/frontend/src/notifications/useNotificationStorage.ts new file mode 100644 index 0000000000000000000000000000000000000000..40016057b0739ac9eb43de147c49377217db671f --- /dev/null +++ b/frontend/src/notifications/useNotificationStorage.ts @@ -0,0 +1,19 @@ +import useNotificationLimit from '@/clientsettings/NotificationLimit/useNotificationLimit' +import { + makeVar, + useLocalStorageReactiveVar, +} from '@inject/graphql/client/reactive' +import type { NotificationProps } from '@inject/shared/notification/typing' + +const KEY = 'notifications' +const notificationsReactiveVar = makeVar<NotificationProps[]>([]) + +const useNotificationStorage = () => { + const [notificationLimit] = useNotificationLimit() + return useLocalStorageReactiveVar(notificationsReactiveVar, KEY, { + serializer: value => JSON.stringify(value.slice(-notificationLimit)), + deserializer: value => JSON.parse(value).slice(-notificationLimit), + }) +} + +export default useNotificationStorage diff --git a/frontend/src/pages/(navbar)/_layout.tsx b/frontend/src/pages/(navbar)/_layout.tsx index ad8d32270c721eee885517b6ddc4032e2151b8bd..a0a355c1d2e39089b2679747e1750ccb2694356d 100644 --- a/frontend/src/pages/(navbar)/_layout.tsx +++ b/frontend/src/pages/(navbar)/_layout.tsx @@ -2,10 +2,11 @@ import Navbar from '@/components/Navbar' import { Outlet } from 'react-router-dom' const Layout = () => ( - <> - <Outlet /> - <Navbar /> - </> + <div style={{ height: '100vh' }}> + <Navbar> + <Outlet /> + </Navbar> + </div> ) export default Layout diff --git a/frontend/src/pages/(navbar)/exercise-panel.tsx b/frontend/src/pages/(navbar)/exercise-panel.tsx deleted file mode 100644 index 26c041e95f237699ae75870f56ca8f9cf9fb6790..0000000000000000000000000000000000000000 --- a/frontend/src/pages/(navbar)/exercise-panel.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import GitVersion from '@/components/GitVersion' -import DefinitionManager from '@/exercisepanel/DefinitionManager' -import ExerciseManager from '@/exercisepanel/ExerciseManager' -import { useSetPageTitle } from '@/utils' -import { css } from '@emotion/css' -import { Modals } from '@generouted/react-router' -import Container from '@inject/shared/components/Container' - -const wrapper = css` - padding: 1rem 0; - display: flex; - flex-direction: column; - gap: 1rem; -` - -const ExercisePanel = () => { - useSetPageTitle('Exercise Panel') - - return ( - <> - <Container> - <div className={wrapper}> - <DefinitionManager /> - <ExerciseManager /> - <GitVersion /> - </div> - </Container> - - {/* needed for the DefinitionManager, as it uses a modal path */} - <Modals /> - </> - ) -} - -export default ExercisePanel diff --git a/frontend/src/pages/(navbar)/exercise-panel/_layout.tsx b/frontend/src/pages/(navbar)/exercise-panel/_layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a7c24a533c3d13d265953d96b093b4b3f2ccfdf8 --- /dev/null +++ b/frontend/src/pages/(navbar)/exercise-panel/_layout.tsx @@ -0,0 +1,17 @@ +import { useSetPageTitle, useStaffBoundary } from '@/utils' +import Container from '@inject/shared/components/Container' +import flexedPage from '@inject/shared/css/flexedPage' +import { Outlet } from 'react-router-dom' + +const Layout = () => { + useStaffBoundary() + useSetPageTitle('Exercise Panel') + + return ( + <Container className={flexedPage}> + <Outlet /> + </Container> + ) +} + +export default Layout diff --git a/frontend/src/pages/(navbar)/exercise-panel/definition/[definitionId]/index.tsx b/frontend/src/pages/(navbar)/exercise-panel/definition/[definitionId]/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2fba91f95cbdecbecf6eae1401b6cd64fbbedf48 --- /dev/null +++ b/frontend/src/pages/(navbar)/exercise-panel/definition/[definitionId]/index.tsx @@ -0,0 +1,10 @@ +import { useParams } from '@/router' +import DefinitionAssignment from '@/users/DefinitionAssignment' + +const DefinitionAssignmentPage = () => { + const { definitionId } = useParams('/exercise-panel/definition/:definitionId') + + return <DefinitionAssignment definitionId={definitionId} /> +} + +export default DefinitionAssignmentPage diff --git a/frontend/src/pages/(navbar)/exercise-panel/exercise/[exerciseId]/index.tsx b/frontend/src/pages/(navbar)/exercise-panel/exercise/[exerciseId]/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..ee43e8ecf4fed10ad5a25e2deb41ed82baf472a1 --- /dev/null +++ b/frontend/src/pages/(navbar)/exercise-panel/exercise/[exerciseId]/index.tsx @@ -0,0 +1,10 @@ +import { useParams } from '@/router' +import ExerciseAssignment from '@/users/ExerciseAssignment' + +const ExerciseAssignmentPage = () => { + const { exerciseId } = useParams('/exercise-panel/exercise/:exerciseId') + + return <ExerciseAssignment exerciseId={exerciseId} /> +} + +export default ExerciseAssignmentPage diff --git a/frontend/src/pages/(navbar)/exercise-panel/index.tsx b/frontend/src/pages/(navbar)/exercise-panel/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2a5925b9c1129a1a1f0a974324799e8eac2c0628 --- /dev/null +++ b/frontend/src/pages/(navbar)/exercise-panel/index.tsx @@ -0,0 +1,24 @@ +import GitVersion from '@/components/GitVersion' +import DefinitionManager from '@/exercisepanel/DefinitionManager' +import ExerciseManager from '@/exercisepanel/ExerciseManager' +import ExportImport from '@/exercisepanel/ExportImport' +import { Modals } from '@generouted/react-router' +import useAuthIdentity from '@inject/graphql/auth' + +const ExercisePanel = () => { + const { isSuperuser } = useAuthIdentity() + + return ( + <> + {isSuperuser && <ExportImport />} + <DefinitionManager /> + <ExerciseManager /> + <GitVersion /> + + {/* needed for the DefinitionManager, as it uses a modal path */} + <Modals /> + </> + ) +} + +export default ExercisePanel diff --git a/frontend/src/pages/(navbar)/graphiql.tsx b/frontend/src/pages/(navbar)/graphiql.tsx index db2a7133787ed8ae0d7cb8d36e8769aa1b3cd567..2d9fae3e934b2df07799fbdd2644f3a6187b1c6e 100644 --- a/frontend/src/pages/(navbar)/graphiql.tsx +++ b/frontend/src/pages/(navbar)/graphiql.tsx @@ -1,11 +1,16 @@ +import { useSetPageTitle } from '@/utils' import { Suspense, lazy } from 'react' const GraphiQLPage = lazy(() => import('@/logic/GraphiQL')) -export const GraphiQL = () => ( - <Suspense> - <GraphiQLPage /> - </Suspense> -) +export const GraphiQL = () => { + useSetPageTitle('GraphiQL') + + return ( + <Suspense> + <GraphiQLPage /> + </Suspense> + ) +} export default GraphiQL diff --git a/frontend/src/pages/(navbar)/index.tsx b/frontend/src/pages/(navbar)/index.tsx index e72d58d9b131e3d204498706578aa0ebb1e4865e..3050a24f2738de8694a1c9e0af6e65ae10842dbc 100644 --- a/frontend/src/pages/(navbar)/index.tsx +++ b/frontend/src/pages/(navbar)/index.tsx @@ -2,15 +2,49 @@ import InjectLogo from '@/assets/inject-logo--vertical-black.svg?react' import StaffSelector from '@/logic/StaffSelector' import TeamSelector from '@/logic/TeamSelector' import { useNavigate } from '@/router' +import { useSetPageTitle } from '@/utils' import { Checkbox, Collapse } from '@blueprintjs/core' +import { css } from '@emotion/css' import { useAuthIdentity } from '@inject/graphql/auth' import Container from '@inject/shared/components/Container' import { useEffect, useState } from 'react' +const index = css` + min-height: 100%; + height: fit-content; + display: flex; + flex-direction: column; + justify-content: center; +` + +const logo = css` + height: 20rem; + width: fit-content; + + @media (max-width: 40rem) { + height: 15rem; + } +` + +const intro = css` + display: flex; + flex-direction: row-reverse; + justify-content: center; + align-items: center; + gap: 1rem; + text-align: center; + + @media (max-width: 40rem) { + flex-direction: column; + gap: 0; + margin-bottom: 1rem; + } +` + const Index = () => { - const { isActive, isStaff, isSuperuser, isLogged, loading } = useAuthIdentity( - !!window.INJECT_NOAUTH - ) + useSetPageTitle('') + const { isActive, isStaff, isSuperuser, isLogged, loading } = + useAuthIdentity() const nav = useNavigate() useEffect(() => { if (!isLogged && !loading) { @@ -20,60 +54,45 @@ const Index = () => { const [enableTrainee, setEnableTrainee] = useState(false) return ( - <div - style={{ - display: 'flex', - height: '100%', - flexDirection: 'column', - justifyContent: 'center', - }} - > - <Container> - <InjectLogo - style={{ - width: '210px', - height: '200px', - display: 'inline-block', - float: 'right', - }} - /> - <h1>Welcome</h1> - <p> - Embark on a journey of strategic crisis management and incident - response. Our scenarios will enhance your skills and team - collaboration to boost the resilience of your organization. - </p> - </Container> - <Container> - {((isActive && !isStaff) || window.INJECT_NOAUTH) && ( - <> - <h2>Select your team/role</h2> + <Container className={index}> + <div className={intro}> + <InjectLogo className={logo} /> + <div> + <h1>Welcome</h1> + <p> + Embark on a journey of strategic crisis management and incident + response. Our scenarios will enhance your skills to boost the + resilience of your organization. + </p> + </div> + </div> + + {isActive && !isStaff && ( + <> + <h2>Select your team</h2> + <TeamSelector /> + <br /> + </> + )} + {(isStaff || isSuperuser) && ( + <> + <h2>Select your role</h2> + <br /> + <StaffSelector enableRefresh={!enableTrainee} /> + <br /> + <Checkbox + checked={enableTrainee} + onChange={e => setEnableTrainee(e.target.checked)} + > + Enable trainee team list (allows you to enter exercises as a trainee + for testing purposes) + </Checkbox> + <Collapse isOpen={enableTrainee} keepChildrenMounted={false}> <TeamSelector /> - <br /> - </> - )} - {(isStaff || isSuperuser) && !window.INJECT_NOAUTH && ( - <> - <h2>Select your administrative role</h2> - <br /> - <StaffSelector enableRefresh={!enableTrainee} /> - <br /> - <Checkbox - checked={enableTrainee} - onChange={e => setEnableTrainee(e.target.checked)} - > - Enable trainee exercise list (allows you to enter exercises as a - trainee for testing purposes) - </Checkbox> - <Collapse isOpen={enableTrainee} keepChildrenMounted={false}> - <br /> - <h2>Trainee Team Selection</h2> - <TeamSelector /> - </Collapse> - </> - )} - </Container> - </div> + </Collapse> + </> + )} + </Container> ) } diff --git a/frontend/src/pages/(navbar)/settings.tsx b/frontend/src/pages/(navbar)/settings.tsx index d2fd5696a5bc54dbb21382e444f526f98a85df68..45506c1574a988c7967675d07452c2b104cb0197 100644 --- a/frontend/src/pages/(navbar)/settings.tsx +++ b/frontend/src/pages/(navbar)/settings.tsx @@ -1,39 +1,42 @@ -import ColorMode from '@/clientsettings/components/ColorMode' +import ColorMode from '@/clientsettings/ColorMode' +import NotificationLimit from '@/clientsettings/NotificationLimit' import Connection from '@/clientsettings/components/Connection' +import Experimental from '@/clientsettings/components/Experimental' import GraphiQL from '@/clientsettings/components/GraphiQL' -import InstructorTeams from '@/clientsettings/components/InstructorTeams' -import Logout from '@/clientsettings/components/Logout' -import Notification from '@/clientsettings/components/Notification' -import RelativeTime from '@/clientsettings/components/RelativeTime' import { useSetPageTitle } from '@/utils' +import { Section, SectionCard } from '@blueprintjs/core' import { css } from '@emotion/css' import { useAuthIdentity } from '@inject/graphql/auth' import Container from '@inject/shared/components/Container' -const heading = css` - margin: 1rem 0 0.5rem 0; +const wrapper = css` + padding: 1rem 0; + display: flex; + flex-direction: column; + gap: 1rem; +` + +const sectionBody = css` + display: flex; + flex-direction: column; + gap: 1rem; ` const Settings = () => { useSetPageTitle('Settings') - const { isStaff, isSuperuser } = useAuthIdentity(!!window.INJECT_NOAUTH) + const { isSuperuser } = useAuthIdentity() return ( - <Container> - <h2 className={heading}>Settings</h2> - <Notification /> - <ColorMode /> - {!window.INJECT_NOAUTH && <Logout />} - <Connection /> - {isSuperuser && !window.INJECT_NOAUTH && <GraphiQL />} - {isStaff && ( - <> - <h2 className={heading}>Instructor</h2> - <InstructorTeams /> - <h2 className={heading}>Analyst</h2> - <RelativeTime /> - </> - )} + <Container className={wrapper}> + <Section title='Settings' icon='cog'> + <SectionCard className={sectionBody}> + <ColorMode /> + <NotificationLimit /> + <Connection /> + {isSuperuser && <GraphiQL />} + <Experimental /> + </SectionCard> + </Section> </Container> ) } diff --git a/frontend/src/pages/(navbar)/users/[userId]/index.tsx b/frontend/src/pages/(navbar)/users/[userId]/index.tsx index b7f883ab176b1a46f49c1cc4ee0103c5b6120052..81648aa8c37091a0871ed30387626ae474ac9497 100644 --- a/frontend/src/pages/(navbar)/users/[userId]/index.tsx +++ b/frontend/src/pages/(navbar)/users/[userId]/index.tsx @@ -1,17 +1,13 @@ -import { useNavigate, useParams } from '@/router' +import { useParams } from '@/router' import UserDetail from '@/users/UserDetail' -import { Button } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import flexedPage from '@inject/shared/css/flexedPage' const UserView = () => { const { userId } = useParams('/users/:userId') - const nav = useNavigate() return ( - <Container makeFullHeight> - <Button type='button' onClick={() => nav('/users')}> - Back - </Button> + <Container className={flexedPage}> <UserDetail userId={userId} /> </Container> ) diff --git a/frontend/src/pages/(navbar)/users/_layout.tsx b/frontend/src/pages/(navbar)/users/_layout.tsx deleted file mode 100644 index b72fa7ef516545626480aa84266bbafa69c6e812..0000000000000000000000000000000000000000 --- a/frontend/src/pages/(navbar)/users/_layout.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { useSetPageTitle } from '@/utils' -import { Outlet } from 'react-router-dom' - -const Layout = () => { - useSetPageTitle('User management') - - return <Outlet /> -} - -export default Layout diff --git a/frontend/src/pages/(navbar)/users/definition/[definitionId]/index.tsx b/frontend/src/pages/(navbar)/users/definition/[definitionId]/index.tsx deleted file mode 100644 index 001689727344649e0b7caf33b214abd166eabec7..0000000000000000000000000000000000000000 --- a/frontend/src/pages/(navbar)/users/definition/[definitionId]/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useNavigate, useParams } from '@/router' -import DefinitionAssignment from '@/users/DefinitionAssignment' -import { Button } from '@blueprintjs/core' -import Container from '@inject/shared/components/Container' -import { useLocation } from 'react-router-dom' - -const DefinitionAssignmentPage = () => { - const { definitionId } = useParams('/users/definition/:definitionId') - const nav = useNavigate() - const { state } = useLocation() - - return ( - <Container makeFullHeight> - {state?.fromUserDetail ? ( - <Button - type='button' - onClick={() => { - nav(-1) - }} - > - Return to user detail - </Button> - ) : ( - <Button - type='button' - onClick={() => { - nav('/exercise-panel') - }} - > - Return to exercise panel - </Button> - )} - <DefinitionAssignment definitionId={definitionId} /> - </Container> - ) -} - -export default DefinitionAssignmentPage diff --git a/frontend/src/pages/(navbar)/users/exercise/[exerciseId]/index.tsx b/frontend/src/pages/(navbar)/users/exercise/[exerciseId]/index.tsx deleted file mode 100644 index 39f38239f6c43627738eea42b06c10e907e6f583..0000000000000000000000000000000000000000 --- a/frontend/src/pages/(navbar)/users/exercise/[exerciseId]/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { useNavigate, useParams } from '@/router' -import ExerciseAssignment from '@/users/ExerciseAssignment' -import { Button } from '@blueprintjs/core' -import Container from '@inject/shared/components/Container' -import { useLocation } from 'react-router-dom' - -const ExerciseAssignmentPage = () => { - const { exerciseId } = useParams('/users/exercise/:exerciseId') - const nav = useNavigate() - const { state } = useLocation() - - return ( - <Container makeFullHeight> - {state?.fromUserDetail ? ( - <Button - type='button' - onClick={() => { - nav(-1) - }} - > - Return to user detail - </Button> - ) : ( - <Button - type='button' - onClick={() => { - nav('/exercise-panel') - }} - > - Return to exercise panel - </Button> - )} - <ExerciseAssignment exerciseId={exerciseId} /> - </Container> - ) -} - -export default ExerciseAssignmentPage diff --git a/frontend/src/pages/(navbar)/users/index.tsx b/frontend/src/pages/(navbar)/users/index.tsx index f77ddb2cf99ab3b26e5602b1ba057c6533221961..6d8432e8f66db7abdd2b7f0c5cd9f762f0cef32b 100644 --- a/frontend/src/pages/(navbar)/users/index.tsx +++ b/frontend/src/pages/(navbar)/users/index.tsx @@ -1,20 +1,107 @@ +import type { Section } from '@/components/Sidebar' +import Sidebar from '@/components/Sidebar' import { useNavigate } from '@/router' -import UserTable from '@/users/UserTable' -import { useSetPageTitle } from '@/utils' +import UserCreator from '@/users/UserCreator' +import Active from '@/users/UserTable/Filters/Active' +import Columns from '@/users/UserTable/Filters/Columns' +import Tags from '@/users/UserTable/Filters/Tags' +import UserGroups from '@/users/UserTable/Filters/UserGroups' +import useUserTable from '@/users/UserTable/useUserTable' +import type { UserProperty } from '@/users/UserTable/utils' +import { AUTH_GROUPS, USER_PROPERTIES } from '@/users/UserTable/utils' +import UsersUploader from '@/users/UsersUploader' +import { useSetPageTitle, useStaffBoundary } from '@/utils' +import { Button, ButtonGroup, InputGroup } from '@blueprintjs/core' +import { css } from '@emotion/css' +import Reloader from '@inject/graphql/components/Reloader' +import { GetTagsDocument } from '@inject/graphql/queries/GetTags.generated' +import { GetUsersDocument } from '@inject/graphql/queries/GetUsers.generated' +import type { AuthGroup } from '@inject/graphql/types' +import { useState } from 'react' -const UserManagementIndexPage = () => { +const page = css` + display: flex; + height: 100%; +` + +const body = css` + padding: 1rem; + display: flex; + flex-direction: column; + gap: 1rem; +` + +const Page = () => { useSetPageTitle('User management') + useStaffBoundary() + const nav = useNavigate() + // TODO: add reset for filters and columns + const [searchString, setSearchString] = useState('') + const [groups, setGroups] = useState<AuthGroup[]>(AUTH_GROUPS) + const [active, setActive] = useState<{ active: boolean; inactive: boolean }>({ + active: true, + inactive: true, + }) + const [tags, setTags] = useState<string[]>([]) + const [properties, setProperties] = useState<UserProperty[]>(USER_PROPERTIES) + const { table, deleteButton } = useUserTable({ + onClick: (userId: string) => nav('/users/:userId', { params: { userId } }), + groups, + active, + tags, + searchString, + properties, + }) + + const sections: Section[] = [ + { + name: 'Options', + node: ( + <ButtonGroup vertical minimal alignText='left' fill> + <UserCreator /> + <UsersUploader /> + <Columns selected={properties} setSelected={setProperties} /> + <Reloader queries={[GetUsersDocument, GetTagsDocument]} withLabel /> + {deleteButton} + </ButtonGroup> + ), + }, + { + name: 'Filters', + node: ( + <> + <UserGroups selected={groups} setSelected={setGroups} /> + <Active selected={active} setSelected={setActive} /> + <Tags selected={tags} setSelected={setTags} /> + </> + ), + }, + ] + return ( - <UserTable - onClick={(userId: string) => - nav('/users/:userId', { - params: { userId }, - }) - } - /> + <div className={page}> + <div className={body}> + <InputGroup + placeholder='Search...' + leftIcon='search' + value={searchString} + onChange={event => setSearchString(event.target.value)} + rightElement={ + <Button + icon='cross' + minimal + onClick={() => setSearchString('')} + disabled={!searchString} + /> + } + /> + {table} + </div> + <Sidebar position='right' sections={sections} /> + </div> ) } -export default UserManagementIndexPage +export default Page diff --git a/frontend/src/pages/_app.tsx b/frontend/src/pages/_app.tsx deleted file mode 100644 index 99a68fa090221de29196905f26c3ffabedbb6811..0000000000000000000000000000000000000000 --- a/frontend/src/pages/_app.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import useApolloHealthStatus from '@inject/graphql/utils/useApolloHealthStatus' -import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import { Outlet } from 'react-router-dom' - -const LocalLayout = () => { - const { notify } = useNotifyContext() - useApolloHealthStatus({ notify }) - - return <Outlet /> -} - -export default LocalLayout diff --git a/frontend/src/pages/analyst/[exerciseId]/index.tsx b/frontend/src/pages/analyst/[exerciseId]/index.tsx index 19955c20822095c36d666e1b7b67fd6fa192a249..c453d2e2613bdaa78583e82419fc7e10031c6e93 100644 --- a/frontend/src/pages/analyst/[exerciseId]/index.tsx +++ b/frontend/src/pages/analyst/[exerciseId]/index.tsx @@ -3,8 +3,15 @@ import Overview from '@/analyst/Overview' import selectedReducer from '@/analyst/Overview/selectedReducer' import { useParams } from '@/router' import { Divider } from '@blueprintjs/core' +import { css } from '@emotion/css' import { useEffect, useReducer } from 'react' +const page = css` + display: flex; + flex-direction: column; + min-height: 100%; +` + const Home = () => { const reducer = useReducer(selectedReducer, {}) const [state, dispatch] = reducer @@ -14,11 +21,14 @@ const Home = () => { useEffect(() => dispatch({ type: 'resetSelection' }), [exerciseId]) return ( - <> - <Milestones selectedDispatch={dispatch} /> + <div className={page}> + <Milestones + selectedState={state.milestoneState} + selectedDispatch={dispatch} + /> <Divider /> <Overview selectedState={state} selectedDispatch={dispatch} /> - </> + </div> ) } diff --git a/frontend/src/pages/analyst/[exerciseId]/tools/index.tsx b/frontend/src/pages/analyst/[exerciseId]/tools/index.tsx index 13590295e1a4fb5f9601844873db685807a999a8..3807afb01145739406a634363bd1aa73d4132ffe 100644 --- a/frontend/src/pages/analyst/[exerciseId]/tools/index.tsx +++ b/frontend/src/pages/analyst/[exerciseId]/tools/index.tsx @@ -6,8 +6,39 @@ import ToolArgumentUsage from '@/analyst/ToolUsage/ToolArgumentUsage' import selectedReducer from '@/analyst/ToolUsage/selectedReducer' import { useParams } from '@/router' import { Divider } from '@blueprintjs/core' +import { css } from '@emotion/css' import { useEffect, useMemo, useReducer } from 'react' +const page = css` + display: flex; + flex-direction: column; + height: 100%; + + @media (max-width: 120rem) { + height: clamp(100%, 120rem, 200%); + } +` + +const top = css` + flex: 1; + overflow: hidden; +` + +const bottom = css` + flex: 1; + display: flex; + overflow: hidden; + + @media (max-width: 120rem) { + flex: 2; + flex-direction: column; + } +` + +const bottomElement = css` + flex: 1; +` + const Home = () => { const reducer = useReducer(selectedReducer, {}) const [, dispatch] = reducer @@ -24,27 +55,25 @@ const Home = () => { return ( <> <SelectedContext.Provider value={selectedContextValue}> - <div - style={{ display: 'flex', flexDirection: 'column', height: '100%' }} - > + <div className={page}> <Selectors /> <Divider /> - <div style={{ flex: 1, overflow: 'hidden' }}> + <div className={top}> <InTimeToolUsage /> </div> <Divider /> - <div style={{ display: 'flex', flex: 1, overflow: 'hidden' }}> - <div style={{ flex: 1 }}> + <div className={bottom}> + <div className={bottomElement}> <AggregatedToolUsage /> </div> <Divider /> - <div style={{ flex: 1 }}> + <div className={bottomElement}> <ToolArgumentUsage /> </div> </div> diff --git a/frontend/src/pages/instructor/+definitionUploader.tsx b/frontend/src/pages/instructor/+definitionUploader.tsx index a6cf1bde68ba02b355cadf6ba0522340567616db..236fc0b551f32e6a20fc1e1407c8cdd4e7e57de1 100644 --- a/frontend/src/pages/instructor/+definitionUploader.tsx +++ b/frontend/src/pages/instructor/+definitionUploader.tsx @@ -11,11 +11,12 @@ import { } from '@blueprintjs/core' import useApolloClient from '@inject/graphql/client/useApolloClient' import { useHost } from '@inject/graphql/connection/host' -import Box from '@inject/shared/components/Box' +import { GetDefinitionsDocument } from '@inject/graphql/queries/GetDefinitions.generated' import { uploadDefinitionUrl, validateDefinitionUrl, } from '@inject/shared/config' +import { dialog } from '@inject/shared/css/dialog' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import csrfFetch from '@inject/shared/utils/csrfFetch' import type { ChangeEvent } from 'react' @@ -62,9 +63,8 @@ const DefinitionUploader = () => { notify(res.detail, { intent: 'danger' }) return } - notify(res.detail, { intent: 'success' }) setOpen(false) - client.refetchQueries({ include: ['GetDefinitions'] }) + client.refetchQueries({ include: [GetDefinitionsDocument] }) }) .finally(() => setLoadingSubmit(false)) } @@ -101,43 +101,45 @@ const DefinitionUploader = () => { return ( <Dialog + className={dialog} isOpen={open} onClose={() => setOpen(false)} onClosed={() => close()} - icon='plus' - title='Add a definition' + icon='upload' + title='Upload a definition' > <DialogBody> - <Box> - <Label style={{ width: '100%' }}> - Name <span className={Classes.TEXT_MUTED}>(optional)</span> - <InputGroup - placeholder={placeholder} - value={name} - onChange={e => setName(e.target.value)} + <Label style={{ width: '100%' }}> + Name <span className={Classes.TEXT_MUTED}>(optional)</span> + <InputGroup + placeholder={placeholder} + value={name} + onChange={e => setName(e.target.value)} + /> + </Label> + <Label style={{ width: '100%' }}> + File + <div + style={{ display: 'flex', gap: '0.5rem', alignItems: 'flex-end' }} + > + <FileInput + className={Classes.INPUT} + fill + hasSelection={file !== undefined} + text={file ? file.name : 'Choose file...'} + onInputChange={handleFileChange} /> - </Label> - <Label style={{ width: '100%' }}> - File - <div style={{ marginTop: '5px', display: 'flex', gap: '0.5rem' }}> - <FileInput - fill - hasSelection={file !== undefined} - text={file ? file.name : 'Choose file...'} - onInputChange={handleFileChange} - /> - <Button - disabled={!file} - title={file ? '' : 'Upload a file to validate'} - onClick={handleValidate} - loading={loadingValidate} - > - Validate - </Button> - </div> - </Label> - </Box> + <Button + disabled={!file} + title={file ? '' : 'Upload a file to validate'} + onClick={handleValidate} + loading={loadingValidate} + > + Validate + </Button> + </div> + </Label> </DialogBody> <DialogFooter actions={ diff --git a/frontend/src/pages/instructor/+exerciseCreator.tsx b/frontend/src/pages/instructor/+exerciseCreator.tsx index 0f6d6380ff8a85a232ef646cbe5f872d900f940f..41cd36ec545bd5ca8e3685ad688d4171fd48cc04 100644 --- a/frontend/src/pages/instructor/+exerciseCreator.tsx +++ b/frontend/src/pages/instructor/+exerciseCreator.tsx @@ -1,23 +1,24 @@ import { useModals } from '@/router' -import type { OptionProps } from '@blueprintjs/core' import { Button, Classes, Dialog, DialogBody, DialogFooter, - HTMLSelect, InputGroup, Label, + MenuItem, NumericInput, } from '@blueprintjs/core' +import { Select } from '@blueprintjs/select' import type { Definition } from '@inject/graphql/fragments/Definition.generated' import { useCreateExercises } from '@inject/graphql/mutations/CreateExercise.generated' import { useGetDefinitions } from '@inject/graphql/queries/GetDefinitions.generated' import { GetExercisesDocument } from '@inject/graphql/queries/GetExercises.generated' -import Box from '@inject/shared/components/Box' +import { dialog } from '@inject/shared/css/dialog' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import { useCallback, useEffect, useMemo, useState } from 'react' +import notEmpty from '@inject/shared/utils/notEmpty' +import { useCallback, useState } from 'react' const TEAMS_MAX = 20 @@ -26,150 +27,124 @@ const ExerciseCreator = () => { const [name, setName] = useState<string>('') const { close } = useModals() const [addExercise, { loading }] = useCreateExercises() - const { data: definitionData, loading: definitionLoading } = - useGetDefinitions({ - fetchPolicy: 'cache-first', - }) + const { data: definitionData } = useGetDefinitions() const { notify } = useNotifyContext() - const [definitionId, setDefinitionId] = useState<string>() const [definition, setDefinition] = useState<Definition>() const [count, setCount] = useState<undefined | number>() - useEffect(() => { - const definition = definitionData?.definitions?.find( - definition => definition?.id === definitionId - ) - setCount(definition?.roles.length || 1) - if (definition) { - setDefinition(definition) - } - }, [definitionData?.definitions, definitionId]) - const handleSubmit = useCallback(() => { + if (!definition || !count) return + addExercise({ variables: { - id: definitionId || '-1', - teamCount: count || 1, + id: definition.id, + teamCount: count, name, }, refetchQueries: [GetExercisesDocument], - }) - .then(() => { - notify('Exercise created') + onCompleted: () => { setOpen(false) - }) - .catch((err: { status: string; detail: string }) => { - notify(`${err.status} - ${err.detail}`, { + }, + onError: err => { + notify(err.message, { intent: 'danger', }) - }) - }, [addExercise, definitionId, count, name, notify]) - - const options: OptionProps[] = useMemo(() => { - if (definitionData === undefined || definitionLoading) { - return [ - { - label: 'No definitions', - value: '-1', - disabled: true, - }, - ] - } - - if (!definitionData.definitions?.some(x => x?.id === definitionId)) { - setDefinitionId('-1') - } - - return [ - { - label: 'Select a definition', - value: '-1', - disabled: true, }, - ...(definitionData?.definitions || []).map(x => ({ - label: x?.name || x?.id, - value: x?.id || '-1', - })), - ] - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [definitionData, definitionLoading]) + }) + }, [definition, count, addExercise, name, notify]) return ( <Dialog + className={dialog} isOpen={open} onClose={() => setOpen(false)} onClosed={() => close()} - icon='plus' - title='Add an exercise' + icon='add' + title='Create an exercise' > <DialogBody> - <Box> - <Label style={{ width: '100%' }}> - Definition - <HTMLSelect - options={options} - value={definitionId} - title='Select a definition' - onChange={e => setDefinitionId(e.currentTarget.value)} - /> - </Label> - - <Label style={{ width: '100%' }}> - Number of teams - {definition?.roles.length ? ( - <> - {' '} - <span - className={Classes.TEXT_MUTED} - >{`(multiple of the number of roles - ${definition.roles.length})`}</span> - </> - ) : ( - '' + <Label style={{ width: '100%' }}> + Definition + <Select<Definition> + fill + onItemSelect={definition => setDefinition(definition)} + items={definitionData?.definitions?.filter(notEmpty) || []} + popoverProps={{ minimal: true }} + itemRenderer={(item, { handleClick }) => ( + <MenuItem + onClick={handleClick} + text={`${item.name} (ID: ${item.id})`} + active={item.id === definition?.id} + /> )} - <NumericInput + filterable={false} + > + <Button + alignText='left' fill - value={count} - disabled={!definition} - stepSize={definition?.roles.length || 1} - minorStepSize={null} - majorStepSize={null} - onValueChange={value => { - if ( - value >= (definition?.roles.length || 1) && - value <= Math.max(TEAMS_MAX, definition?.roles.length || 1) && - value % (definition?.roles.length || 1) === 0 - ) { - setCount(value) - } - }} - min={definition?.roles.length || 1} - max={Math.max(TEAMS_MAX, definition?.roles.length || 1)} - title='Number of teams' - placeholder='Number of teams' - style={{ margin: 0 }} + rightIcon='double-caret-vertical' + text={ + definition + ? `${definition.name} (ID: ${definition.id})` + : 'Select a definition' + } /> - </Label> + </Select> + </Label> - <Label style={{ width: '100%' }}> - Name <span className={Classes.TEXT_MUTED}>(optional)</span> - <InputGroup - placeholder='Exercise name' - value={name} - onChange={e => setName(e.target.value)} - /> - </Label> - </Box> + <Label style={{ width: '100%' }}> + Number of teams + {definition?.roles.length ? ( + <> + {' '} + <span + className={Classes.TEXT_MUTED} + >{`(multiple of the number of roles - ${definition.roles.length})`}</span> + </> + ) : ( + '' + )} + <NumericInput + fill + value={count} + disabled={!definition} + stepSize={definition?.roles.length || 1} + minorStepSize={null} + majorStepSize={null} + onValueChange={value => { + if ( + value >= (definition?.roles.length || 1) && + value <= Math.max(TEAMS_MAX, definition?.roles.length || 1) && + value % (definition?.roles.length || 1) === 0 + ) { + setCount(value) + } + }} + min={definition?.roles.length || 1} + max={Math.max(TEAMS_MAX, definition?.roles.length || 1)} + title='Number of teams' + placeholder='Number of teams' + style={{ margin: 0 }} + /> + </Label> + + <Label style={{ width: '100%' }}> + Name <span className={Classes.TEXT_MUTED}>(optional)</span> + <InputGroup + placeholder='Exercise name' + value={name} + onChange={e => setName(e.target.value)} + /> + </Label> </DialogBody> <DialogFooter actions={ <Button onClick={handleSubmit} intent='primary' - disabled={definitionId === '-1' || !count} + disabled={!definition || !count} title={ - definitionId !== '-1' && count - ? '' - : 'Fill in all required fields' + definition && count ? undefined : 'Fill in all required fields' } loading={loading} > diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx index 252a49b3df44d12f31980e450af7af225505063e..3a6156e6c97959773d8e21d7af3ca92bbf9d7b2c 100644 --- a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx @@ -23,21 +23,34 @@ const Layout = () => { teamId={teamId} emailThreads={emailThreadsData.emailThreads.filter(notEmpty)} selectedTab={tab ? (tab as EmailSelection) : EmailSelection.SENT} - onSelectReceived={() => - nav('/instructor/:exerciseId/:teamId/:channelId/email/:tab', { + receivedLink={[ + '/instructor/:exerciseId/:teamId/:channelId/email/:tab', + { params: { exerciseId, teamId, channelId, tab: EmailSelection.RECEIVED, }, - }) - } - onSelectSent={() => - nav('/instructor/:exerciseId/:teamId/:channelId/email/:tab', { + }, + ]} + sentLink={[ + '/instructor/:exerciseId/:teamId/:channelId/email/:tab', + { params: { exerciseId, teamId, channelId, tab: EmailSelection.SENT }, - }) - } + }, + ]} + draftsLink={[ + '/instructor/:exerciseId/:teamId/:channelId/email/:tab', + { + params: { + exerciseId, + teamId, + channelId, + tab: EmailSelection.DRAFTS, + }, + }, + ]} selectedEmailThreadId={threadId ? threadId : undefined} onClick={emailThread => nav( diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/index.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/email/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/form/index.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/form/index.tsx index 88df8fc1a053b6251d4e9aa0a636fb586fcb8f78..e94e786b1cf6109cf5f832bbcaccf660e98801b6 100644 --- a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/form/index.tsx +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/form/index.tsx @@ -1,6 +1,8 @@ import ActionLog from '@/actionlog/ActionLog' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -10,16 +12,21 @@ const Page = () => { return ( <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/instructor/:exerciseId/:teamId/:channelId/form/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> + <Suspense fallback={<Spinner />}> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav( + '/instructor/:exerciseId/:teamId/:channelId/form/:actionLogId', + { + params: { exerciseId, teamId, channelId, actionLogId }, + } + ) + } + /> + </Suspense> </Container> ) } diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/info/index.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/info/index.tsx index e09a694ab68c694218cd4bfa82a7666b9accf6b1..1a0d6e71b6985bdd810f662b6201a0addd576df3 100644 --- a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/info/index.tsx +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/info/index.tsx @@ -1,6 +1,8 @@ import ActionLog from '@/actionlog/ActionLog' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -10,16 +12,21 @@ const Page = () => { return ( <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/instructor/:exerciseId/:teamId/:channelId/info/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> + <Suspense fallback={<Spinner />}> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav( + '/instructor/:exerciseId/:teamId/:channelId/info/:actionLogId', + { + params: { exerciseId, teamId, channelId, actionLogId }, + } + ) + } + /> + </Suspense> </Container> ) } diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx new file mode 100644 index 0000000000000000000000000000000000000000..604f91b99ca7c88fa5c4cbd5523e83636676e136 --- /dev/null +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx @@ -0,0 +1,24 @@ +import { useParams } from '@/router' +import Toolbar from '@/views/TraineeView/Toolbar' +import { Outlet } from 'react-router-dom' + +const Layout = () => { + const { exerciseId, teamId } = useParams('/instructor/:exerciseId/:teamId') + + return ( + <div style={{ height: '100%', display: 'flex' }}> + <div style={{ flex: 1 }}> + <Outlet /> + </div> + + <Toolbar + teamId={teamId} + exerciseId={exerciseId} + disabled + disabledTitle='Using tools is not allowed in the instructor view' + /> + </div> + ) +} + +export default Layout diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/index.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/index.tsx index 6c0f59276d7ea120c18ab9f15bec4936a2786584..24e42cebca6c03ec7140c6857779014bc14c17f0 100644 --- a/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/index.tsx +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/[channelId]/tool/index.tsx @@ -1,6 +1,8 @@ import ActionLog from '@/actionlog/ActionLog' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -10,16 +12,27 @@ const Page = () => { return ( <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/instructor/:exerciseId/:teamId/:channelId/tool/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> + <Suspense fallback={<Spinner />}> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav( + '/instructor/:exerciseId/:teamId/:channelId/tool/:actionLogId', + { + params: { exerciseId, teamId, channelId, actionLogId }, + } + ) + } + noDataProps={{ + title: "The selected team hasn't used any tools yet", + description: + 'Responses from tools will appear here. You can see the \ + available tools in the right sidebar', + }} + /> + </Suspense> </Container> ) } diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/index.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/index.tsx index 97112c125cb10cfa3fc8367ebb6d441776bd4be7..fa14c4f7ec4477d8e65dcff3a50fc6b0d12ed1b3 100644 --- a/frontend/src/pages/instructor/[exerciseId]/[teamId]/index.tsx +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/index.tsx @@ -1,11 +1,50 @@ -import { NonIdealState } from '@blueprintjs/core' - -const Page = () => ( - <NonIdealState - icon='search' - title='No channel selected' - description='Select a channel to interact with' - /> -) +import ErrorMessage from '@/components/ErrorMessage' +import { useNavigate, useParams } from '@/router' +import { NonIdealState, Spinner } from '@blueprintjs/core' +import { useGetExerciseChannels } from '@inject/graphql/queries/GetExerciseChannels.generated' +import { useEffect } from 'react' + +const Page = () => { + const nav = useNavigate() + const { exerciseId, teamId } = useParams('/instructor/:exerciseId/:teamId') + const { data, loading, error } = useGetExerciseChannels({ + variables: { exerciseId }, + }) + + useEffect(() => { + const infoChannelId = data?.exerciseChannels?.find( + channel => channel?.type === 'INFO' + )?.id + if (infoChannelId) { + nav('/instructor/:exerciseId/:teamId/:channelId/info', { + params: { + exerciseId, + teamId, + channelId: infoChannelId, + }, + }) + } + }, [data?.exerciseChannels, exerciseId, nav, teamId]) + + if (loading) { + return <Spinner /> + } + if (error) { + return ( + <ErrorMessage> + <h1>Error occurred!</h1> + <p>{error.message}</p> + </ErrorMessage> + ) + } + + return ( + <NonIdealState + icon='search' + title='No channel selected' + description='Select a channel to interact with' + /> + ) +} export default Page diff --git a/frontend/src/pages/instructor/_layout.tsx b/frontend/src/pages/instructor/_layout.tsx index 2a8289ba34e758f0cd3c65bf3ce18324d01c182f..eebaed65dbc4f828e00f1a9de425e06396bfe5d0 100644 --- a/frontend/src/pages/instructor/_layout.tsx +++ b/frontend/src/pages/instructor/_layout.tsx @@ -4,12 +4,18 @@ import InstructorView from '@/views/InstructorView' import { Outlet } from 'react-router-dom' const Layout = () => { - const { exerciseId, teamId } = useParams('/instructor/:exerciseId/:teamId') + const { exerciseId, teamId, threadId } = useParams( + '/instructor/:exerciseId/:teamId/:channelId/email/:tab/:threadId' + ) useStaffBoundary() useSetPageTitle('Instructor') return ( - <InstructorView exerciseId={exerciseId} teamId={teamId}> + <InstructorView + exerciseId={exerciseId} + teamId={teamId} + selectedThreadId={threadId} + > <Outlet /> </InstructorView> ) diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index 50c13f000607cc774b291718cc9275017e60a82c..aa3c6624a54b66bd11045b12ccb1ed5b7cdb80f4 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -11,7 +11,7 @@ const LoginPage = () => { <InjectLogo style={{ width: '100%', - height: '300px', + height: '20rem', margin: 'auto', }} /> diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx index d0a15810936cbba6914d9e7776664ec0202b0068..5d0f8673b8a9640abeb533168fa6c00ea5f2c5cc 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/_layout.tsx @@ -23,21 +23,34 @@ const Layout = () => { teamId={teamId} emailThreads={emailThreadsData.emailThreads.filter(notEmpty)} selectedTab={tab ? (tab as EmailSelection) : EmailSelection.RECEIVED} - onSelectReceived={() => - nav('/trainee/:exerciseId/:teamId/:channelId/email/:tab', { + receivedLink={[ + '/trainee/:exerciseId/:teamId/:channelId/email/:tab', + { params: { exerciseId, teamId, channelId, tab: EmailSelection.RECEIVED, }, - }) - } - onSelectSent={() => - nav('/trainee/:exerciseId/:teamId/:channelId/email/:tab', { + }, + ]} + sentLink={[ + '/trainee/:exerciseId/:teamId/:channelId/email/:tab', + { params: { exerciseId, teamId, channelId, tab: EmailSelection.SENT }, - }) - } + }, + ]} + draftsLink={[ + '/trainee/:exerciseId/:teamId/:channelId/email/:tab', + { + params: { + exerciseId, + teamId, + channelId, + tab: EmailSelection.DRAFTS, + }, + }, + ]} selectedEmailThreadId={threadId ? threadId : undefined} onClick={emailThread => nav('/trainee/:exerciseId/:teamId/:channelId/email/:tab/:threadId', { diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/index.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/email/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/form/index.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/form/index.tsx index afdd99399b8d47ec2690ad8688869270464f923f..18d251e8451a253120a6be2e9cd9d7c2c0e94c96 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/form/index.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/form/index.tsx @@ -1,6 +1,8 @@ import ActionLog from '@/actionlog/ActionLog' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -9,18 +11,20 @@ const Page = () => { const nav = useNavigate() return ( - <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/trainee/:exerciseId/:teamId/:channelId/form/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> - </Container> + <Suspense fallback={<Spinner />}> + <Container makeFullHeight> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav('/trainee/:exerciseId/:teamId/:channelId/form/:actionLogId', { + params: { exerciseId, teamId, channelId, actionLogId }, + }) + } + /> + </Container> + </Suspense> ) } diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/info/index.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/info/index.tsx index c0ecd969a09ff815ed72f689226fe56445f277fd..f021de6ef145ddfee5e915cb6105e74369f88bc1 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/info/index.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/info/index.tsx @@ -1,6 +1,8 @@ import ActionLog from '@/actionlog/ActionLog' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -9,18 +11,20 @@ const Page = () => { const nav = useNavigate() return ( - <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/trainee/:exerciseId/:teamId/:channelId/info/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> - </Container> + <Suspense fallback={<Spinner />}> + <Container makeFullHeight> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav('/trainee/:exerciseId/:teamId/:channelId/info/:actionLogId', { + params: { exerciseId, teamId, channelId, actionLogId }, + }) + } + /> + </Container> + </Suspense> ) } diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx index b1f9979ed53a4da84f1c94ee5762024170c5e710..1624fde842dc45c0f9a25207c45d88c176904dc1 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/_layout.tsx @@ -3,7 +3,7 @@ import Toolbar from '@/views/TraineeView/Toolbar' import { Outlet } from 'react-router-dom' const Layout = () => { - const { teamId } = useParams('/trainee/:exerciseId/:teamId') + const { exerciseId, teamId } = useParams('/trainee/:exerciseId/:teamId') return ( <div style={{ height: '100%', display: 'flex' }}> @@ -11,7 +11,7 @@ const Layout = () => { <Outlet /> </div> - <Toolbar teamId={teamId} /> + <Toolbar teamId={teamId} exerciseId={exerciseId} /> </div> ) } diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/index.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/index.tsx index 71fc3d17f9d1e239248f759cd758f0265af962cb..5768fbd0efcf881643112d060176eaf7403e96b7 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/index.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/[channelId]/tool/index.tsx @@ -1,6 +1,9 @@ import ActionLog from '@/actionlog/ActionLog' +// import FormTool2 from '@/actionlog/ToolAction/components/Form2' import { useNavigate, useParams } from '@/router' +import { Spinner } from '@blueprintjs/core' import Container from '@inject/shared/components/Container' +import { Suspense } from 'react' const Page = () => { const { exerciseId, teamId, channelId } = useParams( @@ -9,18 +12,26 @@ const Page = () => { const nav = useNavigate() return ( - <Container makeFullHeight> - <ActionLog - exerciseId={exerciseId} - teamId={teamId} - channelId={channelId} - getOnInspect={actionLogId => () => - nav('/trainee/:exerciseId/:teamId/:channelId/tool/:actionLogId', { - params: { exerciseId, teamId, channelId, actionLogId }, - }) - } - /> - </Container> + <Suspense fallback={<Spinner />}> + <Container makeFullHeight> + <ActionLog + exerciseId={exerciseId} + teamId={teamId} + channelId={channelId} + getOnInspect={actionLogId => () => + nav('/trainee/:exerciseId/:teamId/:channelId/tool/:actionLogId', { + params: { exerciseId, teamId, channelId, actionLogId }, + }) + } + noDataProps={{ + title: "You haven't used any tools yet", + description: + 'Responses from tools will appear here. You can use a tool by \ + clicking on it in the right sidebar', + }} + /> + </Container> + </Suspense> ) } diff --git a/frontend/src/pages/trainee/[exerciseId]/[teamId]/index.tsx b/frontend/src/pages/trainee/[exerciseId]/[teamId]/index.tsx index 97112c125cb10cfa3fc8367ebb6d441776bd4be7..0758c89f915fb38dc2735d06cf2e31e1a61e1681 100644 --- a/frontend/src/pages/trainee/[exerciseId]/[teamId]/index.tsx +++ b/frontend/src/pages/trainee/[exerciseId]/[teamId]/index.tsx @@ -1,11 +1,50 @@ -import { NonIdealState } from '@blueprintjs/core' - -const Page = () => ( - <NonIdealState - icon='search' - title='No channel selected' - description='Select a channel to interact with' - /> -) +import ErrorMessage from '@/components/ErrorMessage' +import { useNavigate, useParams } from '@/router' +import { NonIdealState, Spinner } from '@blueprintjs/core' +import { useGetExerciseChannels } from '@inject/graphql/queries/GetExerciseChannels.generated' +import { useEffect } from 'react' + +const Page = () => { + const nav = useNavigate() + const { exerciseId, teamId } = useParams('/trainee/:exerciseId/:teamId') + const { data, loading, error } = useGetExerciseChannels({ + variables: { exerciseId }, + }) + + useEffect(() => { + const infoChannelId = data?.exerciseChannels?.find( + channel => channel?.type === 'INFO' + )?.id + if (infoChannelId) { + nav('/trainee/:exerciseId/:teamId/:channelId/info', { + params: { + exerciseId, + teamId, + channelId: infoChannelId, + }, + }) + } + }, [data?.exerciseChannels, exerciseId, nav, teamId]) + + if (loading) { + return <Spinner /> + } + if (error) { + return ( + <ErrorMessage> + <h1>Error occurred!</h1> + <p>{error.message}</p> + </ErrorMessage> + ) + } + + return ( + <NonIdealState + icon='search' + title='No channel selected' + description='Select a channel to interact with' + /> + ) +} export default Page diff --git a/frontend/src/pages/trainee/_layout.tsx b/frontend/src/pages/trainee/_layout.tsx index e2ae62bb40557703a9bd53f168d21c45241cdb2f..6686559a18727681f6b58910f9aa569ed8cf1887 100644 --- a/frontend/src/pages/trainee/_layout.tsx +++ b/frontend/src/pages/trainee/_layout.tsx @@ -4,11 +4,17 @@ import TraineeView from '@/views/TraineeView' import { Outlet } from 'react-router-dom' const Layout = () => { - const { exerciseId, teamId } = useParams('/trainee/:exerciseId/:teamId') + const { exerciseId, teamId, threadId } = useParams( + '/trainee/:exerciseId/:teamId/:channelId/email/:tab/:threadId' + ) useSetPageTitle('Trainee') return ( - <TraineeView exerciseId={exerciseId} teamId={teamId}> + <TraineeView + exerciseId={exerciseId} + teamId={teamId} + selectedThreadId={threadId} + > <Outlet /> </TraineeView> ) diff --git a/frontend/src/router.ts b/frontend/src/router.ts index d7d9883340a641566ad5860570c862382bd675ad..1e69306f9fab98352bedd69e3c477884a31f6bf7 100644 --- a/frontend/src/router.ts +++ b/frontend/src/router.ts @@ -20,9 +20,12 @@ export type Path = | `/editor/create/introduction` | `/editor/create/learning-objectives` | `/exercise-panel` + | `/exercise-panel/definition/:definitionId` + | `/exercise-panel/exercise/:exerciseId` | `/graphiql` | `/instructor` | `/instructor/:exerciseId/:teamId` + | `/instructor/:exerciseId/:teamId/:channelId/email` | `/instructor/:exerciseId/:teamId/:channelId/email/:tab` | `/instructor/:exerciseId/:teamId/:channelId/email/:tab/:threadId` | `/instructor/:exerciseId/:teamId/:channelId/form` @@ -36,6 +39,7 @@ export type Path = | `/login` | `/settings` | `/trainee/:exerciseId/:teamId` + | `/trainee/:exerciseId/:teamId/:channelId/email` | `/trainee/:exerciseId/:teamId/:channelId/email/:tab` | `/trainee/:exerciseId/:teamId/:channelId/email/:tab/:threadId` | `/trainee/:exerciseId/:teamId/:channelId/form` @@ -47,8 +51,6 @@ export type Path = | `/trainee/:exerciseId/:teamId/file/:fileId` | `/users` | `/users/:userId` - | `/users/definition/:definitionId` - | `/users/exercise/:exerciseId` export type Params = { '/analyst/:exerciseId': { exerciseId: string } @@ -58,7 +60,10 @@ export type Params = { '/analyst/:exerciseId/milestones': { exerciseId: string } '/analyst/:exerciseId/tools': { exerciseId: string } '/editor/create/activity-specification/:activityId': { activityId: string } + '/exercise-panel/definition/:definitionId': { definitionId: string } + '/exercise-panel/exercise/:exerciseId': { exerciseId: string } '/instructor/:exerciseId/:teamId': { exerciseId: string; teamId: string } + '/instructor/:exerciseId/:teamId/:channelId/email': { exerciseId: string; teamId: string; channelId: string } '/instructor/:exerciseId/:teamId/:channelId/email/:tab': { exerciseId: string; teamId: string; channelId: string; tab: string } '/instructor/:exerciseId/:teamId/:channelId/email/:tab/:threadId': { exerciseId: string; teamId: string; channelId: string; tab: string; threadId: string } '/instructor/:exerciseId/:teamId/:channelId/form': { exerciseId: string; teamId: string; channelId: string } @@ -70,6 +75,7 @@ export type Params = { '/instructor/:exerciseId/:teamId/file/:fileId': { exerciseId: string; teamId: string; fileId: string } '/instructor/:exerciseId/:teamId/learning-objectives': { exerciseId: string; teamId: string } '/trainee/:exerciseId/:teamId': { exerciseId: string; teamId: string } + '/trainee/:exerciseId/:teamId/:channelId/email': { exerciseId: string; teamId: string; channelId: string } '/trainee/:exerciseId/:teamId/:channelId/email/:tab': { exerciseId: string; teamId: string; channelId: string; tab: string } '/trainee/:exerciseId/:teamId/:channelId/email/:tab/:threadId': { exerciseId: string; teamId: string; channelId: string; tab: string; threadId: string } '/trainee/:exerciseId/:teamId/:channelId/form': { exerciseId: string; teamId: string; channelId: string } @@ -80,8 +86,6 @@ export type Params = { '/trainee/:exerciseId/:teamId/:channelId/tool/:actionLogId': { exerciseId: string; teamId: string; channelId: string; actionLogId: string } '/trainee/:exerciseId/:teamId/file/:fileId': { exerciseId: string; teamId: string; fileId: string } '/users/:userId': { userId: string } - '/users/definition/:definitionId': { definitionId: string } - '/users/exercise/:exerciseId': { exerciseId: string } } export type ModalPath = `/instructor/definitionUploader` | `/instructor/exerciseCreator` diff --git a/frontend/src/ts.d.ts b/frontend/src/ts.d.ts index 671c922c1ba5cf4fa67e5c576dee04712d9a39b1..44e9cb6e7227185385117ff6596351b0810484a7 100644 --- a/frontend/src/ts.d.ts +++ b/frontend/src/ts.d.ts @@ -5,10 +5,10 @@ declare module '*.svg?react' interface ImportMetaEnv { - readonly VITE_GIT_COMMIT_DATE: string - readonly VITE_GIT_BRANCH_NAME: string - readonly VITE_GIT_COMMIT_HASH: string - readonly VITE_GIT_LAST_COMMIT_MESSAGE: string + readonly VITE_GIT_BRANCH_NAME?: string + readonly VITE_GIT_COMMIT_HASH?: string + readonly VITE_GIT_LAST_COMMIT_MESSAGE?: string + readonly VITE_BUILD_NUMBER?: string } interface ImportMeta { diff --git a/frontend/src/users/DefinitionAssignment/index.tsx b/frontend/src/users/DefinitionAssignment/index.tsx index 35dbd24b0ef45804f796dc2e65cd04f885b213de..42dba82463590badd41b0bed9a060cbe2aeffd0a 100644 --- a/frontend/src/users/DefinitionAssignment/index.tsx +++ b/frontend/src/users/DefinitionAssignment/index.tsx @@ -1,5 +1,9 @@ +import HelpIcon from '@/analyst/HelpIcon' +import LinkButton from '@/components/LinkButton' +import { useNavigate } from '@/router' import UsersSelection from '@/users/UsersSelection' import { Button, NonIdealState, Section, SectionCard } from '@blueprintjs/core' +import Reloader from '@inject/graphql/components/Reloader' import { useAddDefinitionAccess } from '@inject/graphql/mutations/AddDefinitionAccess.generated' import { useRemoveDefinitionAccess } from '@inject/graphql/mutations/RemoveDefinitionAccess.generated' import { @@ -10,6 +14,7 @@ import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyCon import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' import { useCallback, useState } from 'react' +import { useLocation } from 'react-router-dom' import UserTableSelection from '../UserTableSelection' interface DefinitionAssignmentProps { @@ -19,18 +24,23 @@ interface DefinitionAssignmentProps { const DefinitionAssignment: FC<DefinitionAssignmentProps> = ({ definitionId, }) => { - const [addDefinitionAccess] = useAddDefinitionAccess() - const [removeDefinitionAccess] = useRemoveDefinitionAccess() + const { notify } = useNotifyContext() + const nav = useNavigate() + const { state } = useLocation() + + const [addOpen, setAddOpen] = useState(false) + const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + const { data, refetch } = useGetDefinition({ variables: { definitionId, }, fetchPolicy: 'network-only', }) - const { notify } = useNotifyContext() - const [listView, setListView] = useState(true) + const { name, userSet } = data?.definition || {} - const handleAssignButton = useCallback( + const [addDefinitionAccess] = useAddDefinitionAccess() + const handleAdd = useCallback( (ids: string[]) => { addDefinitionAccess({ variables: { @@ -38,20 +48,21 @@ const DefinitionAssignment: FC<DefinitionAssignmentProps> = ({ userIds: ids, }, refetchQueries: [GetDefinitionDocument], - }) - .then(() => { - notify('Instructors assigned to the defition') - }) - .catch(() => { - notify('Definition access asignment failed', { + onCompleted: () => { + setAddOpen(false) + }, + onError: error => { + notify(error.message, { intent: 'danger', }) - }) + }, + }) }, - [addDefinitionAccess, notify] + [addDefinitionAccess, definitionId, notify] ) - const handleRemoveButton = useCallback( + const [removeDefinitionAccess] = useRemoveDefinitionAccess() + const handleRemove = useCallback( (ids: string[]) => { removeDefinitionAccess({ variables: { @@ -59,17 +70,14 @@ const DefinitionAssignment: FC<DefinitionAssignmentProps> = ({ userIds: ids, }, refetchQueries: [GetDefinitionDocument], - }) - .then(() => { - notify('Instructors removed from the defition') - }) - .catch(() => { - notify('Definition access removal failed', { + onError: error => { + notify(error.message, { intent: 'danger', }) - }) + }, + }) }, - [removeDefinitionAccess, notify] + [removeDefinitionAccess, definitionId, notify] ) if (!data || !data.definition) { @@ -82,40 +90,59 @@ const DefinitionAssignment: FC<DefinitionAssignmentProps> = ({ } return ( - <Section - title={`Assign instructors - definition ${data?.definition.name}`} - rightElement={ - listView ? ( - <Button - onClick={() => { - refetch() - }} - icon='reset' - minimal - > - Reload - </Button> - ) : undefined - } - > - <SectionCard> - {listView ? ( - <UsersSelection - users={data?.definition.userSet?.filter(notEmpty) || []} - onRemove={(ids: string[]) => handleRemoveButton(ids)} - onAssign={() => setListView(prev => !prev)} - assignTitle='Add' - removeTitle='Remove' + <> + {state?.fromUserDetail ? ( + <Button + type='button' + minimal + icon='chevron-left' + onClick={() => { + nav(-1) + }} + > + Back + </Button> + ) : ( + <LinkButton + link={['/exercise-panel']} + button={{ + text: 'Back', + icon: 'chevron-left', + minimal: true, + }} + /> + )} + + <Section + title='Manage access to definition' + subtitle={name} + icon={ + <HelpIcon + text='Instructors with access to a definition are able to + create exercises from it. They can also start, stop, and delete + them, and assign participants to them.' /> - ) : ( - <UserTableSelection - onBack={() => setListView(prev => !prev)} - onAssign={(ids: string[]) => handleAssignButton(ids)} - assignTitle='Add selected' + } + rightElement={<Reloader minimal onRefetch={refetch} />} + > + <SectionCard> + <UsersSelection + users={userSet?.filter(notEmpty) || []} + onRemove={(ids: string[]) => handleRemove(ids)} + onAdd={() => setAddOpen(true)} /> - )} - </SectionCard> - </Section> + </SectionCard> + </Section> + + <UserTableSelection + groups={['ADMIN', 'INSTRUCTOR']} + open={addOpen} + setOpen={setAddOpen} + onAdd={(ids: string[]) => handleAdd(ids)} + selectedUsers={selectedUsers} + setSelectedUsers={setSelectedUsers} + /> + </> ) } diff --git a/frontend/src/users/ExerciseAssignment/AssignByTags.tsx b/frontend/src/users/ExerciseAssignment/AssignByTags.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e80a09b51ea5d83504fff4563342b6f84f3be4df --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/AssignByTags.tsx @@ -0,0 +1,114 @@ +import { + Button, + Dialog, + DialogBody, + DialogFooter, + FormGroup, + InputGroup, +} from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import { useAssignUsersByTags } from '@inject/graphql/mutations/AssignUsersByTags.generated' +import { GetExerciseDocument } from '@inject/graphql/queries/GetExercise.generated' +import { dialogBody, maximizedDialog } from '@inject/shared/css/dialog' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import type { FC } from 'react' +import { useCallback, useState } from 'react' +import useUserTableSelection from '../UserTableSelection/useUserTableSelection' + +const body = css` + display: flex; + flex-direction: column; + overflow: auto; +` + +interface AssignByTagsProps { + exerciseId: string +} + +const AssignByTags: FC<AssignByTagsProps> = ({ exerciseId }) => { + const { notify } = useNotifyContext() + + const [open, setOpen] = useState(false) + const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + const [tagPrefix, setTagPrefix] = useState('') + + const reset = useCallback(() => { + setOpen(false) + setSelectedUsers([]) + }, []) + + const [AssignByTags, { loading }] = useAssignUsersByTags() + const handleSubmit = useCallback(() => { + if (!selectedUsers) return + + AssignByTags({ + variables: { + exerciseId, + userIds: selectedUsers, + tagPrefix, + }, + onCompleted: reset, + onError: err => notify(err.message), + refetchQueries: [GetExerciseDocument], + }) + }, [AssignByTags, exerciseId, notify, reset, selectedUsers, tagPrefix]) + + const { table } = useUserTableSelection({ + groups: ['INSTRUCTOR', 'TRAINEE'], + onCancel: reset, + onAdd: (ids: string[]) => setSelectedUsers(ids), + selectedUsers, + setSelectedUsers, + }) + + return ( + <> + <Button + icon='tag' + text='Assign by tags' + onClick={() => setOpen(true)} + active={open} + /> + + <Dialog + isOpen={open} + onClose={reset} + className={maximizedDialog} + title='Assign users to teams based on tags' + icon='tag' + > + <DialogBody className={cx(dialogBody, body)}> + <FormGroup + label='Tag prefix' + labelInfo='(optional)' + labelFor='tag-prefix' + helperText='Users will be assigned to teams based on tags with this prefix' + > + <InputGroup + id='tag-prefix' + placeholder='example-prefix' + value={tagPrefix} + onChange={e => setTagPrefix(e.target.value)} + /> + </FormGroup> + {table} + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={selectedUsers.length === 0} + title={selectedUsers.length > 0 ? undefined : 'Select some users'} + loading={loading} + > + {`Assign (${selectedUsers.length})`} + </Button> + } + /> + </Dialog> + </> + ) +} + +export default AssignByTags diff --git a/frontend/src/users/ExerciseAssignment/AssignEqually.tsx b/frontend/src/users/ExerciseAssignment/AssignEqually.tsx new file mode 100644 index 0000000000000000000000000000000000000000..e819b27bbcc7286d41a77c08526eebca1894fb39 --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/AssignEqually.tsx @@ -0,0 +1,129 @@ +import { + Alert, + Button, + Dialog, + DialogBody, + DialogFooter, +} from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import { useAssignUsersEqually } from '@inject/graphql/mutations/AssignUsersEqually.generated' +import { GetExerciseDocument } from '@inject/graphql/queries/GetExercise.generated' +import { dialogBody, maximizedDialog } from '@inject/shared/css/dialog' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import type { FC } from 'react' +import { useCallback, useState } from 'react' +import useUserTableSelection from '../UserTableSelection/useUserTableSelection' + +const body = css` + display: flex; + flex-direction: column; + gap: 1rem; + overflow: auto; +` + +interface AssignEquallyProps { + exerciseId: string + teamCount: number +} + +const AssignEqually: FC<AssignEquallyProps> = ({ exerciseId, teamCount }) => { + const { notify } = useNotifyContext() + + const [open, setOpen] = useState(false) + const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + const [warningOpen, setWarningOpen] = useState(false) + + const reset = useCallback(() => { + setOpen(false) + setSelectedUsers([]) + }, []) + + const [AssignEqually, { loading }] = useAssignUsersEqually() + const handleSubmit = useCallback(() => { + if (!selectedUsers) return + + if (!warningOpen && selectedUsers.length % teamCount !== 0) { + setWarningOpen(true) + return + } + + AssignEqually({ + variables: { + exerciseId, + userIds: selectedUsers, + }, + onCompleted: reset, + onError: err => notify(err.message), + refetchQueries: [GetExerciseDocument], + }) + }, [ + AssignEqually, + exerciseId, + notify, + reset, + selectedUsers, + teamCount, + warningOpen, + ]) + + const { table } = useUserTableSelection({ + groups: ['INSTRUCTOR', 'TRAINEE'], + onCancel: reset, + onAdd: (ids: string[]) => setSelectedUsers(ids), + selectedUsers, + setSelectedUsers, + }) + + return ( + <> + <Button + icon='align-justify' + text='Assign equally' + onClick={() => setOpen(true)} + active={open} + /> + + <Dialog + isOpen={open} + onClose={reset} + className={maximizedDialog} + title='Assign users to teams equally' + icon='align-justify' + > + <DialogBody className={cx(dialogBody, body)}>{table}</DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={selectedUsers.length === 0} + title={selectedUsers.length > 0 ? undefined : 'Select some users'} + loading={loading} + > + {`Assign (${selectedUsers.length})`} + </Button> + } + /> + </Dialog> + + <Alert + isOpen={warningOpen} + canEscapeKeyCancel + canOutsideClickCancel + cancelButtonText='Cancel' + onCancel={() => setWarningOpen(false)} + confirmButtonText='Confirm' + icon='warning-sign' + intent='warning' + onConfirm={handleSubmit} + onClose={() => setWarningOpen(false)} + loading={loading} + > + <p>{`Some teams will have more users than others, because the number of selected users (${selectedUsers.length}) is not divisible by the number of teams (${teamCount}).`}</p> + <p>Do you want to proceed?</p> + </Alert> + </> + ) +} + +export default AssignEqually diff --git a/frontend/src/users/ExerciseAssignment/CopyAssignment.tsx b/frontend/src/users/ExerciseAssignment/CopyAssignment.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2254ceca4810d826c8ebba0334a274e68b906f6d --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/CopyAssignment.tsx @@ -0,0 +1,111 @@ +import ExerciseListWrapper from '@/components/ExerciseList/ExerciseListWrapper' +import { + Button, + Callout, + Dialog, + DialogBody, + DialogFooter, +} from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import type { Exercise } from '@inject/graphql/fragments/Exercise.generated' +import { useCopyUsersAssignment } from '@inject/graphql/mutations/CopyUsersAssignment.generated' +import { GetExerciseDocument } from '@inject/graphql/queries/GetExercise.generated' +import { dialogBody, maximizedDialog } from '@inject/shared/css/dialog' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import type { FC } from 'react' +import { useCallback, useState } from 'react' + +const body = css` + display: flex; + flex-direction: column; + gap: 1rem; +` + +const wrapper = css` + flex: 1; +` + +interface CopyAssignmentProps { + exerciseId: string + teamCount: number +} + +const CopyAssignment: FC<CopyAssignmentProps> = ({ exerciseId, teamCount }) => { + const { notify } = useNotifyContext() + + const [open, setOpen] = useState(false) + const [selectedExercise, setSelectedExercise] = useState<Exercise>() + + const reset = useCallback(() => { + setOpen(false) + setSelectedExercise(undefined) + }, []) + + const [copyAssignment, { loading }] = useCopyUsersAssignment() + const handleSubmit = useCallback(() => { + if (!selectedExercise) return + + copyAssignment({ + variables: { + fromExerciseId: selectedExercise.id, + toExerciseId: exerciseId, + }, + onCompleted: reset, + onError: err => notify(err.message), + refetchQueries: [GetExerciseDocument], + }) + }, [copyAssignment, exerciseId, notify, reset, selectedExercise]) + + return ( + <> + <Button + icon='duplicate' + text='Copy assignment' + onClick={() => setOpen(true)} + active={open} + /> + + <Dialog + isOpen={open} + onClose={reset} + className={maximizedDialog} + title='Copy assignment from another exercise' + icon='duplicate' + > + <DialogBody className={cx(dialogBody, body)}> + <Callout icon='info-sign'> + {`Only exercises with the same team count (${teamCount}) are shown`} + </Callout> + <div className={wrapper}> + <ExerciseListWrapper + filter={exercise => + exercise.id !== exerciseId && + exercise.teams.length === teamCount + } + isSelected={exercise => exercise.id === selectedExercise?.id} + type='selecting' + details={exercise => ({ + onSelect: () => setSelectedExercise(exercise), + })} + /> + </div> + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={!selectedExercise} + title={selectedExercise ? undefined : 'Select an exercise'} + loading={loading} + > + Submit + </Button> + } + /> + </Dialog> + </> + ) +} + +export default CopyAssignment diff --git a/frontend/src/users/ExerciseAssignment/Instructors.tsx b/frontend/src/users/ExerciseAssignment/Instructors.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1f75ca4af4dc1996b63fc80fc406f57aafdc2696 --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/Instructors.tsx @@ -0,0 +1,96 @@ +import { Section, SectionCard } from '@blueprintjs/core' +import type { RestrictedUser } from '@inject/graphql/fragments/RestrictedUser.generated' +import { useAssignInstructorsToExercise } from '@inject/graphql/mutations/AssignInstructorsToExercise.generated' +import { useRemoveInstructorsFromExercise } from '@inject/graphql/mutations/RemoveInstructorsFromExercise.generated' +import { GetExerciseDocument } from '@inject/graphql/queries/GetExercise.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import { useCallback, useState, type FC } from 'react' +import UserTableSelection from '../UserTableSelection' +import UsersSelection from '../UsersSelection' +import { bodySection } from './classes' + +interface InstructorsProps { + users: RestrictedUser[] + exerciseId: string +} + +const Instructors: FC<InstructorsProps> = ({ users, exerciseId }) => { + const { notify } = useNotifyContext() + + const [addOpen, setAddOpen] = useState(false) + const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + + const [assignInstructorsToExercise] = useAssignInstructorsToExercise() + const handleAddInstructors = useCallback( + (userIds: string[]) => { + assignInstructorsToExercise({ + variables: { + exerciseId, + userIds, + }, + refetchQueries: [GetExerciseDocument], + onCompleted: () => { + notify(`Instructor${userIds.length > 1 ? 's' : ''} added`) + setAddOpen(false) + }, + onError: error => { + notify(error.message, { + intent: 'danger', + }) + }, + }) + }, + [assignInstructorsToExercise, exerciseId, notify] + ) + + const [removeInstructorsFromExercise] = useRemoveInstructorsFromExercise() + const handleRemoveInstructors = useCallback( + (userIds: string[]) => { + removeInstructorsFromExercise({ + variables: { + exerciseId, + userIds, + }, + refetchQueries: [GetExerciseDocument], + onCompleted: () => { + notify(`Instructor${userIds.length > 1 ? 's' : ''} removed`) + }, + onError: error => { + notify(error.message, { + intent: 'danger', + }) + }, + }) + }, + [exerciseId, notify, removeInstructorsFromExercise] + ) + + return ( + <> + <Section title='Instructors' icon='intelligence' className={bodySection}> + <SectionCard> + <Section> + <SectionCard> + <UsersSelection + users={users} + onRemove={ids => handleRemoveInstructors(ids)} + onAdd={() => setAddOpen(true)} + /> + </SectionCard> + </Section> + </SectionCard> + </Section> + + <UserTableSelection + groups={['ADMIN', 'INSTRUCTOR']} + open={addOpen} + setOpen={setAddOpen} + onAdd={(ids: string[]) => handleAddInstructors(ids)} + selectedUsers={selectedUsers} + setSelectedUsers={setSelectedUsers} + /> + </> + ) +} + +export default Instructors diff --git a/frontend/src/users/ExerciseAssignment/Team.tsx b/frontend/src/users/ExerciseAssignment/Team.tsx new file mode 100644 index 0000000000000000000000000000000000000000..31345b16683b7575508a1f1a5386069e67a7f297 --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/Team.tsx @@ -0,0 +1,99 @@ +import { Section, SectionCard } from '@blueprintjs/core' +import type { Team } from '@inject/graphql/fragments/Team.generated' +import { useAssignUsersToTeam } from '@inject/graphql/mutations/AssignUsersToTeam.generated' +import { useRemoveUsersFromTeam } from '@inject/graphql/mutations/RemoveUsersFromTeam.generated' +import { GetExerciseDocument } from '@inject/graphql/queries/GetExercise.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import notEmpty from '@inject/shared/utils/notEmpty' +import type { FC } from 'react' +import { useCallback, useState } from 'react' +import UserTableSelection from '../UserTableSelection' +import UsersSelection from '../UsersSelection' + +interface TeamProps { + team: Team +} + +const TeamComponent: FC<TeamProps> = ({ team }) => { + const { notify } = useNotifyContext() + + const [addOpen, setAddOpen] = useState(false) + const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + + const [assignUsersToTeam] = useAssignUsersToTeam() + const handleAddToTeam = useCallback( + (team: Team, userIds: string[]) => { + assignUsersToTeam({ + variables: { + teamId: team.id, + userIds, + }, + refetchQueries: [GetExerciseDocument], + onCompleted: () => { + notify( + `User${userIds.length > 0 ? 's' : ''} added to team ${team.name}` + ) + setAddOpen(false) + }, + onError: error => { + notify(error.message, { + intent: 'danger', + }) + }, + }) + }, + [assignUsersToTeam, notify] + ) + + const [removeUsersFromTeam] = useRemoveUsersFromTeam() + const handleRemoveFromTeam = useCallback( + (team: Team, userIds: string[]) => { + removeUsersFromTeam({ + variables: { + teamId: team.id, + userIds, + }, + refetchQueries: [GetExerciseDocument], + onCompleted: () => { + notify( + `User${userIds.length > 1 ? 's' : ''} removed from team ${team.name}` + ) + }, + onError: error => { + notify(error.message, { + intent: 'danger', + }) + }, + }) + }, + [removeUsersFromTeam, notify] + ) + + return ( + <> + <Section + key={team.id} + title={`${team.name}${team.role ?? ` - ${team.role}`}`} + > + <SectionCard> + <UsersSelection + users={team.userSet?.filter(notEmpty) || []} + onRemove={(ids: string[]) => handleRemoveFromTeam(team, ids)} + onAdd={() => setAddOpen(true)} + /> + </SectionCard> + </Section> + + <UserTableSelection + groups={['INSTRUCTOR', 'TRAINEE']} + open={addOpen} + setOpen={setAddOpen} + onAdd={(ids: string[]) => handleAddToTeam(team, ids)} + selectedUsers={selectedUsers} + setSelectedUsers={setSelectedUsers} + /> + </> + ) +} + +export default TeamComponent diff --git a/frontend/src/users/ExerciseAssignment/Teams.tsx b/frontend/src/users/ExerciseAssignment/Teams.tsx new file mode 100644 index 0000000000000000000000000000000000000000..3fe26bcc2514d5656a821c555ca4329a042a9b8d --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/Teams.tsx @@ -0,0 +1,50 @@ +import { ButtonGroup, Divider, Section, SectionCard } from '@blueprintjs/core' +import { css } from '@emotion/css' +import type { Team } from '@inject/graphql/fragments/Team.generated' +import responsiveButtonGroup from '@inject/shared/css/responsiveButtonGroup' +import { Fragment, type FC } from 'react' +import AssignByTags from './AssignByTags' +import AssignEqually from './AssignEqually' +import CopyAssignment from './CopyAssignment' +import TeamComponent from './Team' +import { bodySection } from './classes' + +const body = css` + display: flex; + flex-direction: column; + gap: 1rem; +` + +interface TeamsProps { + teams: Team[] + exerciseId: string +} + +const Teams: FC<TeamsProps> = ({ teams, exerciseId }) => ( + <> + <Section + title='Teams' + icon='team' + className={bodySection} + rightElement={ + <ButtonGroup minimal className={responsiveButtonGroup}> + <AssignEqually exerciseId={exerciseId} teamCount={teams.length} /> + <Divider /> + <AssignByTags exerciseId={exerciseId} /> + <Divider /> + <CopyAssignment exerciseId={exerciseId} teamCount={teams.length} /> + </ButtonGroup> + } + > + <SectionCard className={body}> + {teams.map(team => ( + <Fragment key={team.id}> + <TeamComponent team={team} /> + </Fragment> + ))} + </SectionCard> + </Section> + </> +) + +export default Teams diff --git a/frontend/src/users/ExerciseAssignment/classes.ts b/frontend/src/users/ExerciseAssignment/classes.ts new file mode 100644 index 0000000000000000000000000000000000000000..887a9e73d0cb8376cbe1fe4087b443fdb0201092 --- /dev/null +++ b/frontend/src/users/ExerciseAssignment/classes.ts @@ -0,0 +1,5 @@ +import { css } from '@emotion/css' + +export const bodySection = css` + box-shadow: none !important; +` diff --git a/frontend/src/users/ExerciseAssignment/index.tsx b/frontend/src/users/ExerciseAssignment/index.tsx index 0e41e758cd6595b28377af7d0c05a1516e0b4e31..da31a81a2a09e6ea3b1065aef80d029c6390772b 100644 --- a/frontend/src/users/ExerciseAssignment/index.tsx +++ b/frontend/src/users/ExerciseAssignment/index.tsx @@ -1,121 +1,32 @@ -import UsersSelection from '@/users/UsersSelection' +import LinkButton from '@/components/LinkButton' +import { useNavigate } from '@/router' import { Button, NonIdealState, Section, SectionCard } from '@blueprintjs/core' -import { useAssignInstructorsToExercise } from '@inject/graphql/mutations/AssignInstructorsToExercise.generated' -import { useAssignUsersToTeam } from '@inject/graphql/mutations/AssignUsersToTeam.generated' -import { useRemoveInstructorsFromExercise } from '@inject/graphql/mutations/RemoveInstructorsFromExercise.generated' -import { useRemoveUsersFromTeam } from '@inject/graphql/mutations/RemoveUsersFromTeam.generated' -import { - GetExerciseDocument, - useGetExercise, -} from '@inject/graphql/queries/GetExercise.generated' -import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import Reloader from '@inject/graphql/components/Reloader' +import { useGetExercise } from '@inject/graphql/queries/GetExercise.generated' import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' -import { useCallback, useState } from 'react' -import UserTableSelection from '../UserTableSelection' +import { useMemo } from 'react' +import { useLocation } from 'react-router-dom' +import Instructors from './Instructors' +import Teams from './Teams' interface ExerciseAssignmentProps { exerciseId: string } const ExerciseAssignment: FC<ExerciseAssignmentProps> = ({ exerciseId }) => { - const [assignUsersToTeam] = useAssignUsersToTeam() - const [removeUsersFromTeam] = useRemoveUsersFromTeam() - const [assignInstructorsToExercise] = useAssignInstructorsToExercise() - const [removeInstructorsFromExercise] = useRemoveInstructorsFromExercise() + const nav = useNavigate() + const { state } = useLocation() + const { data, refetch } = useGetExercise({ variables: { exerciseId, }, fetchPolicy: 'network-only', }) - const { notify } = useNotifyContext() - const [listView, setListView] = useState(true) - const [currentTeam, setCurrentTeam] = useState<string | null>(null) - - const handleAssignToTeamButton = useCallback( - (ids: string[]) => { - assignUsersToTeam({ - variables: { - teamId: currentTeam || '', - userIds: ids, - }, - refetchQueries: [GetExerciseDocument], - }) - .then(() => { - notify('Users assigned to team') - }) - .catch(() => { - notify('Users team assignment failed', { - intent: 'danger', - }) - }) - }, - [currentTeam, assignUsersToTeam, notify] - ) - - const handleRemoveFromTeamButton = useCallback( - (teamId: string, ids: string[]) => { - removeUsersFromTeam({ - variables: { - teamId, - userIds: ids, - }, - refetchQueries: [GetExerciseDocument], - }) - .then(() => { - notify('Users removed from team') - }) - .catch(() => { - notify('Users removal from team failed', { - intent: 'danger', - }) - }) - }, - [removeUsersFromTeam, notify] - ) - - const handleAssignToExerciseButton = useCallback( - (ids: string[]) => { - assignInstructorsToExercise({ - variables: { - exerciseId, - userIds: ids, - }, - refetchQueries: [GetExerciseDocument], - }) - .then(() => { - notify('Instructors assigned to the exercise') - }) - .catch(() => { - notify('Instructors exercise assignment failed', { - intent: 'danger', - }) - }) - }, - [assignInstructorsToExercise, notify] - ) - - const handleRemoveFromExerciseButton = useCallback( - (ids: string[]) => { - removeInstructorsFromExercise({ - variables: { - exerciseId, - userIds: ids, - }, - refetchQueries: [GetExerciseDocument], - }) - .then(() => { - notify('Instructors removed from the exercise') - }) - .catch(() => { - notify('Instructors removal from exercise failed', { - intent: 'danger', - }) - }) - }, - [removeInstructorsFromExercise, notify] - ) + const { name, userSet, teams: teamsDirty } = data?.exerciseId || {} + const users = useMemo(() => userSet?.filter(notEmpty) || [], [userSet]) + const teams = useMemo(() => teamsDirty?.filter(notEmpty) || [], [teamsDirty]) if (!data || !data.exerciseId) { return ( @@ -127,73 +38,44 @@ const ExerciseAssignment: FC<ExerciseAssignmentProps> = ({ exerciseId }) => { } return ( - <Section - title={`Participants - exercise ${data?.exerciseId.id}`} - rightElement={ + <> + {state?.fromUserDetail ? ( <Button + type='button' + minimal + icon='chevron-left' onClick={() => { - refetch() + nav(-1) }} - icon='reset' - minimal > - Reload + Back </Button> - } - > - <SectionCard> - {listView ? ( - <> - <Section title='Instructors'> - <SectionCard> - <UsersSelection - users={data?.exerciseId.userSet?.filter(notEmpty) || []} - onRemove={ids => handleRemoveFromExerciseButton(ids)} - onAssign={() => { - setListView(prev => !prev) - setCurrentTeam(null) - }} - assignTitle='Add' - removeTitle='Remove' - /> - </SectionCard> - </Section> - {data?.exerciseId.teams.map(team => ( - <Section - key={team.id} - title={`${team.name}${team.role ?? ` - ${team.role}`}`} - style={{ marginTop: '1rem' }} - > - <SectionCard> - <UsersSelection - users={team.userSet?.filter(notEmpty) || []} - onRemove={(ids: string[]) => - handleRemoveFromTeamButton(team.id, ids) - } - onAssign={() => { - setListView(prev => !prev) - setCurrentTeam(team.id) - }} - assignTitle='Add' - removeTitle='Remove' - /> - </SectionCard> - </Section> - ))} - </> - ) : ( - <UserTableSelection - onBack={() => setListView(prev => !prev)} - onAssign={(ids: string[]) => - currentTeam === null - ? handleAssignToExerciseButton(ids) - : handleAssignToTeamButton(ids) - } - assignTitle='Add selected' - /> - )} - </SectionCard> - </Section> + ) : ( + <LinkButton + link={['/exercise-panel']} + button={{ + text: 'Back', + icon: 'chevron-left', + minimal: true, + }} + /> + )} + + <Section + title='Manage participants of exercise' + subtitle={name} + rightElement={<Reloader onRefetch={refetch} minimal />} + > + <SectionCard> + <Instructors users={users} exerciseId={exerciseId} /> + </SectionCard> + <SectionCard> + <Teams teams={teams} exerciseId={exerciseId} /> + </SectionCard> + </Section> + + {/* TODO: highlight or do not show already selected users */} + </> ) } diff --git a/frontend/src/users/UserCreator/index.tsx b/frontend/src/users/UserCreator/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1ca75fbe8643133568ac1f02c0cbd75ec1219712 --- /dev/null +++ b/frontend/src/users/UserCreator/index.tsx @@ -0,0 +1,212 @@ +import { + Button, + Classes, + Dialog, + DialogBody, + DialogFooter, + FormGroup, + InputGroup, + Label, + MenuItem, +} from '@blueprintjs/core' +import { MultiSelect, Select } from '@blueprintjs/select' +import useApolloClient from '@inject/graphql/client/useApolloClient' +import type { Tag } from '@inject/graphql/fragments/Tag.generated' +import { useCreateUser } from '@inject/graphql/mutations/CreateUser.generated' +import { + GetTagsDocument, + useGetTags, +} from '@inject/graphql/queries/GetTags.generated' +import { GetUsersDocument } from '@inject/graphql/queries/GetUsers.generated' +import type { AuthGroup } from '@inject/graphql/types' +import { dialog } from '@inject/shared/css/dialog' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import notEmpty from '@inject/shared/utils/notEmpty' +import { useCallback, useState } from 'react' +import { AUTH_GROUPS } from '../UserTable/utils' + +const UserCreator = () => { + const [open, setOpen] = useState<boolean>(false) + const { notify } = useNotifyContext() + const client = useApolloClient() + const [createUser, { loading }] = useCreateUser() + + const { data } = useGetTags() + const availableTags = data?.tags?.filter(notEmpty) || [] + + const [email, setEmail] = useState<string>() + const [firstName, setFirstName] = useState<string>() + const [lastName, setLastName] = useState<string>() + const [tagsQuery, setTagsQuery] = useState<string>() + const [tags, setTags] = useState<Tag[]>() + const [group, setGroup] = useState<AuthGroup>() + + const handleSubmit = useCallback(() => { + if (!email || !group) return + + createUser({ + variables: { + email, + firstName: firstName || null, + lastName: lastName || null, + tags: tags?.map(tag => tag.name) || [], + group, + }, + onCompleted: () => { + setOpen(false) + client.refetchQueries({ + include: [GetUsersDocument, GetTagsDocument], + }) + setEmail(undefined) + setFirstName(undefined) + setLastName(undefined) + setTags(undefined) + setGroup(undefined) + }, + onError: err => { + notify(err.message, { + intent: 'danger', + }) + }, + }) + }, [client, createUser, email, firstName, group, lastName, notify, tags]) + + return ( + <> + <Button + minimal + active={open} + onClick={() => { + setOpen(true) + }} + fill + alignText='left' + icon='add' + > + Create a user + </Button> + + <Dialog + className={dialog} + title='Create a user' + isOpen={open} + onClose={() => setOpen(false)} + icon='add' + > + <DialogBody> + <Label style={{ width: '100%' }}> + Email + <InputGroup + leftIcon='envelope' + placeholder='john.doe@example.com' + value={email} + onChange={e => setEmail(e.target.value)} + /> + </Label> + <Label style={{ width: '100%' }}> + First name <span className={Classes.TEXT_MUTED}>(optional)</span> + <InputGroup + placeholder='John' + value={firstName} + onChange={e => setFirstName(e.target.value)} + /> + </Label> + <Label style={{ width: '100%' }}> + Last name <span className={Classes.TEXT_MUTED}>(optional)</span> + <InputGroup + placeholder='Doe' + value={lastName} + onChange={e => setLastName(e.target.value)} + /> + </Label> + <Label style={{ width: '100%' }}> + Group + <Select<AuthGroup> + fill + onItemSelect={group => setGroup(group)} + items={AUTH_GROUPS} + popoverProps={{ minimal: true }} + itemRenderer={(item, { handleClick }) => ( + <MenuItem + onClick={handleClick} + text={item} + active={item === group} + /> + )} + filterable={false} + > + <Button + alignText='left' + fill + rightIcon='double-caret-vertical' + text={group || 'Select a group'} + /> + </Select> + </Label> + {/* using Label directly messes up the MultiSelect */} + <FormGroup + fill + label={ + <> + Tags <span className={Classes.TEXT_MUTED}>(optional)</span> + </> + } + labelFor='create-user-tags' + > + <MultiSelect<Tag> + tagInputProps={{ inputProps: { id: 'create-user-tags' } }} + query={tagsQuery} + onQueryChange={setTagsQuery} + items={ + tagsQuery + ? availableTags.filter(tag => tag.name.includes(tagsQuery)) + : availableTags + } + itemRenderer={(item, { handleClick }) => ( + <MenuItem + key={item.id} + text={item.name} + roleStructure='listoption' + shouldDismissPopover={false} + onClick={handleClick} + selected={tags?.includes(item)} + active={tags?.includes(item)} + /> + )} + onItemSelect={(item: Tag) => + setTags(prev => + prev?.includes(item) + ? prev.filter(tag => tag.id !== item.id) + : [...(prev || []), item] + ) + } + onRemove={item => + setTags(prev => prev?.filter(tag => tag.id !== item.id)) + } + selectedItems={tags || []} + tagRenderer={item => item.name} + popoverProps={{ + minimal: true, + }} + /> + </FormGroup> + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={!email || !group} + title={email && group ? undefined : 'Fill in all required fields'} + loading={loading} + > + Submit + </Button> + } + /> + </Dialog> + </> + ) +} + +export default UserCreator diff --git a/frontend/src/users/UserDetail/ListItem.tsx b/frontend/src/users/UserDetail/ListItem.tsx new file mode 100644 index 0000000000000000000000000000000000000000..bb47672af54fc631eac37ff15baf4b35d490395e --- /dev/null +++ b/frontend/src/users/UserDetail/ListItem.tsx @@ -0,0 +1,23 @@ +import { Button } from '@blueprintjs/core' +import { css } from '@emotion/css' +import type { FC } from 'react' + +const listItem = css` + display: flex; + gap: 0.25rem; + align-items: center; +` + +interface ListItemProps { + name: string + onClick: () => void +} + +const ListItem: FC<ListItemProps> = ({ name, onClick }) => ( + <div className={listItem}> + {name} + <Button minimal icon='annotation' onClick={onClick} /> + </div> +) + +export default ListItem diff --git a/frontend/src/users/UserDetail/Options.tsx b/frontend/src/users/UserDetail/Options.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2edb3136ca5d21365ffaab5e1bf8e708b218b9b6 --- /dev/null +++ b/frontend/src/users/UserDetail/Options.tsx @@ -0,0 +1,47 @@ +import { ButtonGroup, Divider } from '@blueprintjs/core' +import Reloader from '@inject/graphql/components/Reloader' +import responsiveButtonGroup from '@inject/shared/css/responsiveButtonGroup' +import type { FC } from 'react' +import useDeleteUsers from '../useDeleteUsers' +import useRegenerateCredentials from '../useResetCredentials' + +interface OptionsProps { + userId: string + onRefetch: () => void + onDelete: () => void +} + +const Options: FC<OptionsProps> = ({ userId, onRefetch, onDelete }) => { + const { button: deleteButton, alert: deleteAlert } = useDeleteUsers({ + userIds: [userId], + onConfirm: onDelete, + }) + const { button: resetButton, alert: resetAlert } = useRegenerateCredentials({ + userIds: [userId], + }) + + return ( + <> + <ButtonGroup minimal className={responsiveButtonGroup}> + {resetButton && ( + <> + {resetButton} + <Divider /> + </> + )} + {deleteButton && ( + <> + {deleteButton} + <Divider /> + </> + )} + <Reloader onRefetch={onRefetch} /> + </ButtonGroup> + + {deleteAlert} + {resetAlert} + </> + ) +} + +export default Options diff --git a/frontend/src/users/UserDetail/UserDetailRow.tsx b/frontend/src/users/UserDetail/UserDetailRow.tsx index 373a67779aa3508485475b2526db11cc1081efc9..414727391ae88d7ab5d02c9308a5b357a5d4316c 100644 --- a/frontend/src/users/UserDetail/UserDetailRow.tsx +++ b/frontend/src/users/UserDetail/UserDetailRow.tsx @@ -1,16 +1,20 @@ +import type { ValueType } from '@/components/SortableTable/typing' +import { defaultFormatValue } from '@/components/SortableTable/utils' +import { css } from '@emotion/css' import type { FC } from 'react' -import { detailRow, detailRowName } from '.' -import type { UserValueType } from '../UserTable' -import { formatValue } from '../utilities' interface UserDetailRowProps { name: string - value: UserValueType + value: ValueType } +const detailRowName = css` + font-weight: bolder; +` + const UserDetailRow: FC<UserDetailRowProps> = ({ name, value }) => ( - <div className={detailRow}> - <span className={detailRowName}>{name}: </span> {formatValue(value)} + <div> + <span className={detailRowName}>{name}: </span> {defaultFormatValue(value)} </div> ) diff --git a/frontend/src/users/UserDetail/UserDetailSetting.tsx b/frontend/src/users/UserDetail/UserDetailSetting.tsx index cbc07a7c0e4bd68a8fb9b0bca9544b146ea9f232..258576eff7a3bb36d36094ea0e629d974dddd29f 100644 --- a/frontend/src/users/UserDetail/UserDetailSetting.tsx +++ b/frontend/src/users/UserDetail/UserDetailSetting.tsx @@ -1,13 +1,39 @@ -import { Button, HTMLSelect } from '@blueprintjs/core' +import { Button, MenuItem } from '@blueprintjs/core' +import { Select } from '@blueprintjs/select' +import { css } from '@emotion/css' import type { User } from '@inject/graphql/fragments/User.generated' import { useChangeUserData } from '@inject/graphql/mutations/ChangeUserData.generated' -import { useGetGroups } from '@inject/graphql/queries/GetGroups.generated' +import type { AuthGroup } from '@inject/graphql/types' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' import { useCallback, useEffect, useMemo, useState } from 'react' -import { detailRow, detailRowName } from '.' -import { accountStatusesOptions } from '../utilities' +import { AUTH_GROUPS } from '../UserTable/utils' + +const wrapper = css` + display: flex; + gap: 0.5rem; + justify-content: space-between; +` + +const settings = css` + display: flex; + flex-direction: column; + gap: 0.5rem; +` + +const settingRow = css` + display: flex; + gap: 0.5rem; + align-items: center; +` + +const settingName = css` + font-weight: bolder; +` + +const saveButton = css` + align-self: flex-end; +` interface UserDetailSettingProps { user: User @@ -15,72 +41,108 @@ interface UserDetailSettingProps { const UserDetailSetting: FC<UserDetailSettingProps> = ({ user }) => { const [changeUserData, { loading }] = useChangeUserData() - const { data: groupsData } = useGetGroups({ - fetchPolicy: 'cache-first', - }) const { notify } = useNotifyContext() - const userGroups = useMemo( - () => groupsData?.groups?.filter(notEmpty).map(group => group.name) || [], - [groupsData] - ) - - const [userGroup, setUserGroup] = useState(user?.group || '') - - const [accountStatus, setAccountStatus] = useState( - (user?.isActive || false).toString() - ) + const [newGroup, setNewGroup] = useState(user.group) + const [newIsActive, setNewIsActive] = useState(user.isActive) useEffect(() => { - setUserGroup(user?.group || '') - setAccountStatus((user?.isActive || false).toString()) + setNewGroup(user.group) + setNewIsActive(user.isActive) }, [user]) const handleButton = useCallback(() => { changeUserData({ variables: { userId: user.id, - group: userGroup, - active: accountStatus == 'true', - }, - onCompleted: () => { - notify('User data changed') + group: newGroup === user.group ? null : newGroup, + active: newIsActive === user.isActive ? null : newIsActive, }, onError: error => { notify(error.message, { intent: 'danger' }) }, }) - }, [userGroup, accountStatus, notify]) + }, [ + changeUserData, + user.id, + user.group, + user.isActive, + newGroup, + newIsActive, + notify, + ]) + + const saveDisabled = useMemo( + () => newGroup === user.group && newIsActive === user.isActive, + [newGroup, newIsActive, user.group, user.isActive] + ) return ( - <> - <div className={detailRow} style={{ display: 'flex' }}> - <span className={detailRowName}>Group: </span>{' '} - <HTMLSelect - fill - options={userGroups} - value={userGroup} - onChange={e => setUserGroup(e.target.value)} - /> - </div> - <div className={detailRow} style={{ display: 'flex' }}> - <span className={detailRowName}>Active: </span>{' '} - <HTMLSelect - fill - options={accountStatusesOptions} - value={accountStatus} - onChange={e => setAccountStatus(e.target.value)} - /> + <div className={wrapper}> + <div className={settings}> + <div className={settingRow}> + <span className={settingName}>Group:</span> + <Select<AuthGroup> + fill + onItemSelect={group => setNewGroup(group)} + items={AUTH_GROUPS} + popoverProps={{ minimal: true }} + itemRenderer={(item, { handleClick }) => ( + <MenuItem + onClick={handleClick} + text={item} + active={item === newGroup} + /> + )} + filterable={false} + > + <Button + alignText='left' + fill + rightIcon='double-caret-vertical' + text={newGroup} + /> + </Select> + </div> + <div className={settingRow}> + <span className={settingName}>Active:</span> + <Select<'yes' | 'no'> + fill + onItemSelect={isActive => setNewIsActive(isActive === 'yes')} + items={['yes', 'no']} + popoverProps={{ minimal: true }} + itemRenderer={(item, { handleClick }) => ( + <MenuItem + onClick={handleClick} + text={item} + active={item === (newIsActive ? 'yes' : 'no')} + /> + )} + filterable={false} + > + <Button + alignText='left' + fill + rightIcon='double-caret-vertical' + text={newIsActive ? 'yes' : 'no'} + /> + </Select> + </div> </div> + <Button type='button' intent='primary' + icon='floppy-disk' onClick={handleButton} loading={loading} + disabled={saveDisabled} + title={saveDisabled ? 'No changes' : undefined} + className={saveButton} > - Save changes + Save </Button> - </> + </div> ) } diff --git a/frontend/src/users/UserDetail/index.tsx b/frontend/src/users/UserDetail/index.tsx index dc8d47c5338815c9a985e55cf8ddedebf45056da..432f2c2d3b9cc2fa6904c456bc8e97141a8ab22c 100644 --- a/frontend/src/users/UserDetail/index.tsx +++ b/frontend/src/users/UserDetail/index.tsx @@ -1,38 +1,38 @@ +import LinkButton from '@/components/LinkButton' import { useNavigate } from '@/router' -import { Button, NonIdealState, Section, SectionCard } from '@blueprintjs/core' +import { NonIdealState, Section, SectionCard } from '@blueprintjs/core' import { css } from '@emotion/css' import { useGetUser } from '@inject/graphql/queries/GetUser.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import notEmpty from '@inject/shared/utils/notEmpty' -import type { FC } from 'react' +import { useCallback, useMemo, type FC } from 'react' +import ListItem from './ListItem' +import Options from './Options' import UserDetailRow from './UserDetailRow' import UserDetailSetting from './UserDetailSetting' -const detail = css` - display: grid; - grid-template-columns: 50% 50%; - grid-column-gap: 10px; -` - -export const detailRow = css` - padding-bottom: 0.75rem; +const listTitle = css` + font-weight: bolder; + margin-bottom: 0.5rem; ` -export const detailRowName = css` - font-weight: bolder; - padding-right: 0.5rem; +const detailCard = css` + display: flex; + flex-direction: column; + gap: 0.5rem; + align-items: flex-start; ` -interface ListItemProps { - name: string - onClick: () => void -} +const lists = css` + display: grid; + grid-template-columns: 1fr 1fr; -const ListItem: FC<ListItemProps> = ({ name, onClick }) => ( - <div> - {name} - <Button minimal icon='annotation' onClick={onClick} /> - </div> -) + @media (max-width: 40rem) { + display: flex; + flex-direction: column; + gap: 1rem; + } +` interface UserDetailProps { userId: string @@ -40,6 +40,7 @@ interface UserDetailProps { const UserDetail: FC<UserDetailProps> = ({ userId }) => { const nav = useNavigate() + const { notify } = useNotifyContext() const { data: userData, refetch } = useGetUser({ variables: { @@ -47,6 +48,34 @@ const UserDetail: FC<UserDetailProps> = ({ userId }) => { }, fetchPolicy: 'network-only', }) + const { + username, + firstName, + lastName, + definitions: definitionsDirty, + exercises: exercisesDirty, + teams: teamsDirty, + } = userData?.user || {} + const subtitle = useMemo(() => { + if (firstName && lastName) return `${firstName} ${lastName}` + if (firstName) return firstName + if (lastName) return lastName + return + }, [firstName, lastName]) + const definitions = useMemo( + () => (definitionsDirty || []).filter(notEmpty), + [definitionsDirty] + ) + const exercises = useMemo( + () => (exercisesDirty || []).filter(notEmpty), + [exercisesDirty] + ) + const teams = useMemo(() => (teamsDirty || []).filter(notEmpty), [teamsDirty]) + + const handleDelete = useCallback(() => { + notify('User deleted successfully', { intent: 'success' }) + nav('/users') + }, [nav, notify]) if (!userData || !userData.user) { return ( @@ -58,74 +87,93 @@ const UserDetail: FC<UserDetailProps> = ({ userId }) => { } return ( - <Section - title={`User detail - ${userId}`} - rightElement={ - <Button - onClick={() => { - refetch() - }} - icon='reset' - minimal - > - Reload - </Button> - } - > - <SectionCard> - <div className={detail}> - <div> - <UserDetailRow name={'Username'} value={userData.user.username} /> - <UserDetailRow - name={'First name'} - value={userData.user.firstName} - /> - <UserDetailRow name={'Last name'} value={userData.user.lastName} /> - <UserDetailRow - name={'Date joined'} - value={userData.user.dateJoined} - /> - <UserDetailRow - name={'Last login'} - value={userData.user.lastLogin} - /> - <UserDetailRow name={'Staff'} value={userData.user.isStaff} /> - <UserDetailRow - name={'Superuser'} - value={userData.user.isSuperuser} - /> - <UserDetailRow - name={'Tags'} - value={userData.user.tags.map(tag => tag.name).join(', ')} - /> - <UserDetailSetting user={userData.user} /> - </div> - <div> - {(userData.user.exercises?.length || 0) + - (userData.user.teams?.length || 0) !== - 0 && ( + <> + <LinkButton + link={['/users']} + button={{ + text: 'Back', + icon: 'chevron-left', + minimal: true, + }} + /> + + <Section + title={username} + subtitle={subtitle} + icon='user' + rightElement={ + <Options + userId={userId} + onRefetch={refetch} + onDelete={handleDelete} + /> + } + > + <SectionCard className={detailCard}> + <UserDetailRow + name='Date joined' + value={new Date(userData.user.dateJoined)} + /> + <UserDetailRow + name='Last login' + value={ + userData.user.lastLogin ? new Date(userData.user.lastLogin) : null + } + /> + <UserDetailRow + name='Tags' + value={userData.user.tags.map(tag => tag.name).join(', ')} + /> + <UserDetailRow name='Imported' value={userData.user.isImported} /> + </SectionCard> + <SectionCard> + <UserDetailSetting user={userData.user} /> + </SectionCard> + {exercises.length + teams.length + definitions.length > 0 && ( + <SectionCard className={lists}> + {definitions.length > 0 && ( + <div> + <div className={listTitle}>Definitions:</div> + {definitions.map(definition => ( + <ListItem + key={definition.id} + name={`${definition.name} (ID: ${definition.id})`} + onClick={() => + definition.id && + nav('/exercise-panel/definition/:definitionId', { + params: { + definitionId: definition.id.toString(), + }, + state: { fromUserDetail: true }, + }) + } + /> + ))} + </div> + )} + {exercises.length + teams.length > 0 && ( <div> - <span className={detailRowName}>Exercises:</span> - {userData.user.exercises && - userData.user.exercises.filter(notEmpty).map(exercise => ( + <div className={listTitle}>Exercises:</div> + {exercises && + exercises.map(exercise => ( <ListItem key={exercise.id} - name={`Exercise ${exercise.id} - instructor `} + name={`${exercise.name} (ID: ${exercise.id}) - instructor`} onClick={() => - nav('/users/exercise/:exerciseId', { + nav('/exercise-panel/exercise/:exerciseId', { params: { exerciseId: exercise.id || '' }, state: { fromUserDetail: true }, }) } /> ))} - {userData.user.teams && - userData.user.teams.filter(notEmpty).map(team => ( + {teams && + teams.map(team => ( <ListItem key={team.id} - name={`Exercise ${team.exercise.id} - ${team.name + (team.role ?? `, ${team.role}`)} `} + name={`${team.exercise.name} (ID: ${team.exercise.id}) - ${team.name + (team.role ?? `, ${team.role}`)}`} onClick={() => - nav('/users/exercise/:exerciseId', { + nav('/exercise-panel/exercise/:exerciseId', { params: { exerciseId: team.exercise.id }, state: { fromUserDetail: true }, }) @@ -134,31 +182,10 @@ const UserDetail: FC<UserDetailProps> = ({ userId }) => { ))} </div> )} - {userData.user.definitions && - userData.user.definitions.length !== 0 && ( - <div> - <span className={detailRowName}>Definitions:</span> - {userData.user.definitions - .filter(notEmpty) - .map(definition => ( - <ListItem - key={definition.id} - name={`Definition ${definition.id} `} - onClick={() => - definition.id && - nav('/users/definition/:definitionId', { - params: { definitionId: definition.id.toString() }, - state: { fromUserDetail: true }, - }) - } - /> - ))} - </div> - )} - </div> - </div> - </SectionCard> - </Section> + </SectionCard> + )} + </Section> + </> ) } diff --git a/frontend/src/users/UserTable/Filters/Active.tsx b/frontend/src/users/UserTable/Filters/Active.tsx new file mode 100644 index 0000000000000000000000000000000000000000..c73921f32da7e81c19fa2a85bb6d6d181656bb90 --- /dev/null +++ b/frontend/src/users/UserTable/Filters/Active.tsx @@ -0,0 +1,40 @@ +import Filters from '@/components/Filters' +import { Checkbox } from '@blueprintjs/core' +import type { FC } from 'react' +import type { Filter } from '../utils' +import { Active } from '../utils' + +const Active: FC<Filter<Active>> = ({ selected, setSelected }) => { + const filters = ( + <> + <Checkbox + key='active' + label='Active' + checked={selected.active} + onChange={() => setSelected({ ...selected, active: !selected.active })} + /> + <Checkbox + key='inactive' + label='Inactive' + checked={selected.inactive} + onChange={() => + setSelected({ ...selected, inactive: !selected.inactive }) + } + /> + </> + ) + + return ( + <Filters + fill + noWrap + heading='Active status' + content={filters} + position='left' + onSelectAll={() => setSelected({ active: true, inactive: true })} + onDeselectAll={() => setSelected({ active: false, inactive: false })} + /> + ) +} + +export default Active diff --git a/frontend/src/users/UserTable/Filters/Columns.tsx b/frontend/src/users/UserTable/Filters/Columns.tsx new file mode 100644 index 0000000000000000000000000000000000000000..5107362cc1829246dac72cfc0bb9644ba2639f7f --- /dev/null +++ b/frontend/src/users/UserTable/Filters/Columns.tsx @@ -0,0 +1,50 @@ +import Filters from '@/components/Filters' +import { Checkbox } from '@blueprintjs/core' +import type { FC } from 'react' +import { type Filter, type UserProperty } from '../utils' + +const Columns: FC<Filter<UserProperty[]>> = ({ selected, setSelected }) => { + const filters = ( + <> + {selected.map(currentProperty => ( + <Checkbox + key={currentProperty.name} + label={currentProperty.name} + checked={currentProperty.display} + onChange={() => + setSelected(prev => + prev.map(property => + property.name === currentProperty.name + ? { ...property, display: !property.display } + : property + ) + ) + } + /> + ))} + </> + ) + + return ( + <Filters + fill + heading='Select columns' + noWrap + content={filters} + icon='column-layout' + position='left' + onSelectAll={() => + setSelected(prev => + prev.map(property => ({ ...property, display: true })) + ) + } + onDeselectAll={() => + setSelected(prev => + prev.map(property => ({ ...property, display: false })) + ) + } + /> + ) +} + +export default Columns diff --git a/frontend/src/users/UserTable/Filters/Tags.tsx b/frontend/src/users/UserTable/Filters/Tags.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8e07536cd63f9bb0e97cb76531eec49f822b6171 --- /dev/null +++ b/frontend/src/users/UserTable/Filters/Tags.tsx @@ -0,0 +1,51 @@ +import Filters from '@/components/Filters' +import { Checkbox } from '@blueprintjs/core' +import { useGetTags } from '@inject/graphql/queries/GetTags.generated' +import notEmpty from '@inject/shared/utils/notEmpty' +import type { FC } from 'react' +import { useMemo } from 'react' +import type { Filter } from '../utils' + +const Tags: FC<Filter<string[]>> = ({ selected, setSelected }) => { + const onItemSelect = (tag: string) => setSelected(prev => [...prev, tag]) + const onRemove = (tagToRemove: string) => + setSelected(prev => prev.filter(tag => tag !== tagToRemove)) + + const { data } = useGetTags({ + fetchPolicy: 'network-only', + }) + const allTags = useMemo( + () => data?.tags?.filter(notEmpty).map(tag => tag?.name) || [], + [data?.tags] + ) + + const filters = ( + <> + {allTags.map(tag => ( + <Checkbox + key={tag} + label={tag} + checked={selected.includes(tag)} + onChange={() => + selected.includes(tag) ? onRemove(tag) : onItemSelect(tag) + } + /> + ))} + </> + ) + + return ( + <Filters + noWrap + fill + heading='Tags' + content={filters} + position='left' + disabled={allTags.length === 0} + onSelectAll={() => setSelected(allTags)} + onDeselectAll={() => setSelected([])} + /> + ) +} + +export default Tags diff --git a/frontend/src/users/UserTable/Filters/UserGroups.tsx b/frontend/src/users/UserTable/Filters/UserGroups.tsx new file mode 100644 index 0000000000000000000000000000000000000000..b252305b642eabb7ef9dda4df855e6b3ec0acbc6 --- /dev/null +++ b/frontend/src/users/UserTable/Filters/UserGroups.tsx @@ -0,0 +1,42 @@ +import Filters from '@/components/Filters' +import { Checkbox } from '@blueprintjs/core' +import type { AuthGroup } from '@inject/graphql/types' +import type { FC } from 'react' +import type { Filter } from '../utils' +import { AUTH_GROUPS } from '../utils' + +const UserGroups: FC<Filter<AuthGroup[]>> = ({ selected, setSelected }) => { + const onItemSelect = (group: AuthGroup) => + setSelected(prev => [...prev, group]) + const onRemove = (groupToRemove: AuthGroup) => + setSelected(prev => prev.filter(group => group !== groupToRemove)) + + const filters = ( + <> + {AUTH_GROUPS.map(group => ( + <Checkbox + key={group} + label={group} + checked={selected.includes(group)} + onChange={() => + selected.includes(group) ? onRemove(group) : onItemSelect(group) + } + /> + ))} + </> + ) + + return ( + <Filters + fill + noWrap + heading='User groups' + content={filters} + position='left' + onSelectAll={() => setSelected(AUTH_GROUPS)} + onDeselectAll={() => setSelected([])} + /> + ) +} + +export default UserGroups diff --git a/frontend/src/users/UserTable/index.tsx b/frontend/src/users/UserTable/index.tsx deleted file mode 100644 index fe2ebcec405968e7a0f2ab734c78c69cbff849d0..0000000000000000000000000000000000000000 --- a/frontend/src/users/UserTable/index.tsx +++ /dev/null @@ -1,306 +0,0 @@ -import Filters from '@/components/Filters' -import type { Column, ValueType } from '@/components/SortableTable' -import SortableTable from '@/components/SortableTable' -import { Button, Checkbox, Divider, InputGroup } from '@blueprintjs/core' -import { css } from '@emotion/css' -import type { Tag } from '@inject/graphql/fragments/Tag.generated' -import type { User } from '@inject/graphql/fragments/User.generated' -import { useGetGroups } from '@inject/graphql/queries/GetGroups.generated' -import { useGetTags } from '@inject/graphql/queries/GetTags.generated' -import { useGetUsers } from '@inject/graphql/queries/GetUsers.generated' -import notEmpty from '@inject/shared/utils/notEmpty' -import type { FC } from 'react' -import React, { useEffect, useMemo, useState } from 'react' -import UsersUploader from '../UsersUploader' -import { accountStatuses, formatValue } from '../utilities' - -const filterTab = css` - & div { - padding-right: 0.5rem; - } -` - -const selectedRow = css` - background: rgba(143, 153, 168, 0.15); -` - -export interface UserType extends User { - [key: string]: UserValueType -} - -export type UserValueType = boolean | Array<object | null> | ValueType - -type UserObject = Record<keyof UserType, undefined> - -interface FilterGroupProps { - items: string[] - displayState: boolean[] - setDisplayState: React.Dispatch<React.SetStateAction<boolean[]>> -} - -const FilterGroup = ({ - items, - displayState, - setDisplayState, -}: FilterGroupProps) => ( - <> - {items.map((item, i) => ( - <Checkbox - key={item} - label={item} - checked={displayState[i]} - onChange={() => - setDisplayState(prev => [ - ...prev.slice(0, i), - !prev[i], - ...prev.slice(i + 1), - ]) - } - /> - ))} - </> -) - -interface UserTableProps { - allowAddingUsers?: boolean - onClick: (id: string) => void - selectedUsers?: string[] -} - -const UserTable: FC<UserTableProps> = ({ - allowAddingUsers, - onClick, - selectedUsers, -}) => { - const { data: usersData, refetch } = useGetUsers({ - fetchPolicy: 'network-only', - }) - const { data: groupsData } = useGetGroups({ - fetchPolicy: 'cache-first', - }) - const { data: tagsData } = useGetTags({ - fetchPolicy: 'network-only', - }) - - const userPropertiesObject: UserObject = { - id: undefined, - username: undefined, - firstName: undefined, - lastName: undefined, - group: undefined, - isActive: undefined, - dateJoined: undefined, - isStaff: undefined, - isSuperuser: undefined, - lastLogin: undefined, - tags: undefined, - } - const userProperties = Object.keys(userPropertiesObject) as string[] - const [displayProperty, setDisplayProperty] = useState( - userProperties.map((_userProperty, i) => 0 < i && i < 7) - ) - const displayedProperties = userProperties.filter( - (_userProperty, i) => displayProperty[i] - ) - - const userGroups = useMemo( - () => groupsData?.groups?.filter(notEmpty).map(group => group.name) || [], - [groupsData] - ) - const [displayUserGroup, setDisplayUserGroup] = useState( - new Array(userGroups.length).fill(true) - ) - const displayedUserGroups = userGroups.filter( - (_userGroup, i) => displayUserGroup[i] - ) - useEffect(() => { - setDisplayUserGroup(new Array(userGroups.length).fill(true)) - }, [groupsData]) - - const [displayAccountStatus, setDisplayAccountStatus] = useState( - new Array(accountStatuses.length).fill(true) - ) - const displayedAccountStatuses = accountStatuses.filter( - (_accountStatus, i) => displayAccountStatus[i] - ) - - const tags = useMemo( - () => tagsData?.tags?.filter(notEmpty).map(tag => tag.name) || [], - [tagsData] - ) - const [displayTag, setDisplayTag] = useState( - new Array(tags.length).fill(false) - ) - const displayedTags = tags.filter((_tag, i) => displayTag[i]) - useEffect(() => { - setDisplayTag(new Array(userGroups.length).fill(false)) - }, [groupsData]) - - const [username, setUsername] = useState<string>('') - const [firstName, setFirstName] = useState<string>('') - const [lastName, setLastName] = useState<string>('') - - const columns: Column[] = [ - ...displayedProperties.map(property => ({ - name: property, - style: { width: `${100 / displayedProperties.length}%` }, - })), - ] - - const rows = (usersData?.users || []) - .filter(notEmpty) - .filter( - (user: User) => - user !== null && - displayedUserGroups.includes(user.group || '') && - displayedAccountStatuses.includes(formatValue(user.isActive)) && - (user.username || '').includes(username) && - (user.firstName || '').includes(firstName) && - (user.lastName || '').includes(lastName) && - displayedTags.every(tag => - user.tags - .filter(notEmpty) - .map(tag => tag.name) - .includes(tag) - ) - ) - .filter(notEmpty) - .map((user: User) => ({ - columns, - values: columns.map(column => { - const value = (user as UserType)[column.name] - if (value instanceof Array) { - if (!value) { - return '' - } - return value.map(tag => (tag as Tag).name).join(', ') - } - return value as ValueType - }), - onClick: () => onClick(user.id), - class: selectedUsers?.includes(user.id) ? selectedRow : undefined, - })) - - const filters = ( - <FilterGroup - items={userProperties} - displayState={displayProperty} - setDisplayState={setDisplayProperty} - /> - ) - - const groupFilters = ( - <FilterGroup - items={userGroups} - displayState={displayUserGroup} - setDisplayState={setDisplayUserGroup} - /> - ) - - const accountStatusFilters = ( - <FilterGroup - items={accountStatuses} - displayState={displayAccountStatus} - setDisplayState={setDisplayAccountStatus} - /> - ) - - const tagFilters = ( - <FilterGroup - items={tags} - displayState={displayTag} - setDisplayState={setDisplayTag} - /> - ) - - return ( - <div style={{ display: 'flex', flexDirection: 'column', height: '100%' }}> - <div - style={{ - display: 'flex', - justifyContent: 'space-between', - marginBottom: '0.5rem', - }} - > - <Filters - heading='Displayed properties' - content={filters} - position='bottom-left' - onSelectAll={() => setDisplayProperty(prev => prev.map(() => true))} - onDeselectAll={() => - setDisplayProperty(prev => prev.map(() => false)) - } - /> - <div> - <Button - onClick={() => { - refetch() - }} - icon='reset' - > - Reload - </Button> - {allowAddingUsers && <UsersUploader />} - </div> - </div> - <div style={{ display: 'flex' }} className={filterTab}> - <Filters - heading='User groups' - content={groupFilters} - position='bottom-left' - onSelectAll={() => setDisplayUserGroup(prev => prev.map(() => true))} - onDeselectAll={() => - setDisplayUserGroup(prev => prev.map(() => false)) - } - /> - <Filters - heading='Active' - content={accountStatusFilters} - position='bottom-left' - onSelectAll={() => - setDisplayAccountStatus(prev => prev.map(() => true)) - } - onDeselectAll={() => - setDisplayAccountStatus(prev => prev.map(() => false)) - } - /> - <Filters - heading='Tags' - content={tagFilters} - position='bottom-left' - onSelectAll={() => setDisplayTag(prev => prev.map(() => true))} - onDeselectAll={() => setDisplayTag(prev => prev.map(() => false))} - /> - <InputGroup - placeholder='Username' - value={username} - onChange={e => setUsername(e.target.value)} - /> - <InputGroup - placeholder='First name' - value={firstName} - onChange={e => setFirstName(e.target.value)} - /> - <InputGroup - placeholder='Last name' - value={lastName} - onChange={e => setLastName(e.target.value)} - /> - </div> - <Divider /> - <div style={{ flex: 1 }}> - <SortableTable - columns={columns} - rows={rows} - formatValue={formatValue} - /> - </div> - </div> - ) -} - -UserTable.defaultProps = { - allowAddingUsers: true, -} - -export default UserTable diff --git a/frontend/src/users/UserTable/useFilterUsers.tsx b/frontend/src/users/UserTable/useFilterUsers.tsx new file mode 100644 index 0000000000000000000000000000000000000000..f3ddb539a8db9b0579c4847ef9b57373c0394f71 --- /dev/null +++ b/frontend/src/users/UserTable/useFilterUsers.tsx @@ -0,0 +1,21 @@ +import type { User } from '@inject/graphql/fragments/User.generated' + +interface FilterUsersProps { + users: User[] + searchString?: string +} + +const useFilterUsers = ({ users, searchString }: FilterUsersProps): User[] => { + if (!searchString) return users + + const insensitiveSearchString = searchString.toLowerCase() + + return users.filter( + user => + user.username.toLowerCase().includes(insensitiveSearchString) || + user.firstName?.toLowerCase().includes(insensitiveSearchString) || + user.lastName?.toLowerCase().includes(insensitiveSearchString) + ) +} + +export default useFilterUsers diff --git a/frontend/src/users/UserTable/useUserTable.tsx b/frontend/src/users/UserTable/useUserTable.tsx new file mode 100644 index 0000000000000000000000000000000000000000..17a2c355e599cbf683f244a8d451ef0a4ce3df4d --- /dev/null +++ b/frontend/src/users/UserTable/useUserTable.tsx @@ -0,0 +1,134 @@ +import SortableTable from '@/components/SortableTable' +import type { + Column, + SelectingRow, + ValueType, +} from '@/components/SortableTable/typing' +import type { User } from '@inject/graphql/fragments/User.generated' +import { useGetUsers } from '@inject/graphql/queries/GetUsers.generated' +import type { AuthGroup } from '@inject/graphql/types' +import notEmpty from '@inject/shared/utils/notEmpty' +import type { CSSProperties } from 'react' +import { useMemo } from 'react' +import useDeleteUsers from '../useDeleteUsers' +import useFilterUsers from './useFilterUsers' +import type { UserProperty } from './utils' + +interface UserColumn extends Column { + getValue: (element: User) => ValueType +} + +const activeToBool = (active: { active: boolean; inactive: boolean }) => { + if (active.active && active.inactive) return null + if (active.active) return true + if (active.inactive) return false + return null +} + +type UserTableProps = { + onClick: (id: string) => void + selectedUsers?: string[] + groups: AuthGroup[] + active: { + active: boolean + inactive: boolean + } + tags?: string[] + searchString?: string + properties: UserProperty[] +} & ( + | { + onSelectAll?: never + onDeselectAll?: never + } + | { + onSelectAll: (allIds: string[]) => void + onDeselectAll: () => void + } +) + +const useUserTable = ({ + onClick, + selectedUsers, + groups, + active, + tags, + searchString, + properties, + onSelectAll, + onDeselectAll, +}: UserTableProps) => { + const { data: usersData, loading } = useGetUsers({ + fetchPolicy: 'network-only', + variables: { + active: activeToBool(active), + groups, + tags: tags && tags.length > 0 ? tags : null, + }, + skip: !active.active && !active.inactive, + }) + + const displayedProperties = useMemo( + () => properties.filter(property => property.display !== false), + [properties] + ) + const columns: UserColumn[] = useMemo(() => { + const style: CSSProperties = { + width: `${100 / displayedProperties.length}%`, + } + + return displayedProperties.map(property => ({ + ...property, + style, + })) + }, [displayedProperties]) + + const filteredUsers = useFilterUsers({ + users: usersData?.users?.filter(notEmpty) || [], + searchString, + }) + + const { button, alert } = useDeleteUsers({ + userIds: filteredUsers.map(user => user.id), + showCount: true, + }) + + const rows: SelectingRow[] = filteredUsers.map(user => ({ + columns, + values: columns.map(column => column.getValue(user)), + onClick: () => onClick(user.id), + isSelected: selectedUsers?.includes(user.id) || false, + })) + + // can't do this directly in the props because of a false-positive TS error + const selectingTableProps = useMemo( + () => + onSelectAll !== undefined + ? { + allSelected: selectedUsers?.length === filteredUsers.length, + onSelectAll: () => onSelectAll(filteredUsers.map(user => user.id)), + onDeselectAll, + } + : {}, + [filteredUsers, onDeselectAll, onSelectAll, selectedUsers?.length] + ) + + return { + table: ( + <SortableTable + columns={columns} + rows={rows} + loading={loading} + {...selectingTableProps} + /> + ), + deleteButton: ( + <> + {button} + {alert} + </> + ), + } +} + +export default useUserTable diff --git a/frontend/src/users/UserTable/utils.ts b/frontend/src/users/UserTable/utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3b0d1db82b0aa1936001b30df64a61b11e32041 --- /dev/null +++ b/frontend/src/users/UserTable/utils.ts @@ -0,0 +1,73 @@ +import type { ValueType } from '@/components/SortableTable/typing' +import type { User } from '@inject/graphql/fragments/User.generated' +import type { AuthGroup } from '@inject/graphql/types' +import type { Dispatch, SetStateAction } from 'react' + +export const AUTH_GROUPS: AuthGroup[] = ['ADMIN', 'INSTRUCTOR', 'TRAINEE'] + +export type Filter<T> = { + selected: T + setSelected: Dispatch<SetStateAction<T>> +} + +export type Active = { active: boolean; inactive: boolean } + +export interface UserProperty { + name: string + display?: boolean + getValue: (element: User) => ValueType +} + +export const USER_PROPERTIES: UserProperty[] = [ + { + name: 'ID', + display: false, + getValue: (user: User) => user.id, + }, + { + name: 'Username', + display: true, + getValue: (user: User) => user.username, + }, + { + name: 'First name', + display: true, + getValue: (user: User) => user.firstName, + }, + { + name: 'Last name', + display: true, + getValue: (user: User) => user.lastName, + }, + { + name: 'Group', + display: true, + getValue: (user: User) => user.group, + }, + { + name: 'Active', + display: true, + getValue: (user: User) => user.isActive, + }, + { + name: 'Imported', + display: false, + getValue: (user: User) => user.isImported, + }, + { + name: 'Created at', + display: false, + getValue: (user: User) => new Date(user.dateJoined), + }, + { + name: 'Last login', + display: false, + getValue: (user: User) => + user.lastLogin ? new Date(user.lastLogin) : null, + }, + { + name: 'Tags', + display: true, + getValue: (user: User) => (user.tags || []).map(tag => tag.name).join(', '), + }, +] diff --git a/frontend/src/users/UserTableSelection/index.tsx b/frontend/src/users/UserTableSelection/index.tsx index df98e46c6028be385615357f70a6caba5387ee2e..5310e4b65b77bbe4cb2ef2ec1c9161ec5a9a76f4 100644 --- a/frontend/src/users/UserTableSelection/index.tsx +++ b/frontend/src/users/UserTableSelection/index.tsx @@ -1,53 +1,50 @@ -import UserTable from '@/users/UserTable' -import { Button } from '@blueprintjs/core' -import type { FC } from 'react' -import { useState } from 'react' +import { Dialog, DialogBody, DialogFooter } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import type { AuthGroup } from '@inject/graphql/types' +import { maximizedDialog } from '@inject/shared/css/dialog' +import { useCallback, type Dispatch, type FC, type SetStateAction } from 'react' +import useUserTableSelection from './useUserTableSelection' + +const body = css` + display: flex; + flex-direction: column; +` interface UserTableSelectionProps { - onBack: () => void - onAssign: (ids: string[]) => void - assignTitle: string + open: boolean + setOpen: Dispatch<SetStateAction<boolean>> + onAdd: (ids: string[]) => void + groups: AuthGroup[] + selectedUsers: string[] + setSelectedUsers: Dispatch<SetStateAction<string[]>> } const UserTableSelection: FC<UserTableSelectionProps> = ({ - onBack, - onAssign, - assignTitle, + open, + groups, + setOpen, + onAdd, + selectedUsers, + setSelectedUsers, }) => { - const [selectedUsers, setSelectedUsers] = useState<string[]>([]) + const handleCancel = useCallback(() => { + setOpen(false) + setSelectedUsers([]) + }, [setOpen, setSelectedUsers]) + + const { table, buttons } = useUserTableSelection({ + groups, + onCancel: handleCancel, + onAdd, + selectedUsers, + setSelectedUsers, + }) return ( - <> - <UserTable - allowAddingUsers={false} - onClick={(id: string) => - selectedUsers.includes(id) - ? setSelectedUsers(prev => { - const i = selectedUsers.indexOf(id) - return [...prev.slice(0, i), ...prev.slice(i + 1)] - }) - : setSelectedUsers(prev => [...prev, id]) - } - selectedUsers={selectedUsers} - /> - <div - style={{ - display: 'flex', - justifyContent: 'space-between', - marginTop: '1rem', - }} - > - <Button onClick={() => onBack()} text='Back to list' /> - <Button - intent='primary' - onClick={() => { - onAssign(selectedUsers) - setSelectedUsers([]) - }} - text={assignTitle} - /> - </div> - </> + <Dialog isOpen={open} onClose={handleCancel} className={maximizedDialog}> + <DialogBody className={cx(maximizedDialog, body)}>{table}</DialogBody> + <DialogFooter actions={buttons} /> + </Dialog> ) } diff --git a/frontend/src/users/UserTableSelection/useUserTableSelection.tsx b/frontend/src/users/UserTableSelection/useUserTableSelection.tsx new file mode 100644 index 0000000000000000000000000000000000000000..2c10e4283b51ed5fefab2928dfc8f69e4bc16905 --- /dev/null +++ b/frontend/src/users/UserTableSelection/useUserTableSelection.tsx @@ -0,0 +1,82 @@ +import { Button, ButtonGroup } from '@blueprintjs/core' +import type { User } from '@inject/graphql/fragments/User.generated' +import type { AuthGroup } from '@inject/graphql/types' +import type { Dispatch, SetStateAction } from 'react' +import useUserTable from '../UserTable/useUserTable' + +interface useUserTableSelectionProps { + onAdd: (ids: string[]) => void + groups: AuthGroup[] + selectedUsers: string[] + onCancel: () => void + setSelectedUsers: Dispatch<SetStateAction<string[]>> +} + +const useUserTableSelection = ({ + groups, + onCancel, + onAdd, + selectedUsers, + setSelectedUsers, +}: useUserTableSelectionProps) => { + const { table } = useUserTable({ + onClick: (id: string) => { + selectedUsers.includes(id) + ? setSelectedUsers(prev => { + const i = selectedUsers.indexOf(id) + return [...prev.slice(0, i), ...prev.slice(i + 1)] + }) + : setSelectedUsers(prev => [...prev, id]) + }, + selectedUsers, + active: { active: true, inactive: false }, + groups, + properties: [ + { + name: 'Username', + getValue: (user: User) => user.username, + }, + { + name: 'First name', + getValue: (user: User) => user.firstName, + }, + { + name: 'Last name', + getValue: (user: User) => user.lastName, + }, + { + name: 'Group', + getValue: (user: User) => user.group, + }, + { + name: 'Tags', + getValue: (user: User) => + (user.tags || []).map(tag => tag.name).join(', '), + }, + ], + onSelectAll: (allIds: string[]) => setSelectedUsers(allIds), + onDeselectAll: () => setSelectedUsers([]), + }) + + return { + buttons: ( + <ButtonGroup> + <Button onClick={onCancel} text='Cancel' /> + <Button + disabled={selectedUsers.length === 0} + title={selectedUsers.length === 0 ? 'No users selected' : ''} + intent='primary' + onClick={() => { + onAdd(selectedUsers) + // TODO: only reset if successful + setSelectedUsers([]) + }} + text={`Add (${selectedUsers.length})`} + /> + </ButtonGroup> + ), + table, + } +} + +export default useUserTableSelection diff --git a/frontend/src/users/UsersSelection/Label.tsx b/frontend/src/users/UsersSelection/Label.tsx new file mode 100644 index 0000000000000000000000000000000000000000..83d8170637f8bdda0ea174fde2e8d48e067d7174 --- /dev/null +++ b/frontend/src/users/UsersSelection/Label.tsx @@ -0,0 +1,24 @@ +import { css } from '@emotion/css' +import type { RestrictedUser } from '@inject/graphql/fragments/RestrictedUser.generated' +import type { FC } from 'react' + +const usernameClass = css` + text-decoration: underline; +` + +interface LabelProps { + user: RestrictedUser +} + +const Label: FC<LabelProps> = ({ user }) => { + const { username, firstName, lastName, group } = user + const name = `${firstName || ''} ${lastName || ''}`.trim() + return ( + <> + <span className={usernameClass}>{username}</span> + {`${name ? `, ${name}` : ''}${group ? ` (${group})` : ''}`} + </> + ) +} + +export default Label diff --git a/frontend/src/users/UsersSelection/index.tsx b/frontend/src/users/UsersSelection/index.tsx index aef9788544314aab842c033bc2bd4330f013b6fe..a71d487abbdc119e1afb9e0dbdc1f38a65665bd0 100644 --- a/frontend/src/users/UsersSelection/index.tsx +++ b/frontend/src/users/UsersSelection/index.tsx @@ -1,26 +1,37 @@ -import { Button, ButtonGroup, Checkbox, NonIdealState } from '@blueprintjs/core' +import type { ButtonProps } from '@blueprintjs/core' +import { Button, Checkbox, NonIdealState } from '@blueprintjs/core' +import { css } from '@emotion/css' import type { RestrictedUser } from '@inject/graphql/fragments/RestrictedUser.generated' import type { FC } from 'react' -import { useState } from 'react' +import { useMemo, useState } from 'react' +import Label from './Label' + +const buttons = css` + display: flex; + justify-content: space-between; +` interface UserSelectionProps { users: RestrictedUser[] onRemove: (ids: string[]) => void - onAssign: () => void - assignTitle: string - removeTitle: string + onAdd: () => void } -const UsersSelection: FC<UserSelectionProps> = ({ - users, - onRemove, - onAssign, - assignTitle, - removeTitle, -}) => { - const [selectedUsers, setSelectedUsers] = useState( - new Array(users.length).fill(false) - ) +const UsersSelection: FC<UserSelectionProps> = ({ users, onRemove, onAdd }) => { + const [selectedUsers, setSelectedUsers] = useState(users.map(() => false)) + + const { + text: removeText, + title: removeTitle, + disabled: removeDisabled, + } = useMemo<ButtonProps>(() => { + const count = selectedUsers.filter(isSelected => isSelected).length + return { + text: `Remove (${count})`, + title: count === 0 ? 'No users selected' : undefined, + disabled: count === 0, + } + }, [selectedUsers]) return ( <> @@ -35,7 +46,7 @@ const UsersSelection: FC<UserSelectionProps> = ({ {users.map((user, i) => ( <Checkbox key={user.id} - label={user.username} + labelElement={<Label user={user} />} checked={selectedUsers[i]} onChange={() => setSelectedUsers(prev => [ @@ -47,7 +58,7 @@ const UsersSelection: FC<UserSelectionProps> = ({ /> ))} </div> - <ButtonGroup style={{ display: 'flex', justifyContent: 'space-between' }}> + <div className={buttons}> <Button onClick={() => { onRemove( @@ -55,17 +66,13 @@ const UsersSelection: FC<UserSelectionProps> = ({ ) setSelectedUsers(new Array(users.length).fill(false)) }} - icon='trash' - text={removeTitle} - disabled={selectedUsers.every(val => !val)} + icon='cross' + text={removeText} + title={removeTitle} + disabled={removeDisabled} /> - <Button - intent='primary' - onClick={onAssign} - icon='plus' - text={assignTitle} - /> - </ButtonGroup> + <Button intent='primary' onClick={onAdd} icon='plus' text='Add' /> + </div> </> ) } diff --git a/frontend/src/users/UsersUploader/index.tsx b/frontend/src/users/UsersUploader/index.tsx index 05265561d0c2dfd1e396594ebaa3e8c607249557..e5504ba48477345c13836ccbe95741a2518d96c2 100644 --- a/frontend/src/users/UsersUploader/index.tsx +++ b/frontend/src/users/UsersUploader/index.tsx @@ -1,29 +1,43 @@ -import { Button, Dialog, FileInput } from '@blueprintjs/core' +import { + Button, + Dialog, + DialogBody, + DialogFooter, + FileInput, +} from '@blueprintjs/core' +import { css } from '@emotion/css' import useApolloClient from '@inject/graphql/client/useApolloClient' import { useHost } from '@inject/graphql/connection/host' -import Box from '@inject/shared/components/Box' +import { GetTagsDocument } from '@inject/graphql/queries/GetTags.generated' +import { GetUsersDocument } from '@inject/graphql/queries/GetUsers.generated' import { uploadUsersUrl } from '@inject/shared/config' +import { dialog } from '@inject/shared/css/dialog' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import csrfFetch from '@inject/shared/utils/csrfFetch' import type { ChangeEvent } from 'react' import { useState } from 'react' +const body = css` + display: flex; + flex-direction: column; + gap: 0.5rem; +` + const UsersUploader = () => { const [open, setOpen] = useState<boolean>(false) - const [file, setFile] = useState<File | undefined>() + const [file, setFile] = useState<File>() + const [loading, setLoading] = useState<boolean>(false) const { notify } = useNotifyContext() const host = useHost() const client = useApolloClient() - const text = file ? file.name : 'Choose users csv' - const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => { if (e.target.files) { setFile(e.target.files[0]) } } - const handleUploadEvent = () => { + const handleSubmit = () => { if (!file) { return } @@ -31,6 +45,7 @@ const UsersUploader = () => { const data = new FormData() data.append('file', file) + setLoading(true) csrfFetch(uploadUsersUrl(host || ''), { method: 'POST', body: data, @@ -38,39 +53,64 @@ const UsersUploader = () => { }) .then(res => res.json()) .then((res: { status: string; detail: string }) => { - notify(`${res.status} - ${res.detail}`) + // TODO: remove when all users are imported + + // TODO: make this a warning when some users are skipped + + notify(res.detail) setOpen(false) - client.refetchQueries({ include: ['GetUsers'] }) + client.refetchQueries({ include: [GetUsersDocument, GetTagsDocument] }) + setFile(undefined) }) .catch((err: { status: string; detail: string }) => notify(`${err.status} - ${err.detail}`, { intent: 'danger', }) ) + .finally(() => setLoading(false)) } return ( <> <Button - type='button' - intent='primary' + minimal + active={open} onClick={() => { setOpen(true) }} + fill + alignText='left' + icon='upload' > - Add new users + Upload users </Button> + <Dialog - title='Add users' + className={dialog} + title='Upload users' isOpen={open} onClose={() => setOpen(false)} - icon='add' + icon='upload' > - <Box> - <FileInput text={text} onInputChange={handleFileChange} /> - </Box> - <Button type='button' onClick={handleUploadEvent}> - Upload - </Button> + <DialogBody className={body}> + <FileInput + text={file ? file.name : 'Choose file...'} + onInputChange={handleFileChange} + fill + /> + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={!file} + title={file ? undefined : 'Upload a csv file'} + loading={loading} + > + Submit + </Button> + } + /> </Dialog> </> ) diff --git a/frontend/src/users/useDeleteUsers.tsx b/frontend/src/users/useDeleteUsers.tsx new file mode 100644 index 0000000000000000000000000000000000000000..53f8a271ccb81f9476180b1a66c98e80c13c3b9a --- /dev/null +++ b/frontend/src/users/useDeleteUsers.tsx @@ -0,0 +1,95 @@ +import { Alert, Button } from '@blueprintjs/core' +import useAuthIdentity from '@inject/graphql/auth' +import useApolloClient from '@inject/graphql/client/useApolloClient' +import { useDeleteUsers as useDeleteUsersMutation } from '@inject/graphql/mutations/DeleteUsers.generated' +import { GetUsersDocument } from '@inject/graphql/queries/GetUsers.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import { useMemo, useState } from 'react' + +const useDeleteUsers = ({ + userIds, + showCount, + onConfirm, +}: { + userIds: string[] + showCount?: boolean + onConfirm?: () => void +}) => { + const apollo = useApolloClient() + const [alertOpen, setAlertOpen] = useState(false) + const { id, isSuperuser } = useAuthIdentity() + const { notify } = useNotifyContext() + const [mutate, { loading }] = useDeleteUsersMutation({ + variables: { userIds }, + onError: error => { + notify(error.message, { intent: 'danger' }) + }, + }) + + const { disabled, title } = useMemo(() => { + if (userIds.length === 0) { + return { disabled: true, title: 'No users selected' } + } + + if (userIds.length === 1 && id === userIds[0]) { + return { disabled: true, title: 'Cannot delete current user' } + } + + return { disabled: false, title: undefined } + }, [id, userIds]) + + const userCount = useMemo( + () => (userIds.includes(id) ? userIds.length - 1 : userIds.length), + [id, userIds] + ) + + const SuperUserButton = () => ( + <Button + disabled={disabled} + title={title} + icon='trash' + intent='danger' + active={alertOpen} + onClick={() => setAlertOpen(prev => !prev)} + > + {`Delete${showCount ? ` (${userCount})` : ''}`} + </Button> + ) + + const SuperUserAlert = () => ( + <Alert + loading={loading} + isOpen={alertOpen} + canEscapeKeyCancel + canOutsideClickCancel + cancelButtonText='Cancel' + onCancel={() => setAlertOpen(false)} + confirmButtonText='Delete' + icon='trash' + intent='danger' + onConfirm={() => { + mutate({ + onCompleted: () => { + apollo.refetchQueries({ include: [GetUsersDocument] }) + onConfirm?.() + }, + }) + }} + onClose={() => setAlertOpen(false)} + > + <p> + {`Are you sure you want to delete the selected user${ + userIds.length > 1 ? `s (${userCount} in total)` : '' + }? This action is irreversible.`} + </p> + {userIds.includes(id) && <p>The current user will not be deleted.</p>} + </Alert> + ) + + return { + button: isSuperuser ? <SuperUserButton /> : undefined, + alert: isSuperuser ? <SuperUserAlert /> : undefined, + } +} + +export default useDeleteUsers diff --git a/frontend/src/users/useResetCredentials.tsx b/frontend/src/users/useResetCredentials.tsx new file mode 100644 index 0000000000000000000000000000000000000000..8f57b4f0b8d7cffb962952e98098c1f0ae63efa0 --- /dev/null +++ b/frontend/src/users/useResetCredentials.tsx @@ -0,0 +1,84 @@ +import { Alert, Button } from '@blueprintjs/core' +import useAuthIdentity from '@inject/graphql/auth' +import { useRegenerateCredentials as useRegenerateCredentialsMutation } from '@inject/graphql/mutations/RegenerateCredentials.generated' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import { useMemo, useState } from 'react' + +const useRegenerateCredentials = ({ userIds }: { userIds: string[] }) => { + const [alertOpen, setAlertOpen] = useState(false) + const { id, isSuperuser } = useAuthIdentity() + const { notify } = useNotifyContext() + const [mutate, { loading }] = useRegenerateCredentialsMutation({ + variables: { userIds }, + onError: error => { + notify(error.message, { intent: 'danger' }) + }, + }) + + const { disabled, title } = useMemo(() => { + if (userIds.length === 0) { + return { disabled: true, title: 'No users selected' } + } + + return { disabled: false, title: undefined } + }, [userIds]) + + return { + button: isSuperuser && ( + <Button + disabled={disabled} + title={title} + icon='key' + intent='warning' + active={alertOpen} + onClick={() => { + setAlertOpen(prev => !prev) + }} + > + {`Reset credentials${userIds.length > 1 ? ` for selected` : ''}`} + </Button> + ), + alert: isSuperuser && ( + <Alert + loading={loading} + isOpen={alertOpen} + canEscapeKeyCancel + canOutsideClickCancel + cancelButtonText='Cancel' + onCancel={() => setAlertOpen(false)} + confirmButtonText='Reset' + icon='key' + intent='warning' + onConfirm={() => { + mutate() + }} + onClose={() => setAlertOpen(false)} + > + <p> + {`Are you sure you want to reset credentials for the selected user${ + userIds.length > 1 + ? `s (${ + userIds.includes(id) ? userIds.length - 1 : userIds.length + } in total)` + : '' + }?`} + </p> + <p> + {`New credentials will be sent to the email address${ + userIds.length > 1 ? 'es' : '' + } of the selected user${userIds.length > 1 ? 's' : ''}.`} + </p> + {userIds.includes(id) && ( + <p> + <b> + You are changing the credentials of the current user — + you'll need to log in with the new credentials. + </b> + </p> + )} + </Alert> + ), + } +} + +export default useRegenerateCredentials diff --git a/frontend/src/users/utilities.ts b/frontend/src/users/utilities.ts deleted file mode 100644 index 799d74eeb259416aa7ac2bacd7347bb0408ce1dc..0000000000000000000000000000000000000000 --- a/frontend/src/users/utilities.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { formatTimestamp } from '@/analyst/utilities' -import type { UserValueType } from './UserTable' - -export const accountStatuses = ['yes', 'no'] - -export const accountStatusesOptions = [ - { label: 'yes', value: 'true' }, - { label: 'no', value: 'false' }, -] - -export const formatValue = (value: UserValueType) => { - if (typeof value === 'string') return value - if (typeof value === 'boolean') return value ? 'yes' : 'no' - if (value instanceof Date) return formatTimestamp(value.toISOString()) - return (value as UserValueType)?.toString() || '' -} diff --git a/frontend/src/utils.ts b/frontend/src/utils.ts index 389d2f7cab8e7dc77e0204ab5443bc719c9107aa..51c0c8e8855ea3d4c296e17827793b94d3247bea 100644 --- a/frontend/src/utils.ts +++ b/frontend/src/utils.ts @@ -3,9 +3,17 @@ import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyCon import { useEffect } from 'react' import { useNavigate } from 'react-router-dom' +/** + * Removes HTML tags from the given content and returns the plain text. + * @param content - The content containing HTML tags. + * @returns The plain text without HTML tags. + */ +export const textFromRenderedContent = (content: string) => + content.replace(/<[^>]+>/g, '') + export const useSetPageTitle = (title: string) => { useEffect(() => { - document.title = `INJECT - ${title}` + document.title = `INJECT${title ? `- ${title}` : ''}` }, [title]) } @@ -13,40 +21,40 @@ export const NOTIFICATION_SELECTION_ID = '-2' export const CUSTOM_INJECT_SELECTION_ID = '-1' export const useStaffBoundary = () => { - const { isStaff } = useAuthIdentity(!!window.INJECT_NOAUTH) + const { isStaff, loading } = useAuthIdentity() const nav = useNavigate() const { notify } = useNotifyContext() useEffect(() => { - if (!isStaff) { + if (!isStaff && !loading) { notify('You are not authorized to access this page', { intent: 'danger' }) nav('/') } - }) + }, [loading]) } export const useSuperuserBoundary = () => { - const { isSuperuser } = useAuthIdentity(!!window.INJECT_NOAUTH) + const { isSuperuser, loading } = useAuthIdentity() const nav = useNavigate() const { notify } = useNotifyContext() useEffect(() => { - if (!isSuperuser) { + if (!isSuperuser && !loading) { notify('You are not authorized to access this page', { intent: 'danger' }) nav('/') } - }) + }, [loading]) } export const useActiveBoundary = () => { - const { isActive } = useAuthIdentity(!!window.INJECT_NOAUTH) + const { isActive, loading } = useAuthIdentity() const nav = useNavigate() const { notify } = useNotifyContext() useEffect(() => { - if (!isActive) { + if (!isActive && !loading) { notify('Your account is not active', { intent: 'danger' }) nav('/') } - }) + }, [loading]) } diff --git a/frontend/src/views/ChannelButton.tsx b/frontend/src/views/ChannelButton.tsx index f17e8b4e3d9d292de5b024807dff485b4d1b466a..4e6c1477b86d81f10e62d419ddedecdc01090137 100644 --- a/frontend/src/views/ChannelButton.tsx +++ b/frontend/src/views/ChannelButton.tsx @@ -5,12 +5,12 @@ import type { Path } from '@/router' import { Colors, type IconName } from '@blueprintjs/core' import { Dot } from '@blueprintjs/icons' import type { Channel } from '@inject/graphql/fragments/Channel.generated' -import { useWriteReadReceiptChannel } from '@inject/graphql/mutations/clientonly/WriteReadReceiptChannel.generated' +import { useSetIsUnreadChannel } from '@inject/graphql/mutations/clientonly/SetIsUnreadChannel.generated' import type { ChannelType } from '@inject/graphql/types' import { useMemo, type FC } from 'react' import { matchPath } from 'react-router-dom' -interface ChannelButtonProps { +export interface ChannelButtonProps { exerciseId: string teamId: string pathname: string @@ -19,6 +19,116 @@ interface ChannelButtonProps { hideLabel?: boolean } +export const getLink = ( + channel: Channel, + exerciseId: string, + teamId: string, + linkTo: 'trainee' | 'instructor' +): LinkType => { + switch (channel.type) { + case 'INFO': + return [ + `/${linkTo}/:exerciseId/:teamId/:channelId/info`, + { + params: { + exerciseId, + teamId, + channelId: channel.id, + }, + }, + ] + case 'EMAIL': + return [ + `/${linkTo}/:exerciseId/:teamId/:channelId/email/:tab`, + { + params: { + exerciseId, + teamId, + channelId: channel.id, + tab: + linkTo === 'trainee' + ? EmailSelection.RECEIVED + : EmailSelection.SENT, + }, + }, + ] + case 'TOOL': + return [ + `/${linkTo}/:exerciseId/:teamId/:channelId/tool`, + { + params: { + exerciseId, + teamId, + channelId: channel.id, + }, + }, + ] + case 'FORM': + return [ + `/${linkTo}/:exerciseId/:teamId/:channelId/form`, + { + params: { + exerciseId, + teamId, + channelId: channel.id, + }, + }, + ] + default: + throw new Error(`unknown channel type: ${channel.type}`) + } +} + +export const getIcon = (channelType: ChannelType): IconName => { + switch (channelType) { + case 'INFO': + return 'info-sign' + case 'EMAIL': + return 'envelope' + case 'TOOL': + return 'console' + case 'FORM': + return 'form' + default: + throw new Error(`unknown channel type: ${channelType}`) + } +} + +// TODO: check for channelId if multiple channels of the same type are allowed +export const getActive = ( + channel: Channel, + linkTo: 'trainee' | 'instructor', + pathname: string +): boolean => { + let path: Path + switch (channel.type) { + case 'INFO': + path = `/${linkTo}/:exerciseId/:teamId/:channelId/info` + break + case 'EMAIL': + path = `/${linkTo}/:exerciseId/:teamId/:channelId/email` + break + case 'TOOL': + path = `/${linkTo}/:exerciseId/:teamId/:channelId/tool` + break + case 'FORM': + path = `/${linkTo}/:exerciseId/:teamId/:channelId/form` + break + default: + throw new Error(`unknown channel type: ${channel.type}`) + } + + return ( + matchPath( + { + path, + end: false, + }, + pathname + ) !== null + ) +} + const ChannelButton: FC<ChannelButtonProps> = ({ channel, exerciseId, @@ -27,116 +137,18 @@ const ChannelButton: FC<ChannelButtonProps> = ({ linkTo, hideLabel, }) => { - const [mutate] = useWriteReadReceiptChannel({ + const [setIsRead] = useSetIsUnreadChannel({ variables: { channelId: channel.id, teamId, + isUnread: false, }, }) - const getIcon = (channelType: ChannelType): IconName => { - switch (channelType) { - case 'INFO': - return 'info-sign' - case 'EMAIL': - return 'envelope' - case 'TOOL': - return 'console' - case 'FORM': - return 'form' - default: - throw new Error(`unknown channel type: ${channelType}`) - } - } - - const getLink = (channel: Channel): LinkType => { - switch (channel.type) { - case 'INFO': - return [ - `/${linkTo}/:exerciseId/:teamId/:channelId/info`, - { - params: { - exerciseId, - teamId, - channelId: channel.id, - }, - }, - ] - case 'EMAIL': - return [ - `/${linkTo}/:exerciseId/:teamId/:channelId/email/:tab`, - { - params: { - exerciseId, - teamId, - channelId: channel.id, - tab: EmailSelection.RECEIVED, - }, - }, - ] - case 'TOOL': - return [ - `/${linkTo}/:exerciseId/:teamId/:channelId/tool`, - { - params: { - exerciseId, - teamId, - channelId: channel.id, - }, - }, - ] - case 'FORM': - return [ - `/${linkTo}/:exerciseId/:teamId/:channelId/form`, - { - params: { - exerciseId, - teamId, - channelId: channel.id, - }, - }, - ] - default: - throw new Error(`unknown channel type: ${channel.type}`) - } - } - - // TODO: check for channelId if multiple channels of the same type are allowed - const getActive = (channel: Channel): boolean => { - let path: Path - switch (channel.type) { - case 'INFO': - path = `/${linkTo}/:exerciseId/:teamId/:channelId/info` - break - case 'EMAIL': - path = `/${linkTo}/:exerciseId/:teamId/:channelId/email/:tab` - break - case 'TOOL': - path = `/${linkTo}/:exerciseId/:teamId/:channelId/tool` - break - case 'FORM': - path = `/${linkTo}/:exerciseId/:teamId/:channelId/form` - break - default: - throw new Error(`unknown channel type: ${channel.type}`) - } - - return ( - matchPath( - { - path, - end: false, - }, - pathname - ) !== null - ) - } - const isUnread = useMemo( () => - channel.readReceipt.find( - ({ readReceipt, teamId: receiptTeamId }) => - receiptTeamId === teamId && readReceipt === null + channel.readReceipt.some( + readReceipt => readReceipt.teamId === teamId && readReceipt.isUnread ), [channel.readReceipt, teamId] ) @@ -153,18 +165,18 @@ const ChannelButton: FC<ChannelButtonProps> = ({ return ( <LinkButton - key={getLink(channel)[0] as string} - link={getLink(channel)} + key={getLink(channel, exerciseId, teamId, linkTo)[0].toString()} + link={getLink(channel, exerciseId, teamId, linkTo)} button={{ icon: getIcon(channel.type), title: channel.name, fill: true, alignText: 'left', minimal: true, - active: getActive(channel), + active: getActive(channel, linkTo, pathname), intent: isUnread ? 'warning' : undefined, rightIcon: isUnread ? <Dot color={Colors.RED3} /> : undefined, - onClick: mutate, + onClick: setIsRead, children, }} /> diff --git a/frontend/src/views/InjectMessageView/index.tsx b/frontend/src/views/InjectMessageView/index.tsx index c1b429db4eef87f8ef56b85fbb669bae8ddb8700..cb446564a0091a4f99d669de669efda6e04604b9 100644 --- a/frontend/src/views/InjectMessageView/index.tsx +++ b/frontend/src/views/InjectMessageView/index.tsx @@ -42,13 +42,7 @@ const InjectMessageView: FC<InjectMessageViewProps> = ({ return ( <Container makeFullHeight> <div className={wrapper}> - <Button - icon='chevron-left' - text='Back' - minimal - style={{ marginBottom: '0.25rem' }} - onClick={onBack} - /> + <Button icon='chevron-left' text='Back' minimal onClick={onBack} /> <InjectMessage exerciseId={exerciseId} teamId={teamId} diff --git a/frontend/src/views/InstructorView/index.tsx b/frontend/src/views/InstructorView/index.tsx index b00d67c5215a00df6910d4425c02916dabae8b07..00455338f8563508f3ab07d0fb8617f0e39712aa 100644 --- a/frontend/src/views/InstructorView/index.tsx +++ b/frontend/src/views/InstructorView/index.tsx @@ -23,14 +23,16 @@ import ChannelButton from '../ChannelButton' import useMilestonesButton from './useMilestonesButton' interface InstructorViewProps extends PropsWithChildren { - teamId: string | undefined - exerciseId: string | undefined + teamId?: string + exerciseId?: string + selectedThreadId?: string } const InstructorView: FC<InstructorViewProps> = ({ children, teamId, exerciseId, + selectedThreadId, }) => { const { hide: hideLeftBar, node: hideButton } = useHideButton() @@ -166,7 +168,7 @@ const InstructorView: FC<InstructorViewProps> = ({ { // TODO: I've detected performance issues there, but it could be just me. Otherwise I would just move this to it's former place.. } - <Manager /> + <Manager selectedThreadId={selectedThreadId} /> <div style={{ height: '100%', display: 'flex' }}> <Sidebar @@ -181,7 +183,11 @@ const InstructorView: FC<InstructorViewProps> = ({ </div> {milestonesOpen && ( - <Sidebar position='right' sections={milestoneSections} /> + <Sidebar + position='right' + title='Milestones' + sections={milestoneSections} + /> )} </div> </> diff --git a/frontend/src/views/TraineeView/Toolbar.tsx b/frontend/src/views/TraineeView/Toolbar.tsx index 130ec60761c6f7ebea1ef49953c7f18da30838b2..e63c743085844d9f1b7b9cfcafb12e69d2c9b93a 100644 --- a/frontend/src/views/TraineeView/Toolbar.tsx +++ b/frontend/src/views/TraineeView/Toolbar.tsx @@ -1,30 +1,45 @@ import ToolAction from '@/actionlog/ToolAction' import type { Section } from '@/components/Sidebar' import Sidebar from '@/components/Sidebar' -import type { ExtendedTool } from '@inject/graphql/fragments/ExtendedToolType.generated' -import { useGetExtendedTeamTools } from '@inject/graphql/queries/GetExtendedTeamTools.generated' +import { css } from '@emotion/css' +import type { Tool } from '@inject/graphql/fragments/Tool.generated' +import { useGetExerciseConfig } from '@inject/graphql/queries/GetExerciseConfig.generated' import notEmpty from '@inject/shared/utils/notEmpty' import type { FC } from 'react' import { memo, useMemo } from 'react' +const sidebar = css` + min-width: 20rem; + max-width: 20rem; +` + const UNDEFINED_ID = 'undefined' interface ToolbarProps { teamId: string + exerciseId: string + disabled?: boolean + disabledTitle?: string } -const Toolbar: FC<ToolbarProps> = ({ teamId }) => { - const { data } = useGetExtendedTeamTools({ +const Toolbar: FC<ToolbarProps> = ({ + teamId, + exerciseId, + disabled, + disabledTitle, +}) => { + const { data } = useGetExerciseConfig({ variables: { + exerciseId, teamId, }, }) - const process = (data?.extendedTeamTools ?? []).filter(notEmpty) + const process = (data?.teamTools ?? []).filter(notEmpty) - const groups: Map<string | undefined, ExtendedTool[]> = useMemo(() => { - const uncategorized: ExtendedTool[] = [] + const groups: Map<string | undefined, Tool[]> = useMemo(() => { + const uncategorized: Tool[] = [] - const groupsMap = new Map<string | undefined, ExtendedTool[]>() + const groupsMap = new Map<string | undefined, Tool[]>() process.forEach(tool => { const prefix = tool.name.split('_').at(0) @@ -49,11 +64,13 @@ const Toolbar: FC<ToolbarProps> = ({ teamId }) => { name: key, node: ( <> - {value.map(tool => ( + {value.map(x => ( <ToolAction - key={tool.id || UNDEFINED_ID} - grapheneTool={tool} + key={x.id || UNDEFINED_ID} + grapheneTool={x} teamId={teamId} + disabled={disabled} + disabledTitle={disabledTitle} /> ))} </> @@ -64,7 +81,7 @@ const Toolbar: FC<ToolbarProps> = ({ teamId }) => { <Sidebar position='right' sections={sections} - width={300} + className={sidebar} title='Available tools' /> ) diff --git a/frontend/src/views/TraineeView/index.tsx b/frontend/src/views/TraineeView/index.tsx index 159160d8734570ebb37db49902b594cc1249e474..bf139909feb2cdb2b94a7f28f0dd4ef5f758679f 100644 --- a/frontend/src/views/TraineeView/index.tsx +++ b/frontend/src/views/TraineeView/index.tsx @@ -23,12 +23,14 @@ import ChannelButton from '../ChannelButton' interface TraineeViewProps extends PropsWithChildren { teamId: string exerciseId: string + selectedThreadId?: string } const TraineeView: FC<TraineeViewProps> = ({ children, teamId, exerciseId, + selectedThreadId, }) => { const { hide: hideLeftBar, node: hideButton } = useHideButton() const loc = useLocation() @@ -37,6 +39,7 @@ const TraineeView: FC<TraineeViewProps> = ({ const { data: dataExerciseConfig } = useGetExerciseConfig({ variables: { exerciseId, + teamId, }, }) @@ -60,6 +63,7 @@ const TraineeView: FC<TraineeViewProps> = ({ teamId={teamId} inInstructor={false} allowFileRedirect={false} + fill /> ), [exerciseId, teamId] @@ -116,7 +120,7 @@ const TraineeView: FC<TraineeViewProps> = ({ {emailsEnabled && ( <TraineeEmailFormOverlay teamId={teamId} exerciseId={exerciseId} /> )} - <Manager getPopup={getPopup} /> + <Manager getPopup={getPopup} selectedThreadId={selectedThreadId} /> <div style={{ height: '100%', display: 'flex' }}> <Sidebar diff --git a/frontend/substituteEnv.sh b/frontend/substituteEnv.sh index a215643258dc441e3a4501a48417e91f32d42d2f..6e62617536eeef0f6ef67aeaf9bc51663bf6c663 100755 --- a/frontend/substituteEnv.sh +++ b/frontend/substituteEnv.sh @@ -20,11 +20,3 @@ else echo "VITE_HTTP_WS is set to ${VITE_HTTP_WS}" sed -i "s|window.VITE_HTTP_WS = .*|window.VITE_HTTP_WS = '${VITE_HTTP_WS}'|g" /usr/app/index.html fi - -if [ -z "${INJECT_NOAUTH}" ]; then - echo "INJECT_NOAUTH is not set. Using default value." - sed -i "s|window.INJECT_NOAUTH = .*|window.INJECT_NOAUTH = undefined|g" /usr/app/index.html -else - echo "INJECT_NOAUTH is set to ${INJECT_NOAUTH}" - sed -i "s|window.INJECT_NOAUTH = .*|window.INJECT_NOAUTH = '${INJECT_NOAUTH}'|g" /usr/app/index.html -fi \ No newline at end of file diff --git a/frontend/vite.config.mts b/frontend/vite.config.mts index 6404d7503edc1f8bb3456e10133951e602c991b6..92219fbd1e013ec53a6638e4b9f614514decd0ee 100644 --- a/frontend/vite.config.mts +++ b/frontend/vite.config.mts @@ -6,16 +6,13 @@ import { visualizer } from 'rollup-plugin-visualizer' import svgr from 'vite-plugin-svgr' import { vitePluginGraphqlLoader } from 'vite-plugin-graphql-loader' import * as child_process from 'child_process' +import license from 'rollup-plugin-license' // https://vitejs.dev/config/ export default () => { // const dev = mode === 'development' if (process.env.GIT_ENABLED) { - const commitDate = child_process - .execSync('git log -1 --format=%cI') - .toString() - .trimEnd() const branchName = child_process .execSync('git rev-parse --abbrev-ref HEAD') .toString() @@ -29,16 +26,9 @@ export default () => { .toString() .trimEnd() - process.env.VITE_GIT_COMMIT_DATE = commitDate process.env.VITE_GIT_BRANCH_NAME = branchName process.env.VITE_GIT_COMMIT_HASH = commitHash process.env.VITE_GIT_LAST_COMMIT_MESSAGE = lastCommitMessage - } else { - process.env.VITE_GIT_COMMIT_DATE = new Date().toISOString() - process.env.VITE_GIT_BRANCH_NAME = 'No branch name' - process.env.VITE_GIT_COMMIT_HASH = 'No commit hash' - process.env.VITE_GIT_LAST_COMMIT_MESSAGE = - 'GIT_ENABLED is not set enabled, no git information available.' } console.log('Compiling for these env variables: ', process.env) @@ -57,6 +47,28 @@ export default () => { generouted(), //@ts-ignore visualizer(), + license({ + sourcemap: true, + cwd: process.cwd(), // The default + + banner: { + commentStyle: 'regular', // The default + + content: { + file: path.join(__dirname, 'LICENSE'), + encoding: 'utf-8', // Default is utf-8 + }, + }, + + thirdParty: { + includePrivate: true, // Default is false. + multipleVersions: true, // Default is false. + output: { + file: path.join(__dirname, 'ThirdPartyLicense.txt'), + encoding: 'utf-8', // Default is utf-8. + }, + }, + }), vitePluginGraphqlLoader(), svgr({ svgrOptions: { @@ -81,7 +93,6 @@ export default () => { }, build: { cssCodeSplit: true, - cssMinify: 'lightningcss', minify: 'terser', target: 'es2022', outDir: '../dist', diff --git a/graphql/LICENSE b/graphql/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/graphql/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/graphql/auth/index.ts b/graphql/auth/index.ts index 9dba4d2075c998863e3ffc027977bbd0ebf095a7..8df30ee3f3a768b93d74f99b3c0767557abda896 100644 --- a/graphql/auth/index.ts +++ b/graphql/auth/index.ts @@ -1,26 +1,17 @@ import { useIdentity } from '../queries/Identity.generated' -export const useAuthIdentity = (authDisabled: boolean) => { - const { data, loading } = useIdentity({ - skip: !!authDisabled, - }) - - if (authDisabled) { - return { - isActive: true, - isStaff: true, - isSuperuser: true, - isLogged: true, - loading: false, - } - } +export const useAuthIdentity = () => { + const { data, loading } = useIdentity() + const { id, isActive, group } = data?.whoAmI ?? {} return { - isActive: data?.whoAmI?.isActive ?? false, - isStaff: data?.whoAmI?.isStaff ?? false, - isSuperuser: data?.whoAmI?.isSuperuser ?? false, + id, + isActive, + isStaff: group === 'ADMIN' || group === 'INSTRUCTOR', + isSuperuser: group === 'ADMIN', isLogged: !!data?.whoAmI, loading, + whoAmI: data?.whoAmI, } } diff --git a/graphql/client/apollo-helpers.ts b/graphql/client/apollo-helpers.ts index 8dc3b122b303f3b538f30596262c7529a20211bc..f31fcbea6b3ce68192ae0ef25a0d0f35a8f5dc96 100644 --- a/graphql/client/apollo-helpers.ts +++ b/graphql/client/apollo-helpers.ts @@ -39,6 +39,14 @@ export type AssignInstructorsToExerciseKeySpecifier = ('operationDone' | AssignI export type AssignInstructorsToExerciseFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> }; +export type AssignUsersByTagsKeySpecifier = ('operationDone' | AssignUsersByTagsKeySpecifier)[]; +export type AssignUsersByTagsFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type AssignUsersEquallyKeySpecifier = ('operationDone' | AssignUsersEquallyKeySpecifier)[]; +export type AssignUsersEquallyFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; export type AssignUsersToTeamMutationKeySpecifier = ('operationDone' | AssignUsersToTeamMutationKeySpecifier)[]; export type AssignUsersToTeamMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> @@ -47,10 +55,11 @@ export type ChangeUserDataMutationKeySpecifier = ('user' | ChangeUserDataMutatio export type ChangeUserDataMutationFieldPolicy = { user?: FieldPolicy<any> | FieldReadFunction<any> }; -export type ChannelReadReceiptKeySpecifier = ('readReceipt' | 'teamId' | ChannelReadReceiptKeySpecifier)[]; -export type ChannelReadReceiptFieldPolicy = { - readReceipt?: FieldPolicy<any> | FieldReadFunction<any>, - teamId?: FieldPolicy<any> | FieldReadFunction<any> +export type ChangeUserTypeKeySpecifier = ('active' | 'group' | 'userId' | ChangeUserTypeKeySpecifier)[]; +export type ChangeUserTypeFieldPolicy = { + active?: FieldPolicy<any> | FieldReadFunction<any>, + group?: FieldPolicy<any> | FieldReadFunction<any>, + userId?: FieldPolicy<any> | FieldReadFunction<any> }; export type ChannelReceiptKeySpecifier = ('channelId' | 'readReceipt' | 'teamId' | ChannelReceiptKeySpecifier)[]; export type ChannelReceiptFieldPolicy = { @@ -81,6 +90,10 @@ export type ControlTypeFieldPolicy = { milestoneCondition?: FieldPolicy<any> | FieldReadFunction<any>, roles?: FieldPolicy<any> | FieldReadFunction<any> }; +export type CopyUsersAssignmentKeySpecifier = ('operationDone' | CopyUsersAssignmentKeySpecifier)[]; +export type CopyUsersAssignmentFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; export type CreateExerciseMutationKeySpecifier = ('exercise' | CreateExerciseMutationKeySpecifier)[]; export type CreateExerciseMutationFieldPolicy = { exercise?: FieldPolicy<any> | FieldReadFunction<any> @@ -92,16 +105,41 @@ export type CreateExerciseTypeFieldPolicy = { name?: FieldPolicy<any> | FieldReadFunction<any>, teamCount?: FieldPolicy<any> | FieldReadFunction<any> }; +export type CreateTagMutationKeySpecifier = ('newTag' | CreateTagMutationKeySpecifier)[]; +export type CreateTagMutationFieldPolicy = { + newTag?: FieldPolicy<any> | FieldReadFunction<any> +}; export type CreateThreadMutationKeySpecifier = ('thread' | CreateThreadMutationKeySpecifier)[]; export type CreateThreadMutationFieldPolicy = { thread?: FieldPolicy<any> | FieldReadFunction<any> }; -export type CustomInjectDetailsTypeKeySpecifier = ('content' | 'id' | 'user' | CustomInjectDetailsTypeKeySpecifier)[]; +export type CreateUserMutationKeySpecifier = ('newUser' | CreateUserMutationKeySpecifier)[]; +export type CreateUserMutationFieldPolicy = { + newUser?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type CreateUserTypeKeySpecifier = ('email' | 'firstName' | 'group' | 'lastName' | 'tags' | CreateUserTypeKeySpecifier)[]; +export type CreateUserTypeFieldPolicy = { + email?: FieldPolicy<any> | FieldReadFunction<any>, + firstName?: FieldPolicy<any> | FieldReadFunction<any>, + group?: FieldPolicy<any> | FieldReadFunction<any>, + lastName?: FieldPolicy<any> | FieldReadFunction<any>, + tags?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type CustomInjectDetailsTypeKeySpecifier = ('content' | 'id' | 'overlay' | 'user' | CustomInjectDetailsTypeKeySpecifier)[]; export type CustomInjectDetailsTypeFieldPolicy = { content?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, + overlay?: FieldPolicy<any> | FieldReadFunction<any>, user?: FieldPolicy<any> | FieldReadFunction<any> }; +export type CustomInjectTypeKeySpecifier = ('content' | 'exerciseId' | 'fileId' | 'overlay' | 'teamIds' | CustomInjectTypeKeySpecifier)[]; +export type CustomInjectTypeFieldPolicy = { + content?: FieldPolicy<any> | FieldReadFunction<any>, + exerciseId?: FieldPolicy<any> | FieldReadFunction<any>, + fileId?: FieldPolicy<any> | FieldReadFunction<any>, + overlay?: FieldPolicy<any> | FieldReadFunction<any>, + teamIds?: FieldPolicy<any> | FieldReadFunction<any> +}; export type DefinitionChannelTypeKeySpecifier = ('definition' | 'id' | 'name' | 'readReceipt' | 'type' | DefinitionChannelTypeKeySpecifier)[]; export type DefinitionChannelTypeFieldPolicy = { definition?: FieldPolicy<any> | FieldReadFunction<any>, @@ -110,9 +148,8 @@ export type DefinitionChannelTypeFieldPolicy = { readReceipt?: FieldPolicy<any> | FieldReadFunction<any>, type?: FieldPolicy<any> | FieldReadFunction<any> }; -export type DefinitionInjectTypeKeySpecifier = ('auto' | 'delay' | 'id' | 'name' | 'organization' | 'time' | 'type' | DefinitionInjectTypeKeySpecifier)[]; +export type DefinitionInjectTypeKeySpecifier = ('delay' | 'id' | 'name' | 'organization' | 'time' | 'type' | DefinitionInjectTypeKeySpecifier)[]; export type DefinitionInjectTypeFieldPolicy = { - auto?: FieldPolicy<any> | FieldReadFunction<any>, delay?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, @@ -150,6 +187,14 @@ export type DeleteExerciseMutationKeySpecifier = ('operationDone' | DeleteExerci export type DeleteExerciseMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> }; +export type DeleteTagsMutationKeySpecifier = ('operationDone' | DeleteTagsMutationKeySpecifier)[]; +export type DeleteTagsMutationFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type DeleteUsersMutationKeySpecifier = ('operationDone' | DeleteUsersMutationKeySpecifier)[]; +export type DeleteUsersMutationFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; export type EmailAddressTypeKeySpecifier = ('address' | 'control' | 'definition' | 'description' | 'id' | 'organization' | 'teamVisible' | 'templates' | EmailAddressTypeKeySpecifier)[]; export type EmailAddressTypeFieldPolicy = { address?: FieldPolicy<any> | FieldReadFunction<any>, @@ -198,11 +243,6 @@ export type EmailTemplateTypeFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, sender?: FieldPolicy<any> | FieldReadFunction<any> }; -export type EmailThreadReceiptKeySpecifier = ('emailThreadId' | 'readReceipt' | EmailThreadReceiptKeySpecifier)[]; -export type EmailThreadReceiptFieldPolicy = { - emailThreadId?: FieldPolicy<any> | FieldReadFunction<any>, - readReceipt?: FieldPolicy<any> | FieldReadFunction<any> -}; export type EmailThreadSubscriptionKeySpecifier = ('emailThread' | EmailThreadSubscriptionKeySpecifier)[]; export type EmailThreadSubscriptionFieldPolicy = { emailThread?: FieldPolicy<any> | FieldReadFunction<any> @@ -258,26 +298,35 @@ export type ExercisesSubscriptionFieldPolicy = { eventType?: FieldPolicy<any> | FieldReadFunction<any>, exercise?: FieldPolicy<any> | FieldReadFunction<any> }; -export type ExtendedToolTypeKeySpecifier = ('defaultResponse' | 'definition' | 'hasParam' | 'hint' | 'id' | 'name' | 'responses' | 'roles' | 'toolDetails' | 'tooltipDescription' | ExtendedToolTypeKeySpecifier)[]; +export type ExtendedToolTypeKeySpecifier = ('defaultResponse' | 'definition' | 'hint' | 'id' | 'name' | 'responses' | 'roles' | 'tooltipDescription' | ExtendedToolTypeKeySpecifier)[]; export type ExtendedToolTypeFieldPolicy = { defaultResponse?: FieldPolicy<any> | FieldReadFunction<any>, definition?: FieldPolicy<any> | FieldReadFunction<any>, - hasParam?: FieldPolicy<any> | FieldReadFunction<any>, hint?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, responses?: FieldPolicy<any> | FieldReadFunction<any>, roles?: FieldPolicy<any> | FieldReadFunction<any>, - toolDetails?: FieldPolicy<any> | FieldReadFunction<any>, tooltipDescription?: FieldPolicy<any> | FieldReadFunction<any> }; -export type FileInfoTypeKeySpecifier = ('content' | 'definition' | 'fileName' | 'id' | FileInfoTypeKeySpecifier)[]; +export type FileInfoTypeKeySpecifier = ('definition' | 'fileName' | 'id' | FileInfoTypeKeySpecifier)[]; export type FileInfoTypeFieldPolicy = { - content?: FieldPolicy<any> | FieldReadFunction<any>, definition?: FieldPolicy<any> | FieldReadFunction<any>, fileName?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any> }; +export type FilterUsersTypeKeySpecifier = ('active' | 'firstName' | 'groups' | 'imported' | 'lastName' | 'limit' | 'skip' | 'tags' | 'username' | FilterUsersTypeKeySpecifier)[]; +export type FilterUsersTypeFieldPolicy = { + active?: FieldPolicy<any> | FieldReadFunction<any>, + firstName?: FieldPolicy<any> | FieldReadFunction<any>, + groups?: FieldPolicy<any> | FieldReadFunction<any>, + imported?: FieldPolicy<any> | FieldReadFunction<any>, + lastName?: FieldPolicy<any> | FieldReadFunction<any>, + limit?: FieldPolicy<any> | FieldReadFunction<any>, + skip?: FieldPolicy<any> | FieldReadFunction<any>, + tags?: FieldPolicy<any> | FieldReadFunction<any>, + username?: FieldPolicy<any> | FieldReadFunction<any> +}; export type GrapheneConfigKeySpecifier = ('customEmailSuffix' | 'emailBetweenTeams' | 'enableRoles' | 'exerciseDuration' | 'showExerciseTime' | GrapheneConfigKeySpecifier)[]; export type GrapheneConfigFieldPolicy = { customEmailSuffix?: FieldPolicy<any> | FieldReadFunction<any>, @@ -286,11 +335,6 @@ export type GrapheneConfigFieldPolicy = { exerciseDuration?: FieldPolicy<any> | FieldReadFunction<any>, showExerciseTime?: FieldPolicy<any> | FieldReadFunction<any> }; -export type GroupTypeKeySpecifier = ('id' | 'name' | GroupTypeKeySpecifier)[]; -export type GroupTypeFieldPolicy = { - id?: FieldPolicy<any> | FieldReadFunction<any>, - name?: FieldPolicy<any> | FieldReadFunction<any> -}; export type InjectDetailsTypeKeySpecifier = ('content' | 'id' | 'inject' | 'overlay' | InjectDetailsTypeKeySpecifier)[]; export type InjectDetailsTypeFieldPolicy = { content?: FieldPolicy<any> | FieldReadFunction<any>, @@ -298,32 +342,10 @@ export type InjectDetailsTypeFieldPolicy = { inject?: FieldPolicy<any> | FieldReadFunction<any>, overlay?: FieldPolicy<any> | FieldReadFunction<any> }; -export type InjectOptionTypeKeySpecifier = ('content' | 'control' | 'id' | 'injectSelection' | 'name' | 'sender' | InjectOptionTypeKeySpecifier)[]; -export type InjectOptionTypeFieldPolicy = { - content?: FieldPolicy<any> | FieldReadFunction<any>, - control?: FieldPolicy<any> | FieldReadFunction<any>, - id?: FieldPolicy<any> | FieldReadFunction<any>, - injectSelection?: FieldPolicy<any> | FieldReadFunction<any>, - name?: FieldPolicy<any> | FieldReadFunction<any>, - sender?: FieldPolicy<any> | FieldReadFunction<any> -}; -export type InjectSelectionConfirmationTypeKeySpecifier = ('injectSelectionId' | 'submitted' | InjectSelectionConfirmationTypeKeySpecifier)[]; -export type InjectSelectionConfirmationTypeFieldPolicy = { - injectSelectionId?: FieldPolicy<any> | FieldReadFunction<any>, - submitted?: FieldPolicy<any> | FieldReadFunction<any> -}; -export type InjectSelectionTypeKeySpecifier = ('id' | 'name' | 'options' | 'submitted' | 'team' | 'timestamp' | InjectSelectionTypeKeySpecifier)[]; -export type InjectSelectionTypeFieldPolicy = { - id?: FieldPolicy<any> | FieldReadFunction<any>, - name?: FieldPolicy<any> | FieldReadFunction<any>, - options?: FieldPolicy<any> | FieldReadFunction<any>, - submitted?: FieldPolicy<any> | FieldReadFunction<any>, - team?: FieldPolicy<any> | FieldReadFunction<any>, - timestamp?: FieldPolicy<any> | FieldReadFunction<any> -}; -export type InjectSelectionsSubscriptionKeySpecifier = ('injectSelection' | InjectSelectionsSubscriptionKeySpecifier)[]; -export type InjectSelectionsSubscriptionFieldPolicy = { - injectSelection?: FieldPolicy<any> | FieldReadFunction<any> +export type IsUnreadTypeKeySpecifier = ('isUnread' | 'teamId' | IsUnreadTypeKeySpecifier)[]; +export type IsUnreadTypeFieldPolicy = { + isUnread?: FieldPolicy<any> | FieldReadFunction<any>, + teamId?: FieldPolicy<any> | FieldReadFunction<any> }; export type LearningActivityTypeKeySpecifier = ('id' | 'milestones' | 'name' | 'objective' | 'tags' | LearningActivityTypeKeySpecifier)[]; export type LearningActivityTypeFieldPolicy = { @@ -358,12 +380,13 @@ export type MilestoneStateTypeFieldPolicy = { teamIds?: FieldPolicy<any> | FieldReadFunction<any>, timestampReached?: FieldPolicy<any> | FieldReadFunction<any> }; -export type MilestoneTypeKeySpecifier = ('activity' | 'fileNames' | 'final' | 'id' | 'name' | 'roles' | 'teamVisible' | MilestoneTypeKeySpecifier)[]; +export type MilestoneTypeKeySpecifier = ('activity' | 'fileNames' | 'final' | 'id' | 'initialState' | 'name' | 'roles' | 'teamVisible' | MilestoneTypeKeySpecifier)[]; export type MilestoneTypeFieldPolicy = { activity?: FieldPolicy<any> | FieldReadFunction<any>, fileNames?: FieldPolicy<any> | FieldReadFunction<any>, final?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, + initialState?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, roles?: FieldPolicy<any> | FieldReadFunction<any>, teamVisible?: FieldPolicy<any> | FieldReadFunction<any> @@ -380,38 +403,50 @@ export type MoveExerciseTimeMutationKeySpecifier = ('exercise' | MoveExerciseTim export type MoveExerciseTimeMutationFieldPolicy = { exercise?: FieldPolicy<any> | FieldReadFunction<any> }; -export type MutationKeySpecifier = ('addDefinitionAccess' | 'answerQuestionnaire' | 'assignInstructorsToExercise' | 'assignUsersToTeam' | 'changeUserData' | 'createExercise' | 'createThread' | 'deleteDefinition' | 'deleteExercise' | 'login' | 'logout' | 'modifyMilestone' | 'moveTime' | 'passwordChange' | 'removeDefinitionAccess' | 'removeInstructorsFromExercise' | 'removeUsersFromTeam' | 'resetReadReceiptChannel' | 'resetReadReceiptEmailThread' | 'selectTeamInjectOption' | 'sendEmail' | 'startExercise' | 'stopExercise' | 'useTool' | 'writeEmailDraft' | 'writeInjectSelectionConfirmation' | 'writeReadReceipt' | 'writeReadReceiptChannel' | 'writeReadReceiptEmail' | 'writeReadReceiptEmailThread' | MutationKeySpecifier)[]; +export type MutationKeySpecifier = ('addDefinitionAccess' | 'answerQuestionnaire' | 'assignInstructorsToExercise' | 'assignUsersByTags' | 'assignUsersEqually' | 'assignUsersToTeam' | 'changeUserData' | 'copyUsersAssignment' | 'createExercise' | 'createTag' | 'createThread' | 'createUser' | 'deleteDefinition' | 'deleteEmailDraft' | 'deleteExercise' | 'deleteTags' | 'deleteUsers' | 'login' | 'logout' | 'modifyMilestone' | 'moveTime' | 'passwordChange' | 'regenerateCredentials' | 'removeDefinitionAccess' | 'removeInstructorsFromExercise' | 'removeUsersFromTeam' | 'sendCustomInject' | 'sendEmail' | 'setEmailDraft' | 'setIsUnreadChannel' | 'setIsUnreadEmailThread' | 'startExercise' | 'stopExercise' | 'updateTag' | 'updateTagAssignments' | 'useTool' | 'writeReadReceipt' | 'writeReadReceiptEmail' | MutationKeySpecifier)[]; export type MutationFieldPolicy = { addDefinitionAccess?: FieldPolicy<any> | FieldReadFunction<any>, answerQuestionnaire?: FieldPolicy<any> | FieldReadFunction<any>, assignInstructorsToExercise?: FieldPolicy<any> | FieldReadFunction<any>, + assignUsersByTags?: FieldPolicy<any> | FieldReadFunction<any>, + assignUsersEqually?: FieldPolicy<any> | FieldReadFunction<any>, assignUsersToTeam?: FieldPolicy<any> | FieldReadFunction<any>, changeUserData?: FieldPolicy<any> | FieldReadFunction<any>, + copyUsersAssignment?: FieldPolicy<any> | FieldReadFunction<any>, createExercise?: FieldPolicy<any> | FieldReadFunction<any>, + createTag?: FieldPolicy<any> | FieldReadFunction<any>, createThread?: FieldPolicy<any> | FieldReadFunction<any>, + createUser?: FieldPolicy<any> | FieldReadFunction<any>, deleteDefinition?: FieldPolicy<any> | FieldReadFunction<any>, + deleteEmailDraft?: FieldPolicy<any> | FieldReadFunction<any>, deleteExercise?: FieldPolicy<any> | FieldReadFunction<any>, + deleteTags?: FieldPolicy<any> | FieldReadFunction<any>, + deleteUsers?: FieldPolicy<any> | FieldReadFunction<any>, login?: FieldPolicy<any> | FieldReadFunction<any>, logout?: FieldPolicy<any> | FieldReadFunction<any>, modifyMilestone?: FieldPolicy<any> | FieldReadFunction<any>, moveTime?: FieldPolicy<any> | FieldReadFunction<any>, passwordChange?: FieldPolicy<any> | FieldReadFunction<any>, + regenerateCredentials?: FieldPolicy<any> | FieldReadFunction<any>, removeDefinitionAccess?: FieldPolicy<any> | FieldReadFunction<any>, removeInstructorsFromExercise?: FieldPolicy<any> | FieldReadFunction<any>, removeUsersFromTeam?: FieldPolicy<any> | FieldReadFunction<any>, - resetReadReceiptChannel?: FieldPolicy<any> | FieldReadFunction<any>, - resetReadReceiptEmailThread?: FieldPolicy<any> | FieldReadFunction<any>, - selectTeamInjectOption?: FieldPolicy<any> | FieldReadFunction<any>, + sendCustomInject?: FieldPolicy<any> | FieldReadFunction<any>, sendEmail?: FieldPolicy<any> | FieldReadFunction<any>, + setEmailDraft?: FieldPolicy<any> | FieldReadFunction<any>, + setIsUnreadChannel?: FieldPolicy<any> | FieldReadFunction<any>, + setIsUnreadEmailThread?: FieldPolicy<any> | FieldReadFunction<any>, startExercise?: FieldPolicy<any> | FieldReadFunction<any>, stopExercise?: FieldPolicy<any> | FieldReadFunction<any>, + updateTag?: FieldPolicy<any> | FieldReadFunction<any>, + updateTagAssignments?: FieldPolicy<any> | FieldReadFunction<any>, useTool?: FieldPolicy<any> | FieldReadFunction<any>, - writeEmailDraft?: FieldPolicy<any> | FieldReadFunction<any>, - writeInjectSelectionConfirmation?: FieldPolicy<any> | FieldReadFunction<any>, writeReadReceipt?: FieldPolicy<any> | FieldReadFunction<any>, - writeReadReceiptChannel?: FieldPolicy<any> | FieldReadFunction<any>, - writeReadReceiptEmail?: FieldPolicy<any> | FieldReadFunction<any>, - writeReadReceiptEmailThread?: FieldPolicy<any> | FieldReadFunction<any> + writeReadReceiptEmail?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type MutationResultKeySpecifier = ('operationDone' | MutationResultKeySpecifier)[]; +export type MutationResultFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> }; export type OverlayTypeKeySpecifier = ('duration' | 'id' | OverlayTypeKeySpecifier)[]; export type OverlayTypeFieldPolicy = { @@ -422,13 +457,12 @@ export type PasswordChangeKeySpecifier = ('passwordChanged' | PasswordChangeKeyS export type PasswordChangeFieldPolicy = { passwordChanged?: FieldPolicy<any> | FieldReadFunction<any> }; -export type QueryKeySpecifier = ('actionLog' | 'analyticsActionLogs' | 'analyticsEmailThreads' | 'analyticsMilestones' | 'autoInjects' | 'channel' | 'definition' | 'definitions' | 'emailAddresses' | 'emailContact' | 'emailContacts' | 'emailTemplates' | 'emailThread' | 'emailThreads' | 'exerciseChannels' | 'exerciseConfig' | 'exerciseId' | 'exerciseLoopRunning' | 'exerciseQuestionnaires' | 'exerciseTimeLeft' | 'exerciseTools' | 'exercises' | 'extendedTeamTools' | 'fileInfo' | 'groups' | 'milestones' | 'questionnaireState' | 'returnLocalEmailDraft' | 'tags' | 'team' | 'teamActionLogs' | 'teamChannelLogs' | 'teamEmailParticipant' | 'teamInjectSelections' | 'teamLearningObjectives' | 'teamMilestones' | 'teamQuestionnaires' | 'teamRoles' | 'teamTools' | 'teamUploadedFiles' | 'threadTemplate' | 'threadTemplates' | 'user' | 'users' | 'validateEmailAddress' | 'whoAmI' | QueryKeySpecifier)[]; +export type QueryKeySpecifier = ('actionLog' | 'analyticsActionLogs' | 'analyticsEmailThreads' | 'analyticsMilestones' | 'channel' | 'definition' | 'definitions' | 'emailAddresses' | 'emailContact' | 'emailContacts' | 'emailTemplates' | 'emailThread' | 'emailThreads' | 'exerciseChannels' | 'exerciseConfig' | 'exerciseId' | 'exerciseLoopRunning' | 'exerciseQuestionnaires' | 'exerciseTimeLeft' | 'exerciseTools' | 'exercises' | 'extendedTeamTools' | 'fileInfo' | 'getEmailDraft' | 'getEmailDrafts' | 'injects' | 'learningObjectives' | 'milestones' | 'questionnaireState' | 'questionnaires' | 'tags' | 'team' | 'teamActionLogs' | 'teamChannelLogs' | 'teamEmailParticipant' | 'teamLearningObjectives' | 'teamMilestone' | 'teamMilestones' | 'teamQuestionnaires' | 'teamRoles' | 'teamTools' | 'teamUploadedFiles' | 'threadTemplate' | 'threadTemplates' | 'user' | 'users' | 'validateEmailAddress' | 'whoAmI' | QueryKeySpecifier)[]; export type QueryFieldPolicy = { actionLog?: FieldPolicy<any> | FieldReadFunction<any>, analyticsActionLogs?: FieldPolicy<any> | FieldReadFunction<any>, analyticsEmailThreads?: FieldPolicy<any> | FieldReadFunction<any>, analyticsMilestones?: FieldPolicy<any> | FieldReadFunction<any>, - autoInjects?: FieldPolicy<any> | FieldReadFunction<any>, channel?: FieldPolicy<any> | FieldReadFunction<any>, definition?: FieldPolicy<any> | FieldReadFunction<any>, definitions?: FieldPolicy<any> | FieldReadFunction<any>, @@ -448,17 +482,20 @@ export type QueryFieldPolicy = { exercises?: FieldPolicy<any> | FieldReadFunction<any>, extendedTeamTools?: FieldPolicy<any> | FieldReadFunction<any>, fileInfo?: FieldPolicy<any> | FieldReadFunction<any>, - groups?: FieldPolicy<any> | FieldReadFunction<any>, + getEmailDraft?: FieldPolicy<any> | FieldReadFunction<any>, + getEmailDrafts?: FieldPolicy<any> | FieldReadFunction<any>, + injects?: FieldPolicy<any> | FieldReadFunction<any>, + learningObjectives?: FieldPolicy<any> | FieldReadFunction<any>, milestones?: FieldPolicy<any> | FieldReadFunction<any>, questionnaireState?: FieldPolicy<any> | FieldReadFunction<any>, - returnLocalEmailDraft?: FieldPolicy<any> | FieldReadFunction<any>, + questionnaires?: FieldPolicy<any> | FieldReadFunction<any>, tags?: FieldPolicy<any> | FieldReadFunction<any>, team?: FieldPolicy<any> | FieldReadFunction<any>, teamActionLogs?: FieldPolicy<any> | FieldReadFunction<any>, teamChannelLogs?: FieldPolicy<any> | FieldReadFunction<any>, teamEmailParticipant?: FieldPolicy<any> | FieldReadFunction<any>, - teamInjectSelections?: FieldPolicy<any> | FieldReadFunction<any>, teamLearningObjectives?: FieldPolicy<any> | FieldReadFunction<any>, + teamMilestone?: FieldPolicy<any> | FieldReadFunction<any>, teamMilestones?: FieldPolicy<any> | FieldReadFunction<any>, teamQuestionnaires?: FieldPolicy<any> | FieldReadFunction<any>, teamRoles?: FieldPolicy<any> | FieldReadFunction<any>, @@ -471,15 +508,15 @@ export type QueryFieldPolicy = { validateEmailAddress?: FieldPolicy<any> | FieldReadFunction<any>, whoAmI?: FieldPolicy<any> | FieldReadFunction<any> }; -export type QuestionTypeKeySpecifier = ('control' | 'correct' | 'id' | 'labels' | 'max' | 'questionnaire' | 'text' | QuestionTypeKeySpecifier)[]; +export type QuestionTypeKeySpecifier = ('content' | 'control' | 'correct' | 'id' | 'labels' | 'max' | 'questionnaire' | QuestionTypeKeySpecifier)[]; export type QuestionTypeFieldPolicy = { + content?: FieldPolicy<any> | FieldReadFunction<any>, control?: FieldPolicy<any> | FieldReadFunction<any>, correct?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, labels?: FieldPolicy<any> | FieldReadFunction<any>, max?: FieldPolicy<any> | FieldReadFunction<any>, - questionnaire?: FieldPolicy<any> | FieldReadFunction<any>, - text?: FieldPolicy<any> | FieldReadFunction<any> + questionnaire?: FieldPolicy<any> | FieldReadFunction<any> }; export type QuestionnaireAnswerTypeKeySpecifier = ('choice' | 'id' | 'isCorrect' | 'question' | 'teamQuestionnaireState' | QuestionnaireAnswerTypeKeySpecifier)[]; export type QuestionnaireAnswerTypeFieldPolicy = { @@ -505,6 +542,10 @@ export type ReadReceiptTypeFieldPolicy = { actionLogId?: FieldPolicy<any> | FieldReadFunction<any>, readReceipt?: FieldPolicy<any> | FieldReadFunction<any> }; +export type RegenerateCredentialsMutationKeySpecifier = ('operationDone' | RegenerateCredentialsMutationKeySpecifier)[]; +export type RegenerateCredentialsMutationFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; export type RemoveDefinitionAccessMutationKeySpecifier = ('operationDone' | RemoveDefinitionAccessMutationKeySpecifier)[]; export type RemoveDefinitionAccessMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> @@ -517,9 +558,10 @@ export type RemoveUsersFromTeamMutationKeySpecifier = ('operationDone' | RemoveU export type RemoveUsersFromTeamMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> }; -export type RestrictedExerciseKeySpecifier = ('id' | 'uuid' | RestrictedExerciseKeySpecifier)[]; +export type RestrictedExerciseKeySpecifier = ('id' | 'name' | 'uuid' | RestrictedExerciseKeySpecifier)[]; export type RestrictedExerciseFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, + name?: FieldPolicy<any> | FieldReadFunction<any>, uuid?: FieldPolicy<any> | FieldReadFunction<any> }; export type RestrictedTeamKeySpecifier = ('emailAddress' | 'exercise' | 'id' | 'name' | 'role' | RestrictedTeamKeySpecifier)[]; @@ -530,7 +572,7 @@ export type RestrictedTeamFieldPolicy = { name?: FieldPolicy<any> | FieldReadFunction<any>, role?: FieldPolicy<any> | FieldReadFunction<any> }; -export type RestrictedUserKeySpecifier = ('dateJoined' | 'firstName' | 'group' | 'id' | 'isActive' | 'isImported' | 'isStaff' | 'isSuperuser' | 'lastLogin' | 'lastName' | 'password' | 'tags' | 'username' | RestrictedUserKeySpecifier)[]; +export type RestrictedUserKeySpecifier = ('dateJoined' | 'firstName' | 'group' | 'id' | 'isActive' | 'isImported' | 'lastLogin' | 'lastName' | 'tags' | 'username' | RestrictedUserKeySpecifier)[]; export type RestrictedUserFieldPolicy = { dateJoined?: FieldPolicy<any> | FieldReadFunction<any>, firstName?: FieldPolicy<any> | FieldReadFunction<any>, @@ -538,31 +580,15 @@ export type RestrictedUserFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, isActive?: FieldPolicy<any> | FieldReadFunction<any>, isImported?: FieldPolicy<any> | FieldReadFunction<any>, - isStaff?: FieldPolicy<any> | FieldReadFunction<any>, - isSuperuser?: FieldPolicy<any> | FieldReadFunction<any>, lastLogin?: FieldPolicy<any> | FieldReadFunction<any>, lastName?: FieldPolicy<any> | FieldReadFunction<any>, - password?: FieldPolicy<any> | FieldReadFunction<any>, tags?: FieldPolicy<any> | FieldReadFunction<any>, username?: FieldPolicy<any> | FieldReadFunction<any> }; -export type SelectTeamInjectOptionMutationKeySpecifier = ('operationDone' | SelectTeamInjectOptionMutationKeySpecifier)[]; -export type SelectTeamInjectOptionMutationFieldPolicy = { +export type SendCustomInjectMutationKeySpecifier = ('operationDone' | SendCustomInjectMutationKeySpecifier)[]; +export type SendCustomInjectMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> }; -export type SelectTeamInjectTypeKeySpecifier = ('activateMilestone' | 'content' | 'deactivateMilestone' | 'fileId' | 'optionEmail' | 'repeat' | 'selectionId' | 'sender' | 'subject' | 'teamId' | SelectTeamInjectTypeKeySpecifier)[]; -export type SelectTeamInjectTypeFieldPolicy = { - activateMilestone?: FieldPolicy<any> | FieldReadFunction<any>, - content?: FieldPolicy<any> | FieldReadFunction<any>, - deactivateMilestone?: FieldPolicy<any> | FieldReadFunction<any>, - fileId?: FieldPolicy<any> | FieldReadFunction<any>, - optionEmail?: FieldPolicy<any> | FieldReadFunction<any>, - repeat?: FieldPolicy<any> | FieldReadFunction<any>, - selectionId?: FieldPolicy<any> | FieldReadFunction<any>, - sender?: FieldPolicy<any> | FieldReadFunction<any>, - subject?: FieldPolicy<any> | FieldReadFunction<any>, - teamId?: FieldPolicy<any> | FieldReadFunction<any> -}; export type SendEmailMutationKeySpecifier = ('operationDone' | SendEmailMutationKeySpecifier)[]; export type SendEmailMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> @@ -584,7 +610,7 @@ export type StopExerciseMutationKeySpecifier = ('exercise' | StopExerciseMutatio export type StopExerciseMutationFieldPolicy = { exercise?: FieldPolicy<any> | FieldReadFunction<any> }; -export type SubscriptionKeySpecifier = ('actionLogs' | 'analyticsActionLogsSubscription' | 'analyticsEmailThreadSubscription' | 'analyticsMilestonesSubscription' | 'emailThreads' | 'exerciseLoopRunning' | 'exercisesSubscription' | 'injectSelections' | 'milestones' | 'teamQuestionnaireStateSubscription' | SubscriptionKeySpecifier)[]; +export type SubscriptionKeySpecifier = ('actionLogs' | 'analyticsActionLogsSubscription' | 'analyticsEmailThreadSubscription' | 'analyticsMilestonesSubscription' | 'emailThreads' | 'exerciseLoopRunning' | 'exercisesSubscription' | 'milestones' | 'teamQuestionnaireStateSubscription' | SubscriptionKeySpecifier)[]; export type SubscriptionFieldPolicy = { actionLogs?: FieldPolicy<any> | FieldReadFunction<any>, analyticsActionLogsSubscription?: FieldPolicy<any> | FieldReadFunction<any>, @@ -593,7 +619,6 @@ export type SubscriptionFieldPolicy = { emailThreads?: FieldPolicy<any> | FieldReadFunction<any>, exerciseLoopRunning?: FieldPolicy<any> | FieldReadFunction<any>, exercisesSubscription?: FieldPolicy<any> | FieldReadFunction<any>, - injectSelections?: FieldPolicy<any> | FieldReadFunction<any>, milestones?: FieldPolicy<any> | FieldReadFunction<any>, teamQuestionnaireStateSubscription?: FieldPolicy<any> | FieldReadFunction<any> }; @@ -631,13 +656,12 @@ export type TeamQuestionnaireStateTypeFieldPolicy = { timestampAnswered?: FieldPolicy<any> | FieldReadFunction<any>, timestampSent?: FieldPolicy<any> | FieldReadFunction<any> }; -export type TeamTypeKeySpecifier = ('emailAddress' | 'exercise' | 'finishTime' | 'id' | 'injectSelections' | 'logs' | 'name' | 'role' | 'teamQuestionnaireStates' | 'userSet' | TeamTypeKeySpecifier)[]; +export type TeamTypeKeySpecifier = ('emailAddress' | 'exercise' | 'finishTime' | 'id' | 'logs' | 'name' | 'role' | 'teamQuestionnaireStates' | 'userSet' | TeamTypeKeySpecifier)[]; export type TeamTypeFieldPolicy = { emailAddress?: FieldPolicy<any> | FieldReadFunction<any>, exercise?: FieldPolicy<any> | FieldReadFunction<any>, finishTime?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, - injectSelections?: FieldPolicy<any> | FieldReadFunction<any>, logs?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, role?: FieldPolicy<any> | FieldReadFunction<any>, @@ -662,7 +686,7 @@ export type ToolResponseTypeFieldPolicy = { time?: FieldPolicy<any> | FieldReadFunction<any>, tool?: FieldPolicy<any> | FieldReadFunction<any> }; -export type ToolTypeKeySpecifier = ('defaultResponse' | 'definition' | 'hint' | 'id' | 'name' | 'roles' | 'toolDetails' | 'tooltipDescription' | ToolTypeKeySpecifier)[]; +export type ToolTypeKeySpecifier = ('defaultResponse' | 'definition' | 'hint' | 'id' | 'name' | 'roles' | 'tooltipDescription' | ToolTypeKeySpecifier)[]; export type ToolTypeFieldPolicy = { defaultResponse?: FieldPolicy<any> | FieldReadFunction<any>, definition?: FieldPolicy<any> | FieldReadFunction<any>, @@ -670,9 +694,22 @@ export type ToolTypeFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, roles?: FieldPolicy<any> | FieldReadFunction<any>, - toolDetails?: FieldPolicy<any> | FieldReadFunction<any>, tooltipDescription?: FieldPolicy<any> | FieldReadFunction<any> }; +export type UpdateTagAssignmentsMutationKeySpecifier = ('operationDone' | UpdateTagAssignmentsMutationKeySpecifier)[]; +export type UpdateTagAssignmentsMutationFieldPolicy = { + operationDone?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type UpdateTagAssignmentsTypeKeySpecifier = ('addTags' | 'removeTags' | 'userIds' | UpdateTagAssignmentsTypeKeySpecifier)[]; +export type UpdateTagAssignmentsTypeFieldPolicy = { + addTags?: FieldPolicy<any> | FieldReadFunction<any>, + removeTags?: FieldPolicy<any> | FieldReadFunction<any>, + userIds?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type UpdateTagMutationKeySpecifier = ('updatedTag' | UpdateTagMutationKeySpecifier)[]; +export type UpdateTagMutationFieldPolicy = { + updatedTag?: FieldPolicy<any> | FieldReadFunction<any> +}; export type UseToolMutationKeySpecifier = ('operationDone' | UseToolMutationKeySpecifier)[]; export type UseToolMutationFieldPolicy = { operationDone?: FieldPolicy<any> | FieldReadFunction<any> @@ -683,7 +720,7 @@ export type UseToolTypeFieldPolicy = { toolArgument?: FieldPolicy<any> | FieldReadFunction<any>, toolId?: FieldPolicy<any> | FieldReadFunction<any> }; -export type UserTypeKeySpecifier = ('dateJoined' | 'definitions' | 'exercises' | 'firstName' | 'group' | 'id' | 'isActive' | 'isImported' | 'isStaff' | 'isSuperuser' | 'lastLogin' | 'lastName' | 'tags' | 'teams' | 'username' | UserTypeKeySpecifier)[]; +export type UserTypeKeySpecifier = ('dateJoined' | 'definitions' | 'exercises' | 'firstName' | 'group' | 'id' | 'isActive' | 'isImported' | 'lastLogin' | 'lastName' | 'tags' | 'teams' | 'username' | UserTypeKeySpecifier)[]; export type UserTypeFieldPolicy = { dateJoined?: FieldPolicy<any> | FieldReadFunction<any>, definitions?: FieldPolicy<any> | FieldReadFunction<any>, @@ -693,8 +730,6 @@ export type UserTypeFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, isActive?: FieldPolicy<any> | FieldReadFunction<any>, isImported?: FieldPolicy<any> | FieldReadFunction<any>, - isStaff?: FieldPolicy<any> | FieldReadFunction<any>, - isSuperuser?: FieldPolicy<any> | FieldReadFunction<any>, lastLogin?: FieldPolicy<any> | FieldReadFunction<any>, lastName?: FieldPolicy<any> | FieldReadFunction<any>, tags?: FieldPolicy<any> | FieldReadFunction<any>, @@ -734,6 +769,14 @@ export type StrictTypedTypePolicies = { keyFields?: false | AssignInstructorsToExerciseKeySpecifier | (() => undefined | AssignInstructorsToExerciseKeySpecifier), fields?: AssignInstructorsToExerciseFieldPolicy, }, + AssignUsersByTags?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | AssignUsersByTagsKeySpecifier | (() => undefined | AssignUsersByTagsKeySpecifier), + fields?: AssignUsersByTagsFieldPolicy, + }, + AssignUsersEqually?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | AssignUsersEquallyKeySpecifier | (() => undefined | AssignUsersEquallyKeySpecifier), + fields?: AssignUsersEquallyFieldPolicy, + }, AssignUsersToTeamMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | AssignUsersToTeamMutationKeySpecifier | (() => undefined | AssignUsersToTeamMutationKeySpecifier), fields?: AssignUsersToTeamMutationFieldPolicy, @@ -742,9 +785,9 @@ export type StrictTypedTypePolicies = { keyFields?: false | ChangeUserDataMutationKeySpecifier | (() => undefined | ChangeUserDataMutationKeySpecifier), fields?: ChangeUserDataMutationFieldPolicy, }, - ChannelReadReceipt?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | ChannelReadReceiptKeySpecifier | (() => undefined | ChannelReadReceiptKeySpecifier), - fields?: ChannelReadReceiptFieldPolicy, + ChangeUserType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | ChangeUserTypeKeySpecifier | (() => undefined | ChangeUserTypeKeySpecifier), + fields?: ChangeUserTypeFieldPolicy, }, ChannelReceipt?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | ChannelReceiptKeySpecifier | (() => undefined | ChannelReceiptKeySpecifier), @@ -762,6 +805,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ControlTypeKeySpecifier | (() => undefined | ControlTypeKeySpecifier), fields?: ControlTypeFieldPolicy, }, + CopyUsersAssignment?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | CopyUsersAssignmentKeySpecifier | (() => undefined | CopyUsersAssignmentKeySpecifier), + fields?: CopyUsersAssignmentFieldPolicy, + }, CreateExerciseMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | CreateExerciseMutationKeySpecifier | (() => undefined | CreateExerciseMutationKeySpecifier), fields?: CreateExerciseMutationFieldPolicy, @@ -770,14 +817,30 @@ export type StrictTypedTypePolicies = { keyFields?: false | CreateExerciseTypeKeySpecifier | (() => undefined | CreateExerciseTypeKeySpecifier), fields?: CreateExerciseTypeFieldPolicy, }, + CreateTagMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | CreateTagMutationKeySpecifier | (() => undefined | CreateTagMutationKeySpecifier), + fields?: CreateTagMutationFieldPolicy, + }, CreateThreadMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | CreateThreadMutationKeySpecifier | (() => undefined | CreateThreadMutationKeySpecifier), fields?: CreateThreadMutationFieldPolicy, }, + CreateUserMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | CreateUserMutationKeySpecifier | (() => undefined | CreateUserMutationKeySpecifier), + fields?: CreateUserMutationFieldPolicy, + }, + CreateUserType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | CreateUserTypeKeySpecifier | (() => undefined | CreateUserTypeKeySpecifier), + fields?: CreateUserTypeFieldPolicy, + }, CustomInjectDetailsType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | CustomInjectDetailsTypeKeySpecifier | (() => undefined | CustomInjectDetailsTypeKeySpecifier), fields?: CustomInjectDetailsTypeFieldPolicy, }, + CustomInjectType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | CustomInjectTypeKeySpecifier | (() => undefined | CustomInjectTypeKeySpecifier), + fields?: CustomInjectTypeFieldPolicy, + }, DefinitionChannelType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | DefinitionChannelTypeKeySpecifier | (() => undefined | DefinitionChannelTypeKeySpecifier), fields?: DefinitionChannelTypeFieldPolicy, @@ -802,6 +865,14 @@ export type StrictTypedTypePolicies = { keyFields?: false | DeleteExerciseMutationKeySpecifier | (() => undefined | DeleteExerciseMutationKeySpecifier), fields?: DeleteExerciseMutationFieldPolicy, }, + DeleteTagsMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | DeleteTagsMutationKeySpecifier | (() => undefined | DeleteTagsMutationKeySpecifier), + fields?: DeleteTagsMutationFieldPolicy, + }, + DeleteUsersMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | DeleteUsersMutationKeySpecifier | (() => undefined | DeleteUsersMutationKeySpecifier), + fields?: DeleteUsersMutationFieldPolicy, + }, EmailAddressType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | EmailAddressTypeKeySpecifier | (() => undefined | EmailAddressTypeKeySpecifier), fields?: EmailAddressTypeFieldPolicy, @@ -822,10 +893,6 @@ export type StrictTypedTypePolicies = { keyFields?: false | EmailTemplateTypeKeySpecifier | (() => undefined | EmailTemplateTypeKeySpecifier), fields?: EmailTemplateTypeFieldPolicy, }, - EmailThreadReceipt?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | EmailThreadReceiptKeySpecifier | (() => undefined | EmailThreadReceiptKeySpecifier), - fields?: EmailThreadReceiptFieldPolicy, - }, EmailThreadSubscription?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | EmailThreadSubscriptionKeySpecifier | (() => undefined | EmailThreadSubscriptionKeySpecifier), fields?: EmailThreadSubscriptionFieldPolicy, @@ -862,33 +929,21 @@ export type StrictTypedTypePolicies = { keyFields?: false | FileInfoTypeKeySpecifier | (() => undefined | FileInfoTypeKeySpecifier), fields?: FileInfoTypeFieldPolicy, }, + FilterUsersType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | FilterUsersTypeKeySpecifier | (() => undefined | FilterUsersTypeKeySpecifier), + fields?: FilterUsersTypeFieldPolicy, + }, GrapheneConfig?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | GrapheneConfigKeySpecifier | (() => undefined | GrapheneConfigKeySpecifier), fields?: GrapheneConfigFieldPolicy, }, - GroupType?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | GroupTypeKeySpecifier | (() => undefined | GroupTypeKeySpecifier), - fields?: GroupTypeFieldPolicy, - }, InjectDetailsType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | InjectDetailsTypeKeySpecifier | (() => undefined | InjectDetailsTypeKeySpecifier), fields?: InjectDetailsTypeFieldPolicy, }, - InjectOptionType?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | InjectOptionTypeKeySpecifier | (() => undefined | InjectOptionTypeKeySpecifier), - fields?: InjectOptionTypeFieldPolicy, - }, - InjectSelectionConfirmationType?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | InjectSelectionConfirmationTypeKeySpecifier | (() => undefined | InjectSelectionConfirmationTypeKeySpecifier), - fields?: InjectSelectionConfirmationTypeFieldPolicy, - }, - InjectSelectionType?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | InjectSelectionTypeKeySpecifier | (() => undefined | InjectSelectionTypeKeySpecifier), - fields?: InjectSelectionTypeFieldPolicy, - }, - InjectSelectionsSubscription?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | InjectSelectionsSubscriptionKeySpecifier | (() => undefined | InjectSelectionsSubscriptionKeySpecifier), - fields?: InjectSelectionsSubscriptionFieldPolicy, + IsUnreadType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | IsUnreadTypeKeySpecifier | (() => undefined | IsUnreadTypeKeySpecifier), + fields?: IsUnreadTypeFieldPolicy, }, LearningActivityType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | LearningActivityTypeKeySpecifier | (() => undefined | LearningActivityTypeKeySpecifier), @@ -930,6 +985,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | MutationKeySpecifier | (() => undefined | MutationKeySpecifier), fields?: MutationFieldPolicy, }, + MutationResult?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | MutationResultKeySpecifier | (() => undefined | MutationResultKeySpecifier), + fields?: MutationResultFieldPolicy, + }, OverlayType?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | OverlayTypeKeySpecifier | (() => undefined | OverlayTypeKeySpecifier), fields?: OverlayTypeFieldPolicy, @@ -958,6 +1017,10 @@ export type StrictTypedTypePolicies = { keyFields?: false | ReadReceiptTypeKeySpecifier | (() => undefined | ReadReceiptTypeKeySpecifier), fields?: ReadReceiptTypeFieldPolicy, }, + RegenerateCredentialsMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | RegenerateCredentialsMutationKeySpecifier | (() => undefined | RegenerateCredentialsMutationKeySpecifier), + fields?: RegenerateCredentialsMutationFieldPolicy, + }, RemoveDefinitionAccessMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | RemoveDefinitionAccessMutationKeySpecifier | (() => undefined | RemoveDefinitionAccessMutationKeySpecifier), fields?: RemoveDefinitionAccessMutationFieldPolicy, @@ -982,13 +1045,9 @@ export type StrictTypedTypePolicies = { keyFields?: false | RestrictedUserKeySpecifier | (() => undefined | RestrictedUserKeySpecifier), fields?: RestrictedUserFieldPolicy, }, - SelectTeamInjectOptionMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | SelectTeamInjectOptionMutationKeySpecifier | (() => undefined | SelectTeamInjectOptionMutationKeySpecifier), - fields?: SelectTeamInjectOptionMutationFieldPolicy, - }, - SelectTeamInjectType?: Omit<TypePolicy, "fields" | "keyFields"> & { - keyFields?: false | SelectTeamInjectTypeKeySpecifier | (() => undefined | SelectTeamInjectTypeKeySpecifier), - fields?: SelectTeamInjectTypeFieldPolicy, + SendCustomInjectMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | SendCustomInjectMutationKeySpecifier | (() => undefined | SendCustomInjectMutationKeySpecifier), + fields?: SendCustomInjectMutationFieldPolicy, }, SendEmailMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | SendEmailMutationKeySpecifier | (() => undefined | SendEmailMutationKeySpecifier), @@ -1046,6 +1105,18 @@ export type StrictTypedTypePolicies = { keyFields?: false | ToolTypeKeySpecifier | (() => undefined | ToolTypeKeySpecifier), fields?: ToolTypeFieldPolicy, }, + UpdateTagAssignmentsMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | UpdateTagAssignmentsMutationKeySpecifier | (() => undefined | UpdateTagAssignmentsMutationKeySpecifier), + fields?: UpdateTagAssignmentsMutationFieldPolicy, + }, + UpdateTagAssignmentsType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | UpdateTagAssignmentsTypeKeySpecifier | (() => undefined | UpdateTagAssignmentsTypeKeySpecifier), + fields?: UpdateTagAssignmentsTypeFieldPolicy, + }, + UpdateTagMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | UpdateTagMutationKeySpecifier | (() => undefined | UpdateTagMutationKeySpecifier), + fields?: UpdateTagMutationFieldPolicy, + }, UseToolMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | UseToolMutationKeySpecifier | (() => undefined | UseToolMutationKeySpecifier), fields?: UseToolMutationFieldPolicy, diff --git a/graphql/client/cache.ts b/graphql/client/cache.ts index a54817cd71c861a8f57166b1a7a49d142b6c8762..e885d63273680cd29999a105da308b9612963c12 100644 --- a/graphql/client/cache.ts +++ b/graphql/client/cache.ts @@ -1,5 +1,6 @@ import { InMemoryCache } from '@apollo/client' import type { StrictTypedTypePolicies } from './apollo-helpers' +import { sanitizeHtmlCustom } from './sanitize' const typePolicies: StrictTypedTypePolicies = { Query: { @@ -20,6 +21,14 @@ const typePolicies: StrictTypedTypePolicies = { }) }, }, + definition: { + read(_, { args, toReference }) { + return toReference({ + __typename: 'DefinitionType', + id: args?.definitionId || '', + }) + }, + }, emailThread: { read(_, { args, toReference }) { return toReference({ @@ -28,11 +37,59 @@ const typePolicies: StrictTypedTypePolicies = { }) }, }, + user: { + read(_, { args, toReference }) { + return toReference({ + __typename: 'UserType', + id: args?.userId || '', + }) + }, + }, + team: { + read(_, { args, toReference }) { + return toReference({ + __typename: 'TeamType', + id: args?.teamId || '', + }) + }, + }, + questionnaireState: { + read(_, { args, toReference }) { + return toReference({ + __typename: 'TeamQuestionnaireStateType', + team: toReference({ + __typename: 'TeamType', + id: args?.teamId || '', + }), + questionnaire: toReference({ + __typename: 'QuestionnaireType', + id: args?.questionnaireId || '', + }), + }) + }, + }, + channel: { + read(_, { args, toReference }) { + return toReference({ + __typename: 'DefinitionChannelType', + id: args?.channelId || '', + }) + }, + }, }, }, ActionLogType: { keyFields: ['id'], }, + ContentType: { + fields: { + rendered: { + read(data) { + return sanitizeHtmlCustom(data) + }, + }, + }, + }, EmailThreadType: { keyFields: ['id'], }, @@ -50,12 +107,6 @@ const typePolicies: StrictTypedTypePolicies = { EmailTemplateType: { keyFields: ['id'], }, - InjectOptionType: { - keyFields: ['id'], - }, - InjectSelectionType: { - keyFields: ['id'], - }, MilestoneType: { keyFields: ['id'], }, @@ -67,6 +118,12 @@ const typePolicies: StrictTypedTypePolicies = { }, }, }, + TeamQuestionnaireStateType: { + keyFields: ['team', 'questionnaire'], + }, + DefinitionChannelType: { + keyFields: ['id'], + }, } const cache = new InMemoryCache({ diff --git a/graphql/client/errorLink.ts b/graphql/client/errorLink.ts new file mode 100644 index 0000000000000000000000000000000000000000..e99ba99b153c39297029f5081cd0c8d39dc69c91 --- /dev/null +++ b/graphql/client/errorLink.ts @@ -0,0 +1,11 @@ +import { onError } from '@apollo/client/link/error' +import type { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' + +const errorLink = (notify: ReturnType<typeof useNotifyContext>['notify']) => + onError(({ networkError }) => { + if (networkError) { + notify(`Network error: ${networkError.message}`, { intent: 'danger' }) + } + }) + +export default errorLink diff --git a/graphql/client/index.tsx b/graphql/client/index.tsx index 344f60dfc53a66e50f778844d87b42d80fda2b64..66c16d2877e80eba910cc176d74b32f036d090b4 100644 --- a/graphql/client/index.tsx +++ b/graphql/client/index.tsx @@ -6,12 +6,14 @@ import { createNetworkStatusNotifier } from 'react-apollo-network-status' import { SubscriptionClient } from 'subscriptions-transport-ws' import { httpGraphql } from '@inject/shared/config' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import csrfFetch from '@inject/shared/utils/csrfFetch' import { useHost } from '../connection/host' import { useWs } from '../connection/ws' import localSchema from '../schemas/localSchema.graphql' import authLink from './authLink' import cache from './cache' +import errorLink from './errorLink' import resolvers from './resolvers' const { link, useApolloNetworkStatus } = createNetworkStatusNotifier() @@ -25,6 +27,7 @@ interface ApolloProps { const ApolloProviderWrapped: FC<ApolloProps> = ({ children, onFailedAuth }) => { const ws = useWs() const host = useHost() + const { notify } = useNotifyContext() if (!ws || !host) { return <p>No `WS` or `HOST` set to ApolloProviderWrapper</p> @@ -38,7 +41,12 @@ const ApolloProviderWrapped: FC<ApolloProps> = ({ children, onFailedAuth }) => { fetch: csrfFetch, }) - const wsLink = new WebSocketLink(new SubscriptionClient(ws)) + const wsLink = new WebSocketLink( + new SubscriptionClient(ws, { + reconnect: true, + reconnectionAttempts: 100, + }) + ) const client = new ApolloClient({ link: split( @@ -50,7 +58,10 @@ const ApolloProviderWrapped: FC<ApolloProps> = ({ children, onFailedAuth }) => { ) }, wsLink, - link.concat(authLink(onFailedAuth)).concat(httpLink) + link + .concat(authLink(onFailedAuth)) + .concat(errorLink(notify)) + .concat(httpLink) ), cache, typeDefs: localSchema, diff --git a/graphql/client/reactive.ts b/graphql/client/reactive.ts index d7231e0c7add1dca166ca17863d44f984b06602c..a8ad5da1827c9b2bbc904828e446f92c0a5aa96c 100644 --- a/graphql/client/reactive.ts +++ b/graphql/client/reactive.ts @@ -1,6 +1,60 @@ import type { ReactiveVar } from '@apollo/client' import { makeVar, useReactiveVar } from '@apollo/client' +import { useLocalStorageState } from 'ahooks' +import type { SetState } from 'ahooks/lib/createUseStorageState' +import { useEffect } from 'react' export { makeVar, useReactiveVar } export type { ReactiveVar } + +interface UseLocalStorageStateOptions<T> { + onChange?: (value: T) => void + serializer?: (value: T) => string + deserializer?: (value: string) => T +} + +/** + * Combines Apollo reactive variable with a local storage state. + * It's value is synced across tabs. + * + * Returns the value of the provided reactive variable and + * a function to set the value. + */ +export const useLocalStorageReactiveVar = <T>( + reactiveVar: ReactiveVar<T>, + key: string, + options?: UseLocalStorageStateOptions<T> +): readonly [T, (value?: SetState<T> | undefined) => void] => { + const reactiveVarValue = useReactiveVar(reactiveVar) + const [localStorageValue, setLocalStorageValue] = useLocalStorageState(key, { + defaultValue: reactiveVarValue, + listenStorageChange: true, + serializer: options?.serializer, + deserializer: options?.deserializer, + }) + + useEffect(() => { + /* + * there has already been a value in the local storage, + * but the reactiveVar has not been initialized + */ + if (localStorageValue !== reactiveVarValue) { + reactiveVar(localStorageValue) + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + + /* + * localStorageValue is synced automatically using the useLocalStorageState hook, + * this useEffect syncs reactiveVar with localStorageValue + */ + useEffect(() => { + if (localStorageValue !== undefined) { + options?.onChange?.(localStorageValue) + reactiveVar(localStorageValue) + } + }, [localStorageValue, options, reactiveVar]) + + return [reactiveVarValue, setLocalStorageValue] +} diff --git a/graphql/client/resolvers.ts b/graphql/client/resolvers.ts index aa76639b27db22a1234f02869a3e5304d40dc873..51b45f80d3f6501cd13509bde84a1d9c9bf13ca6 100644 --- a/graphql/client/resolvers.ts +++ b/graphql/client/resolvers.ts @@ -1,63 +1,72 @@ -import type { Modifier, Reference } from '@apollo/client/cache' +import type { ApolloClient } from '@apollo/client' import getKey from '@inject/shared/localstorage/getKey' -import type { ChannelReadReceipt, EmailDraftType, Resolvers } from '../types' -import cache from './cache' - -const getEmailThreadDraftId = ( - teamId: string, - emailThreadId: string | null | undefined -) => `EmailThreadDraft:${teamId}:${emailThreadId || 'newThread'}` +import type { EmailDraftType, IsUnreadType, Resolvers } from '../types' const getKeyContext = (instructor: boolean) => instructor ? 'instructor' : 'trainee' const resolvers: Resolvers = { EmailType: { - readReceipt: parent => - localStorage.getItem(`EmailRead:${parent.id}`) || null, + readReceipt: async parent => + localStorage.getItem(await getKey(`EmailRead:${parent.id}`)) || null, }, EmailThreadType: { - readReceipt: parent => - localStorage.getItem(`EmailThreadRead:${parent.id}`) || null, - }, - InjectSelectionType: { - submitted: parent => - localStorage.getItem(`InjectSelectionSubmitted:${parent.id}`) || null, + readReceipt: async parent => { + const key = await getKey(`IsUnreadEmailThread:${parent.id}`) + const item = localStorage.getItem(key) + const readReceipts = JSON.parse(item || '[]') as IsUnreadType[] + return readReceipts + }, }, ActionLogType: { - readReceipt: parent => - localStorage.getItem(`readReceipt:${parent.id}`) || null, + readReceipt: async parent => + localStorage.getItem(await getKey(`readReceipt:${parent.id}`)) || null, }, DefinitionChannelType: { - readReceipt: parent => - JSON.parse( - localStorage.getItem(`ChannelRead:${parent.id}`) || '[]' - ) as ChannelReadReceipt[], - }, - ExtendedToolType: { - hasParam: parent => - parent.responses.some(response => response.param !== ''), + readReceipt: async parent => { + const key = await getKey(`IsUnreadChannel:${parent.id}`) + const item = localStorage.getItem(key) + const readReceipts = JSON.parse(item || '[]') as IsUnreadType[] + return readReceipts + }, }, Query: { - async returnLocalEmailDraft(_root, variables) { - const id = getEmailThreadDraftId( - variables.teamId, - variables.emailThreadId + async getEmailDraft(_root, variables) { + const key = await getKey( + `EmailDrafts:${variables.teamId}`, + getKeyContext(variables.instructor) ) - const item = localStorage.getItem( - await getKey(id, getKeyContext(variables.instructor)) + const item = localStorage.getItem(key) + const drafts = JSON.parse(item || '[]') as EmailDraftType[] + const draft = drafts.find( + draft => + (!draft.emailThreadId && !variables.emailThreadId) || + draft.emailThreadId === variables.emailThreadId ) - const emailDraft = JSON.parse(item || '{}') as EmailDraftType - return { - __typename: 'EmailDraftType', - ...emailDraft, - } + return draft + ? { + __typename: 'EmailDraftType', + ...draft, + } + : null + }, + + async getEmailDrafts(_root, variables) { + const key = await getKey( + `EmailDrafts:${variables.teamId}`, + getKeyContext(variables.instructor) + ) + const item = localStorage.getItem(key) + const drafts = JSON.parse(item || '[]') as EmailDraftType[] + return drafts }, }, Mutation: { - async writeReadReceipt(_root, variables) { + async writeReadReceipt(_root, variables, context) { + const client = context.client as ApolloClient<Cache> + const cache = client.cache const id = `readReceipt:${variables.actionLogId}` const receipt = new Date().toUTCString() localStorage.setItem(await getKey(id), receipt) @@ -77,27 +86,9 @@ const resolvers: Resolvers = { } }, - async writeInjectSelectionConfirmation(_root, variables) { - const id = `InjectSelectionSubmitted:${variables.injectSelectionId}` - const receipt = new Date().toUTCString() - localStorage.setItem(await getKey(id), receipt) - cache.modify({ - id: cache.identify({ - __typename: 'InjectSelectionType', - id: variables.injectSelectionId, - }), - fields: { - submitted: () => receipt, - }, - }) - return { - __typename: 'InjectSelectionConfirmationType', - injectSelectionId: variables.injectSelectionId, - submitted: receipt, - } - }, - - async writeReadReceiptEmail(_root, variables) { + async writeReadReceiptEmail(_root, variables, context) { + const client = context.client as ApolloClient<Cache> + const cache = client.cache const id = `EmailRead:${variables.emailId}` const receipt = new Date().toUTCString() localStorage.setItem(await getKey(id), receipt) @@ -117,124 +108,149 @@ const resolvers: Resolvers = { } }, - async writeReadReceiptEmailThread(_root, variables) { - const id = `EmailThreadRead:${variables.emailThreadId}` - const receipt = new Date().toUTCString() - localStorage.setItem(await getKey(id), receipt) - cache.modify({ - id: cache.identify({ - __typename: 'EmailThreadType', - id: variables.emailThreadId, - }), - fields: { - readReceipt: () => receipt, - }, - }) - return { - __typename: 'EmailThreadReceipt', - emailThreadId: variables.emailThreadId, - readReceipt: receipt, - } - }, - - async resetReadReceiptEmailThread(_root, variables) { - const id = `EmailThreadRead:${variables.emailThreadId}` - localStorage.removeItem(await getKey(id)) - cache.modify({ - id: cache.identify({ - __typename: 'EmailThreadType', - id: variables.emailThreadId, - }), - fields: { - readReceipt: () => null, - }, - }) + async setEmailDraft(_root, variables) { + const key = await getKey( + `EmailDrafts:${variables.emailDraft.teamId}`, + getKeyContext(variables.emailDraft.instructor) + ) + const item = localStorage.getItem(key) + const drafts = JSON.parse(item || '[]') as EmailDraftType[] + const existingDraftIndex = drafts.findIndex( + draft => + draft.teamId === variables.emailDraft.teamId && + ((!draft.emailThreadId && !variables.emailDraft.emailThreadId) || + draft.emailThreadId === variables.emailDraft.emailThreadId) && + draft.instructor === variables.emailDraft.instructor + ) + localStorage.setItem( + key, + JSON.stringify( + existingDraftIndex === -1 + ? [...drafts, variables.emailDraft] + : [ + ...drafts.slice(0, existingDraftIndex), + variables.emailDraft, + ...drafts.slice(existingDraftIndex + 1), + ] + ) + ) return { - __typename: 'EmailThreadReceipt', - emailThreadId: variables.emailThreadId, - readReceipt: null, + __typename: 'EmailDraftType', + ...variables.emailDraft, } }, - async writeEmailDraft(_root, variables) { - const id = getEmailThreadDraftId( - variables.emailDraft.teamId, - variables.emailDraft.emailThreadId + async deleteEmailDraft(_root, variables) { + const key = await getKey( + `EmailDrafts:${variables.teamId}`, + getKeyContext(variables.instructor) ) - const emailDraft = variables.emailDraft - localStorage.setItem( - await getKey(id, getKeyContext(variables.emailDraft.instructor)), - JSON.stringify(emailDraft) + const item = localStorage.getItem(key) + const drafts = JSON.parse(item || '[]') as EmailDraftType[] + const existingDraftIndex = drafts.findIndex( + draft => + draft.teamId === variables.teamId && + ((!draft.emailThreadId && !variables.emailThreadId) || + draft.emailThreadId === variables.emailThreadId) && + draft.instructor === variables.instructor ) - return { - __typename: 'EmailDraftType', - ...emailDraft, + if (existingDraftIndex === -1) { + return { operationDone: false } } + localStorage.setItem( + key, + JSON.stringify([ + ...drafts.slice(0, existingDraftIndex), + ...drafts.slice(existingDraftIndex + 1), + ]) + ) + return { operationDone: true } }, - async writeReadReceiptChannel(_root, variables) { - const id = `ChannelRead:${variables.channelId}` - const receipt = new Date().toUTCString() - const key = await getKey(id) - const readReceipt: Modifier< - Reference | Readonly<ChannelReadReceipt[]> - > = x => { - const res = [ - ...(x as ChannelReadReceipt[]).filter( - y => y?.teamId !== variables.teamId - ), - { teamId: variables.teamId, readReceipt: receipt }, - ] - localStorage.setItem(key, JSON.stringify(res)) - return res + async setIsUnreadEmailThread(_root, variables, context) { + const key = await getKey(`IsUnreadEmailThread:${variables.threadId}`) + const item = localStorage.getItem(key) + const readReceipts = JSON.parse(item || '[]') as IsUnreadType[] + const existingReadReceiptIndex = readReceipts.findIndex( + readReceipt => readReceipt.teamId === variables.teamId + ) + + if ( + existingReadReceiptIndex !== -1 && + readReceipts[existingReadReceiptIndex].isUnread === variables.isUnread + ) { + return { operationDone: false } } + + const newReadReceipts = + existingReadReceiptIndex === -1 + ? [ + ...readReceipts, + { teamId: variables.teamId, isUnread: variables.isUnread }, + ] + : [ + ...readReceipts.slice(0, existingReadReceiptIndex), + { teamId: variables.teamId, isUnread: variables.isUnread }, + ...readReceipts.slice(existingReadReceiptIndex + 1), + ] + localStorage.setItem(key, JSON.stringify(newReadReceipts)) + + const client = context.client as ApolloClient<Cache> + const cache = client.cache cache.modify({ id: cache.identify({ - __typename: 'DefinitionChannelType', - id: variables.channelId, + __typename: 'EmailThreadType', + id: variables.threadId, }), fields: { - readReceipt, + readReceipt: () => newReadReceipts, }, }) - return { - __typename: 'ChannelReceipt', - channelId: variables.channelId, - teamId: variables.teamId, - readReceipt: receipt, - } + + return { operationDone: true } }, - async resetReadReceiptChannel(_root, variables) { - const id = `ChannelRead:${variables.channelId}` - const key = await getKey(id) - const readReceipt: Modifier< - Reference | Readonly<ChannelReadReceipt[]> - > = x => { - const res = [ - ...(x as ChannelReadReceipt[]).filter( - y => y?.teamId !== variables.teamId - ), - { teamId: variables.teamId, readReceipt: null }, - ] - localStorage.setItem(key, JSON.stringify(res)) - return res + async setIsUnreadChannel(_root, variables, context) { + const key = await getKey(`IsUnreadChannel:${variables.channelId}`) + const item = localStorage.getItem(key) + const readReceipts = JSON.parse(item || '[]') as IsUnreadType[] + const existingReadReceiptIndex = readReceipts.findIndex( + readReceipt => readReceipt.teamId === variables.teamId + ) + + if ( + existingReadReceiptIndex !== -1 && + readReceipts[existingReadReceiptIndex].isUnread === variables.isUnread + ) { + return { operationDone: false } } + + const newReadReceipts = + existingReadReceiptIndex === -1 + ? [ + ...readReceipts, + { teamId: variables.teamId, isUnread: variables.isUnread }, + ] + : [ + ...readReceipts.slice(0, existingReadReceiptIndex), + { teamId: variables.teamId, isUnread: variables.isUnread }, + ...readReceipts.slice(existingReadReceiptIndex + 1), + ] + localStorage.setItem(key, JSON.stringify(newReadReceipts)) + + const client = context.client as ApolloClient<Cache> + const cache = client.cache cache.modify({ id: cache.identify({ __typename: 'DefinitionChannelType', id: variables.channelId, }), fields: { - readReceipt, + readReceipt: () => newReadReceipts, }, }) - return { - __typename: 'ChannelReceipt', - channelId: variables.channelId, - teamId: variables.teamId, - readReceipt: null, - } + + return { operationDone: true } }, }, } diff --git a/graphql/client/sanitize.ts b/graphql/client/sanitize.ts new file mode 100644 index 0000000000000000000000000000000000000000..45a200984d988954b2b9a5a5c42ae15b8cab8c8b --- /dev/null +++ b/graphql/client/sanitize.ts @@ -0,0 +1,106 @@ +import sanitizeHtml from 'sanitize-html' + +export const sanitizeHtmlCustom = (data: string, baseURI?: string) => + sanitizeHtml(data, { + // allows specific tags + allowedTags: [ + 'address', + 'article', + 'aside', + 'footer', + 'header', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', + 'hgroup', + 'main', + 'nav', + 'section', + 'blockquote', + 'dd', + 'div', + 'dl', + 'dt', + 'figcaption', + 'figure', + 'hr', + 'li', + 'main', + 'ol', + 'p', + 'pre', + 'ul', + 'a', + 'abbr', + 'b', + 'bdi', + 'bdo', + 'br', + 'cite', + 'code', + 'data', + 'dfn', + 'em', + 'i', + 'kbd', + 'mark', + 'q', + 'rb', + 'rp', + 'rt', + 'rtc', + 'ruby', + 's', + 'samp', + 'small', + 'span', + 'strong', + 'sub', + 'sup', + 'time', + 'u', + 'var', + 'wbr', + 'caption', + 'col', + 'colgroup', + 'table', + 'tbody', + 'td', + 'tfoot', + 'th', + 'thead', + 'tr', + 'video', + 'img', + ], + // specific filters, they're exclusive, if true then remove the tag + exclusiveFilter(frame) { + // remove images and videos that point to external domains + if (frame.tag === 'video' || frame.tag === 'img') { + const url = ( + frame.attribs as unknown as HTMLImageElement & HTMLVideoElement + )['src'] + + // source: https://stackoverflow.com/a/57047786 + + const local = new URL(baseURI ?? document.baseURI) + const remote = new URL(url, baseURI ?? document.baseURI) + const isNotRelative = + local.origin !== local.origin || local.hostname !== remote.hostname + if (isNotRelative) { + console.error( + 'A rendered img/video tag contains an external url in enclosed HTML code:', + data + ) + } + return isNotRelative + } + + // if other specific parameters won't pass, + return false + }, + }) diff --git a/graphql/components/Manager/actionLogComponents/EmailService.tsx b/graphql/components/Manager/actionLogComponents/EmailService.tsx index d3288253cc4af9e34936350286b9a8c5daca895a..cda2fc3218948f80e79fea9c87b40e6a0bfaf3bf 100644 --- a/graphql/components/Manager/actionLogComponents/EmailService.tsx +++ b/graphql/components/Manager/actionLogComponents/EmailService.tsx @@ -4,10 +4,14 @@ import useEmailThreadSubscription from '../../../utils/useEmailThreadSubscriptio interface SubscriptionServiceProps { teamId: string + selectedThreadId?: string } -const EmailService: FC<SubscriptionServiceProps> = ({ teamId }) => { - const { networkStatus } = useEmailThreadSubscription(teamId) +const EmailService: FC<SubscriptionServiceProps> = ({ + teamId, + selectedThreadId, +}) => { + const { networkStatus } = useEmailThreadSubscription(teamId, selectedThreadId) return ( <div style={{ diff --git a/graphql/components/Manager/actionLogComponents/TeamInjectService.tsx b/graphql/components/Manager/actionLogComponents/TeamInjectService.tsx deleted file mode 100644 index 2a4d1903c2d618652c037edb8d3e2b6030d70bdf..0000000000000000000000000000000000000000 --- a/graphql/components/Manager/actionLogComponents/TeamInjectService.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { FC } from 'react' -import { memo } from 'react' -import useTeamInjectSelectionsSubscription from '../../../utils/useTeamInjectSelectionsSubscription' - -interface TeamInjectServiceProps { - teamId: string -} - -const TeamInjectService: FC<TeamInjectServiceProps> = ({ teamId }) => { - const { networkStatus } = useTeamInjectSelectionsSubscription(teamId) - return ( - <div - style={{ - visibility: 'hidden', - }} - > - {networkStatus} - {teamId} - </div> - ) -} - -export default memo(TeamInjectService) diff --git a/graphql/components/Manager/index.tsx b/graphql/components/Manager/index.tsx index 44522edac5bdc006579df6933303bc61b6c6d5d1..766925c57e17c0077229c797f938f9a835960ce1 100644 --- a/graphql/components/Manager/index.tsx +++ b/graphql/components/Manager/index.tsx @@ -5,26 +5,25 @@ import { useSubscriptionContext } from '../../context/SubscriptionContext' import type { ActionLog } from '../../fragments/ActionLog.generated' import EmailService from './actionLogComponents/EmailService' import SubscriptionService from './actionLogComponents/SubscriptionService' -import TeamInjectService from './actionLogComponents/TeamInjectService' import TeamMilestonesService from './actionLogComponents/TeamMilestonesService' interface ManagerProps { getPopup?: (actionLog: ActionLog) => ReactNode + selectedThreadId?: string } -const Manager: FC<ManagerProps> = ({ getPopup }) => { +const Manager: FC<ManagerProps> = ({ getPopup, selectedThreadId }) => { const { teamIds, instructorContext } = useSubscriptionContext() const subscribed = useMemo( () => teamIds.map(id => ( <div key={id}> <SubscriptionService teamId={id} getPopup={getPopup} /> - <EmailService teamId={id} /> - {instructorContext && <TeamInjectService teamId={id} />} + <EmailService teamId={id} selectedThreadId={selectedThreadId} /> {instructorContext && <TeamMilestonesService teamId={id} />} </div> )), - [teamIds, getPopup, instructorContext] + [teamIds, getPopup, selectedThreadId, instructorContext] ) return ( diff --git a/graphql/components/Reloader/index.tsx b/graphql/components/Reloader/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..395ab7f7db69d4e8da5c107a8613f975462c50ff --- /dev/null +++ b/graphql/components/Reloader/index.tsx @@ -0,0 +1,69 @@ +import type { RefetchQueriesInclude } from '@apollo/client' +import { Button } from '@blueprintjs/core' +import useApolloClient from '@inject/graphql/client/useApolloClient' +import { useCountDown } from 'ahooks' +import type { FC } from 'react' +import { useCallback, useState } from 'react' + +const POLLING_INTERVAL = 20000 + +type ReloaderProps = { + minimal?: boolean + fill?: boolean + withLabel?: boolean +} & ( + | { queries?: never; onRefetch: () => void } + | { queries: RefetchQueriesInclude; onRefetch?: never } +) + +const Reloader: FC<ReloaderProps> = ({ + queries, + minimal, + fill, + withLabel, + onRefetch, +}) => { + const [targetDate, setTargetDate] = useState(Date.now() + POLLING_INTERVAL) + + const client = useApolloClient() + const handleRefetch = useCallback(() => { + setTargetDate(Date.now() + POLLING_INTERVAL) + if (onRefetch) { + onRefetch() + } else { + client.refetchQueries({ include: queries }) + } + }, [client, onRefetch, queries]) + + const [, { seconds }] = useCountDown({ + targetDate, + onEnd: handleRefetch, + }) + + return ( + <Button + style={{ flex: 'unset' }} + rightIcon={withLabel ? undefined : 'refresh'} + icon={withLabel ? 'refresh' : undefined} + title='Reload' + onClick={handleRefetch} + minimal={minimal} + fill={fill} + text={withLabel ? `Reload (${seconds + 1}s)` : undefined} + > + {!withLabel && ( + <span + style={{ + minWidth: '3ch', + display: 'inline-block', + textAlign: 'center', + }} + > + {`${seconds + 1}s`} + </span> + )} + </Button> + ) +} + +export default Reloader diff --git a/graphql/connection/index.tsx b/graphql/connection/index.tsx index 9c9b655d465a52bf4c920b1b7028e4c2870e8bc8..0d013e8111489219ad2eabb1fc983e0950651100 100644 --- a/graphql/connection/index.tsx +++ b/graphql/connection/index.tsx @@ -7,7 +7,7 @@ import { InputGroup, Spinner, } from '@blueprintjs/core' -import { httpGraphql, wsGraphql } from '@inject/shared/config' +import { httpHello, wsGraphql } from '@inject/shared/config' import type { FC, ReactNode } from 'react' import { useEffect, useState } from 'react' import { host, useHost } from './host' @@ -77,7 +77,7 @@ const QuestionDialog: FC<QuestionDialogInterface> = ({ /> </FormGroup> )} - <Button fill type='submit'> + <Button fill type='submit' intent='primary'> Reconnect </Button> </form> @@ -86,7 +86,13 @@ const QuestionDialog: FC<QuestionDialogInterface> = ({ return ( <Dialog - title='Connection Error' + style={{ + margin: 0, + maxWidth: '90vw', + maxHeight: '90vh', + }} + title='Connection error' + icon='error' isOpen={open} onClose={() => setOpen(false)} canOutsideClickClose={false} @@ -161,7 +167,7 @@ const Connection: FC<ConnectionProps> = ({ if (!hostVar) { host(host_) } - fetch(httpGraphql(hostVar || host_), { + fetch(httpHello(hostVar || host_), { credentials: 'include', method: 'GET', }) diff --git a/graphql/custom/useGetVisibleActionLogs.ts b/graphql/custom/useGetVisibleActionLogs.ts deleted file mode 100644 index fa82a837099baf8832f51ab6323fb2061327af8d..0000000000000000000000000000000000000000 --- a/graphql/custom/useGetVisibleActionLogs.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ActionLog } from '../fragments/ActionLog.generated' -import { useGetTeamActionLogs } from '../queries/GetTeamActionLogs.generated' - -const useGetChannelLogs = ( - channelId: string, - ...params: Parameters<typeof useGetTeamActionLogs> -) => { - const query = useGetTeamActionLogs(...params) - - const { data } = query - - return { - ...query, - data: { - ...data, - actionLogs: data?.actionLogs?.filter( - actionLog => actionLog && actionLog.channel.id === channelId - ) as ActionLog[], - }, - } -} - -export default useGetChannelLogs diff --git a/graphql/fragments/ActionLog.generated.ts b/graphql/fragments/ActionLog.generated.ts index 384778bf16742b0fbb6621b7b95415686998e851..35dd5f5396a08dfc7764b4420d2301b3fae0e3b7 100644 --- a/graphql/fragments/ActionLog.generated.ts +++ b/graphql/fragments/ActionLog.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type ActionLog = { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } }; +export type ActionLog = { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } }; -export const ActionLog = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const ActionLog = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Channel.generated.ts b/graphql/fragments/Channel.generated.ts index 819e727e6aa747cb7c837355e392dc70b3d8429f..2465569cec304e49bf7a9caa3ed3aa249f269f14 100644 --- a/graphql/fragments/Channel.generated.ts +++ b/graphql/fragments/Channel.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type Channel = { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }; +export type Channel = { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }; -export const Channel = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Channel = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/CustomInjectDetails.generated.ts b/graphql/fragments/CustomInjectDetails.generated.ts index 7ae739076964ef928e07401ee27c3ac0912588dd..e2e77648d6c762f44f074aad565d2674f2b168d0 100644 --- a/graphql/fragments/CustomInjectDetails.generated.ts +++ b/graphql/fragments/CustomInjectDetails.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type CustomInjectDetails = { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }; +export type CustomInjectDetails = { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }; -export const CustomInjectDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const CustomInjectDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Definition.generated.ts b/graphql/fragments/Definition.generated.ts index 32c1f03d29b0228a7667a4b327ab04c1e25a4a92..10b1f2f6abb11760fdb98b178c6ebba96f8f98e3 100644 --- a/graphql/fragments/Definition.generated.ts +++ b/graphql/fragments/Definition.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type Definition = { id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string } | null> | null }; +export type Definition = { id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }; -export const Definition = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Definition = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Email.generated.ts b/graphql/fragments/Email.generated.ts index aee728879a515d22d01a8a1ae2e8386f76779adb..cfd30d2b19f8916bf2402ead7e69bf238039c284 100644 --- a/graphql/fragments/Email.generated.ts +++ b/graphql/fragments/Email.generated.ts @@ -5,4 +5,4 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; export type Email = { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }; -export const Email = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Email = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/EmailDetails.generated.ts b/graphql/fragments/EmailDetails.generated.ts index 1f6c44ee5c9133e88c750df69ebf154e4b74dd39..3479d2ca27899f688fded654798cbd47b6628452 100644 --- a/graphql/fragments/EmailDetails.generated.ts +++ b/graphql/fragments/EmailDetails.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type EmailDetails = { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }; +export type EmailDetails = { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }; -export const EmailDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const EmailDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/EmailThread.generated.ts b/graphql/fragments/EmailThread.generated.ts index 71afefcdf4260de5fa79343b193d4a09867b1139..7896d4ada4925efa9ffad69f057f71d036b241b4 100644 --- a/graphql/fragments/EmailThread.generated.ts +++ b/graphql/fragments/EmailThread.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type EmailThread = { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }; +export type EmailThread = { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }; -export const EmailThread = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const EmailThread = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Exercise.generated.ts b/graphql/fragments/Exercise.generated.ts index a2f8809c35974ce04985144db0770631bfb5c786..118354108dad965d0bdaa75348dc1fef37ff9e00 100644 --- a/graphql/fragments/Exercise.generated.ts +++ b/graphql/fragments/Exercise.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type Exercise = { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null }; +export type Exercise = { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }; -export const Exercise = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Exercise = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/ExtendedTool.generated.ts b/graphql/fragments/ExtendedTool.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..bd65f39eeb1c03ec3a38fb642d597a5ba3ccf76d --- /dev/null +++ b/graphql/fragments/ExtendedTool.generated.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +export type ExtendedTool = { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }; + +export const ExtendedTool = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/ExtendedToolType.generated.ts b/graphql/fragments/ExtendedToolType.generated.ts index b291d20fde67a96c4ae05e829c17af4da6fe2d96..bd65f39eeb1c03ec3a38fb642d597a5ba3ccf76d 100644 --- a/graphql/fragments/ExtendedToolType.generated.ts +++ b/graphql/fragments/ExtendedToolType.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type ExtendedTool = { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }; +export type ExtendedTool = { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }; -export const ExtendedTool = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const ExtendedTool = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Group.generated.ts b/graphql/fragments/Group.generated.ts deleted file mode 100644 index ad34e5d19f2594c923f50b01db05d5851a8ebcc4..0000000000000000000000000000000000000000 --- a/graphql/fragments/Group.generated.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -export type Group = { id: string, name: string }; - -export const Group = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Group"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GroupType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/InjectOption.generated.ts b/graphql/fragments/InjectOption.generated.ts deleted file mode 100644 index 158a945c8a850bb438bf21ec67fa2eed7118d22a..0000000000000000000000000000000000000000 --- a/graphql/fragments/InjectOption.generated.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -export type InjectOption = { id: string, sender: string, name: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }; - -export const InjectOption = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectOption"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectOptionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/InjectSelections.generated.ts b/graphql/fragments/InjectSelections.generated.ts deleted file mode 100644 index 06f9bac4328452ab005589ac00c3a3e6db06977e..0000000000000000000000000000000000000000 --- a/graphql/fragments/InjectSelections.generated.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -export type InjectSelection = { id: string, name: string, timestamp: string | null, submitted: string | null, team: { id: string }, options: Array<{ id: string, sender: string, name: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }> }; - -export const InjectSelection = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectSelection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectSelectionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectOption"}}]}},{"kind":"Field","name":{"kind":"Name","value":"submitted"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectOption"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectOptionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Question.generated.ts b/graphql/fragments/Question.generated.ts index 768c0c63c7e1e79269f0351a928c000b89e19b03..1073ac638a963c22af5be4be7c30df35be4d8c28 100644 --- a/graphql/fragments/Question.generated.ts +++ b/graphql/fragments/Question.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type Question = { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }; +export type Question = { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }; -export const Question = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Question = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/QuestionnaireAnswer.generated.ts b/graphql/fragments/QuestionnaireAnswer.generated.ts index ff8b223202b759d6c30bf374899d21a27b1abc61..721378869c498e73158e111fa8916092d288de3d 100644 --- a/graphql/fragments/QuestionnaireAnswer.generated.ts +++ b/graphql/fragments/QuestionnaireAnswer.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type QuestionnaireAnswer = { id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }; +export type QuestionnaireAnswer = { id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }; -export const QuestionnaireAnswer = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const QuestionnaireAnswer = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/QuestionnaireDetails.generated.ts b/graphql/fragments/QuestionnaireDetails.generated.ts index 78bd227a10f0cd1ef76c487e5fb55e7d14d7ceed..13975837aa63804e8378313f3b133a8f12c0ae95 100644 --- a/graphql/fragments/QuestionnaireDetails.generated.ts +++ b/graphql/fragments/QuestionnaireDetails.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type QuestionnaireDetails = { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> }; +export type QuestionnaireDetails = { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> }; -export const QuestionnaireDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const QuestionnaireDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/RestrictedExercise.generated.ts b/graphql/fragments/RestrictedExercise.generated.ts index c697c07d44a1f8d740e1475f8651f1b97c0bd565..a142927848382eb4402383b169d0c571c6a8f426 100644 --- a/graphql/fragments/RestrictedExercise.generated.ts +++ b/graphql/fragments/RestrictedExercise.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type RestrictedExercise = { id: string | null }; +export type RestrictedExercise = { id: string, name: string }; -export const RestrictedExercise = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const RestrictedExercise = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/RestrictedTeam.generated.ts b/graphql/fragments/RestrictedTeam.generated.ts index 4660cb43d667cca67e40d5eac49e7d53cdb3a8d7..50d6e6268e2259d316a91d267b5c6b2a8dabfb8c 100644 --- a/graphql/fragments/RestrictedTeam.generated.ts +++ b/graphql/fragments/RestrictedTeam.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type RestrictedTeam = { id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } }; +export type RestrictedTeam = { id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } }; -export const RestrictedTeam = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const RestrictedTeam = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/RestrictedUser.generated.ts b/graphql/fragments/RestrictedUser.generated.ts index 6720434d8697a2cc2940f8b42b940aff599da363..62d5833b60cbd8a566d16635df13c25905f7656b 100644 --- a/graphql/fragments/RestrictedUser.generated.ts +++ b/graphql/fragments/RestrictedUser.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type RestrictedUser = { id: any, username: string }; +export type RestrictedUser = { id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null }; -export const RestrictedUser = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const RestrictedUser = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/Team.generated.ts b/graphql/fragments/Team.generated.ts index 22354deb660b293183056a17878bf8b53c7368a0..219c941354b28fa4bbd902683a12b30cd7a572bd 100644 --- a/graphql/fragments/Team.generated.ts +++ b/graphql/fragments/Team.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type Team = { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }; +export type Team = { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }; -export const Team = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const Team = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/TeamQuestionnaireState.generated.ts b/graphql/fragments/TeamQuestionnaireState.generated.ts index 1704951a13bd6bca344680045a28eb366a4e1b18..785b044ea51bd501cfaef38cdf173d9c0bff155f 100644 --- a/graphql/fragments/TeamQuestionnaireState.generated.ts +++ b/graphql/fragments/TeamQuestionnaireState.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type TeamQuestionnaireState = { id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }; +export type TeamQuestionnaireState = { id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }; -export const TeamQuestionnaireState = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const TeamQuestionnaireState = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/ToolDetails.generated.ts b/graphql/fragments/ToolDetails.generated.ts index 696d5b0ca65b7d6b029f4a96f4d821f5364e6685..173ac8508eccac96e0043c262bf50941531b9829 100644 --- a/graphql/fragments/ToolDetails.generated.ts +++ b/graphql/fragments/ToolDetails.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type ToolDetails = { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }; +export type ToolDetails = { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }; -export const ToolDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const ToolDetails = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/ToolResponse.generated.ts b/graphql/fragments/ToolResponse.generated.ts deleted file mode 100644 index 1ebbfb1b32d336f68644ecc063d34c2dbf611933..0000000000000000000000000000000000000000 --- a/graphql/fragments/ToolResponse.generated.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -export type ToolResponse = { id: string, param: string }; - -export const ToolResponse = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/User.generated.ts b/graphql/fragments/User.generated.ts index 5592c14f7f1b9c9a05464f44e9b078964d0ef6d9..908412ac129b13c9ad5b3bca61e4ca0da4f01065 100644 --- a/graphql/fragments/User.generated.ts +++ b/graphql/fragments/User.generated.ts @@ -3,6 +3,6 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; -export type User = { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null }; +export type User = { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null }; -export const User = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const User = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/graphql.schema.json b/graphql/graphql.schema.json index 4b6444912788a108e7dcf15e4d94c4c7d522cc88..bf78fd9f3edae3be93cd51b475eb85a5ede290a8 100644 --- a/graphql/graphql.schema.json +++ b/graphql/graphql.schema.json @@ -373,6 +373,52 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "AssignUsersByTags", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "AssignUsersEqually", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "AssignUsersToTeamMutation", @@ -396,6 +442,35 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "AuthGroup", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ADMIN", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INSTRUCTOR", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TRAINEE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "SCALAR", "name": "Boolean", @@ -451,8 +526,8 @@ "name": "group", "description": null, "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "AuthGroup", "ofType": null }, "defaultValue": null, @@ -482,23 +557,35 @@ }, { "kind": "OBJECT", - "name": "ChannelReadReceipt", + "name": "ChangeUserType", "description": null, "fields": [ { - "name": "readReceipt", + "name": "active", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamId", + "name": "group", + "description": null, + "args": [], + "type": { + "kind": "ENUM", + "name": "AuthGroup", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userId", "description": null, "args": [], "type": { @@ -506,7 +593,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "UUID", "ofType": null } }, @@ -929,6 +1016,29 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "CopyUsersAssignment", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CreateExerciseInput", @@ -1088,17 +1198,21 @@ }, { "kind": "OBJECT", - "name": "CreateThreadMutation", + "name": "CreateTagMutation", "description": null, "fields": [ { - "name": "thread", + "name": "newTag", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "EmailThreadType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TagType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -1111,48 +1225,16 @@ }, { "kind": "OBJECT", - "name": "CustomInjectDetailsType", + "name": "CreateThreadMutation", "description": null, "fields": [ { - "name": "content", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ContentType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user", + "name": "thread", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "RestrictedUser", + "name": "EmailThreadType", "ofType": null }, "isDeprecated": false, @@ -1165,72 +1247,66 @@ "possibleTypes": null }, { - "kind": "SCALAR", - "name": "DateTime", - "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "DefinitionChannelType", + "kind": "INPUT_OBJECT", + "name": "CreateUserInput", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "definition", + "name": "email", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "DefinitionType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "firstName", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "group", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "AuthGroup", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "readReceipt", + "name": "lastName", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"\"", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -1241,26 +1317,37 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ChannelReadReceipt", + "kind": "SCALAR", + "name": "String", "ofType": null } } } }, + "defaultValue": "[]", "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateUserMutation", + "description": null, + "fields": [ { - "name": "type", + "name": "newUser", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "ChannelType", + "kind": "OBJECT", + "name": "RestrictedUser", "ofType": null } }, @@ -1275,11 +1362,11 @@ }, { "kind": "OBJECT", - "name": "DefinitionInjectType", + "name": "CreateUserType", "description": null, "fields": [ { - "name": "auto", + "name": "email", "description": null, "args": [], "type": { @@ -1287,7 +1374,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null } }, @@ -1295,96 +1382,60 @@ "deprecationReason": null }, { - "name": "delay", + "name": "firstName", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "organization", + "name": "group", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "ENUM", + "name": "AuthGroup", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "time", + "name": "lastName", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "type", + "name": "tags", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "ENUM", - "name": "InjectType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } } }, "isDeprecated": false, @@ -1398,11 +1449,11 @@ }, { "kind": "OBJECT", - "name": "DefinitionRoleType", + "name": "CustomInjectDetailsType", "description": null, "fields": [ { - "name": "definition", + "name": "content", "description": null, "args": [], "type": { @@ -1410,7 +1461,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "DefinitionType", + "name": "ContentType", "ofType": null } }, @@ -1434,17 +1485,25 @@ "deprecationReason": null }, { - "name": "name", + "name": "overlay", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "OverlayType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "RestrictedUser", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -1456,86 +1515,70 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "DefinitionType", + "kind": "INPUT_OBJECT", + "name": "CustomInjectInput", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "addresses", + "name": "content", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailAddressType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "channels", + "name": "exerciseId", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionChannelType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "exercises", + "name": "fileId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ExerciseType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "UUID", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "files", + "name": "overlay", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "OverlayInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamIds", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -1543,21 +1586,28 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "FileInfoType", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CustomInjectType", + "description": null, + "fields": [ { - "name": "id", + "name": "content", "description": null, "args": [], "type": { @@ -1565,7 +1615,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -1573,71 +1623,47 @@ "deprecationReason": null }, { - "name": "injects", + "name": "exerciseId", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionInjectType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "learningObjectives", + "name": "fileId", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LearningObjectiveType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "UUID", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "overlay", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "OverlayType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "questionnaires", + "name": "teamIds", "description": null, "args": [], "type": { @@ -1647,77 +1673,78 @@ "kind": "LIST", "name": null, "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionnaireType", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "DateTime", + "description": "The `DateTime` scalar type represents a DateTime\nvalue as specified by\n[iso8601](https://en.wikipedia.org/wiki/ISO_8601).", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DefinitionChannelType", + "description": null, + "fields": [ { - "name": "roles", + "name": "definition", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionRoleType", - "ofType": null - } - } + "kind": "OBJECT", + "name": "DefinitionType", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "tools", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ToolType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "userSet", + "name": "name", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "RestrictedUser", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -1725,40 +1752,41 @@ "deprecationReason": null }, { - "name": "version", + "name": "readReceipt", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "IsUnreadType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "DeleteDefinitionMutation", - "description": null, - "fields": [ + }, { - "name": "operationDone", + "name": "type", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "ChannelType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -1771,34 +1799,27 @@ }, { "kind": "OBJECT", - "name": "DeleteExerciseMutation", + "name": "DefinitionInjectType", "description": null, "fields": [ { - "name": "operationDone", + "name": "delay", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EmailAddressType", - "description": null, - "fields": [ + }, { - "name": "address", + "name": "id", "description": null, "args": [], "type": { @@ -1806,7 +1827,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -1814,15 +1835,15 @@ "deprecationReason": null }, { - "name": "control", + "name": "name", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ControlType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -1830,19 +1851,23 @@ "deprecationReason": null }, { - "name": "definition", + "name": "organization", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "ExerciseDefinitionType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "description", + "name": "time", "description": null, "args": [], "type": { @@ -1850,7 +1875,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null } }, @@ -1858,31 +1883,42 @@ "deprecationReason": null }, { - "name": "id", + "name": "type", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "ENUM", + "name": "InjectType", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DefinitionRoleType", + "description": null, + "fields": [ { - "name": "organization", + "name": "definition", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "DefinitionType", "ofType": null } }, @@ -1890,7 +1926,7 @@ "deprecationReason": null }, { - "name": "teamVisible", + "name": "id", "description": null, "args": [], "type": { @@ -1898,7 +1934,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "ID", "ofType": null } }, @@ -1906,24 +1942,16 @@ "deprecationReason": null }, { - "name": "templates", + "name": "name", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailTemplateType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, @@ -1936,130 +1964,174 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "EmailDraftInput", + "kind": "OBJECT", + "name": "DefinitionType", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "activateMilestone", + "name": "addresses", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EmailAddressType", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "content", + "name": "channels", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deactivateMilestone", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "emailThreadId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DefinitionChannelType", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "fileId", + "name": "exercises", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "UUID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExerciseType", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "instructor", + "name": "files", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "FileInfoType", + "ofType": null + } + } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "selectedContacts", + "name": "id", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "senderAddress", + "name": "injects", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DefinitionInjectType", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "subject", + "name": "learningObjectives", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LearningObjectiveType", + "ofType": null + } + } + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamId", + "name": "name", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2069,102 +2141,91 @@ "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "templateId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EmailDraftType", - "description": null, - "fields": [ - { - "name": "activateMilestone", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "content", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { - "name": "deactivateMilestone", + "name": "questionnaires", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "QuestionnaireType", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "emailThreadId", + "name": "roles", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DefinitionRoleType", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "fileId", + "name": "tools", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "UUID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ToolType", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "instructor", + "name": "userSet", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "RestrictedUser", "ofType": null } }, @@ -2172,11 +2233,11 @@ "deprecationReason": null }, { - "name": "selectedContacts", + "name": "version", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", @@ -2186,33 +2247,66 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "senderAddress", - "description": null, - "args": [], - "type": { + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteDefinitionMutation", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteExerciseMutation", + "description": null, + "fields": [ { - "name": "subject", + "name": "operationDone", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteTagsMutation", + "description": null, + "fields": [ { - "name": "teamId", + "name": "operationDone", "description": null, "args": [], "type": { @@ -2220,20 +2314,31 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteUsersMutation", + "description": null, + "fields": [ { - "name": "templateId", + "name": "operationDone", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, "isDeprecated": false, @@ -2247,7 +2352,7 @@ }, { "kind": "OBJECT", - "name": "EmailParticipantType", + "name": "EmailAddressType", "description": null, "fields": [ { @@ -2267,51 +2372,59 @@ "deprecationReason": null }, { - "name": "definitionAddress", + "name": "control", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ControlType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "definition", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "EmailAddressType", + "name": "ExerciseDefinitionType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "emails", + "name": "description", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exercise", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ExerciseType", + "kind": "SCALAR", + "name": "ID", "ofType": null } }, @@ -2319,7 +2432,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "organization", "description": null, "args": [], "type": { @@ -2327,7 +2440,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -2335,19 +2448,23 @@ "deprecationReason": null }, { - "name": "team", + "name": "teamVisible", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "TeamType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "threads", + "name": "templates", "description": null, "args": [], "type": { @@ -2361,7 +2478,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EmailThreadType", + "name": "EmailTemplateType", "ofType": null } } @@ -2377,297 +2494,264 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "EmailReceipt", + "kind": "INPUT_OBJECT", + "name": "EmailDraftInput", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "emailId", + "name": "activateMilestone", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "readReceipt", + "name": "content", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EmailTemplateType", - "description": null, - "fields": [ + }, { - "name": "content", + "name": "deactivateMilestone", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ContentType", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "context", + "name": "emailThreadId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "control", + "name": "fileId", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ControlType", - "ofType": null - } + "kind": "SCALAR", + "name": "UUID", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "instructor", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Boolean", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "sender", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EmailThreadReceipt", - "description": null, - "fields": [ - { - "name": "emailThreadId", + "name": "selectedContacts", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "readReceipt", + "name": "senderAddress", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "subject", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "templateId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "EmailThreadSubscription", + "name": "EmailDraftType", "description": null, "fields": [ { - "name": "emailThread", + "name": "activateMilestone", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "EmailThreadType", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "EmailThreadType", - "description": null, - "fields": [ + }, { - "name": "emails", + "name": "content", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exercise", + "name": "deactivateMilestone", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ExerciseType", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "emailThreadId", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "lastEmail", + "name": "fileId", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "EmailType", + "kind": "SCALAR", + "name": "UUID", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "participants", + "name": "instructor", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailParticipantType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "readReceipt", + "name": "selectedContacts", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "senderAddress", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -2677,6 +2761,18 @@ "name": "subject", "description": null, "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -2690,17 +2786,13 @@ "deprecationReason": null }, { - "name": "timestamp", + "name": "templateId", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -2713,27 +2805,11 @@ }, { "kind": "OBJECT", - "name": "EmailType", + "name": "EmailParticipantType", "description": null, "fields": [ { - "name": "content", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ContentType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", + "name": "address", "description": null, "args": [], "type": { @@ -2741,7 +2817,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -2749,47 +2825,43 @@ "deprecationReason": null }, { - "name": "overlay", + "name": "definitionAddress", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "OverlayType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "readReceipt", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", + "name": "EmailAddressType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "sender", + "name": "emails", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "EmailParticipantType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EmailType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "thread", + "name": "exercise", "description": null, "args": [], "type": { @@ -2797,7 +2869,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EmailThreadType", + "name": "ExerciseType", "ofType": null } }, @@ -2805,7 +2877,7 @@ "deprecationReason": null }, { - "name": "timestamp", + "name": "id", "description": null, "args": [], "type": { @@ -2813,7 +2885,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "DateTime", + "name": "ID", "ofType": null } }, @@ -2821,48 +2893,37 @@ "deprecationReason": null }, { - "name": "user", + "name": "team", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "RestrictedUser", + "name": "TeamType", "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ExerciseDefinitionType", - "description": null, - "fields": [ + }, { - "name": "id", + "name": "threads", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EmailThreadType", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null @@ -2874,46 +2935,33 @@ "possibleTypes": null }, { - "kind": "ENUM", - "name": "ExerciseEventTypeEnum", - "description": "An enumeration.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "CREATE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, + "kind": "OBJECT", + "name": "EmailReceipt", + "description": null, + "fields": [ { - "name": "DELETE", + "name": "emailId", "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "MODIFY", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ExerciseLoopRunningSubscription", - "description": null, - "fields": [ - { - "name": "exerciseLoopRunning", + "name": "readReceipt", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "Boolean", + "name": "DateTime", "ofType": null }, "isDeprecated": false, @@ -2927,23 +2975,27 @@ }, { "kind": "OBJECT", - "name": "ExerciseType", + "name": "EmailTemplateType", "description": null, "fields": [ { - "name": "definition", + "name": "content", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "ExerciseDefinitionType", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContentType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "elapsedS", + "name": "context", "description": null, "args": [], "type": { @@ -2951,7 +3003,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -2959,67 +3011,117 @@ "deprecationReason": null }, { - "name": "emailParticipants", + "name": "control", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailParticipantType", - "ofType": null - } - } + "kind": "OBJECT", + "name": "ControlType", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseStart", + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sender", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EmailThreadSubscription", + "description": null, + "fields": [ { - "name": "finished", + "name": "emailThread", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "EmailThreadType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "EmailThreadType", + "description": null, + "fields": [ + { + "name": "emails", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EmailType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "exercise", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "ExerciseType", "ofType": null } }, @@ -3027,7 +3129,7 @@ "deprecationReason": null }, { - "name": "name", + "name": "id", "description": null, "args": [], "type": { @@ -3035,7 +3137,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -3043,23 +3145,19 @@ "deprecationReason": null }, { - "name": "running", + "name": "lastEmail", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "OBJECT", + "name": "EmailType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teams", + "name": "participants", "description": null, "args": [], "type": { @@ -3073,7 +3171,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "TeamType", + "name": "EmailParticipantType", "ofType": null } } @@ -3083,7 +3181,7 @@ "deprecationReason": null }, { - "name": "threads", + "name": "readReceipt", "description": null, "args": [], "type": { @@ -3097,7 +3195,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EmailThreadType", + "name": "IsUnreadType", "ofType": null } } @@ -3107,15 +3205,15 @@ "deprecationReason": null }, { - "name": "userSet", + "name": "subject", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "RestrictedUser", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -3123,7 +3221,7 @@ "deprecationReason": null }, { - "name": "uuid", + "name": "timestamp", "description": null, "args": [], "type": { @@ -3131,7 +3229,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "UUID", + "name": "DateTime", "ofType": null } }, @@ -3146,94 +3244,75 @@ }, { "kind": "OBJECT", - "name": "ExercisesSubscription", + "name": "EmailType", "description": null, "fields": [ { - "name": "eventType", + "name": "content", "description": null, "args": [], "type": { - "kind": "ENUM", - "name": "ExerciseEventTypeEnum", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ContentType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exercise", + "name": "id", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "ExerciseType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ExtendedToolType", - "description": null, - "fields": [ - { - "name": "defaultResponse", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "definition", + "name": "overlay", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "ExerciseDefinitionType", + "name": "OverlayType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "hasParam", + "name": "readReceipt", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "Boolean", + "name": "DateTime", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "hint", + "name": "sender", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "EmailParticipantType", "ofType": null } }, @@ -3241,15 +3320,15 @@ "deprecationReason": null }, { - "name": "id", + "name": "thread", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "EmailThreadType", "ofType": null } }, @@ -3257,7 +3336,7 @@ "deprecationReason": null }, { - "name": "name", + "name": "timestamp", "description": null, "args": [], "type": { @@ -3265,7 +3344,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "DateTime", "ofType": null } }, @@ -3273,81 +3352,100 @@ "deprecationReason": null }, { - "name": "responses", + "name": "user", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ToolResponseType", - "ofType": null - } - } - } + "kind": "OBJECT", + "name": "RestrictedUser", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExerciseDefinitionType", + "description": null, + "fields": [ { - "name": "roles", + "name": "id", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "toolDetails", + "name": "name", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ToolDetailsType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "ExerciseEventTypeEnum", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CREATE", + "description": null, + "isDeprecated": false, + "deprecationReason": null }, { - "name": "tooltipDescription", + "name": "DELETE", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "MODIFY", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExerciseLoopRunningSubscription", + "description": null, + "fields": [ + { + "name": "exerciseLoopRunning", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -3360,11 +3458,39 @@ }, { "kind": "OBJECT", - "name": "FileInfoType", + "name": "ExerciseType", "description": null, "fields": [ { - "name": "content", + "name": "definition", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "ExerciseDefinitionType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "elapsedS", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emailParticipants", "description": null, "args": [], "type": { @@ -3378,7 +3504,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ContentType", + "name": "EmailParticipantType", "ofType": null } } @@ -3388,19 +3514,19 @@ "deprecationReason": null }, { - "name": "definition", + "name": "exerciseStart", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "DefinitionType", + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "fileName", + "name": "finished", "description": null, "args": [], "type": { @@ -3408,7 +3534,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -3424,42 +3550,19 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "UUID", + "name": "ID", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "FilterUsersInput", - "description": null, - "fields": null, - "inputFields": [ - { - "name": "active", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "group", + "name": "name", "description": null, + "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", @@ -3467,115 +3570,135 @@ "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "limit", + "name": "running", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "skip", + "name": "teams", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "tags", - "description": null, - "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamType", + "ofType": null + } + } } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "GrapheneConfig", - "description": null, - "fields": [ + }, { - "name": "customEmailSuffix", + "name": "threads", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "EmailThreadType", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "emailBetweenTeams", + "name": "userSet", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RestrictedUser", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "enableRoles", + "name": "uuid", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "UUID", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ExercisesSubscription", + "description": null, + "fields": [ { - "name": "exerciseDuration", + "name": "eventType", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Int", + "kind": "ENUM", + "name": "ExerciseEventTypeEnum", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "showExerciseTime", + "name": "exercise", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "ExerciseType", "ofType": null }, "isDeprecated": false, @@ -3589,11 +3712,11 @@ }, { "kind": "OBJECT", - "name": "GroupType", + "name": "ExtendedToolType", "description": null, "fields": [ { - "name": "id", + "name": "defaultResponse", "description": null, "args": [], "type": { @@ -3601,7 +3724,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -3609,52 +3732,27 @@ "deprecationReason": null }, { - "name": "name", + "name": "definition", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ExerciseDefinitionType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "ID", - "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "InjectDetailsType", - "description": null, - "fields": [ + }, { - "name": "content", + "name": "hint", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ContentType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -3678,15 +3776,15 @@ "deprecationReason": null }, { - "name": "inject", + "name": "name", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "DefinitionInjectType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -3694,54 +3792,39 @@ "deprecationReason": null }, { - "name": "overlay", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "OverlayType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "InjectOptionType", - "description": null, - "fields": [ - { - "name": "content", + "name": "responses", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ContentType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ToolResponseType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "control", + "name": "roles", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ControlType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -3749,7 +3832,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "tooltipDescription", "description": null, "args": [], "type": { @@ -3757,31 +3840,38 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "FileInfoType", + "description": null, + "fields": [ { - "name": "injectSelection", + "name": "definition", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "InjectSelectionType", - "ofType": null - } + "kind": "OBJECT", + "name": "DefinitionType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "fileName", "description": null, "args": [], "type": { @@ -3797,7 +3887,7 @@ "deprecationReason": null }, { - "name": "sender", + "name": "id", "description": null, "args": [], "type": { @@ -3805,7 +3895,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "UUID", "ofType": null } }, @@ -3819,234 +3909,171 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "InjectSelectionConfirmationType", + "kind": "INPUT_OBJECT", + "name": "FilterUsersInput", "description": null, - "fields": [ + "fields": null, + "inputFields": [ { - "name": "injectSelectionId", + "name": "active", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "submitted", + "name": "firstName", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "InjectSelectionType", - "description": null, - "fields": [ + }, { - "name": "id", + "name": "groups", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "ENUM", + "name": "AuthGroup", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "imported", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "options", + "name": "lastName", "description": null, - "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "InjectOptionType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "submitted", + "name": "limit", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "Int", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "team", + "name": "skip", "description": null, - "args": [], "type": { - "kind": "NON_NULL", + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": null, + "type": { + "kind": "LIST", "name": null, "ofType": { - "kind": "OBJECT", - "name": "TeamType", + "kind": "SCALAR", + "name": "String", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "timestamp", + "name": "username", "description": null, - "args": [], "type": { "kind": "SCALAR", - "name": "DateTime", + "name": "String", "ofType": null }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "InjectSelectionsSubscription", + "name": "FilterUsersType", "description": null, "fields": [ { - "name": "injectSelection", + "name": "active", "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "InjectSelectionType", + "kind": "SCALAR", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "ENUM", - "name": "InjectType", - "description": "An enumeration.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "EMAIL", - "description": "Email", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FORM", - "description": "Form", - "isDeprecated": false, - "deprecationReason": null }, { - "name": "INFO", - "description": "Info", + "name": "firstName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, "isDeprecated": false, "deprecationReason": null }, { - "name": "TOOL", - "description": "Tool", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "LearningActivityType", - "description": null, - "fields": [ - { - "name": "id", + "name": "groups", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "ENUM", + "name": "AuthGroup", "ofType": null } }, @@ -4054,57 +4081,49 @@ "deprecationReason": null }, { - "name": "milestones", + "name": "imported", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MilestoneType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", + "name": "lastName", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "objective", + "name": "limit", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LearningObjectiveType", - "ofType": null - } + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "skip", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4114,7 +4133,7 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "SCALAR", @@ -4124,6 +4143,18 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "username", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -4133,43 +4164,100 @@ }, { "kind": "OBJECT", - "name": "LearningObjectiveType", + "name": "GrapheneConfig", "description": null, "fields": [ { - "name": "activities", + "name": "customEmailSuffix", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "LearningActivityType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "definition", + "name": "emailBetweenTeams", "description": null, "args": [], "type": { - "kind": "NON_NULL", + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "enableRoles", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exerciseDuration", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "showExerciseTime", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "ID", + "description": "The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "InjectDetailsType", + "description": null, + "fields": [ + { + "name": "content", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "DefinitionType", + "name": "ContentType", "ofType": null } }, @@ -4193,15 +4281,15 @@ "deprecationReason": null }, { - "name": "name", + "name": "inject", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "DefinitionInjectType", "ofType": null } }, @@ -4209,17 +4297,13 @@ "deprecationReason": null }, { - "name": "tags", + "name": "overlay", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "OverlayType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4232,39 +4316,33 @@ }, { "kind": "ENUM", - "name": "LogType", + "name": "InjectType", "description": "An enumeration.", "fields": null, "inputFields": null, "interfaces": null, "enumValues": [ - { - "name": "CUSTOM_INJECT", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "EMAIL", - "description": null, + "description": "Email", "isDeprecated": false, "deprecationReason": null }, { "name": "FORM", - "description": null, + "description": "Form", "isDeprecated": false, "deprecationReason": null }, { - "name": "INJECT", - "description": null, + "name": "INFO", + "description": "Info", "isDeprecated": false, "deprecationReason": null }, { "name": "TOOL", - "description": null, + "description": "Tool", "isDeprecated": false, "deprecationReason": null } @@ -4272,35 +4350,22 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "LoginMutation", - "description": null, - "fields": [ - { - "name": "user", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "UserType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], + "kind": "SCALAR", + "name": "Int", + "description": "The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", + "fields": null, "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "LogoutMutation", + "name": "IsUnreadType", "description": null, "fields": [ { - "name": "loggedOut", + "name": "isUnread", "description": null, "args": [], "type": { @@ -4310,6 +4375,22 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -4319,21 +4400,9 @@ }, { "kind": "OBJECT", - "name": "MilestoneStateType", + "name": "LearningActivityType", "description": null, "fields": [ - { - "name": "activity", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "TeamLearningActivityType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "id", "description": null, @@ -4351,23 +4420,31 @@ "deprecationReason": null }, { - "name": "milestone", + "name": "milestones", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "MilestoneType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "reached", + "name": "name", "description": null, "args": [], "type": { @@ -4375,7 +4452,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null } }, @@ -4383,15 +4460,15 @@ "deprecationReason": null }, { - "name": "teamIds", + "name": "objective", "description": null, "args": [], "type": { - "kind": "LIST", + "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "LearningObjectiveType", "ofType": null } }, @@ -4399,13 +4476,17 @@ "deprecationReason": null }, { - "name": "timestampReached", + "name": "tags", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -4418,47 +4499,43 @@ }, { "kind": "OBJECT", - "name": "MilestoneType", + "name": "LearningObjectiveType", "description": null, "fields": [ { - "name": "activity", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "LearningActivityType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "fileNames", + "name": "activities", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LearningActivityType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "final", + "name": "definition", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "DefinitionType", "ofType": null } }, @@ -4498,7 +4575,7 @@ "deprecationReason": null }, { - "name": "roles", + "name": "tags", "description": null, "args": [], "type": { @@ -4512,22 +4589,6 @@ }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "teamVisible", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -4535,23 +4596,60 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "LogType", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "CUSTOM_INJECT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "EMAIL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FORM", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INJECT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "TOOL", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", - "name": "MilestonesSubscription", + "name": "LoginMutation", "description": null, "fields": [ { - "name": "milestones", + "name": "user", "description": null, "args": [], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MilestoneStateType", - "ofType": null - } + "kind": "OBJECT", + "name": "UserType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -4564,11 +4662,11 @@ }, { "kind": "OBJECT", - "name": "ModifyMilestoneMutation", + "name": "LogoutMutation", "description": null, "fields": [ { - "name": "operationDone", + "name": "loggedOut", "description": null, "args": [], "type": { @@ -4587,16 +4685,92 @@ }, { "kind": "OBJECT", - "name": "MoveExerciseTimeMutation", + "name": "MilestoneStateType", "description": null, "fields": [ { - "name": "exercise", + "name": "activity", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "ExerciseType", + "name": "TeamLearningActivityType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestone", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reached", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamIds", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "timestampReached", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", "ofType": null }, "isDeprecated": false, @@ -4610,143 +4784,224 @@ }, { "kind": "OBJECT", - "name": "Mutation", + "name": "MilestoneType", "description": null, "fields": [ { - "name": "addDefinitionAccess", - "description": "Mutation for granting access to the specific definition", - "args": [ - { - "name": "definitionId", - "description": "ID of the definition to which instructors (users) are granted access", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "userIds", - "description": "IDs of the instructors (users) to be granted access to definition", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "name": "activity", + "description": null, + "args": [], "type": { "kind": "OBJECT", - "name": "AddDefinitionAccessMutation", + "name": "LearningActivityType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "answerQuestionnaire", - "description": "Mutation for answering questionnaires", - "args": [ - { - "name": "questInput", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "QuestionnaireInput", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "name": "fileNames", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "final", + "description": null, + "args": [], "type": { - "kind": "OBJECT", - "name": "AnswerQuestionnaireMutation", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "assignInstructorsToExercise", - "description": "Mutation for assigning instructors (users) to the exercise", - "args": [ - { - "name": "exerciseId", - "description": "ID of the exercise to which instructors (users) are being assigned", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "userIds", - "description": "IDs of the instructors (users) to be assigned to an exercise", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null } - ], + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "initialState", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "roles", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamVisible", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MilestonesSubscription", + "description": null, + "fields": [ + { + "name": "milestones", + "description": null, + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneStateType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ModifyMilestoneMutation", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MoveExerciseTimeMutation", + "description": null, + "fields": [ + { + "name": "exercise", + "description": null, + "args": [], "type": { "kind": "OBJECT", - "name": "AssignInstructorsToExercise", + "name": "ExerciseType", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Mutation", + "description": null, + "fields": [ { - "name": "assignUsersToTeam", - "description": "Mutation for assigning users to the specific team of the exercise", + "name": "addDefinitionAccess", + "description": "Mutation for granting access to the specific definition", "args": [ { - "name": "teamId", - "description": "ID of the team to which users are being assigned", + "name": "definitionId", + "description": "ID of the definition to which instructors (users) are granted access", "type": { "kind": "NON_NULL", "name": null, @@ -4762,7 +5017,7 @@ }, { "name": "userIds", - "description": "IDs of the users to be assigned to team", + "description": "IDs of the instructors (users) to be granted access to definition", "type": { "kind": "NON_NULL", "name": null, @@ -4783,25 +5038,25 @@ ], "type": { "kind": "OBJECT", - "name": "AssignUsersToTeamMutation", + "name": "AddDefinitionAccessMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "changeUserData", - "description": "Mutation for changing user data", + "name": "answerQuestionnaire", + "description": "Mutation for answering questionnaires", "args": [ { - "name": "changeUserInput", + "name": "questInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "INPUT_OBJECT", - "name": "ChangeUserInput", + "name": "QuestionnaireInput", "ofType": null } }, @@ -4812,48 +5067,68 @@ ], "type": { "kind": "OBJECT", - "name": "ChangeUserDataMutation", + "name": "AnswerQuestionnaireMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "createExercise", - "description": "Mutation that creates a new exercise with given definition by its id", + "name": "assignInstructorsToExercise", + "description": "Mutation for assigning instructors (users) to the exercise", "args": [ { - "name": "createExerciseInput", - "description": null, + "name": "exerciseId", + "description": "ID of the exercise to which instructors (users) are being assigned", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "CreateExerciseInput", + "kind": "SCALAR", + "name": "ID", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "userIds", + "description": "IDs of the instructors (users) to be assigned to an exercise", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { "kind": "OBJECT", - "name": "CreateExerciseMutation", + "name": "AssignInstructorsToExercise", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "createThread", - "description": "Mutation for creating a new thread", + "name": "assignUsersByTags", + "description": "Mutation for assigning users to the teams by tags", "args": [ { "name": "exerciseId", - "description": null, + "description": "ID of the exercise to which users are being assigned", "type": { "kind": "NON_NULL", "name": null, @@ -4868,19 +5143,15 @@ "deprecationReason": null }, { - "name": "participantAddresses", - "description": "List of email addresses that should be included in the thread", + "name": "tagPrefix", + "description": "Prefix of the tag that holds information about the user assignments to teams", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "defaultValue": null, @@ -4888,37 +5159,45 @@ "deprecationReason": null }, { - "name": "subject", - "description": "The subject of the thread", + "name": "userIds", + "description": "IDs of the users being assigned to exercise", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null, + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], "type": { "kind": "OBJECT", - "name": "CreateThreadMutation", + "name": "AssignUsersByTags", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "deleteDefinition", - "description": "Mutation that deletes a definition of given id", + "name": "assignUsersEqually", + "description": "Mutation for assigning users to the exercise equally if possible", "args": [ { - "name": "definitionId", - "description": null, + "name": "exerciseId", + "description": "ID of the exercise to which users are being assigned", "type": { "kind": "NON_NULL", "name": null, @@ -4931,30 +5210,25 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "DeleteDefinitionMutation", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deleteExercise", - "description": "Mutation that deletes an exercise of given id", - "args": [ + }, { - "name": "exerciseId", - "description": null, + "name": "userIds", + "description": "IDs of the users being assigned", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } } }, "defaultValue": null, @@ -4964,25 +5238,25 @@ ], "type": { "kind": "OBJECT", - "name": "DeleteExerciseMutation", + "name": "AssignUsersEqually", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "login", - "description": "Mutation for logging in an user", + "name": "assignUsersToTeam", + "description": "Mutation for assigning users to the specific team of the exercise", "args": [ { - "name": "password", - "description": null, + "name": "teamId", + "description": "ID of the team to which users are being assigned", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -4991,15 +5265,19 @@ "deprecationReason": null }, { - "name": "username", - "description": null, + "name": "userIds", + "description": "IDs of the users to be assigned to team", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } } }, "defaultValue": null, @@ -5009,49 +5287,54 @@ ], "type": { "kind": "OBJECT", - "name": "LoginMutation", + "name": "AssignUsersToTeamMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "logout", - "description": "Mutation for logging out an user", - "args": [], + "name": "changeUserData", + "description": "Mutation for changing user data", + "args": [ + { + "name": "changeUserInput", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ChangeUserInput", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "OBJECT", - "name": "LogoutMutation", + "name": "ChangeUserDataMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "modifyMilestone", - "description": "Mutation for instructors to modify a team's milestone state", + "name": "copyUsersAssignment", + "description": "Mutation for copying users assignments from one exercise to another", "args": [ { - "name": "activate", - "description": "Activate or deactivate the provided milestone, activates by default", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "true", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "milestone", - "description": null, + "name": "fromExerciseId", + "description": "ID of the exercise from which the assignments of users will be copied", "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -5060,8 +5343,8 @@ "deprecationReason": null }, { - "name": "teamId", - "description": null, + "name": "toExerciseId", + "description": "ID of the exercise to which the assignments of users will be copied", "type": { "kind": "NON_NULL", "name": null, @@ -5078,41 +5361,54 @@ ], "type": { "kind": "OBJECT", - "name": "ModifyMilestoneMutation", + "name": "CopyUsersAssignment", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "moveTime", - "description": "Mutation for moving the in-exercise time by the specified amount of seconds", + "name": "createExercise", + "description": "Mutation that creates a new exercise with given definition by its id", "args": [ { - "name": "exerciseId", + "name": "createExerciseInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "CreateExerciseInput", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateExerciseMutation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "createTag", + "description": "Mutation for creating a tag", + "args": [ { - "name": "timeDiff", + "name": "name", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "String", "ofType": null } }, @@ -5123,25 +5419,25 @@ ], "type": { "kind": "OBJECT", - "name": "MoveExerciseTimeMutation", + "name": "CreateTagMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "passwordChange", - "description": "Mutation for changing a user's password", + "name": "createThread", + "description": "Mutation for creating a new thread", "args": [ { - "name": "newPassword", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, @@ -5150,15 +5446,19 @@ "deprecationReason": null }, { - "name": "newPasswordRepeat", - "description": null, + "name": "participantAddresses", + "description": "List of email addresses that should be included in the thread", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "defaultValue": null, @@ -5166,8 +5466,8 @@ "deprecationReason": null }, { - "name": "oldPassword", - "description": null, + "name": "subject", + "description": "The subject of the thread", "type": { "kind": "NON_NULL", "name": null, @@ -5184,46 +5484,55 @@ ], "type": { "kind": "OBJECT", - "name": "PasswordChange", + "name": "CreateThreadMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "removeDefinitionAccess", - "description": "Mutation for removing access of instructors (users) to the definition", + "name": "createUser", + "description": "Mutation for creating a user", "args": [ { - "name": "definitionId", - "description": "ID of the definition from which instructors (users) are being removed", + "name": "createUserInput", + "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "CreateUserInput", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateUserMutation", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "deleteDefinition", + "description": "Mutation that deletes a definition of given id", + "args": [ { - "name": "userIds", - "description": "IDs of the users to be removed from a definition access", + "name": "definitionId", + "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "defaultValue": null, @@ -5233,25 +5542,37 @@ ], "type": { "kind": "OBJECT", - "name": "RemoveDefinitionAccessMutation", + "name": "DeleteDefinitionMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "removeInstructorsFromExercise", - "description": "Mutation for removing instructors (users) from the exercise", + "name": "deleteEmailDraft", + "description": null, "args": [ { - "name": "exerciseId", - "description": "ID of the exercise from which instructors (users) are being removed", + "name": "emailThreadId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "instructor", + "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Boolean", "ofType": null } }, @@ -5260,19 +5581,15 @@ "deprecationReason": null }, { - "name": "userIds", - "description": "IDs of the users to be removed from a team", + "name": "teamId", + "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "defaultValue": null, @@ -5282,19 +5599,19 @@ ], "type": { "kind": "OBJECT", - "name": "RemoveInstructorsFromExerciseMutation", + "name": "MutationResult", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "removeUsersFromTeam", - "description": "Mutation for removing users from the specific team of the exercise", + "name": "deleteExercise", + "description": "Mutation that deletes an exercise of given id", "args": [ { - "name": "teamId", - "description": "ID of the team from which users are being removed", + "name": "exerciseId", + "description": null, "type": { "kind": "NON_NULL", "name": null, @@ -5307,66 +5624,50 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "userIds", - "description": "IDs of the users to be removed from a team", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "type": { "kind": "OBJECT", - "name": "RemoveUsersFromTeamMutation", + "name": "DeleteExerciseMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "resetReadReceiptChannel", - "description": null, + "name": "deleteTags", + "description": "Mutation for deleting a tag", "args": [ { - "name": "channelId", - "description": null, + "name": "force", + "description": "If true, will delete tags even if they are assigned to users", "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, - "defaultValue": null, + "defaultValue": "false", "isDeprecated": false, "deprecationReason": null }, { - "name": "teamId", + "name": "tagIds", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } } }, "defaultValue": null, @@ -5376,26 +5677,30 @@ ], "type": { "kind": "OBJECT", - "name": "ChannelReceipt", + "name": "DeleteTagsMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "resetReadReceiptEmailThread", - "description": null, + "name": "deleteUsers", + "description": "Mutation for deleting users", "args": [ { - "name": "emailThreadId", - "description": null, + "name": "userIds", + "description": "IDs of the users to be deleted", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } } }, "defaultValue": null, @@ -5405,54 +5710,41 @@ ], "type": { "kind": "OBJECT", - "name": "EmailThreadReceipt", + "name": "DeleteUsersMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "selectTeamInjectOption", - "description": "Mutation for selecting an inject for a specific team", + "name": "login", + "description": "Mutation for logging in an user", "args": [ { - "name": "selectTeamInjectInput", + "name": "password", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectTeamInjectInput", + "kind": "SCALAR", + "name": "String", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "SelectTeamInjectOptionMutation", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sendEmail", - "description": "Mutation for sending an email", - "args": [ + }, { - "name": "sendEmailInput", + "name": "username", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "SendEmailInput", + "kind": "SCALAR", + "name": "String", "ofType": null } }, @@ -5463,83 +5755,65 @@ ], "type": { "kind": "OBJECT", - "name": "SendEmailMutation", + "name": "LoginMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "startExercise", - "description": "Mutation for starting the specified exercise", - "args": [ - { - "name": "exerciseId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "name": "logout", + "description": "Mutation for logging out an user", + "args": [], "type": { "kind": "OBJECT", - "name": "StartExerciseMutation", + "name": "LogoutMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "stopExercise", - "description": "Mutation that stops an exercise of given id", + "name": "modifyMilestone", + "description": "Mutation for instructors to modify a team's milestone state", "args": [ { - "name": "exerciseId", + "name": "activate", + "description": "Activate or deactivate the provided milestone, activates by default", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": "true", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestone", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "StopExerciseMutation", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "useTool", - "description": "Mutation for performing a tool action", - "args": [ + }, { - "name": "useToolInput", + "name": "teamId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "UseToolInput", + "kind": "SCALAR", + "name": "ID", "ofType": null } }, @@ -5550,54 +5824,41 @@ ], "type": { "kind": "OBJECT", - "name": "UseToolMutation", + "name": "ModifyMilestoneMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "writeEmailDraft", - "description": null, + "name": "moveTime", + "description": "Mutation for moving the in-exercise time by the specified amount of seconds", "args": [ { - "name": "emailDraft", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "INPUT_OBJECT", - "name": "EmailDraftInput", + "kind": "SCALAR", + "name": "ID", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "EmailDraftType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "writeInjectSelectionConfirmation", - "description": null, - "args": [ + }, { - "name": "injectSelectionId", + "name": "timeDiff", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Int", "ofType": null } }, @@ -5608,54 +5869,41 @@ ], "type": { "kind": "OBJECT", - "name": "InjectSelectionConfirmationType", + "name": "MoveExerciseTimeMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "writeReadReceipt", - "description": null, + "name": "passwordChange", + "description": "Mutation for changing a user's password", "args": [ { - "name": "actionLogId", + "name": "newPassword", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "ReadReceiptType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "writeReadReceiptChannel", - "description": null, - "args": [ + }, { - "name": "channelId", + "name": "newPasswordRepeat", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -5664,14 +5912,14 @@ "deprecationReason": null }, { - "name": "teamId", + "name": "oldPassword", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -5682,26 +5930,30 @@ ], "type": { "kind": "OBJECT", - "name": "ChannelReceipt", + "name": "PasswordChange", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "writeReadReceiptEmail", - "description": null, + "name": "regenerateCredentials", + "description": "Mutation for re-generating credentials for users", "args": [ { - "name": "emailId", - "description": null, + "name": "userIds", + "description": "IDs of the users to have re-generated credentials", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } } }, "defaultValue": null, @@ -5711,19 +5963,19 @@ ], "type": { "kind": "OBJECT", - "name": "EmailReceipt", + "name": "RegenerateCredentialsMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "writeReadReceiptEmailThread", - "description": null, + "name": "removeDefinitionAccess", + "description": "Mutation for removing access of instructors (users) to the definition", "args": [ { - "name": "emailThreadId", - "description": null, + "name": "definitionId", + "description": "ID of the definition from which instructors (users) are being removed", "type": { "kind": "NON_NULL", "name": null, @@ -5736,100 +5988,43 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "userIds", + "description": "IDs of the users to be removed from a definition access", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { "kind": "OBJECT", - "name": "EmailThreadReceipt", + "name": "RemoveDefinitionAccessMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "OverlayType", - "description": null, - "fields": [ - { - "name": "duration", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null }, { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "PasswordChange", - "description": null, - "fields": [ - { - "name": "passwordChanged", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "fields": [ - { - "name": "actionLog", - "description": "Retrieve action log with given id", + "name": "removeInstructorsFromExercise", + "description": "Mutation for removing instructors (users) from the exercise", "args": [ { - "name": "logId", - "description": null, + "name": "exerciseId", + "description": "ID of the exercise from which instructors (users) are being removed", "type": { "kind": "NON_NULL", "name": null, @@ -5842,23 +6037,43 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "userIds", + "description": "IDs of the users to be removed from a team", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } ], "type": { "kind": "OBJECT", - "name": "ActionLogType", + "name": "RemoveInstructorsFromExerciseMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "analyticsActionLogs", - "description": "Retrieve all action logs for the specific exercise. Useful for analytics.", + "name": "removeUsersFromTeam", + "description": "Mutation for removing users from the specific team of the exercise", "args": [ { - "name": "exerciseId", - "description": null, + "name": "teamId", + "description": "ID of the team from which users are being removed", "type": { "kind": "NON_NULL", "name": null, @@ -5871,34 +6086,21 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ActionLogType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "analyticsEmailThreads", - "description": "Retrieve all email threads for the specific exercise. Useful for analytics.", - "args": [ + }, { - "name": "exerciseId", - "description": null, + "name": "userIds", + "description": "IDs of the users to be removed from a team", "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } } }, "defaultValue": null, @@ -5907,30 +6109,26 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailThreadType", - "ofType": null - } + "kind": "OBJECT", + "name": "RemoveUsersFromTeamMutation", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "analyticsMilestones", - "description": "Retrieve all milestones for the specific exercise. Useful for analytics.", + "name": "sendCustomInject", + "description": "Mutation for sending custom injects", "args": [ { - "name": "exerciseId", + "name": "customInjectInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "CustomInjectInput", "ofType": null } }, @@ -5940,30 +6138,26 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MilestoneStateType", - "ofType": null - } + "kind": "OBJECT", + "name": "SendCustomInjectMutation", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "autoInjects", - "description": "Retrieve all auto inject categories", + "name": "sendEmail", + "description": "Mutation for sending an email", "args": [ { - "name": "exerciseId", + "name": "sendEmailInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "SendEmailInput", "ofType": null } }, @@ -5973,30 +6167,26 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionInjectType", - "ofType": null - } + "kind": "OBJECT", + "name": "SendEmailMutation", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "channel", - "description": "Retrieve a specific channel", + "name": "setEmailDraft", + "description": null, "args": [ { - "name": "channelId", + "name": "emailDraft", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "EmailDraftInput", "ofType": null } }, @@ -6007,18 +6197,18 @@ ], "type": { "kind": "OBJECT", - "name": "DefinitionChannelType", + "name": "EmailDraftType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "definition", - "description": "Retrieve a specific definition", + "name": "setIsUnreadChannel", + "description": null, "args": [ { - "name": "definitionId", + "name": "channelId", "description": null, "type": { "kind": "NON_NULL", @@ -6032,71 +6222,25 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "DefinitionType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "definitions", - "description": "Retrieve all definitions", - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "emailAddresses", - "description": "Retrieve the instructor email addresses from the specified email thread", - "args": [ + }, { - "name": "threadId", + "name": "isUnread", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Boolean", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "emailContact", - "description": "Retrieve the specific email participant", - "args": [ + }, { - "name": "participantId", + "name": "teamId", "description": null, "type": { "kind": "NON_NULL", @@ -6114,59 +6258,26 @@ ], "type": { "kind": "OBJECT", - "name": "EmailParticipantType", + "name": "MutationResult", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "emailContacts", - "description": "Retrieve all email contacts for the running exercise", - "args": [ - { - "name": "visibleOnly", - "description": "Not required, defaults to true returns only milestones that are visible to the team.\n If set to false then all milestones (even not visible to team) are sent", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailParticipantType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "emailTemplates", - "description": "Retrieve all email templates for the specified exercise and email addresses", + "name": "setIsUnreadEmailThread", + "description": null, "args": [ { - "name": "emailAddresses", + "name": "isUnread", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null } }, "defaultValue": null, @@ -6174,7 +6285,7 @@ "deprecationReason": null }, { - "name": "exerciseId", + "name": "teamId", "description": null, "type": { "kind": "NON_NULL", @@ -6188,24 +6299,7 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailTemplateType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "emailThread", - "description": "Retrieve the specific email thread", - "args": [ + }, { "name": "threadId", "description": null, @@ -6225,18 +6319,18 @@ ], "type": { "kind": "OBJECT", - "name": "EmailThreadType", + "name": "MutationResult", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "emailThreads", - "description": "Retrieve all email threads for the specific team", + "name": "startExercise", + "description": "Mutation for starting the specified exercise", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -6253,20 +6347,16 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "EmailThreadType", - "ofType": null - } + "kind": "OBJECT", + "name": "StartExerciseMutation", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseChannels", - "description": "Retrieve all channels for an exercise", + "name": "stopExercise", + "description": "Mutation that stops an exercise of given id", "args": [ { "name": "exerciseId", @@ -6286,52 +6376,35 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "DefinitionChannelType", - "ofType": null - } + "kind": "OBJECT", + "name": "StopExerciseMutation", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseConfig", - "description": "Retrieve the config for the current running exercise", + "name": "updateTag", + "description": "Mutation for updating a tag", "args": [ { - "name": "exerciseId", + "name": "newName", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "GrapheneConfig", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "exerciseId", - "description": "Retrieve an exercise with matching id", - "args": [ + }, { - "name": "exerciseId", + "name": "tagId", "description": null, "type": { "kind": "NON_NULL", @@ -6349,25 +6422,25 @@ ], "type": { "kind": "OBJECT", - "name": "ExerciseType", + "name": "UpdateTagMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseLoopRunning", - "description": "Retrieve the state of the exercise loop for the specific exercise", + "name": "updateTagAssignments", + "description": "Mutation for changing tag assignments", "args": [ { - "name": "exerciseId", + "name": "updateTagAssignmentsInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "UpdateTagAssignmentsInput", "ofType": null } }, @@ -6377,26 +6450,26 @@ } ], "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "UpdateTagAssignmentsMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseQuestionnaires", - "description": "Retrieve all questionnaire states for this exercise", + "name": "useTool", + "description": "Mutation for performing a tool action", "args": [ { - "name": "exerciseId", + "name": "useToolInput", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "INPUT_OBJECT", + "name": "UseToolInput", "ofType": null } }, @@ -6406,35 +6479,19 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TeamQuestionnaireStateType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "exerciseTimeLeft", - "description": "Retrieve the amount of time left in the running exercise in seconds", - "args": [], - "type": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "UseToolMutation", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "exerciseTools", - "description": "Retrieve all tools for the specific exercise. Useful for analytics.", + "name": "writeReadReceipt", + "description": null, "args": [ { - "name": "exerciseId", + "name": "actionLogId", "description": null, "type": { "kind": "NON_NULL", @@ -6451,88 +6508,19 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ToolType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "exercises", - "description": "Retrieve all exercises with optional parameters", - "args": [ - { - "name": "finished", - "description": "Retrieves only finished exercises, Not required", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "limit", - "description": "Skips first n results, Not required", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "running", - "description": "Retrieves only running exercises, Not required", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "skip", - "description": "Retrieves only the first n results, Not required", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ExerciseType", - "ofType": null - } + "kind": "OBJECT", + "name": "ReadReceiptType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "extendedTeamTools", - "description": "Retrieve all tools available to the specific team including all possible responses", + "name": "writeReadReceiptEmail", + "description": null, "args": [ { - "name": "teamId", + "name": "emailId", "description": null, "type": { "kind": "NON_NULL", @@ -6549,30 +6537,153 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ExtendedToolType", - "ofType": null - } + "kind": "OBJECT", + "name": "EmailReceipt", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "fileInfo", - "description": "Retrieve a specific file info", + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "MutationResult", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "OverlayInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "duration", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OverlayType", + "description": null, + "fields": [ + { + "name": "duration", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "PasswordChange", + "description": null, + "fields": [ + { + "name": "passwordChanged", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Query", + "description": null, + "fields": [ + { + "name": "actionLog", + "description": "Retrieve action log with given id", "args": [ { - "name": "fileInfoId", + "name": "logId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "UUID", + "name": "ID", "ofType": null } }, @@ -6583,22 +6694,39 @@ ], "type": { "kind": "OBJECT", - "name": "FileInfoType", + "name": "ActionLogType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "groups", - "description": "Retrieve all groups (for filtering)", - "args": [], + "name": "analyticsActionLogs", + "description": "Retrieve all action logs for the specific exercise. Useful for analytics.", + "args": [ + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "GroupType", + "name": "ActionLogType", "ofType": null } }, @@ -6606,8 +6734,8 @@ "deprecationReason": null }, { - "name": "milestones", - "description": "Retrieve all milestones", + "name": "analyticsEmailThreads", + "description": "Retrieve all email threads for the specific exercise. Useful for analytics.", "args": [ { "name": "exerciseId", @@ -6631,7 +6759,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "MilestoneType", + "name": "EmailThreadType", "ofType": null } }, @@ -6639,11 +6767,11 @@ "deprecationReason": null }, { - "name": "questionnaireState", - "description": "Retrieve the specific questionnaire state for this team", + "name": "analyticsMilestones", + "description": "Retrieve all milestones for the specific exercise. Useful for analytics.", "args": [ { - "name": "questionnaireId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -6657,9 +6785,26 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneStateType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "channel", + "description": "Retrieve a specific channel", + "args": [ { - "name": "teamId", + "name": "channelId", "description": null, "type": { "kind": "NON_NULL", @@ -6677,46 +6822,18 @@ ], "type": { "kind": "OBJECT", - "name": "TeamQuestionnaireStateType", + "name": "DefinitionChannelType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "returnLocalEmailDraft", - "description": null, + "name": "definition", + "description": "Retrieve a specific definition", "args": [ { - "name": "emailThreadId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "instructor", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "teamId", + "name": "definitionId", "description": null, "type": { "kind": "NON_NULL", @@ -6734,22 +6851,22 @@ ], "type": { "kind": "OBJECT", - "name": "EmailDraftType", + "name": "DefinitionType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "tags", - "description": "Retrieve all tags (for filtering)", + "name": "definitions", + "description": "Retrieve all definitions", "args": [], "type": { "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "TagType", + "name": "DefinitionType", "ofType": null } }, @@ -6757,11 +6874,11 @@ "deprecationReason": null }, { - "name": "team", - "description": "Retrieve a specific team", + "name": "emailAddresses", + "description": "Retrieve the instructor email addresses from the specified email thread", "args": [ { - "name": "teamId", + "name": "threadId", "description": null, "type": { "kind": "NON_NULL", @@ -6778,19 +6895,23 @@ } ], "type": { - "kind": "OBJECT", - "name": "TeamType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamActionLogs", - "description": "Retrieve all action logs for the specific team", + "name": "emailContact", + "description": "Retrieve the specific email participant", "args": [ { - "name": "teamId", + "name": "participantId", "description": null, "type": { "kind": "NON_NULL", @@ -6806,12 +6927,37 @@ "deprecationReason": null } ], + "type": { + "kind": "OBJECT", + "name": "EmailParticipantType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "emailContacts", + "description": "Retrieve all email contacts for the running exercise", + "args": [ + { + "name": "visibleOnly", + "description": "Not required, defaults to true returns only milestones that are visible to the team.\n If set to false then all milestones (even not visible to team) are sent", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "ActionLogType", + "name": "EmailParticipantType", "ofType": null } }, @@ -6819,19 +6965,23 @@ "deprecationReason": null }, { - "name": "teamChannelLogs", - "description": "Retrieve all team action logs for the specific channel", + "name": "emailTemplates", + "description": "Retrieve all email templates for the specified exercise and email addresses", "args": [ { - "name": "channelId", + "name": "emailAddresses", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } }, "defaultValue": null, @@ -6839,7 +6989,7 @@ "deprecationReason": null }, { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -6860,7 +7010,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ActionLogType", + "name": "EmailTemplateType", "ofType": null } }, @@ -6868,11 +7018,11 @@ "deprecationReason": null }, { - "name": "teamEmailParticipant", - "description": "Retrieve the email participant that belongs to the specified team", + "name": "emailThread", + "description": "Retrieve the specific email thread", "args": [ { - "name": "teamId", + "name": "threadId", "description": null, "type": { "kind": "NON_NULL", @@ -6890,15 +7040,15 @@ ], "type": { "kind": "OBJECT", - "name": "EmailParticipantType", + "name": "EmailThreadType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamInjectSelections", - "description": "Retrieve all available inject selections for the specific team. Useful for the instructor view.", + "name": "emailThreads", + "description": "Retrieve all email threads for the specific team", "args": [ { "name": "teamId", @@ -6922,7 +7072,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "InjectSelectionType", + "name": "EmailThreadType", "ofType": null } }, @@ -6930,11 +7080,11 @@ "deprecationReason": null }, { - "name": "teamLearningObjectives", - "description": "Retrieve the learning objectives for the specific team", + "name": "exerciseChannels", + "description": "Retrieve all channels for an exercise", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -6955,7 +7105,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "TeamLearningObjectiveType", + "name": "DefinitionChannelType", "ofType": null } }, @@ -6963,11 +7113,11 @@ "deprecationReason": null }, { - "name": "teamMilestones", - "description": "Retrieve all milestones for the specific team filtered by team visibility", + "name": "exerciseConfig", + "description": "Retrieve the config for the current running exercise", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -6981,38 +7131,22 @@ "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "visibleOnly", - "description": "Not required, defaults to true returns only milestones that are visible to the team.\n If set to false then all milestones (even not visible to team) are sent", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "MilestoneStateType", - "ofType": null - } + "kind": "OBJECT", + "name": "GrapheneConfig", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamQuestionnaires", - "description": "Retrieve all questionnaire states for this team", + "name": "exerciseId", + "description": "Retrieve an exercise with matching id", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -7029,39 +7163,19 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TeamQuestionnaireStateType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "teamRoles", - "description": "Retrieve all team roles for the running exercise", - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "OBJECT", + "name": "ExerciseType", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamTools", - "description": "Retrieve all tools available to the specific team", + "name": "exerciseLoopRunning", + "description": "Retrieve the state of the exercise loop for the specific exercise", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -7078,23 +7192,19 @@ } ], "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ToolType", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamUploadedFiles", - "description": "Retrieve all files uploaded by/to the specified team", + "name": "exerciseQuestionnaires", + "description": "Retrieve all questionnaire states for this exercise", "args": [ { - "name": "teamId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -7115,7 +7225,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "FileInfoType", + "name": "TeamQuestionnaireStateType", "ofType": null } }, @@ -7123,40 +7233,23 @@ "deprecationReason": null }, { - "name": "threadTemplate", - "description": "Retrieve the specific email template", - "args": [ - { - "name": "templateId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], + "name": "exerciseTimeLeft", + "description": "Retrieve the amount of time left in the running exercise in seconds", + "args": [], "type": { - "kind": "OBJECT", - "name": "EmailTemplateType", + "kind": "SCALAR", + "name": "Int", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "threadTemplates", - "description": "Retrieve all email templates for the specific thread", + "name": "exerciseTools", + "description": "Retrieve all tools for the specific exercise. Useful for analytics.", "args": [ { - "name": "threadId", + "name": "exerciseId", "description": null, "type": { "kind": "NON_NULL", @@ -7177,7 +7270,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "EmailTemplateType", + "name": "ToolType", "ofType": null } }, @@ -7185,40 +7278,51 @@ "deprecationReason": null }, { - "name": "user", - "description": null, + "name": "exercises", + "description": "Retrieve all exercises with optional parameters", "args": [ { - "name": "userId", - "description": null, + "name": "finished", + "description": "Retrieves only finished exercises, Not required", "type": { "kind": "SCALAR", - "name": "UUID", + "name": "Boolean", "ofType": null }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "UserType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "users", - "description": "Retrieve all users with filtering options", - "args": [ + }, { - "name": "filterUsersInput", - "description": null, + "name": "limit", + "description": "Skips first n results, Not required", "type": { - "kind": "INPUT_OBJECT", - "name": "FilterUsersInput", + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "running", + "description": "Retrieves only running exercises, Not required", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "skip", + "description": "Retrieves only the first n results, Not required", + "type": { + "kind": "SCALAR", + "name": "Int", "ofType": null }, "defaultValue": null, @@ -7231,7 +7335,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "UserType", + "name": "ExerciseType", "ofType": null } }, @@ -7239,34 +7343,51 @@ "deprecationReason": null }, { - "name": "validateEmailAddress", - "description": "Validates if the email address is valid for the specified exercise", + "name": "extendedTeamTools", + "description": "Retrieve all tools available to the specific team including all possible responses", "args": [ { - "name": "address", + "name": "teamId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "exerciseId", + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ExtendedToolType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "fileInfo", + "description": "Retrieve a specific file info", + "args": [ + { + "name": "fileInfoId", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "UUID", "ofType": null } }, @@ -7276,46 +7397,113 @@ } ], "type": { - "kind": "SCALAR", - "name": "Boolean", + "kind": "OBJECT", + "name": "FileInfoType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "whoAmI", - "description": "Retrieve data of the currently logged-in user of the request", - "args": [], + "name": "getEmailDraft", + "description": null, + "args": [ + { + "name": "emailThreadId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "instructor", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { "kind": "OBJECT", - "name": "UserType", + "name": "EmailDraftType", "ofType": null }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "QuestionType", - "description": null, - "fields": [ + }, { - "name": "control", + "name": "getEmailDrafts", "description": null, - "args": [], + "args": [ + { + "name": "instructor", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "ControlType", + "name": "EmailDraftType", "ofType": null } }, @@ -7323,31 +7511,32 @@ "deprecationReason": null }, { - "name": "correct", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "name": "injects", + "description": "Retrieve all automatic injects", + "args": [ + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "DefinitionInjectType", "ofType": null } }, @@ -7355,31 +7544,32 @@ "deprecationReason": null }, { - "name": "labels", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "name": "learningObjectives", + "description": "Retrieve all learning objectives for an exercise", + "args": [ + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "max", - "description": null, - "args": [], + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "LearningObjectiveType", "ofType": null } }, @@ -7387,15 +7577,32 @@ "deprecationReason": null }, { - "name": "questionnaire", - "description": null, - "args": [], + "name": "milestones", + "description": "Retrieve all milestones", + "args": [ + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "QuestionnaireType", + "name": "MilestoneType", "ofType": null } }, @@ -7403,42 +7610,373 @@ "deprecationReason": null }, { - "name": "text", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "QuestionnaireAnswerType", - "description": null, - "fields": [ + "name": "questionnaireState", + "description": "Retrieve the specific questionnaire state for this team", + "args": [ + { + "name": "questionnaireId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TeamQuestionnaireStateType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { - "name": "choice", - "description": null, + "name": "questionnaires", + "description": "Retrieve all questionnaires for an exercise", + "args": [ + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "QuestionnaireType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "description": "Retrieve all tags (for filtering)", "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "TagType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "team", + "description": "Retrieve a specific team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "TeamType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamActionLogs", + "description": "Retrieve all action logs for the specific team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActionLogType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamChannelLogs", + "description": "Retrieve all team action logs for the specific channel", + "args": [ + { + "name": "channelId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ActionLogType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamEmailParticipant", + "description": "Retrieve the email participant that belongs to the specified team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "EmailParticipantType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamLearningObjectives", + "description": "Retrieve the learning objectives for the specific team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamLearningObjectiveType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamMilestone", + "description": "Retrieve a specific milestone state", + "args": [ + { + "name": "milestoneStateId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "OBJECT", + "name": "MilestoneStateType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamMilestones", + "description": "Retrieve all milestones for the specific team filtered by team visibility", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "visibleOnly", + "description": "Not required, defaults to true returns only milestones that are visible to the team.\n If set to false then all milestones (even not visible to team) are sent", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneStateType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamQuestionnaires", + "description": "Retrieve all questionnaire states for this team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamQuestionnaireStateType", "ofType": null } }, @@ -7446,15 +7984,15 @@ "deprecationReason": null }, { - "name": "id", - "description": null, + "name": "teamRoles", + "description": "Retrieve all team roles for the running exercise", "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -7462,27 +8000,65 @@ "deprecationReason": null }, { - "name": "isCorrect", - "description": null, - "args": [], + "name": "teamTools", + "description": "Retrieve all tools available to the specific team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ToolType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "question", - "description": null, - "args": [], + "name": "teamUploadedFiles", + "description": "Retrieve all files uploaded by/to the specified team", + "args": [ + { + "name": "teamId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "QuestionType", + "name": "FileInfoType", "ofType": null } }, @@ -7490,97 +8066,191 @@ "deprecationReason": null }, { - "name": "teamQuestionnaireState", - "description": null, - "args": [], + "name": "threadTemplate", + "description": "Retrieve the specific email template", + "args": [ + { + "name": "templateId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "OBJECT", + "name": "EmailTemplateType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "threadTemplates", + "description": "Retrieve all email templates for the specific thread", + "args": [ + { + "name": "threadId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "type": { + "kind": "LIST", "name": null, "ofType": { "kind": "OBJECT", - "name": "TeamQuestionnaireStateType", + "name": "EmailTemplateType", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "QuestionnaireInput", - "description": null, - "fields": null, - "inputFields": [ + }, { - "name": "answers", + "name": "user", "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "AnswerInput", + "args": [ + { + "name": "userId", + "description": null, + "type": { + "kind": "SCALAR", + "name": "UUID", "ofType": null - } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } + ], + "type": { + "kind": "OBJECT", + "name": "UserType", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "questionnaireId", - "description": null, + "name": "users", + "description": "Retrieve all users with filtering options", + "args": [ + { + "name": "filterUsersInput", + "description": null, + "type": { + "kind": "INPUT_OBJECT", + "name": "FilterUsersInput", + "ofType": null + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "UserType", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "name": "validateEmailAddress", + "description": "Validates if the email address is valid for the specified exercise", + "args": [ + { + "name": "address", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "exerciseId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null } + ], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "whoAmI", + "description": "Retrieve data of the currently logged-in user of the request", + "args": [], + "type": { + "kind": "OBJECT", + "name": "UserType", + "ofType": null }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "interfaces": null, + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "QuestionnaireType", + "name": "QuestionType", "description": null, "fields": [ { - "name": "control", + "name": "content", "description": null, "args": [], "type": { @@ -7588,7 +8258,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ControlType", + "name": "ContentType", "ofType": null } }, @@ -7596,7 +8266,7 @@ "deprecationReason": null }, { - "name": "definition", + "name": "control", "description": null, "args": [], "type": { @@ -7604,7 +8274,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "DefinitionType", + "name": "ControlType", "ofType": null } }, @@ -7612,7 +8282,7 @@ "deprecationReason": null }, { - "name": "id", + "name": "correct", "description": null, "args": [], "type": { @@ -7620,7 +8290,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Int", "ofType": null } }, @@ -7628,67 +8298,39 @@ "deprecationReason": null }, { - "name": "overlay", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "OverlayType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "questions", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "teamQuestionnaireStates", + "name": "labels", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TeamQuestionnaireStateType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "String", + "ofType": null } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "time", + "name": "max", "description": null, "args": [], "type": { @@ -7704,15 +8346,15 @@ "deprecationReason": null }, { - "name": "title", + "name": "questionnaire", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "QuestionnaireType", "ofType": null } }, @@ -7727,11 +8369,11 @@ }, { "kind": "OBJECT", - "name": "ReadReceiptType", + "name": "QuestionnaireAnswerType", "description": null, "fields": [ { - "name": "actionLogId", + "name": "choice", "description": null, "args": [], "type": { @@ -7739,7 +8381,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Int", "ofType": null } }, @@ -7747,76 +8389,23 @@ "deprecationReason": null }, { - "name": "readReceipt", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "RemoveDefinitionAccessMutation", - "description": null, - "fields": [ - { - "name": "operationDone", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "RemoveInstructorsFromExerciseMutation", - "description": null, - "fields": [ - { - "name": "operationDone", + "name": "id", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "RemoveUsersFromTeamMutation", - "description": null, - "fields": [ + }, { - "name": "operationDone", + "name": "isCorrect", "description": null, "args": [], "type": { @@ -7826,38 +8415,35 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "RestrictedExercise", - "description": null, - "fields": [ + }, { - "name": "id", + "name": "question", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "QuestionType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "uuid", + "name": "teamQuestionnaireState", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "UUID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamQuestionnaireStateType", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -7869,42 +8455,34 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "RestrictedTeam", + "kind": "INPUT_OBJECT", + "name": "QuestionnaireInput", "description": null, - "fields": [ - { - "name": "emailAddress", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "EmailParticipantType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, + "fields": null, + "inputFields": [ { - "name": "exercise", + "name": "answers", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ExerciseType", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AnswerInput", + "ofType": null + } } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "questionnaireId", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, @@ -7914,62 +8492,62 @@ "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null }, { - "name": "name", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "role", + "name": "teamId", "description": null, - "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, + "defaultValue": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], + "interfaces": null, "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "RestrictedUser", + "name": "QuestionnaireType", "description": null, "fields": [ { - "name": "dateJoined", + "name": "control", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ControlType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "definition", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "DateTime", + "kind": "OBJECT", + "name": "DefinitionType", "ofType": null } }, @@ -7977,63 +8555,83 @@ "deprecationReason": null }, { - "name": "firstName", + "name": "id", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "group", + "name": "overlay", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "GroupType", + "name": "OverlayType", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "id", + "name": "questions", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "UUID", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "QuestionType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "isActive", + "name": "teamQuestionnaireStates", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamQuestionnaireStateType", + "ofType": null + } + } } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "isImported", + "name": "time", "description": null, "args": [], "type": { @@ -8041,7 +8639,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "Int", "ofType": null } }, @@ -8049,7 +8647,7 @@ "deprecationReason": null }, { - "name": "isStaff", + "name": "title", "description": null, "args": [], "type": { @@ -8057,15 +8655,26 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "String", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ReadReceiptType", + "description": null, + "fields": [ { - "name": "isSuperuser", + "name": "actionLogId", "description": null, "args": [], "type": { @@ -8073,7 +8682,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "ID", "ofType": null } }, @@ -8081,7 +8690,7 @@ "deprecationReason": null }, { - "name": "lastLogin", + "name": "readReceipt", "description": null, "args": [], "type": { @@ -8091,71 +8700,72 @@ }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RegenerateCredentialsMutation", + "description": null, + "fields": [ { - "name": "lastName", + "name": "operationDone", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "password", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemoveDefinitionAccessMutation", + "description": null, + "fields": [ { - "name": "tags", + "name": "operationDone", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "TagType", - "ofType": null - } - } - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RemoveInstructorsFromExerciseMutation", + "description": null, + "fields": [ { - "name": "username", + "name": "operationDone", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -8167,165 +8777,164 @@ "possibleTypes": null }, { - "kind": "INPUT_OBJECT", - "name": "SelectTeamInjectInput", + "kind": "OBJECT", + "name": "RemoveUsersFromTeamMutation", "description": null, - "fields": null, - "inputFields": [ + "fields": [ { - "name": "activateMilestone", + "name": "operationDone", "description": null, + "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null }, - "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RestrictedExercise", + "description": null, + "fields": [ { - "name": "content", + "name": "id", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "ID", "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "deactivateMilestone", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null }, { - "name": "fileId", + "name": "name", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "UUID", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, - "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null }, { - "name": "optionEmail", + "name": "uuid", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "UUID", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - }, + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RestrictedTeam", + "description": null, + "fields": [ { - "name": "repeat", + "name": "emailAddress", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "Int", + "kind": "OBJECT", + "name": "EmailParticipantType", "ofType": null }, - "defaultValue": "0", "isDeprecated": false, "deprecationReason": null }, { - "name": "selectionId", + "name": "exercise", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "ExerciseType", "ofType": null } }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "sender", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null }, { - "name": "subject", + "name": "id", "description": null, + "args": [], "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } }, - "defaultValue": "\"\"", "isDeprecated": false, "deprecationReason": null }, { - "name": "teamId", + "name": "name", "description": null, + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, - "defaultValue": null, "isDeprecated": false, "deprecationReason": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "SelectTeamInjectOptionMutation", - "description": null, - "fields": [ + }, { - "name": "operationDone", + "name": "role", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -8338,23 +8947,11 @@ }, { "kind": "OBJECT", - "name": "SelectTeamInjectType", + "name": "RestrictedUser", "description": null, "fields": [ { - "name": "activateMilestone", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "content", + "name": "dateJoined", "description": null, "args": [], "type": { @@ -8362,7 +8959,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "DateTime", "ofType": null } }, @@ -8370,7 +8967,7 @@ "deprecationReason": null }, { - "name": "deactivateMilestone", + "name": "firstName", "description": null, "args": [], "type": { @@ -8382,19 +8979,19 @@ "deprecationReason": null }, { - "name": "fileId", + "name": "group", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "UUID", + "kind": "ENUM", + "name": "AuthGroup", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "optionEmail", + "name": "id", "description": null, "args": [], "type": { @@ -8402,7 +8999,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Boolean", + "name": "UUID", "ofType": null } }, @@ -8410,19 +9007,23 @@ "deprecationReason": null }, { - "name": "repeat", + "name": "isActive", "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null }, { - "name": "selectionId", + "name": "isImported", "description": null, "args": [], "type": { @@ -8430,7 +9031,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "Boolean", "ofType": null } }, @@ -8438,19 +9039,19 @@ "deprecationReason": null }, { - "name": "sender", + "name": "lastLogin", "description": null, "args": [], "type": { "kind": "SCALAR", - "name": "String", + "name": "DateTime", "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "subject", + "name": "lastName", "description": null, "args": [], "type": { @@ -8462,7 +9063,31 @@ "deprecationReason": null }, { - "name": "teamId", + "name": "tags", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TagType", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "username", "description": null, "args": [], "type": { @@ -8470,7 +9095,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, @@ -8483,6 +9108,29 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "SendCustomInjectMutation", + "description": null, + "fields": [ + { + "name": "operationDone", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "SendEmailInput", @@ -8711,6 +9359,35 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "ENUM", + "name": "Status", + "description": "An enumeration.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "ANSWERED", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "SENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "UNSENT", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "StopExerciseMutation", @@ -8911,31 +9588,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "injectSelections", - "description": "Subscription notifies about new inject selections available for the specific team", - "args": [ - { - "name": "teamId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null, - "isDeprecated": false, - "deprecationReason": null - } - ], - "type": { - "kind": "OBJECT", - "name": "InjectSelectionsSubscription", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "milestones", "description": "Subscription notifies about changes in milestone states", @@ -9229,35 +9881,6 @@ "enumValues": null, "possibleTypes": null }, - { - "kind": "ENUM", - "name": "TeamQuestionnaireStateStatus", - "description": "An enumeration.", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": [ - { - "name": "A_0", - "description": "Unsent", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "A_2", - "description": "Sent", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "A_4", - "description": "Answered", - "isDeprecated": false, - "deprecationReason": null - } - ], - "possibleTypes": null - }, { "kind": "OBJECT", "name": "TeamQuestionnaireStateSubscription", @@ -9351,13 +9974,9 @@ "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "TeamQuestionnaireStateStatus", - "ofType": null - } + "kind": "ENUM", + "name": "Status", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -9445,49 +10064,25 @@ "name": "finishTime", "description": null, "args": [], - "type": { - "kind": "SCALAR", - "name": "DateTime", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "id", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null }, "isDeprecated": false, "deprecationReason": null }, { - "name": "injectSelections", + "name": "id", "description": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "InjectSelectionType", - "ofType": null - } - } + "kind": "SCALAR", + "name": "ID", + "ofType": null } }, "isDeprecated": false, @@ -9657,7 +10252,7 @@ "name": null, "ofType": { "kind": "OBJECT", - "name": "ExtendedToolType", + "name": "ToolType", "ofType": null } }, @@ -9903,9 +10498,46 @@ "deprecationReason": null }, { - "name": "toolDetails", + "name": "tooltipDescription", "description": null, "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "SCALAR", + "name": "UUID", + "description": "Leverages the internal Python implmeentation of UUID (uuid.UUID) to provide native UUID objects\nin fields, resolvers and input.", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateTagAssignmentsInput", + "description": null, + "fields": null, + "inputFields": [ + { + "name": "addTags", + "description": null, "type": { "kind": "NON_NULL", "name": null, @@ -9916,18 +10548,77 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "ToolDetailsType", + "kind": "SCALAR", + "name": "ID", "ofType": null } } } }, + "defaultValue": "[]", "isDeprecated": false, "deprecationReason": null }, { - "name": "tooltipDescription", + "name": "removeTags", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": "[]", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userIds", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "defaultValue": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateTagAssignmentsMutation", + "description": null, + "fields": [ + { + "name": "operationDone", "description": null, "args": [], "type": { @@ -9935,7 +10626,7 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "String", + "name": "Boolean", "ofType": null } }, @@ -9949,12 +10640,112 @@ "possibleTypes": null }, { - "kind": "SCALAR", - "name": "UUID", - "description": "Leverages the internal Python implmeentation of UUID (uuid.UUID) to provide native UUID objects\nin fields, resolvers and input.", - "fields": null, + "kind": "OBJECT", + "name": "UpdateTagAssignmentsType", + "description": null, + "fields": [ + { + "name": "addTags", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "removeTags", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userIds", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], "inputFields": null, - "interfaces": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateTagMutation", + "description": null, + "fields": [ + { + "name": "updatedTag", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TagType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], "enumValues": null, "possibleTypes": null }, @@ -10169,8 +10960,8 @@ "description": null, "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "ENUM", + "name": "AuthGroup", "ofType": null }, "isDeprecated": false, @@ -10224,38 +11015,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "isStaff", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "isSuperuser", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "lastLogin", "description": null, diff --git a/graphql/mutations/AssignUsersByTags.generated.ts b/graphql/mutations/AssignUsersByTags.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..9c41768aa7020e63db5e0ec77004f54807f7a49e --- /dev/null +++ b/graphql/mutations/AssignUsersByTags.generated.ts @@ -0,0 +1,46 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type AssignUsersByTagsVariables = _Types.Exact<{ + exerciseId: _Types.Scalars['ID']['input']; + tagPrefix: _Types.Scalars['String']['input']; + userIds: Array<_Types.Scalars['ID']['input']> | _Types.Scalars['ID']['input']; +}>; + + +export type AssignUsersByTags = { assignUsersByTags: { operationDone: boolean | null } | null }; + + +export const AssignUsersByTagsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AssignUsersByTags"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tagPrefix"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignUsersByTags"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}},{"kind":"Argument","name":{"kind":"Name","value":"tagPrefix"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tagPrefix"}}},{"kind":"Argument","name":{"kind":"Name","value":"userIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type AssignUsersByTagsMutationFn = Apollo.MutationFunction<AssignUsersByTags, AssignUsersByTagsVariables>; + +/** + * __useAssignUsersByTags__ + * + * To run a mutation, you first call `useAssignUsersByTags` within a React component and pass it any options that fit your needs. + * When your component renders, `useAssignUsersByTags` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [assignUsersByTags, { data, loading, error }] = useAssignUsersByTags({ + * variables: { + * exerciseId: // value for 'exerciseId' + * tagPrefix: // value for 'tagPrefix' + * userIds: // value for 'userIds' + * }, + * }); + */ +export function useAssignUsersByTags(baseOptions?: Apollo.MutationHookOptions<AssignUsersByTags, AssignUsersByTagsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<AssignUsersByTags, AssignUsersByTagsVariables>(AssignUsersByTagsDocument, options); + } +export type AssignUsersByTagsHookResult = ReturnType<typeof useAssignUsersByTags>; +export type AssignUsersByTagsMutationResult = Apollo.MutationResult<AssignUsersByTags>; +export type AssignUsersByTagsMutationOptions = Apollo.BaseMutationOptions<AssignUsersByTags, AssignUsersByTagsVariables>; \ No newline at end of file diff --git a/graphql/mutations/AssignUsersEqually.generated.ts b/graphql/mutations/AssignUsersEqually.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..b28a10da649633c1c70af5df4218414153fff9aa --- /dev/null +++ b/graphql/mutations/AssignUsersEqually.generated.ts @@ -0,0 +1,44 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type AssignUsersEquallyVariables = _Types.Exact<{ + exerciseId: _Types.Scalars['ID']['input']; + userIds: Array<_Types.Scalars['ID']['input']> | _Types.Scalars['ID']['input']; +}>; + + +export type AssignUsersEqually = { assignUsersEqually: { operationDone: boolean | null } | null }; + + +export const AssignUsersEquallyDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AssignUsersEqually"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"assignUsersEqually"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}},{"kind":"Argument","name":{"kind":"Name","value":"userIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type AssignUsersEquallyMutationFn = Apollo.MutationFunction<AssignUsersEqually, AssignUsersEquallyVariables>; + +/** + * __useAssignUsersEqually__ + * + * To run a mutation, you first call `useAssignUsersEqually` within a React component and pass it any options that fit your needs. + * When your component renders, `useAssignUsersEqually` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [assignUsersEqually, { data, loading, error }] = useAssignUsersEqually({ + * variables: { + * exerciseId: // value for 'exerciseId' + * userIds: // value for 'userIds' + * }, + * }); + */ +export function useAssignUsersEqually(baseOptions?: Apollo.MutationHookOptions<AssignUsersEqually, AssignUsersEquallyVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<AssignUsersEqually, AssignUsersEquallyVariables>(AssignUsersEquallyDocument, options); + } +export type AssignUsersEquallyHookResult = ReturnType<typeof useAssignUsersEqually>; +export type AssignUsersEquallyMutationResult = Apollo.MutationResult<AssignUsersEqually>; +export type AssignUsersEquallyMutationOptions = Apollo.BaseMutationOptions<AssignUsersEqually, AssignUsersEquallyVariables>; \ No newline at end of file diff --git a/graphql/mutations/ChangeUserData.generated.ts b/graphql/mutations/ChangeUserData.generated.ts index 3ab3d8d7edcd02b1abd853dd026912f26934bc37..650e32b5fc0832f5b14eced846ef7aef9557d096 100644 --- a/graphql/mutations/ChangeUserData.generated.ts +++ b/graphql/mutations/ChangeUserData.generated.ts @@ -7,15 +7,15 @@ import * as Apollo from '@apollo/client'; const defaultOptions = {} as const; export type ChangeUserDataVariables = _Types.Exact<{ userId: _Types.Scalars['UUID']['input']; - group: _Types.InputMaybe<_Types.Scalars['String']['input']>; + group: _Types.InputMaybe<_Types.AuthGroup>; active: _Types.InputMaybe<_Types.Scalars['Boolean']['input']>; }>; -export type ChangeUserData = { changeUserData: { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null } | null }; +export type ChangeUserData = { changeUserData: { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null } | null }; -export const ChangeUserDataDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ChangeUserData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"group"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"active"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"changeUserData"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"changeUserInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"group"},"value":{"kind":"Variable","name":{"kind":"Name","value":"group"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"Variable","name":{"kind":"Name","value":"active"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; +export const ChangeUserDataDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ChangeUserData"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"group"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthGroup"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"active"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"changeUserData"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"changeUserInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"group"},"value":{"kind":"Variable","name":{"kind":"Name","value":"group"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"Variable","name":{"kind":"Name","value":"active"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; export type ChangeUserDataMutationFn = Apollo.MutationFunction<ChangeUserData, ChangeUserDataVariables>; /** diff --git a/graphql/mutations/CopyUsersAssignment.generated.ts b/graphql/mutations/CopyUsersAssignment.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..c8cff9e850d9376bc1f91061db01ae9df0d482ae --- /dev/null +++ b/graphql/mutations/CopyUsersAssignment.generated.ts @@ -0,0 +1,44 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type CopyUsersAssignmentVariables = _Types.Exact<{ + fromExerciseId: _Types.Scalars['ID']['input']; + toExerciseId: _Types.Scalars['ID']['input']; +}>; + + +export type CopyUsersAssignment = { copyUsersAssignment: { operationDone: boolean | null } | null }; + + +export const CopyUsersAssignmentDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CopyUsersAssignment"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"fromExerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"toExerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"copyUsersAssignment"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"fromExerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"fromExerciseId"}}},{"kind":"Argument","name":{"kind":"Name","value":"toExerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"toExerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type CopyUsersAssignmentMutationFn = Apollo.MutationFunction<CopyUsersAssignment, CopyUsersAssignmentVariables>; + +/** + * __useCopyUsersAssignment__ + * + * To run a mutation, you first call `useCopyUsersAssignment` within a React component and pass it any options that fit your needs. + * When your component renders, `useCopyUsersAssignment` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [copyUsersAssignment, { data, loading, error }] = useCopyUsersAssignment({ + * variables: { + * fromExerciseId: // value for 'fromExerciseId' + * toExerciseId: // value for 'toExerciseId' + * }, + * }); + */ +export function useCopyUsersAssignment(baseOptions?: Apollo.MutationHookOptions<CopyUsersAssignment, CopyUsersAssignmentVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<CopyUsersAssignment, CopyUsersAssignmentVariables>(CopyUsersAssignmentDocument, options); + } +export type CopyUsersAssignmentHookResult = ReturnType<typeof useCopyUsersAssignment>; +export type CopyUsersAssignmentMutationResult = Apollo.MutationResult<CopyUsersAssignment>; +export type CopyUsersAssignmentMutationOptions = Apollo.BaseMutationOptions<CopyUsersAssignment, CopyUsersAssignmentVariables>; \ No newline at end of file diff --git a/graphql/mutations/CreateExercise.generated.ts b/graphql/mutations/CreateExercise.generated.ts index 2a02d816cc358efd774f4cf7305b31b946eca775..94709d47df6559fa92f99b6366a7f250d8261b71 100644 --- a/graphql/mutations/CreateExercise.generated.ts +++ b/graphql/mutations/CreateExercise.generated.ts @@ -12,10 +12,10 @@ export type CreateExercisesVariables = _Types.Exact<{ }>; -export type CreateExercises = { createExercise: { exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null } | null }; +export type CreateExercises = { createExercise: { exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null } | null }; -export const CreateExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateExercises"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamCount"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createExercise"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createExerciseInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"definitionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"teamCount"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamCount"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const CreateExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateExercises"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamCount"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"name"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createExercise"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createExerciseInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"definitionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"teamCount"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamCount"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"name"},"value":{"kind":"Variable","name":{"kind":"Name","value":"name"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; export type CreateExercisesMutationFn = Apollo.MutationFunction<CreateExercises, CreateExercisesVariables>; /** diff --git a/graphql/mutations/CreateThread.generated.ts b/graphql/mutations/CreateThread.generated.ts index ed718368c09ccf072aa5cb25d43b051cab379479..6504cf2d75cea8d7ec410c7e16fde7db0c95ecbc 100644 --- a/graphql/mutations/CreateThread.generated.ts +++ b/graphql/mutations/CreateThread.generated.ts @@ -12,10 +12,10 @@ export type CreateThreadVariables = _Types.Exact<{ }>; -export type CreateThread = { createThread: { thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null } | null }; +export type CreateThread = { createThread: { thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null } | null }; -export const CreateThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"participantAddresses"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subject"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}},{"kind":"Argument","name":{"kind":"Name","value":"participantAddresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"participantAddresses"}}},{"kind":"Argument","name":{"kind":"Name","value":"subject"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subject"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const CreateThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"participantAddresses"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"subject"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}},{"kind":"Argument","name":{"kind":"Name","value":"participantAddresses"},"value":{"kind":"Variable","name":{"kind":"Name","value":"participantAddresses"}}},{"kind":"Argument","name":{"kind":"Name","value":"subject"},"value":{"kind":"Variable","name":{"kind":"Name","value":"subject"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; export type CreateThreadMutationFn = Apollo.MutationFunction<CreateThread, CreateThreadVariables>; /** diff --git a/graphql/mutations/CreateUser.generated.ts b/graphql/mutations/CreateUser.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..971338a6146e380fd6aca9239eebd813ef424c48 --- /dev/null +++ b/graphql/mutations/CreateUser.generated.ts @@ -0,0 +1,50 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type CreateUserVariables = _Types.Exact<{ + email: _Types.Scalars['String']['input']; + firstName: _Types.InputMaybe<_Types.Scalars['String']['input']>; + lastName: _Types.InputMaybe<_Types.Scalars['String']['input']>; + tags: Array<_Types.Scalars['String']['input']> | _Types.Scalars['String']['input']; + group: _Types.InputMaybe<_Types.AuthGroup>; +}>; + + +export type CreateUser = { createUser: { newUser: { id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } } | null }; + + +export const CreateUserDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"CreateUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"email"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"firstName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"lastName"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tags"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"group"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthGroup"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"createUser"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"createUserInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"email"},"value":{"kind":"Variable","name":{"kind":"Name","value":"email"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"firstName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"firstName"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"lastName"},"value":{"kind":"Variable","name":{"kind":"Name","value":"lastName"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"tags"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tags"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"group"},"value":{"kind":"Variable","name":{"kind":"Name","value":"group"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"newUser"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; +export type CreateUserMutationFn = Apollo.MutationFunction<CreateUser, CreateUserVariables>; + +/** + * __useCreateUser__ + * + * To run a mutation, you first call `useCreateUser` within a React component and pass it any options that fit your needs. + * When your component renders, `useCreateUser` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [createUser, { data, loading, error }] = useCreateUser({ + * variables: { + * email: // value for 'email' + * firstName: // value for 'firstName' + * lastName: // value for 'lastName' + * tags: // value for 'tags' + * group: // value for 'group' + * }, + * }); + */ +export function useCreateUser(baseOptions?: Apollo.MutationHookOptions<CreateUser, CreateUserVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<CreateUser, CreateUserVariables>(CreateUserDocument, options); + } +export type CreateUserHookResult = ReturnType<typeof useCreateUser>; +export type CreateUserMutationResult = Apollo.MutationResult<CreateUser>; +export type CreateUserMutationOptions = Apollo.BaseMutationOptions<CreateUser, CreateUserVariables>; \ No newline at end of file diff --git a/graphql/mutations/DeleteUsers.generated.ts b/graphql/mutations/DeleteUsers.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..8517a46aa4c2dbf27f7747ea08a63764d66b2799 --- /dev/null +++ b/graphql/mutations/DeleteUsers.generated.ts @@ -0,0 +1,42 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type DeleteUsersVariables = _Types.Exact<{ + userIds: Array<_Types.InputMaybe<_Types.Scalars['ID']['input']>> | _Types.InputMaybe<_Types.Scalars['ID']['input']>; +}>; + + +export type DeleteUsers = { deleteUsers: { operationDone: boolean | null } | null }; + + +export const DeleteUsersDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteUsers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteUsers"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type DeleteUsersMutationFn = Apollo.MutationFunction<DeleteUsers, DeleteUsersVariables>; + +/** + * __useDeleteUsers__ + * + * To run a mutation, you first call `useDeleteUsers` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteUsers` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteUsers, { data, loading, error }] = useDeleteUsers({ + * variables: { + * userIds: // value for 'userIds' + * }, + * }); + */ +export function useDeleteUsers(baseOptions?: Apollo.MutationHookOptions<DeleteUsers, DeleteUsersVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<DeleteUsers, DeleteUsersVariables>(DeleteUsersDocument, options); + } +export type DeleteUsersHookResult = ReturnType<typeof useDeleteUsers>; +export type DeleteUsersMutationResult = Apollo.MutationResult<DeleteUsers>; +export type DeleteUsersMutationOptions = Apollo.BaseMutationOptions<DeleteUsers, DeleteUsersVariables>; \ No newline at end of file diff --git a/graphql/mutations/Login.generated.ts b/graphql/mutations/Login.generated.ts index ff391de8ee4d1ebb96ca8e4d65a8267a81a6a7cc..347fc55b962109252be288f48138f3c56c239658 100644 --- a/graphql/mutations/Login.generated.ts +++ b/graphql/mutations/Login.generated.ts @@ -11,10 +11,10 @@ export type LoginVariables = _Types.Exact<{ }>; -export type Login = { login: { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null } | null }; +export type Login = { login: { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null } | null }; -export const LoginDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"Login"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"username"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"password"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"login"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"username"},"value":{"kind":"Variable","name":{"kind":"Name","value":"username"}}},{"kind":"Argument","name":{"kind":"Name","value":"password"},"value":{"kind":"Variable","name":{"kind":"Name","value":"password"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; +export const LoginDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"Login"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"username"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"password"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"login"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"username"},"value":{"kind":"Variable","name":{"kind":"Name","value":"username"}}},{"kind":"Argument","name":{"kind":"Name","value":"password"},"value":{"kind":"Variable","name":{"kind":"Name","value":"password"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; export type LoginMutationFn = Apollo.MutationFunction<Login, LoginVariables>; /** diff --git a/graphql/mutations/RegenerateCredentials.generated.ts b/graphql/mutations/RegenerateCredentials.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..381cc31adab4c9b7a40eb725d0583e655ca11325 --- /dev/null +++ b/graphql/mutations/RegenerateCredentials.generated.ts @@ -0,0 +1,42 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type RegenerateCredentialsVariables = _Types.Exact<{ + userIds: Array<_Types.InputMaybe<_Types.Scalars['ID']['input']>> | _Types.InputMaybe<_Types.Scalars['ID']['input']>; +}>; + + +export type RegenerateCredentials = { regenerateCredentials: { operationDone: boolean | null } | null }; + + +export const RegenerateCredentialsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"RegenerateCredentials"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"regenerateCredentials"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userIds"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userIds"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type RegenerateCredentialsMutationFn = Apollo.MutationFunction<RegenerateCredentials, RegenerateCredentialsVariables>; + +/** + * __useRegenerateCredentials__ + * + * To run a mutation, you first call `useRegenerateCredentials` within a React component and pass it any options that fit your needs. + * When your component renders, `useRegenerateCredentials` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [regenerateCredentials, { data, loading, error }] = useRegenerateCredentials({ + * variables: { + * userIds: // value for 'userIds' + * }, + * }); + */ +export function useRegenerateCredentials(baseOptions?: Apollo.MutationHookOptions<RegenerateCredentials, RegenerateCredentialsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<RegenerateCredentials, RegenerateCredentialsVariables>(RegenerateCredentialsDocument, options); + } +export type RegenerateCredentialsHookResult = ReturnType<typeof useRegenerateCredentials>; +export type RegenerateCredentialsMutationResult = Apollo.MutationResult<RegenerateCredentials>; +export type RegenerateCredentialsMutationOptions = Apollo.BaseMutationOptions<RegenerateCredentials, RegenerateCredentialsVariables>; \ No newline at end of file diff --git a/graphql/mutations/SelectTeamInjectOption.generated.ts b/graphql/mutations/SelectTeamInjectOption.generated.ts deleted file mode 100644 index facd111f6726fef7591fec33fdd833e6bce7b7ad..0000000000000000000000000000000000000000 --- a/graphql/mutations/SelectTeamInjectOption.generated.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type SelectTeamInjectOptionVariables = _Types.Exact<{ - selectTeamInjectInput: _Types.SelectTeamInjectInput; -}>; - - -export type SelectTeamInjectOption = { selectTeamInjectOption: { operationDone: boolean | null } | null }; - - -export const SelectTeamInjectOptionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SelectTeamInjectOption"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"selectTeamInjectInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"SelectTeamInjectInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"selectTeamInjectOption"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"selectTeamInjectInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"selectTeamInjectInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; -export type SelectTeamInjectOptionMutationFn = Apollo.MutationFunction<SelectTeamInjectOption, SelectTeamInjectOptionVariables>; - -/** - * __useSelectTeamInjectOption__ - * - * To run a mutation, you first call `useSelectTeamInjectOption` within a React component and pass it any options that fit your needs. - * When your component renders, `useSelectTeamInjectOption` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [selectTeamInjectOption, { data, loading, error }] = useSelectTeamInjectOption({ - * variables: { - * selectTeamInjectInput: // value for 'selectTeamInjectInput' - * }, - * }); - */ -export function useSelectTeamInjectOption(baseOptions?: Apollo.MutationHookOptions<SelectTeamInjectOption, SelectTeamInjectOptionVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<SelectTeamInjectOption, SelectTeamInjectOptionVariables>(SelectTeamInjectOptionDocument, options); - } -export type SelectTeamInjectOptionHookResult = ReturnType<typeof useSelectTeamInjectOption>; -export type SelectTeamInjectOptionMutationResult = Apollo.MutationResult<SelectTeamInjectOption>; -export type SelectTeamInjectOptionMutationOptions = Apollo.BaseMutationOptions<SelectTeamInjectOption, SelectTeamInjectOptionVariables>; \ No newline at end of file diff --git a/graphql/mutations/SendCustomInject.generated.ts b/graphql/mutations/SendCustomInject.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..17756490b2fb64f47a34cd4c661962014d5306b8 --- /dev/null +++ b/graphql/mutations/SendCustomInject.generated.ts @@ -0,0 +1,42 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type SendCustomInjectVariables = _Types.Exact<{ + customInjectInput: _Types.CustomInjectInput; +}>; + + +export type SendCustomInject = { sendCustomInject: { operationDone: boolean | null } | null }; + + +export const SendCustomInjectDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SendCustomInject"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"customInjectInput"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"sendCustomInject"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"customInjectInput"},"value":{"kind":"Variable","name":{"kind":"Name","value":"customInjectInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type SendCustomInjectMutationFn = Apollo.MutationFunction<SendCustomInject, SendCustomInjectVariables>; + +/** + * __useSendCustomInject__ + * + * To run a mutation, you first call `useSendCustomInject` within a React component and pass it any options that fit your needs. + * When your component renders, `useSendCustomInject` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [sendCustomInject, { data, loading, error }] = useSendCustomInject({ + * variables: { + * customInjectInput: // value for 'customInjectInput' + * }, + * }); + */ +export function useSendCustomInject(baseOptions?: Apollo.MutationHookOptions<SendCustomInject, SendCustomInjectVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<SendCustomInject, SendCustomInjectVariables>(SendCustomInjectDocument, options); + } +export type SendCustomInjectHookResult = ReturnType<typeof useSendCustomInject>; +export type SendCustomInjectMutationResult = Apollo.MutationResult<SendCustomInject>; +export type SendCustomInjectMutationOptions = Apollo.BaseMutationOptions<SendCustomInject, SendCustomInjectVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/DeleteEmailDraft.generated.ts b/graphql/mutations/clientonly/DeleteEmailDraft.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..7a68baf0b210373abea505073e15fbe0d41227fe --- /dev/null +++ b/graphql/mutations/clientonly/DeleteEmailDraft.generated.ts @@ -0,0 +1,46 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type DeleteEmailDraftVariables = _Types.Exact<{ + teamId: _Types.Scalars['ID']['input']; + instructor: _Types.Scalars['Boolean']['input']; + emailThreadId: _Types.InputMaybe<_Types.Scalars['ID']['input']>; +}>; + + +export type DeleteEmailDraft = { deleteEmailDraft: { operationDone: boolean | null } | null }; + + +export const DeleteEmailDraftDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"DeleteEmailDraft"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"deleteEmailDraft"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"instructor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}}},{"kind":"Argument","name":{"kind":"Name","value":"emailThreadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type DeleteEmailDraftMutationFn = Apollo.MutationFunction<DeleteEmailDraft, DeleteEmailDraftVariables>; + +/** + * __useDeleteEmailDraft__ + * + * To run a mutation, you first call `useDeleteEmailDraft` within a React component and pass it any options that fit your needs. + * When your component renders, `useDeleteEmailDraft` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [deleteEmailDraft, { data, loading, error }] = useDeleteEmailDraft({ + * variables: { + * teamId: // value for 'teamId' + * instructor: // value for 'instructor' + * emailThreadId: // value for 'emailThreadId' + * }, + * }); + */ +export function useDeleteEmailDraft(baseOptions?: Apollo.MutationHookOptions<DeleteEmailDraft, DeleteEmailDraftVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<DeleteEmailDraft, DeleteEmailDraftVariables>(DeleteEmailDraftDocument, options); + } +export type DeleteEmailDraftHookResult = ReturnType<typeof useDeleteEmailDraft>; +export type DeleteEmailDraftMutationResult = Apollo.MutationResult<DeleteEmailDraft>; +export type DeleteEmailDraftMutationOptions = Apollo.BaseMutationOptions<DeleteEmailDraft, DeleteEmailDraftVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/ResetReadReceiptChannel.generated.ts b/graphql/mutations/clientonly/ResetReadReceiptChannel.generated.ts deleted file mode 100644 index 81222739728fef7852c973000d98dc4952a12f01..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/ResetReadReceiptChannel.generated.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type ResetReadReceiptChannelVariables = _Types.Exact<{ - channelId: _Types.Scalars['ID']['input']; - teamId: _Types.Scalars['ID']['input']; -}>; - - -export type ResetReadReceiptChannel = { resetReadReceiptChannel: { channelId: string, readReceipt: string | null } | null }; - - -export const ResetReadReceiptChannelDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetReadReceiptChannel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetReadReceiptChannel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}}]}}]}}]} as unknown as DocumentNode; -export type ResetReadReceiptChannelMutationFn = Apollo.MutationFunction<ResetReadReceiptChannel, ResetReadReceiptChannelVariables>; - -/** - * __useResetReadReceiptChannel__ - * - * To run a mutation, you first call `useResetReadReceiptChannel` within a React component and pass it any options that fit your needs. - * When your component renders, `useResetReadReceiptChannel` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [resetReadReceiptChannel, { data, loading, error }] = useResetReadReceiptChannel({ - * variables: { - * channelId: // value for 'channelId' - * teamId: // value for 'teamId' - * }, - * }); - */ -export function useResetReadReceiptChannel(baseOptions?: Apollo.MutationHookOptions<ResetReadReceiptChannel, ResetReadReceiptChannelVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<ResetReadReceiptChannel, ResetReadReceiptChannelVariables>(ResetReadReceiptChannelDocument, options); - } -export type ResetReadReceiptChannelHookResult = ReturnType<typeof useResetReadReceiptChannel>; -export type ResetReadReceiptChannelMutationResult = Apollo.MutationResult<ResetReadReceiptChannel>; -export type ResetReadReceiptChannelMutationOptions = Apollo.BaseMutationOptions<ResetReadReceiptChannel, ResetReadReceiptChannelVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/ResetReadReceiptEmailThread.generated.ts b/graphql/mutations/clientonly/ResetReadReceiptEmailThread.generated.ts deleted file mode 100644 index 6276ffe197b620dc2f565e1a33044866c329af09..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/ResetReadReceiptEmailThread.generated.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type ResetReadReceiptEmailThreadVariables = _Types.Exact<{ - emailThreadId: _Types.Scalars['ID']['input']; -}>; - - -export type ResetReadReceiptEmailThread = { resetReadReceiptEmailThread: { emailThreadId: string, readReceipt: string | null } | null }; - - -export const ResetReadReceiptEmailThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"ResetReadReceiptEmailThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"resetReadReceiptEmailThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"emailThreadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}}]}}]}}]} as unknown as DocumentNode; -export type ResetReadReceiptEmailThreadMutationFn = Apollo.MutationFunction<ResetReadReceiptEmailThread, ResetReadReceiptEmailThreadVariables>; - -/** - * __useResetReadReceiptEmailThread__ - * - * To run a mutation, you first call `useResetReadReceiptEmailThread` within a React component and pass it any options that fit your needs. - * When your component renders, `useResetReadReceiptEmailThread` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [resetReadReceiptEmailThread, { data, loading, error }] = useResetReadReceiptEmailThread({ - * variables: { - * emailThreadId: // value for 'emailThreadId' - * }, - * }); - */ -export function useResetReadReceiptEmailThread(baseOptions?: Apollo.MutationHookOptions<ResetReadReceiptEmailThread, ResetReadReceiptEmailThreadVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<ResetReadReceiptEmailThread, ResetReadReceiptEmailThreadVariables>(ResetReadReceiptEmailThreadDocument, options); - } -export type ResetReadReceiptEmailThreadHookResult = ReturnType<typeof useResetReadReceiptEmailThread>; -export type ResetReadReceiptEmailThreadMutationResult = Apollo.MutationResult<ResetReadReceiptEmailThread>; -export type ResetReadReceiptEmailThreadMutationOptions = Apollo.BaseMutationOptions<ResetReadReceiptEmailThread, ResetReadReceiptEmailThreadVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/SetEmailDraft.generated.ts b/graphql/mutations/clientonly/SetEmailDraft.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..f29a4ea1477d95b33ed43f284d80130f2bcaea02 --- /dev/null +++ b/graphql/mutations/clientonly/SetEmailDraft.generated.ts @@ -0,0 +1,42 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type SetEmailDraftVariables = _Types.Exact<{ + emailDraft: _Types.EmailDraftInput; +}>; + + +export type SetEmailDraft = { setEmailDraft: { teamId: string, instructor: boolean, emailThreadId: string | null, senderAddress: string | null, content: string | null, activateMilestone: string | null, deactivateMilestone: string | null, fileId: any | null, selectedContacts: Array<string | null> | null, subject: string | null, templateId: string | null } | null }; + + +export const SetEmailDraftDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"SetEmailDraft"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailDraft"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setEmailDraft"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"emailDraft"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailDraft"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraft"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraft"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"instructor"}},{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderAddress"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"selectedContacts"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"templateId"}}]}}]} as unknown as DocumentNode; +export type SetEmailDraftMutationFn = Apollo.MutationFunction<SetEmailDraft, SetEmailDraftVariables>; + +/** + * __useSetEmailDraft__ + * + * To run a mutation, you first call `useSetEmailDraft` within a React component and pass it any options that fit your needs. + * When your component renders, `useSetEmailDraft` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [setEmailDraft, { data, loading, error }] = useSetEmailDraft({ + * variables: { + * emailDraft: // value for 'emailDraft' + * }, + * }); + */ +export function useSetEmailDraft(baseOptions?: Apollo.MutationHookOptions<SetEmailDraft, SetEmailDraftVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<SetEmailDraft, SetEmailDraftVariables>(SetEmailDraftDocument, options); + } +export type SetEmailDraftHookResult = ReturnType<typeof useSetEmailDraft>; +export type SetEmailDraftMutationResult = Apollo.MutationResult<SetEmailDraft>; +export type SetEmailDraftMutationOptions = Apollo.BaseMutationOptions<SetEmailDraft, SetEmailDraftVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/SetIsUnreadChannel.generated.ts b/graphql/mutations/clientonly/SetIsUnreadChannel.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..619fe6ab5bc158c4f9d6d1b900e381696dff611a --- /dev/null +++ b/graphql/mutations/clientonly/SetIsUnreadChannel.generated.ts @@ -0,0 +1,46 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type SetIsUnreadChannelVariables = _Types.Exact<{ + channelId: _Types.Scalars['ID']['input']; + teamId: _Types.Scalars['ID']['input']; + isUnread: _Types.Scalars['Boolean']['input']; +}>; + + +export type SetIsUnreadChannel = { setIsUnreadChannel: { operationDone: boolean | null } | null }; + + +export const SetIsUnreadChannelDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"setIsUnreadChannel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isUnread"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setIsUnreadChannel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"isUnread"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isUnread"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type SetIsUnreadChannelMutationFn = Apollo.MutationFunction<SetIsUnreadChannel, SetIsUnreadChannelVariables>; + +/** + * __useSetIsUnreadChannel__ + * + * To run a mutation, you first call `useSetIsUnreadChannel` within a React component and pass it any options that fit your needs. + * When your component renders, `useSetIsUnreadChannel` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [setIsUnreadChannel, { data, loading, error }] = useSetIsUnreadChannel({ + * variables: { + * channelId: // value for 'channelId' + * teamId: // value for 'teamId' + * isUnread: // value for 'isUnread' + * }, + * }); + */ +export function useSetIsUnreadChannel(baseOptions?: Apollo.MutationHookOptions<SetIsUnreadChannel, SetIsUnreadChannelVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<SetIsUnreadChannel, SetIsUnreadChannelVariables>(SetIsUnreadChannelDocument, options); + } +export type SetIsUnreadChannelHookResult = ReturnType<typeof useSetIsUnreadChannel>; +export type SetIsUnreadChannelMutationResult = Apollo.MutationResult<SetIsUnreadChannel>; +export type SetIsUnreadChannelMutationOptions = Apollo.BaseMutationOptions<SetIsUnreadChannel, SetIsUnreadChannelVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/SetIsUnreadEmailThread.generated.ts b/graphql/mutations/clientonly/SetIsUnreadEmailThread.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..b18cd4b17747a69ad73b794a777db956ea70c0ab --- /dev/null +++ b/graphql/mutations/clientonly/SetIsUnreadEmailThread.generated.ts @@ -0,0 +1,46 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type SetIsUnreadEmailThreadVariables = _Types.Exact<{ + threadId: _Types.Scalars['ID']['input']; + teamId: _Types.Scalars['ID']['input']; + isUnread: _Types.Scalars['Boolean']['input']; +}>; + + +export type SetIsUnreadEmailThread = { setIsUnreadEmailThread: { operationDone: boolean | null } | null }; + + +export const SetIsUnreadEmailThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"setIsUnreadEmailThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"isUnread"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"setIsUnreadEmailThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"isUnread"},"value":{"kind":"Variable","name":{"kind":"Name","value":"isUnread"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"operationDone"}}]}}]}}]} as unknown as DocumentNode; +export type SetIsUnreadEmailThreadMutationFn = Apollo.MutationFunction<SetIsUnreadEmailThread, SetIsUnreadEmailThreadVariables>; + +/** + * __useSetIsUnreadEmailThread__ + * + * To run a mutation, you first call `useSetIsUnreadEmailThread` within a React component and pass it any options that fit your needs. + * When your component renders, `useSetIsUnreadEmailThread` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [setIsUnreadEmailThread, { data, loading, error }] = useSetIsUnreadEmailThread({ + * variables: { + * threadId: // value for 'threadId' + * teamId: // value for 'teamId' + * isUnread: // value for 'isUnread' + * }, + * }); + */ +export function useSetIsUnreadEmailThread(baseOptions?: Apollo.MutationHookOptions<SetIsUnreadEmailThread, SetIsUnreadEmailThreadVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation<SetIsUnreadEmailThread, SetIsUnreadEmailThreadVariables>(SetIsUnreadEmailThreadDocument, options); + } +export type SetIsUnreadEmailThreadHookResult = ReturnType<typeof useSetIsUnreadEmailThread>; +export type SetIsUnreadEmailThreadMutationResult = Apollo.MutationResult<SetIsUnreadEmailThread>; +export type SetIsUnreadEmailThreadMutationOptions = Apollo.BaseMutationOptions<SetIsUnreadEmailThread, SetIsUnreadEmailThreadVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/WriteEmailDraft.generated.ts b/graphql/mutations/clientonly/WriteEmailDraft.generated.ts deleted file mode 100644 index e1ba9ae9dce3ce465fd095215fb3aa922f9e3c28..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/WriteEmailDraft.generated.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type WriteEmailDraftVariables = _Types.Exact<{ - emailDraft: _Types.EmailDraftInput; -}>; - - -export type WriteEmailDraft = { writeEmailDraft: { teamId: string, instructor: boolean, emailThreadId: string | null, senderAddress: string | null, content: string | null, activateMilestone: string | null, deactivateMilestone: string | null, fileId: any | null, selectedContacts: Array<string | null> | null, subject: string | null, templateId: string | null } | null }; - - -export const WriteEmailDraftDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"WriteEmailDraft"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailDraft"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"writeEmailDraft"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"emailDraft"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailDraft"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraft"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraft"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"instructor"}},{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderAddress"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"selectedContacts"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"templateId"}}]}}]} as unknown as DocumentNode; -export type WriteEmailDraftMutationFn = Apollo.MutationFunction<WriteEmailDraft, WriteEmailDraftVariables>; - -/** - * __useWriteEmailDraft__ - * - * To run a mutation, you first call `useWriteEmailDraft` within a React component and pass it any options that fit your needs. - * When your component renders, `useWriteEmailDraft` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [writeEmailDraft, { data, loading, error }] = useWriteEmailDraft({ - * variables: { - * emailDraft: // value for 'emailDraft' - * }, - * }); - */ -export function useWriteEmailDraft(baseOptions?: Apollo.MutationHookOptions<WriteEmailDraft, WriteEmailDraftVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<WriteEmailDraft, WriteEmailDraftVariables>(WriteEmailDraftDocument, options); - } -export type WriteEmailDraftHookResult = ReturnType<typeof useWriteEmailDraft>; -export type WriteEmailDraftMutationResult = Apollo.MutationResult<WriteEmailDraft>; -export type WriteEmailDraftMutationOptions = Apollo.BaseMutationOptions<WriteEmailDraft, WriteEmailDraftVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/WriteInjectSelectionConfirmation.generated.ts b/graphql/mutations/clientonly/WriteInjectSelectionConfirmation.generated.ts deleted file mode 100644 index be3c1a43c5731b65192d6e24cec1a0d44e6381c6..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/WriteInjectSelectionConfirmation.generated.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type WriteInjectSelectionConfirmationVariables = _Types.Exact<{ - injectSelectionId: _Types.Scalars['ID']['input']; -}>; - - -export type WriteInjectSelectionConfirmation = { writeInjectSelectionConfirmation: { injectSelectionId: string, submitted: string | null } | null }; - - -export const WriteInjectSelectionConfirmationDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"WriteInjectSelectionConfirmation"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"injectSelectionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"writeInjectSelectionConfirmation"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"injectSelectionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"injectSelectionId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"injectSelectionId"}},{"kind":"Field","name":{"kind":"Name","value":"submitted"}}]}}]}}]} as unknown as DocumentNode; -export type WriteInjectSelectionConfirmationMutationFn = Apollo.MutationFunction<WriteInjectSelectionConfirmation, WriteInjectSelectionConfirmationVariables>; - -/** - * __useWriteInjectSelectionConfirmation__ - * - * To run a mutation, you first call `useWriteInjectSelectionConfirmation` within a React component and pass it any options that fit your needs. - * When your component renders, `useWriteInjectSelectionConfirmation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [writeInjectSelectionConfirmation, { data, loading, error }] = useWriteInjectSelectionConfirmation({ - * variables: { - * injectSelectionId: // value for 'injectSelectionId' - * }, - * }); - */ -export function useWriteInjectSelectionConfirmation(baseOptions?: Apollo.MutationHookOptions<WriteInjectSelectionConfirmation, WriteInjectSelectionConfirmationVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<WriteInjectSelectionConfirmation, WriteInjectSelectionConfirmationVariables>(WriteInjectSelectionConfirmationDocument, options); - } -export type WriteInjectSelectionConfirmationHookResult = ReturnType<typeof useWriteInjectSelectionConfirmation>; -export type WriteInjectSelectionConfirmationMutationResult = Apollo.MutationResult<WriteInjectSelectionConfirmation>; -export type WriteInjectSelectionConfirmationMutationOptions = Apollo.BaseMutationOptions<WriteInjectSelectionConfirmation, WriteInjectSelectionConfirmationVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/WriteReadReceiptChannel.generated.ts b/graphql/mutations/clientonly/WriteReadReceiptChannel.generated.ts deleted file mode 100644 index 06628fafefd65903b2f090a1aeb1862403909dac..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/WriteReadReceiptChannel.generated.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type WriteReadReceiptChannelVariables = _Types.Exact<{ - channelId: _Types.Scalars['ID']['input']; - teamId: _Types.Scalars['ID']['input']; -}>; - - -export type WriteReadReceiptChannel = { writeReadReceiptChannel: { channelId: string, readReceipt: string | null } | null }; - - -export const WriteReadReceiptChannelDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"writeReadReceiptChannel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"writeReadReceiptChannel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}},{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channelId"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}}]}}]}}]} as unknown as DocumentNode; -export type WriteReadReceiptChannelMutationFn = Apollo.MutationFunction<WriteReadReceiptChannel, WriteReadReceiptChannelVariables>; - -/** - * __useWriteReadReceiptChannel__ - * - * To run a mutation, you first call `useWriteReadReceiptChannel` within a React component and pass it any options that fit your needs. - * When your component renders, `useWriteReadReceiptChannel` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [writeReadReceiptChannel, { data, loading, error }] = useWriteReadReceiptChannel({ - * variables: { - * channelId: // value for 'channelId' - * teamId: // value for 'teamId' - * }, - * }); - */ -export function useWriteReadReceiptChannel(baseOptions?: Apollo.MutationHookOptions<WriteReadReceiptChannel, WriteReadReceiptChannelVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<WriteReadReceiptChannel, WriteReadReceiptChannelVariables>(WriteReadReceiptChannelDocument, options); - } -export type WriteReadReceiptChannelHookResult = ReturnType<typeof useWriteReadReceiptChannel>; -export type WriteReadReceiptChannelMutationResult = Apollo.MutationResult<WriteReadReceiptChannel>; -export type WriteReadReceiptChannelMutationOptions = Apollo.BaseMutationOptions<WriteReadReceiptChannel, WriteReadReceiptChannelVariables>; \ No newline at end of file diff --git a/graphql/mutations/clientonly/WriteReadReceiptEmailThread.generated.ts b/graphql/mutations/clientonly/WriteReadReceiptEmailThread.generated.ts deleted file mode 100644 index 3d07012155f1420a584face9e2856b95685a134d..0000000000000000000000000000000000000000 --- a/graphql/mutations/clientonly/WriteReadReceiptEmailThread.generated.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type WriteReadReceiptEmailThreadVariables = _Types.Exact<{ - emailThreadId: _Types.Scalars['ID']['input']; -}>; - - -export type WriteReadReceiptEmailThread = { writeReadReceiptEmailThread: { emailThreadId: string, readReceipt: string | null } | null }; - - -export const WriteReadReceiptEmailThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"WriteReadReceiptEmailThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"writeReadReceiptEmailThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"emailThreadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}}]}}]}}]} as unknown as DocumentNode; -export type WriteReadReceiptEmailThreadMutationFn = Apollo.MutationFunction<WriteReadReceiptEmailThread, WriteReadReceiptEmailThreadVariables>; - -/** - * __useWriteReadReceiptEmailThread__ - * - * To run a mutation, you first call `useWriteReadReceiptEmailThread` within a React component and pass it any options that fit your needs. - * When your component renders, `useWriteReadReceiptEmailThread` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [writeReadReceiptEmailThread, { data, loading, error }] = useWriteReadReceiptEmailThread({ - * variables: { - * emailThreadId: // value for 'emailThreadId' - * }, - * }); - */ -export function useWriteReadReceiptEmailThread(baseOptions?: Apollo.MutationHookOptions<WriteReadReceiptEmailThread, WriteReadReceiptEmailThreadVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useMutation<WriteReadReceiptEmailThread, WriteReadReceiptEmailThreadVariables>(WriteReadReceiptEmailThreadDocument, options); - } -export type WriteReadReceiptEmailThreadHookResult = ReturnType<typeof useWriteReadReceiptEmailThread>; -export type WriteReadReceiptEmailThreadMutationResult = Apollo.MutationResult<WriteReadReceiptEmailThread>; -export type WriteReadReceiptEmailThreadMutationOptions = Apollo.BaseMutationOptions<WriteReadReceiptEmailThread, WriteReadReceiptEmailThreadVariables>; \ No newline at end of file diff --git a/graphql/package.json b/graphql/package.json index 6d8ceac10ffe5b84a2fb7eb53a8ea18ca30c684e..3dc4ff7910fa831a3b2fc3ebbbdcf22ee8eb06b7 100644 --- a/graphql/package.json +++ b/graphql/package.json @@ -3,25 +3,28 @@ "version": "0.3.0", "description": "GraphQL API Bindings for the Inject Backend", "main": "index.js", + "license": "MIT", "dependencies": { "@apollo/client": "3.9.7", "@blueprintjs/core": "*", "@blueprintjs/select": "*", "@floating-ui/react": "0.26.9", "@inject/shared": "workspace:shared", - "ahooks": "3.7.10", + "ahooks": "3.8.0", "graphql": "16.8.1", "graphql-tag": "2.12.6", "lodash": "4.17.21", - "react": "18.2.0", + "react": "18.3.1", "react-apollo-network-status": "5.2.1", - "react-dom": "18.2.0", + "react-dom": "18.3.1", + "sanitize-html": "^2.13.0", "subscriptions-transport-ws": "0.11.0" }, "devDependencies": { "@types/lodash": "4.17.0", "@types/react": "18.2.66", "@types/react-dom": "18.2.22", + "@types/sanitize-html": "^2.11.0", "dotenv": "16.4.5" } } diff --git a/graphql/queries/GetAnalyticsActionLogs.generated.ts b/graphql/queries/GetAnalyticsActionLogs.generated.ts index 64a612154b4698d1afd7f8de57b66d52325ccdef..61acaf01bda7228d17114aecee5c0313601d21ce 100644 --- a/graphql/queries/GetAnalyticsActionLogs.generated.ts +++ b/graphql/queries/GetAnalyticsActionLogs.generated.ts @@ -10,10 +10,10 @@ export type GetAnalyticsActionLogsVariables = _Types.Exact<{ }>; -export type GetAnalyticsActionLogs = { analyticsActionLogs: Array<{ id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null> | null }; +export type GetAnalyticsActionLogs = { analyticsActionLogs: Array<{ id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null> | null }; -export const GetAnalyticsActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAnalyticsActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsActionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; +export const GetAnalyticsActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAnalyticsActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsActionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetAnalyticsActionLogs__ diff --git a/graphql/queries/GetAnalyticsEmailThreads.generated.ts b/graphql/queries/GetAnalyticsEmailThreads.generated.ts index b06d53839d81861e5732a5d5e74d84b4412c309e..c24ac795609b823edda18fcbfabd5b35986cda3a 100644 --- a/graphql/queries/GetAnalyticsEmailThreads.generated.ts +++ b/graphql/queries/GetAnalyticsEmailThreads.generated.ts @@ -10,10 +10,10 @@ export type GetAnalyticsEmailThreadsVariables = _Types.Exact<{ }>; -export type GetAnalyticsEmailThreads = { analyticsEmailThreads: Array<{ id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null> | null }; +export type GetAnalyticsEmailThreads = { analyticsEmailThreads: Array<{ id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null> | null }; -export const GetAnalyticsEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAnalyticsEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsEmailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const GetAnalyticsEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAnalyticsEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsEmailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; /** * __useGetAnalyticsEmailThreads__ diff --git a/graphql/queries/GetAutoInjects.generated.ts b/graphql/queries/GetAutoInjects.generated.ts index f76a87019d5fa011b528a9bec0ae244dd19e34c5..34748cd532d4460c840f06c4c5fc603f3200c0aa 100644 --- a/graphql/queries/GetAutoInjects.generated.ts +++ b/graphql/queries/GetAutoInjects.generated.ts @@ -10,10 +10,10 @@ export type GetAutoInjectsVariables = _Types.Exact<{ }>; -export type GetAutoInjects = { autoInjects: Array<{ id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType } | null> | null }; +export type GetAutoInjects = { injects: Array<{ id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType } | null> | null }; -export const GetAutoInjectsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoInjects"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"autoInjects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]} as unknown as DocumentNode; +export const GetAutoInjectsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetAutoInjects"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"injects"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}}]} as unknown as DocumentNode; /** * __useGetAutoInjects__ diff --git a/graphql/queries/GetChannel.generated.ts b/graphql/queries/GetChannel.generated.ts index 9d1b7ad4f57f2f19ea11dd240d92ce8915a61e11..dad949c29723b37c2cc48c792e84c2cb3b584651 100644 --- a/graphql/queries/GetChannel.generated.ts +++ b/graphql/queries/GetChannel.generated.ts @@ -10,10 +10,10 @@ export type GetChannelVariables = _Types.Exact<{ }>; -export type GetChannel = { channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> } | null }; +export type GetChannel = { channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null }; -export const GetChannelDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetChannel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; +export const GetChannelDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetChannel"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"channel"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetChannel__ diff --git a/graphql/queries/GetDefinition.generated.ts b/graphql/queries/GetDefinition.generated.ts index 2adc1e4c465118c69a08333eafe41d48a41fc188..d056e47593af77b2a894185c6e9cb822804b22c0 100644 --- a/graphql/queries/GetDefinition.generated.ts +++ b/graphql/queries/GetDefinition.generated.ts @@ -10,10 +10,10 @@ export type GetDefinitionVariables = _Types.Exact<{ }>; -export type GetDefinition = { definition: { id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string } | null> | null } | null }; +export type GetDefinition = { definition: { id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null }; -export const GetDefinitionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDefinition"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"definitionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"definition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"definitionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"definitionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Definition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetDefinitionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDefinition"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"definitionId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"definition"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"definitionId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"definitionId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Definition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetDefinition__ diff --git a/graphql/queries/GetDefinitions.generated.ts b/graphql/queries/GetDefinitions.generated.ts index 0b07a3b48e7527e975821dbba40b823b474d2bc1..7c3fc96958685bf4b7ab35cbb60063ebb3f8bac2 100644 --- a/graphql/queries/GetDefinitions.generated.ts +++ b/graphql/queries/GetDefinitions.generated.ts @@ -8,10 +8,10 @@ const defaultOptions = {} as const; export type GetDefinitionsVariables = _Types.Exact<{ [key: string]: never; }>; -export type GetDefinitions = { definitions: Array<{ id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string } | null> | null } | null> | null }; +export type GetDefinitions = { definitions: Array<{ id: string, name: string, version: string, channels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }>, roles: Array<{ id: string, name: string }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null> | null }; -export const GetDefinitionsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDefinitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Definition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetDefinitionsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetDefinitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Definition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Definition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"version"}},{"kind":"Field","name":{"kind":"Name","value":"channels"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"roles"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Role"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Role"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionRoleType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetDefinitions__ diff --git a/graphql/queries/GetEmailThread.generated.ts b/graphql/queries/GetEmailThread.generated.ts index 23bc4caa290920c77f74221c788ac8f84747db0f..c7b087c667232c8b7accdbf52241f5ee1a2c153f 100644 --- a/graphql/queries/GetEmailThread.generated.ts +++ b/graphql/queries/GetEmailThread.generated.ts @@ -10,10 +10,10 @@ export type GetEmailThreadVariables = _Types.Exact<{ }>; -export type GetEmailThread = { emailThread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null }; +export type GetEmailThread = { emailThread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null }; -export const GetEmailThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const GetEmailThreadDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailThread"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"threadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"threadId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; /** * __useGetEmailThread__ diff --git a/graphql/queries/GetEmailThreads.generated.ts b/graphql/queries/GetEmailThreads.generated.ts index fb9886c0f8b815c7d17d194728a38ff0ec8f613f..80de5b0e968ccceb65cb58f551f5309534099050 100644 --- a/graphql/queries/GetEmailThreads.generated.ts +++ b/graphql/queries/GetEmailThreads.generated.ts @@ -10,10 +10,10 @@ export type GetEmailThreadsVariables = _Types.Exact<{ }>; -export type GetEmailThreads = { emailThreads: Array<{ id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null> | null }; +export type GetEmailThreads = { emailThreads: Array<{ id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null> | null }; -export const GetEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const GetEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; /** * __useGetEmailThreads__ diff --git a/graphql/queries/GetExercise.generated.ts b/graphql/queries/GetExercise.generated.ts index 5136974089a62b0a8aa6af3d4204eab5ce67154e..7ec659aa74cee039e075ef551d4d42a137f56ad7 100644 --- a/graphql/queries/GetExercise.generated.ts +++ b/graphql/queries/GetExercise.generated.ts @@ -10,10 +10,10 @@ export type GetExerciseVariables = _Types.Exact<{ }>; -export type GetExercise = { exerciseId: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null }; +export type GetExercise = { exerciseId: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null }; -export const GetExerciseDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExercise"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseId"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetExerciseDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExercise"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseId"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetExercise__ diff --git a/graphql/queries/GetExerciseChannels.generated.ts b/graphql/queries/GetExerciseChannels.generated.ts index ae4113a4487c97a70029c571d9be73e4c6a45e5d..de7e702400c1f88448254d37987ab48830de625b 100644 --- a/graphql/queries/GetExerciseChannels.generated.ts +++ b/graphql/queries/GetExerciseChannels.generated.ts @@ -10,10 +10,10 @@ export type GetExerciseChannelsVariables = _Types.Exact<{ }>; -export type GetExerciseChannels = { exerciseChannels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> } | null> | null }; +export type GetExerciseChannels = { exerciseChannels: Array<{ id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null> | null }; -export const GetExerciseChannelsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseChannels"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseChannels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; +export const GetExerciseChannelsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseChannels"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseChannels"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetExerciseChannels__ diff --git a/graphql/queries/GetExerciseConfig.generated.ts b/graphql/queries/GetExerciseConfig.generated.ts index c2dfa57af795f2d317ce0fc8477da1b5c887c89b..221c405b42f6de4330d12552457f89a71b7a3ae1 100644 --- a/graphql/queries/GetExerciseConfig.generated.ts +++ b/graphql/queries/GetExerciseConfig.generated.ts @@ -7,13 +7,14 @@ import * as Apollo from '@apollo/client'; const defaultOptions = {} as const; export type GetExerciseConfigVariables = _Types.Exact<{ exerciseId: _Types.Scalars['ID']['input']; + teamId: _Types.Scalars['ID']['input']; }>; -export type GetExerciseConfig = { exerciseConfig: { exerciseDuration: number | null, emailBetweenTeams: boolean | null, showExerciseTime: boolean | null, enableRoles: boolean | null, customEmailSuffix: string | null } | null }; +export type GetExerciseConfig = { exerciseConfig: { exerciseDuration: number | null, emailBetweenTeams: boolean | null, showExerciseTime: boolean | null, enableRoles: boolean | null, customEmailSuffix: string | null } | null, teamTools: Array<{ id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null } | null> | null }; -export const GetExerciseConfigDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseConfig"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseConfig"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseConfig"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseConfig"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GrapheneConfig"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseDuration"}},{"kind":"Field","name":{"kind":"Name","value":"emailBetweenTeams"}},{"kind":"Field","name":{"kind":"Name","value":"showExerciseTime"}},{"kind":"Field","name":{"kind":"Name","value":"enableRoles"}},{"kind":"Field","name":{"kind":"Name","value":"customEmailSuffix"}}]}}]} as unknown as DocumentNode; +export const GetExerciseConfigDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseConfig"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseConfig"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseConfig"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamTools"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseConfig"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GrapheneConfig"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseDuration"}},{"kind":"Field","name":{"kind":"Name","value":"emailBetweenTeams"}},{"kind":"Field","name":{"kind":"Name","value":"showExerciseTime"}},{"kind":"Field","name":{"kind":"Name","value":"enableRoles"}},{"kind":"Field","name":{"kind":"Name","value":"customEmailSuffix"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; /** * __useGetExerciseConfig__ @@ -28,6 +29,7 @@ export const GetExerciseConfigDocument = /*#__PURE__*/ {"kind":"Document","defin * const { data, loading, error } = useGetExerciseConfig({ * variables: { * exerciseId: // value for 'exerciseId' + * teamId: // value for 'teamId' * }, * }); */ diff --git a/graphql/queries/GetExerciseWithConfig.generated.ts b/graphql/queries/GetExerciseWithConfig.generated.ts index 378d26f3b21d4d91828bf7c26deddee5c62fd970..06ec66adf6c52999929736ae4227a7ca28d9834c 100644 --- a/graphql/queries/GetExerciseWithConfig.generated.ts +++ b/graphql/queries/GetExerciseWithConfig.generated.ts @@ -10,10 +10,10 @@ export type GetExerciseWithConfigVariables = _Types.Exact<{ }>; -export type GetExerciseWithConfig = { exerciseId: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null, exerciseConfig: { exerciseDuration: number | null, emailBetweenTeams: boolean | null, showExerciseTime: boolean | null, enableRoles: boolean | null, customEmailSuffix: string | null } | null }; +export type GetExerciseWithConfig = { exerciseId: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null, exerciseConfig: { exerciseDuration: number | null, emailBetweenTeams: boolean | null, showExerciseTime: boolean | null, enableRoles: boolean | null, customEmailSuffix: string | null } | null }; -export const GetExerciseWithConfigDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseWithConfig"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseId"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exerciseConfig"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseConfig"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseConfig"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GrapheneConfig"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseDuration"}},{"kind":"Field","name":{"kind":"Name","value":"emailBetweenTeams"}},{"kind":"Field","name":{"kind":"Name","value":"showExerciseTime"}},{"kind":"Field","name":{"kind":"Name","value":"enableRoles"}},{"kind":"Field","name":{"kind":"Name","value":"customEmailSuffix"}}]}}]} as unknown as DocumentNode; +export const GetExerciseWithConfigDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExerciseWithConfig"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseId"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exerciseConfig"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseConfig"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseConfig"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GrapheneConfig"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exerciseDuration"}},{"kind":"Field","name":{"kind":"Name","value":"emailBetweenTeams"}},{"kind":"Field","name":{"kind":"Name","value":"showExerciseTime"}},{"kind":"Field","name":{"kind":"Name","value":"enableRoles"}},{"kind":"Field","name":{"kind":"Name","value":"customEmailSuffix"}}]}}]} as unknown as DocumentNode; /** * __useGetExerciseWithConfig__ diff --git a/graphql/queries/GetExercises.generated.ts b/graphql/queries/GetExercises.generated.ts index c6799f8c8c27c1c0bac6c0b61c5bd7fc65435647..28f960b3da4a7934193aa087c9dd6406637c0788 100644 --- a/graphql/queries/GetExercises.generated.ts +++ b/graphql/queries/GetExercises.generated.ts @@ -8,10 +8,10 @@ const defaultOptions = {} as const; export type GetExercisesVariables = _Types.Exact<{ [key: string]: never; }>; -export type GetExercises = { exercises: Array<{ id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null> | null }; +export type GetExercises = { exercises: Array<{ id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null> | null }; -export const GetExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetExercises__ diff --git a/graphql/queries/GetExtendedTeamTools.generated.ts b/graphql/queries/GetExtendedTeamTools.generated.ts deleted file mode 100644 index 078db1e0da88538b6bd65738891decd2d4dbf167..0000000000000000000000000000000000000000 --- a/graphql/queries/GetExtendedTeamTools.generated.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type GetExtendedTeamToolsVariables = _Types.Exact<{ - teamId: _Types.Scalars['ID']['input']; -}>; - - -export type GetExtendedTeamTools = { extendedTeamTools: Array<{ id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> } | null> | null }; - - -export const GetExtendedTeamToolsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetExtendedTeamTools"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"extendedTeamTools"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}}]} as unknown as DocumentNode; - -/** - * __useGetExtendedTeamTools__ - * - * To run a query within a React component, call `useGetExtendedTeamTools` and pass it any options that fit your needs. - * When your component renders, `useGetExtendedTeamTools` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetExtendedTeamTools({ - * variables: { - * teamId: // value for 'teamId' - * }, - * }); - */ -export function useGetExtendedTeamTools(baseOptions: Apollo.QueryHookOptions<GetExtendedTeamTools, GetExtendedTeamToolsVariables> & ({ variables: GetExtendedTeamToolsVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery<GetExtendedTeamTools, GetExtendedTeamToolsVariables>(GetExtendedTeamToolsDocument, options); - } -export function useGetExtendedTeamToolsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetExtendedTeamTools, GetExtendedTeamToolsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery<GetExtendedTeamTools, GetExtendedTeamToolsVariables>(GetExtendedTeamToolsDocument, options); - } -export function useGetExtendedTeamToolsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetExtendedTeamTools, GetExtendedTeamToolsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery<GetExtendedTeamTools, GetExtendedTeamToolsVariables>(GetExtendedTeamToolsDocument, options); - } -export type GetExtendedTeamToolsHookResult = ReturnType<typeof useGetExtendedTeamTools>; -export type GetExtendedTeamToolsLazyQueryHookResult = ReturnType<typeof useGetExtendedTeamToolsLazyQuery>; -export type GetExtendedTeamToolsSuspenseQueryHookResult = ReturnType<typeof useGetExtendedTeamToolsSuspenseQuery>; -export type GetExtendedTeamToolsQueryResult = Apollo.QueryResult<GetExtendedTeamTools, GetExtendedTeamToolsVariables>; \ No newline at end of file diff --git a/graphql/queries/GetGroups.generated.ts b/graphql/queries/GetGroups.generated.ts deleted file mode 100644 index e74833901849aa952fc2ffcaf045b6629ea76ae7..0000000000000000000000000000000000000000 --- a/graphql/queries/GetGroups.generated.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type GetGroupsVariables = _Types.Exact<{ [key: string]: never; }>; - - -export type GetGroups = { groups: Array<{ id: string, name: string } | null> | null }; - - -export const GetGroupsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetGroups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"groups"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Group"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Group"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"GroupType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; - -/** - * __useGetGroups__ - * - * To run a query within a React component, call `useGetGroups` and pass it any options that fit your needs. - * When your component renders, `useGetGroups` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetGroups({ - * variables: { - * }, - * }); - */ -export function useGetGroups(baseOptions?: Apollo.QueryHookOptions<GetGroups, GetGroupsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery<GetGroups, GetGroupsVariables>(GetGroupsDocument, options); - } -export function useGetGroupsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetGroups, GetGroupsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery<GetGroups, GetGroupsVariables>(GetGroupsDocument, options); - } -export function useGetGroupsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetGroups, GetGroupsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery<GetGroups, GetGroupsVariables>(GetGroupsDocument, options); - } -export type GetGroupsHookResult = ReturnType<typeof useGetGroups>; -export type GetGroupsLazyQueryHookResult = ReturnType<typeof useGetGroupsLazyQuery>; -export type GetGroupsSuspenseQueryHookResult = ReturnType<typeof useGetGroupsSuspenseQuery>; -export type GetGroupsQueryResult = Apollo.QueryResult<GetGroups, GetGroupsVariables>; \ No newline at end of file diff --git a/graphql/queries/GetRunningExercises.generated.ts b/graphql/queries/GetRunningExercises.generated.ts index e7252ab0d97008f0138031427ada19850f23740a..8129b2da826535072d47305c2bc2eaef2d1da676 100644 --- a/graphql/queries/GetRunningExercises.generated.ts +++ b/graphql/queries/GetRunningExercises.generated.ts @@ -8,10 +8,10 @@ const defaultOptions = {} as const; export type GetRunningExercisesVariables = _Types.Exact<{ [key: string]: never; }>; -export type GetRunningExercises = { exercises: Array<{ id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null> | null }; +export type GetRunningExercises = { exercises: Array<{ id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null> | null }; -export const GetRunningExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRunningExercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercises"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"running"},"value":{"kind":"BooleanValue","value":true}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetRunningExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetRunningExercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercises"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"running"},"value":{"kind":"BooleanValue","value":true}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetRunningExercises__ diff --git a/graphql/queries/GetSingleActionLog.generated.ts b/graphql/queries/GetSingleActionLog.generated.ts index 9f1970f9c870a31681b70f1f0c7f71665c937a53..5cc79447e2c5c225c2562231e8b28021d6993168 100644 --- a/graphql/queries/GetSingleActionLog.generated.ts +++ b/graphql/queries/GetSingleActionLog.generated.ts @@ -10,10 +10,10 @@ export type GetSingleActionLogVariables = _Types.Exact<{ }>; -export type GetSingleActionLog = { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null }; +export type GetSingleActionLog = { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null }; -export const GetSingleActionLogDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSingleActionLog"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"logId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"logId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"logId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; +export const GetSingleActionLogDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetSingleActionLog"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"logId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"logId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"logId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetSingleActionLog__ diff --git a/graphql/queries/GetTeam.generated.ts b/graphql/queries/GetTeam.generated.ts index bf6113054cf60204bda03d9a5cff530195af7a5e..cbceaf6a322a855ae40ca6e901846b9053fa74d0 100644 --- a/graphql/queries/GetTeam.generated.ts +++ b/graphql/queries/GetTeam.generated.ts @@ -10,10 +10,10 @@ export type GetTeamVariables = _Types.Exact<{ }>; -export type GetTeam = { team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null } | null }; +export type GetTeam = { team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null }; -export const GetTeamDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const GetTeamDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeam"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"team"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useGetTeam__ diff --git a/graphql/queries/GetTeamActionLogs.generated.ts b/graphql/queries/GetTeamActionLogs.generated.ts index e40052bc30456ec0e2baec546b3a0095e673acdb..350a99a697e8084291939d7974c99e965cb2d855 100644 --- a/graphql/queries/GetTeamActionLogs.generated.ts +++ b/graphql/queries/GetTeamActionLogs.generated.ts @@ -10,10 +10,10 @@ export type GetTeamActionLogsVariables = _Types.Exact<{ }>; -export type GetTeamActionLogs = { actionLogs: Array<{ id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null> | null }; +export type GetTeamActionLogs = { actionLogs: Array<{ id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null> | null }; -export const GetTeamActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"actionLogs"},"name":{"kind":"Name","value":"teamActionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; +export const GetTeamActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"actionLogs"},"name":{"kind":"Name","value":"teamActionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; /** * __useGetTeamActionLogs__ diff --git a/graphql/queries/GetTeamChannelLogs.generated.ts b/graphql/queries/GetTeamChannelLogs.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..2427a3506a8468f1370c31fe500464781f8f8b6a --- /dev/null +++ b/graphql/queries/GetTeamChannelLogs.generated.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type GetTeamChannelLogsVariables = _Types.Exact<{ + teamId: _Types.Scalars['ID']['input']; + channelId: _Types.Scalars['ID']['input']; +}>; + + +export type GetTeamChannelLogs = { teamChannelLogs: Array<{ id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null> | null }; + + +export const GetTeamChannelLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamChannelLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamChannelLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"channelId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"channelId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; + +/** + * __useGetTeamChannelLogs__ + * + * To run a query within a React component, call `useGetTeamChannelLogs` and pass it any options that fit your needs. + * When your component renders, `useGetTeamChannelLogs` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetTeamChannelLogs({ + * variables: { + * teamId: // value for 'teamId' + * channelId: // value for 'channelId' + * }, + * }); + */ +export function useGetTeamChannelLogs(baseOptions: Apollo.QueryHookOptions<GetTeamChannelLogs, GetTeamChannelLogsVariables> & ({ variables: GetTeamChannelLogsVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery<GetTeamChannelLogs, GetTeamChannelLogsVariables>(GetTeamChannelLogsDocument, options); + } +export function useGetTeamChannelLogsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetTeamChannelLogs, GetTeamChannelLogsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery<GetTeamChannelLogs, GetTeamChannelLogsVariables>(GetTeamChannelLogsDocument, options); + } +export function useGetTeamChannelLogsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetTeamChannelLogs, GetTeamChannelLogsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery<GetTeamChannelLogs, GetTeamChannelLogsVariables>(GetTeamChannelLogsDocument, options); + } +export type GetTeamChannelLogsHookResult = ReturnType<typeof useGetTeamChannelLogs>; +export type GetTeamChannelLogsLazyQueryHookResult = ReturnType<typeof useGetTeamChannelLogsLazyQuery>; +export type GetTeamChannelLogsSuspenseQueryHookResult = ReturnType<typeof useGetTeamChannelLogsSuspenseQuery>; +export type GetTeamChannelLogsQueryResult = Apollo.QueryResult<GetTeamChannelLogs, GetTeamChannelLogsVariables>; \ No newline at end of file diff --git a/graphql/queries/GetTeamInjectSelections.generated.ts b/graphql/queries/GetTeamInjectSelections.generated.ts deleted file mode 100644 index 39d22c6c62a9128203606d5889e8928ae90a17e0..0000000000000000000000000000000000000000 --- a/graphql/queries/GetTeamInjectSelections.generated.ts +++ /dev/null @@ -1,49 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type GetTeamInjectSelectionsVariables = _Types.Exact<{ - teamId: _Types.Scalars['ID']['input']; -}>; - - -export type GetTeamInjectSelections = { teamInjectSelections: Array<{ id: string, name: string, timestamp: string | null, submitted: string | null, team: { id: string }, options: Array<{ id: string, sender: string, name: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }> } | null> | null }; - - -export const GetTeamInjectSelectionsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamInjectSelections"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamInjectSelections"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectSelection"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectSelection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectSelectionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectOption"}}]}},{"kind":"Field","name":{"kind":"Name","value":"submitted"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectOption"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectOptionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; - -/** - * __useGetTeamInjectSelections__ - * - * To run a query within a React component, call `useGetTeamInjectSelections` and pass it any options that fit your needs. - * When your component renders, `useGetTeamInjectSelections` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useGetTeamInjectSelections({ - * variables: { - * teamId: // value for 'teamId' - * }, - * }); - */ -export function useGetTeamInjectSelections(baseOptions: Apollo.QueryHookOptions<GetTeamInjectSelections, GetTeamInjectSelectionsVariables> & ({ variables: GetTeamInjectSelectionsVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>(GetTeamInjectSelectionsDocument, options); - } -export function useGetTeamInjectSelectionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>(GetTeamInjectSelectionsDocument, options); - } -export function useGetTeamInjectSelectionsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>(GetTeamInjectSelectionsDocument, options); - } -export type GetTeamInjectSelectionsHookResult = ReturnType<typeof useGetTeamInjectSelections>; -export type GetTeamInjectSelectionsLazyQueryHookResult = ReturnType<typeof useGetTeamInjectSelectionsLazyQuery>; -export type GetTeamInjectSelectionsSuspenseQueryHookResult = ReturnType<typeof useGetTeamInjectSelectionsSuspenseQuery>; -export type GetTeamInjectSelectionsQueryResult = Apollo.QueryResult<GetTeamInjectSelections, GetTeamInjectSelectionsVariables>; \ No newline at end of file diff --git a/graphql/queries/GetTeamQuestionnaireState.generated.ts b/graphql/queries/GetTeamQuestionnaireState.generated.ts index 05a59fc80d6c5bcb1bc16e9dac287cbe724d8c0a..41bf1edc0da7dc868bb9b05c8c2825ff0c2a7584 100644 --- a/graphql/queries/GetTeamQuestionnaireState.generated.ts +++ b/graphql/queries/GetTeamQuestionnaireState.generated.ts @@ -11,10 +11,10 @@ export type GetTeamQuestionnaireStateVariables = _Types.Exact<{ }>; -export type GetTeamQuestionnaireState = { questionnaireState: { id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> } | null }; +export type GetTeamQuestionnaireState = { questionnaireState: { id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } } | null }; -export const GetTeamQuestionnaireStateDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamQuestionnaireState"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"questionnaireId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"questionnaireState"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"questionnaireId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"questionnaireId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}}]} as unknown as DocumentNode; +export const GetTeamQuestionnaireStateDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamQuestionnaireState"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"questionnaireId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"questionnaireState"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"questionnaireId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"questionnaireId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; /** * __useGetTeamQuestionnaireState__ diff --git a/graphql/queries/GetUser.generated.ts b/graphql/queries/GetUser.generated.ts index ae8c0420939bf862c4411255a06890714e346146..7e96cff3d0dc7d45076bbeed11529ea5914e0751 100644 --- a/graphql/queries/GetUser.generated.ts +++ b/graphql/queries/GetUser.generated.ts @@ -10,10 +10,10 @@ export type GetUserVariables = _Types.Exact<{ }>; -export type GetUser = { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null }; +export type GetUser = { user: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null }; -export const GetUserDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; +export const GetUserDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetUser"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"userId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"UUID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"user"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"userId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"userId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; /** * __useGetUser__ diff --git a/graphql/queries/GetUsers.generated.ts b/graphql/queries/GetUsers.generated.ts index 30df4706c2148672ee1817a555b0047bd5f37119..25860a656173346de2d5e25039ab5faee1d08837 100644 --- a/graphql/queries/GetUsers.generated.ts +++ b/graphql/queries/GetUsers.generated.ts @@ -5,13 +5,17 @@ import type * as _Types from '../types'; import type { DocumentNode } from 'graphql'; import * as Apollo from '@apollo/client'; const defaultOptions = {} as const; -export type GetUsersVariables = _Types.Exact<{ [key: string]: never; }>; +export type GetUsersVariables = _Types.Exact<{ + active: _Types.InputMaybe<_Types.Scalars['Boolean']['input']>; + groups: _Types.InputMaybe<Array<_Types.InputMaybe<_Types.AuthGroup>> | _Types.InputMaybe<_Types.AuthGroup>>; + tags: _Types.InputMaybe<Array<_Types.InputMaybe<_Types.Scalars['String']['input']>> | _Types.InputMaybe<_Types.Scalars['String']['input']>>; +}>; -export type GetUsers = { users: Array<{ id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null> | null }; +export type GetUsers = { users: Array<{ id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null> | null }; -export const GetUsersDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetUsers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"users"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; +export const GetUsersDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetUsers"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"active"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"groups"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AuthGroup"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"tags"}},"type":{"kind":"ListType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"users"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"filterUsersInput"},"value":{"kind":"ObjectValue","fields":[{"kind":"ObjectField","name":{"kind":"Name","value":"active"},"value":{"kind":"Variable","name":{"kind":"Name","value":"active"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"groups"},"value":{"kind":"Variable","name":{"kind":"Name","value":"groups"}}},{"kind":"ObjectField","name":{"kind":"Name","value":"tags"},"value":{"kind":"Variable","name":{"kind":"Name","value":"tags"}}}]}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; /** * __useGetUsers__ @@ -25,6 +29,9 @@ export const GetUsersDocument = /*#__PURE__*/ {"kind":"Document","definitions":[ * @example * const { data, loading, error } = useGetUsers({ * variables: { + * active: // value for 'active' + * groups: // value for 'groups' + * tags: // value for 'tags' * }, * }); */ diff --git a/graphql/queries/Identity.generated.ts b/graphql/queries/Identity.generated.ts index 7e183b24b5bbcef74814cd310836ca2ba7fba6fd..9c8831e150746629063e9feef2632450cfe3140c 100644 --- a/graphql/queries/Identity.generated.ts +++ b/graphql/queries/Identity.generated.ts @@ -8,10 +8,10 @@ const defaultOptions = {} as const; export type IdentityVariables = _Types.Exact<{ [key: string]: never; }>; -export type Identity = { whoAmI: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: string | null, isStaff: boolean, isSuperuser: boolean, isActive: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } } | null> | null, exercises: Array<{ id: string | null } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null }; +export type Identity = { whoAmI: { id: any, lastLogin: string | null, username: string, firstName: string | null, lastName: string | null, dateJoined: string, group: _Types.AuthGroup | null, isActive: boolean, isImported: boolean, tags: Array<{ id: string, name: string }>, teams: Array<{ id: string, name: string, role: string, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } } | null> | null, exercises: Array<{ id: string, name: string } | null> | null, definitions: Array<{ id: number | null, name: string | null } | null> | null } | null }; -export const IdentityDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Identity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"whoAmI"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isStaff"}},{"kind":"Field","name":{"kind":"Name","value":"isSuperuser"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]} as unknown as DocumentNode; +export const IdentityDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"Identity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"whoAmI"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"User"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"User"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"UserType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"lastLogin"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"dateJoined"}},{"kind":"Field","name":{"kind":"Name","value":"group"}},{"kind":"Field","name":{"kind":"Name","value":"isActive"}},{"kind":"Field","name":{"kind":"Name","value":"isImported"}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tag"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedTeam"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedExercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"definitions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tag"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TagType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedTeam"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedTeam"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedExercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedExercise"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}}]} as unknown as DocumentNode; /** * __useIdentity__ diff --git a/graphql/queries/clientonly/GetEmailDraft.generated.ts b/graphql/queries/clientonly/GetEmailDraft.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..363f5bdf9a224fe977851115ae070a2cc45abb9e --- /dev/null +++ b/graphql/queries/clientonly/GetEmailDraft.generated.ts @@ -0,0 +1,53 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type GetEmailDraftVariables = _Types.Exact<{ + teamId: _Types.Scalars['ID']['input']; + instructor: _Types.Scalars['Boolean']['input']; + emailThreadId: _Types.InputMaybe<_Types.Scalars['ID']['input']>; +}>; + + +export type GetEmailDraft = { getEmailDraft: { teamId: string, instructor: boolean, emailThreadId: string | null, senderAddress: string | null, content: string | null, activateMilestone: string | null, deactivateMilestone: string | null, fileId: any | null, selectedContacts: Array<string | null> | null, subject: string | null, templateId: string | null } | null }; + + +export const GetEmailDraftDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailDraft"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getEmailDraft"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"instructor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}}},{"kind":"Argument","name":{"kind":"Name","value":"emailThreadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraft"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraft"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"instructor"}},{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderAddress"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"selectedContacts"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"templateId"}}]}}]} as unknown as DocumentNode; + +/** + * __useGetEmailDraft__ + * + * To run a query within a React component, call `useGetEmailDraft` and pass it any options that fit your needs. + * When your component renders, `useGetEmailDraft` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetEmailDraft({ + * variables: { + * teamId: // value for 'teamId' + * instructor: // value for 'instructor' + * emailThreadId: // value for 'emailThreadId' + * }, + * }); + */ +export function useGetEmailDraft(baseOptions: Apollo.QueryHookOptions<GetEmailDraft, GetEmailDraftVariables> & ({ variables: GetEmailDraftVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery<GetEmailDraft, GetEmailDraftVariables>(GetEmailDraftDocument, options); + } +export function useGetEmailDraftLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetEmailDraft, GetEmailDraftVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery<GetEmailDraft, GetEmailDraftVariables>(GetEmailDraftDocument, options); + } +export function useGetEmailDraftSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetEmailDraft, GetEmailDraftVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery<GetEmailDraft, GetEmailDraftVariables>(GetEmailDraftDocument, options); + } +export type GetEmailDraftHookResult = ReturnType<typeof useGetEmailDraft>; +export type GetEmailDraftLazyQueryHookResult = ReturnType<typeof useGetEmailDraftLazyQuery>; +export type GetEmailDraftSuspenseQueryHookResult = ReturnType<typeof useGetEmailDraftSuspenseQuery>; +export type GetEmailDraftQueryResult = Apollo.QueryResult<GetEmailDraft, GetEmailDraftVariables>; \ No newline at end of file diff --git a/graphql/queries/clientonly/GetEmailDrafts.generated.ts b/graphql/queries/clientonly/GetEmailDrafts.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..46ba672e7037dc105c77c1732f941757b5a0dbeb --- /dev/null +++ b/graphql/queries/clientonly/GetEmailDrafts.generated.ts @@ -0,0 +1,51 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../../types'; + +import type { DocumentNode } from 'graphql'; +import * as Apollo from '@apollo/client'; +const defaultOptions = {} as const; +export type GetEmailDraftsVariables = _Types.Exact<{ + teamId: _Types.Scalars['ID']['input']; + instructor: _Types.Scalars['Boolean']['input']; +}>; + + +export type GetEmailDrafts = { getEmailDrafts: Array<{ teamId: string, instructor: boolean, emailThreadId: string | null, senderAddress: string | null, content: string | null, activateMilestone: string | null, deactivateMilestone: string | null, fileId: any | null, selectedContacts: Array<string | null> | null, subject: string | null, templateId: string | null } | null> | null }; + + +export const GetEmailDraftsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetEmailDrafts"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"getEmailDrafts"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"instructor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraft"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraft"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"instructor"}},{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderAddress"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"selectedContacts"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"templateId"}}]}}]} as unknown as DocumentNode; + +/** + * __useGetEmailDrafts__ + * + * To run a query within a React component, call `useGetEmailDrafts` and pass it any options that fit your needs. + * When your component renders, `useGetEmailDrafts` returns an object from Apollo Client that contains loading, error, and data properties + * you can use to render your UI. + * + * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; + * + * @example + * const { data, loading, error } = useGetEmailDrafts({ + * variables: { + * teamId: // value for 'teamId' + * instructor: // value for 'instructor' + * }, + * }); + */ +export function useGetEmailDrafts(baseOptions: Apollo.QueryHookOptions<GetEmailDrafts, GetEmailDraftsVariables> & ({ variables: GetEmailDraftsVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery<GetEmailDrafts, GetEmailDraftsVariables>(GetEmailDraftsDocument, options); + } +export function useGetEmailDraftsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetEmailDrafts, GetEmailDraftsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery<GetEmailDrafts, GetEmailDraftsVariables>(GetEmailDraftsDocument, options); + } +export function useGetEmailDraftsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetEmailDrafts, GetEmailDraftsVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery<GetEmailDrafts, GetEmailDraftsVariables>(GetEmailDraftsDocument, options); + } +export type GetEmailDraftsHookResult = ReturnType<typeof useGetEmailDrafts>; +export type GetEmailDraftsLazyQueryHookResult = ReturnType<typeof useGetEmailDraftsLazyQuery>; +export type GetEmailDraftsSuspenseQueryHookResult = ReturnType<typeof useGetEmailDraftsSuspenseQuery>; +export type GetEmailDraftsQueryResult = Apollo.QueryResult<GetEmailDrafts, GetEmailDraftsVariables>; \ No newline at end of file diff --git a/graphql/queries/clientonly/ReturnLocalEmailDraft.generated.ts b/graphql/queries/clientonly/ReturnLocalEmailDraft.generated.ts deleted file mode 100644 index 58db7ca4521ee9a8c9c0a2928d16d2e1218b829a..0000000000000000000000000000000000000000 --- a/graphql/queries/clientonly/ReturnLocalEmailDraft.generated.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type ReturnLocalEmailDraftVariables = _Types.Exact<{ - teamId: _Types.Scalars['ID']['input']; - instructor: _Types.Scalars['Boolean']['input']; - emailThreadId: _Types.InputMaybe<_Types.Scalars['ID']['input']>; -}>; - - -export type ReturnLocalEmailDraft = { returnLocalEmailDraft: { teamId: string, instructor: boolean, emailThreadId: string | null, senderAddress: string | null, content: string | null, activateMilestone: string | null, deactivateMilestone: string | null, fileId: any | null, selectedContacts: Array<string | null> | null, subject: string | null, templateId: string | null } | null }; - - -export const ReturnLocalEmailDraftDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ReturnLocalEmailDraft"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"returnLocalEmailDraft"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"instructor"},"value":{"kind":"Variable","name":{"kind":"Name","value":"instructor"}}},{"kind":"Argument","name":{"kind":"Name","value":"emailThreadId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"emailThreadId"}}}],"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDraft"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDraft"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailDraftType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamId"}},{"kind":"Field","name":{"kind":"Name","value":"instructor"}},{"kind":"Field","name":{"kind":"Name","value":"emailThreadId"}},{"kind":"Field","name":{"kind":"Name","value":"senderAddress"}},{"kind":"Field","name":{"kind":"Name","value":"content"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"fileId"}},{"kind":"Field","name":{"kind":"Name","value":"selectedContacts"}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"templateId"}}]}}]} as unknown as DocumentNode; - -/** - * __useReturnLocalEmailDraft__ - * - * To run a query within a React component, call `useReturnLocalEmailDraft` and pass it any options that fit your needs. - * When your component renders, `useReturnLocalEmailDraft` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useReturnLocalEmailDraft({ - * variables: { - * teamId: // value for 'teamId' - * instructor: // value for 'instructor' - * emailThreadId: // value for 'emailThreadId' - * }, - * }); - */ -export function useReturnLocalEmailDraft(baseOptions: Apollo.QueryHookOptions<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables> & ({ variables: ReturnLocalEmailDraftVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useQuery<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>(ReturnLocalEmailDraftDocument, options); - } -export function useReturnLocalEmailDraftLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useLazyQuery<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>(ReturnLocalEmailDraftDocument, options); - } -export function useReturnLocalEmailDraftSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSuspenseQuery<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>(ReturnLocalEmailDraftDocument, options); - } -export type ReturnLocalEmailDraftHookResult = ReturnType<typeof useReturnLocalEmailDraft>; -export type ReturnLocalEmailDraftLazyQueryHookResult = ReturnType<typeof useReturnLocalEmailDraftLazyQuery>; -export type ReturnLocalEmailDraftSuspenseQueryHookResult = ReturnType<typeof useReturnLocalEmailDraftSuspenseQuery>; -export type ReturnLocalEmailDraftQueryResult = Apollo.QueryResult<ReturnLocalEmailDraft, ReturnLocalEmailDraftVariables>; \ No newline at end of file diff --git a/graphql/schemas/localSchema.graphql b/graphql/schemas/localSchema.graphql index c97a7ece018a3b6948e2f586444ef1b2ace69642..01011b16dcfcadfb1f4ae1e4bd3a3cee421b5744 100644 --- a/graphql/schemas/localSchema.graphql +++ b/graphql/schemas/localSchema.graphql @@ -2,50 +2,55 @@ extend type ActionLogType { readReceipt: DateTime } -extend type InjectSelectionType { - submitted: DateTime -} - -extend type EmailThreadType { - readReceipt: DateTime -} - extend type EmailType { readReceipt: DateTime } -type ChannelReadReceipt { - readReceipt: DateTime +type IsUnreadType { + isUnread: Boolean teamId: ID! } -extend type DefinitionChannelType { - readReceipt: [ChannelReadReceipt!]! +extend type EmailThreadType { + readReceipt: [IsUnreadType!]! } -extend type ExtendedToolType { - hasParam: Boolean +extend type DefinitionChannelType { + readReceipt: [IsUnreadType!]! } extend type Query { - returnLocalEmailDraft( + getEmailDraft( teamId: ID! instructor: Boolean! emailThreadId: ID ): EmailDraftType + getEmailDrafts(teamId: ID!, instructor: Boolean!): [EmailDraftType] } extend type Mutation { writeReadReceipt(actionLogId: ID!): ReadReceiptType - writeInjectSelectionConfirmation( - injectSelectionId: ID! - ): InjectSelectionConfirmationType writeReadReceiptEmail(emailId: ID!): EmailReceipt - writeReadReceiptEmailThread(emailThreadId: ID!): EmailThreadReceipt - resetReadReceiptEmailThread(emailThreadId: ID!): EmailThreadReceipt - writeEmailDraft(emailDraft: EmailDraftInput!): EmailDraftType - writeReadReceiptChannel(channelId: ID!, teamId: ID!): ChannelReceipt - resetReadReceiptChannel(channelId: ID!, teamId: ID!): ChannelReceipt + setEmailDraft(emailDraft: EmailDraftInput!): EmailDraftType + deleteEmailDraft( + teamId: ID! + instructor: Boolean! + emailThreadId: ID + ): MutationResult + setIsUnreadEmailThread( + threadId: ID! + teamId: ID! + isUnread: Boolean! + ): MutationResult + setIsUnreadChannel( + channelId: ID! + teamId: ID! + isUnread: Boolean! + ): MutationResult +} + +type MutationResult { + operationDone: Boolean } type EmailDraftType { @@ -76,11 +81,6 @@ input EmailDraftInput { templateId: String } -type EmailThreadReceipt { - emailThreadId: ID! - readReceipt: DateTime -} - type EmailReceipt { emailId: ID! readReceipt: DateTime @@ -96,8 +96,3 @@ type ChannelReceipt { teamId: ID! readReceipt: DateTime } - -type InjectSelectionConfirmationType { - injectSelectionId: ID! - submitted: DateTime -} diff --git a/graphql/subscriptions/AnalyticsActionLogs.generated.ts b/graphql/subscriptions/AnalyticsActionLogs.generated.ts index fdfa95fbec667f290bfff2b2a72fe62c9042266e..2b75f8dfa55d8f8d0d54fe2311446a5f94fc3050 100644 --- a/graphql/subscriptions/AnalyticsActionLogs.generated.ts +++ b/graphql/subscriptions/AnalyticsActionLogs.generated.ts @@ -10,10 +10,10 @@ export type ExerciseActionLogsVariables = _Types.Exact<{ }>; -export type ExerciseActionLogs = { analyticsActionLogsSubscription: { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null } | null }; +export type ExerciseActionLogs = { analyticsActionLogsSubscription: { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null } | null }; -export const ExerciseActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exerciseActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsActionLogsSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; +export const ExerciseActionLogsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exerciseActionLogs"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsActionLogsSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; /** * __useExerciseActionLogs__ diff --git a/graphql/subscriptions/AnalyticsEmailThread.generated.ts b/graphql/subscriptions/AnalyticsEmailThread.generated.ts index d25ae9fe9a33fa82c8853273fe52ed9e3b6c678b..def2b42f1f4c1ab8fc19ddb94650a83f23aba299 100644 --- a/graphql/subscriptions/AnalyticsEmailThread.generated.ts +++ b/graphql/subscriptions/AnalyticsEmailThread.generated.ts @@ -10,10 +10,10 @@ export type ExerciseEmailThreadsVariables = _Types.Exact<{ }>; -export type ExerciseEmailThreads = { analyticsEmailThreadSubscription: { emailThread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null } | null }; +export type ExerciseEmailThreads = { analyticsEmailThreadSubscription: { emailThread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null } | null }; -export const ExerciseEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exerciseEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsEmailThreadSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const ExerciseEmailThreadsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exerciseEmailThreads"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"analyticsEmailThreadSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"exerciseId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"exerciseId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; /** * __useExerciseEmailThreads__ diff --git a/graphql/subscriptions/EmailThreads.generated.ts b/graphql/subscriptions/EmailThreads.generated.ts index e51b56b4bd0255a14d335a286fdedbf74d890f5f..e87a7bef3eb07b221faa97f5b405da1cdff72218 100644 --- a/graphql/subscriptions/EmailThreads.generated.ts +++ b/graphql/subscriptions/EmailThreads.generated.ts @@ -10,10 +10,10 @@ export type EmailThreadsSubscriptionVariables = _Types.Exact<{ }>; -export type EmailThreadsSubscription = { emailThreads: { emailThread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null } | null } | null }; +export type EmailThreadsSubscription = { emailThreads: { emailThread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> } | null } | null }; -export const EmailThreadsSubscriptionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"EmailThreadsSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; +export const EmailThreadsSubscriptionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"EmailThreadsSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThreads"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"emailThread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}}]} as unknown as DocumentNode; /** * __useEmailThreadsSubscription__ diff --git a/graphql/subscriptions/Exercises.generated.ts b/graphql/subscriptions/Exercises.generated.ts index 9b39167a2c2eda81fca0d6347fe17ed060d3e644..5d029ed53a2ba4e676574e88c5dd6dee31aec14f 100644 --- a/graphql/subscriptions/Exercises.generated.ts +++ b/graphql/subscriptions/Exercises.generated.ts @@ -8,10 +8,10 @@ const defaultOptions = {} as const; export type ExercisesVariables = _Types.Exact<{ [key: string]: never; }>; -export type Exercises = { exercisesSubscription: { eventType: _Types.ExerciseEventTypeEnum | null, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string } | null> | null } | null } | null }; +export type Exercises = { exercisesSubscription: { eventType: _Types.ExerciseEventTypeEnum | null, exercise: { id: string, name: string, running: boolean, finished: boolean, exerciseStart: string | null, timeDelta: number, definition: { id: number | null, name: string | null } | null, teams: Array<{ id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }>, emailParticipants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null } | null } | null }; -export const ExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercisesSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}}]} as unknown as DocumentNode; +export const ExercisesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"exercises"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercisesSubscription"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Exercise"}}]}},{"kind":"Field","name":{"kind":"Name","value":"eventType"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Exercise"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"running"}},{"kind":"Field","name":{"kind":"Name","value":"finished"}},{"kind":"Field","name":{"kind":"Name","value":"exerciseStart"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teams"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"emailParticipants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","alias":{"kind":"Name","value":"timeDelta"},"name":{"kind":"Name","value":"elapsedS"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}}]} as unknown as DocumentNode; /** * __useExercises__ diff --git a/graphql/subscriptions/TeamActionLogs.generated.ts b/graphql/subscriptions/TeamActionLogs.generated.ts index d677617b7cc76b84a92d264bd992ee2c6a085cd4..c07e355cc9453d92dada3ba89c89c9de08e79245 100644 --- a/graphql/subscriptions/TeamActionLogs.generated.ts +++ b/graphql/subscriptions/TeamActionLogs.generated.ts @@ -10,10 +10,10 @@ export type TeamActionVariables = _Types.Exact<{ }>; -export type TeamAction = { actionLogs: { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ readReceipt: string | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, readReceipt: string | null, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, hasParam: boolean | null, definition: { id: number | null, name: string | null } | null, responses: Array<{ id: string, param: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null } | null }; +export type TeamAction = { actionLogs: { actionLog: { id: string, timestamp: string, type: _Types.LogType, readReceipt: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, channel: { id: string, name: string, type: _Types.ChannelType, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, details: { id: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string, subject: string, timestamp: string, participants: Array<{ id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }>, emails: Array<{ id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null }>, lastEmail: { id: string, timestamp: string, readReceipt: string | null, sender: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null }, thread: { id: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | null, readReceipt: Array<{ isUnread: boolean | null, teamId: string }> }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, inject: { id: string, name: string, time: number, delay: number, organization: string, type: _Types.InjectType }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, overlay: { id: string, duration: number } | null } | { id: string, title: string, time: number, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, overlay: { id: string, duration: number } | null, questions: Array<{ id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } }>, teamQuestionnaireStates: Array<{ id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } }> } | { id: string, argument: string, tool: { id: string, name: string, tooltipDescription: string, defaultResponse: string, roles: string, hint: string, definition: { id: number | null, name: string | null } | null }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } } } | null } | null }; -export const TeamActionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamAction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"actionLogs"},"name":{"kind":"Name","value":"actionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"readReceipt"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExtendedTool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExtendedTool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExtendedToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}},{"kind":"Field","name":{"kind":"Name","value":"responses"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolResponse"}}]}},{"kind":"Field","name":{"kind":"Name","value":"hasParam"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolResponse"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolResponseType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"param"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; +export const TeamActionDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamAction"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"actionLogs"},"name":{"kind":"Name","value":"actionLogs"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"actionLog"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ActionLog"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ActionLog"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ActionLogType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"channel"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Channel"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"details"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ToolDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"CustomInjectDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailDetails"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireDetails"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Channel"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionChannelType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"type"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ToolDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"tool"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Tool"}}]}},{"kind":"Field","name":{"kind":"Name","value":"argument"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Tool"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ToolType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tooltipDescription"}},{"kind":"Field","name":{"kind":"Name","value":"defaultResponse"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"hint"}},{"kind":"Field","name":{"kind":"Name","value":"definition"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"ExerciseDefinition"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"ExerciseDefinition"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ExerciseDefinitionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"inject"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"DefinitionInject"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"DefinitionInject"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"DefinitionInjectType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"delay"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Overlay"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"OverlayType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"duration"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"CustomInjectDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"CustomInjectDetailsType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailThread"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailThread"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailThreadType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"participants"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"subject"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"emails"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"lastEmail"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Email"}}]}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"isUnread"}},{"kind":"Field","name":{"kind":"Name","value":"teamId"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Email"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"thread"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"readReceipt"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"always"},"value":{"kind":"BooleanValue","value":true}}]}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireDetails"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"time"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"overlay"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Overlay"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}}]} as unknown as DocumentNode; /** * __useTeamAction__ diff --git a/graphql/subscriptions/TeamInjectSelections.generated.ts b/graphql/subscriptions/TeamInjectSelections.generated.ts deleted file mode 100644 index adb338e31542ec90bb6bcbc0a6b693fee4208bb7..0000000000000000000000000000000000000000 --- a/graphql/subscriptions/TeamInjectSelections.generated.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable */ -//@ts-nocheck -import type * as _Types from '../types'; - -import type { DocumentNode } from 'graphql'; -import * as Apollo from '@apollo/client'; -const defaultOptions = {} as const; -export type TeamInjectSelectionsVariables = _Types.Exact<{ - teamId: _Types.Scalars['ID']['input']; -}>; - - -export type TeamInjectSelections = { injectSelection: { injectSelection: { id: string, name: string, timestamp: string | null, submitted: string | null, team: { id: string }, options: Array<{ id: string, sender: string, name: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string }, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null } }> } | null } | null }; - - -export const TeamInjectSelectionsDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamInjectSelections"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"injectSelection"},"name":{"kind":"Name","value":"injectSelections"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"injectSelection"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectSelection"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectSelection"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectSelectionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"timestamp"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"options"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InjectOption"}}]}},{"kind":"Field","name":{"kind":"Name","value":"submitted"},"directives":[{"kind":"Directive","name":{"kind":"Name","value":"client"}}]}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InjectOption"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InjectOptionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"sender"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; - -/** - * __useTeamInjectSelections__ - * - * To run a query within a React component, call `useTeamInjectSelections` and pass it any options that fit your needs. - * When your component renders, `useTeamInjectSelections` returns an object from Apollo Client that contains loading, error, and data properties - * you can use to render your UI. - * - * @param baseOptions options that will be passed into the subscription, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options; - * - * @example - * const { data, loading, error } = useTeamInjectSelections({ - * variables: { - * teamId: // value for 'teamId' - * }, - * }); - */ -export function useTeamInjectSelections(baseOptions: Apollo.SubscriptionHookOptions<TeamInjectSelections, TeamInjectSelectionsVariables> & ({ variables: TeamInjectSelectionsVariables; skip?: boolean; } | { skip: boolean; }) ) { - const options = {...defaultOptions, ...baseOptions} - return Apollo.useSubscription<TeamInjectSelections, TeamInjectSelectionsVariables>(TeamInjectSelectionsDocument, options); - } -export type TeamInjectSelectionsHookResult = ReturnType<typeof useTeamInjectSelections>; -export type TeamInjectSelectionsSubscriptionResult = Apollo.SubscriptionResult<TeamInjectSelections>; \ No newline at end of file diff --git a/graphql/subscriptions/TeamMilestones.generated.ts b/graphql/subscriptions/TeamMilestones.generated.ts index d54c8869680d2dedd06e9eb6ad5977734b8015dc..a7eb4059051bd79ba453072c8792ef8e126cb459 100644 --- a/graphql/subscriptions/TeamMilestones.generated.ts +++ b/graphql/subscriptions/TeamMilestones.generated.ts @@ -13,7 +13,7 @@ export type TeamMilestonesVariables = _Types.Exact<{ export type TeamMilestones = { milestones: { milestones: Array<{ id: string, reached: boolean, timestampReached: string | null, teamIds: Array<string | null> | null, milestone: { id: string, name: string, teamVisible: boolean, roles: string, fileNames: string } } | null> | null } | null }; -export const TeamMilestonesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamMilestones"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"milestones"},"name":{"kind":"Name","value":"milestones"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MilestoneState"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MilestoneState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MilestoneStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestone"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"timestampReached"}},{"kind":"Field","name":{"kind":"Name","value":"teamIds"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Milestone"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MilestoneType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"fileNames"}}]}}]} as unknown as DocumentNode; +export const TeamMilestonesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamMilestones"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"milestones"},"name":{"kind":"Name","value":"milestones"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}},{"kind":"Argument","name":{"kind":"Name","value":"visibleOnly"},"value":{"kind":"BooleanValue","value":false}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MilestoneState"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"MilestoneState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MilestoneStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestone"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"timestampReached"}},{"kind":"Field","name":{"kind":"Name","value":"teamIds"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Milestone"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"MilestoneType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}},{"kind":"Field","name":{"kind":"Name","value":"fileNames"}}]}}]} as unknown as DocumentNode; /** * __useTeamMilestones__ diff --git a/graphql/subscriptions/TeamQuestionnaireState.generated.ts b/graphql/subscriptions/TeamQuestionnaireState.generated.ts index a08a080f56d0f76da78375fdebf09ad325a50b07..18e74f4887cd919bb287ab0ca79b7790294065c2 100644 --- a/graphql/subscriptions/TeamQuestionnaireState.generated.ts +++ b/graphql/subscriptions/TeamQuestionnaireState.generated.ts @@ -10,10 +10,10 @@ export type TeamQuestionnaireStateVariables = _Types.Exact<{ }>; -export type TeamQuestionnaireState = { teamQuestionnaireState: { teamQuestionnaireState: { id: string, status: _Types.TeamQuestionnaireStateStatus, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, text: string, max: number, correct: number, labels: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }> } } | null }; +export type TeamQuestionnaireState = { teamQuestionnaireState: { teamQuestionnaireState: { id: string, status: _Types.Status | null, timestampSent: string | null, timestampAnswered: string | null, team: { id: string, name: string, role: string, emailAddress: { id: string, address: string, definitionAddress: { id: string, address: string, description: string, teamVisible: boolean, organization: string, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } | null, team: { id: string, name: string, role: string } | null } | null, exercise: { id: string, name: string }, userSet: Array<{ id: any, username: string, firstName: string | null, lastName: string | null, group: _Types.AuthGroup | null } | null> | null }, answers: Array<{ id: string, choice: number, isCorrect: boolean | null, question: { id: string, max: number, correct: number, labels: string, content: { id: string, raw: string, rendered: string, fileInfo: { id: any, fileName: string } | null }, control: { id: string, milestoneCondition: string, activateMilestone: string, deactivateMilestone: string, roles: string } } }>, questionnaire: { id: string } } } | null }; -export const TeamQuestionnaireStateDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamQuestionnaireState"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"teamQuestionnaireState"},"name":{"kind":"Name","value":"teamQuestionnaireStateSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}}]} as unknown as DocumentNode; +export const TeamQuestionnaireStateDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"subscription","name":{"kind":"Name","value":"teamQuestionnaireState"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","alias":{"kind":"Name","value":"teamQuestionnaireState"},"name":{"kind":"Name","value":"teamQuestionnaireStateSubscription"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"teamId"},"value":{"kind":"Variable","name":{"kind":"Name","value":"teamId"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"teamQuestionnaireState"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamQuestionnaireState"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamQuestionnaireState"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamQuestionnaireStateType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Team"}}]}},{"kind":"Field","name":{"kind":"Name","value":"status"}},{"kind":"Field","name":{"kind":"Name","value":"timestampSent"}},{"kind":"Field","name":{"kind":"Name","value":"timestampAnswered"}},{"kind":"Field","name":{"kind":"Name","value":"answers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"QuestionnaireAnswer"}}]}},{"kind":"Field","name":{"kind":"Name","value":"questionnaire"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Team"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}},{"kind":"Field","name":{"kind":"Name","value":"emailAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailParticipant"}}]}},{"kind":"Field","name":{"kind":"Name","value":"exercise"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"userSet"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"RestrictedUser"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailParticipant"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailParticipantType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"definitionAddress"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"EmailAddress"}}]}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"team"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamWithoutEmailAddress"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"EmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"EmailAddressType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"address"}},{"kind":"Field","name":{"kind":"Name","value":"description"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}},{"kind":"Field","name":{"kind":"Name","value":"teamVisible"}},{"kind":"Field","name":{"kind":"Name","value":"organization"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Control"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ControlType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"milestoneCondition"}},{"kind":"Field","name":{"kind":"Name","value":"activateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"deactivateMilestone"}},{"kind":"Field","name":{"kind":"Name","value":"roles"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamWithoutEmailAddress"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"role"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"RestrictedUser"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"RestrictedUser"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"username"}},{"kind":"Field","name":{"kind":"Name","value":"firstName"}},{"kind":"Field","name":{"kind":"Name","value":"lastName"}},{"kind":"Field","name":{"kind":"Name","value":"group"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"QuestionnaireAnswer"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionnaireAnswerType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"choice"}},{"kind":"Field","name":{"kind":"Name","value":"isCorrect"}},{"kind":"Field","name":{"kind":"Name","value":"question"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Question"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Question"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"QuestionType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"content"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Content"}}]}},{"kind":"Field","name":{"kind":"Name","value":"max"}},{"kind":"Field","name":{"kind":"Name","value":"correct"}},{"kind":"Field","name":{"kind":"Name","value":"labels"}},{"kind":"Field","name":{"kind":"Name","value":"control"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Control"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"Content"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"raw"}},{"kind":"Field","name":{"kind":"Name","value":"rendered"}},{"kind":"Field","name":{"kind":"Name","value":"fileInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"FileInfo"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"FileInfo"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"FileInfoType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"fileName"}}]}}]} as unknown as DocumentNode; /** * __useTeamQuestionnaireState__ diff --git a/graphql/types.ts b/graphql/types.ts index 8485510cfc78a9ea49eb313c135bcc8602b9cc14..565eb9b7a47891a25dac1352b799b581b2c52961 100644 --- a/graphql/types.ts +++ b/graphql/types.ts @@ -76,23 +76,39 @@ export type AssignInstructorsToExercise = { operationDone?: Maybe<Scalars['Boolean']['output']>; }; +export type AssignUsersByTags = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; + +export type AssignUsersEqually = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; + export type AssignUsersToTeamMutation = { operationDone?: Maybe<Scalars['Boolean']['output']>; }; +/** An enumeration. */ +export type AuthGroup = + | 'ADMIN' + | 'INSTRUCTOR' + | 'TRAINEE' + | '%future added value'; + export type ChangeUserDataMutation = { user?: Maybe<UserType>; }; export type ChangeUserInput = { active?: InputMaybe<Scalars['Boolean']['input']>; - group?: InputMaybe<Scalars['String']['input']>; + group?: InputMaybe<AuthGroup>; userId: Scalars['UUID']['input']; }; -export type ChannelReadReceipt = { - readReceipt?: Maybe<Scalars['DateTime']['output']>; - teamId: Scalars['ID']['output']; +export type ChangeUserType = { + active?: Maybe<Scalars['Boolean']['output']>; + group?: Maybe<AuthGroup>; + userId: Scalars['UUID']['output']; }; export type ChannelReceipt = { @@ -144,6 +160,10 @@ export type ControlType = { roles: Scalars['String']['output']; }; +export type CopyUsersAssignment = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; + export type CreateExerciseInput = { configOverride?: InputMaybe<ConfigOverrideInput>; definitionId: Scalars['ID']['input']; @@ -162,26 +182,66 @@ export type CreateExerciseType = { teamCount: Scalars['Int']['output']; }; +export type CreateTagMutation = { + newTag: TagType; +}; + export type CreateThreadMutation = { thread?: Maybe<EmailThreadType>; }; +export type CreateUserInput = { + email: Scalars['String']['input']; + firstName?: InputMaybe<Scalars['String']['input']>; + group?: InputMaybe<AuthGroup>; + lastName?: InputMaybe<Scalars['String']['input']>; + tags?: Array<Scalars['String']['input']>; +}; + +export type CreateUserMutation = { + newUser: RestrictedUser; +}; + +export type CreateUserType = { + email: Scalars['String']['output']; + firstName?: Maybe<Scalars['String']['output']>; + group?: Maybe<AuthGroup>; + lastName?: Maybe<Scalars['String']['output']>; + tags: Array<Scalars['String']['output']>; +}; + export type CustomInjectDetailsType = { content: ContentType; id: Scalars['ID']['output']; + overlay?: Maybe<OverlayType>; user?: Maybe<RestrictedUser>; }; +export type CustomInjectInput = { + content: Scalars['String']['input']; + exerciseId: Scalars['ID']['input']; + fileId?: InputMaybe<Scalars['UUID']['input']>; + overlay?: InputMaybe<OverlayInput>; + teamIds: Array<InputMaybe<Scalars['ID']['input']>>; +}; + +export type CustomInjectType = { + content: Scalars['String']['output']; + exerciseId: Scalars['ID']['output']; + fileId?: Maybe<Scalars['UUID']['output']>; + overlay?: Maybe<OverlayType>; + teamIds: Array<Maybe<Scalars['ID']['output']>>; +}; + export type DefinitionChannelType = { definition: DefinitionType; id: Scalars['ID']['output']; name: Scalars['String']['output']; - readReceipt: Array<ChannelReadReceipt>; + readReceipt: Array<IsUnreadType>; type: ChannelType; }; export type DefinitionInjectType = { - auto: Scalars['Boolean']['output']; delay: Scalars['Int']['output']; id: Scalars['ID']['output']; name: Scalars['String']['output']; @@ -220,6 +280,14 @@ export type DeleteExerciseMutation = { operationDone?: Maybe<Scalars['Boolean']['output']>; }; +export type DeleteTagsMutation = { + operationDone: Scalars['Boolean']['output']; +}; + +export type DeleteUsersMutation = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; + export type EmailAddressType = { address: Scalars['String']['output']; control: ControlType; @@ -282,11 +350,6 @@ export type EmailTemplateType = { sender?: Maybe<Scalars['String']['output']>; }; -export type EmailThreadReceipt = { - emailThreadId: Scalars['ID']['output']; - readReceipt?: Maybe<Scalars['DateTime']['output']>; -}; - export type EmailThreadSubscription = { emailThread?: Maybe<EmailThreadType>; }; @@ -297,7 +360,7 @@ export type EmailThreadType = { id: Scalars['ID']['output']; lastEmail?: Maybe<EmailType>; participants: Array<EmailParticipantType>; - readReceipt?: Maybe<Scalars['DateTime']['output']>; + readReceipt: Array<IsUnreadType>; subject: Scalars['String']['output']; timestamp: Scalars['DateTime']['output']; }; @@ -352,18 +415,15 @@ export type ExercisesSubscription = { export type ExtendedToolType = { defaultResponse: Scalars['String']['output']; definition?: Maybe<ExerciseDefinitionType>; - hasParam?: Maybe<Scalars['Boolean']['output']>; hint: Scalars['String']['output']; id: Scalars['ID']['output']; name: Scalars['String']['output']; responses: Array<ToolResponseType>; roles: Scalars['String']['output']; - toolDetails: Array<ToolDetailsType>; tooltipDescription: Scalars['String']['output']; }; export type FileInfoType = { - content: Array<ContentType>; definition?: Maybe<DefinitionType>; fileName: Scalars['String']['output']; id: Scalars['UUID']['output']; @@ -371,10 +431,26 @@ export type FileInfoType = { export type FilterUsersInput = { active?: InputMaybe<Scalars['Boolean']['input']>; - group?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>; + firstName?: InputMaybe<Scalars['String']['input']>; + groups?: InputMaybe<Array<InputMaybe<AuthGroup>>>; + imported?: InputMaybe<Scalars['Boolean']['input']>; + lastName?: InputMaybe<Scalars['String']['input']>; limit?: InputMaybe<Scalars['Int']['input']>; skip?: InputMaybe<Scalars['Int']['input']>; tags?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>; + username?: InputMaybe<Scalars['String']['input']>; +}; + +export type FilterUsersType = { + active?: Maybe<Scalars['Boolean']['output']>; + firstName?: Maybe<Scalars['String']['output']>; + groups?: Maybe<Array<Maybe<AuthGroup>>>; + imported?: Maybe<Scalars['Boolean']['output']>; + lastName?: Maybe<Scalars['String']['output']>; + limit?: Maybe<Scalars['Int']['output']>; + skip?: Maybe<Scalars['Int']['output']>; + tags?: Maybe<Array<Maybe<Scalars['String']['output']>>>; + username?: Maybe<Scalars['String']['output']>; }; export type GrapheneConfig = { @@ -385,11 +461,6 @@ export type GrapheneConfig = { showExerciseTime?: Maybe<Scalars['Boolean']['output']>; }; -export type GroupType = { - id: Scalars['ID']['output']; - name: Scalars['String']['output']; -}; - export type InjectDetailsType = { content: ContentType; id: Scalars['ID']['output']; @@ -397,33 +468,6 @@ export type InjectDetailsType = { overlay?: Maybe<OverlayType>; }; -export type InjectOptionType = { - content: ContentType; - control: ControlType; - id: Scalars['ID']['output']; - injectSelection: InjectSelectionType; - name: Scalars['String']['output']; - sender: Scalars['String']['output']; -}; - -export type InjectSelectionConfirmationType = { - injectSelectionId: Scalars['ID']['output']; - submitted?: Maybe<Scalars['DateTime']['output']>; -}; - -export type InjectSelectionType = { - id: Scalars['ID']['output']; - name: Scalars['String']['output']; - options: Array<InjectOptionType>; - submitted?: Maybe<Scalars['DateTime']['output']>; - team: TeamType; - timestamp?: Maybe<Scalars['DateTime']['output']>; -}; - -export type InjectSelectionsSubscription = { - injectSelection?: Maybe<InjectSelectionType>; -}; - /** An enumeration. */ export type InjectType = /** Email */ @@ -436,6 +480,11 @@ export type InjectType = | 'TOOL' | '%future added value'; +export type IsUnreadType = { + isUnread?: Maybe<Scalars['Boolean']['output']>; + teamId: Scalars['ID']['output']; +}; + export type LearningActivityType = { id: Scalars['ID']['output']; milestones: Array<MilestoneType>; @@ -483,6 +532,7 @@ export type MilestoneType = { fileNames: Scalars['String']['output']; final: Scalars['Boolean']['output']; id: Scalars['ID']['output']; + initialState: Scalars['Boolean']['output']; name: Scalars['String']['output']; roles: Scalars['String']['output']; teamVisible: Scalars['Boolean']['output']; @@ -507,18 +557,33 @@ export type Mutation = { answerQuestionnaire?: Maybe<AnswerQuestionnaireMutation>; /** Mutation for assigning instructors (users) to the exercise */ assignInstructorsToExercise?: Maybe<AssignInstructorsToExercise>; + /** Mutation for assigning users to the teams by tags */ + assignUsersByTags?: Maybe<AssignUsersByTags>; + /** Mutation for assigning users to the exercise equally if possible */ + assignUsersEqually?: Maybe<AssignUsersEqually>; /** Mutation for assigning users to the specific team of the exercise */ assignUsersToTeam?: Maybe<AssignUsersToTeamMutation>; /** Mutation for changing user data */ changeUserData?: Maybe<ChangeUserDataMutation>; + /** Mutation for copying users assignments from one exercise to another */ + copyUsersAssignment?: Maybe<CopyUsersAssignment>; /** Mutation that creates a new exercise with given definition by its id */ createExercise?: Maybe<CreateExerciseMutation>; + /** Mutation for creating a tag */ + createTag?: Maybe<CreateTagMutation>; /** Mutation for creating a new thread */ createThread?: Maybe<CreateThreadMutation>; + /** Mutation for creating a user */ + createUser?: Maybe<CreateUserMutation>; /** Mutation that deletes a definition of given id */ deleteDefinition?: Maybe<DeleteDefinitionMutation>; + deleteEmailDraft?: Maybe<MutationResult>; /** Mutation that deletes an exercise of given id */ deleteExercise?: Maybe<DeleteExerciseMutation>; + /** Mutation for deleting a tag */ + deleteTags?: Maybe<DeleteTagsMutation>; + /** Mutation for deleting users */ + deleteUsers?: Maybe<DeleteUsersMutation>; /** Mutation for logging in an user */ login?: Maybe<LoginMutation>; /** Mutation for logging out an user */ @@ -529,30 +594,33 @@ export type Mutation = { moveTime?: Maybe<MoveExerciseTimeMutation>; /** Mutation for changing a user's password */ passwordChange?: Maybe<PasswordChange>; + /** Mutation for re-generating credentials for users */ + regenerateCredentials?: Maybe<RegenerateCredentialsMutation>; /** Mutation for removing access of instructors (users) to the definition */ removeDefinitionAccess?: Maybe<RemoveDefinitionAccessMutation>; /** Mutation for removing instructors (users) from the exercise */ removeInstructorsFromExercise?: Maybe<RemoveInstructorsFromExerciseMutation>; /** Mutation for removing users from the specific team of the exercise */ removeUsersFromTeam?: Maybe<RemoveUsersFromTeamMutation>; - resetReadReceiptChannel?: Maybe<ChannelReceipt>; - resetReadReceiptEmailThread?: Maybe<EmailThreadReceipt>; - /** Mutation for selecting an inject for a specific team */ - selectTeamInjectOption?: Maybe<SelectTeamInjectOptionMutation>; + /** Mutation for sending custom injects */ + sendCustomInject?: Maybe<SendCustomInjectMutation>; /** Mutation for sending an email */ sendEmail?: Maybe<SendEmailMutation>; + setEmailDraft?: Maybe<EmailDraftType>; + setIsUnreadChannel?: Maybe<MutationResult>; + setIsUnreadEmailThread?: Maybe<MutationResult>; /** Mutation for starting the specified exercise */ startExercise?: Maybe<StartExerciseMutation>; /** Mutation that stops an exercise of given id */ stopExercise?: Maybe<StopExerciseMutation>; + /** Mutation for updating a tag */ + updateTag?: Maybe<UpdateTagMutation>; + /** Mutation for changing tag assignments */ + updateTagAssignments?: Maybe<UpdateTagAssignmentsMutation>; /** Mutation for performing a tool action */ useTool?: Maybe<UseToolMutation>; - writeEmailDraft?: Maybe<EmailDraftType>; - writeInjectSelectionConfirmation?: Maybe<InjectSelectionConfirmationType>; writeReadReceipt?: Maybe<ReadReceiptType>; - writeReadReceiptChannel?: Maybe<ChannelReceipt>; writeReadReceiptEmail?: Maybe<EmailReceipt>; - writeReadReceiptEmailThread?: Maybe<EmailThreadReceipt>; }; @@ -573,6 +641,19 @@ export type MutationAssignInstructorsToExerciseArgs = { }; +export type MutationAssignUsersByTagsArgs = { + exerciseId: Scalars['ID']['input']; + tagPrefix: Scalars['String']['input']; + userIds: Array<Scalars['ID']['input']>; +}; + + +export type MutationAssignUsersEquallyArgs = { + exerciseId: Scalars['ID']['input']; + userIds: Array<Scalars['ID']['input']>; +}; + + export type MutationAssignUsersToTeamArgs = { teamId: Scalars['ID']['input']; userIds: Array<InputMaybe<Scalars['ID']['input']>>; @@ -584,11 +665,22 @@ export type MutationChangeUserDataArgs = { }; +export type MutationCopyUsersAssignmentArgs = { + fromExerciseId: Scalars['ID']['input']; + toExerciseId: Scalars['ID']['input']; +}; + + export type MutationCreateExerciseArgs = { createExerciseInput: CreateExerciseInput; }; +export type MutationCreateTagArgs = { + name: Scalars['String']['input']; +}; + + export type MutationCreateThreadArgs = { exerciseId: Scalars['ID']['input']; participantAddresses: Array<InputMaybe<Scalars['String']['input']>>; @@ -596,16 +688,39 @@ export type MutationCreateThreadArgs = { }; +export type MutationCreateUserArgs = { + createUserInput: CreateUserInput; +}; + + export type MutationDeleteDefinitionArgs = { definitionId: Scalars['ID']['input']; }; +export type MutationDeleteEmailDraftArgs = { + emailThreadId?: InputMaybe<Scalars['ID']['input']>; + instructor: Scalars['Boolean']['input']; + teamId: Scalars['ID']['input']; +}; + + export type MutationDeleteExerciseArgs = { exerciseId: Scalars['ID']['input']; }; +export type MutationDeleteTagsArgs = { + force?: InputMaybe<Scalars['Boolean']['input']>; + tagIds: Array<Scalars['ID']['input']>; +}; + + +export type MutationDeleteUsersArgs = { + userIds: Array<InputMaybe<Scalars['ID']['input']>>; +}; + + export type MutationLoginArgs = { password: Scalars['String']['input']; username: Scalars['String']['input']; @@ -632,6 +747,11 @@ export type MutationPasswordChangeArgs = { }; +export type MutationRegenerateCredentialsArgs = { + userIds: Array<InputMaybe<Scalars['ID']['input']>>; +}; + + export type MutationRemoveDefinitionAccessArgs = { definitionId: Scalars['ID']['input']; userIds: Array<InputMaybe<Scalars['ID']['input']>>; @@ -650,24 +770,32 @@ export type MutationRemoveUsersFromTeamArgs = { }; -export type MutationResetReadReceiptChannelArgs = { - channelId: Scalars['ID']['input']; - teamId: Scalars['ID']['input']; +export type MutationSendCustomInjectArgs = { + customInjectInput: CustomInjectInput; }; -export type MutationResetReadReceiptEmailThreadArgs = { - emailThreadId: Scalars['ID']['input']; +export type MutationSendEmailArgs = { + sendEmailInput: SendEmailInput; }; -export type MutationSelectTeamInjectOptionArgs = { - selectTeamInjectInput: SelectTeamInjectInput; +export type MutationSetEmailDraftArgs = { + emailDraft: EmailDraftInput; }; -export type MutationSendEmailArgs = { - sendEmailInput: SendEmailInput; +export type MutationSetIsUnreadChannelArgs = { + channelId: Scalars['ID']['input']; + isUnread: Scalars['Boolean']['input']; + teamId: Scalars['ID']['input']; +}; + + +export type MutationSetIsUnreadEmailThreadArgs = { + isUnread: Scalars['Boolean']['input']; + teamId: Scalars['ID']['input']; + threadId: Scalars['ID']['input']; }; @@ -681,18 +809,19 @@ export type MutationStopExerciseArgs = { }; -export type MutationUseToolArgs = { - useToolInput: UseToolInput; +export type MutationUpdateTagArgs = { + newName: Scalars['String']['input']; + tagId: Scalars['ID']['input']; }; -export type MutationWriteEmailDraftArgs = { - emailDraft: EmailDraftInput; +export type MutationUpdateTagAssignmentsArgs = { + updateTagAssignmentsInput: UpdateTagAssignmentsInput; }; -export type MutationWriteInjectSelectionConfirmationArgs = { - injectSelectionId: Scalars['ID']['input']; +export type MutationUseToolArgs = { + useToolInput: UseToolInput; }; @@ -701,19 +830,16 @@ export type MutationWriteReadReceiptArgs = { }; -export type MutationWriteReadReceiptChannelArgs = { - channelId: Scalars['ID']['input']; - teamId: Scalars['ID']['input']; -}; - - export type MutationWriteReadReceiptEmailArgs = { emailId: Scalars['ID']['input']; }; +export type MutationResult = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; -export type MutationWriteReadReceiptEmailThreadArgs = { - emailThreadId: Scalars['ID']['input']; +export type OverlayInput = { + duration: Scalars['Int']['input']; }; export type OverlayType = { @@ -734,8 +860,6 @@ export type Query = { analyticsEmailThreads?: Maybe<Array<Maybe<EmailThreadType>>>; /** Retrieve all milestones for the specific exercise. Useful for analytics. */ analyticsMilestones?: Maybe<Array<Maybe<MilestoneStateType>>>; - /** Retrieve all auto inject categories */ - autoInjects?: Maybe<Array<Maybe<DefinitionInjectType>>>; /** Retrieve a specific channel */ channel?: Maybe<DefinitionChannelType>; /** Retrieve a specific definition */ @@ -774,13 +898,18 @@ export type Query = { extendedTeamTools?: Maybe<Array<Maybe<ExtendedToolType>>>; /** Retrieve a specific file info */ fileInfo?: Maybe<FileInfoType>; - /** Retrieve all groups (for filtering) */ - groups?: Maybe<Array<Maybe<GroupType>>>; + getEmailDraft?: Maybe<EmailDraftType>; + getEmailDrafts?: Maybe<Array<Maybe<EmailDraftType>>>; + /** Retrieve all automatic injects */ + injects?: Maybe<Array<Maybe<DefinitionInjectType>>>; + /** Retrieve all learning objectives for an exercise */ + learningObjectives?: Maybe<Array<Maybe<LearningObjectiveType>>>; /** Retrieve all milestones */ milestones?: Maybe<Array<Maybe<MilestoneType>>>; /** Retrieve the specific questionnaire state for this team */ questionnaireState?: Maybe<TeamQuestionnaireStateType>; - returnLocalEmailDraft?: Maybe<EmailDraftType>; + /** Retrieve all questionnaires for an exercise */ + questionnaires?: Maybe<Array<Maybe<QuestionnaireType>>>; /** Retrieve all tags (for filtering) */ tags?: Maybe<Array<Maybe<TagType>>>; /** Retrieve a specific team */ @@ -791,10 +920,10 @@ export type Query = { teamChannelLogs?: Maybe<Array<Maybe<ActionLogType>>>; /** Retrieve the email participant that belongs to the specified team */ teamEmailParticipant?: Maybe<EmailParticipantType>; - /** Retrieve all available inject selections for the specific team. Useful for the instructor view. */ - teamInjectSelections?: Maybe<Array<Maybe<InjectSelectionType>>>; /** Retrieve the learning objectives for the specific team */ teamLearningObjectives?: Maybe<Array<Maybe<TeamLearningObjectiveType>>>; + /** Retrieve a specific milestone state */ + teamMilestone?: Maybe<MilestoneStateType>; /** Retrieve all milestones for the specific team filtered by team visibility */ teamMilestones?: Maybe<Array<Maybe<MilestoneStateType>>>; /** Retrieve all questionnaire states for this team */ @@ -839,11 +968,6 @@ export type QueryAnalyticsMilestonesArgs = { }; -export type QueryAutoInjectsArgs = { - exerciseId: Scalars['ID']['input']; -}; - - export type QueryChannelArgs = { channelId: Scalars['ID']['input']; }; @@ -933,6 +1057,29 @@ export type QueryFileInfoArgs = { }; +export type QueryGetEmailDraftArgs = { + emailThreadId?: InputMaybe<Scalars['ID']['input']>; + instructor: Scalars['Boolean']['input']; + teamId: Scalars['ID']['input']; +}; + + +export type QueryGetEmailDraftsArgs = { + instructor: Scalars['Boolean']['input']; + teamId: Scalars['ID']['input']; +}; + + +export type QueryInjectsArgs = { + exerciseId: Scalars['ID']['input']; +}; + + +export type QueryLearningObjectivesArgs = { + exerciseId: Scalars['ID']['input']; +}; + + export type QueryMilestonesArgs = { exerciseId: Scalars['ID']['input']; }; @@ -944,10 +1091,8 @@ export type QueryQuestionnaireStateArgs = { }; -export type QueryReturnLocalEmailDraftArgs = { - emailThreadId?: InputMaybe<Scalars['ID']['input']>; - instructor: Scalars['Boolean']['input']; - teamId: Scalars['ID']['input']; +export type QueryQuestionnairesArgs = { + exerciseId: Scalars['ID']['input']; }; @@ -972,13 +1117,13 @@ export type QueryTeamEmailParticipantArgs = { }; -export type QueryTeamInjectSelectionsArgs = { +export type QueryTeamLearningObjectivesArgs = { teamId: Scalars['ID']['input']; }; -export type QueryTeamLearningObjectivesArgs = { - teamId: Scalars['ID']['input']; +export type QueryTeamMilestoneArgs = { + milestoneStateId: Scalars['ID']['input']; }; @@ -1029,13 +1174,13 @@ export type QueryValidateEmailAddressArgs = { }; export type QuestionType = { + content: ContentType; control: ControlType; correct: Scalars['Int']['output']; id: Scalars['ID']['output']; labels: Scalars['String']['output']; max: Scalars['Int']['output']; questionnaire: QuestionnaireType; - text: Scalars['String']['output']; }; export type QuestionnaireAnswerType = { @@ -1068,6 +1213,10 @@ export type ReadReceiptType = { readReceipt?: Maybe<Scalars['DateTime']['output']>; }; +export type RegenerateCredentialsMutation = { + operationDone?: Maybe<Scalars['Boolean']['output']>; +}; + export type RemoveDefinitionAccessMutation = { operationDone?: Maybe<Scalars['Boolean']['output']>; }; @@ -1081,8 +1230,9 @@ export type RemoveUsersFromTeamMutation = { }; export type RestrictedExercise = { - id?: Maybe<Scalars['ID']['output']>; - uuid?: Maybe<Scalars['UUID']['output']>; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + uuid: Scalars['UUID']['output']; }; export type RestrictedTeam = { @@ -1096,49 +1246,20 @@ export type RestrictedTeam = { export type RestrictedUser = { dateJoined: Scalars['DateTime']['output']; firstName?: Maybe<Scalars['String']['output']>; - group?: Maybe<GroupType>; + group?: Maybe<AuthGroup>; id: Scalars['UUID']['output']; isActive: Scalars['Boolean']['output']; isImported: Scalars['Boolean']['output']; - isStaff: Scalars['Boolean']['output']; - isSuperuser: Scalars['Boolean']['output']; lastLogin?: Maybe<Scalars['DateTime']['output']>; lastName?: Maybe<Scalars['String']['output']>; - password: Scalars['String']['output']; tags: Array<TagType>; username: Scalars['String']['output']; }; -export type SelectTeamInjectInput = { - activateMilestone?: InputMaybe<Scalars['String']['input']>; - content: Scalars['String']['input']; - deactivateMilestone?: InputMaybe<Scalars['String']['input']>; - fileId?: InputMaybe<Scalars['UUID']['input']>; - optionEmail: Scalars['Boolean']['input']; - repeat?: InputMaybe<Scalars['Int']['input']>; - selectionId: Scalars['ID']['input']; - sender?: InputMaybe<Scalars['String']['input']>; - subject?: InputMaybe<Scalars['String']['input']>; - teamId: Scalars['ID']['input']; -}; - -export type SelectTeamInjectOptionMutation = { +export type SendCustomInjectMutation = { operationDone?: Maybe<Scalars['Boolean']['output']>; }; -export type SelectTeamInjectType = { - activateMilestone?: Maybe<Scalars['String']['output']>; - content: Scalars['String']['output']; - deactivateMilestone?: Maybe<Scalars['String']['output']>; - fileId?: Maybe<Scalars['UUID']['output']>; - optionEmail: Scalars['Boolean']['output']; - repeat?: Maybe<Scalars['Int']['output']>; - selectionId: Scalars['ID']['output']; - sender?: Maybe<Scalars['String']['output']>; - subject?: Maybe<Scalars['String']['output']>; - teamId: Scalars['ID']['output']; -}; - export type SendEmailInput = { activateMilestone?: InputMaybe<Scalars['String']['input']>; content?: InputMaybe<Scalars['String']['input']>; @@ -1165,6 +1286,13 @@ export type StartExerciseMutation = { exercise?: Maybe<ExerciseType>; }; +/** An enumeration. */ +export type Status = + | 'ANSWERED' + | 'SENT' + | 'UNSENT' + | '%future added value'; + export type StopExerciseMutation = { exercise?: Maybe<ExerciseType>; }; @@ -1184,8 +1312,6 @@ export type Subscription = { exerciseLoopRunning?: Maybe<ExerciseLoopRunningSubscription>; /** Subscription that notifies when exercises were modified */ exercisesSubscription?: Maybe<ExercisesSubscription>; - /** Subscription notifies about new inject selections available for the specific team */ - injectSelections?: Maybe<InjectSelectionsSubscription>; /** Subscription notifies about changes in milestone states */ milestones?: Maybe<MilestonesSubscription>; /** Subscription notifies about changes to the state of a teams questionnaires */ @@ -1223,11 +1349,6 @@ export type SubscriptionExerciseLoopRunningArgs = { }; -export type SubscriptionInjectSelectionsArgs = { - teamId?: InputMaybe<Scalars['ID']['input']>; -}; - - export type SubscriptionMilestonesArgs = { teamId: Scalars['ID']['input']; visibleOnly?: InputMaybe<Scalars['Boolean']['input']>; @@ -1258,16 +1379,6 @@ export type TeamLearningObjectiveType = { reached?: Maybe<Scalars['Boolean']['output']>; }; -/** An enumeration. */ -export type TeamQuestionnaireStateStatus = - /** Unsent */ - | 'A_0' - /** Sent */ - | 'A_2' - /** Answered */ - | 'A_4' - | '%future added value'; - export type TeamQuestionnaireStateSubscription = { teamQuestionnaireState: TeamQuestionnaireStateType; }; @@ -1276,7 +1387,7 @@ export type TeamQuestionnaireStateType = { answers: Array<QuestionnaireAnswerType>; id: Scalars['ID']['output']; questionnaire: QuestionnaireType; - status: TeamQuestionnaireStateStatus; + status?: Maybe<Status>; team: TeamType; timestampAnswered?: Maybe<Scalars['DateTime']['output']>; timestampSent?: Maybe<Scalars['DateTime']['output']>; @@ -1287,7 +1398,6 @@ export type TeamType = { exercise: ExerciseType; finishTime?: Maybe<Scalars['DateTime']['output']>; id: Scalars['ID']['output']; - injectSelections: Array<InjectSelectionType>; logs: Array<ActionLogType>; name: Scalars['String']['output']; role: Scalars['String']['output']; @@ -1299,7 +1409,7 @@ export type ToolDetailsType = { argument: Scalars['String']['output']; content: ContentType; id: Scalars['ID']['output']; - tool: ExtendedToolType; + tool: ToolType; user?: Maybe<RestrictedUser>; }; @@ -1320,10 +1430,29 @@ export type ToolType = { id: Scalars['ID']['output']; name: Scalars['String']['output']; roles: Scalars['String']['output']; - toolDetails: Array<ToolDetailsType>; tooltipDescription: Scalars['String']['output']; }; +export type UpdateTagAssignmentsInput = { + addTags?: Array<Scalars['ID']['input']>; + removeTags?: Array<Scalars['ID']['input']>; + userIds: Array<Scalars['ID']['input']>; +}; + +export type UpdateTagAssignmentsMutation = { + operationDone: Scalars['Boolean']['output']; +}; + +export type UpdateTagAssignmentsType = { + addTags: Array<Scalars['ID']['output']>; + removeTags: Array<Scalars['ID']['output']>; + userIds: Array<Scalars['ID']['output']>; +}; + +export type UpdateTagMutation = { + updatedTag: TagType; +}; + export type UseToolInput = { teamId: Scalars['ID']['input']; /** Parameter provided by the trainee. */ @@ -1347,12 +1476,10 @@ export type UserType = { definitions?: Maybe<Array<Maybe<ExerciseDefinitionType>>>; exercises?: Maybe<Array<Maybe<RestrictedExercise>>>; firstName?: Maybe<Scalars['String']['output']>; - group?: Maybe<Scalars['String']['output']>; + group?: Maybe<AuthGroup>; id: Scalars['UUID']['output']; isActive: Scalars['Boolean']['output']; isImported: Scalars['Boolean']['output']; - isStaff: Scalars['Boolean']['output']; - isSuperuser: Scalars['Boolean']['output']; lastLogin?: Maybe<Scalars['DateTime']['output']>; lastName?: Maybe<Scalars['String']['output']>; tags: Array<TagType>; @@ -1430,233 +1557,258 @@ export type DirectiveResolverFn<TResult = {}, TParent = {}, TContext = {}, TArgs /** Mapping of union types */ export type ResolversUnionTypes<_RefType extends Record<string, unknown>> = ResolversObject<{ - ActionLogDetails: ( CustomInjectDetailsType & { __typename: 'CustomInjectDetailsType' } ) | ( EmailType & { __typename: 'EmailType' } ) | ( InjectDetailsType & { __typename: 'InjectDetailsType' } ) | ( QuestionnaireType & { __typename: 'QuestionnaireType' } ) | ( ToolDetailsType & { __typename: 'ToolDetailsType' } ); + ActionLogDetails: ( CustomInjectDetailsType & { __typename: 'CustomInjectDetailsType' } ) | ( Omit<EmailType, 'sender'> & { sender: _RefType['EmailParticipantType'] } & { __typename: 'EmailType' } ) | ( InjectDetailsType & { __typename: 'InjectDetailsType' } ) | ( Omit<QuestionnaireType, 'definition' | 'teamQuestionnaireStates'> & { definition: _RefType['DefinitionType'], teamQuestionnaireStates: Array<_RefType['TeamQuestionnaireStateType']> } & { __typename: 'QuestionnaireType' } ) | ( ToolDetailsType & { __typename: 'ToolDetailsType' } ); }>; /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = ResolversObject<{ ActionLogDetails: ResolverTypeWrapper<ResolversUnionTypes<ResolversTypes>['ActionLogDetails']>; - ActionLogType: ResolverTypeWrapper<Omit<ActionLogType, 'details'> & { details: ResolversTypes['ActionLogDetails'] }>; - ActionLogsSubscription: ResolverTypeWrapper<ActionLogsSubscription>; + ActionLogType: ResolverTypeWrapper<Omit<ActionLogType, 'channel' | 'details' | 'team'> & { channel: ResolversTypes['DefinitionChannelType'], details: ResolversTypes['ActionLogDetails'], team: ResolversTypes['TeamType'] }>; + ActionLogsSubscription: ResolverTypeWrapper<Omit<ActionLogsSubscription, 'actionLog'> & { actionLog?: Maybe<ResolversTypes['ActionLogType']> }>; AddDefinitionAccessMutation: ResolverTypeWrapper<AddDefinitionAccessMutation>; - AnalyticsActionLogsSubscription: ResolverTypeWrapper<AnalyticsActionLogsSubscription>; + AnalyticsActionLogsSubscription: ResolverTypeWrapper<Omit<AnalyticsActionLogsSubscription, 'actionLog'> & { actionLog?: Maybe<ResolversTypes['ActionLogType']> }>; AnalyticsEmailThreadSubscription: ResolverTypeWrapper<AnalyticsEmailThreadSubscription>; - AnalyticsMilestonesSubscription: ResolverTypeWrapper<AnalyticsMilestonesSubscription>; + AnalyticsMilestonesSubscription: ResolverTypeWrapper<Omit<AnalyticsMilestonesSubscription, 'milestones'> & { milestones?: Maybe<Array<Maybe<ResolversTypes['MilestoneStateType']>>> }>; AnswerInput: AnswerInput; AnswerQuestionnaireMutation: ResolverTypeWrapper<AnswerQuestionnaireMutation>; AssignInstructorsToExercise: ResolverTypeWrapper<AssignInstructorsToExercise>; + AssignUsersByTags: ResolverTypeWrapper<AssignUsersByTags>; + AssignUsersEqually: ResolverTypeWrapper<AssignUsersEqually>; AssignUsersToTeamMutation: ResolverTypeWrapper<AssignUsersToTeamMutation>; + AuthGroup: AuthGroup; Boolean: ResolverTypeWrapper<Scalars['Boolean']['output']>; - ChangeUserDataMutation: ResolverTypeWrapper<ChangeUserDataMutation>; + ChangeUserDataMutation: ResolverTypeWrapper<Omit<ChangeUserDataMutation, 'user'> & { user?: Maybe<ResolversTypes['UserType']> }>; ChangeUserInput: ChangeUserInput; - ChannelReadReceipt: ResolverTypeWrapper<ChannelReadReceipt>; + ChangeUserType: ResolverTypeWrapper<ChangeUserType>; ChannelReceipt: ResolverTypeWrapper<ChannelReceipt>; ChannelType: ChannelType; ConfigOverrideInput: ConfigOverrideInput; ConfigOverrideType: ResolverTypeWrapper<ConfigOverrideType>; ContentType: ResolverTypeWrapper<ContentType>; ControlType: ResolverTypeWrapper<ControlType>; + CopyUsersAssignment: ResolverTypeWrapper<CopyUsersAssignment>; CreateExerciseInput: CreateExerciseInput; - CreateExerciseMutation: ResolverTypeWrapper<CreateExerciseMutation>; + CreateExerciseMutation: ResolverTypeWrapper<Omit<CreateExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversTypes['ExerciseType']> }>; CreateExerciseType: ResolverTypeWrapper<CreateExerciseType>; + CreateTagMutation: ResolverTypeWrapper<CreateTagMutation>; CreateThreadMutation: ResolverTypeWrapper<CreateThreadMutation>; + CreateUserInput: CreateUserInput; + CreateUserMutation: ResolverTypeWrapper<CreateUserMutation>; + CreateUserType: ResolverTypeWrapper<CreateUserType>; CustomInjectDetailsType: ResolverTypeWrapper<CustomInjectDetailsType>; + CustomInjectInput: CustomInjectInput; + CustomInjectType: ResolverTypeWrapper<CustomInjectType>; DateTime: ResolverTypeWrapper<Scalars['DateTime']['output']>; - DefinitionChannelType: ResolverTypeWrapper<DefinitionChannelType>; + DefinitionChannelType: ResolverTypeWrapper<Omit<DefinitionChannelType, 'definition'> & { definition: ResolversTypes['DefinitionType'] }>; DefinitionInjectType: ResolverTypeWrapper<DefinitionInjectType>; - DefinitionRoleType: ResolverTypeWrapper<DefinitionRoleType>; - DefinitionType: ResolverTypeWrapper<DefinitionType>; + DefinitionRoleType: ResolverTypeWrapper<Omit<DefinitionRoleType, 'definition'> & { definition: ResolversTypes['DefinitionType'] }>; + DefinitionType: ResolverTypeWrapper<Omit<DefinitionType, 'channels' | 'exercises' | 'learningObjectives' | 'roles'> & { channels: Array<ResolversTypes['DefinitionChannelType']>, exercises: Array<ResolversTypes['ExerciseType']>, learningObjectives: Array<ResolversTypes['LearningObjectiveType']>, roles: Array<ResolversTypes['DefinitionRoleType']> }>; DeleteDefinitionMutation: ResolverTypeWrapper<DeleteDefinitionMutation>; DeleteExerciseMutation: ResolverTypeWrapper<DeleteExerciseMutation>; + DeleteTagsMutation: ResolverTypeWrapper<DeleteTagsMutation>; + DeleteUsersMutation: ResolverTypeWrapper<DeleteUsersMutation>; EmailAddressType: ResolverTypeWrapper<EmailAddressType>; EmailDraftInput: EmailDraftInput; EmailDraftType: ResolverTypeWrapper<EmailDraftType>; - EmailParticipantType: ResolverTypeWrapper<EmailParticipantType>; + EmailParticipantType: ResolverTypeWrapper<Omit<EmailParticipantType, 'exercise' | 'team'> & { exercise: ResolversTypes['ExerciseType'], team?: Maybe<ResolversTypes['TeamType']> }>; EmailReceipt: ResolverTypeWrapper<EmailReceipt>; EmailTemplateType: ResolverTypeWrapper<EmailTemplateType>; - EmailThreadReceipt: ResolverTypeWrapper<EmailThreadReceipt>; EmailThreadSubscription: ResolverTypeWrapper<EmailThreadSubscription>; - EmailThreadType: ResolverTypeWrapper<EmailThreadType>; - EmailType: ResolverTypeWrapper<EmailType>; + EmailThreadType: ResolverTypeWrapper<Omit<EmailThreadType, 'exercise' | 'participants'> & { exercise: ResolversTypes['ExerciseType'], participants: Array<ResolversTypes['EmailParticipantType']> }>; + EmailType: ResolverTypeWrapper<Omit<EmailType, 'sender'> & { sender: ResolversTypes['EmailParticipantType'] }>; ExerciseDefinitionType: ResolverTypeWrapper<ExerciseDefinitionType>; ExerciseEventTypeEnum: ExerciseEventTypeEnum; ExerciseLoopRunningSubscription: ResolverTypeWrapper<ExerciseLoopRunningSubscription>; - ExerciseType: ResolverTypeWrapper<ExerciseType>; - ExercisesSubscription: ResolverTypeWrapper<ExercisesSubscription>; + ExerciseType: ResolverTypeWrapper<Omit<ExerciseType, 'emailParticipants' | 'teams'> & { emailParticipants: Array<ResolversTypes['EmailParticipantType']>, teams: Array<ResolversTypes['TeamType']> }>; + ExercisesSubscription: ResolverTypeWrapper<Omit<ExercisesSubscription, 'exercise'> & { exercise?: Maybe<ResolversTypes['ExerciseType']> }>; ExtendedToolType: ResolverTypeWrapper<ExtendedToolType>; - FileInfoType: ResolverTypeWrapper<FileInfoType>; + FileInfoType: ResolverTypeWrapper<Omit<FileInfoType, 'definition'> & { definition?: Maybe<ResolversTypes['DefinitionType']> }>; FilterUsersInput: FilterUsersInput; + FilterUsersType: ResolverTypeWrapper<FilterUsersType>; GrapheneConfig: ResolverTypeWrapper<GrapheneConfig>; - GroupType: ResolverTypeWrapper<GroupType>; ID: ResolverTypeWrapper<Scalars['ID']['output']>; InjectDetailsType: ResolverTypeWrapper<InjectDetailsType>; - InjectOptionType: ResolverTypeWrapper<InjectOptionType>; - InjectSelectionConfirmationType: ResolverTypeWrapper<InjectSelectionConfirmationType>; - InjectSelectionType: ResolverTypeWrapper<InjectSelectionType>; - InjectSelectionsSubscription: ResolverTypeWrapper<InjectSelectionsSubscription>; InjectType: InjectType; Int: ResolverTypeWrapper<Scalars['Int']['output']>; - LearningActivityType: ResolverTypeWrapper<LearningActivityType>; - LearningObjectiveType: ResolverTypeWrapper<LearningObjectiveType>; + IsUnreadType: ResolverTypeWrapper<IsUnreadType>; + LearningActivityType: ResolverTypeWrapper<Omit<LearningActivityType, 'objective'> & { objective: ResolversTypes['LearningObjectiveType'] }>; + LearningObjectiveType: ResolverTypeWrapper<Omit<LearningObjectiveType, 'definition'> & { definition: ResolversTypes['DefinitionType'] }>; LogType: LogType; - LoginMutation: ResolverTypeWrapper<LoginMutation>; + LoginMutation: ResolverTypeWrapper<Omit<LoginMutation, 'user'> & { user?: Maybe<ResolversTypes['UserType']> }>; LogoutMutation: ResolverTypeWrapper<LogoutMutation>; - MilestoneStateType: ResolverTypeWrapper<MilestoneStateType>; + MilestoneStateType: ResolverTypeWrapper<Omit<MilestoneStateType, 'activity'> & { activity?: Maybe<ResolversTypes['TeamLearningActivityType']> }>; MilestoneType: ResolverTypeWrapper<MilestoneType>; - MilestonesSubscription: ResolverTypeWrapper<MilestonesSubscription>; + MilestonesSubscription: ResolverTypeWrapper<Omit<MilestonesSubscription, 'milestones'> & { milestones?: Maybe<Array<Maybe<ResolversTypes['MilestoneStateType']>>> }>; ModifyMilestoneMutation: ResolverTypeWrapper<ModifyMilestoneMutation>; - MoveExerciseTimeMutation: ResolverTypeWrapper<MoveExerciseTimeMutation>; + MoveExerciseTimeMutation: ResolverTypeWrapper<Omit<MoveExerciseTimeMutation, 'exercise'> & { exercise?: Maybe<ResolversTypes['ExerciseType']> }>; Mutation: ResolverTypeWrapper<{}>; + MutationResult: ResolverTypeWrapper<MutationResult>; + OverlayInput: OverlayInput; OverlayType: ResolverTypeWrapper<OverlayType>; PasswordChange: ResolverTypeWrapper<PasswordChange>; Query: ResolverTypeWrapper<{}>; QuestionType: ResolverTypeWrapper<QuestionType>; - QuestionnaireAnswerType: ResolverTypeWrapper<QuestionnaireAnswerType>; + QuestionnaireAnswerType: ResolverTypeWrapper<Omit<QuestionnaireAnswerType, 'teamQuestionnaireState'> & { teamQuestionnaireState: ResolversTypes['TeamQuestionnaireStateType'] }>; QuestionnaireInput: QuestionnaireInput; - QuestionnaireType: ResolverTypeWrapper<QuestionnaireType>; + QuestionnaireType: ResolverTypeWrapper<Omit<QuestionnaireType, 'definition' | 'teamQuestionnaireStates'> & { definition: ResolversTypes['DefinitionType'], teamQuestionnaireStates: Array<ResolversTypes['TeamQuestionnaireStateType']> }>; ReadReceiptType: ResolverTypeWrapper<ReadReceiptType>; + RegenerateCredentialsMutation: ResolverTypeWrapper<RegenerateCredentialsMutation>; RemoveDefinitionAccessMutation: ResolverTypeWrapper<RemoveDefinitionAccessMutation>; RemoveInstructorsFromExerciseMutation: ResolverTypeWrapper<RemoveInstructorsFromExerciseMutation>; RemoveUsersFromTeamMutation: ResolverTypeWrapper<RemoveUsersFromTeamMutation>; RestrictedExercise: ResolverTypeWrapper<RestrictedExercise>; - RestrictedTeam: ResolverTypeWrapper<RestrictedTeam>; + RestrictedTeam: ResolverTypeWrapper<Omit<RestrictedTeam, 'emailAddress' | 'exercise'> & { emailAddress?: Maybe<ResolversTypes['EmailParticipantType']>, exercise: ResolversTypes['ExerciseType'] }>; RestrictedUser: ResolverTypeWrapper<RestrictedUser>; - SelectTeamInjectInput: SelectTeamInjectInput; - SelectTeamInjectOptionMutation: ResolverTypeWrapper<SelectTeamInjectOptionMutation>; - SelectTeamInjectType: ResolverTypeWrapper<SelectTeamInjectType>; + SendCustomInjectMutation: ResolverTypeWrapper<SendCustomInjectMutation>; SendEmailInput: SendEmailInput; SendEmailMutation: ResolverTypeWrapper<SendEmailMutation>; SendEmailType: ResolverTypeWrapper<SendEmailType>; - StartExerciseMutation: ResolverTypeWrapper<StartExerciseMutation>; - StopExerciseMutation: ResolverTypeWrapper<StopExerciseMutation>; + StartExerciseMutation: ResolverTypeWrapper<Omit<StartExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversTypes['ExerciseType']> }>; + Status: Status; + StopExerciseMutation: ResolverTypeWrapper<Omit<StopExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversTypes['ExerciseType']> }>; String: ResolverTypeWrapper<Scalars['String']['output']>; Subscription: ResolverTypeWrapper<{}>; TagType: ResolverTypeWrapper<TagType>; - TeamLearningActivityType: ResolverTypeWrapper<TeamLearningActivityType>; - TeamLearningObjectiveType: ResolverTypeWrapper<TeamLearningObjectiveType>; - TeamQuestionnaireStateStatus: TeamQuestionnaireStateStatus; - TeamQuestionnaireStateSubscription: ResolverTypeWrapper<TeamQuestionnaireStateSubscription>; - TeamQuestionnaireStateType: ResolverTypeWrapper<TeamQuestionnaireStateType>; - TeamType: ResolverTypeWrapper<TeamType>; + TeamLearningActivityType: ResolverTypeWrapper<Omit<TeamLearningActivityType, 'milestoneStates' | 'teamObjective'> & { milestoneStates: Array<ResolversTypes['MilestoneStateType']>, teamObjective: ResolversTypes['TeamLearningObjectiveType'] }>; + TeamLearningObjectiveType: ResolverTypeWrapper<Omit<TeamLearningObjectiveType, 'activities' | 'objective'> & { activities: Array<ResolversTypes['TeamLearningActivityType']>, objective: ResolversTypes['LearningObjectiveType'] }>; + TeamQuestionnaireStateSubscription: ResolverTypeWrapper<Omit<TeamQuestionnaireStateSubscription, 'teamQuestionnaireState'> & { teamQuestionnaireState: ResolversTypes['TeamQuestionnaireStateType'] }>; + TeamQuestionnaireStateType: ResolverTypeWrapper<Omit<TeamQuestionnaireStateType, 'team'> & { team: ResolversTypes['TeamType'] }>; + TeamType: ResolverTypeWrapper<Omit<TeamType, 'emailAddress' | 'exercise' | 'logs' | 'teamQuestionnaireStates'> & { emailAddress?: Maybe<ResolversTypes['EmailParticipantType']>, exercise: ResolversTypes['ExerciseType'], logs: Array<ResolversTypes['ActionLogType']>, teamQuestionnaireStates: Array<ResolversTypes['TeamQuestionnaireStateType']> }>; ToolDetailsType: ResolverTypeWrapper<ToolDetailsType>; ToolResponseType: ResolverTypeWrapper<ToolResponseType>; ToolType: ResolverTypeWrapper<ToolType>; UUID: ResolverTypeWrapper<Scalars['UUID']['output']>; + UpdateTagAssignmentsInput: UpdateTagAssignmentsInput; + UpdateTagAssignmentsMutation: ResolverTypeWrapper<UpdateTagAssignmentsMutation>; + UpdateTagAssignmentsType: ResolverTypeWrapper<UpdateTagAssignmentsType>; + UpdateTagMutation: ResolverTypeWrapper<UpdateTagMutation>; UseToolInput: UseToolInput; UseToolMutation: ResolverTypeWrapper<UseToolMutation>; UseToolType: ResolverTypeWrapper<UseToolType>; - UserType: ResolverTypeWrapper<UserType>; + UserType: ResolverTypeWrapper<Omit<UserType, 'exercises' | 'teams'> & { exercises?: Maybe<Array<Maybe<ResolversTypes['RestrictedExercise']>>>, teams?: Maybe<Array<Maybe<ResolversTypes['RestrictedTeam']>>> }>; }>; /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = ResolversObject<{ ActionLogDetails: ResolversUnionTypes<ResolversParentTypes>['ActionLogDetails']; - ActionLogType: Omit<ActionLogType, 'details'> & { details: ResolversParentTypes['ActionLogDetails'] }; - ActionLogsSubscription: ActionLogsSubscription; + ActionLogType: Omit<ActionLogType, 'channel' | 'details' | 'team'> & { channel: ResolversParentTypes['DefinitionChannelType'], details: ResolversParentTypes['ActionLogDetails'], team: ResolversParentTypes['TeamType'] }; + ActionLogsSubscription: Omit<ActionLogsSubscription, 'actionLog'> & { actionLog?: Maybe<ResolversParentTypes['ActionLogType']> }; AddDefinitionAccessMutation: AddDefinitionAccessMutation; - AnalyticsActionLogsSubscription: AnalyticsActionLogsSubscription; + AnalyticsActionLogsSubscription: Omit<AnalyticsActionLogsSubscription, 'actionLog'> & { actionLog?: Maybe<ResolversParentTypes['ActionLogType']> }; AnalyticsEmailThreadSubscription: AnalyticsEmailThreadSubscription; - AnalyticsMilestonesSubscription: AnalyticsMilestonesSubscription; + AnalyticsMilestonesSubscription: Omit<AnalyticsMilestonesSubscription, 'milestones'> & { milestones?: Maybe<Array<Maybe<ResolversParentTypes['MilestoneStateType']>>> }; AnswerInput: AnswerInput; AnswerQuestionnaireMutation: AnswerQuestionnaireMutation; AssignInstructorsToExercise: AssignInstructorsToExercise; + AssignUsersByTags: AssignUsersByTags; + AssignUsersEqually: AssignUsersEqually; AssignUsersToTeamMutation: AssignUsersToTeamMutation; Boolean: Scalars['Boolean']['output']; - ChangeUserDataMutation: ChangeUserDataMutation; + ChangeUserDataMutation: Omit<ChangeUserDataMutation, 'user'> & { user?: Maybe<ResolversParentTypes['UserType']> }; ChangeUserInput: ChangeUserInput; - ChannelReadReceipt: ChannelReadReceipt; + ChangeUserType: ChangeUserType; ChannelReceipt: ChannelReceipt; ConfigOverrideInput: ConfigOverrideInput; ConfigOverrideType: ConfigOverrideType; ContentType: ContentType; ControlType: ControlType; + CopyUsersAssignment: CopyUsersAssignment; CreateExerciseInput: CreateExerciseInput; - CreateExerciseMutation: CreateExerciseMutation; + CreateExerciseMutation: Omit<CreateExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversParentTypes['ExerciseType']> }; CreateExerciseType: CreateExerciseType; + CreateTagMutation: CreateTagMutation; CreateThreadMutation: CreateThreadMutation; + CreateUserInput: CreateUserInput; + CreateUserMutation: CreateUserMutation; + CreateUserType: CreateUserType; CustomInjectDetailsType: CustomInjectDetailsType; + CustomInjectInput: CustomInjectInput; + CustomInjectType: CustomInjectType; DateTime: Scalars['DateTime']['output']; - DefinitionChannelType: DefinitionChannelType; + DefinitionChannelType: Omit<DefinitionChannelType, 'definition'> & { definition: ResolversParentTypes['DefinitionType'] }; DefinitionInjectType: DefinitionInjectType; - DefinitionRoleType: DefinitionRoleType; - DefinitionType: DefinitionType; + DefinitionRoleType: Omit<DefinitionRoleType, 'definition'> & { definition: ResolversParentTypes['DefinitionType'] }; + DefinitionType: Omit<DefinitionType, 'channels' | 'exercises' | 'learningObjectives' | 'roles'> & { channels: Array<ResolversParentTypes['DefinitionChannelType']>, exercises: Array<ResolversParentTypes['ExerciseType']>, learningObjectives: Array<ResolversParentTypes['LearningObjectiveType']>, roles: Array<ResolversParentTypes['DefinitionRoleType']> }; DeleteDefinitionMutation: DeleteDefinitionMutation; DeleteExerciseMutation: DeleteExerciseMutation; + DeleteTagsMutation: DeleteTagsMutation; + DeleteUsersMutation: DeleteUsersMutation; EmailAddressType: EmailAddressType; EmailDraftInput: EmailDraftInput; EmailDraftType: EmailDraftType; - EmailParticipantType: EmailParticipantType; + EmailParticipantType: Omit<EmailParticipantType, 'exercise' | 'team'> & { exercise: ResolversParentTypes['ExerciseType'], team?: Maybe<ResolversParentTypes['TeamType']> }; EmailReceipt: EmailReceipt; EmailTemplateType: EmailTemplateType; - EmailThreadReceipt: EmailThreadReceipt; EmailThreadSubscription: EmailThreadSubscription; - EmailThreadType: EmailThreadType; - EmailType: EmailType; + EmailThreadType: Omit<EmailThreadType, 'exercise' | 'participants'> & { exercise: ResolversParentTypes['ExerciseType'], participants: Array<ResolversParentTypes['EmailParticipantType']> }; + EmailType: Omit<EmailType, 'sender'> & { sender: ResolversParentTypes['EmailParticipantType'] }; ExerciseDefinitionType: ExerciseDefinitionType; ExerciseLoopRunningSubscription: ExerciseLoopRunningSubscription; - ExerciseType: ExerciseType; - ExercisesSubscription: ExercisesSubscription; + ExerciseType: Omit<ExerciseType, 'emailParticipants' | 'teams'> & { emailParticipants: Array<ResolversParentTypes['EmailParticipantType']>, teams: Array<ResolversParentTypes['TeamType']> }; + ExercisesSubscription: Omit<ExercisesSubscription, 'exercise'> & { exercise?: Maybe<ResolversParentTypes['ExerciseType']> }; ExtendedToolType: ExtendedToolType; - FileInfoType: FileInfoType; + FileInfoType: Omit<FileInfoType, 'definition'> & { definition?: Maybe<ResolversParentTypes['DefinitionType']> }; FilterUsersInput: FilterUsersInput; + FilterUsersType: FilterUsersType; GrapheneConfig: GrapheneConfig; - GroupType: GroupType; ID: Scalars['ID']['output']; InjectDetailsType: InjectDetailsType; - InjectOptionType: InjectOptionType; - InjectSelectionConfirmationType: InjectSelectionConfirmationType; - InjectSelectionType: InjectSelectionType; - InjectSelectionsSubscription: InjectSelectionsSubscription; Int: Scalars['Int']['output']; - LearningActivityType: LearningActivityType; - LearningObjectiveType: LearningObjectiveType; - LoginMutation: LoginMutation; + IsUnreadType: IsUnreadType; + LearningActivityType: Omit<LearningActivityType, 'objective'> & { objective: ResolversParentTypes['LearningObjectiveType'] }; + LearningObjectiveType: Omit<LearningObjectiveType, 'definition'> & { definition: ResolversParentTypes['DefinitionType'] }; + LoginMutation: Omit<LoginMutation, 'user'> & { user?: Maybe<ResolversParentTypes['UserType']> }; LogoutMutation: LogoutMutation; - MilestoneStateType: MilestoneStateType; + MilestoneStateType: Omit<MilestoneStateType, 'activity'> & { activity?: Maybe<ResolversParentTypes['TeamLearningActivityType']> }; MilestoneType: MilestoneType; - MilestonesSubscription: MilestonesSubscription; + MilestonesSubscription: Omit<MilestonesSubscription, 'milestones'> & { milestones?: Maybe<Array<Maybe<ResolversParentTypes['MilestoneStateType']>>> }; ModifyMilestoneMutation: ModifyMilestoneMutation; - MoveExerciseTimeMutation: MoveExerciseTimeMutation; + MoveExerciseTimeMutation: Omit<MoveExerciseTimeMutation, 'exercise'> & { exercise?: Maybe<ResolversParentTypes['ExerciseType']> }; Mutation: {}; + MutationResult: MutationResult; + OverlayInput: OverlayInput; OverlayType: OverlayType; PasswordChange: PasswordChange; Query: {}; QuestionType: QuestionType; - QuestionnaireAnswerType: QuestionnaireAnswerType; + QuestionnaireAnswerType: Omit<QuestionnaireAnswerType, 'teamQuestionnaireState'> & { teamQuestionnaireState: ResolversParentTypes['TeamQuestionnaireStateType'] }; QuestionnaireInput: QuestionnaireInput; - QuestionnaireType: QuestionnaireType; + QuestionnaireType: Omit<QuestionnaireType, 'definition' | 'teamQuestionnaireStates'> & { definition: ResolversParentTypes['DefinitionType'], teamQuestionnaireStates: Array<ResolversParentTypes['TeamQuestionnaireStateType']> }; ReadReceiptType: ReadReceiptType; + RegenerateCredentialsMutation: RegenerateCredentialsMutation; RemoveDefinitionAccessMutation: RemoveDefinitionAccessMutation; RemoveInstructorsFromExerciseMutation: RemoveInstructorsFromExerciseMutation; RemoveUsersFromTeamMutation: RemoveUsersFromTeamMutation; RestrictedExercise: RestrictedExercise; - RestrictedTeam: RestrictedTeam; + RestrictedTeam: Omit<RestrictedTeam, 'emailAddress' | 'exercise'> & { emailAddress?: Maybe<ResolversParentTypes['EmailParticipantType']>, exercise: ResolversParentTypes['ExerciseType'] }; RestrictedUser: RestrictedUser; - SelectTeamInjectInput: SelectTeamInjectInput; - SelectTeamInjectOptionMutation: SelectTeamInjectOptionMutation; - SelectTeamInjectType: SelectTeamInjectType; + SendCustomInjectMutation: SendCustomInjectMutation; SendEmailInput: SendEmailInput; SendEmailMutation: SendEmailMutation; SendEmailType: SendEmailType; - StartExerciseMutation: StartExerciseMutation; - StopExerciseMutation: StopExerciseMutation; + StartExerciseMutation: Omit<StartExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversParentTypes['ExerciseType']> }; + StopExerciseMutation: Omit<StopExerciseMutation, 'exercise'> & { exercise?: Maybe<ResolversParentTypes['ExerciseType']> }; String: Scalars['String']['output']; Subscription: {}; TagType: TagType; - TeamLearningActivityType: TeamLearningActivityType; - TeamLearningObjectiveType: TeamLearningObjectiveType; - TeamQuestionnaireStateSubscription: TeamQuestionnaireStateSubscription; - TeamQuestionnaireStateType: TeamQuestionnaireStateType; - TeamType: TeamType; + TeamLearningActivityType: Omit<TeamLearningActivityType, 'milestoneStates' | 'teamObjective'> & { milestoneStates: Array<ResolversParentTypes['MilestoneStateType']>, teamObjective: ResolversParentTypes['TeamLearningObjectiveType'] }; + TeamLearningObjectiveType: Omit<TeamLearningObjectiveType, 'activities' | 'objective'> & { activities: Array<ResolversParentTypes['TeamLearningActivityType']>, objective: ResolversParentTypes['LearningObjectiveType'] }; + TeamQuestionnaireStateSubscription: Omit<TeamQuestionnaireStateSubscription, 'teamQuestionnaireState'> & { teamQuestionnaireState: ResolversParentTypes['TeamQuestionnaireStateType'] }; + TeamQuestionnaireStateType: Omit<TeamQuestionnaireStateType, 'team'> & { team: ResolversParentTypes['TeamType'] }; + TeamType: Omit<TeamType, 'emailAddress' | 'exercise' | 'logs' | 'teamQuestionnaireStates'> & { emailAddress?: Maybe<ResolversParentTypes['EmailParticipantType']>, exercise: ResolversParentTypes['ExerciseType'], logs: Array<ResolversParentTypes['ActionLogType']>, teamQuestionnaireStates: Array<ResolversParentTypes['TeamQuestionnaireStateType']> }; ToolDetailsType: ToolDetailsType; ToolResponseType: ToolResponseType; ToolType: ToolType; UUID: Scalars['UUID']['output']; + UpdateTagAssignmentsInput: UpdateTagAssignmentsInput; + UpdateTagAssignmentsMutation: UpdateTagAssignmentsMutation; + UpdateTagAssignmentsType: UpdateTagAssignmentsType; + UpdateTagMutation: UpdateTagMutation; UseToolInput: UseToolInput; UseToolMutation: UseToolMutation; UseToolType: UseToolType; - UserType: UserType; + UserType: Omit<UserType, 'exercises' | 'teams'> & { exercises?: Maybe<Array<Maybe<ResolversParentTypes['RestrictedExercise']>>>, teams?: Maybe<Array<Maybe<ResolversParentTypes['RestrictedTeam']>>> }; }>; export type ActionLogDetailsResolvers<ContextType = any, ParentType extends ResolversParentTypes['ActionLogDetails'] = ResolversParentTypes['ActionLogDetails']> = ResolversObject<{ @@ -1709,6 +1861,16 @@ export type AssignInstructorsToExerciseResolvers<ContextType = any, ParentType e __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type AssignUsersByTagsResolvers<ContextType = any, ParentType extends ResolversParentTypes['AssignUsersByTags'] = ResolversParentTypes['AssignUsersByTags']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type AssignUsersEquallyResolvers<ContextType = any, ParentType extends ResolversParentTypes['AssignUsersEqually'] = ResolversParentTypes['AssignUsersEqually']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type AssignUsersToTeamMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['AssignUsersToTeamMutation'] = ResolversParentTypes['AssignUsersToTeamMutation']> = ResolversObject<{ operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -1719,9 +1881,10 @@ export type ChangeUserDataMutationResolvers<ContextType = any, ParentType extend __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type ChannelReadReceiptResolvers<ContextType = any, ParentType extends ResolversParentTypes['ChannelReadReceipt'] = ResolversParentTypes['ChannelReadReceipt']> = ResolversObject<{ - readReceipt?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; - teamId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; +export type ChangeUserTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['ChangeUserType'] = ResolversParentTypes['ChangeUserType']> = ResolversObject<{ + active?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + group?: Resolver<Maybe<ResolversTypes['AuthGroup']>, ParentType, ContextType>; + userId?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -1758,6 +1921,11 @@ export type ControlTypeResolvers<ContextType = any, ParentType extends Resolvers __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type CopyUsersAssignmentResolvers<ContextType = any, ParentType extends ResolversParentTypes['CopyUsersAssignment'] = ResolversParentTypes['CopyUsersAssignment']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type CreateExerciseMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateExerciseMutation'] = ResolversParentTypes['CreateExerciseMutation']> = ResolversObject<{ exercise?: Resolver<Maybe<ResolversTypes['ExerciseType']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -1771,18 +1939,47 @@ export type CreateExerciseTypeResolvers<ContextType = any, ParentType extends Re __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type CreateTagMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateTagMutation'] = ResolversParentTypes['CreateTagMutation']> = ResolversObject<{ + newTag?: Resolver<ResolversTypes['TagType'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type CreateThreadMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateThreadMutation'] = ResolversParentTypes['CreateThreadMutation']> = ResolversObject<{ thread?: Resolver<Maybe<ResolversTypes['EmailThreadType']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type CreateUserMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateUserMutation'] = ResolversParentTypes['CreateUserMutation']> = ResolversObject<{ + newUser?: Resolver<ResolversTypes['RestrictedUser'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type CreateUserTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateUserType'] = ResolversParentTypes['CreateUserType']> = ResolversObject<{ + email?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + firstName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + group?: Resolver<Maybe<ResolversTypes['AuthGroup']>, ParentType, ContextType>; + lastName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + tags?: Resolver<Array<ResolversTypes['String']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type CustomInjectDetailsTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['CustomInjectDetailsType'] = ResolversParentTypes['CustomInjectDetailsType']> = ResolversObject<{ content?: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + overlay?: Resolver<Maybe<ResolversTypes['OverlayType']>, ParentType, ContextType>; user?: Resolver<Maybe<ResolversTypes['RestrictedUser']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type CustomInjectTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['CustomInjectType'] = ResolversParentTypes['CustomInjectType']> = ResolversObject<{ + content?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + exerciseId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + fileId?: Resolver<Maybe<ResolversTypes['UUID']>, ParentType, ContextType>; + overlay?: Resolver<Maybe<ResolversTypes['OverlayType']>, ParentType, ContextType>; + teamIds?: Resolver<Array<Maybe<ResolversTypes['ID']>>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export interface DateTimeScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes['DateTime'], any> { name: 'DateTime'; } @@ -1791,13 +1988,12 @@ export type DefinitionChannelTypeResolvers<ContextType = any, ParentType extends definition?: Resolver<ResolversTypes['DefinitionType'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - readReceipt?: Resolver<Array<ResolversTypes['ChannelReadReceipt']>, ParentType, ContextType>; + readReceipt?: Resolver<Array<ResolversTypes['IsUnreadType']>, ParentType, ContextType>; type?: Resolver<ResolversTypes['ChannelType'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; export type DefinitionInjectTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['DefinitionInjectType'] = ResolversParentTypes['DefinitionInjectType']> = ResolversObject<{ - auto?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; delay?: Resolver<ResolversTypes['Int'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; @@ -1841,6 +2037,16 @@ export type DeleteExerciseMutationResolvers<ContextType = any, ParentType extend __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type DeleteTagsMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['DeleteTagsMutation'] = ResolversParentTypes['DeleteTagsMutation']> = ResolversObject<{ + operationDone?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type DeleteUsersMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['DeleteUsersMutation'] = ResolversParentTypes['DeleteUsersMutation']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type EmailAddressTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['EmailAddressType'] = ResolversParentTypes['EmailAddressType']> = ResolversObject<{ address?: Resolver<ResolversTypes['String'], ParentType, ContextType>; control?: Resolver<ResolversTypes['ControlType'], ParentType, ContextType>; @@ -1894,12 +2100,6 @@ export type EmailTemplateTypeResolvers<ContextType = any, ParentType extends Res __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type EmailThreadReceiptResolvers<ContextType = any, ParentType extends ResolversParentTypes['EmailThreadReceipt'] = ResolversParentTypes['EmailThreadReceipt']> = ResolversObject<{ - emailThreadId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - readReceipt?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - export type EmailThreadSubscriptionResolvers<ContextType = any, ParentType extends ResolversParentTypes['EmailThreadSubscription'] = ResolversParentTypes['EmailThreadSubscription']> = ResolversObject<{ emailThread?: Resolver<Maybe<ResolversTypes['EmailThreadType']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -1911,7 +2111,7 @@ export type EmailThreadTypeResolvers<ContextType = any, ParentType extends Resol id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; lastEmail?: Resolver<Maybe<ResolversTypes['EmailType']>, ParentType, ContextType>; participants?: Resolver<Array<ResolversTypes['EmailParticipantType']>, ParentType, ContextType>; - readReceipt?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; + readReceipt?: Resolver<Array<ResolversTypes['IsUnreadType']>, ParentType, ContextType>; subject?: Resolver<ResolversTypes['String'], ParentType, ContextType>; timestamp?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -1965,25 +2165,35 @@ export type ExercisesSubscriptionResolvers<ContextType = any, ParentType extends export type ExtendedToolTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['ExtendedToolType'] = ResolversParentTypes['ExtendedToolType']> = ResolversObject<{ defaultResponse?: Resolver<ResolversTypes['String'], ParentType, ContextType>; definition?: Resolver<Maybe<ResolversTypes['ExerciseDefinitionType']>, ParentType, ContextType>; - hasParam?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; hint?: Resolver<ResolversTypes['String'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; responses?: Resolver<Array<ResolversTypes['ToolResponseType']>, ParentType, ContextType>; roles?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - toolDetails?: Resolver<Array<ResolversTypes['ToolDetailsType']>, ParentType, ContextType>; tooltipDescription?: Resolver<ResolversTypes['String'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; export type FileInfoTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['FileInfoType'] = ResolversParentTypes['FileInfoType']> = ResolversObject<{ - content?: Resolver<Array<ResolversTypes['ContentType']>, ParentType, ContextType>; definition?: Resolver<Maybe<ResolversTypes['DefinitionType']>, ParentType, ContextType>; fileName?: Resolver<ResolversTypes['String'], ParentType, ContextType>; id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type FilterUsersTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['FilterUsersType'] = ResolversParentTypes['FilterUsersType']> = ResolversObject<{ + active?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + firstName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + groups?: Resolver<Maybe<Array<Maybe<ResolversTypes['AuthGroup']>>>, ParentType, ContextType>; + imported?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + lastName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + limit?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>; + skip?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>; + tags?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>; + username?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type GrapheneConfigResolvers<ContextType = any, ParentType extends ResolversParentTypes['GrapheneConfig'] = ResolversParentTypes['GrapheneConfig']> = ResolversObject<{ customEmailSuffix?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; emailBetweenTeams?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; @@ -1993,12 +2203,6 @@ export type GrapheneConfigResolvers<ContextType = any, ParentType extends Resolv __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type GroupTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['GroupType'] = ResolversParentTypes['GroupType']> = ResolversObject<{ - id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - export type InjectDetailsTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['InjectDetailsType'] = ResolversParentTypes['InjectDetailsType']> = ResolversObject<{ content?: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; @@ -2007,34 +2211,9 @@ export type InjectDetailsTypeResolvers<ContextType = any, ParentType extends Res __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type InjectOptionTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['InjectOptionType'] = ResolversParentTypes['InjectOptionType']> = ResolversObject<{ - content?: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>; - control?: Resolver<ResolversTypes['ControlType'], ParentType, ContextType>; - id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - injectSelection?: Resolver<ResolversTypes['InjectSelectionType'], ParentType, ContextType>; - name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - sender?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - -export type InjectSelectionConfirmationTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['InjectSelectionConfirmationType'] = ResolversParentTypes['InjectSelectionConfirmationType']> = ResolversObject<{ - injectSelectionId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - submitted?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - -export type InjectSelectionTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['InjectSelectionType'] = ResolversParentTypes['InjectSelectionType']> = ResolversObject<{ - id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - options?: Resolver<Array<ResolversTypes['InjectOptionType']>, ParentType, ContextType>; - submitted?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; - team?: Resolver<ResolversTypes['TeamType'], ParentType, ContextType>; - timestamp?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - -export type InjectSelectionsSubscriptionResolvers<ContextType = any, ParentType extends ResolversParentTypes['InjectSelectionsSubscription'] = ResolversParentTypes['InjectSelectionsSubscription']> = ResolversObject<{ - injectSelection?: Resolver<Maybe<ResolversTypes['InjectSelectionType']>, ParentType, ContextType>; +export type IsUnreadTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['IsUnreadType'] = ResolversParentTypes['IsUnreadType']> = ResolversObject<{ + isUnread?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + teamId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -2081,6 +2260,7 @@ export type MilestoneTypeResolvers<ContextType = any, ParentType extends Resolve fileNames?: Resolver<ResolversTypes['String'], ParentType, ContextType>; final?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + initialState?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; roles?: Resolver<ResolversTypes['String'], ParentType, ContextType>; teamVisible?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; @@ -2106,33 +2286,46 @@ export type MutationResolvers<ContextType = any, ParentType extends ResolversPar addDefinitionAccess?: Resolver<Maybe<ResolversTypes['AddDefinitionAccessMutation']>, ParentType, ContextType, RequireFields<MutationAddDefinitionAccessArgs, 'definitionId' | 'userIds'>>; answerQuestionnaire?: Resolver<Maybe<ResolversTypes['AnswerQuestionnaireMutation']>, ParentType, ContextType, RequireFields<MutationAnswerQuestionnaireArgs, 'questInput'>>; assignInstructorsToExercise?: Resolver<Maybe<ResolversTypes['AssignInstructorsToExercise']>, ParentType, ContextType, RequireFields<MutationAssignInstructorsToExerciseArgs, 'exerciseId' | 'userIds'>>; + assignUsersByTags?: Resolver<Maybe<ResolversTypes['AssignUsersByTags']>, ParentType, ContextType, RequireFields<MutationAssignUsersByTagsArgs, 'exerciseId' | 'tagPrefix' | 'userIds'>>; + assignUsersEqually?: Resolver<Maybe<ResolversTypes['AssignUsersEqually']>, ParentType, ContextType, RequireFields<MutationAssignUsersEquallyArgs, 'exerciseId' | 'userIds'>>; assignUsersToTeam?: Resolver<Maybe<ResolversTypes['AssignUsersToTeamMutation']>, ParentType, ContextType, RequireFields<MutationAssignUsersToTeamArgs, 'teamId' | 'userIds'>>; changeUserData?: Resolver<Maybe<ResolversTypes['ChangeUserDataMutation']>, ParentType, ContextType, RequireFields<MutationChangeUserDataArgs, 'changeUserInput'>>; + copyUsersAssignment?: Resolver<Maybe<ResolversTypes['CopyUsersAssignment']>, ParentType, ContextType, RequireFields<MutationCopyUsersAssignmentArgs, 'fromExerciseId' | 'toExerciseId'>>; createExercise?: Resolver<Maybe<ResolversTypes['CreateExerciseMutation']>, ParentType, ContextType, RequireFields<MutationCreateExerciseArgs, 'createExerciseInput'>>; + createTag?: Resolver<Maybe<ResolversTypes['CreateTagMutation']>, ParentType, ContextType, RequireFields<MutationCreateTagArgs, 'name'>>; createThread?: Resolver<Maybe<ResolversTypes['CreateThreadMutation']>, ParentType, ContextType, RequireFields<MutationCreateThreadArgs, 'exerciseId' | 'participantAddresses' | 'subject'>>; + createUser?: Resolver<Maybe<ResolversTypes['CreateUserMutation']>, ParentType, ContextType, RequireFields<MutationCreateUserArgs, 'createUserInput'>>; deleteDefinition?: Resolver<Maybe<ResolversTypes['DeleteDefinitionMutation']>, ParentType, ContextType, RequireFields<MutationDeleteDefinitionArgs, 'definitionId'>>; + deleteEmailDraft?: Resolver<Maybe<ResolversTypes['MutationResult']>, ParentType, ContextType, RequireFields<MutationDeleteEmailDraftArgs, 'instructor' | 'teamId'>>; deleteExercise?: Resolver<Maybe<ResolversTypes['DeleteExerciseMutation']>, ParentType, ContextType, RequireFields<MutationDeleteExerciseArgs, 'exerciseId'>>; + deleteTags?: Resolver<Maybe<ResolversTypes['DeleteTagsMutation']>, ParentType, ContextType, RequireFields<MutationDeleteTagsArgs, 'force' | 'tagIds'>>; + deleteUsers?: Resolver<Maybe<ResolversTypes['DeleteUsersMutation']>, ParentType, ContextType, RequireFields<MutationDeleteUsersArgs, 'userIds'>>; login?: Resolver<Maybe<ResolversTypes['LoginMutation']>, ParentType, ContextType, RequireFields<MutationLoginArgs, 'password' | 'username'>>; logout?: Resolver<Maybe<ResolversTypes['LogoutMutation']>, ParentType, ContextType>; modifyMilestone?: Resolver<Maybe<ResolversTypes['ModifyMilestoneMutation']>, ParentType, ContextType, RequireFields<MutationModifyMilestoneArgs, 'activate' | 'milestone' | 'teamId'>>; moveTime?: Resolver<Maybe<ResolversTypes['MoveExerciseTimeMutation']>, ParentType, ContextType, RequireFields<MutationMoveTimeArgs, 'exerciseId' | 'timeDiff'>>; passwordChange?: Resolver<Maybe<ResolversTypes['PasswordChange']>, ParentType, ContextType, RequireFields<MutationPasswordChangeArgs, 'newPassword' | 'newPasswordRepeat' | 'oldPassword'>>; + regenerateCredentials?: Resolver<Maybe<ResolversTypes['RegenerateCredentialsMutation']>, ParentType, ContextType, RequireFields<MutationRegenerateCredentialsArgs, 'userIds'>>; removeDefinitionAccess?: Resolver<Maybe<ResolversTypes['RemoveDefinitionAccessMutation']>, ParentType, ContextType, RequireFields<MutationRemoveDefinitionAccessArgs, 'definitionId' | 'userIds'>>; removeInstructorsFromExercise?: Resolver<Maybe<ResolversTypes['RemoveInstructorsFromExerciseMutation']>, ParentType, ContextType, RequireFields<MutationRemoveInstructorsFromExerciseArgs, 'exerciseId' | 'userIds'>>; removeUsersFromTeam?: Resolver<Maybe<ResolversTypes['RemoveUsersFromTeamMutation']>, ParentType, ContextType, RequireFields<MutationRemoveUsersFromTeamArgs, 'teamId' | 'userIds'>>; - resetReadReceiptChannel?: Resolver<Maybe<ResolversTypes['ChannelReceipt']>, ParentType, ContextType, RequireFields<MutationResetReadReceiptChannelArgs, 'channelId' | 'teamId'>>; - resetReadReceiptEmailThread?: Resolver<Maybe<ResolversTypes['EmailThreadReceipt']>, ParentType, ContextType, RequireFields<MutationResetReadReceiptEmailThreadArgs, 'emailThreadId'>>; - selectTeamInjectOption?: Resolver<Maybe<ResolversTypes['SelectTeamInjectOptionMutation']>, ParentType, ContextType, RequireFields<MutationSelectTeamInjectOptionArgs, 'selectTeamInjectInput'>>; + sendCustomInject?: Resolver<Maybe<ResolversTypes['SendCustomInjectMutation']>, ParentType, ContextType, RequireFields<MutationSendCustomInjectArgs, 'customInjectInput'>>; sendEmail?: Resolver<Maybe<ResolversTypes['SendEmailMutation']>, ParentType, ContextType, RequireFields<MutationSendEmailArgs, 'sendEmailInput'>>; + setEmailDraft?: Resolver<Maybe<ResolversTypes['EmailDraftType']>, ParentType, ContextType, RequireFields<MutationSetEmailDraftArgs, 'emailDraft'>>; + setIsUnreadChannel?: Resolver<Maybe<ResolversTypes['MutationResult']>, ParentType, ContextType, RequireFields<MutationSetIsUnreadChannelArgs, 'channelId' | 'isUnread' | 'teamId'>>; + setIsUnreadEmailThread?: Resolver<Maybe<ResolversTypes['MutationResult']>, ParentType, ContextType, RequireFields<MutationSetIsUnreadEmailThreadArgs, 'isUnread' | 'teamId' | 'threadId'>>; startExercise?: Resolver<Maybe<ResolversTypes['StartExerciseMutation']>, ParentType, ContextType, RequireFields<MutationStartExerciseArgs, 'exerciseId'>>; stopExercise?: Resolver<Maybe<ResolversTypes['StopExerciseMutation']>, ParentType, ContextType, RequireFields<MutationStopExerciseArgs, 'exerciseId'>>; + updateTag?: Resolver<Maybe<ResolversTypes['UpdateTagMutation']>, ParentType, ContextType, RequireFields<MutationUpdateTagArgs, 'newName' | 'tagId'>>; + updateTagAssignments?: Resolver<Maybe<ResolversTypes['UpdateTagAssignmentsMutation']>, ParentType, ContextType, RequireFields<MutationUpdateTagAssignmentsArgs, 'updateTagAssignmentsInput'>>; useTool?: Resolver<Maybe<ResolversTypes['UseToolMutation']>, ParentType, ContextType, RequireFields<MutationUseToolArgs, 'useToolInput'>>; - writeEmailDraft?: Resolver<Maybe<ResolversTypes['EmailDraftType']>, ParentType, ContextType, RequireFields<MutationWriteEmailDraftArgs, 'emailDraft'>>; - writeInjectSelectionConfirmation?: Resolver<Maybe<ResolversTypes['InjectSelectionConfirmationType']>, ParentType, ContextType, RequireFields<MutationWriteInjectSelectionConfirmationArgs, 'injectSelectionId'>>; writeReadReceipt?: Resolver<Maybe<ResolversTypes['ReadReceiptType']>, ParentType, ContextType, RequireFields<MutationWriteReadReceiptArgs, 'actionLogId'>>; - writeReadReceiptChannel?: Resolver<Maybe<ResolversTypes['ChannelReceipt']>, ParentType, ContextType, RequireFields<MutationWriteReadReceiptChannelArgs, 'channelId' | 'teamId'>>; writeReadReceiptEmail?: Resolver<Maybe<ResolversTypes['EmailReceipt']>, ParentType, ContextType, RequireFields<MutationWriteReadReceiptEmailArgs, 'emailId'>>; - writeReadReceiptEmailThread?: Resolver<Maybe<ResolversTypes['EmailThreadReceipt']>, ParentType, ContextType, RequireFields<MutationWriteReadReceiptEmailThreadArgs, 'emailThreadId'>>; +}>; + +export type MutationResultResolvers<ContextType = any, ParentType extends ResolversParentTypes['MutationResult'] = ResolversParentTypes['MutationResult']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; export type OverlayTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['OverlayType'] = ResolversParentTypes['OverlayType']> = ResolversObject<{ @@ -2151,7 +2344,6 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent analyticsActionLogs?: Resolver<Maybe<Array<Maybe<ResolversTypes['ActionLogType']>>>, ParentType, ContextType, RequireFields<QueryAnalyticsActionLogsArgs, 'exerciseId'>>; analyticsEmailThreads?: Resolver<Maybe<Array<Maybe<ResolversTypes['EmailThreadType']>>>, ParentType, ContextType, RequireFields<QueryAnalyticsEmailThreadsArgs, 'exerciseId'>>; analyticsMilestones?: Resolver<Maybe<Array<Maybe<ResolversTypes['MilestoneStateType']>>>, ParentType, ContextType, RequireFields<QueryAnalyticsMilestonesArgs, 'exerciseId'>>; - autoInjects?: Resolver<Maybe<Array<Maybe<ResolversTypes['DefinitionInjectType']>>>, ParentType, ContextType, RequireFields<QueryAutoInjectsArgs, 'exerciseId'>>; channel?: Resolver<Maybe<ResolversTypes['DefinitionChannelType']>, ParentType, ContextType, RequireFields<QueryChannelArgs, 'channelId'>>; definition?: Resolver<Maybe<ResolversTypes['DefinitionType']>, ParentType, ContextType, RequireFields<QueryDefinitionArgs, 'definitionId'>>; definitions?: Resolver<Maybe<Array<Maybe<ResolversTypes['DefinitionType']>>>, ParentType, ContextType>; @@ -2171,17 +2363,20 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent exercises?: Resolver<Maybe<Array<Maybe<ResolversTypes['ExerciseType']>>>, ParentType, ContextType, Partial<QueryExercisesArgs>>; extendedTeamTools?: Resolver<Maybe<Array<Maybe<ResolversTypes['ExtendedToolType']>>>, ParentType, ContextType, RequireFields<QueryExtendedTeamToolsArgs, 'teamId'>>; fileInfo?: Resolver<Maybe<ResolversTypes['FileInfoType']>, ParentType, ContextType, RequireFields<QueryFileInfoArgs, 'fileInfoId'>>; - groups?: Resolver<Maybe<Array<Maybe<ResolversTypes['GroupType']>>>, ParentType, ContextType>; + getEmailDraft?: Resolver<Maybe<ResolversTypes['EmailDraftType']>, ParentType, ContextType, RequireFields<QueryGetEmailDraftArgs, 'instructor' | 'teamId'>>; + getEmailDrafts?: Resolver<Maybe<Array<Maybe<ResolversTypes['EmailDraftType']>>>, ParentType, ContextType, RequireFields<QueryGetEmailDraftsArgs, 'instructor' | 'teamId'>>; + injects?: Resolver<Maybe<Array<Maybe<ResolversTypes['DefinitionInjectType']>>>, ParentType, ContextType, RequireFields<QueryInjectsArgs, 'exerciseId'>>; + learningObjectives?: Resolver<Maybe<Array<Maybe<ResolversTypes['LearningObjectiveType']>>>, ParentType, ContextType, RequireFields<QueryLearningObjectivesArgs, 'exerciseId'>>; milestones?: Resolver<Maybe<Array<Maybe<ResolversTypes['MilestoneType']>>>, ParentType, ContextType, RequireFields<QueryMilestonesArgs, 'exerciseId'>>; questionnaireState?: Resolver<Maybe<ResolversTypes['TeamQuestionnaireStateType']>, ParentType, ContextType, RequireFields<QueryQuestionnaireStateArgs, 'questionnaireId' | 'teamId'>>; - returnLocalEmailDraft?: Resolver<Maybe<ResolversTypes['EmailDraftType']>, ParentType, ContextType, RequireFields<QueryReturnLocalEmailDraftArgs, 'instructor' | 'teamId'>>; + questionnaires?: Resolver<Maybe<Array<Maybe<ResolversTypes['QuestionnaireType']>>>, ParentType, ContextType, RequireFields<QueryQuestionnairesArgs, 'exerciseId'>>; tags?: Resolver<Maybe<Array<Maybe<ResolversTypes['TagType']>>>, ParentType, ContextType>; team?: Resolver<Maybe<ResolversTypes['TeamType']>, ParentType, ContextType, RequireFields<QueryTeamArgs, 'teamId'>>; teamActionLogs?: Resolver<Maybe<Array<Maybe<ResolversTypes['ActionLogType']>>>, ParentType, ContextType, RequireFields<QueryTeamActionLogsArgs, 'teamId'>>; teamChannelLogs?: Resolver<Maybe<Array<Maybe<ResolversTypes['ActionLogType']>>>, ParentType, ContextType, RequireFields<QueryTeamChannelLogsArgs, 'channelId' | 'teamId'>>; teamEmailParticipant?: Resolver<Maybe<ResolversTypes['EmailParticipantType']>, ParentType, ContextType, RequireFields<QueryTeamEmailParticipantArgs, 'teamId'>>; - teamInjectSelections?: Resolver<Maybe<Array<Maybe<ResolversTypes['InjectSelectionType']>>>, ParentType, ContextType, RequireFields<QueryTeamInjectSelectionsArgs, 'teamId'>>; teamLearningObjectives?: Resolver<Maybe<Array<Maybe<ResolversTypes['TeamLearningObjectiveType']>>>, ParentType, ContextType, RequireFields<QueryTeamLearningObjectivesArgs, 'teamId'>>; + teamMilestone?: Resolver<Maybe<ResolversTypes['MilestoneStateType']>, ParentType, ContextType, RequireFields<QueryTeamMilestoneArgs, 'milestoneStateId'>>; teamMilestones?: Resolver<Maybe<Array<Maybe<ResolversTypes['MilestoneStateType']>>>, ParentType, ContextType, RequireFields<QueryTeamMilestonesArgs, 'teamId'>>; teamQuestionnaires?: Resolver<Maybe<Array<Maybe<ResolversTypes['TeamQuestionnaireStateType']>>>, ParentType, ContextType, RequireFields<QueryTeamQuestionnairesArgs, 'teamId'>>; teamRoles?: Resolver<Maybe<Array<Maybe<ResolversTypes['String']>>>, ParentType, ContextType>; @@ -2196,13 +2391,13 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent }>; export type QuestionTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['QuestionType'] = ResolversParentTypes['QuestionType']> = ResolversObject<{ + content?: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>; control?: Resolver<ResolversTypes['ControlType'], ParentType, ContextType>; correct?: Resolver<ResolversTypes['Int'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; labels?: Resolver<ResolversTypes['String'], ParentType, ContextType>; max?: Resolver<ResolversTypes['Int'], ParentType, ContextType>; questionnaire?: Resolver<ResolversTypes['QuestionnaireType'], ParentType, ContextType>; - text?: Resolver<ResolversTypes['String'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -2233,6 +2428,11 @@ export type ReadReceiptTypeResolvers<ContextType = any, ParentType extends Resol __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type RegenerateCredentialsMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['RegenerateCredentialsMutation'] = ResolversParentTypes['RegenerateCredentialsMutation']> = ResolversObject<{ + operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type RemoveDefinitionAccessMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['RemoveDefinitionAccessMutation'] = ResolversParentTypes['RemoveDefinitionAccessMutation']> = ResolversObject<{ operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -2249,8 +2449,9 @@ export type RemoveUsersFromTeamMutationResolvers<ContextType = any, ParentType e }>; export type RestrictedExerciseResolvers<ContextType = any, ParentType extends ResolversParentTypes['RestrictedExercise'] = ResolversParentTypes['RestrictedExercise']> = ResolversObject<{ - id?: Resolver<Maybe<ResolversTypes['ID']>, ParentType, ContextType>; - uuid?: Resolver<Maybe<ResolversTypes['UUID']>, ParentType, ContextType>; + id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + uuid?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -2266,39 +2467,22 @@ export type RestrictedTeamResolvers<ContextType = any, ParentType extends Resolv export type RestrictedUserResolvers<ContextType = any, ParentType extends ResolversParentTypes['RestrictedUser'] = ResolversParentTypes['RestrictedUser']> = ResolversObject<{ dateJoined?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>; firstName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - group?: Resolver<Maybe<ResolversTypes['GroupType']>, ParentType, ContextType>; + group?: Resolver<Maybe<ResolversTypes['AuthGroup']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; isActive?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; isImported?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; - isStaff?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; - isSuperuser?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; lastLogin?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; lastName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - password?: Resolver<ResolversTypes['String'], ParentType, ContextType>; tags?: Resolver<Array<ResolversTypes['TagType']>, ParentType, ContextType>; username?: Resolver<ResolversTypes['String'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type SelectTeamInjectOptionMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['SelectTeamInjectOptionMutation'] = ResolversParentTypes['SelectTeamInjectOptionMutation']> = ResolversObject<{ +export type SendCustomInjectMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['SendCustomInjectMutation'] = ResolversParentTypes['SendCustomInjectMutation']> = ResolversObject<{ operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; -export type SelectTeamInjectTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['SelectTeamInjectType'] = ResolversParentTypes['SelectTeamInjectType']> = ResolversObject<{ - activateMilestone?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - content?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - deactivateMilestone?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - fileId?: Resolver<Maybe<ResolversTypes['UUID']>, ParentType, ContextType>; - optionEmail?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; - repeat?: Resolver<Maybe<ResolversTypes['Int']>, ParentType, ContextType>; - selectionId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - sender?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - subject?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - teamId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; -}>; - export type SendEmailMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['SendEmailMutation'] = ResolversParentTypes['SendEmailMutation']> = ResolversObject<{ operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -2332,7 +2516,6 @@ export type SubscriptionResolvers<ContextType = any, ParentType extends Resolver emailThreads?: SubscriptionResolver<Maybe<ResolversTypes['EmailThreadSubscription']>, "emailThreads", ParentType, ContextType, Partial<SubscriptionEmailThreadsArgs>>; exerciseLoopRunning?: SubscriptionResolver<Maybe<ResolversTypes['ExerciseLoopRunningSubscription']>, "exerciseLoopRunning", ParentType, ContextType, Partial<SubscriptionExerciseLoopRunningArgs>>; exercisesSubscription?: SubscriptionResolver<Maybe<ResolversTypes['ExercisesSubscription']>, "exercisesSubscription", ParentType, ContextType>; - injectSelections?: SubscriptionResolver<Maybe<ResolversTypes['InjectSelectionsSubscription']>, "injectSelections", ParentType, ContextType, Partial<SubscriptionInjectSelectionsArgs>>; milestones?: SubscriptionResolver<Maybe<ResolversTypes['MilestonesSubscription']>, "milestones", ParentType, ContextType, RequireFields<SubscriptionMilestonesArgs, 'teamId'>>; teamQuestionnaireStateSubscription?: SubscriptionResolver<Maybe<ResolversTypes['TeamQuestionnaireStateSubscription']>, "teamQuestionnaireStateSubscription", ParentType, ContextType, RequireFields<SubscriptionTeamQuestionnaireStateSubscriptionArgs, 'teamId'>>; }>; @@ -2369,7 +2552,7 @@ export type TeamQuestionnaireStateTypeResolvers<ContextType = any, ParentType ex answers?: Resolver<Array<ResolversTypes['QuestionnaireAnswerType']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; questionnaire?: Resolver<ResolversTypes['QuestionnaireType'], ParentType, ContextType>; - status?: Resolver<ResolversTypes['TeamQuestionnaireStateStatus'], ParentType, ContextType>; + status?: Resolver<Maybe<ResolversTypes['Status']>, ParentType, ContextType>; team?: Resolver<ResolversTypes['TeamType'], ParentType, ContextType>; timestampAnswered?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; timestampSent?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; @@ -2381,7 +2564,6 @@ export type TeamTypeResolvers<ContextType = any, ParentType extends ResolversPar exercise?: Resolver<ResolversTypes['ExerciseType'], ParentType, ContextType>; finishTime?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - injectSelections?: Resolver<Array<ResolversTypes['InjectSelectionType']>, ParentType, ContextType>; logs?: Resolver<Array<ResolversTypes['ActionLogType']>, ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; role?: Resolver<ResolversTypes['String'], ParentType, ContextType>; @@ -2394,7 +2576,7 @@ export type ToolDetailsTypeResolvers<ContextType = any, ParentType extends Resol argument?: Resolver<ResolversTypes['String'], ParentType, ContextType>; content?: Resolver<ResolversTypes['ContentType'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; - tool?: Resolver<ResolversTypes['ExtendedToolType'], ParentType, ContextType>; + tool?: Resolver<ResolversTypes['ToolType'], ParentType, ContextType>; user?: Resolver<Maybe<ResolversTypes['RestrictedUser']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -2417,7 +2599,6 @@ export type ToolTypeResolvers<ContextType = any, ParentType extends ResolversPar id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; roles?: Resolver<ResolversTypes['String'], ParentType, ContextType>; - toolDetails?: Resolver<Array<ResolversTypes['ToolDetailsType']>, ParentType, ContextType>; tooltipDescription?: Resolver<ResolversTypes['String'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -2426,6 +2607,23 @@ export interface UuidScalarConfig extends GraphQLScalarTypeConfig<ResolversTypes name: 'UUID'; } +export type UpdateTagAssignmentsMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['UpdateTagAssignmentsMutation'] = ResolversParentTypes['UpdateTagAssignmentsMutation']> = ResolversObject<{ + operationDone?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type UpdateTagAssignmentsTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['UpdateTagAssignmentsType'] = ResolversParentTypes['UpdateTagAssignmentsType']> = ResolversObject<{ + addTags?: Resolver<Array<ResolversTypes['ID']>, ParentType, ContextType>; + removeTags?: Resolver<Array<ResolversTypes['ID']>, ParentType, ContextType>; + userIds?: Resolver<Array<ResolversTypes['ID']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type UpdateTagMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['UpdateTagMutation'] = ResolversParentTypes['UpdateTagMutation']> = ResolversObject<{ + updatedTag?: Resolver<ResolversTypes['TagType'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type UseToolMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['UseToolMutation'] = ResolversParentTypes['UseToolMutation']> = ResolversObject<{ operationDone?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -2443,12 +2641,10 @@ export type UserTypeResolvers<ContextType = any, ParentType extends ResolversPar definitions?: Resolver<Maybe<Array<Maybe<ResolversTypes['ExerciseDefinitionType']>>>, ParentType, ContextType>; exercises?: Resolver<Maybe<Array<Maybe<ResolversTypes['RestrictedExercise']>>>, ParentType, ContextType>; firstName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; - group?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; + group?: Resolver<Maybe<ResolversTypes['AuthGroup']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; isActive?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; isImported?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; - isStaff?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; - isSuperuser?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; lastLogin?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; lastName?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; tags?: Resolver<Array<ResolversTypes['TagType']>, ParentType, ContextType>; @@ -2467,17 +2663,24 @@ export type Resolvers<ContextType = any> = ResolversObject<{ AnalyticsMilestonesSubscription?: AnalyticsMilestonesSubscriptionResolvers<ContextType>; AnswerQuestionnaireMutation?: AnswerQuestionnaireMutationResolvers<ContextType>; AssignInstructorsToExercise?: AssignInstructorsToExerciseResolvers<ContextType>; + AssignUsersByTags?: AssignUsersByTagsResolvers<ContextType>; + AssignUsersEqually?: AssignUsersEquallyResolvers<ContextType>; AssignUsersToTeamMutation?: AssignUsersToTeamMutationResolvers<ContextType>; ChangeUserDataMutation?: ChangeUserDataMutationResolvers<ContextType>; - ChannelReadReceipt?: ChannelReadReceiptResolvers<ContextType>; + ChangeUserType?: ChangeUserTypeResolvers<ContextType>; ChannelReceipt?: ChannelReceiptResolvers<ContextType>; ConfigOverrideType?: ConfigOverrideTypeResolvers<ContextType>; ContentType?: ContentTypeResolvers<ContextType>; ControlType?: ControlTypeResolvers<ContextType>; + CopyUsersAssignment?: CopyUsersAssignmentResolvers<ContextType>; CreateExerciseMutation?: CreateExerciseMutationResolvers<ContextType>; CreateExerciseType?: CreateExerciseTypeResolvers<ContextType>; + CreateTagMutation?: CreateTagMutationResolvers<ContextType>; CreateThreadMutation?: CreateThreadMutationResolvers<ContextType>; + CreateUserMutation?: CreateUserMutationResolvers<ContextType>; + CreateUserType?: CreateUserTypeResolvers<ContextType>; CustomInjectDetailsType?: CustomInjectDetailsTypeResolvers<ContextType>; + CustomInjectType?: CustomInjectTypeResolvers<ContextType>; DateTime?: GraphQLScalarType; DefinitionChannelType?: DefinitionChannelTypeResolvers<ContextType>; DefinitionInjectType?: DefinitionInjectTypeResolvers<ContextType>; @@ -2485,12 +2688,13 @@ export type Resolvers<ContextType = any> = ResolversObject<{ DefinitionType?: DefinitionTypeResolvers<ContextType>; DeleteDefinitionMutation?: DeleteDefinitionMutationResolvers<ContextType>; DeleteExerciseMutation?: DeleteExerciseMutationResolvers<ContextType>; + DeleteTagsMutation?: DeleteTagsMutationResolvers<ContextType>; + DeleteUsersMutation?: DeleteUsersMutationResolvers<ContextType>; EmailAddressType?: EmailAddressTypeResolvers<ContextType>; EmailDraftType?: EmailDraftTypeResolvers<ContextType>; EmailParticipantType?: EmailParticipantTypeResolvers<ContextType>; EmailReceipt?: EmailReceiptResolvers<ContextType>; EmailTemplateType?: EmailTemplateTypeResolvers<ContextType>; - EmailThreadReceipt?: EmailThreadReceiptResolvers<ContextType>; EmailThreadSubscription?: EmailThreadSubscriptionResolvers<ContextType>; EmailThreadType?: EmailThreadTypeResolvers<ContextType>; EmailType?: EmailTypeResolvers<ContextType>; @@ -2500,13 +2704,10 @@ export type Resolvers<ContextType = any> = ResolversObject<{ ExercisesSubscription?: ExercisesSubscriptionResolvers<ContextType>; ExtendedToolType?: ExtendedToolTypeResolvers<ContextType>; FileInfoType?: FileInfoTypeResolvers<ContextType>; + FilterUsersType?: FilterUsersTypeResolvers<ContextType>; GrapheneConfig?: GrapheneConfigResolvers<ContextType>; - GroupType?: GroupTypeResolvers<ContextType>; InjectDetailsType?: InjectDetailsTypeResolvers<ContextType>; - InjectOptionType?: InjectOptionTypeResolvers<ContextType>; - InjectSelectionConfirmationType?: InjectSelectionConfirmationTypeResolvers<ContextType>; - InjectSelectionType?: InjectSelectionTypeResolvers<ContextType>; - InjectSelectionsSubscription?: InjectSelectionsSubscriptionResolvers<ContextType>; + IsUnreadType?: IsUnreadTypeResolvers<ContextType>; LearningActivityType?: LearningActivityTypeResolvers<ContextType>; LearningObjectiveType?: LearningObjectiveTypeResolvers<ContextType>; LoginMutation?: LoginMutationResolvers<ContextType>; @@ -2517,6 +2718,7 @@ export type Resolvers<ContextType = any> = ResolversObject<{ ModifyMilestoneMutation?: ModifyMilestoneMutationResolvers<ContextType>; MoveExerciseTimeMutation?: MoveExerciseTimeMutationResolvers<ContextType>; Mutation?: MutationResolvers<ContextType>; + MutationResult?: MutationResultResolvers<ContextType>; OverlayType?: OverlayTypeResolvers<ContextType>; PasswordChange?: PasswordChangeResolvers<ContextType>; Query?: QueryResolvers<ContextType>; @@ -2524,14 +2726,14 @@ export type Resolvers<ContextType = any> = ResolversObject<{ QuestionnaireAnswerType?: QuestionnaireAnswerTypeResolvers<ContextType>; QuestionnaireType?: QuestionnaireTypeResolvers<ContextType>; ReadReceiptType?: ReadReceiptTypeResolvers<ContextType>; + RegenerateCredentialsMutation?: RegenerateCredentialsMutationResolvers<ContextType>; RemoveDefinitionAccessMutation?: RemoveDefinitionAccessMutationResolvers<ContextType>; RemoveInstructorsFromExerciseMutation?: RemoveInstructorsFromExerciseMutationResolvers<ContextType>; RemoveUsersFromTeamMutation?: RemoveUsersFromTeamMutationResolvers<ContextType>; RestrictedExercise?: RestrictedExerciseResolvers<ContextType>; RestrictedTeam?: RestrictedTeamResolvers<ContextType>; RestrictedUser?: RestrictedUserResolvers<ContextType>; - SelectTeamInjectOptionMutation?: SelectTeamInjectOptionMutationResolvers<ContextType>; - SelectTeamInjectType?: SelectTeamInjectTypeResolvers<ContextType>; + SendCustomInjectMutation?: SendCustomInjectMutationResolvers<ContextType>; SendEmailMutation?: SendEmailMutationResolvers<ContextType>; SendEmailType?: SendEmailTypeResolvers<ContextType>; StartExerciseMutation?: StartExerciseMutationResolvers<ContextType>; @@ -2547,6 +2749,9 @@ export type Resolvers<ContextType = any> = ResolversObject<{ ToolResponseType?: ToolResponseTypeResolvers<ContextType>; ToolType?: ToolTypeResolvers<ContextType>; UUID?: GraphQLScalarType; + UpdateTagAssignmentsMutation?: UpdateTagAssignmentsMutationResolvers<ContextType>; + UpdateTagAssignmentsType?: UpdateTagAssignmentsTypeResolvers<ContextType>; + UpdateTagMutation?: UpdateTagMutationResolvers<ContextType>; UseToolMutation?: UseToolMutationResolvers<ContextType>; UseToolType?: UseToolTypeResolvers<ContextType>; UserType?: UserTypeResolvers<ContextType>; diff --git a/graphql/utils/useActionLogSubscription.tsx b/graphql/utils/useActionLogSubscription.tsx index 362dbc9c2bd99d1da16662d06e8b5b6b528c3dc0..3a55c2832f0fbda55b4dd551829d804f00f290c9 100644 --- a/graphql/utils/useActionLogSubscription.tsx +++ b/graphql/utils/useActionLogSubscription.tsx @@ -1,17 +1,22 @@ +import { useApolloClient } from '@apollo/client' import useInInstructor from '@inject/shared/hooks/useInInstructor' import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' import { usePopupContext } from '@inject/shared/popup/PopupContext' import type { ReactNode } from 'react' -import { useEffect } from 'react' +import { useCallback, useEffect } from 'react' import type { ActionLog } from '../fragments/ActionLog.generated' +import type { CustomInjectDetails } from '../fragments/CustomInjectDetails.generated' import type { EmailDetails } from '../fragments/EmailDetails.generated' import type { InjectDetails } from '../fragments/InjectDetails.generated' import type { QuestionnaireDetails } from '../fragments/QuestionnaireDetails.generated' -import { useResetReadReceiptChannel } from '../mutations/clientonly/ResetReadReceiptChannel.generated' +import { useSetIsUnreadChannel } from '../mutations/clientonly/SetIsUnreadChannel.generated' import { useGetTeamActionLogs } from '../queries/GetTeamActionLogs.generated' +import type { GetTeamChannelLogs } from '../queries/GetTeamChannelLogs.generated' +import { GetTeamChannelLogsDocument } from '../queries/GetTeamChannelLogs.generated' import type { TeamAction } from '../subscriptions/TeamActionLogs.generated' import { TeamActionDocument } from '../subscriptions/TeamActionLogs.generated' +// TODO: refactor the component to use `useSubscription` instead const useActionLogSubscription = ({ teamId, getPopup, @@ -19,9 +24,25 @@ const useActionLogSubscription = ({ teamId: string getPopup?: (actionLog: ActionLog) => ReactNode }) => { - const [mutateReadChannel] = useResetReadReceiptChannel() - const isInstructor = useInInstructor() + const isInCurrentContext = useCallback((actionLog: ActionLog): boolean => { + switch (actionLog.type) { + case 'EMAIL': + return window.location.pathname.includes('/email') + case 'FORM': + return window.location.pathname.includes('/form') + case 'INJECT': + case 'CUSTOM_INJECT': + return window.location.pathname.includes('/info') + case 'TOOL': + return window.location.pathname.includes('/tool') + default: + return false + } + }, []) + const [setIsUnread] = useSetIsUnreadChannel() + const isInstructor = useInInstructor() + const apollo = useApolloClient() // TODO: show 'active' overlays from query const query = useGetTeamActionLogs({ variables: { @@ -29,6 +50,30 @@ const useActionLogSubscription = ({ }, initialFetchPolicy: 'network-only', nextFetchPolicy: 'cache-first', + onCompleted: data => { + const setChannelIds = new Set<string>() + data.actionLogs?.forEach(actionLog => { + if ( + actionLog && + !isInCurrentContext(actionLog) && + // eslint-disable-next-line @typescript-eslint/no-explicit-any + !(actionLog.details as any)?.overlay && + !actionLog.readReceipt && + !(actionLog.details as EmailDetails)?.readReceipt + ) { + setChannelIds.add(actionLog.channel.id) + } + }) + setChannelIds.forEach(channelId => + setIsUnread({ + variables: { + channelId: channelId, + teamId, + isUnread: true, + }, + }) + ) + }, }) const { notify } = useNotifyContext() const { showPopup } = usePopupContext() @@ -51,6 +96,28 @@ const useActionLogSubscription = ({ return prev } + // push information to the end of channel query + const oldChannel = apollo.cache.readQuery<GetTeamChannelLogs>({ + query: GetTeamChannelLogsDocument, + variables: { + teamId, + channelId: newActionLog.channel.id, + }, + }) || { teamChannelLogs: [] } + apollo.cache.writeQuery<GetTeamChannelLogs>({ + query: GetTeamChannelLogsDocument, + variables: { + teamId, + channelId: newActionLog.channel.id, + }, + data: { + teamChannelLogs: [ + ...(oldChannel.teamChannelLogs || []), + newActionLog, + ], + }, + }) + // TODO: log the information whether the overlay was closed if (!isInstructor) { if (!getPopup) { @@ -65,6 +132,14 @@ const useActionLogSubscription = ({ break } + showPopup(details.overlay.duration, getPopup(newActionLog)) + break + case 'CUSTOM_INJECT': + details = newActionLog.details as CustomInjectDetails + if (!details.overlay) { + break + } + showPopup(details.overlay.duration, getPopup(newActionLog)) break case 'EMAIL': @@ -88,20 +163,31 @@ const useActionLogSubscription = ({ } } - mutateReadChannel({ - variables: { - channelId: newActionLog.channel.id, - teamId: newActionLog.team.id, - }, - }) + if ( + !isInCurrentContext(newActionLog) && + // eslint-disable-next-line @typescript-eslint/no-explicit-any + !(newActionLog.details as any)?.overlay + ) { + setIsUnread({ + variables: { + channelId: newActionLog.channel.id, + teamId: newActionLog.team.id, + isUnread: true, + }, + }) + } // TODO: don't notify if the EMAIL, CUSTOM_INJECT, or TOOL actionLog was created by the user const newMessageText = `New message in ${newActionLog.channel.name}` - notify( - isInstructor ? `Team ${teamId}: ${newMessageText}` : newMessageText, - {}, - new Date(newActionLog.timestamp || 0) - ) + if (newActionLog.team.id === teamId) { + notify( + isInstructor + ? `${newActionLog.team.name}: ${newMessageText}` + : newMessageText, + {}, + new Date(newActionLog.timestamp || 0) + ) + } return { ...prev, @@ -111,12 +197,14 @@ const useActionLogSubscription = ({ }), [ teamId, + apollo, subscribeToMore, notify, isInstructor, - mutateReadChannel, showPopup, getPopup, + isInCurrentContext, + setIsUnread, ] ) diff --git a/graphql/utils/useAnalyticsMilestonesSubscription.ts b/graphql/utils/useAnalyticsMilestonesSubscription.ts index 80b0646107f0d9eb65fa0fb4ed7e7221a76f2411..eda289272624e94e8c5b024128a6c766cf9cdc5f 100644 --- a/graphql/utils/useAnalyticsMilestonesSubscription.ts +++ b/graphql/utils/useAnalyticsMilestonesSubscription.ts @@ -20,28 +20,24 @@ const useAnalyticsMilestonesSubscription = (exerciseId: string) => { // Codegen implicitly typecasts subscriptionData to the parent query type, this is not desired const retypedData = subscriptionData.data as unknown as ExerciseMilestones - if ( - !retypedData || - !retypedData.analyticsMilestonesSubscription || - !retypedData.analyticsMilestonesSubscription.milestones - ) + + if (!retypedData.analyticsMilestonesSubscription?.milestones) return prev if (!prev.analyticsMilestones) return prev - let newMilestones = prev.analyticsMilestones - - retypedData.analyticsMilestonesSubscription.milestones + const subscribedMilestones = + retypedData.analyticsMilestonesSubscription.milestones.filter( + notEmpty + ) + const newMilestones = prev.analyticsMilestones .filter(notEmpty) - .forEach(newMilestoneState => { - newMilestones = newMilestones - .filter(notEmpty) - .map(oldMilestoneState => - oldMilestoneState.milestone.id === - newMilestoneState.milestone.id && - milestoneStatesEqual(oldMilestoneState, newMilestoneState) - ? newMilestoneState - : oldMilestoneState - ) + .map(oldMilestoneState => { + const newMilestoneState = subscribedMilestones.find( + milestoneState => + milestoneStatesEqual(milestoneState, oldMilestoneState) + ) + + return newMilestoneState ? newMilestoneState : oldMilestoneState }) return { diff --git a/graphql/utils/useApolloHealthStatus.tsx b/graphql/utils/useApolloHealthStatus.tsx deleted file mode 100644 index 4fe8ef8732423963b6f65e619723f12e99e0d502..0000000000000000000000000000000000000000 --- a/graphql/utils/useApolloHealthStatus.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import type { NotifyFunction } from '@inject/shared/notification/typing' -import { useApolloNetworkStatus } from '../client' - -interface ApolloHealthStatusContextProps { - notify: NotifyFunction -} - -const useApolloHealthStatus = ({ notify }: ApolloHealthStatusContextProps) => { - const status = useApolloNetworkStatus() - - if (status.queryError?.networkError) { - notify(`Apollo Network error: ${status.queryError.networkError.message}`, { - intent: 'danger', - }) - } - if (status.queryError?.graphQLErrors) { - status.queryError.graphQLErrors.forEach(x => { - // ignore auth errors - if (x.message === 'Authentication failed') return - notify(`Apollo Query error: ${x.message}`, { - intent: 'danger', - }) - }) - } -} - -export default useApolloHealthStatus diff --git a/graphql/utils/useEmailThreadSubscription.ts b/graphql/utils/useEmailThreadSubscription.ts index 7962bd32b5a41962c34d398e53ba62a29f880f17..eb80522f0a04523d4b649107d84941fe8a535f06 100644 --- a/graphql/utils/useEmailThreadSubscription.ts +++ b/graphql/utils/useEmailThreadSubscription.ts @@ -1,23 +1,47 @@ import useInInstructor from '@inject/shared/hooks/useInInstructor' +import notEmpty from '@inject/shared/utils/notEmpty' import { reject } from 'lodash' import { useEffect } from 'react' import type { EmailThread } from '../fragments/EmailThread.generated' -import { useResetReadReceiptEmailThread } from '../mutations/clientonly/ResetReadReceiptEmailThread.generated' +import { useSetIsUnreadEmailThread } from '../mutations/clientonly/SetIsUnreadEmailThread.generated' import { useGetEmailThreads } from '../queries/GetEmailThreads.generated' import type { EmailThreadsSubscription } from '../subscriptions/EmailThreads.generated' import { EmailThreadsSubscriptionDocument } from '../subscriptions/EmailThreads.generated' -const useEmailThreadSubscription = (teamId: string) => { +const useEmailThreadSubscription = ( + teamId: string, + selectedThreadId?: string +) => { const isInstructor = useInInstructor() + const [setIsUnread] = useSetIsUnreadEmailThread() const query = useGetEmailThreads({ variables: { teamId, }, initialFetchPolicy: 'network-only', nextFetchPolicy: 'cache-first', + onCompleted: data => { + const setThreadIds = new Set<string>() + data.emailThreads?.filter(notEmpty).forEach(emailThread => { + // skip if in current context (if thread is already open) + if (selectedThreadId === emailThread.id) return + + emailThread.emails.forEach(email => { + if (!email.readReceipt && !setThreadIds.has(emailThread.id)) { + setIsUnread({ + variables: { + threadId: emailThread.id, + teamId, + isUnread: true, + }, + onCompleted: () => setThreadIds.add(emailThread.id), + }) + } + }) + }) + }, }) - const [mutateReadThread] = useResetReadReceiptEmailThread() const { subscribeToMore, networkStatus } = query useEffect( @@ -36,11 +60,16 @@ const useEmailThreadSubscription = (teamId: string) => { const newEmailThread = retypedData.emailThreads?.emailThread if (!newEmailThread) return prev - mutateReadThread({ - variables: { - emailThreadId: newEmailThread.id, - }, - }) + // skip if in current context (if thread is already open) + if (selectedThreadId !== newEmailThread.id) { + setIsUnread({ + variables: { + threadId: newEmailThread.id, + teamId, + isUnread: true, + }, + }) + } const oldEmailThreads = prev.emailThreads || [] const oldEmailThread = oldEmailThreads.find( @@ -61,7 +90,7 @@ const useEmailThreadSubscription = (teamId: string) => { } }, }), - [teamId, subscribeToMore, isInstructor, mutateReadThread] + [teamId, subscribeToMore, isInstructor, setIsUnread, selectedThreadId] ) return { diff --git a/graphql/utils/useExerciseSubscriptionStatus.ts b/graphql/utils/useExerciseSubscriptionStatus.ts index 3ba409bfebf1df49a7dd10e993a321a061a6e37a..dd8a55f5b1ceec37dffea3ae273162756c44d399 100644 --- a/graphql/utils/useExerciseSubscriptionStatus.ts +++ b/graphql/utils/useExerciseSubscriptionStatus.ts @@ -1,17 +1,10 @@ import { useEffect } from 'react' -import { useStartExercise } from '../mutations/StartExercise.generated' -import { useStopExercise } from '../mutations/StopExercise.generated' -import { useGetExercise } from '../queries/GetExercise.generated' import { useGetExerciseLoopStatus } from '../queries/GetExerciseLoopStatus.generated' -import type { ExerciseLoopRunningSubscriptionResult } from '../subscriptions/ExerciseLoopStatus.generated' +import type { ExerciseLoopRunning } from '../subscriptions/ExerciseLoopStatus.generated' import { ExerciseLoopRunningDocument } from '../subscriptions/ExerciseLoopStatus.generated' const useExerciseSubscriptionStatus = (exerciseId?: string) => { - const { - data: dataExerciseLoop, - subscribeToMore, - refetch: refetchExerciseLoop, - } = useGetExerciseLoopStatus({ + const { data: dataExerciseLoop, subscribeToMore } = useGetExerciseLoopStatus({ fetchPolicy: 'network-only', nextFetchPolicy: 'cache-first', variables: { @@ -19,12 +12,6 @@ const useExerciseSubscriptionStatus = (exerciseId?: string) => { }, skip: !exerciseId, }) - const { data: dataExercise } = useGetExercise({ - variables: { exerciseId: exerciseId || '' }, - skip: !exerciseId, - }) - const [stopExercise] = useStopExercise() - const [startExercise] = useStartExercise() useEffect(() => { if (exerciseId) { @@ -32,63 +19,21 @@ const useExerciseSubscriptionStatus = (exerciseId?: string) => { document: ExerciseLoopRunningDocument, variables: { exerciseId }, updateQuery: (prev, { subscriptionData }) => { - const data = subscriptionData as ExerciseLoopRunningSubscriptionResult - if (!data.data) return prev + const data = subscriptionData as unknown as ExerciseLoopRunning + if ( + data.exerciseLoopRunning?.exerciseLoopRunning === undefined || + data.exerciseLoopRunning.exerciseLoopRunning === null + ) + return prev return { ...prev, - exerciseLoopRunning: - data.data.exerciseLoopRunning?.exerciseLoopRunning ?? null, + exerciseLoopRunning: data.exerciseLoopRunning.exerciseLoopRunning, } }, }) } }, [subscribeToMore, exerciseId]) - /** - * During a backend server outage, the exercise loop of a running exercise - * will be stopped, but the exercise will still be marked as running - * - * This useEffect resolves this inconsistency by restarting the exercise and - * refetching the exercise loop status; only one client can do this at a time - * - * Note that the issue will persist if the exercise is not subscribed to at - * the moment of the backend server failure - */ - useEffect(() => { - const asyncEffect = async () => { - while ( - dataExerciseLoop?.exerciseLoopRunning === false && - dataExercise?.exerciseId?.running === true && - exerciseId - ) { - const lock = localStorage.getItem('backendOutageFixLock') - if (lock) { - await new Promise(resolve => setTimeout(resolve, 1000)) - await refetchExerciseLoop() - return - } - - localStorage.setItem('backendOutageFixLock', 'true') - stopExercise({ - variables: { id: exerciseId }, - onCompleted: () => { - startExercise({ - variables: { id: exerciseId }, - onCompleted: () => { - localStorage.removeItem('backendOutageFixLock') - refetchExerciseLoop() - }, - }) - }, - }) - break - } - } - - asyncEffect() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [dataExercise?.exerciseId?.running, dataExerciseLoop?.exerciseLoopRunning]) - return dataExerciseLoop?.exerciseLoopRunning } diff --git a/graphql/utils/useTeamInjectSelectionsSubscription.ts b/graphql/utils/useTeamInjectSelectionsSubscription.ts deleted file mode 100644 index decddf3ec955c9e90500f93b560fe7b2c7448a92..0000000000000000000000000000000000000000 --- a/graphql/utils/useTeamInjectSelectionsSubscription.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { useEffect } from 'react' -import { useGetTeamInjectSelections } from '../queries/GetTeamInjectSelections.generated' -import type { TeamInjectSelections } from '../subscriptions/TeamInjectSelections.generated' -import { TeamInjectSelectionsDocument } from '../subscriptions/TeamInjectSelections.generated' - -const useTeamInjectSelectionsSubscription = (teamId: string) => { - const query = useGetTeamInjectSelections({ - variables: { - teamId, - }, - fetchPolicy: 'network-only', - nextFetchPolicy: 'cache-first', - }) - - const { subscribeToMore, networkStatus } = query - - useEffect( - () => - subscribeToMore({ - document: TeamInjectSelectionsDocument, - variables: { - teamId, - }, - updateQuery: (prev, { subscriptionData }) => { - const retypedData = - subscriptionData.data as unknown as TeamInjectSelections - - if (!retypedData) return prev - const newInject = retypedData.injectSelection?.injectSelection - const oldInjects = prev.teamInjectSelections || [] - if (newInject) { - // notify(`New inject for team ${teamId} available: ${newInject.name}`) - return { - ...prev, - teamInjectSelections: [...oldInjects, newInject], - } - } - return prev - }, - }), - [teamId] - ) - - return { - networkStatus, - teamId, - } -} - -export default useTeamInjectSelectionsSubscription diff --git a/graphql/utils/useTeamMilestonesSubscription.ts b/graphql/utils/useTeamMilestonesSubscription.ts index caacca941a79992568cef3ad67759a4dd7248e38..299590f4dd155ec0585d34e13ab80191c4f3c9c1 100644 --- a/graphql/utils/useTeamMilestonesSubscription.ts +++ b/graphql/utils/useTeamMilestonesSubscription.ts @@ -2,18 +2,17 @@ import { useApolloClient } from '@apollo/client' import notEmpty from '@inject/shared/utils/notEmpty' import { useEffect } from 'react' import { GetTeamLearningObjectivesDocument } from '../queries/GetTeamLearningObjectives.generated' -import type { GetTeamMilestones } from '../queries/GetTeamMilestones.generated' import { useGetTeamMilestones } from '../queries/GetTeamMilestones.generated' -import type { TeamMilestonesSubscriptionResult } from '../subscriptions/TeamMilestones.generated' +import type { TeamMilestones } from '../subscriptions/TeamMilestones.generated' import { TeamMilestonesDocument } from '../subscriptions/TeamMilestones.generated' -import mergeMilestoneState from './mergeMilestoneState' +import milestoneStatesEqual from './milestoneStatesEqual' const useTeamMilestonesSubscription = (teamId: string) => { const query = useGetTeamMilestones({ variables: { teamId, }, - fetchPolicy: 'network-only', + initialFetchPolicy: 'network-only', nextFetchPolicy: 'cache-first', }) @@ -28,33 +27,39 @@ const useTeamMilestonesSubscription = (teamId: string) => { teamId, }, updateQuery: (prev, { subscriptionData }) => { - const retypedData = - subscriptionData as unknown as TeamMilestonesSubscriptionResult - - if (!retypedData) return prev - const newInject = ( - retypedData.data?.milestones?.milestones || [] - ).filter(notEmpty) - const oldInjects = (prev.teamMilestones || []).filter(notEmpty) - if (newInject) { - client.refetchQueries({ - include: [GetTeamLearningObjectivesDocument], + // Codegen implicitly typecasts subscriptionData to the parent query type, this is not desired + const retypedData = subscriptionData.data as unknown as TeamMilestones + + if (!retypedData.milestones?.milestones) return prev + if (!prev.teamMilestones) return prev + + const subscribedMilestones = + retypedData.milestones.milestones.filter(notEmpty) + const newMilestones = prev.teamMilestones + .filter(notEmpty) + .map(oldMilestoneState => { + const newMilestoneState = subscribedMilestones.find( + milestoneState => + milestoneStatesEqual(milestoneState, oldMilestoneState) + ) + + return newMilestoneState ? newMilestoneState : oldMilestoneState }) - return { - ...prev, - teamMilestones: mergeMilestoneState(oldInjects, newInject), - } as GetTeamMilestones + + client.refetchQueries({ + include: [GetTeamLearningObjectivesDocument], + }) + + return { + ...prev, + teamMilestones: newMilestones, } - return prev }, }), - [teamId] + [client, subscribeToMore, teamId] ) - return { - networkStatus, - teamId, - } + return { teamId, networkStatus } } export default useTeamMilestonesSubscription diff --git a/graphql/utils/useTeamQuestionnaireStateSubscription.ts b/graphql/utils/useTeamQuestionnaireStateSubscription.ts index 99c102a518f3916564e44d414a1e4bddf5469a04..38d1afc81f381126208a8ec04dffe43f919e7497 100644 --- a/graphql/utils/useTeamQuestionnaireStateSubscription.ts +++ b/graphql/utils/useTeamQuestionnaireStateSubscription.ts @@ -1,7 +1,7 @@ import { useEffect } from 'react' import type { GetTeamQuestionnaireState } from '../queries/GetTeamQuestionnaireState.generated' import { useGetTeamQuestionnaireState } from '../queries/GetTeamQuestionnaireState.generated' -import type { TeamQuestionnaireStateSubscriptionResult } from '../subscriptions/TeamQuestionnaireState.generated' +import type { TeamQuestionnaireState } from '../subscriptions/TeamQuestionnaireState.generated' import { TeamQuestionnaireStateDocument } from '../subscriptions/TeamQuestionnaireState.generated' const useTeamQuestionnaireStateSubscription = ( @@ -13,7 +13,7 @@ const useTeamQuestionnaireStateSubscription = ( teamId, questionnaireId, }, - fetchPolicy: 'network-only', + fetchPolicy: 'cache-and-network', }) const { subscribeToMore } = query @@ -28,11 +28,11 @@ const useTeamQuestionnaireStateSubscription = ( }, updateQuery: (prev, { subscriptionData }) => { const retypedData = - subscriptionData as unknown as TeamQuestionnaireStateSubscriptionResult + subscriptionData as unknown as TeamQuestionnaireState if (!retypedData) return prev const newState = - retypedData.data?.teamQuestionnaireState?.teamQuestionnaireState + retypedData.teamQuestionnaireState?.teamQuestionnaireState if (newState) { return { ...prev, diff --git a/package.json b/package.json index 30e4d56245898e7e57f27f18a9eaaff4ec3e67cf..b40f6afa51fbeb129ccd91821b304318e07792cb 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "private": true, "version": "0.0.0", "type": "module", + "license": "MIT", "engines": { "node": "20.x", "yarn": "4.1.1" @@ -21,17 +22,17 @@ "prestart": "yarn generate", "predev": "yarn generate", "eslint": "eslint \"graphql/**/*.ts\" \"graphql/**/*.tsx\" \"frontend/**/*.ts\" \"frontend/**/*.tsx\" \"shared/**/*.ts\" \"shared/**/*.tsx\"", - "prettier": "pnpify prettier \"graphql/**/*.ts\" \"graphql/**/*.tsx\" \"frontend/**/*.ts\" \"frontend/**/*.tsx\" \"shared/**/*.ts\" \"shared/**/*.tsx\"", + "prettier": "pnpify prettier \"graphql/**/*.ts\" \"graphql/**/*.tsx\" \"frontend/**/*.ts\" \"frontend/**/*.tsx\" \"shared/**/*.ts\" \"shared/**/*.tsx\" \"frontend/**/*.scss\"", "prettier-write": "yarn prettier --write", "prettier-check": "yarn prettier --check", "test": "yarn workspace @inject/tests test", "postinstall": "yarn dlx @yarnpkg/sdks vscode" }, "resolutions": { - "@blueprintjs/core": "5.10.0", - "@blueprintjs/icons": "5.8.0", - "@blueprintjs/select": "5.1.2", - "@blueprintjs/colors": "5.1.0" + "@blueprintjs/core": "5.10.4", + "@blueprintjs/icons": "5.10.0", + "@blueprintjs/select": "5.2.0", + "@blueprintjs/colors": "5.1.1" }, "devDependencies": { "@eslint/js": "8.57.0", @@ -53,5 +54,10 @@ "packageManager": "yarn@4.1.1", "dependencies": { "@yarnpkg/pnpify": "^4.0.1" + }, + "dependenciesMeta": { + "prettier-plugin-organize-imports@3.2.4": { + "unplugged": true + } } } diff --git a/shared/LICENSE b/shared/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/shared/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/shared/components/CardGroup/index.tsx b/shared/components/CardGroup/index.tsx deleted file mode 100644 index d05e549ffd76788ee393a31f7f52c711d3408d4f..0000000000000000000000000000000000000000 --- a/shared/components/CardGroup/index.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { css } from '@emotion/css' -import type { FC, PropsWithChildren } from 'react' - -const div = css` - display: flex; - flex-wrap: wrap; - margin: 0 auto; - - & > * { - flex: 1 1 300px; - margin: 10px; - } -` - -const CardGroup: FC<PropsWithChildren> = ({ children }) => ( - <div className={div}>{children}</div> -) - -export default CardGroup diff --git a/shared/components/CardList/index.tsx b/shared/components/CardList/index.tsx index e86d1c0a3bc543230495cff15d26eee3d511aea0..49bc4c0d4f6ae8dd8af7e445bc6871267b25b786 100644 --- a/shared/components/CardList/index.tsx +++ b/shared/components/CardList/index.tsx @@ -4,11 +4,19 @@ import type { FC, PropsWithChildren } from 'react' const cardList = css` padding: 1rem; display: grid; - grid-template-columns: repeat(3, 1fr); width: 100%; gap: 1rem; max-height: 70vh; overflow: auto; + grid-template-columns: repeat(3, 1fr); + + @media (max-width: 60rem) { + grid-template-columns: 1fr 1fr; + } + + @media (max-width: 40rem) { + grid-template-columns: 1fr; + } ` const CardList: FC<PropsWithChildren> = ({ children }) => ( diff --git a/shared/components/ColorBox/index.tsx b/shared/components/ColorBox/index.tsx index 4e18158129255738e6844e8c9fbf76b728497806..51c7cfc5570bfeb0d4e05f732cde522597681db5 100644 --- a/shared/components/ColorBox/index.tsx +++ b/shared/components/ColorBox/index.tsx @@ -11,7 +11,7 @@ export type COLOR_ENUM = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 export const COLOR_AMOUNT = 10 const toColorenum = (id: number): COLOR_ENUM => (id % 10) as COLOR_ENUM -const ColorBox: FC<ColorBoxProps> = ({ id, style, title }) => { +const ColorBox: FC<ColorBoxProps> = ({ id, style = {}, title }) => { const color = useMemo(() => { switch (toColorenum(id)) { case 0: @@ -53,8 +53,5 @@ const ColorBox: FC<ColorBoxProps> = ({ id, style, title }) => { /> ) } -ColorBox.defaultProps = { - style: {}, -} export default ColorBox diff --git a/shared/components/Container/index.tsx b/shared/components/Container/index.tsx index 2a162e1ccc710d58f4eabaf890c29359a6a9ffcb..4b360f25161a08a162958bcf33a3633a2df1fc02 100644 --- a/shared/components/Container/index.tsx +++ b/shared/components/Container/index.tsx @@ -1,31 +1,14 @@ -import { css } from '@emotion/css' -import type { FC, PropsWithChildren } from 'react' +import { css, cx } from '@emotion/css' +import type { CSSProperties, FC, PropsWithChildren } from 'react' const divContainer = css` - @media (width < 576px) { - & { - width: 100%; - max-width: 540px; - padding-left: 1rem; - padding-right: 1rem; - margin: 0 auto; - } - } - - @media (width >= 576px) { - & { - width: 100%; - max-width: 540px; - margin: 0 auto; - } - } + width: 100%; + margin: 0 auto; + max-width: 60rem; - @media (width >= 960px) { - & { - width: 100%; - max-width: 768px; - margin: 0 auto; - } + @media (max-width: 60rem) { + padding-left: 1rem; + padding-right: 1rem; } ` @@ -39,16 +22,28 @@ const heighted = css` interface ContainerProps extends PropsWithChildren { makeFullHeight?: boolean + style?: CSSProperties + className?: string } -const Container: FC<ContainerProps> = ({ children, makeFullHeight }) => ( - <div className={`${divContainer} ${makeFullHeight ? heighted : ''}`}> +const Container: FC<ContainerProps> = ({ + children, + makeFullHeight, + style, + className, +}) => ( + <div + className={cx( + { + [divContainer]: true, + [heighted]: makeFullHeight, + }, + className + )} + style={style} + > {children} </div> ) -Container.defaultProps = { - makeFullHeight: false, -} - export default Container diff --git a/shared/components/Divider/index.tsx b/shared/components/Divider/index.tsx deleted file mode 100644 index 0b99d8c589db03f1e415a5e884e2ce14d90b7b05..0000000000000000000000000000000000000000 --- a/shared/components/Divider/index.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { css } from '@emotion/css' -import type { CSSProperties, FC } from 'react' - -const divider = css` - margin: 1rem 0; - border-top: 1px solid rgba(17, 20, 24, 0.15); - .bp5-dark & { - border-top-color: rgba(255, 255, 255, 0.2); - } -` - -interface DividerProps { - style?: CSSProperties -} - -const Divider: FC<DividerProps> = ({ style }) => ( - <div className={divider} style={style} /> -) - -Divider.defaultProps = { - style: {}, -} - -export default Divider diff --git a/shared/components/Message/HeaderItem.tsx b/shared/components/Message/HeaderItem.tsx new file mode 100644 index 0000000000000000000000000000000000000000..33173574ca8f6eb9c640f3f9836de90b49a7a61e --- /dev/null +++ b/shared/components/Message/HeaderItem.tsx @@ -0,0 +1,13 @@ +import { css } from '@emotion/css' +import type { FC, PropsWithChildren } from 'react' + +const headerItem = css` + display: flex; + gap: 0.5rem; +` + +const HeaderItem: FC<PropsWithChildren> = ({ children }) => ( + <div className={headerItem}>{children}</div> +) + +export default HeaderItem diff --git a/shared/components/Message/index.tsx b/shared/components/Message/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..44b92e336fc5f864dfc192b2af3c354c4073e1b6 --- /dev/null +++ b/shared/components/Message/index.tsx @@ -0,0 +1,68 @@ +import { Classes, Divider } from '@blueprintjs/core' +import { css, cx } from '@emotion/css' +import type { FC, ReactNode } from 'react' + +const injectMessage = css` + display: flex; + flex-direction: column; + overflow-y: auto; + margin: 1rem; + padding: 0.5rem; + /* subtract the margin */ + width: calc(100% - 2rem); + + border: 1px solid rgba(0, 0, 0, 0.2); + border-radius: 0.5rem; + .${Classes.DARK} & { + border-color: rgba(255, 255, 255, 0.2); + } + + box-shadow: rgba(0, 0, 0, 0.1) 0 0.125rem 0.5rem; + transition: box-shadow 0.2s ease; + &:hover { + box-shadow: rgba(0, 0, 0, 0.3) 0 0.5rem 1rem; + } +` + +const fillHeight = css` + /* subtract the margin */ + height: calc(100% - 2rem); +` + +const headerClass = css` + display: flex; + justify-content: space-between; + align-items: center; +` + +const content = css` + padding: 0.5rem; + overflow-y: auto; + flex: 1; +` + +const Message: FC<{ + fill?: boolean + children?: ReactNode + header?: ReactNode + className?: string +}> = ({ fill, children, header, className }) => ( + <div + className={cx({ + [injectMessage]: true, + [fillHeight]: fill, + [className || '']: !!className, + })} + > + {header && ( + <> + <div className={headerClass}>{header}</div> + <Divider /> + </> + )} + + <div className={content}>{children}</div> + </div> +) + +export default Message diff --git a/shared/components/Timestamp/index.tsx b/shared/components/Timestamp/index.tsx index b25ba590d5ce915c57018016e12cfab6287b3bbd..b914513dfdf62fd9706e5ccc03b9eefea655c99a 100644 --- a/shared/components/Timestamp/index.tsx +++ b/shared/components/Timestamp/index.tsx @@ -53,9 +53,5 @@ const Timestamp: FC<TimestampProps> = ({ </Tag> ) } -Timestamp.defaultProps = { - minimal: false, - style: {}, -} export default Timestamp diff --git a/shared/config/index.ts b/shared/config/index.ts index 3f28739f45f6618887deaafec18753be9f6b8a96..a02ed3c0efd8f33887d89904e175f90b4bcd8d32 100644 --- a/shared/config/index.ts +++ b/shared/config/index.ts @@ -10,8 +10,14 @@ export const uploadDefinitionUrl = (hostAddress: string) => `${currentProtocol()}://${hostAddress}/inject/api/v1/exercise_definition/upload-definition` export const validateDefinitionUrl = (hostAddress: string) => `${currentProtocol()}://${hostAddress}/inject/api/v1/exercise_definition/validate` -export const downloadLogUrl = (hostAddress: string, exerciseId: string) => - `${currentProtocol()}://${hostAddress}/inject/api/v1/running_exercise/get_exercise_logs/${exerciseId}` +export const downloadLogUrl = ( + hostAddress: string, + exerciseId: string, + anonymize: boolean +) => + `${currentProtocol()}://${hostAddress}/inject/api/v1/running_exercise/get_exercise_logs/${exerciseId}${ + anonymize ? '?anonymize' : '' + }` export const downloadFileUrl = ( hostAddress: string, teamId: string, diff --git a/shared/css/dialog.ts b/shared/css/dialog.ts new file mode 100644 index 0000000000000000000000000000000000000000..86c26c77978ce178001c31fe97d242cc0a70c185 --- /dev/null +++ b/shared/css/dialog.ts @@ -0,0 +1,19 @@ +import { css } from '@emotion/css' + +export const maximizedDialog = css` + margin: 0; + width: 90vw; + max-width: clamp(20rem, 90vw, 60rem); + height: 90vh; + max-height: clamp(20rem, 90vh, 60rem); +` + +export const dialogBody = css` + max-height: unset; +` + +export const dialog = css` + margin: 0; + max-width: clamp(20rem, 90vw, 60rem); + max-height: clamp(20rem, 90vh, 60rem); +` diff --git a/shared/css/flexedPage.ts b/shared/css/flexedPage.ts new file mode 100644 index 0000000000000000000000000000000000000000..8c7ab25d788b8a8a0e2a78d210a7c2a421f71b67 --- /dev/null +++ b/shared/css/flexedPage.ts @@ -0,0 +1,11 @@ +import { css } from '@emotion/css' + +const flexedPage = css` + padding: 1rem 0; + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 1rem; +` + +export default flexedPage diff --git a/shared/css/responsiveButtonGroup.ts b/shared/css/responsiveButtonGroup.ts new file mode 100644 index 0000000000000000000000000000000000000000..88c05536cc8e9e6e30bfa9b14bf8254b63b9c333 --- /dev/null +++ b/shared/css/responsiveButtonGroup.ts @@ -0,0 +1,19 @@ +import { Classes } from '@blueprintjs/core' +import { css } from '@emotion/css' + +const responsiveButtonGroup = css` + // imitates the icon-only buttons from BlueprintJS + @media (max-width: 50rem) { + .${Classes.BUTTON} .${Classes.ICON} { + margin-right: 0; + } + .${Classes.BUTTON_TEXT} { + display: none; + } + .${Classes.BUTTON} { + width: 0; + } + } +` + +export default responsiveButtonGroup diff --git a/shared/document/plugins/loaders.ts b/shared/document/plugins/loaders.ts new file mode 100644 index 0000000000000000000000000000000000000000..e5471a564dc51449f4ab874c3bab2ef3a694b288 --- /dev/null +++ b/shared/document/plugins/loaders.ts @@ -0,0 +1,64 @@ +import csrfFetch from '../../utils/csrfFetch' + +export interface FileLoaderFuncProps { + documentURI: string + signal: AbortSignal + fileLoaderComplete: FileLoaderComplete +} +export type FileLoaderComplete = (fileReader?: FileReader) => void +export type FileLoaderFunction = (props: FileLoaderFuncProps) => void + +type ReaderTypeFunction = 'dataURL' | 'arrayBuffer' | 'binaryString' | 'text' + +interface BaseFileLoaderFuncOptions extends FileLoaderFuncProps { + readerTypeFunction: ReaderTypeFunction +} +type BaseFileLoaderFunction = (props: BaseFileLoaderFuncOptions) => void +const _fileLoader: BaseFileLoaderFunction = ({ + documentURI, + signal, + fileLoaderComplete, + readerTypeFunction, +}) => + csrfFetch(documentURI, { signal }) + .then(async res => { + const blob = await res.blob() + + const fileReader = new FileReader() + fileReader.addEventListener('loadend', () => + fileLoaderComplete(fileReader) + ) + + switch (readerTypeFunction) { + case 'arrayBuffer': + fileReader.readAsArrayBuffer(blob) + break + case 'binaryString': + fileReader.readAsBinaryString(blob) + break + case 'dataURL': + fileReader.readAsDataURL(blob) + break + case 'text': + fileReader.readAsText(blob) + break + + default: + break + } + }) + .catch(e => e) + +export const arrayBufferFileLoader: FileLoaderFunction = props => + _fileLoader({ ...props, readerTypeFunction: 'arrayBuffer' }) + +export const dataURLFileLoader: FileLoaderFunction = props => + _fileLoader({ ...props, readerTypeFunction: 'dataURL' }) + +export const textFileLoader: FileLoaderFunction = props => + _fileLoader({ ...props, readerTypeFunction: 'text' }) + +export const binaryStringFileLoader: FileLoaderFunction = props => + _fileLoader({ ...props, readerTypeFunction: 'binaryString' }) + +export const defaultFileLoader = dataURLFileLoader diff --git a/shared/document/plugins/pdf/PDFSinglePage.tsx b/shared/document/plugins/pdf/PDFSinglePage.tsx index 095ffd5c364f901b7f28cd353b2a09f8f067d4b5..b45f611afb3eb8baa0f98b9b2c4ec8f3d86c1594 100644 --- a/shared/document/plugins/pdf/PDFSinglePage.tsx +++ b/shared/document/plugins/pdf/PDFSinglePage.tsx @@ -46,8 +46,4 @@ const PDFSinglePage: FC<Props> = ({ pageNum }) => { ) } -PDFSinglePage.defaultProps = { - pageNum: undefined, -} - export default PDFSinglePage diff --git a/shared/document/plugins/pdf/index.tsx b/shared/document/plugins/pdf/index.tsx index 3520abd8526022abe048c53a470d746b4c3576c0..94e29c746c8524d7b7196efd08f97704943a29dd 100644 --- a/shared/document/plugins/pdf/index.tsx +++ b/shared/document/plugins/pdf/index.tsx @@ -10,6 +10,7 @@ import 'react-pdf/dist/esm/Page/TextLayer.css' // @ts-expect-error import pdfWorker from 'pdfjs-dist/build/pdf.worker.min.js?url' +import { defaultFileLoader } from '../loaders' // this needs to be ignored, don't ask me why, typescript is just being a pain const container = css` @@ -36,3 +37,4 @@ export default PDFRenderer PDFRenderer.fileTypes = ['pdf', 'application/pdf'] PDFRenderer.weight = 0 +PDFRenderer.fileLoader = defaultFileLoader diff --git a/shared/document/plugins/txt/index.tsx b/shared/document/plugins/txt/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..33b7479e881f390461306c3b315fd9e50d587650 --- /dev/null +++ b/shared/document/plugins/txt/index.tsx @@ -0,0 +1,34 @@ +/* eslint-disable react/prop-types */ +import { Text } from '@blueprintjs/core' +import { type DocRenderer } from '@cyntler/react-doc-viewer' +import { css } from '@emotion/css' +import { textFileLoader } from '../loaders' + +const container = css` + display: flex; + flex-direction: column; + flex: 1; + overflow-y: auto; + gap: 1rem; + padding-left: 0.2rem; + margin-left: 1rem; + white-space: 'pre-line'; +` + +const TXTRenderer: DocRenderer = ({ mainState: { currentDocument } }) => { + const text = currentDocument?.fileData?.toString() + + return ( + <div id='txt-renderer' className={container}> + <Text style={{ whiteSpace: 'pre-line', fontFamily: 'monospace' }}> + {text} + </Text> + </div> + ) +} + +export default TXTRenderer + +TXTRenderer.fileTypes = ['txt', 'text/plain'] +TXTRenderer.weight = 0 +TXTRenderer.fileLoader = textFileLoader diff --git a/shared/document/viewer.tsx b/shared/document/viewer.tsx index 1d40dd9a70dc5ea90472b4b93a76de26745b1a12..e1f78c010340cfa62d56487eb327696cc000f037 100644 --- a/shared/document/viewer.tsx +++ b/shared/document/viewer.tsx @@ -1,21 +1,29 @@ -import { Button, ButtonGroup, Divider } from '@blueprintjs/core' +import { AnchorButton, Button, ButtonGroup, Divider } from '@blueprintjs/core' import type { IDocument } from '@cyntler/react-doc-viewer' import DocViewer, { BMPRenderer, GIFRenderer, - HTMLRenderer, JPGRenderer, PNGRenderer, TIFFRenderer, - TXTRenderer, VideoRenderer, } from '@cyntler/react-doc-viewer' import { css } from '@emotion/css' import { useEffect, useMemo, type FC } from 'react' import { useNavigate } from 'react-router-dom' +import { defaultFileLoader } from './plugins/loaders' import PDFRenderer from './plugins/pdf' +import TXTRenderer from './plugins/txt' import './viewer.global.css' +// this overrides default file loader with one that uses `csrfFetch`, it's a hack but it works +BMPRenderer.fileLoader = defaultFileLoader +GIFRenderer.fileLoader = defaultFileLoader +JPGRenderer.fileLoader = defaultFileLoader +PNGRenderer.fileLoader = defaultFileLoader +TIFFRenderer.fileLoader = defaultFileLoader +// TODO: yell at authors why it has to be so unhinged + interface DocViewerProps { doc: Required<Omit<IDocument, 'fileData'>> } @@ -48,7 +56,6 @@ const DocViewerComponent: FC<DocViewerProps> = ({ doc }) => { const plugins = useMemo( () => [ BMPRenderer, - HTMLRenderer, JPGRenderer, PDFRenderer, PNGRenderer, @@ -74,11 +81,14 @@ const DocViewerComponent: FC<DocViewerProps> = ({ doc }) => { Back </Button> <Divider /> - <a href={doc.uri} target='_blank' rel='noreferrer'> - <Button icon='import' type='button'> - Download - </Button> - </a> + <AnchorButton + icon='import' + href={doc.uri} + target='_blank' + rel='noreferrer' + > + Download + </AnchorButton> </ButtonGroup> </div> <DocViewer diff --git a/shared/localstorage/getKey.ts b/shared/localstorage/getKey.ts index d0e5b58d45a4f598f9a1600058e72205dc39f944..d1a5cfdba58e1924bb498ceaebbf839a554a3574 100644 --- a/shared/localstorage/getKey.ts +++ b/shared/localstorage/getKey.ts @@ -4,6 +4,12 @@ declare global { } } +/** + * Pushes an index to an associated key in the local storage. + * + * @param {string} index - The index to be pushed + * @param {string} key - The associated key + */ const pushToAssoc = (index: string, key: string) => { const assocKey = `$assoc#${key}` const assoc = JSON.parse(localStorage.getItem(assocKey) || '[]') as string[] @@ -14,6 +20,22 @@ const pushToAssoc = (index: string, key: string) => { localStorage.setItem(assocKey, JSON.stringify(assoc)) } +/** + * Generates a key based on the provided index and optional key. + * + * @param {string} index - The index value for the key + * @param {string} [_key] - An optional value setting the context for the key + * @returns {Promise<string>} A promise that resolves to the generated key + * + * If PREFIX_DISABLED is set in the window object, the function will return + * "!{index}". + * + * If a _key is provided, or there is a 'key' item in the localStorage, + * it will be used in the generation of the key. If neither is available, + * '!default' will be used. + * + * The generated key is then pushed to an associative array. + */ const getKey = async (index: string, _key?: string) => { if (window.PREFIX_DISABLED) { return `!${index}` diff --git a/shared/notification/NotificationDropdown.tsx b/shared/notification/NotificationDropdown.tsx index 6781926fb231ad2df3d6fc2fe5737b1163d2edc8..179b1873087c841a200a54ae39951967ccde1f78 100644 --- a/shared/notification/NotificationDropdown.tsx +++ b/shared/notification/NotificationDropdown.tsx @@ -16,17 +16,16 @@ interface NotificationDropdownProps { } const notificationBox = css` - height: 300px; - width: auto; + min-width: 24rem; + overflow: auto; display: grid; - grid-template-columns: 1fr; - grid-template-rows: auto max-content; - gap: 0.25rem; + grid-template-rows: 1fr auto; + gap: 0.5rem; ` const NotificationDropdown: FC<NotificationDropdownProps> = ({ hideLabel, - placement, + placement = 'bottom', fill, }) => { const value = useContext(NotificationListContext) @@ -81,7 +80,7 @@ const NotificationDropdown: FC<NotificationDropdownProps> = ({ alignText='left' fill={fill} minimal - text={!hideLabel && 'Notifications'} + text={hideLabel ? undefined : 'Notifications'} title='Notifications' onClick={() => setOpen(prev => !prev)} {...getReferenceProps} @@ -91,8 +90,4 @@ const NotificationDropdown: FC<NotificationDropdownProps> = ({ ) } -NotificationDropdown.defaultProps = { - placement: 'bottom', -} - export default NotificationDropdown diff --git a/shared/notification/README.md b/shared/notification/README.md deleted file mode 100644 index a848ca1b6f27b6bfa5686a2b84da34871dc5236d..0000000000000000000000000000000000000000 --- a/shared/notification/README.md +++ /dev/null @@ -1,18 +0,0 @@ -Notification Engine is a context-based stateful notification engine - -## Usage: - -To create a notification, first import the context component NotificationEngine via useContext hook and extract notify function from it. - -- Call `notify`, magic starts to happen. -- Notifications are stored in localStorage, allowing for persistent notifications. - -## Technical information: - -The component is intentionally a hack to reduce amount of re-renders occuring in the DOM tree. Naive implementation caused some ruckus. - -## Potential improvements: - -- Make Provider component take a storage key argument, to allow operation of multiple notification engines at once. -- Add temporary notifications into the workflow -- Give notifications a lifespan \ No newline at end of file diff --git a/shared/notification/toaster.ts b/shared/notification/toaster.ts index 8d2a38422472e85c826726d28d413bb0e506c8a2..8ee82bd6af16868e042453139c2c264c0d892a3e 100644 --- a/shared/notification/toaster.ts +++ b/shared/notification/toaster.ts @@ -9,7 +9,7 @@ const toast = css` const toaster = await OverlayToaster.createAsync( /* props */ { - position: 'bottom-right', + position: 'bottom', className: toast, }, { diff --git a/shared/notification/useNotificationStorage.ts b/shared/notification/useNotificationStorage.ts deleted file mode 100644 index 345301e1907bd2ad774489ac399db4e5be375a0b..0000000000000000000000000000000000000000 --- a/shared/notification/useNotificationStorage.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { useLocalStorageState } from 'ahooks' -import type { NotificationProps } from './typing' - -const KEY: string = 'notificationLimit' -const DEFAULT_LIMIT: string = '10' -const notificationLimit = () => - Number(localStorage.getItem(KEY) || DEFAULT_LIMIT) - -const useNotificationStorage = () => - useLocalStorageState<NotificationProps[]>('notifications', { - defaultValue: [], - serializer: value => JSON.stringify(value.slice(-notificationLimit())), - deserializer: localValue => - (JSON.parse(localValue) as NotificationProps[]).slice( - -notificationLimit() - ), - }) - -export default useNotificationStorage diff --git a/shared/package.json b/shared/package.json index 593370a71a9dd164c037f2d4a1022297ffd22f04..8dae8b340afec777aed7e39a44aed556db36db0b 100644 --- a/shared/package.json +++ b/shared/package.json @@ -3,6 +3,7 @@ "version": "0.3.0", "description": "Top-Level library for shared code between the client modules and graphql", "main": "index.js", + "license": "MIT", "devDependencies": { "@types/lodash": "4.17.0", "@types/react": "18.2.66", @@ -15,12 +16,12 @@ "@emotion/css": "11.11.2", "@emotion/react": "^11.11.4", "@floating-ui/react": "0.26.9", - "ahooks": "3.7.10", + "ahooks": "3.8.0", "lodash": "4.17.21", "normalize.css": "8.0.1", "pdfjs-dist": "3.11.174", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "react-pdf": "7.7.1", "react-router-dom": "6.22.3" } diff --git a/shared/popover/PopoverContainer/index.tsx b/shared/popover/PopoverContainer/index.tsx index 2a36fa659bdce0d3a71348135a32c56901b2142c..b9434c207b6734aa25206176c131e4f697ccf2e8 100644 --- a/shared/popover/PopoverContainer/index.tsx +++ b/shared/popover/PopoverContainer/index.tsx @@ -1,3 +1,4 @@ +import { Classes } from '@blueprintjs/core' import { css } from '@emotion/css' import type { PropsWithChildren } from 'react' import { forwardRef } from 'react' @@ -9,10 +10,10 @@ const popover = css` box-shadow: 0 0 0.125rem rgba(0, 0, 0, 0.5); max-height: 20rem; overflow-y: auto; - min-width: 24rem; + display: flex; min-height: 3rem; - .bp5-dark & { + .${Classes.DARK} & { background-color: #2f343c; box-shadow: 0 0 0.125rem rgba(255, 255, 255, 0.5); } diff --git a/shared/popover/usePopoverElement/index.tsx b/shared/popover/usePopoverElement/index.tsx index 9a212a8d05b3454c2ba89d9b5574a58500867aa2..738970d6a4d9bffe32e907f87afae8f316876e99 100644 --- a/shared/popover/usePopoverElement/index.tsx +++ b/shared/popover/usePopoverElement/index.tsx @@ -20,13 +20,14 @@ interface PopoverProps { const float = css` z-index: 9999; box-shadow: 0 0 0.75rem 0.25rem rgba(141, 141, 141, 0.25); + max-width: min(95vw, 30rem); &:focus { outline: none; } ` const usePopoverElement = ({ - placement, + placement = 'bottom', open, setOpen, children, @@ -63,8 +64,4 @@ const usePopoverElement = ({ } } -usePopoverElement.defaultProps = { - placement: 'bottom', -} - export default usePopoverElement diff --git a/shared/popup/PopupEngine.tsx b/shared/popup/PopupEngine.tsx index 2dc661bf49137988ed20ee7bcb1ea2487af81182..a6571d2e99f8899b8d4812a4f693150aaa0d90e1 100644 --- a/shared/popup/PopupEngine.tsx +++ b/shared/popup/PopupEngine.tsx @@ -1,6 +1,7 @@ import { Button, Dialog, DialogBody, DialogFooter } from '@blueprintjs/core' import type { PropsWithChildren, ReactNode } from 'react' import { useCallback, useEffect, useMemo, useState } from 'react' +import { dialogBody, maximizedDialog } from '../css/dialog' import { PopupProvider } from './PopupContext' import type { PopupContextProps, ShowPopupFunction } from './typing' @@ -68,11 +69,12 @@ const PopupEngine = ({ children }: PropsWithChildren) => { <> {queue.length > 0 && ( <Dialog + className={maximizedDialog} isOpen={isOpen} canEscapeKeyClose={false} canOutsideClickClose={false} > - <DialogBody>{queue[0][1]}</DialogBody> + <DialogBody className={dialogBody}>{queue[0][1]}</DialogBody> <DialogFooter actions={ <Button text='Close' intent='primary' onClick={handleClose} /> diff --git a/tests/LICENSE b/tests/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..a302d48edaa23b100d408dd376fac106e4f39262 --- /dev/null +++ b/tests/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright 2024 Masaryk University + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tests/graphql/testSanitize.test.ts b/tests/graphql/testSanitize.test.ts new file mode 100644 index 0000000000000000000000000000000000000000..30223c6256f60bceefa79e6afacb2418072cd113 --- /dev/null +++ b/tests/graphql/testSanitize.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, test } from "@jest/globals"; +import { sanitizeHtmlCustom } from '@inject/graphql/client/sanitize' + +describe('test various edge cases', () => { + const baseURI = ('http://localhost/exercise_panel') + test('test if relative tags are allowed', () => { + const html = '<img src="http://localhost:8000/inject/api/v1/running_exercise/37/e443e6c3-c8c3-4623-af12-a315b93ed8ff?instructor" />' + expect(sanitizeHtmlCustom(html, baseURI)).toStrictEqual(html) + }) + test('test if absolute tags are not allowed, aka they point to foreign origins', () => { + const logSpy = jest.spyOn(global.console, 'error'); + const html = '<img src="https://www.simplilearn.com/ice9/free_resources_article_thumb/what_is_image_Processing.jpg" />' + expect(sanitizeHtmlCustom(html, baseURI)).toStrictEqual('') + expect(logSpy).toHaveBeenCalled() + logSpy.mockRestore() + }) +}) \ No newline at end of file diff --git a/tests/package.json b/tests/package.json index 95937fd3f51086fa8ce0053b15dab073bc1c858c..09f8b8e789b71bf421720565f7e5235b17464407 100644 --- a/tests/package.json +++ b/tests/package.json @@ -29,8 +29,8 @@ "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.1", "graphql": "16.8.1", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "ts-jest": "29.1.2" } } diff --git a/yarn.lock b/yarn.lock index 75037aeb7e5b1bf8f3f3c080c0ad59ac484e7b90..8f3569b3cde2784b2ec4fe0dda0b307edddeac22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -478,21 +478,21 @@ __metadata: languageName: node linkType: hard -"@blueprintjs/colors@npm:5.1.0": - version: 5.1.0 - resolution: "@blueprintjs/colors@npm:5.1.0" +"@blueprintjs/colors@npm:5.1.1": + version: 5.1.1 + resolution: "@blueprintjs/colors@npm:5.1.1" dependencies: tslib: "npm:~2.6.2" - checksum: 10c0/0509ee0b0ea1b44910575bb8abf129096fc8bd4ce7e65d86896319624d66e60966779dcef1dc3d5254e2836a11d253794b33e095a748f47675cb079feae1446a + checksum: 10c0/213c00ddc8720896451ec41de5e339e9f3acee9f3657e83f71daa4277a7bb7facb3fd96ef0b8793fcbac860731d662ee8a60528a161742c604ad4d2fe25872ba languageName: node linkType: hard -"@blueprintjs/core@npm:5.10.0": - version: 5.10.0 - resolution: "@blueprintjs/core@npm:5.10.0" +"@blueprintjs/core@npm:5.10.4": + version: 5.10.4 + resolution: "@blueprintjs/core@npm:5.10.4" dependencies: "@blueprintjs/colors": "npm:^5.1.1" - "@blueprintjs/icons": "npm:^5.8.0" + "@blueprintjs/icons": "npm:^5.10.0" "@popperjs/core": "npm:^2.11.8" classnames: "npm:^2.3.1" normalize.css: "npm:^8.0.1" @@ -511,13 +511,13 @@ __metadata: bin: upgrade-blueprint-2.0.0-rename: scripts/upgrade-blueprint-2.0.0-rename.sh upgrade-blueprint-3.0.0-rename: scripts/upgrade-blueprint-3.0.0-rename.sh - checksum: 10c0/67c12b6668b6f536b74a2ae63c2b30f6eebb1f3ee2b529f3939a1e4c935aff6733705b9e4e022279357b82af2de1d3b357e2732e44061d61e771331ff77a53f4 + checksum: 10c0/3c136e0167adc32442368d0a12dbb7cf57ad5dfa07715bd8280df45d0357380bb9368325073ae7560d3edaf5e6c687496a51e500d13e8e10d406f7329ec64b78 languageName: node linkType: hard -"@blueprintjs/icons@npm:5.8.0": - version: 5.8.0 - resolution: "@blueprintjs/icons@npm:5.8.0" +"@blueprintjs/icons@npm:5.10.0": + version: 5.10.0 + resolution: "@blueprintjs/icons@npm:5.10.0" dependencies: change-case: "npm:^4.1.2" classnames: "npm:^2.3.1" @@ -529,16 +529,16 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/dc1c527c290d29f10d66bcfbc39e7a7742a43f78466405f70f5c8416f6576adf95796f01a23ccbeedc49a67162abd45b09a399ff59eb3c82ef4a6ec4bb90c023 + checksum: 10c0/6de8ca760bd39ab79ac6217305ed54f389a40a761eb6a29a1f3079a76c99b6274572107567da7c277bdd1d4d5188a7e10f20c907770e25d17de8c1b9c8d94c9a languageName: node linkType: hard -"@blueprintjs/select@npm:5.1.2": - version: 5.1.2 - resolution: "@blueprintjs/select@npm:5.1.2" +"@blueprintjs/select@npm:5.2.0": + version: 5.2.0 + resolution: "@blueprintjs/select@npm:5.2.0" dependencies: - "@blueprintjs/core": "npm:^5.10.0" - "@blueprintjs/icons": "npm:^5.8.0" + "@blueprintjs/core": "npm:^5.10.4" + "@blueprintjs/icons": "npm:^5.10.0" classnames: "npm:^2.3.1" tslib: "npm:~2.6.2" peerDependencies: @@ -548,7 +548,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/b74ac8f155836504a7240d25f81d7a30201a59ca879245dd59511821d87d6125f28dec4b25d409f3c0b262428217d68a8e113a467c7a032f52fbefa2c84b0dfd + checksum: 10c0/abf93fe596b1208277cfa54f666ac83486cd6e70b8eefbb424a07d99f705e73089a701c2a5fe33b9bab2f2e2ee8742a0159eb260e8158fa2389ebfbbb0cab7e7 languageName: node linkType: hard @@ -988,6 +988,13 @@ __metadata: languageName: node linkType: hard +"@fontsource/inter@npm:^5.0.18": + version: 5.0.18 + resolution: "@fontsource/inter@npm:5.0.18" + checksum: 10c0/87863160b18a3a2b2cc0b2949b41b4072f422efb672f183a8fa2ae19bd803da18ec24a65344c42c1686c73e1b65bb4a7cd64ce5c0f015872c5f5dcba4e64bf92 + languageName: node + linkType: hard + "@generouted/react-router@npm:1.18.5": version: 1.18.5 resolution: "@generouted/react-router@npm:1.18.5" @@ -1143,11 +1150,13 @@ __metadata: version: 0.0.0-use.local resolution: "@inject/frontend@workspace:frontend" dependencies: + "@blueprintjs/colors": "npm:^5.1.1" "@blueprintjs/core": "npm:*" "@blueprintjs/icons": "npm:*" "@blueprintjs/select": "npm:*" "@emotion/css": "npm:11.11.2" "@emotion/react": "npm:^11.11.4" + "@fontsource/inter": "npm:^5.0.18" "@generouted/react-router": "npm:1.18.5" "@graphiql/toolkit": "npm:^0.9.1" "@inject/graphql": "workspace:graphql" @@ -1167,7 +1176,7 @@ __metadata: "@types/react": "npm:18.2.66" "@types/react-dom": "npm:18.2.22" "@vitejs/plugin-react-swc": "npm:3.6.0" - ahooks: "npm:3.7.10" + ahooks: "npm:3.8.0" d3-array: "npm:^3.2.4" d3-axis: "npm:^3.0.0" d3-brush: "npm:^3.0.0" @@ -1184,10 +1193,12 @@ __metadata: lightningcss: "npm:^1.24.1" lodash: "npm:4.17.21" normalize.css: "npm:8.0.1" - react: "npm:18.2.0" - react-dom: "npm:18.2.0" + react: "npm:18.3.1" + react-dom: "npm:18.3.1" react-router-dom: "npm:6.22.3" + rollup-plugin-license: "npm:^3.4.0" rollup-plugin-visualizer: "npm:5.12.0" + sass: "npm:1.70.0" save-svg-as-png: "npm:^1.4.17" terser: "npm:^5.29.2" typescript: "npm:5.3.2" @@ -1210,14 +1221,16 @@ __metadata: "@types/lodash": "npm:4.17.0" "@types/react": "npm:18.2.66" "@types/react-dom": "npm:18.2.22" - ahooks: "npm:3.7.10" + "@types/sanitize-html": "npm:^2.11.0" + ahooks: "npm:3.8.0" dotenv: "npm:16.4.5" graphql: "npm:16.8.1" graphql-tag: "npm:2.12.6" lodash: "npm:4.17.21" - react: "npm:18.2.0" + react: "npm:18.3.1" react-apollo-network-status: "npm:5.2.1" - react-dom: "npm:18.2.0" + react-dom: "npm:18.3.1" + sanitize-html: "npm:^2.13.0" subscriptions-transport-ws: "npm:0.11.0" languageName: unknown linkType: soft @@ -1235,12 +1248,12 @@ __metadata: "@types/lodash": "npm:4.17.0" "@types/react": "npm:18.2.66" "@types/react-dom": "npm:18.2.22" - ahooks: "npm:3.7.10" + ahooks: "npm:3.8.0" lodash: "npm:4.17.21" normalize.css: "npm:8.0.1" pdfjs-dist: "npm:3.11.174" - react: "npm:18.2.0" - react-dom: "npm:18.2.0" + react: "npm:18.3.1" + react-dom: "npm:18.3.1" react-pdf: "npm:7.7.1" react-router-dom: "npm:6.22.3" languageName: unknown @@ -1267,8 +1280,8 @@ __metadata: jest: "npm:29.7.0" jest-environment-jsdom: "npm:^29.7.0" jest-fetch-mock: "npm:^3.0.3" - react: "npm:18.2.0" - react-dom: "npm:18.2.0" + react: "npm:18.3.1" + react-dom: "npm:18.3.1" ts-jest: "npm:29.1.2" ts-node: "npm:11.0.0-beta.1" typescript: "npm:5.3.2" @@ -1574,7 +1587,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": version: 1.4.15 resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" checksum: 10c0/0c6b5ae663087558039052a626d2d7ed5208da36cfd707dcc5cea4a07cfc918248403dcb5989a8f7afaf245ce0573b7cc6fd94c4a30453bd10e44d9363940ba5 @@ -3371,6 +3384,15 @@ __metadata: languageName: node linkType: hard +"@types/sanitize-html@npm:^2.11.0": + version: 2.11.0 + resolution: "@types/sanitize-html@npm:2.11.0" + dependencies: + htmlparser2: "npm:^8.0.0" + checksum: 10c0/6b559184b4c9d86f7ad067288c59f7fd1d88aa4832e627f5c2174c99aafe697583cde0d0c279ab8cb92993b84eb7e7658508c3454e4d8b455cc4adcee758183e + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.23.0 resolution: "@types/scheduler@npm:0.23.0" @@ -3828,21 +3850,22 @@ __metadata: languageName: node linkType: hard -"ahooks@npm:3.7.10": - version: 3.7.10 - resolution: "ahooks@npm:3.7.10" +"ahooks@npm:3.8.0": + version: 3.8.0 + resolution: "ahooks@npm:3.8.0" dependencies: "@babel/runtime": "npm:^7.21.0" dayjs: "npm:^1.9.1" intersection-observer: "npm:^0.12.0" js-cookie: "npm:^2.x.x" lodash: "npm:^4.17.21" + react-fast-compare: "npm:^3.2.2" resize-observer-polyfill: "npm:^1.5.1" screenfull: "npm:^5.0.0" tslib: "npm:^2.4.1" peerDependencies: react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10c0/d4e18fab556a99147c396403be5db74f111f8127f3376128f4b28c57d2b615d716218c4972c003a17cf559ac21f2b6e09857d8e0bf7bc8584947f00cec8f7d78 + checksum: 10c0/28344a10443a1374066d931ac687e8f18f714717c32fc4c12b5fea1d0b29b9dfbddd5e9943df2394dd7912440e474413d899e1a2877bf80093fbe8f1c3b5ea58 languageName: node linkType: hard @@ -3913,7 +3936,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.3": +"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -4000,6 +4023,13 @@ __metadata: languageName: node linkType: hard +"array-find-index@npm:^1.0.2": + version: 1.0.2 + resolution: "array-find-index@npm:1.0.2" + checksum: 10c0/86b9485c74ddd324feab807e10a6de3f9c1683856267236fac4bb4d4667ada6463e106db3f6c540ae6b720e0442b590ec701d13676df4c6af30ebf4da09b4f57 + languageName: node + linkType: hard + "array-includes@npm:^3.1.6, array-includes@npm:^3.1.7": version: 3.1.8 resolution: "array-includes@npm:3.1.8" @@ -4217,6 +4247,13 @@ __metadata: languageName: node linkType: hard +"binary-extensions@npm:^2.0.0": + version: 2.3.0 + resolution: "binary-extensions@npm:2.3.0" + checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 + languageName: node + linkType: hard + "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -4245,6 +4282,15 @@ __metadata: languageName: node linkType: hard +"braces@npm:~3.0.2": + version: 3.0.3 + resolution: "braces@npm:3.0.3" + dependencies: + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 + languageName: node + linkType: hard + "browserslist@npm:^4.22.2": version: 4.23.0 resolution: "browserslist@npm:4.23.0" @@ -4465,6 +4511,25 @@ __metadata: languageName: node linkType: hard +"chokidar@npm:>=3.0.0 <4.0.0": + version: 3.6.0 + resolution: "chokidar@npm:3.6.0" + dependencies: + anymatch: "npm:~3.1.2" + braces: "npm:~3.0.2" + fsevents: "npm:~2.3.2" + glob-parent: "npm:~5.1.2" + is-binary-path: "npm:~2.1.0" + is-glob: "npm:~4.0.1" + normalize-path: "npm:~3.0.0" + readdirp: "npm:~3.6.0" + dependenciesMeta: + fsevents: + optional: true + checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -4644,6 +4709,13 @@ __metadata: languageName: node linkType: hard +"commenting@npm:~1.1.0": + version: 1.1.0 + resolution: "commenting@npm:1.1.0" + checksum: 10c0/23f9ecb680b561bdd3dba6c9aada0636e42e8804073b623175e6e58bea77d12fcacc6979b009ac5c5a7c8b82590c64d87296827641bf5ac31dd900617b1b84e7 + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -5302,6 +5374,24 @@ __metadata: languageName: node linkType: hard +"dom-serializer@npm:^2.0.0": + version: 2.0.0 + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.2" + entities: "npm:^4.2.0" + checksum: 10c0/d5ae2b7110ca3746b3643d3ef60ef823f5f078667baf530cec096433f1627ec4b6fa8c072f09d079d7cda915fd2c7bc1b7b935681e9b09e591e1e15f4040b8e2 + languageName: node + linkType: hard + +"domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 10c0/686f5a9ef0fff078c1412c05db73a0dce096190036f33e400a07e2a4518e9f56b1e324f5c576a0a747ef0e75b5d985c040b0d51945ce780c0dd3c625a18cd8c9 + languageName: node + linkType: hard + "domexception@npm:^4.0.0": version: 4.0.0 resolution: "domexception@npm:4.0.0" @@ -5311,6 +5401,26 @@ __metadata: languageName: node linkType: hard +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" + dependencies: + domelementtype: "npm:^2.3.0" + checksum: 10c0/bba1e5932b3e196ad6862286d76adc89a0dbf0c773e5ced1eb01f9af930c50093a084eff14b8de5ea60b895c56a04d5de8bbc4930c5543d029091916770b2d2a + languageName: node + linkType: hard + +"domutils@npm:^3.0.1": + version: 3.1.0 + resolution: "domutils@npm:3.1.0" + dependencies: + dom-serializer: "npm:^2.0.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + checksum: 10c0/342d64cf4d07b8a0573fb51e0a6312a88fb520c7fefd751870bf72fa5fc0f2e0cb9a3958a573610b1d608c6e2a69b8e9b4b40f0bfb8f87a71bce4f180cca1887 + languageName: node + linkType: hard + "dot-case@npm:^3.0.4": version: 3.0.4 resolution: "dot-case@npm:3.0.4" @@ -5381,7 +5491,7 @@ __metadata: languageName: node linkType: hard -"entities@npm:^4.4.0": +"entities@npm:^4.2.0, entities@npm:^4.4.0": version: 4.5.0 resolution: "entities@npm:4.5.0" checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 @@ -5988,6 +6098,15 @@ __metadata: languageName: node linkType: hard +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" + dependencies: + to-regex-range: "npm:^5.0.1" + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 + languageName: node + linkType: hard + "find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" @@ -6257,7 +6376,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2": +"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -6290,7 +6409,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:^7.1.3, glob@npm:^7.1.4": +"glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:~7.2.0": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -6558,6 +6677,18 @@ __metadata: languageName: node linkType: hard +"htmlparser2@npm:^8.0.0": + version: 8.0.2 + resolution: "htmlparser2@npm:8.0.2" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.0.1" + entities: "npm:^4.4.0" + checksum: 10c0/609cca85886d0bf2c9a5db8c6926a89f3764596877492e2caa7a25a789af4065bc6ee2cdc81807fe6b1d03a87bf8a373b5a754528a4cc05146b713c20575aab4 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -6639,6 +6770,13 @@ __metadata: languageName: node linkType: hard +"immutable@npm:^4.0.0": + version: 4.3.6 + resolution: "immutable@npm:4.3.6" + checksum: 10c0/7d0952a768b4fadcee47230ed86dc9505a4517095eceaf5a47e65288571c42400c6e4a2ae21eca4eda957cb7bc50720213135b62cf6a181639111f8acae128c3 + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -6712,6 +6850,9 @@ __metadata: prettier-plugin-organize-imports: "npm:^3.2.4" typescript: "npm:5.3.2" typescript-eslint: "npm:^7.2.0" + dependenciesMeta: + prettier-plugin-organize-imports@3.2.4: + unplugged: true languageName: unknown linkType: soft @@ -6804,6 +6945,15 @@ __metadata: languageName: node linkType: hard +"is-binary-path@npm:~2.1.0": + version: 2.1.0 + resolution: "is-binary-path@npm:2.1.0" + dependencies: + binary-extensions: "npm:^2.0.0" + checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 + languageName: node + linkType: hard + "is-boolean-object@npm:^1.1.0": version: 1.1.2 resolution: "is-boolean-object@npm:1.1.2" @@ -6896,7 +7046,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -6958,6 +7108,13 @@ __metadata: languageName: node linkType: hard +"is-plain-object@npm:^5.0.0": + version: 5.0.0 + resolution: "is-plain-object@npm:5.0.0" + checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c + languageName: node + linkType: hard + "is-potential-custom-element-name@npm:^1.0.1": version: 1.0.1 resolution: "is-potential-custom-element-name@npm:1.0.1" @@ -7985,7 +8142,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.21": +"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.21, lodash@npm:~4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c @@ -8053,6 +8210,15 @@ __metadata: languageName: node linkType: hard +"magic-string@npm:~0.30.0": + version: 0.30.10 + resolution: "magic-string@npm:0.30.10" + dependencies: + "@jridgewell/sourcemap-codec": "npm:^1.4.15" + checksum: 10c0/aa9ca17eae571a19bce92c8221193b6f93ee8511abb10f085e55ffd398db8e4c089a208d9eac559deee96a08b7b24d636ea4ab92f09c6cf42a7d1af51f7fd62b + languageName: node + linkType: hard + "make-cancellable-promise@npm:^1.3.1": version: 1.3.2 resolution: "make-cancellable-promise@npm:1.3.2" @@ -8353,6 +8519,22 @@ __metadata: languageName: node linkType: hard +"mkdirp@npm:~3.0.0": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d + languageName: node + linkType: hard + +"moment@npm:~2.30.1": + version: 2.30.1 + resolution: "moment@npm:2.30.1" + checksum: 10c0/865e4279418c6de666fca7786607705fd0189d8a7b7624e2e56be99290ac846f90878a6f602e34b4e0455c549b85385b1baf9966845962b313699e7cb847543a + languageName: node + linkType: hard + "ms@npm:2.1.2": version: 2.1.2 resolution: "ms@npm:2.1.2" @@ -8488,7 +8670,7 @@ __metadata: languageName: node linkType: hard -"normalize-path@npm:^3.0.0": +"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 @@ -8746,6 +8928,13 @@ __metadata: languageName: node linkType: hard +"package-name-regex@npm:~2.0.6": + version: 2.0.6 + resolution: "package-name-regex@npm:2.0.6" + checksum: 10c0/f0d2446983d9e4fcd21e983a38b30d5d4728f7e3613392c455ba00e3b6ddfbde12b91955c8f4e15a7f72851bd619af4832313eae4b52aedb88cf84024a5224a3 + languageName: node + linkType: hard + "papaparse@npm:^5.4.1": version: 5.4.1 resolution: "papaparse@npm:5.4.1" @@ -8784,6 +8973,13 @@ __metadata: languageName: node linkType: hard +"parse-srcset@npm:^1.0.2": + version: 1.0.2 + resolution: "parse-srcset@npm:1.0.2" + checksum: 10c0/2f268e3d110d4c53d06ed2a8e8ee61a7da0cee13bf150819a6da066a8ca9b8d15b5600d6e6cae8be940e2edc50ee7c1e1052934d6ec858324065ecef848f0497 + languageName: node + linkType: hard + "parse5@npm:^7.0.0, parse5@npm:^7.1.1": version: 7.1.2 resolution: "parse5@npm:7.1.2" @@ -8887,7 +9083,14 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": +"picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 + languageName: node + linkType: hard + +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be @@ -8947,6 +9150,17 @@ __metadata: languageName: node linkType: hard +"postcss@npm:^8.3.11": + version: 8.4.39 + resolution: "postcss@npm:8.4.39" + dependencies: + nanoid: "npm:^3.3.7" + picocolors: "npm:^1.0.1" + source-map-js: "npm:^1.2.0" + checksum: 10c0/16f5ac3c4e32ee76d1582b3c0dcf1a1fdb91334a45ad755eeb881ccc50318fb8d64047de4f1601ac96e30061df203f0f2e2edbdc0bfc49b9c57bc9fb9bedaea3 + languageName: node + linkType: hard + "postcss@npm:^8.4.27": version: 8.4.38 resolution: "postcss@npm:8.4.38" @@ -9128,15 +9342,15 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:18.2.0": - version: 18.2.0 - resolution: "react-dom@npm:18.2.0" +"react-dom@npm:18.3.1": + version: 18.3.1 + resolution: "react-dom@npm:18.3.1" dependencies: loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.0" + scheduler: "npm:^0.23.2" peerDependencies: - react: ^18.2.0 - checksum: 10c0/66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a + react: ^18.3.1 + checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85 languageName: node linkType: hard @@ -9151,7 +9365,7 @@ __metadata: languageName: node linkType: hard -"react-fast-compare@npm:^3.0.1": +"react-fast-compare@npm:^3.0.1, react-fast-compare@npm:^3.2.2": version: 3.2.2 resolution: "react-fast-compare@npm:3.2.2" checksum: 10c0/0bbd2f3eb41ab2ff7380daaa55105db698d965c396df73e6874831dbafec8c4b5b08ba36ff09df01526caa3c61595247e3269558c284e37646241cba2b90a367 @@ -9346,12 +9560,12 @@ __metadata: languageName: node linkType: hard -"react@npm:18.2.0": - version: 18.2.0 - resolution: "react@npm:18.2.0" +"react@npm:18.3.1": + version: 18.3.1 + resolution: "react@npm:18.3.1" dependencies: loose-envify: "npm:^1.1.0" - checksum: 10c0/b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8 + checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3 languageName: node linkType: hard @@ -9366,6 +9580,15 @@ __metadata: languageName: node linkType: hard +"readdirp@npm:~3.6.0": + version: 3.6.0 + resolution: "readdirp@npm:3.6.0" + dependencies: + picomatch: "npm:^2.2.1" + checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b + languageName: node + linkType: hard + "redent@npm:^3.0.0": version: 3.0.0 resolution: "redent@npm:3.0.0" @@ -9576,6 +9799,25 @@ __metadata: languageName: node linkType: hard +"rollup-plugin-license@npm:^3.4.0": + version: 3.4.0 + resolution: "rollup-plugin-license@npm:3.4.0" + dependencies: + commenting: "npm:~1.1.0" + glob: "npm:~7.2.0" + lodash: "npm:~4.17.21" + magic-string: "npm:~0.30.0" + mkdirp: "npm:~3.0.0" + moment: "npm:~2.30.1" + package-name-regex: "npm:~2.0.6" + spdx-expression-validate: "npm:~2.0.0" + spdx-satisfies: "npm:~5.0.1" + peerDependencies: + rollup: ^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + checksum: 10c0/c363fc7cdce7125462c75e309cf7b82bbf6f9f8b2ab8f2d46b042e1483d49eba99d781bde4be75ddd197c83d3653bd31ba5ba4b7927b4904cde61518cca25543 + languageName: node + linkType: hard + "rollup-plugin-visualizer@npm:5.12.0": version: 5.12.0 resolution: "rollup-plugin-visualizer@npm:5.12.0" @@ -9655,6 +9897,33 @@ __metadata: languageName: node linkType: hard +"sanitize-html@npm:^2.13.0": + version: 2.13.0 + resolution: "sanitize-html@npm:2.13.0" + dependencies: + deepmerge: "npm:^4.2.2" + escape-string-regexp: "npm:^4.0.0" + htmlparser2: "npm:^8.0.0" + is-plain-object: "npm:^5.0.0" + parse-srcset: "npm:^1.0.2" + postcss: "npm:^8.3.11" + checksum: 10c0/2a83f7dae19ba60c25b928708538e53bc9b6278e04a6107e162369d9ae06c0ac5f5a7236d24b38a716b19c67bfac137daf4645be145800c199533db7da40ca0d + languageName: node + linkType: hard + +"sass@npm:1.70.0": + version: 1.70.0 + resolution: "sass@npm:1.70.0" + dependencies: + chokidar: "npm:>=3.0.0 <4.0.0" + immutable: "npm:^4.0.0" + source-map-js: "npm:>=0.6.2 <2.0.0" + bin: + sass: sass.js + checksum: 10c0/7c309ee1c096d591746d122da9f1ebd65b4c4b3a60c2cc0ec720fd98fe1205fa8b44c9f563d113b9fdfeb25af1e32ec9b3e048bd4b8e05d267f020953bd7baf0 + languageName: node + linkType: hard + "save-svg-as-png@npm:^1.4.17": version: 1.4.17 resolution: "save-svg-as-png@npm:1.4.17" @@ -9671,12 +9940,12 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.0": - version: 0.23.0 - resolution: "scheduler@npm:0.23.0" +"scheduler@npm:^0.23.2": + version: 0.23.2 + resolution: "scheduler@npm:0.23.2" dependencies: loose-envify: "npm:^1.1.0" - checksum: 10c0/b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd + checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78 languageName: node linkType: hard @@ -9880,7 +10149,7 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": +"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.0": version: 1.2.0 resolution: "source-map-js@npm:1.2.0" checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 @@ -9928,6 +10197,68 @@ __metadata: languageName: node linkType: hard +"spdx-compare@npm:^1.0.0": + version: 1.0.0 + resolution: "spdx-compare@npm:1.0.0" + dependencies: + array-find-index: "npm:^1.0.2" + spdx-expression-parse: "npm:^3.0.0" + spdx-ranges: "npm:^2.0.0" + checksum: 10c0/39d584129b00eaf0bb314984e5d662e511980c1fc6c4eb1d80677044a7b2b9cc3f84f6838695cf988807bf81ea0fce7438e33b0ee54fa87d302635bd143b7fc7 + languageName: node + linkType: hard + +"spdx-exceptions@npm:^2.1.0": + version: 2.5.0 + resolution: "spdx-exceptions@npm:2.5.0" + checksum: 10c0/37217b7762ee0ea0d8b7d0c29fd48b7e4dfb94096b109d6255b589c561f57da93bf4e328c0290046115961b9209a8051ad9f525e48d433082fc79f496a4ea940 + languageName: node + linkType: hard + +"spdx-expression-parse@npm:^3.0.0": + version: 3.0.1 + resolution: "spdx-expression-parse@npm:3.0.1" + dependencies: + spdx-exceptions: "npm:^2.1.0" + spdx-license-ids: "npm:^3.0.0" + checksum: 10c0/6f8a41c87759fa184a58713b86c6a8b028250f158159f1d03ed9d1b6ee4d9eefdc74181c8ddc581a341aa971c3e7b79e30b59c23b05d2436d5de1c30bdef7171 + languageName: node + linkType: hard + +"spdx-expression-validate@npm:~2.0.0": + version: 2.0.0 + resolution: "spdx-expression-validate@npm:2.0.0" + dependencies: + spdx-expression-parse: "npm:^3.0.0" + checksum: 10c0/fd1e8555e034be72c3a52bd306d04e6035e5d257bea6d39a77d391d236700d32a4647bd1391fc1eaa50c22a67aba6d1004a7569af02e499c8a3afda0bcdb6144 + languageName: node + linkType: hard + +"spdx-license-ids@npm:^3.0.0": + version: 3.0.18 + resolution: "spdx-license-ids@npm:3.0.18" + checksum: 10c0/c64ba03d4727191c8fdbd001f137d6ab51386c350d5516be8a4576c2e74044cb27bc8a758f6a04809da986cc0b14213f069b04de72caccecbc9f733753ccde32 + languageName: node + linkType: hard + +"spdx-ranges@npm:^2.0.0": + version: 2.1.1 + resolution: "spdx-ranges@npm:2.1.1" + checksum: 10c0/2d6bf9ec8e0f509c1a119361ff784f0bfa8ebbd8cfbc8e10f79579def54af060bb5058b36372f19770e659051082c451145c1284d2980419a720675accdb4a3d + languageName: node + linkType: hard + +"spdx-satisfies@npm:~5.0.1": + version: 5.0.1 + resolution: "spdx-satisfies@npm:5.0.1" + dependencies: + spdx-compare: "npm:^1.0.0" + spdx-expression-parse: "npm:^3.0.0" + spdx-ranges: "npm:^2.0.0" + checksum: 10c0/47bf163108e64fe4c179a5e2f8dc5fd4ece1665739fc61eae3157a9d4b9b2eb389df7f645223192557659155dda9071ceaa3dfd06ecab65cc3862032c20f2e61 + languageName: node + linkType: hard + "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3"