diff --git a/CHANGELOG.md b/CHANGELOG.md index 279b728d1bacb8acb8771c9314a271ee984ee1bb..515398cedc6fb97b98fe4f8145d02408f15c0f39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ 2024-05-07 - improve new email highlighting +2024-05-07 - add exercise name, rework exercise panel add dialogs +2024-05-07 - add learning objectives page to the instructor view 2024-05-07 - change the tab icon to the INJECT logo 2024-05-03 - improve Codegen pipeline and separate it from the codebase 2024-04-21 - improvements to the login UI, onboarding UI, added support for disabling AAI diff --git a/INSTALLATION.md b/INSTALLATION.md new file mode 100644 index 0000000000000000000000000000000000000000..7975394bddff85e77469c944a703471feea71fa3 --- /dev/null +++ b/INSTALLATION.md @@ -0,0 +1,21 @@ +### Docker deployment + +The repository has a prepared Dockerfile so you can build the image: + +``` +docker build . -t inject-fe +``` + +Run the following command to deploy the docker container: + +``` +docker run -p 80:80 inject-fe +``` + +During runtime of the container it's required to bind the container to a given `backend` instance: + +``` +docker run -p 80:80 -e VITE_HTTP_HOST=secure-be.inject.muni.cz -e VITE_HTTP_WS=wss://secure-be.inject.muni.cz/ttxbackend/v1/graphql inject-fe +``` + +Please keep in mind that changing environment variables requires restarting the container if done during runtime. \ No newline at end of file diff --git a/README.md b/README.md index 399c3e50bc38a3808b1ade53a8b4d391717b1e33..91b199b172af4f7c054e41f6a9ba643d10d8f92c 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,7 @@ Subrepos: ## How to run -Install Node 20 LTS, Yarn, Python 3.8 - +To ensure the frontend application functions properly, it's necessary to have a backend instance up and running. Follow these steps to run the backend application: ``` # https://stackoverflow.com/questions/16773642/pull-git-submodules-after-cloning-project-from-github git submodule update --init @@ -24,22 +23,44 @@ poetry install poetry run python manage.py migrate poetry run python manage.py createcachetable cd .. +``` -yarn -# run backend server on a known address, set it appopriately in src/config.ts and also in Backend KNOWN_HOSTS -# first run backend in different pane -poetry run python manage.py runserver +After ensuring that the backend is properly configured and running, proceed with the installation steps for frontend outlined in [INSTALLATION.md](INSTALLATION.md). + +To run the frontend, you have two options, each with its own set of requirements. The first method utilizes [yarn](#running-with-yarn) and is mostly used for development setup, while the second employs [Docker](INSTALLATION.md). + +## Running with yarn + +To run the frontend application using yarn, ensure you have the following prerequisites: + +* [Node 20 LTS](https://nodejs.org/en) +* [Yarn](https://yarnpkg.com/) + +Further make sure that the backend server is running. Make sure to set its address in `src/config.ts` and also in the backend's `KNOWN_HOSTS`. + +Once you have these installed and everything configured, follow these steps: -# then after running backend, run frontend dev +First run the following command to install project dependencies: +``` +yarn +``` +Then run the frontend development server: +``` yarn dev -# if on windows, make sure that Git is installed and run on GitBash +``` +If you're on Windows, ensure that Git is installed and run the command in GitBash: +``` GIT_ENABLED=1 yarn dev +``` -# if building +If you want to build the app for deployment, then follow these steps. -# this step is mandatory, it compiles `graphql` and `shared` library +Compile the graphql and shared library: +``` yarn prebuild -# this builds the `dist/` artifact from `frontend` repo. +``` +Then build the `dist/` artifact from the frontend repository: +``` yarn build ``` @@ -56,28 +77,6 @@ This tool needs to be executed every time when it's expected that there are chan 3. If headers change (signifying new behaviour), please revalidate if application works and fix it 4. Done, don't forget to mark your MR with [x] that the MR is tested with new backend -## Docker deployment - -Repository has a prepared Dockerfile which can be compiled accordingly. - -``` -docker build . -t inject-fe -``` - -To deploy the docker container, you only need to execute: - -``` -docker run -p 80:80 inject-fe -``` - -During runtime of the container it's required to bind the container to a given `backend` instance. This can be done accordingly - -``` -docker run -p 80:80 -e VITE_HTTP_HOST=secure-be.inject.muni.cz -e VITE_HTTP_WS=wss://secure-be.inject.muni.cz/ttxbackend/v1/graphql inject-fe -``` - -Please mind, that changing environment variables requires restart of the container if done during the runtime. - ## How to test the Monorepo Run `yarn test`, the tests should take no more than a minute now. diff --git a/backend b/backend index 116b70b4ac5c450e7d62af41244fb47e672d5630..caf6b1c1038b43f45124e4a9220e63d822a8e900 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit 116b70b4ac5c450e7d62af41244fb47e672d5630 +Subproject commit caf6b1c1038b43f45124e4a9220e63d822a8e900 diff --git a/codegen/gql/fragments/Exercise.graphql b/codegen/gql/fragments/Exercise.graphql index 8da42b156e40c01ae5979e2545eee9bf7eaba11c..1499874697df666a3015e1c7c4ee61629436827f 100644 --- a/codegen/gql/fragments/Exercise.graphql +++ b/codegen/gql/fragments/Exercise.graphql @@ -1,5 +1,6 @@ fragment Exercise on ExerciseType { id + name running finished exerciseStart diff --git a/codegen/gql/fragments/LearningActivity.graphql b/codegen/gql/fragments/LearningActivity.graphql new file mode 100644 index 0000000000000000000000000000000000000000..1e75cb6253842e318fe03159c86a94094f2507ce --- /dev/null +++ b/codegen/gql/fragments/LearningActivity.graphql @@ -0,0 +1,8 @@ +fragment LearningActivity on LearningActivityType { + id + name + tags + milestones { + ...Milestone + } +} diff --git a/codegen/gql/fragments/LearningObjective.graphql b/codegen/gql/fragments/LearningObjective.graphql new file mode 100644 index 0000000000000000000000000000000000000000..d6296045180c8c92c8581f078495fccac0103ab0 --- /dev/null +++ b/codegen/gql/fragments/LearningObjective.graphql @@ -0,0 +1,8 @@ +fragment LearningObjective on LearningObjectiveType { + id + name + tags + activities { + ...LearningActivity + } +} diff --git a/codegen/gql/fragments/TeamLearningActivity.graphql b/codegen/gql/fragments/TeamLearningActivity.graphql new file mode 100644 index 0000000000000000000000000000000000000000..83f52c6376b09820bfd07a391f73b7891846ef29 --- /dev/null +++ b/codegen/gql/fragments/TeamLearningActivity.graphql @@ -0,0 +1,10 @@ +fragment TeamLearningActivity on TeamLearningActivityType { + id + reached + activity { + ...LearningActivity + } + milestoneStates { + ...MilestoneState + } +} diff --git a/codegen/gql/fragments/TeamLearningObjective.graphql b/codegen/gql/fragments/TeamLearningObjective.graphql new file mode 100644 index 0000000000000000000000000000000000000000..c2620f971e637e0db3846b7bc373b94a05c58505 --- /dev/null +++ b/codegen/gql/fragments/TeamLearningObjective.graphql @@ -0,0 +1,10 @@ +fragment TeamLearningObjective on TeamLearningObjectiveType { + id + reached + objective { + ...LearningObjective + } + activities { + ...TeamLearningActivity + } +} diff --git a/codegen/gql/mutations/CreateExercise.graphql b/codegen/gql/mutations/CreateExercise.graphql index 24c55ac2d176772da1704dd321c7fce92d9bee72..b2f93d865d85867d44ce17be9d06c3f8254fb8e2 100644 --- a/codegen/gql/mutations/CreateExercise.graphql +++ b/codegen/gql/mutations/CreateExercise.graphql @@ -1,6 +1,10 @@ -mutation CreateExercises($id: ID!, $teamCount: Int!) { +mutation CreateExercises($id: ID!, $teamCount: Int!, $name: String) { createExercise( - createExerciseInput: { definitionId: $id, teamCount: $teamCount } + createExerciseInput: { + definitionId: $id + teamCount: $teamCount + name: $name + } ) { exercise { ...Exercise diff --git a/codegen/gql/queries/GetTeamLearningObjectives.graphql b/codegen/gql/queries/GetTeamLearningObjectives.graphql new file mode 100644 index 0000000000000000000000000000000000000000..081977406423b62b5d5d8b9810e85847064ba419 --- /dev/null +++ b/codegen/gql/queries/GetTeamLearningObjectives.graphql @@ -0,0 +1,5 @@ +query GetTeamLearningObjectives($teamId: ID!) { + teamLearningObjectives(teamId: $teamId) { + ...TeamLearningObjective + } +} diff --git a/docker/nginx-deployment/.env b/docker/nginx-deployment/.env index b5e036d1043c81c46e11c699c687903412dd6384..433962b2773ff1758d9f43d3ac9b8b07f52a426a 100644 --- a/docker/nginx-deployment/.env +++ b/docker/nginx-deployment/.env @@ -2,4 +2,4 @@ NGINX_DEFAULT_REQUEST=index.html NGINX_ROOT=dist HOST_ADDRESSES='localhost,localhost:5173' VITE_HTTP_HOST=localhost -VITE_HTTP_WS=ws://localhost/ttxbackend/api/v1/subscription \ No newline at end of file +VITE_HTTP_WS=ws://localhost/inject/api/v1/subscription \ No newline at end of file diff --git a/docker/nginx-deployment/nginx.conf b/docker/nginx-deployment/nginx.conf index 2f0f06d694303ad5f91836b972a14436b54cdb78..d4cadfae709c08bad9a83fec15cb0768f9051d6d 100644 --- a/docker/nginx-deployment/nginx.conf +++ b/docker/nginx-deployment/nginx.conf @@ -11,8 +11,8 @@ http { server { listen 80; - location /ttxbackend/api/v1/subscription { - proxy_pass http://websocket/ttxbackend/api/v1/graphql; + location /inject/api/v1/subscription { + proxy_pass http://websocket/inject/api/v1/graphql; proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; @@ -25,8 +25,8 @@ http { proxy_send_timeout 90; proxy_read_timeout 90; } - location /ttxbackend/ { - proxy_pass http://backend:8000/ttxbackend/; + 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; diff --git a/frontend/index.html b/frontend/index.html index 21827e8d6e223d885485c5a421fc131b539ee15d..79e96578aa835bac50fafcd0511afc2673b89080 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -12,7 +12,7 @@ <script> // the following variables will override the default connection settings window.VITE_HTTP_HOST = undefined // 'localhost:8000' - window.VITE_HTTP_WS = undefined // 'ws://localhost:8000/ttxbackend/v1/subscription' + window.VITE_HTTP_WS = undefined // 'ws://localhost:8000/inject/v1/subscription' </script> <script type="module" src="/src/main.tsx"></script> </body> diff --git a/frontend/src/analyst/utilities.ts b/frontend/src/analyst/utilities.ts index da9086987823aa243b14e329300e0a1462679f55..85b08cd305113c2cb052c55741be5cf83abdf904 100644 --- a/frontend/src/analyst/utilities.ts +++ b/frontend/src/analyst/utilities.ts @@ -164,6 +164,7 @@ export const DUMMY_EXERCISE: Exercise = { id: null, name: null, }, + name: '', } export const DUMMY_EXERCISE_CONFIG: ExerciseConfig = { exerciseDuration: 0, diff --git a/frontend/src/components/ExerciseList/ExerciseCard.tsx b/frontend/src/components/ExerciseList/ExerciseCard.tsx index a5988953074b6299875c3e4952bed9699ab946b5..aa81d1b91503662dd231f403a29adfae166cc896 100644 --- a/frontend/src/components/ExerciseList/ExerciseCard.tsx +++ b/frontend/src/components/ExerciseList/ExerciseCard.tsx @@ -92,8 +92,8 @@ const ExerciseCard: FC<ExerciseCardProps> = ({ }} > <div> - <h3>{`Exercise: ${exercise.id}`}</h3> - <h4>{`Definition: ${exercise.definition?.name}`}</h4> + <h3>{`Exercise: ${exercise.name}`}</h3> + <h4>{`Definition: ${exercise.definition?.name || exercise.definition?.id}`}</h4> <p> {`${exercise.running ? 'Running' : 'Not running'}, \ ${exercise.finished ? 'Finished' : 'Not finished'}`} diff --git a/frontend/src/components/Navbar/index.tsx b/frontend/src/components/Navbar/index.tsx index e3f32ec17498f1794dd8e723b24d0f6ced1b9566..53d63000a4b3d5b119e29d4e348bd9efb5041c5b 100644 --- a/frontend/src/components/Navbar/index.tsx +++ b/frontend/src/components/Navbar/index.tsx @@ -47,7 +47,7 @@ const navbar = css` const superuserLinks: LinkButtonProps[] = [ { - link: ['/exercisepanel'], + link: ['/exercise-panel'], button: { icon: 'torch', text: 'Exercise Panel', diff --git a/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx b/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx index 250941268653c85a5609bad193a177304a6fafa4..8034c1b2f412cfe34dc336f281b985e3735f2bdf 100644 --- a/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx +++ b/frontend/src/exercisepanel/DefinitionManager/components/Definition.tsx @@ -46,7 +46,7 @@ const DefinitionComp: FC<DefinitionProps> = ({ definition }) => { }} > <div> - <h3>{`${id} - ${name}`}</h3> + <h3>{name || id}</h3> </div> <div style={{ marginTop: '1rem', alignSelf: 'end' }}> diff --git a/frontend/src/exercisepanel/DefinitionManager/index.tsx b/frontend/src/exercisepanel/DefinitionManager/index.tsx index e82c6d54cebca92e24fa4bd613aed9bcfc2afc6b..13761d4f068313d14c85f2cbcc8cedfad8459194 100644 --- a/frontend/src/exercisepanel/DefinitionManager/index.tsx +++ b/frontend/src/exercisepanel/DefinitionManager/index.tsx @@ -23,7 +23,7 @@ const DefinitionManager = () => { <ButtonGroup onClick={e => e.stopPropagation()}> <Button onClick={() => { - open('/instructor/defUploader') + open('/instructor/definitionUploader') }} icon='plus' > diff --git a/frontend/src/exercisepanel/ExerciseManager/components/ExerciseCreator.tsx b/frontend/src/exercisepanel/ExerciseManager/components/ExerciseCreator.tsx deleted file mode 100644 index 22b8da0c3a75663516e8f89a78ac8f84100e9bf4..0000000000000000000000000000000000000000 --- a/frontend/src/exercisepanel/ExerciseManager/components/ExerciseCreator.tsx +++ /dev/null @@ -1,116 +0,0 @@ -import type { OptionProps } from '@blueprintjs/core' -import { - Button, - ButtonGroup, - HTMLSelect, - NumericInput, -} from '@blueprintjs/core' -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 { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' -import { useCallback, useMemo, useState } from 'react' - -const TEAMS_MIN = 1 -const TEAMS_MAX = 20 - -const ExerciseCreator = () => { - const [addExercise, { loading }] = useCreateExercises() - const { data: definitionData, loading: definitionLoading } = - useGetDefinitions({ - fetchPolicy: 'cache-first', - }) - const { notify } = useNotifyContext() - const [selected, setSelected] = useState('0') - const [count, setCount] = useState<undefined | number>(undefined) - - const handleButton = useCallback(() => { - addExercise({ - variables: { - id: selected, - teamCount: count || 1, - }, - refetchQueries: [GetExercisesDocument], - }) - .then(() => { - notify('Exercise created') - }) - .catch((err: { status: string; detail: string }) => { - notify(`${err.status} - ${err.detail}`, { - intent: 'danger', - }) - }) - }, [selected, addExercise, notify, count]) - - const options: OptionProps[] = useMemo(() => { - if (definitionData === undefined || definitionLoading) { - return [ - { - label: 'No definitions', - value: '0', - disabled: true, - }, - ] - } - - if (!definitionData.definitions?.some(x => x?.id === selected)) { - setSelected('0') - } - - return [ - { - label: 'Select a definition', - value: '0', - disabled: true, - }, - ...(definitionData?.definitions || []).map(x => ({ - label: x?.name || 'unknown', - value: x?.id || '0', - })), - ] - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [definitionData, definitionLoading]) - - return ( - <ButtonGroup - onClick={e => { - e.preventDefault() - e.stopPropagation() - }} - fill - style={{ - gap: '0.5rem', - }} - > - <HTMLSelect - options={options} - value={selected} - title='Select a definition' - onChange={e => setSelected(e.currentTarget.value)} - /> - <NumericInput - value={count} - onValueChange={value => { - if (value >= TEAMS_MIN && value <= TEAMS_MAX) { - setCount(value) - } - }} - min={TEAMS_MIN} - max={TEAMS_MAX} - title='Number of teams' - placeholder='Number of teams' - /> - <Button - type='button' - onClick={handleButton} - icon='add' - disabled={selected === '0'} - loading={loading} - > - Create - </Button> - </ButtonGroup> - ) -} - -export default ExerciseCreator diff --git a/frontend/src/exercisepanel/ExerciseManager/index.tsx b/frontend/src/exercisepanel/ExerciseManager/index.tsx index 4f14cc1f630ca65ea309a40e8c78a712abfe2311..f0c396e987042cf124be9a266e39aa66e808f72b 100644 --- a/frontend/src/exercisepanel/ExerciseManager/index.tsx +++ b/frontend/src/exercisepanel/ExerciseManager/index.tsx @@ -1,17 +1,27 @@ -import { Button, Section, SectionCard } from '@blueprintjs/core' +import { useModals } from '@/router' +import { Button, ButtonGroup, Section, SectionCard } from '@blueprintjs/core' import { useGetExercises } from '@inject/graphql/queries/GetExercises.generated' -import ExerciseCreator from './components/ExerciseCreator' 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 => { @@ -23,14 +33,10 @@ const ExerciseManager = () => { > Reload </Button> - </> + </ButtonGroup> } collapsible > - <SectionCard> - <div style={{ marginBottom: '1rem' }}>Create an exercise</div> - <ExerciseCreator /> - </SectionCard> <SectionCard> <ExerciseList /> </SectionCard> diff --git a/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx b/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx index 8eda56b3e808df5fad2c76ce10bfc55c96a69640..c29c01942de6e8fc2d818087ee3f752749806f9d 100644 --- a/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx +++ b/frontend/src/instructor/InstructorMilestones/MilestoneIndicator.tsx @@ -1,6 +1,7 @@ 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' @@ -18,91 +19,95 @@ const MilestoneIndicator: FC<MilestoneIndicatorProps> = ({ const [reachedAt, setReachedAt] = useState(reached) const { notify } = useNotifyContext() const [open, setOpen] = useState(false) - const [mutate] = useSetMilestone() + const [mutate] = useSetMilestone({ + refetchQueries: [GetTeamLearningObjectivesDocument], + }) return ( - <Tooltip - fill + <SwitchCard compact - usePortal - content={ - reached ? ( - <Timestamp - minimal - datetime={new Date(timestampReached || 0)} - style={{ - backgroundColor: '#128f00', - color: 'white', - }} - /> - ) : ( - <Tag - round - style={{ - backgroundColor: '#8f1200', - color: 'white', - }} - > - Not reached - </Tag> - ) - } + checked={reachedAt} + showAsSelectedWhenChecked={false} + onChange={() => { + setReachedAt(!reachedAt) + setOpen(true) + }} > - <SwitchCard - compact - checked={reachedAt} - showAsSelectedWhenChecked={false} - onChange={() => { - setReachedAt(!reachedAt) - setOpen(true) + <Alert + isOpen={open} + onClose={() => setOpen(false)} + onCancel={() => setReachedAt(reached)} + onConfirm={() => { + mutate({ + variables: { + milestone: milestone.name, + activate: !reached, + teamId, + }, + update: cache => { + setReachedAt(!reached) + cache.modify({ + id: cache.identify({ __typename: 'MilestoneState', id }), + fields: { + reached: () => !reached, + timestampReached: () => new Date().toISOString(), + }, + }) + }, + onError(error) { + setReachedAt(reached) + notify(error.message, { intent: 'danger' }) + }, + }) + setOpen(false) }} + cancelButtonText='Cancel' + confirmButtonText='Confirm' + icon='warning-sign' > - <Alert - isOpen={open} - onClose={() => setOpen(false)} - onCancel={() => setReachedAt(reached)} - onConfirm={() => { - mutate({ - variables: { - milestone: milestone.name, - activate: !reached, - teamId, - }, - update: cache => { - setReachedAt(!reached) - cache.modify({ - id: cache.identify({ __typename: 'MilestoneState', id }), - fields: { - reached: () => !reached, - timestampReached: () => new Date().toISOString(), - }, - }) - }, - onError(error) { - setReachedAt(reached) - notify(error.message, { intent: 'danger' }) - }, - }) - setOpen(false) - }} - cancelButtonText='Cancel' - confirmButtonText='Confirm' - icon='warning-sign' - > - Are you sure you want to mark this milestone as{' '} - {reached ? 'unreached' : 'reached'}? - </Alert> - <Icon - icon='dot' - style={{ - color: reached ? '#128f00' : '#8f1200', - marginRight: '0.5rem', - }} - size={20} - /> - {milestone.name || ''} - </SwitchCard> - </Tooltip> + Are you sure you want to mark this milestone as{' '} + {reached ? 'unreached' : 'reached'}? + </Alert> + <Tooltip + fill + compact + usePortal + content={ + reached ? ( + <Timestamp + minimal + datetime={new Date(timestampReached || 0)} + style={{ + backgroundColor: '#128f00', + color: 'white', + }} + /> + ) : ( + <Tag + round + style={{ + backgroundColor: '#8f1200', + color: 'white', + }} + > + Not reached + </Tag> + ) + } + > + <div> + <Icon + icon='dot' + style={{ + color: reached ? '#128f00' : '#8f1200', + marginRight: '0.5rem', + }} + size={20} + /> + {milestone.name || ''} + </div> + </Tooltip> + </SwitchCard> ) } diff --git a/frontend/src/instructor/LearningObjectives/LearningActivity.tsx b/frontend/src/instructor/LearningObjectives/LearningActivity.tsx new file mode 100644 index 0000000000000000000000000000000000000000..df574efcea1de337c91ee50c50a1823064c83079 --- /dev/null +++ b/frontend/src/instructor/LearningObjectives/LearningActivity.tsx @@ -0,0 +1,31 @@ +import { CardList, Section, SectionCard } from '@blueprintjs/core' +import type { TeamLearningActivity } from '@inject/graphql/fragments/TeamLearningActivity.generated' +import type { FC } from 'react' +import MilestoneIndicator from '../InstructorMilestones/MilestoneIndicator' + +interface LearningActivityProps { + activity: TeamLearningActivity + teamId: string +} + +const LearningActivity: FC<LearningActivityProps> = ({ activity, teamId }) => ( + <Section + title={activity.activity.name} + subtitle={activity.activity.tags} + icon={activity.reached ? 'tick' : undefined} + > + <SectionCard> + <CardList bordered={false}> + {activity.milestoneStates.map(milestoneState => ( + <MilestoneIndicator + key={milestoneState.id} + milestone={milestoneState} + teamId={teamId} + /> + ))} + </CardList> + </SectionCard> + </Section> +) + +export default LearningActivity diff --git a/frontend/src/instructor/LearningObjectives/LearningObjective.tsx b/frontend/src/instructor/LearningObjectives/LearningObjective.tsx new file mode 100644 index 0000000000000000000000000000000000000000..724a2714ed9fa1c3c533c49d0769ddb199866c17 --- /dev/null +++ b/frontend/src/instructor/LearningObjectives/LearningObjective.tsx @@ -0,0 +1,41 @@ +import { Section, SectionCard } from '@blueprintjs/core' +import { css } from '@emotion/css' +import type { TeamLearningObjective } from '@inject/graphql/fragments/TeamLearningObjective.generated' +import type { FC } from 'react' +import LearningActivity from './LearningActivity' + +const activities = css` + display: flex; + flex-direction: column; + gap: 1rem; +` + +interface LearningObjectiveProps { + objective: TeamLearningObjective + teamId: string +} + +const LearningObjective: FC<LearningObjectiveProps> = ({ + objective, + teamId, +}) => ( + <Section + style={{ margin: '1rem' }} + title={objective.objective.name} + subtitle={objective.objective.tags} + collapsible + icon={objective.reached ? 'tick' : undefined} + > + <SectionCard className={activities}> + {objective.activities.map(activity => ( + <LearningActivity + key={activity.id} + activity={activity} + teamId={teamId} + /> + ))} + </SectionCard> + </Section> +) + +export default LearningObjective diff --git a/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx b/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx new file mode 100644 index 0000000000000000000000000000000000000000..51c4e18d3b4f1c7fded6e0d5b6c5e78f02d93c50 --- /dev/null +++ b/frontend/src/instructor/LearningObjectives/LearningObjectivesButton.tsx @@ -0,0 +1,53 @@ +import { useNavigate } from '@/router' +import { Button } from '@blueprintjs/core' +import { useCallback, type FC } from 'react' +import { matchPath } from 'react-router-dom' + +interface LearningObjectivesButtonProps { + exerciseId: string | undefined + teamId: string | undefined + hideLabel: boolean + pathname: string +} + +const LearningObjectivesButton: FC<LearningObjectivesButtonProps> = ({ + exerciseId, + teamId, + hideLabel, + pathname, +}) => { + const nav = useNavigate() + + const handleClick = useCallback(() => { + if (teamId && exerciseId) { + nav('/instructor/:exerciseId/:teamId/learning-objectives', { + params: { exerciseId, teamId }, + }) + } + }, [exerciseId, nav, teamId]) + + return ( + <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' }} + /> + ) +} + +export default LearningObjectivesButton diff --git a/frontend/src/instructor/LearningObjectives/index.tsx b/frontend/src/instructor/LearningObjectives/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..7c6c80b101af1846057a10d1882f766f51fd45d4 --- /dev/null +++ b/frontend/src/instructor/LearningObjectives/index.tsx @@ -0,0 +1,63 @@ +import ErrorMessage from '@/components/ErrorMessage' +import { Divider, NonIdealState, Spinner } from '@blueprintjs/core' +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' + +interface LearningObjectivesProps { + teamId: string +} + +const LearningObjectives: FC<LearningObjectivesProps> = ({ teamId }) => { + const { data, loading, error } = useGetTeamLearningObjectives({ + variables: { teamId }, + }) + const objectives = useMemo( + () => data?.teamLearningObjectives?.filter(notEmpty) ?? [], + [data] + ) + + if (loading) { + return <Spinner /> + } else if (error) { + return ( + <ErrorMessage> + <h1>Error occurred!</h1> + <p>{error.message}</p> + </ErrorMessage> + ) + } else if (!data || !data.teamLearningObjectives) { + return ( + <NonIdealState + icon='low-voltage-pole' + title='No data' + description='Please wait for the data to come in' + /> + ) + } + + if (objectives.length === 0) { + return ( + <NonIdealState + icon='low-voltage-pole' + title='No learning objectives' + description='There are no learning objectives to display' + /> + ) + } + + return ( + <Container> + {objectives.map((objective, index) => ( + <div key={objective.id}> + <LearningObjective objective={objective} teamId={teamId} /> + {index !== objectives.length - 1 && <Divider />} + </div> + ))} + </Container> + ) +} + +export default LearningObjectives diff --git a/frontend/src/pages/(navbar)/exercisepanel.tsx b/frontend/src/pages/(navbar)/exercise-panel.tsx similarity index 100% rename from frontend/src/pages/(navbar)/exercisepanel.tsx rename to frontend/src/pages/(navbar)/exercise-panel.tsx diff --git a/frontend/src/pages/instructor/+defUploader.tsx b/frontend/src/pages/instructor/+defUploader.tsx deleted file mode 100644 index a828b34e22dadddcd29b8a597f941dc4dc7ee890..0000000000000000000000000000000000000000 --- a/frontend/src/pages/instructor/+defUploader.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import { useModals } from '@/router' -import { - DialogStep, - FileInput, - InputGroup, - MultistepDialog, -} 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 { uploadDefinitionUrl } from '@inject/shared/config' -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 DefinitionUploader = () => { - const [open, setOpen] = useState<boolean>(true) - const { close } = useModals() - const [name, setName] = useState<string>('') - const [file, setFile] = useState<File | undefined>() - const { notify } = useNotifyContext() - const host = useHost() - const client = useApolloClient() - - const text = file ? file.name : 'Choose definition zip' - - const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => { - if (e.target.files) { - setFile(e.target.files[0]) - } - } - - const handleUploadEvent = () => { - if (!file) { - return - } - - const data = new FormData() - data.append('file', file) - data.append('definition_name', name) - - csrfFetch(uploadDefinitionUrl(host || ''), { - method: 'POST', - body: data, - credentials: 'include', - }) - .then(res => res.json()) - .then((res: { status: string; detail: string }) => { - notify(`${res.status} - ${res.detail}`) - setOpen(false) - client.refetchQueries({ include: ['GetDefinitions'] }) - }) - .catch((err: { status: string; detail: string }) => - notify(`ERROR: ${err.status} - ${err.detail}`, { - intent: 'danger', - }) - ) - } - return ( - <MultistepDialog - isOpen={open} - onClose={() => setOpen(false)} - onClosed={() => close()} - navigationPosition='top' - icon='add' - nextButtonProps={{ - disabled: !file || !name, - tooltipContent: - !file || !name ? 'Please fill in all fields' : undefined, - }} - finalButtonProps={{ - onClick: handleUploadEvent, - }} - > - <DialogStep - id='setup' - panel={ - <Box> - <InputGroup - placeholder='Name' - value={name} - onChange={e => setName(e.target.value)} - /> - <FileInput text={text} onInputChange={handleFileChange} /> - </Box> - } - title='Select' - /> - <DialogStep - id='confirm' - panel={ - <Box> - <p>{`Definition name: ${name}`}</p> - {file && <p>{`File uploaded: ${file.name}`}</p>} - </Box> - } - title='Confirmation' - /> - </MultistepDialog> - ) -} - -export default DefinitionUploader diff --git a/frontend/src/pages/instructor/+definitionUploader.tsx b/frontend/src/pages/instructor/+definitionUploader.tsx new file mode 100644 index 0000000000000000000000000000000000000000..a6cf1bde68ba02b355cadf6ba0522340567616db --- /dev/null +++ b/frontend/src/pages/instructor/+definitionUploader.tsx @@ -0,0 +1,159 @@ +import { useModals } from '@/router' +import { + Button, + Classes, + Dialog, + DialogBody, + DialogFooter, + FileInput, + InputGroup, + Label, +} 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 { + uploadDefinitionUrl, + validateDefinitionUrl, +} from '@inject/shared/config' +import { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import csrfFetch from '@inject/shared/utils/csrfFetch' +import type { ChangeEvent } from 'react' +import { useCallback, useMemo, useState } from 'react' + +const DefinitionUploader = () => { + const [open, setOpen] = useState<boolean>(true) + const { close } = useModals() + const [name, setName] = useState<string>('') + const [file, setFile] = useState<File | undefined>() + const { notify } = useNotifyContext() + const host = useHost() + const client = useApolloClient() + + const [loadingSubmit, setLoadingSubmit] = useState<boolean>(false) + const [loadingValidate, setLoadingValidate] = useState<boolean>(false) + + const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => { + if (e.target.files) { + setFile(e.target.files[0]) + } + } + + const handleSubmit = () => { + if (!file) { + return + } + + const data = new FormData() + data.append('file', file) + if (name) { + data.append('definition_name', name) + } + + setLoadingSubmit(true) + csrfFetch(uploadDefinitionUrl(host || ''), { + method: 'POST', + body: data, + credentials: 'include', + }) + .then(res => res.json()) + .then((res: { status: string; detail: string }) => { + if (res.status === 'error') { + notify(res.detail, { intent: 'danger' }) + return + } + notify(res.detail, { intent: 'success' }) + setOpen(false) + client.refetchQueries({ include: ['GetDefinitions'] }) + }) + .finally(() => setLoadingSubmit(false)) + } + + const placeholder = useMemo( + () => file?.name.replace(/\.zip$/, '') || 'Definition name', + [file?.name] + ) + + const handleValidate = useCallback(() => { + if (!file) { + return + } + + const data = new FormData() + data.append('file', file) + + setLoadingValidate(true) + csrfFetch(validateDefinitionUrl(host || ''), { + method: 'POST', + body: data, + credentials: 'include', + }) + .then(res => res.json()) + .then((res: { status: string; detail: string }) => { + if (res.status === 'error') { + notify(res.detail, { intent: 'danger' }) + return + } + notify(res.detail, { intent: 'success' }) + }) + .finally(() => setLoadingValidate(false)) + }, [file, host, notify]) + + return ( + <Dialog + isOpen={open} + onClose={() => setOpen(false)} + onClosed={() => close()} + icon='plus' + title='Add 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> + <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> + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={!file} + title={file ? '' : 'Upload a definition file'} + loading={loadingSubmit} + > + Submit + </Button> + } + /> + </Dialog> + ) +} + +export default DefinitionUploader diff --git a/frontend/src/pages/instructor/+exerciseCreator.tsx b/frontend/src/pages/instructor/+exerciseCreator.tsx new file mode 100644 index 0000000000000000000000000000000000000000..be896a7148827a063245ecf9c3112408fd49e47c --- /dev/null +++ b/frontend/src/pages/instructor/+exerciseCreator.tsx @@ -0,0 +1,155 @@ +import { useModals } from '@/router' +import type { OptionProps } from '@blueprintjs/core' +import { + Button, + Classes, + Dialog, + DialogBody, + DialogFooter, + HTMLSelect, + InputGroup, + Label, + NumericInput, +} from '@blueprintjs/core' +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 { useNotifyContext } from '@inject/shared/notification/contexts/NotifyContext' +import { useCallback, useMemo, useState } from 'react' + +const TEAMS_MIN = 1 +const TEAMS_MAX = 20 + +const ExerciseCreator = () => { + const [open, setOpen] = useState<boolean>(true) + const [name, setName] = useState<string>('') + const { close } = useModals() + const [addExercise, { loading }] = useCreateExercises() + const { data: definitionData, loading: definitionLoading } = + useGetDefinitions({ + fetchPolicy: 'cache-first', + }) + const { notify } = useNotifyContext() + const [definitionId, setDefinitionId] = useState<string>() + const [count, setCount] = useState<undefined | number>(undefined) + + const handleSubmit = useCallback(() => { + addExercise({ + variables: { + id: definitionId || '-1', + teamCount: count || 1, + name, + }, + refetchQueries: [GetExercisesDocument], + }) + .then(() => { + notify('Exercise created') + setOpen(false) + }) + .catch((err: { status: string; detail: string }) => { + notify(`${err.status} - ${err.detail}`, { + 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]) + + return ( + <Dialog + isOpen={open} + onClose={() => setOpen(false)} + onClosed={() => close()} + icon='plus' + title='Add 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%' }}> + Team count + <NumericInput + fill + value={count} + onValueChange={value => { + if (value >= TEAMS_MIN && value <= TEAMS_MAX) { + setCount(value) + } + }} + min={TEAMS_MIN} + max={TEAMS_MAX} + 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> + </Box> + </DialogBody> + <DialogFooter + actions={ + <Button + onClick={handleSubmit} + intent='primary' + disabled={definitionId === '-1' || !count} + title={ + definitionId !== '-1' && count + ? '' + : 'Fill in all required fields' + } + loading={loading} + > + Submit + </Button> + } + /> + </Dialog> + ) +} + +export default ExerciseCreator diff --git a/frontend/src/pages/instructor/[exerciseId]/[teamId]/learning-objectives.tsx b/frontend/src/pages/instructor/[exerciseId]/[teamId]/learning-objectives.tsx new file mode 100644 index 0000000000000000000000000000000000000000..1be43c03e7dae0a82f9983d76d3027465a927a2d --- /dev/null +++ b/frontend/src/pages/instructor/[exerciseId]/[teamId]/learning-objectives.tsx @@ -0,0 +1,12 @@ +import LearningObjectives from '@/instructor/LearningObjectives' +import { useParams } from '@/router' + +const Page = () => { + const { teamId } = useParams( + '/instructor/:exerciseId/:teamId/learning-objectives' + ) + + return <LearningObjectives teamId={teamId} /> +} + +export default Page diff --git a/frontend/src/router.ts b/frontend/src/router.ts index 75fcf643e57da869fedab4b2b8758b1d7eba9b84..c76df01cd2273cefb7950c769e79d7eb09351dad 100644 --- a/frontend/src/router.ts +++ b/frontend/src/router.ts @@ -12,7 +12,7 @@ export type Path = | `/analyst/:exerciseId/emails/:tab/:threadId` | `/analyst/:exerciseId/milestones` | `/analyst/:exerciseId/tools` - | `/exercisepanel` + | `/exercise-panel` | `/graphiql` | `/instructor` | `/instructor/:exerciseId/:teamId` @@ -25,6 +25,7 @@ export type Path = | `/instructor/:exerciseId/:teamId/:channelId/tool` | `/instructor/:exerciseId/:teamId/:channelId/tool/:actionLogId` | `/instructor/:exerciseId/:teamId/file/:fileId` + | `/instructor/:exerciseId/:teamId/learning-objectives` | `/login` | `/settings` | `/trainee/:exerciseId/:teamId` @@ -57,6 +58,7 @@ export type Params = { '/instructor/:exerciseId/:teamId/:channelId/tool': { exerciseId: string; teamId: string; channelId: string } '/instructor/:exerciseId/:teamId/:channelId/tool/:actionLogId': { exerciseId: string; teamId: string; channelId: string; actionLogId: string } '/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/: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 } @@ -70,7 +72,7 @@ export type Params = { '/users/:userId': { userId: string } } -export type ModalPath = `/instructor/defUploader` +export type ModalPath = `/instructor/definitionUploader` | `/instructor/exerciseCreator` export const { Link, Navigate } = components<Path, Params>() export const { useModals, useNavigate, useParams } = hooks<Path, Params, ModalPath>() diff --git a/frontend/src/views/InstructorView/index.tsx b/frontend/src/views/InstructorView/index.tsx index 348ef2c78cfc80ed977ce9aee6deb842458d0ccc..c1bc68dd16135d12b5188141717fc70259e2b5a1 100644 --- a/frontend/src/views/InstructorView/index.tsx +++ b/frontend/src/views/InstructorView/index.tsx @@ -7,6 +7,7 @@ import InstructorEmailFormOverlay from '@/email/EmailFormOverlay/InstructorEmail import InstructorInject from '@/instructor/InstructorInject' import InstructorMilestones from '@/instructor/InstructorMilestones' import InstructorTeamSelector from '@/instructor/InstructorTeamSelector' +import LearningObjectivesButton from '@/instructor/LearningObjectives/LearningObjectivesButton' import { NonIdealState } from '@blueprintjs/core' import Manager from '@inject/graphql/components/Manager' import { useSubscriptionContext } from '@inject/graphql/context/SubscriptionContext' @@ -83,6 +84,12 @@ const InstructorView: FC<InstructorViewProps> = ({ exerciseId={exerciseId} hideLabel={hideLeftBar} /> + <LearningObjectivesButton + teamId={teamId} + exerciseId={exerciseId} + hideLabel={hideLeftBar} + pathname={loc.pathname} + /> <ExitButton hideLabel={hideLeftBar} /> </> ), diff --git a/graphql/client/apollo-helpers.ts b/graphql/client/apollo-helpers.ts index 1bca4246272a7e6d2c0e6cd1fb845a264b668932..eae3a4192ac52598b5d6a348b91cf551329f921d 100644 --- a/graphql/client/apollo-helpers.ts +++ b/graphql/client/apollo-helpers.ts @@ -85,10 +85,11 @@ export type CreateExerciseMutationKeySpecifier = ('exercise' | CreateExerciseMut export type CreateExerciseMutationFieldPolicy = { exercise?: FieldPolicy<any> | FieldReadFunction<any> }; -export type CreateExerciseTypeKeySpecifier = ('configOverride' | 'definitionId' | 'teamCount' | CreateExerciseTypeKeySpecifier)[]; +export type CreateExerciseTypeKeySpecifier = ('configOverride' | 'definitionId' | 'name' | 'teamCount' | CreateExerciseTypeKeySpecifier)[]; export type CreateExerciseTypeFieldPolicy = { configOverride?: FieldPolicy<any> | FieldReadFunction<any>, definitionId?: FieldPolicy<any> | FieldReadFunction<any>, + name?: FieldPolicy<any> | FieldReadFunction<any>, teamCount?: FieldPolicy<any> | FieldReadFunction<any> }; export type CreateThreadMutationKeySpecifier = ('thread' | CreateThreadMutationKeySpecifier)[]; @@ -125,7 +126,7 @@ export type DefinitionRoleTypeFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any> }; -export type DefinitionTypeKeySpecifier = ('addresses' | 'channels' | 'exercises' | 'files' | 'id' | 'injects' | 'name' | 'questionnaires' | 'roles' | 'tools' | 'userSet' | 'version' | DefinitionTypeKeySpecifier)[]; +export type DefinitionTypeKeySpecifier = ('addresses' | 'channels' | 'exercises' | 'files' | 'id' | 'injects' | 'learningObjectives' | 'name' | 'questionnaires' | 'roles' | 'tools' | 'userSet' | 'version' | DefinitionTypeKeySpecifier)[]; export type DefinitionTypeFieldPolicy = { addresses?: FieldPolicy<any> | FieldReadFunction<any>, channels?: FieldPolicy<any> | FieldReadFunction<any>, @@ -133,6 +134,7 @@ export type DefinitionTypeFieldPolicy = { files?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, injects?: FieldPolicy<any> | FieldReadFunction<any>, + learningObjectives?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any>, questionnaires?: FieldPolicy<any> | FieldReadFunction<any>, roles?: FieldPolicy<any> | FieldReadFunction<any>, @@ -236,7 +238,7 @@ export type ExerciseLoopRunningSubscriptionKeySpecifier = ('exerciseLoopRunning' export type ExerciseLoopRunningSubscriptionFieldPolicy = { exerciseLoopRunning?: FieldPolicy<any> | FieldReadFunction<any> }; -export type ExerciseTypeKeySpecifier = ('definition' | 'elapsedS' | 'emailParticipants' | 'exerciseStart' | 'finished' | 'id' | 'running' | 'teams' | 'threads' | 'userSet' | 'uuid' | ExerciseTypeKeySpecifier)[]; +export type ExerciseTypeKeySpecifier = ('definition' | 'elapsedS' | 'emailParticipants' | 'exerciseStart' | 'finished' | 'id' | 'name' | 'running' | 'teams' | 'threads' | 'userSet' | 'uuid' | ExerciseTypeKeySpecifier)[]; export type ExerciseTypeFieldPolicy = { definition?: FieldPolicy<any> | FieldReadFunction<any>, elapsedS?: FieldPolicy<any> | FieldReadFunction<any>, @@ -244,6 +246,7 @@ export type ExerciseTypeFieldPolicy = { exerciseStart?: FieldPolicy<any> | FieldReadFunction<any>, finished?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, + name?: FieldPolicy<any> | FieldReadFunction<any>, running?: FieldPolicy<any> | FieldReadFunction<any>, teams?: FieldPolicy<any> | FieldReadFunction<any>, threads?: FieldPolicy<any> | FieldReadFunction<any>, @@ -321,6 +324,22 @@ export type InjectSelectionsSubscriptionKeySpecifier = ('injectSelection' | Inje export type InjectSelectionsSubscriptionFieldPolicy = { injectSelection?: FieldPolicy<any> | FieldReadFunction<any> }; +export type LearningActivityTypeKeySpecifier = ('id' | 'milestones' | 'name' | 'objective' | 'tags' | LearningActivityTypeKeySpecifier)[]; +export type LearningActivityTypeFieldPolicy = { + id?: FieldPolicy<any> | FieldReadFunction<any>, + milestones?: FieldPolicy<any> | FieldReadFunction<any>, + name?: FieldPolicy<any> | FieldReadFunction<any>, + objective?: FieldPolicy<any> | FieldReadFunction<any>, + tags?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type LearningObjectiveTypeKeySpecifier = ('activities' | 'definition' | 'id' | 'name' | 'tags' | LearningObjectiveTypeKeySpecifier)[]; +export type LearningObjectiveTypeFieldPolicy = { + activities?: FieldPolicy<any> | FieldReadFunction<any>, + definition?: FieldPolicy<any> | FieldReadFunction<any>, + id?: FieldPolicy<any> | FieldReadFunction<any>, + name?: FieldPolicy<any> | FieldReadFunction<any>, + tags?: FieldPolicy<any> | FieldReadFunction<any> +}; export type LoginMutationKeySpecifier = ('user' | LoginMutationKeySpecifier)[]; export type LoginMutationFieldPolicy = { user?: FieldPolicy<any> | FieldReadFunction<any> @@ -329,16 +348,18 @@ export type LogoutMutationKeySpecifier = ('loggedOut' | LogoutMutationKeySpecifi export type LogoutMutationFieldPolicy = { loggedOut?: FieldPolicy<any> | FieldReadFunction<any> }; -export type MilestoneStateTypeKeySpecifier = ('id' | 'milestone' | 'reached' | 'teamIds' | 'timestampReached' | MilestoneStateTypeKeySpecifier)[]; +export type MilestoneStateTypeKeySpecifier = ('activity' | 'id' | 'milestone' | 'reached' | 'teamIds' | 'timestampReached' | MilestoneStateTypeKeySpecifier)[]; export type MilestoneStateTypeFieldPolicy = { + activity?: FieldPolicy<any> | FieldReadFunction<any>, id?: FieldPolicy<any> | FieldReadFunction<any>, milestone?: FieldPolicy<any> | FieldReadFunction<any>, reached?: FieldPolicy<any> | FieldReadFunction<any>, teamIds?: FieldPolicy<any> | FieldReadFunction<any>, timestampReached?: FieldPolicy<any> | FieldReadFunction<any> }; -export type MilestoneTypeKeySpecifier = ('fileNames' | 'final' | 'id' | 'name' | 'roles' | 'teamVisible' | MilestoneTypeKeySpecifier)[]; +export type MilestoneTypeKeySpecifier = ('activity' | 'fileNames' | 'final' | 'id' | '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>, @@ -400,7 +421,7 @@ 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' | 'teamMilestones' | 'teamQuestionnaires' | 'teamRoles' | 'teamTools' | 'teamUploadedFiles' | 'threadTemplate' | 'threadTemplates' | 'user' | 'users' | 'whoAmI' | QueryKeySpecifier)[]; +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' | 'whoAmI' | QueryKeySpecifier)[]; export type QueryFieldPolicy = { actionLog?: FieldPolicy<any> | FieldReadFunction<any>, analyticsActionLogs?: FieldPolicy<any> | FieldReadFunction<any>, @@ -436,6 +457,7 @@ export type QueryFieldPolicy = { teamChannelLogs?: FieldPolicy<any> | FieldReadFunction<any>, teamEmailParticipant?: FieldPolicy<any> | FieldReadFunction<any>, teamInjectSelections?: FieldPolicy<any> | FieldReadFunction<any>, + teamLearningObjectives?: FieldPolicy<any> | FieldReadFunction<any>, teamMilestones?: FieldPolicy<any> | FieldReadFunction<any>, teamQuestionnaires?: FieldPolicy<any> | FieldReadFunction<any>, teamRoles?: FieldPolicy<any> | FieldReadFunction<any>, @@ -577,6 +599,21 @@ export type TagTypeFieldPolicy = { id?: FieldPolicy<any> | FieldReadFunction<any>, name?: FieldPolicy<any> | FieldReadFunction<any> }; +export type TeamLearningActivityTypeKeySpecifier = ('activity' | 'id' | 'milestoneStates' | 'reached' | 'teamObjective' | TeamLearningActivityTypeKeySpecifier)[]; +export type TeamLearningActivityTypeFieldPolicy = { + activity?: FieldPolicy<any> | FieldReadFunction<any>, + id?: FieldPolicy<any> | FieldReadFunction<any>, + milestoneStates?: FieldPolicy<any> | FieldReadFunction<any>, + reached?: FieldPolicy<any> | FieldReadFunction<any>, + teamObjective?: FieldPolicy<any> | FieldReadFunction<any> +}; +export type TeamLearningObjectiveTypeKeySpecifier = ('activities' | 'id' | 'objective' | 'reached' | TeamLearningObjectiveTypeKeySpecifier)[]; +export type TeamLearningObjectiveTypeFieldPolicy = { + activities?: FieldPolicy<any> | FieldReadFunction<any>, + id?: FieldPolicy<any> | FieldReadFunction<any>, + objective?: FieldPolicy<any> | FieldReadFunction<any>, + reached?: FieldPolicy<any> | FieldReadFunction<any> +}; export type TeamQuestionnaireStateSubscriptionKeySpecifier = ('teamQuestionnaireState' | TeamQuestionnaireStateSubscriptionKeySpecifier)[]; export type TeamQuestionnaireStateSubscriptionFieldPolicy = { teamQuestionnaireState?: FieldPolicy<any> | FieldReadFunction<any> @@ -849,6 +886,14 @@ export type StrictTypedTypePolicies = { keyFields?: false | InjectSelectionsSubscriptionKeySpecifier | (() => undefined | InjectSelectionsSubscriptionKeySpecifier), fields?: InjectSelectionsSubscriptionFieldPolicy, }, + LearningActivityType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | LearningActivityTypeKeySpecifier | (() => undefined | LearningActivityTypeKeySpecifier), + fields?: LearningActivityTypeFieldPolicy, + }, + LearningObjectiveType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | LearningObjectiveTypeKeySpecifier | (() => undefined | LearningObjectiveTypeKeySpecifier), + fields?: LearningObjectiveTypeFieldPolicy, + }, LoginMutation?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | LoginMutationKeySpecifier | (() => undefined | LoginMutationKeySpecifier), fields?: LoginMutationFieldPolicy, @@ -965,6 +1010,14 @@ export type StrictTypedTypePolicies = { keyFields?: false | TagTypeKeySpecifier | (() => undefined | TagTypeKeySpecifier), fields?: TagTypeFieldPolicy, }, + TeamLearningActivityType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | TeamLearningActivityTypeKeySpecifier | (() => undefined | TeamLearningActivityTypeKeySpecifier), + fields?: TeamLearningActivityTypeFieldPolicy, + }, + TeamLearningObjectiveType?: Omit<TypePolicy, "fields" | "keyFields"> & { + keyFields?: false | TeamLearningObjectiveTypeKeySpecifier | (() => undefined | TeamLearningObjectiveTypeKeySpecifier), + fields?: TeamLearningObjectiveTypeFieldPolicy, + }, TeamQuestionnaireStateSubscription?: Omit<TypePolicy, "fields" | "keyFields"> & { keyFields?: false | TeamQuestionnaireStateSubscriptionKeySpecifier | (() => undefined | TeamQuestionnaireStateSubscriptionKeySpecifier), fields?: TeamQuestionnaireStateSubscriptionFieldPolicy, diff --git a/graphql/connection/index.tsx b/graphql/connection/index.tsx index f693f51790584d9121bc0817615f05d669362755..9c9b655d465a52bf4c920b1b7028e4c2870e8bc8 100644 --- a/graphql/connection/index.tsx +++ b/graphql/connection/index.tsx @@ -72,7 +72,7 @@ const QuestionDialog: FC<QuestionDialogInterface> = ({ <InputGroup typeof='text' defaultValue={ws_} - placeholder='ws://localhost/ttxbackend/api/v1/subscription' + placeholder='ws://localhost/inject/api/v1/subscription' onChange={e => setWs(e.target.value)} /> </FormGroup> diff --git a/graphql/fragments/Exercise.generated.ts b/graphql/fragments/Exercise.generated.ts index 68e7188c75101f16a3a7859c2b4be04a1a271081..37690305b3d854c147e6767e9383052aed63b8e1 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, 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 }>, 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 }> }; +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 }>, 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 }> }; -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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/LearningActivity.generated.ts b/graphql/fragments/LearningActivity.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..72a3c128e30f208c1604e8324838fc32ec54179e --- /dev/null +++ b/graphql/fragments/LearningActivity.generated.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +export type LearningActivity = { id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }; + +export const LearningActivity = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}}]}},{"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; \ No newline at end of file diff --git a/graphql/fragments/LearningObjective.generated.ts b/graphql/fragments/LearningObjective.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..4328e01bc1a7d93e6f94b061c8268b4c896fe893 --- /dev/null +++ b/graphql/fragments/LearningObjective.generated.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +export type LearningObjective = { id: string, name: string, tags: string, activities: Array<{ id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }> }; + +export const LearningObjective = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningObjective"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningObjectiveType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"activities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}}]}},{"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; \ No newline at end of file diff --git a/graphql/fragments/TeamLearningActivity.generated.ts b/graphql/fragments/TeamLearningActivity.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..18deab3f428ca0ef35272b3d481a475019c499b3 --- /dev/null +++ b/graphql/fragments/TeamLearningActivity.generated.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +export type TeamLearningActivity = { id: string, reached: boolean | null, activity: { id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }, milestoneStates: Array<{ id: string, reached: boolean, timestampReached: string | null, teamIds: Array<string | null> | null, milestone: { id: string, name: string, teamVisible: boolean, roles: string, fileNames: string } }> }; + +export const TeamLearningActivity = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamLearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamLearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"milestoneStates"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"MilestoneState"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}}]}},{"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"}}]}},{"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"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/fragments/TeamLearningObjective.generated.ts b/graphql/fragments/TeamLearningObjective.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..9d1bd54f6e1ed10833ffc864dec2a2538952e22c --- /dev/null +++ b/graphql/fragments/TeamLearningObjective.generated.ts @@ -0,0 +1,8 @@ +/* eslint-disable */ +//@ts-nocheck +import type * as _Types from '../types'; + +import type { DocumentNode } from 'graphql'; +export type TeamLearningObjective = { id: string, reached: boolean | null, objective: { id: string, name: string, tags: string, activities: Array<{ id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }> }, activities: Array<{ id: string, reached: boolean | null, activity: { id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }, milestoneStates: Array<{ id: string, reached: boolean, timestampReached: string | null, teamIds: Array<string | null> | null, milestone: { id: string, name: string, teamVisible: boolean, roles: string, fileNames: string } }> }> }; + +export const TeamLearningObjective = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamLearningObjective"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamLearningObjectiveType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"objective"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningObjective"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamLearningActivity"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningObjective"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningObjectiveType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"activities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}}]}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamLearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamLearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"milestoneStates"},"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"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/graphql/graphql.schema.json b/graphql/graphql.schema.json index 118ce7bbf807a4499249f27e0590e0d3c336d7f0..d443abb9c4457ff63bd00cf2fcbe8c951e7f3238 100644 --- a/graphql/graphql.schema.json +++ b/graphql/graphql.schema.json @@ -963,6 +963,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "name", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": "\"\"", + "isDeprecated": false, + "deprecationReason": null + }, { "name": "teamCount", "description": null, @@ -1040,6 +1052,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "name", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "teamCount", "description": null, @@ -1572,6 +1596,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "learningObjectives", + "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 + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "name", "description": null, @@ -2978,6 +3026,22 @@ "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": "running", "description": null, @@ -3047,9 +3111,13 @@ "description": null, "args": [], "type": { - "kind": "OBJECT", - "name": "RestrictedUser", - "ofType": null + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RestrictedUser", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -3952,6 +4020,204 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "LearningActivityType", + "description": null, + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "milestones", + "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 + } + } + } + }, + "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": "objective", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LearningObjectiveType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "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": "LearningObjectiveType", + "description": null, + "fields": [ + { + "name": "activities", + "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 + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "definition", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DefinitionType", + "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 + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "tags", + "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": "ENUM", "name": "LogType", @@ -4044,6 +4310,18 @@ "name": "MilestoneStateType", "description": null, "fields": [ + { + "name": "activity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "TeamLearningActivityType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -4131,6 +4409,18 @@ "name": "MilestoneType", "description": null, "fields": [ + { + "name": "activity", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "LearningActivityType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "fileNames", "description": null, @@ -6627,6 +6917,39 @@ "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": "teamMilestones", "description": "Retrieve all milestones for the specific team filtered by team visibility", @@ -8659,6 +8982,180 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "TeamLearningActivityType", + "description": null, + "fields": [ + { + "name": "activity", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LearningActivityType", + "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": "milestoneStates", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "MilestoneStateType", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reached", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "teamObjective", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "TeamLearningObjectiveType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "TeamLearningObjectiveType", + "description": null, + "fields": [ + { + "name": "activities", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "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": "objective", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LearningObjectiveType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "reached", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "ENUM", "name": "TeamQuestionnaireStateStatus", diff --git a/graphql/mutations/CreateExercise.generated.ts b/graphql/mutations/CreateExercise.generated.ts index 6b7bbfb28e589d2d7a32b8f38f528b40cd87910a..ef185474e1e174f112b905971cd619f87968d4a2 100644 --- a/graphql/mutations/CreateExercise.generated.ts +++ b/graphql/mutations/CreateExercise.generated.ts @@ -8,13 +8,14 @@ const defaultOptions = {} as const; export type CreateExercisesVariables = _Types.Exact<{ id: _Types.Scalars['ID']['input']; teamCount: _Types.Scalars['Int']['input']; + name: _Types.InputMaybe<_Types.Scalars['String']['input']>; }>; -export type CreateExercises = { createExercise: { exercise: { id: 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 }>, 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 }> } | 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 }>, 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 }> } | 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"}}}}],"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"}}}]}}],"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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; export type CreateExercisesMutationFn = Apollo.MutationFunction<CreateExercises, CreateExercisesVariables>; /** @@ -32,6 +33,7 @@ export type CreateExercisesMutationFn = Apollo.MutationFunction<CreateExercises, * variables: { * id: // value for 'id' * teamCount: // value for 'teamCount' + * name: // value for 'name' * }, * }); */ diff --git a/graphql/queries/GetExercise.generated.ts b/graphql/queries/GetExercise.generated.ts index 43f2c30676775cad666a7719ad056254d7d96e66..cd819e7348e5441a1169d0a17e453966527927d0 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, 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 }>, 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 }> } | 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 }>, 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 }> } | 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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; /** * __useGetExercise__ diff --git a/graphql/queries/GetExerciseWithConfig.generated.ts b/graphql/queries/GetExerciseWithConfig.generated.ts index fc465d3189de2f240a7e9770985d681ee06862f9..c32fe86cf6c7cb868870dc3df4c395e77766327f 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, 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 }>, 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 }> } | 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 }>, 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 }> } | 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":"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":"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":"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":"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":"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":"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":"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 34a6642ac2101bb127864b4e06e0f099d4e43697..899acccdfc410627161b6d010fd176819b32a129 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, 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 }>, 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 }> } | 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 }>, 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 }> } | 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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; /** * __useGetExercises__ diff --git a/graphql/queries/GetRunningExercises.generated.ts b/graphql/queries/GetRunningExercises.generated.ts index f0988c710a38f968d0a389e26035fd2830dcbfc8..9d8704ba18fa55dd7eab3080038216770229764a 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, 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 }>, 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 }> } | 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 }>, 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 }> } | 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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; /** * __useGetRunningExercises__ diff --git a/graphql/queries/GetTeamLearningObjectives.generated.ts b/graphql/queries/GetTeamLearningObjectives.generated.ts new file mode 100644 index 0000000000000000000000000000000000000000..37bd95ba888253c6630afee04dedd7e6fbb572dd --- /dev/null +++ b/graphql/queries/GetTeamLearningObjectives.generated.ts @@ -0,0 +1,49 @@ +/* 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 GetTeamLearningObjectivesVariables = _Types.Exact<{ + teamId: _Types.Scalars['ID']['input']; +}>; + + +export type GetTeamLearningObjectives = { teamLearningObjectives: Array<{ id: string, reached: boolean | null, objective: { id: string, name: string, tags: string, activities: Array<{ id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }> }, activities: Array<{ id: string, reached: boolean | null, activity: { id: string, name: string, tags: string, milestones: Array<{ id: string, name: string, teamVisible: boolean, roles: string, fileNames: string }> }, milestoneStates: 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 }; + + +export const GetTeamLearningObjectivesDocument = /*#__PURE__*/ {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"GetTeamLearningObjectives"},"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":"teamLearningObjectives"},"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":"TeamLearningObjective"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamLearningObjective"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamLearningObjectiveType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"objective"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningObjective"}}]}},{"kind":"Field","name":{"kind":"Name","value":"activities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"TeamLearningActivity"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningObjective"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningObjectiveType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"activities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"LearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"LearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"tags"}},{"kind":"Field","name":{"kind":"Name","value":"milestones"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"Milestone"}}]}}]}},{"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"}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"TeamLearningActivity"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"TeamLearningActivityType"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"reached"}},{"kind":"Field","name":{"kind":"Name","value":"activity"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"LearningActivity"}}]}},{"kind":"Field","name":{"kind":"Name","value":"milestoneStates"},"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"}}]}}]} as unknown as DocumentNode; + +/** + * __useGetTeamLearningObjectives__ + * + * To run a query within a React component, call `useGetTeamLearningObjectives` and pass it any options that fit your needs. + * When your component renders, `useGetTeamLearningObjectives` 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 } = useGetTeamLearningObjectives({ + * variables: { + * teamId: // value for 'teamId' + * }, + * }); + */ +export function useGetTeamLearningObjectives(baseOptions: Apollo.QueryHookOptions<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables> & ({ variables: GetTeamLearningObjectivesVariables; skip?: boolean; } | { skip: boolean; }) ) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>(GetTeamLearningObjectivesDocument, options); + } +export function useGetTeamLearningObjectivesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>(GetTeamLearningObjectivesDocument, options); + } +export function useGetTeamLearningObjectivesSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useSuspenseQuery<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>(GetTeamLearningObjectivesDocument, options); + } +export type GetTeamLearningObjectivesHookResult = ReturnType<typeof useGetTeamLearningObjectives>; +export type GetTeamLearningObjectivesLazyQueryHookResult = ReturnType<typeof useGetTeamLearningObjectivesLazyQuery>; +export type GetTeamLearningObjectivesSuspenseQueryHookResult = ReturnType<typeof useGetTeamLearningObjectivesSuspenseQuery>; +export type GetTeamLearningObjectivesQueryResult = Apollo.QueryResult<GetTeamLearningObjectives, GetTeamLearningObjectivesVariables>; \ No newline at end of file diff --git a/graphql/subscriptions/Exercises.generated.ts b/graphql/subscriptions/Exercises.generated.ts index e4dc08295b68d150c25d44e40c52d60f55eb1611..548012a7270b2ec5429943329e5441ed19dd241c 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, 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 }>, 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 }> } | 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 }>, 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 }> } | 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":"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":"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":"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"}}]}}]} 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":"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":"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"}}]}}]} as unknown as DocumentNode; /** * __useExercises__ diff --git a/graphql/types.ts b/graphql/types.ts index 23e606144541106d7c9d8231cdaac71d59b32b92..b392dd2c6575adb797ff2d6665e824d993c6169f 100644 --- a/graphql/types.ts +++ b/graphql/types.ts @@ -147,6 +147,7 @@ export type ControlType = { export type CreateExerciseInput = { configOverride?: InputMaybe<ConfigOverrideInput>; definitionId: Scalars['ID']['input']; + name?: InputMaybe<Scalars['String']['input']>; teamCount: Scalars['Int']['input']; }; @@ -157,6 +158,7 @@ export type CreateExerciseMutation = { export type CreateExerciseType = { configOverride?: Maybe<ConfigOverrideType>; definitionId: Scalars['ID']['output']; + name?: Maybe<Scalars['String']['output']>; teamCount: Scalars['Int']['output']; }; @@ -201,6 +203,7 @@ export type DefinitionType = { files: Array<FileInfoType>; id: Scalars['ID']['output']; injects: Array<DefinitionInjectType>; + learningObjectives: Array<LearningObjectiveType>; name: Scalars['String']['output']; questionnaires: Array<QuestionnaireType>; roles: Array<DefinitionRoleType>; @@ -333,10 +336,11 @@ export type ExerciseType = { exerciseStart?: Maybe<Scalars['DateTime']['output']>; finished: Scalars['Boolean']['output']; id: Scalars['ID']['output']; + name: Scalars['String']['output']; running: Scalars['Boolean']['output']; teams: Array<TeamType>; threads: Array<EmailThreadType>; - userSet?: Maybe<RestrictedUser>; + userSet?: Maybe<Array<Maybe<RestrictedUser>>>; uuid: Scalars['UUID']['output']; }; @@ -431,6 +435,22 @@ export type InjectType = | 'TOOL' | '%future added value'; +export type LearningActivityType = { + id: Scalars['ID']['output']; + milestones: Array<MilestoneType>; + name: Scalars['String']['output']; + objective: LearningObjectiveType; + tags: Scalars['String']['output']; +}; + +export type LearningObjectiveType = { + activities: Array<LearningActivityType>; + definition: DefinitionType; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + tags: Scalars['String']['output']; +}; + /** An enumeration. */ export type LogType = | 'CUSTOM_INJECT' @@ -449,6 +469,7 @@ export type LogoutMutation = { }; export type MilestoneStateType = { + activity?: Maybe<TeamLearningActivityType>; id: Scalars['ID']['output']; milestone: MilestoneType; reached: Scalars['Boolean']['output']; @@ -457,6 +478,7 @@ export type MilestoneStateType = { }; export type MilestoneType = { + activity?: Maybe<LearningActivityType>; fileNames: Scalars['String']['output']; final: Scalars['Boolean']['output']; id: Scalars['ID']['output']; @@ -770,6 +792,8 @@ export type Query = { 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 all milestones for the specific team filtered by team visibility */ teamMilestones?: Maybe<Array<Maybe<MilestoneStateType>>>; /** Retrieve all questionnaire states for this team */ @@ -950,6 +974,11 @@ export type QueryTeamInjectSelectionsArgs = { }; +export type QueryTeamLearningObjectivesArgs = { + teamId: Scalars['ID']['input']; +}; + + export type QueryTeamMilestonesArgs = { teamId: Scalars['ID']['input']; visibleOnly?: InputMaybe<Scalars['Boolean']['input']>; @@ -1204,6 +1233,21 @@ export type TagType = { name: Scalars['String']['output']; }; +export type TeamLearningActivityType = { + activity: LearningActivityType; + id: Scalars['ID']['output']; + milestoneStates: Array<MilestoneStateType>; + reached?: Maybe<Scalars['Boolean']['output']>; + teamObjective: TeamLearningObjectiveType; +}; + +export type TeamLearningObjectiveType = { + activities: Array<TeamLearningActivityType>; + id: Scalars['ID']['output']; + objective: LearningObjectiveType; + reached?: Maybe<Scalars['Boolean']['output']>; +}; + /** An enumeration. */ export type TeamQuestionnaireStateStatus = /** Unsent */ @@ -1442,6 +1486,8 @@ export type ResolversTypes = ResolversObject<{ InjectSelectionsSubscription: ResolverTypeWrapper<InjectSelectionsSubscription>; InjectType: InjectType; Int: ResolverTypeWrapper<Scalars['Int']['output']>; + LearningActivityType: ResolverTypeWrapper<LearningActivityType>; + LearningObjectiveType: ResolverTypeWrapper<LearningObjectiveType>; LogType: LogType; LoginMutation: ResolverTypeWrapper<LoginMutation>; LogoutMutation: ResolverTypeWrapper<LogoutMutation>; @@ -1476,6 +1522,8 @@ export type ResolversTypes = ResolversObject<{ String: ResolverTypeWrapper<Scalars['String']['output']>; Subscription: ResolverTypeWrapper<{}>; TagType: ResolverTypeWrapper<TagType>; + TeamLearningActivityType: ResolverTypeWrapper<TeamLearningActivityType>; + TeamLearningObjectiveType: ResolverTypeWrapper<TeamLearningObjectiveType>; TeamQuestionnaireStateStatus: TeamQuestionnaireStateStatus; TeamQuestionnaireStateSubscription: ResolverTypeWrapper<TeamQuestionnaireStateSubscription>; TeamQuestionnaireStateType: ResolverTypeWrapper<TeamQuestionnaireStateType>; @@ -1550,6 +1598,8 @@ export type ResolversParentTypes = ResolversObject<{ InjectSelectionType: InjectSelectionType; InjectSelectionsSubscription: InjectSelectionsSubscription; Int: Scalars['Int']['output']; + LearningActivityType: LearningActivityType; + LearningObjectiveType: LearningObjectiveType; LoginMutation: LoginMutation; LogoutMutation: LogoutMutation; MilestoneStateType: MilestoneStateType; @@ -1583,6 +1633,8 @@ export type ResolversParentTypes = ResolversObject<{ String: Scalars['String']['output']; Subscription: {}; TagType: TagType; + TeamLearningActivityType: TeamLearningActivityType; + TeamLearningObjectiveType: TeamLearningObjectiveType; TeamQuestionnaireStateSubscription: TeamQuestionnaireStateSubscription; TeamQuestionnaireStateType: TeamQuestionnaireStateType; TeamType: TeamType; @@ -1703,6 +1755,7 @@ export type CreateExerciseMutationResolvers<ContextType = any, ParentType extend export type CreateExerciseTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['CreateExerciseType'] = ResolversParentTypes['CreateExerciseType']> = ResolversObject<{ configOverride?: Resolver<Maybe<ResolversTypes['ConfigOverrideType']>, ParentType, ContextType>; definitionId?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + name?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>; teamCount?: Resolver<ResolversTypes['Int'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -1757,6 +1810,7 @@ export type DefinitionTypeResolvers<ContextType = any, ParentType extends Resolv files?: Resolver<Array<ResolversTypes['FileInfoType']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; injects?: Resolver<Array<ResolversTypes['DefinitionInjectType']>, ParentType, ContextType>; + learningObjectives?: Resolver<Array<ResolversTypes['LearningObjectiveType']>, ParentType, ContextType>; name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; questionnaires?: Resolver<Array<ResolversTypes['QuestionnaireType']>, ParentType, ContextType>; roles?: Resolver<Array<ResolversTypes['DefinitionRoleType']>, ParentType, ContextType>; @@ -1882,10 +1936,11 @@ export type ExerciseTypeResolvers<ContextType = any, ParentType extends Resolver exerciseStart?: Resolver<Maybe<ResolversTypes['DateTime']>, ParentType, ContextType>; finished?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; running?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; teams?: Resolver<Array<ResolversTypes['TeamType']>, ParentType, ContextType>; threads?: Resolver<Array<ResolversTypes['EmailThreadType']>, ParentType, ContextType>; - userSet?: Resolver<Maybe<ResolversTypes['RestrictedUser']>, ParentType, ContextType>; + userSet?: Resolver<Maybe<Array<Maybe<ResolversTypes['RestrictedUser']>>>, ParentType, ContextType>; uuid?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; @@ -1971,6 +2026,24 @@ export type InjectSelectionsSubscriptionResolvers<ContextType = any, ParentType __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type LearningActivityTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['LearningActivityType'] = ResolversParentTypes['LearningActivityType']> = ResolversObject<{ + id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + milestones?: Resolver<Array<ResolversTypes['MilestoneType']>, ParentType, ContextType>; + name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + objective?: Resolver<ResolversTypes['LearningObjectiveType'], ParentType, ContextType>; + tags?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type LearningObjectiveTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['LearningObjectiveType'] = ResolversParentTypes['LearningObjectiveType']> = ResolversObject<{ + activities?: Resolver<Array<ResolversTypes['LearningActivityType']>, ParentType, ContextType>; + definition?: Resolver<ResolversTypes['DefinitionType'], ParentType, ContextType>; + id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + name?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + tags?: Resolver<ResolversTypes['String'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type LoginMutationResolvers<ContextType = any, ParentType extends ResolversParentTypes['LoginMutation'] = ResolversParentTypes['LoginMutation']> = ResolversObject<{ user?: Resolver<Maybe<ResolversTypes['UserType']>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -1982,6 +2055,7 @@ export type LogoutMutationResolvers<ContextType = any, ParentType extends Resolv }>; export type MilestoneStateTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['MilestoneStateType'] = ResolversParentTypes['MilestoneStateType']> = ResolversObject<{ + activity?: Resolver<Maybe<ResolversTypes['TeamLearningActivityType']>, ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; milestone?: Resolver<ResolversTypes['MilestoneType'], ParentType, ContextType>; reached?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; @@ -1991,6 +2065,7 @@ export type MilestoneStateTypeResolvers<ContextType = any, ParentType extends Re }>; export type MilestoneTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['MilestoneType'] = ResolversParentTypes['MilestoneType']> = ResolversObject<{ + activity?: Resolver<Maybe<ResolversTypes['LearningActivityType']>, ParentType, ContextType>; fileNames?: Resolver<ResolversTypes['String'], ParentType, ContextType>; final?: Resolver<ResolversTypes['Boolean'], ParentType, ContextType>; id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; @@ -2094,6 +2169,7 @@ export type QueryResolvers<ContextType = any, ParentType extends ResolversParent 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'>>; 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>; @@ -2253,6 +2329,23 @@ export type TagTypeResolvers<ContextType = any, ParentType extends ResolversPare __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; }>; +export type TeamLearningActivityTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['TeamLearningActivityType'] = ResolversParentTypes['TeamLearningActivityType']> = ResolversObject<{ + activity?: Resolver<ResolversTypes['LearningActivityType'], ParentType, ContextType>; + id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + milestoneStates?: Resolver<Array<ResolversTypes['MilestoneStateType']>, ParentType, ContextType>; + reached?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + teamObjective?: Resolver<ResolversTypes['TeamLearningObjectiveType'], ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + +export type TeamLearningObjectiveTypeResolvers<ContextType = any, ParentType extends ResolversParentTypes['TeamLearningObjectiveType'] = ResolversParentTypes['TeamLearningObjectiveType']> = ResolversObject<{ + activities?: Resolver<Array<ResolversTypes['TeamLearningActivityType']>, ParentType, ContextType>; + id?: Resolver<ResolversTypes['ID'], ParentType, ContextType>; + objective?: Resolver<ResolversTypes['LearningObjectiveType'], ParentType, ContextType>; + reached?: Resolver<Maybe<ResolversTypes['Boolean']>, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; +}>; + export type TeamQuestionnaireStateSubscriptionResolvers<ContextType = any, ParentType extends ResolversParentTypes['TeamQuestionnaireStateSubscription'] = ResolversParentTypes['TeamQuestionnaireStateSubscription']> = ResolversObject<{ teamQuestionnaireState?: Resolver<ResolversTypes['TeamQuestionnaireStateType'], ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>; @@ -2399,6 +2492,8 @@ export type Resolvers<ContextType = any> = ResolversObject<{ InjectSelectionConfirmationType?: InjectSelectionConfirmationTypeResolvers<ContextType>; InjectSelectionType?: InjectSelectionTypeResolvers<ContextType>; InjectSelectionsSubscription?: InjectSelectionsSubscriptionResolvers<ContextType>; + LearningActivityType?: LearningActivityTypeResolvers<ContextType>; + LearningObjectiveType?: LearningObjectiveTypeResolvers<ContextType>; LoginMutation?: LoginMutationResolvers<ContextType>; LogoutMutation?: LogoutMutationResolvers<ContextType>; MilestoneStateType?: MilestoneStateTypeResolvers<ContextType>; @@ -2428,6 +2523,8 @@ export type Resolvers<ContextType = any> = ResolversObject<{ StopExerciseMutation?: StopExerciseMutationResolvers<ContextType>; Subscription?: SubscriptionResolvers<ContextType>; TagType?: TagTypeResolvers<ContextType>; + TeamLearningActivityType?: TeamLearningActivityTypeResolvers<ContextType>; + TeamLearningObjectiveType?: TeamLearningObjectiveTypeResolvers<ContextType>; TeamQuestionnaireStateSubscription?: TeamQuestionnaireStateSubscriptionResolvers<ContextType>; TeamQuestionnaireStateType?: TeamQuestionnaireStateTypeResolvers<ContextType>; TeamType?: TeamTypeResolvers<ContextType>; diff --git a/graphql/utils/useTeamMilestonesSubscription.ts b/graphql/utils/useTeamMilestonesSubscription.ts index 5b82b1f0994aaa7b7533d9f3ad86b6a79a20b729..caacca941a79992568cef3ad67759a4dd7248e38 100644 --- a/graphql/utils/useTeamMilestonesSubscription.ts +++ b/graphql/utils/useTeamMilestonesSubscription.ts @@ -1,5 +1,7 @@ +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' @@ -16,6 +18,7 @@ const useTeamMilestonesSubscription = (teamId: string) => { }) const { subscribeToMore, networkStatus } = query + const client = useApolloClient() useEffect( () => @@ -34,6 +37,9 @@ const useTeamMilestonesSubscription = (teamId: string) => { ).filter(notEmpty) const oldInjects = (prev.teamMilestones || []).filter(notEmpty) if (newInject) { + client.refetchQueries({ + include: [GetTeamLearningObjectivesDocument], + }) return { ...prev, teamMilestones: mergeMilestoneState(oldInjects, newInject), diff --git a/shared/config/index.ts b/shared/config/index.ts index 4549c695051d11ac3901bab2266ae3b6ea356e98..043d83ca57b4da416e9d36a440b9d3f414832487 100644 --- a/shared/config/index.ts +++ b/shared/config/index.ts @@ -1,25 +1,27 @@ export const currentProtocol = () => typeof window == 'object' ? window.location.protocol.replace(':', '') : 'http' export const httpGraphql = (hostAddress: string) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/graphql/` + `${currentProtocol()}://${hostAddress}/inject/api/v1/graphql/` export const httpHello = (hostAddress: string) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/version` + `${currentProtocol()}://${hostAddress}/inject/api/v1/version` export const wsGraphql = (hostAddress: string) => - `ws://${hostAddress}/ttxbackend/api/v1/subscription/` + `ws://${hostAddress}/inject/api/v1/subscription/` export const uploadDefinitionUrl = (hostAddress: string) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/exercise_definition/upload-definition` + `${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}/ttxbackend/api/v1/running_exercise/get_exercise_logs/${exerciseId}` + `${currentProtocol()}://${hostAddress}/inject/api/v1/running_exercise/get_exercise_logs/${exerciseId}` export const downloadFileUrl = ( hostAddress: string, teamId: string, fileId: string, instructor: boolean ) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/running_exercise/${teamId}/${fileId}${ + `${currentProtocol()}://${hostAddress}/inject/api/v1/running_exercise/${teamId}/${fileId}${ instructor ? '?instructor' : '' }` export const uploadFileUrl = (hostAddress: string, teamId: string) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/running_exercise/upload/${teamId}/` + `${currentProtocol()}://${hostAddress}/inject/api/v1/running_exercise/upload/${teamId}/` export const exportImportUrl = (hostAddress: string) => - `${currentProtocol()}://${hostAddress}/ttxbackend/api/v1/export_import` + `${currentProtocol()}://${hostAddress}/inject/api/v1/export_import`