diff --git a/.env.template b/.env.template index 4014a50c4..21970761e 100644 --- a/.env.template +++ b/.env.template @@ -19,12 +19,17 @@ EDAN_SERVER= EDAN_APPID= OCFL_STORAGE_ROOT= OCFL_STAGING_ROOT= +COOK_SERVER_URL= +AUTH_TYPE= +LDAP_SERVER= +LDAP_PASSWORD= +LDAP_CN= +LDAP_OU= +LDAP_DC= # SOLR PACKRAT_SOLR_PORT= PACKRAT_SOLR_HOST= - - - - +# PROXY +PACKRAT_PROXY_PORT= diff --git a/.eslintignore b/.eslintignore index ba4f6af9a..641eeb036 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,4 +5,6 @@ node_modules/ **/.webpack/ *.json *.md -*.yml \ No newline at end of file +*.yml +client/src/types/graphql.tsx +server/types/graphql.ts diff --git a/.eslintrc.js b/.eslintrc.js index f5e4074f2..7d5143ca9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -47,6 +47,8 @@ module.exports = { 'object-shorthand': ['error', 'always'], '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/no-empty-function': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], 'require-atomic-updates': 'off', // JSX RULES 'jsx-quotes': ['error', 'prefer-single'], diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0cecef3d..4723857a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,14 +52,17 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Setup test DB + run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test -e 'CREATE DATABASE IF NOT EXISTS Packrat' + - name: Setup test DB Schema - run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test < server/db/sql/scripts/Packrat.SCHEMA.sql + run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test --database=Packrat < server/db/sql/scripts/Packrat.SCHEMA.sql - name: Setup test DB Proc - run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test < server/db/sql/scripts/Packrat.PROC.sql + run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test --database=Packrat < server/db/sql/scripts/Packrat.PROC.sql - name: Setup test DB Data - run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test < server/db/sql/scripts/Packrat.DATA.sql + run: mysql -h 127.0.0.1 -v -P 3306 -u root --password=test --database=Packrat < server/db/sql/scripts/Packrat.DATA.sql - name: Setup node version uses: actions/setup-node@v1 @@ -82,11 +85,12 @@ jobs: DATABASE_URL: mysql://root:test@localhost:3306/Packrat build: - # Only run this step on push to specified branches (PR merge counts as push too) - if: github.event_name == 'push' + # Only run this step on pull_request or push to specified branches (PR merge counts as push too) + if: ${{github.event_name == 'pull_request' || github.event_name == 'push'}} runs-on: ubuntu-latest needs: test env: # Ideally this will be stored in github secrets and will be accessed via ${{ secrets.* }} + PACKRAT_PROXY_PORT: 80 PACKRAT_CLIENT_PORT: 3000 PACKRAT_SERVER_PORT: 4000 PACKRAT_DB_PORT: 3306 @@ -109,16 +113,17 @@ jobs: run: touch .env.dev && touch .env.prod - name: Build Dev images - run: docker-compose --env-file .env.dev -f docker-compose.dev.yml build - if: contains(github.ref, 'develop') + if: ${{!contains(github.ref, 'master')}} + run: docker-compose --env-file .env.dev -f ./conf/docker/docker-compose.dev.yml build - name: Build Prod images - run: docker-compose --env-file .env.prod -f docker-compose.prod.yml build if: contains(github.ref, 'master') + run: docker-compose --env-file .env.prod -f ./conf/docker/docker-compose.prod.yml build # Prepares tag for docker images - name: Prepare image tag id: prepare-tag + if: ${{contains(github.ref, 'develop') || contains(github.ref, 'master')}} run: | if [ ${{ contains(github.ref, 'master') }} = true ]; then stage="prod"; else stage="dev"; fi version=${{ steps.packrat-version.outputs.current-version }} @@ -127,6 +132,7 @@ jobs: # Tags images with "stage-env-version-commit-sha" eg. dev-1.0.0-abcd123 - name: Tag images + if: ${{contains(github.ref, 'develop') || contains(github.ref, 'master')}} run: | echo Tagging with ${{ steps.prepare-tag.outputs.tag }} docker tag packrat-server:latest packrat-server:${{ steps.prepare-tag.outputs.tag }} @@ -135,6 +141,7 @@ jobs: # Runs commands post-build - name: Build cleanup + if: ${{contains(github.ref, 'develop') || contains(github.ref, 'master')}} run: | echo Cleaning up redundant tags docker rmi packrat-server:latest packrat-client:latest packrat-proxy:latest @@ -142,4 +149,5 @@ jobs: # Pushes built images to container registry - name: Push images + if: ${{contains(github.ref, 'develop') || contains(github.ref, 'master')}} run: echo Pushing images to container registry... diff --git a/.gitignore b/.gitignore index f3562b30b..72c560f39 100644 --- a/.gitignore +++ b/.gitignore @@ -108,4 +108,9 @@ dist .vscode/* ### Builds ### -build \ No newline at end of file +build + +### Custom ### +server/var +server/tests/mock/models/**/eremotherium_laurillardi* +server/config/solr/data/packrat/data \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index ba4f6af9a..641eeb036 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,4 +5,6 @@ node_modules/ **/.webpack/ *.json *.md -*.yml \ No newline at end of file +*.yml +client/src/types/graphql.tsx +server/types/graphql.ts diff --git a/.prettierrc.js b/.prettierrc.js index 56a70ce33..8b4ce2428 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -3,7 +3,7 @@ module.exports = { printWidth: 180, tabWidth: 4, trailingComma: 'none', - jsxBracketSameLine: true, + jsxBracketSameLine: false, jsxSingleQuote: true, arrowParens: 'avoid' }; diff --git a/README.md b/README.md index a820f9c06..5fbc7a1f7 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,14 @@ yarn start:server # Alternative docker workflow: ``` +# If step 2. wasn't working, follow this alternative instead. # Creates Devbox for packrat yarn devbox:up # Creates DB for devbox yarn devbox:db -# Create and Connects db and devbox to the same network +# Creates SOLR for devbox +yarn devbox:solr +# Create and Connects devbox-db, devbox-solr, and devbox to the same network yarn devbox:network # Drops you into shell inside the image yarn devbox:start @@ -64,7 +67,7 @@ yarn devbox:start *Note: if you get permission denied during the execution make sure to give it permission using:* ``` -chmod 777 ./scripts/devbox/*.sh +chmod 777 ./conf/scripts/devbox/*.sh ``` # Deployment instructions: @@ -89,7 +92,7 @@ git checkout master 4. Deploy using the `deploy.sh` script ``` -./scripts/deploy.sh prod +./conf/scripts/deploy.sh prod ``` If you get `permission denied for docker` then use ``` @@ -100,15 +103,15 @@ If you get `Error while loading shared libraries: libz.so.1` for `docker-compose sudo mount /tmp -o remount,exec ``` -5. Wait for the images to be build/updated, then use `cleanup.sh` script to cleanup any residual docker images are left (optional) +5. Wait for the images to be build/updated, then use `./conf/scripts/cleanup.sh` script to cleanup any residual docker images are left (optional) 6. Make sure nginx is active using `sudo service nginx status --no-pager` ## Start databases (Production server only): -1. Start `dev` or `prod` databases using `scripts/initdb.sh` script +1. Start `dev` or `prod` databases using `./conf/scripts/initdb.sh` script ``` -MYSQL_ROOT_PASSWORD= ./scripts/initdb.sh dev +MYSQL_ROOT_PASSWORD= ./conf/scripts/initdb.sh dev ``` *Note: `MYSQL_ROOT_PASSWORD` be same what you mentioned in the `.env.dev` or `.env.prod` file for that particular environment. Mostly would be used for `dev` environment.* @@ -116,7 +119,7 @@ MYSQL_ROOT_PASSWORD= ./scripts/initdb.sh dev 1. Make the changes to production nginx configuration is located at `scripts/proxy/nginx.conf` -2. Use `scripts/proxy/refresh.sh` script to restart/update nginx service +2. Use `conf/scripts/refreshProxy.sh` script to restart/update nginx service ``` -./scripts/proxy/refresh.sh +./conf/scripts/refreshProxy.sh ``` diff --git a/client/package.json b/client/package.json index 71ad07bb2..ec4c42a05 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "@dpo-packrat/client", - "version": "0.4.0", + "version": "0.6.0", "private": true, "license": "Apache-2.0", "description": "Client for Packrat", @@ -25,6 +25,7 @@ "@apollo/client": "3.1.5", "@date-io/date-fns": "1.3.13", "@material-ui/core": "4.11.0", + "@material-ui/data-grid": "4.0.0-alpha.20", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.56", "@material-ui/pickers": "3.2.10", @@ -69,6 +70,10 @@ "yup": "0.29.3", "zustand": "3.1.3" }, + "devDependencies": { + "jest": "24.9.0", + "ts-jest": "24.3.0" + }, "scripts": { "start": "react-app-rewired start", "start:prod": "react-app-rewired start", @@ -92,7 +97,7 @@ ] }, "volta": { - "node": "12.18.4", - "yarn": "1.22.4" + "node": "14.16.0", + "yarn": "1.22.10" } } diff --git a/client/src/components/controls/DateInputField.tsx b/client/src/components/controls/DateInputField.tsx index 92119bd7d..c65dfc706 100644 --- a/client/src/components/controls/DateInputField.tsx +++ b/client/src/components/controls/DateInputField.tsx @@ -17,7 +17,7 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ width: '50%', background: palette.background.paper, border: (updated: boolean) => `1px solid ${fade(updated ? palette.secondary.main : palette.primary.contrastText, 0.4)}`, - backgroundColor: (updated: boolean) => updated ? palette.secondary.light : palette.background.paper, + backgroundColor: (updated: boolean) => (updated ? palette.secondary.light : palette.background.paper), padding: '1px 8px', color: Colors.defaults.white, marginTop: 0, @@ -26,14 +26,15 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ minWidth: 160, maxWidth: 160, '& > div > input': { - fontSize: '0.8em', + fontSize: '0.8em' } - } + }, + marginBottom: 0 } })); interface DateInputFieldProps extends ViewableProps { - value: Date; + value: Date | null | string; onChange: (date: MaterialUiPickersDate, value?: string | null | undefined) => void; } @@ -58,4 +59,4 @@ function DateInputField(props: DateInputFieldProps): React.ReactElement { ); } -export default DateInputField; \ No newline at end of file +export default DateInputField; diff --git a/client/src/components/controls/ReadOnlyRow.tsx b/client/src/components/controls/ReadOnlyRow.tsx new file mode 100644 index 000000000..6dd5fcb0b --- /dev/null +++ b/client/src/components/controls/ReadOnlyRow.tsx @@ -0,0 +1,34 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +/* eslint-disable react/jsx-max-props-per-line */ + +/** + * ReadOnlyRow + * + * */ +import React from 'react'; +import { Typography, Box } from '@material-ui/core/'; +import { ViewableProps } from '../../types/repository'; +import FieldType from '../shared/FieldType'; + +interface ReadOnlyRowProps extends ViewableProps { + label: string; + value?: number | string | null; +} + +function ReadOnlyRow(props: ReadOnlyRowProps): React.ReactElement { + const { label, value } = props; + + const rowFieldProps = { alignItems: 'center', justifyContent: 'space-between', style: { borderRadius: 0 } }; + + return ( + + + + {value} + + + + ); +} + +export default ReadOnlyRow; diff --git a/client/src/components/controls/SelectField.tsx b/client/src/components/controls/SelectField.tsx index 55ea039f4..9a0ece46c 100644 --- a/client/src/components/controls/SelectField.tsx +++ b/client/src/components/controls/SelectField.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * SelectField * @@ -16,15 +18,15 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ padding: '0px 10px', background: palette.background.paper, border: (updated: boolean) => `1px solid ${fade(updated ? palette.secondary.main : palette.primary.contrastText, 0.4)}`, - backgroundColor: (updated: boolean) => updated ? palette.secondary.light : palette.background.paper, + backgroundColor: (updated: boolean) => (updated ? palette.secondary.light : palette.background.paper), borderRadius: 5, fontFamily: typography.fontFamily, [breakpoints.down('lg')]: { fontSize: '0.8em', minWidth: 180, - maxWidth: 180, + maxWidth: 180 } - }, + } })); interface SelectFieldProps extends ViewableProps { @@ -53,18 +55,15 @@ function SelectField(props: SelectFieldProps): React.ReactElement { containerProps={rowFieldProps} width={width || viewMode ? 'auto' : undefined} > - + {options.map(({ idVocabulary, Term }, index) => ( + + {Term} + + ))} ); } -export default SelectField; \ No newline at end of file +export default SelectField; diff --git a/client/src/components/index.ts b/client/src/components/index.ts index c35106767..3a90206c3 100644 --- a/client/src/components/index.ts +++ b/client/src/components/index.ts @@ -22,6 +22,7 @@ import EmptyTable from './shared/EmptyTable'; import EnvBanner from './shared/EnvBanner'; import DebounceNumberInput from './controls/DebounceNumberInput'; import CheckboxField from './controls/CheckboxField'; +import ReadOnlyRow from './controls/ReadOnlyRow'; export { Header, @@ -44,6 +45,7 @@ export { EnvBanner, DebounceNumberInput, CheckboxField, + ReadOnlyRow }; export type { RepositoryIconProps }; diff --git a/client/src/components/shared/AssetIdentifiers.tsx b/client/src/components/shared/AssetIdentifiers.tsx index 22bdeb683..c4092d14b 100644 --- a/client/src/components/shared/AssetIdentifiers.tsx +++ b/client/src/components/shared/AssetIdentifiers.tsx @@ -1,4 +1,4 @@ -import { Box, Checkbox, Typography } from '@material-ui/core'; +import { Box, Checkbox, Typography, Button } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import lodash from 'lodash'; import React from 'react'; @@ -11,12 +11,19 @@ const useStyles = makeStyles(({ palette, spacing }) => ({ assetIdentifier: { display: 'flex', alignItems: 'center', - marginBottom: 10, + marginBottom: 10 }, systemCreatedText: { marginLeft: spacing(2), fontStyle: 'italic', color: palette.primary.contrastText + }, + addIdentifierButton: { + height: 30, + width: 80, + fontSize: '0.8em', + color: '#FFFFFF', + backgroundColor: '#0079C4' } })); @@ -67,15 +74,26 @@ function AssetIdentifiers(props: AssetIdentifiersProps): React.ReactElement { return ( - - - System will create an identifier + + + + + System will create an identifier + + + {!identifiers.length && ( + + )} + ({ borderRadius: 5, width: ({ width }: FieldTypeProps) => width || '100%', marginTop: ({ marginTop }: FieldTypeProps) => spacing(marginTop || 0), - backgroundColor: ({ required, error }: FieldTypeProps) => error ? fade(palette.error.light, 0.3) : required ? palette.primary.light : palette.secondary.light + backgroundColor: ({ required, error }: FieldTypeProps) => (error ? fade(palette.error.light, 0.3) : required ? palette.primary.light : palette.secondary.light) }, label: { - margin: '5px 0px 10px 0px', color: palette.primary.dark }, loading: { @@ -47,7 +46,11 @@ function FieldType(props: FieldTypeProps): React.ReactElement { const { label, renderLabel, children, align = 'left', direction, containerProps, labelProps, loading } = props; const classes = useStyles(props); - let content: React.ReactNode = {label}; + let content: React.ReactNode = ( + + {label} + + ); if (renderLabel === false) { content = null; @@ -62,4 +65,4 @@ function FieldType(props: FieldTypeProps): React.ReactElement { ); } -export default FieldType; \ No newline at end of file +export default FieldType; diff --git a/client/src/components/shared/GenericBreadcrumbsView.tsx b/client/src/components/shared/GenericBreadcrumbsView.tsx new file mode 100644 index 000000000..5ebd62b19 --- /dev/null +++ b/client/src/components/shared/GenericBreadcrumbsView.tsx @@ -0,0 +1,94 @@ +/** + * BreadcrumbsView + * + * This is a reusable component which renders breadcrumbs. + */ +import { Breadcrumbs } from '@material-ui/core'; +import { fade, makeStyles } from '@material-ui/core/styles'; +import clsx from 'clsx'; +import React from 'react'; +import { Colors } from '../../theme'; +import { Link } from 'react-router-dom'; +import ArrowRightIcon from '@material-ui/icons/ArrowRight'; +import { toTitleCase } from '../../constants/helperfunctions'; + +const useStyles = makeStyles(({ palette, breakpoints }) => ({ + container: { + display: 'flex', + color: palette.primary.dark + }, + highlighted: { + backgroundColor: fade(palette.primary.main, 0.8), + color: palette.background.paper, + padding: '2.5px 10px', + borderRadius: 5 + }, + label: { + [breakpoints.down('lg')]: { + fontSize: '0.8em' + } + }, + selectIcon: { + color: Colors.defaults.white, + [breakpoints.down('lg')]: { + fontSize: '0.8em' + } + }, + menuItem: { + fontSize: '0.8em' + } +})); + +interface BreadcrumbsViewProps { + items: string; + highlighted?: boolean; + end?: string | null; +} + +function GenericBreadcrumbsView(props: BreadcrumbsViewProps): React.ReactElement { + const { items, highlighted = false, end = null } = props; + const classes = useStyles(); + + const splitPathCrumbsArray = items.split('/'); + const finalPathCrumbsArray = splitPathCrumbsArray.map(subPath => { + return { + subPath, + fullPath: '' + }; + }); + + let currentFullPath = ''; + for (let i = 0; i < finalPathCrumbsArray.length; i++) { + currentFullPath += `${finalPathCrumbsArray[i].subPath}/`; + finalPathCrumbsArray[i].fullPath = currentFullPath; + } + + return ( + }> + {finalPathCrumbsArray.map((item, index) => { + if (index === finalPathCrumbsArray.length - 1 && end) { + return null; + } + if (index === finalPathCrumbsArray.length - 1) { + return
{toTitleCase(item.subPath)}
; + } + return ( + + {toTitleCase(item.subPath)} + + ); + })} + {end &&
{end}
} +
+ ); +} + +// takes in a string +// e.g. '/admin/user/create' +// each crumb shows the name of the crumb +// links to different one each time +// /admin, /admin/user, /admin/user/create +// creates link for everything but the very last one +// if an option end is included, that will guaranteed to be the final crumb + +export default GenericBreadcrumbsView; diff --git a/client/src/components/shared/Header.tsx b/client/src/components/shared/Header.tsx index b04c06b9f..29cf264f9 100644 --- a/client/src/components/shared/Header.tsx +++ b/client/src/components/shared/Header.tsx @@ -1,9 +1,9 @@ /** * Header * - * This component renders the dashboard's header. + * This component renders the header consistent across the app. */ -import { Box, Typography } from '@material-ui/core'; +import { Box, Typography, Button } from '@material-ui/core'; import { fade, makeStyles } from '@material-ui/core/styles'; import React from 'react'; import { DebounceInput } from 'react-debounce-input'; @@ -11,6 +11,7 @@ import { IoIosLogOut, IoIosNotifications, IoIosSearch } from 'react-icons/io'; import { Link, useHistory, useLocation } from 'react-router-dom'; import { toast } from 'react-toastify'; import Logo from '../../assets/images/logo-packrat.square.png'; +import { generateRepositoryUrl } from '../../utils/repository'; import { Selectors } from '../../config'; import { HOME_ROUTES, resolveRoute, ROUTES } from '../../constants'; import { useRepositoryStore, useUserStore } from '../../store'; @@ -27,7 +28,7 @@ const useStyles = makeStyles(({ palette, spacing, typography, breakpoints }) => color: Colors.defaults.white }, logo: { - paddingRight: spacing(2), + paddingRight: spacing(2) }, searchBox: { display: 'flex', @@ -39,8 +40,8 @@ const useStyles = makeStyles(({ palette, spacing, typography, breakpoints }) => borderRadius: 5, backgroundColor: fade(Colors.defaults.white, 0.1), [breakpoints.down('lg')]: { - marginLeft: 30, - }, + marginLeft: 30 + } }, search: { height: 25, @@ -55,7 +56,7 @@ const useStyles = makeStyles(({ palette, spacing, typography, breakpoints }) => fontFamily: typography.fontFamily, [breakpoints.down('lg')]: { height: 20, - fontSize: 14, + fontSize: 14 }, '&::placeholder': { color: fade(Colors.defaults.white, 0.65), @@ -77,6 +78,12 @@ const useStyles = makeStyles(({ palette, spacing, typography, breakpoints }) => marginLeft: spacing(2), transition: 'all 250ms ease-in', cursor: 'pointer' + }, + headerButton: { + color: 'white', + width: '90px', + height: '30px', + border: 'solid 1px white' } })); @@ -85,12 +92,15 @@ function Header(): React.ReactElement { const history = useHistory(); const { pathname } = useLocation(); const { user, logout } = useUserStore(); - const [search, updateSearch] = useRepositoryStore(state => [state.search, state.updateSearch]); - - const onSearch = (): void => { - const route: string = resolveRoute(HOME_ROUTES.REPOSITORY); - history.push(route); - }; + const [keyword, updateSearch, getFilterState, initializeTree, resetRepositoryFilter, updateRepositoryFilter, resetKeywordSearch] = useRepositoryStore(state => [ + state.keyword, + state.updateSearch, + state.getFilterState, + state.initializeTree, + state.resetRepositoryFilter, + state.updateRepositoryFilter, + state.resetKeywordSearch + ]); const onLogout = async (): Promise => { const isConfirmed = global.confirm('Are you sure you want to logout?'); @@ -109,35 +119,115 @@ function Header(): React.ReactElement { const isRepository = pathname.includes(HOME_ROUTES.REPOSITORY); + // Specific to search while in repository view + const updateRepositorySearch = (): void => { + const filterState = getFilterState(); + filterState.repositoryRootType = []; + filterState.search = filterState.keyword; + updateRepositoryFilter(filterState); + const updatedFilterState = getFilterState(); + const repositoryURL = generateRepositoryUrl(updatedFilterState); + const route: string = resolveRoute(HOME_ROUTES.REPOSITORY); + history.push(route + repositoryURL); + initializeTree(); + }; + + // General search function when in different views + const onSearch = (): void => { + const route: string = resolveRoute(HOME_ROUTES.REPOSITORY); + resetRepositoryFilter(); + const filterState = getFilterState(); + filterState.search = filterState.keyword; + updateRepositoryFilter(filterState); + history.push(route); + }; + + // Filter and keyword clear when in Repository + const clearSearchAndUpdateRepositorySearch = (): void => { + resetKeywordSearch(); + resetRepositoryFilter(); + updateRepositorySearch(); + }; + return ( - + packrat - {user?.Name} + + {user?.Name} + - {isRepository && ( - - + + + {/* Note: + The way the search in repository view is slightly different from other views. In other views, search simply + pushes history to the repository view and lets react hooks handle the search with the filters held in state. While + in repository view, the search needs to reconstruct the URL based on the state of the search and then re-initialize the tree */} + {isRepository ? ( updateSearch(target.value)} + onKeyPress={e => { + if (e.key === 'Enter') { + updateRepositorySearch(); + } + }} forceNotifyByEnter debounceTimeout={400} - placeholder='Search...' + placeholder='Search Repository' /> - - )} - - {!isRepository && ( + ) : ( + updateSearch(target.value)} + onKeyPress={e => { + if (e.key === 'Enter') { + onSearch(); + } + }} + forceNotifyByEnter + debounceTimeout={400} + placeholder='Search Repository' + /> + )} + + {isRepository ? ( + + + + + + + + + ) : ( + - + - )} + + + + + )} + + diff --git a/client/src/components/shared/IdentifierList.tsx b/client/src/components/shared/IdentifierList.tsx index c81e64dc1..74de73828 100644 --- a/client/src/components/shared/IdentifierList.tsx +++ b/client/src/components/shared/IdentifierList.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * IdentifierList * @@ -26,7 +28,7 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ fontFamily: typography.fontFamily, borderBottom: `1px solid ${palette.grey[300]}`, '&:focus': { - outline: 'none', + outline: 'none' }, '&::placeholder': { fontStyle: 'italic' @@ -44,7 +46,7 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ borderRadius: 5, fontFamily: typography.fontFamily, [breakpoints.down('lg')]: { - fontSize: '0.8em', + fontSize: '0.8em' } }, identifierOption: { @@ -61,7 +63,7 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ })); interface IdentifierListProps extends ViewableProps { - identifiers: StateIdentifier[] + identifiers: StateIdentifier[]; onAdd: (initialEntry: number | null) => void; onUpdate: (id: number, fieldName: string, fieldValue: number | string | boolean) => void; onRemove: (id: number) => void; @@ -75,7 +77,7 @@ function IdentifierList(props: IdentifierListProps): React.ReactElement { const hasIdentifiers: boolean = !!identifiers.length; return ( - + {hasIdentifiers &&
} {!hasIdentifiers && viewMode && ( @@ -89,20 +91,8 @@ function IdentifierList(props: IdentifierListProps): React.ReactElement { const update = ({ target }) => onUpdate(id, target.name, target.value); return ( - - + + - + {identifierTypes.map(({ idVocabulary, Term }, index) => ( + + {Term} + + ))} @@ -157,4 +144,4 @@ function Header(): React.ReactElement { ); } -export default IdentifierList; \ No newline at end of file +export default IdentifierList; diff --git a/client/src/constants/helperfunctions.ts b/client/src/constants/helperfunctions.ts new file mode 100644 index 000000000..4d5bf98b3 --- /dev/null +++ b/client/src/constants/helperfunctions.ts @@ -0,0 +1,103 @@ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +export function toTitleCase(str: string): string { + return str.replace(/\w\S*/g, txt => { + return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); + }); +} + +export function formatISOToHoursMinutes(time: string): string { + const newTime = new Date(time); + let hours = String(newTime.getHours() + 1); + let minutes = String(newTime.getMinutes()); + if (Number(hours) < 10) { + hours = '0' + hours; + } + if (Number(minutes) < 10) { + minutes = '0' + minutes; + } + return `${hours}:${minutes}`; +} + +export function extractISOMonthDateYear(iso: string | Date, materialUI = false): string | null { + if (!iso) + return null; + + const time = new Date(iso); + if (materialUI) { + // year-month-date + const year = String(time.getFullYear()); + let month = String(time.getMonth() + 1); + let date = String(time.getDate()); + if (Number(month) < 10) { + month = '0' + month; + } + if (Number(date) < 10) { + date = '0' + date; + } + const result = `${year}-${month}-${date}`; + return result; + } + const result = `${time.getMonth() + 1}/${time.getDate()}/${time.getFullYear()}`; + return result; +} + + +export function extractModelConstellation(data: any) { + if (!data) { + return { + ingestionModel: {}, + modelObjects: [], + assets: [] + }; + } + const { Model, ModelObjectModelMaterialXref, ModelAssets, ModelObjects, ModelMaterialChannels, ModelMaterials } = data; + const modelObjects: any = []; + const assets: any = []; + const ModelMaterialsHash = {}; + const ingestionModel = { + ...Model + }; + + if (ModelMaterials) { + ModelMaterials.forEach((modelMaterial) => { + ModelMaterialsHash[modelMaterial.idModelMaterial] = { + idModelMaterial: modelMaterial.idModelMaterial, + Name: modelMaterial.Name, + ModelMaterialChannel: [] + }; + }); + } + + if (ModelMaterialChannels) { + ModelMaterialChannels.forEach((channel) => { + if (ModelMaterialsHash[channel.idModelMaterial]) { + ModelMaterialsHash[channel.idModelMaterial].ModelMaterialChannel.push(channel); + } + }); + } + + if (ModelObjects) { + ModelObjects.forEach((modelObject) => { + const modelObj = { ...modelObject }; + modelObj['ModelMaterials'] = []; + modelObjects.push(modelObj); + }); + } + + + if (ModelObjectModelMaterialXref) { + ModelObjectModelMaterialXref.forEach((xref) => { + const ind = modelObjects.findIndex((modelObject) => modelObject.idModelObject === xref.idModelObject); + if (ind !== -1) { + modelObjects[ind].ModelMaterials.push(ModelMaterialsHash[xref.idModelMaterial]); + } + }); + } + + if (ModelAssets) { + ModelAssets.forEach((asset) => assets.push({ assetName: asset.AssetName, assetType: asset.AssetType })); + } + + return { ingestionModel, modelObjects, assets }; +} diff --git a/client/src/constants/index.ts b/client/src/constants/index.ts index a3820983e..485b0fcc2 100644 --- a/client/src/constants/index.ts +++ b/client/src/constants/index.ts @@ -1 +1,2 @@ export * from './routes'; +export * from './helperfunctions'; diff --git a/client/src/constants/routes.ts b/client/src/constants/routes.ts index 8582209b5..5dc1d5abf 100644 --- a/client/src/constants/routes.ts +++ b/client/src/constants/routes.ts @@ -50,10 +50,29 @@ export const REPOSITORY_ROUTE = { ROUTES: REPOSITORY_ROUTES_TYPE }; +export const ADMIN_EDIT_USER = { + USER: 'user/:idUser' +}; + +export const ADMIN_ROUTES_TYPE = { + USERS: 'users', + EDIT: ADMIN_EDIT_USER, + USER: 'user', + PROJECTS: 'projects', + UNITS: 'units', + CREATEPROJECT: 'projects/create', + CREATEUNIT: 'units/create' +}; + +export const ADMIN_ROUTE = { + TYPE: 'admin', + ROUTES: ADMIN_ROUTES_TYPE +}; + export function resolveRoute(route: string): string { return `/${route}`; } export function resolveSubRoute(parentRoute: string, route: string): string { return `/${parentRoute}/${route}`; -} +} \ No newline at end of file diff --git a/client/src/pages/Admin/components/AddProjectForm.tsx b/client/src/pages/Admin/components/AddProjectForm.tsx new file mode 100644 index 000000000..4711b1557 --- /dev/null +++ b/client/src/pages/Admin/components/AddProjectForm.tsx @@ -0,0 +1,215 @@ +/* eslint-disable react/jsx-max-props-per-line */ +/* eslint-disable react/jsx-boolean-value */ + +import { Box, Typography, FormControl, TextField, FormHelperText } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import React, { useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import { toast } from 'react-toastify'; +import { LoadingButton } from '../../../components'; +import { DebounceInput } from 'react-debounce-input'; +import { CreateProjectDocument } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import { toTitleCase } from '../../../constants/helperfunctions'; +import * as yup from 'yup'; + +const useStyles = makeStyles(({ palette, breakpoints }) => ({ + container: { + display: 'flex', + flex: 1, + flexDirection: 'column', + maxHeight: 'calc(100vh - 60px)', + width: '1200px', + overflowY: 'scroll', + marginLeft: '1%', + marginTop: '1%', + [breakpoints.down('lg')]: { + maxHeight: 'calc(100vh - 120px)', + padding: 10 + } + }, + updateButton: { + height: 35, + width: 100, + marginTop: 30, + color: palette.background.paper, + [breakpoints.down('lg')]: { + height: 30 + } + }, + formContainer: { + width: '700px', + maxHeight: '90%', + borderRadius: 10, + padding: '10px 20px', + background: '#687DDB1A 0% 0% no-repeat padding-box;', + border: '1px solid #B7D2E5CC', + boxShadow: '0 0 0 15px #75B3DF', + marginTop: '2%', + marginLeft: '1%' + }, + formRow: { + display: 'grid', + gridTemplateColumns: '30% 70%', + gridGap: '10px', + alignItems: 'center', + minHeight: '5%', + paddingTop: '10px', + paddingBottom: '10px', + '&:not(:last-child)': { + borderBottom: '1px solid #D8E5EE' + } + }, + formRowLabel: { + gridColumnStart: '1' + }, + formRowInput: { + gridColumnStart: '2' + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + }, + descriptionInput: { + backgroundColor: 'white', + borderRadius: '4px', + width: '80%', + minHeight: '100px' + } +})); + +function AddProjectForm(): React.ReactElement { + const classes = useStyles(); + const history = useHistory(); + const [isUpdatingData, setIsUpdatingData] = useState(false); + const [name, setName] = useState(''); + const [description, setDescription] = useState(''); + + // these are the states referenced when rendering error inputs after failed validation + const [validName, setValidName] = useState(null); + + const singularSystemObjectType = 'project'; + + // schema for validating the appropriate form fields + const schema = yup.object().shape({ + name: yup.string().min(1) + }); + + const onNameUpdate = ({ target }) => { + setName(target.value); + }; + + const onDescriptionUpdate = ({ target }) => { + setDescription(target.value); + }; + + // Handles validation for the different system object types + const validateFields = async (): Promise => { + try { + const isValidName = await schema.isValid({ name }); + setValidName(isValidName); + if (!isValidName) { + toast.warn('Creation Failed: Please Address The Errors Above'); + } + return isValidName; + } catch (error) { + toast.warn(error); + } finally { + setIsUpdatingData(false); + } + }; + + const createProject = async (): Promise => { + setIsUpdatingData(true); + + const validUpdate = await validateFields(); + if (!validUpdate) return; + + let newProjectSystemObjectId; + try { + const { data } = await apolloClient.mutate({ + mutation: CreateProjectDocument, + variables: { + input: { + Name: name, + Description: description + } + } + }); + if (data?.createProject) { + toast.success('Project created successfully'); + newProjectSystemObjectId = data?.createProject?.Project?.SystemObject?.idSystemObject; + } else { + throw new Error('Create request returned success: false'); + } + } catch (error) { + toast.error('Failed to create project'); + } finally { + setIsUpdatingData(false); + if (newProjectSystemObjectId) { + history.push(`/repository/details/${newProjectSystemObjectId}`); + } else { + toast.error('Unable to retrieve new System Object Id'); + } + } + }; + + return ( + + + + {toTitleCase(singularSystemObjectType)} Name + + {validName !== false ? ( + + ) : ( + + + Required + + )} + + + + Description + + + + + + + Create + + + ); +} + +export default AddProjectForm; diff --git a/client/src/pages/Admin/components/AddUnitForm.tsx b/client/src/pages/Admin/components/AddUnitForm.tsx new file mode 100644 index 000000000..ccffa9ac9 --- /dev/null +++ b/client/src/pages/Admin/components/AddUnitForm.tsx @@ -0,0 +1,254 @@ +/* eslint-disable react/jsx-max-props-per-line */ +/* eslint-disable react/jsx-boolean-value */ + +import { Box, Typography, FormControl, TextField, FormHelperText } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import React, { useState } from 'react'; +import { useHistory } from 'react-router-dom'; +import { toast } from 'react-toastify'; +import { LoadingButton } from '../../../components'; +import { CreateUnitDocument } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import { toTitleCase } from '../../../constants/helperfunctions'; +import * as yup from 'yup'; + +const useStyles = makeStyles(({ palette, breakpoints }) => ({ + container: { + display: 'flex', + flex: 1, + flexDirection: 'column', + maxHeight: 'calc(100vh - 60px)', + width: '1200px', + overflowY: 'scroll', + marginLeft: '1%', + marginTop: '1%', + [breakpoints.down('lg')]: { + maxHeight: 'calc(100vh - 120px)', + padding: 10 + } + }, + updateButton: { + height: 35, + width: 100, + marginTop: 30, + color: palette.background.paper, + [breakpoints.down('lg')]: { + height: 30 + } + }, + formContainer: { + width: '700px', + maxHeight: '90%', + borderRadius: 10, + padding: '10px 20px', + background: '#687DDB1A 0% 0% no-repeat padding-box;', + border: '1px solid #B7D2E5CC', + boxShadow: '0 0 0 15px #75B3DF', + marginTop: '2%', + marginLeft: '1%' + }, + formRow: { + display: 'grid', + gridTemplateColumns: '30% 70%', + gridGap: '10px', + alignItems: 'center', + minHeight: '5%', + paddingTop: '10px', + paddingBottom: '10px', + '&:not(:last-child)': { + borderBottom: '1px solid #D8E5EE' + } + }, + formRowLabel: { + gridColumnStart: '1' + }, + formRowInput: { + gridColumnStart: '2' + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + } +})); + +function AddUnitForm(): React.ReactElement { + const classes = useStyles(); + const history = useHistory(); + const [isUpdatingData, setIsUpdatingData] = useState(false); + const [name, setName] = useState(''); + const [abbreviation, setAbbreviation] = useState(''); + const [ARKPrefix, setARKPrefix] = useState(''); + + // these are the states referenced when rendering error inputs after failed validation + const [validName, setValidName] = useState(null); + const [validAbbreviation, setValidAbbreviation] = useState(null); + + const singularSystemObjectType = 'unit'; + + // schema for validating the appropriate form fields + const schema = yup.object().shape({ + name: yup.string().min(1), + abbreviation: yup.string().min(1) + }); + + const onNameUpdate = ({ target }) => { + setName(target.value); + }; + + const onAbbreviationUpdate = ({ target }) => { + setAbbreviation(target.value); + }; + + const onARKPrefixUpdate = ({ target }) => { + setARKPrefix(target.value); + }; + + // Handles validation for the different system object types + const validateFields = async (): Promise => { + try { + const isValidName = await schema.isValid({ name }); + setValidName(isValidName); + const isValidAbbreviation = await schema.isValid({ abbreviation }); + setValidAbbreviation(isValidAbbreviation); + if (!isValidName || !isValidAbbreviation) { + toast.warn('Creation Failed: Please Address The Errors Above'); + } + return isValidName && isValidAbbreviation; + } catch (error) { + toast.warn(error); + } finally { + setIsUpdatingData(false); + } + }; + + const createUnit = async (): Promise => { + setIsUpdatingData(true); + const validUpdate = await validateFields(); + if (!validUpdate) return; + + let newUnitSystemObjectId; + try { + const { data } = await apolloClient.mutate({ + mutation: CreateUnitDocument, + variables: { + input: { + Name: name, + Abbreviation: abbreviation, + ARKPrefix + } + } + }); + if (data?.createUnit) { + toast.success('Object created successfully'); + newUnitSystemObjectId = data?.createUnit?.Unit?.SystemObject?.idSystemObject; + } else { + throw new Error('Create request returned success: false'); + } + } catch (error) { + toast.error('Failed to create object'); + } finally { + setIsUpdatingData(false); + if (newUnitSystemObjectId) { + history.push(`/repository/details/${newUnitSystemObjectId}`); + } else { + toast.error('Unable to retrieve new System Object Id'); + } + } + }; + + return ( + + + + {toTitleCase(singularSystemObjectType)} Name + + {validName !== false ? ( + + ) : ( + + + Required + + )} + + + + Abbreviation + + {validAbbreviation !== false ? ( + + ) : ( + + + Required + + )} + + + + ARKPrefix + + + + + + + Create + + + ); +} + +export default AddUnitForm; diff --git a/client/src/pages/Admin/components/AdminProjectsView.tsx b/client/src/pages/Admin/components/AdminProjectsView.tsx new file mode 100644 index 000000000..aa77e91d8 --- /dev/null +++ b/client/src/pages/Admin/components/AdminProjectsView.tsx @@ -0,0 +1,230 @@ +/* eslint-disable react/display-name */ +/* eslint-disable import/no-unresolved */ +/* eslint-disable @typescript-eslint/ban-types */ +/* eslint-disable react/prop-types */ +/* eslint-disable react/jsx-max-props-per-line */ + +import React, { useState, useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { Box, Tooltip, TextField, Button } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { DataGrid, Columns } from '@material-ui/data-grid'; +import { useLocation } from 'react-router'; +import { GetProjectListDocument, GetProjectListResult } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import GenericBreadcrumbsView from '../../../components/shared/GenericBreadcrumbsView'; + +const useStyles = makeStyles({ + AdminListContainer: { + marginTop: '2%', + width: '450px', + padding: '20px', + height: 'calc(100% - 120px)', + display: 'flex', + border: '1px solid #B7D2E5CC', + margin: '1px solid #B7D2E5CC', + alignItems: 'center', + backgroundColor: '#687DDB1A', + borderRadius: '4px' + }, + DataGridList: { + letterSpacing: '1.7px', + color: '#8DABC4', + border: '1px solid #B7D2E5CC', + borderRadius: '2px', + backgroundColor: 'white' + }, + AdminPageViewContainer: { + display: 'flex', + flex: 1, + flexDirection: 'column', + overflow: 'auto', + maxHeight: 'calc(100vh - 60px)', + paddingLeft: '1%', + width: '1200px', + margin: '0 auto' + }, + AdminBreadCrumbsContainer: { + display: 'flex', + alignItems: 'center', + minHeight: '46px', + paddingLeft: '20px', + paddingRight: '20px', + background: '#0079C482', + color: '#3F536E', + marginBottom: '2%', + width: 'fit-content' + }, + styledButton: { + backgroundColor: '#687DDB', + color: 'white', + width: '90px', + height: '30px' + }, + AdminSearchFilterContainer: { + display: 'flex', + justifyContent: 'space-around', + height: '70px', + width: '600px', + backgroundColor: '#FFFCD1', + paddingLeft: '20px', + paddingRight: '20px' + }, + AdminUsersSearchFilterSettingsContainer: { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + height: '100%', + width: '80%' + }, + AdminUsersSearchFilterSettingsContainer2: { + display: 'flex', + justifyContent: 'flex-end', + alignItems: 'center', + height: '100%', + width: '20%' + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + }, + searchFilter: { + width: '350px' + } +}); + +function AdminProjectsList({ projects }): React.ReactElement { + const classes = useStyles(); + const projectsWithId = projects.map(project => { + const { idProject, Name, SystemObject } = project; + const { idSystemObject } = SystemObject; + return { + id: idProject, + Name, + idSystemObject + }; + }); + + const columnHeader: Columns = [ + { + field: 'Name', + headerName: 'Name', + flex: 3, + renderCell: params => ( + +
{`${params.getValue('Name')}`}
+
+ ) + }, + { + field: 'Action', + headerName: 'Action', + flex: 1, + sortable: false, + renderCell: params => ( + + Edit + + ) + } + ]; + + return ( + + + + ); +} + +function AdminProjectsFilter({ queryProjectsByFilter }: { queryProjectsByFilter: (newSearchText: string) => Promise }): React.ReactElement { + const [searchFilter, setSearchFilter] = useState(''); + const classes = useStyles(); + + const handleSearchFilterChange = e => { + setSearchFilter(e.target.value); + }; + + const searchProjects = () => { + queryProjectsByFilter(searchFilter); + }; + + return ( + + + + + + + + + + + + ); +} + +function AdminProjectsView(): React.ReactElement { + const classes = useStyles(); + const location = useLocation(); + const [projectList, setProjectList] = useState([]); + + useEffect(() => { + async function fetchInitialProjectList() { + const initialProjectListQuery = await apolloClient.query({ + query: GetProjectListDocument, + variables: { + input: { + search: '' + } + } + }); + setProjectList(initialProjectListQuery?.data?.getProjectList?.projects); + } + + fetchInitialProjectList(); + }, []); + + const queryProjectsByFilter = async newSearchText => { + const newFilterQuery = await apolloClient.query({ + query: GetProjectListDocument, + variables: { + input: { + search: newSearchText + } + } + }); + + const { + data: { + getProjectList: { projects } + } + } = newFilterQuery; + + setProjectList(projects); + }; + + return ( + + + + + + + + + + ); +} + +export default AdminProjectsView; diff --git a/client/src/pages/Admin/components/AdminSidebarMenu.tsx b/client/src/pages/Admin/components/AdminSidebarMenu.tsx new file mode 100644 index 000000000..26b82b00a --- /dev/null +++ b/client/src/pages/Admin/components/AdminSidebarMenu.tsx @@ -0,0 +1,72 @@ +import React from 'react'; +import { Box, MenuItem, MenuList, Typography } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { toTitleCase } from '../../../constants/index'; +import { Link } from 'react-router-dom'; +import { useLocation } from 'react-router'; + +const useStyles = makeStyles(({ palette, spacing }) => ({ + AdminSidebarMenuRow: { + maxHeight: '100%', + display: 'flex', + alignItems: 'flex-start', + justifyContent: 'center', + flexDirection: 'column', + padding: '0.8rem', + width: 160, + transition: 'all 250ms ease-in', + textDecoration: 'none', + overflow: 'hidden', + borderRadius: 5, + marginTop: 2, + '&.Mui-selected': { + background: '#ECF5FD 0% 0% no-repeat padding-box' + } + }, + AdminSidebarMenuContainer: { + display: 'flex', + flexDirection: 'column', + borderRight: '2px solid #C5D9E8', + padding: '1em 1em' + }, + divider: { + height: 1, + width: '100%', + marginTop: spacing(2), + marginBottom: spacing(3), + background: palette.grey[400] + } +})); + +function AdminSidebarMenuRow({ path, selected }: { path: string; selected: boolean }): React.ReactElement { + const classes = useStyles(); + + return ( + + + + {toTitleCase(path)} + + + + ); +} + +function AdminSidebarMenu(): React.ReactElement { + const classes = useStyles(); + const location = useLocation(); + const path = location.pathname; + + return ( + + + + + + + + + ); +} + +export default AdminSidebarMenu; diff --git a/client/src/pages/Admin/components/AdminUnitsView.tsx b/client/src/pages/Admin/components/AdminUnitsView.tsx new file mode 100644 index 000000000..449873d8f --- /dev/null +++ b/client/src/pages/Admin/components/AdminUnitsView.tsx @@ -0,0 +1,235 @@ +/* eslint-disable react/display-name */ +/* eslint-disable import/no-unresolved */ +/* eslint-disable @typescript-eslint/ban-types */ +/* eslint-disable react/prop-types */ +/* eslint-disable react/jsx-max-props-per-line */ + +import React, { useState, useEffect } from 'react'; +import { Link } from 'react-router-dom'; +import { Box, Tooltip, TextField, Button } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { DataGrid, Columns } from '@material-ui/data-grid'; +import { useLocation } from 'react-router'; +import { GetUnitsFromNameSearchDocument, GetUnitsFromNameSearchResult } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import GenericBreadcrumbsView from '../../../components/shared/GenericBreadcrumbsView'; + +const useStyles = makeStyles({ + AdminListContainer: { + marginTop: '2%', + width: '80%', + padding: '20px', + height: 'calc(100% - 120px)', + display: 'flex', + border: '1px solid #B7D2E5CC', + margin: '1px solid #B7D2E5CC', + alignItems: 'center', + backgroundColor: '#687DDB1A', + borderRadius: '4px' + }, + DataGridList: { + letterSpacing: '1.7px', + color: '#8DABC4', + border: '1px solid #B7D2E5CC', + borderRadius: '2px', + backgroundColor: 'white' + }, + AdminPageViewContainer: { + display: 'flex', + flex: 1, + flexDirection: 'column', + overflow: 'auto', + maxHeight: 'calc(100vh - 60px)', + paddingLeft: '1%', + width: '1200px', + margin: '0 auto' + }, + AdminBreadCrumbsContainer: { + display: 'flex', + alignItems: 'center', + minHeight: '46px', + paddingLeft: '20px', + paddingRight: '20px', + background: '#0079C482', + color: '#3F536E', + marginBottom: '2%', + width: 'fit-content' + }, + styledButton: { + backgroundColor: '#687DDB', + color: 'white', + width: '90px', + height: '30px' + }, + AdminSearchFilterContainer: { + display: 'flex', + justifyContent: 'space-around', + height: '70px', + width: '600px', + backgroundColor: '#FFFCD1', + paddingLeft: '20px', + paddingRight: '20px' + }, + AdminUsersSearchFilterSettingsContainer: { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + height: '100%', + width: '80%' + }, + AdminUsersSearchFilterSettingsContainer2: { + display: 'flex', + justifyContent: 'flex-end', + alignItems: 'center', + height: '100%', + width: '20%' + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + }, + searchFilter: { + width: '350px' + } +}); + +function AdminUnitsList({ units }): React.ReactElement { + const classes = useStyles(); + const unitsWithId = units.map(unit => { + const { idUnit, Name, SystemObject, Abbreviation } = unit; + const { idSystemObject } = SystemObject; + return { + id: idUnit, + Abbreviation, + Name, + idSystemObject + }; + }); + + const columnHeader: Columns = [ + { + field: 'Abbreviation', + headerName: 'Abbreviation', + flex: 1.5, + type: 'string' + }, + { + field: 'Name', + headerName: 'Name', + flex: 4, + renderCell: params => ( + +
{`${params.getValue('Name')}`}
+
+ ) + }, + { + field: 'Action', + headerName: 'Action', + flex: 1, + sortable: false, + renderCell: params => ( + + Edit + + ) + } + ]; + + return ( + + + + ); +} + +function AdminUnitsFilter({ queryUnitsByFilter }: { queryUnitsByFilter: (newSearchText: string) => Promise }): React.ReactElement { + const [searchFilter, setSearchFilter] = useState(''); + const classes = useStyles(); + + const handleSearchFilterChange = e => { + setSearchFilter(e.target.value); + }; + + const searchUnits = () => { + queryUnitsByFilter(searchFilter); + }; + + return ( + + + + + + + + + + + + ); +} + +function AdminUnitsView(): React.ReactElement { + const classes = useStyles(); + const location = useLocation(); + const [unitList, setUnitList] = useState([]); + + useEffect(() => { + async function fetchInitialUnitList() { + const initialUnitListQuery = await apolloClient.query({ + query: GetUnitsFromNameSearchDocument, + variables: { + input: { + search: '' + } + } + }); + setUnitList(initialUnitListQuery?.data?.getUnitsFromNameSearch?.Units); + } + + fetchInitialUnitList(); + }, []); + + const queryUnitsByFilter = async newSearchText => { + const newFilterQuery = await apolloClient.query({ + query: GetUnitsFromNameSearchDocument, + variables: { + input: { + search: newSearchText + } + } + }); + + const { + data: { + getUnitsFromNameSearch: { Units } + } + } = newFilterQuery; + setUnitList(Units); + }; + + return ( + + + + + + + + + + ); +} +export default AdminUnitsView; diff --git a/client/src/pages/Admin/components/AdminUserForm.tsx b/client/src/pages/Admin/components/AdminUserForm.tsx new file mode 100644 index 000000000..ec313a631 --- /dev/null +++ b/client/src/pages/Admin/components/AdminUserForm.tsx @@ -0,0 +1,430 @@ +/* eslint-disable camelcase */ + +/** + * This component is a link from AdminUsersList + * Upon mounting/rendering, it will make a GraphQL request + * to retrieve the appropriate user and render the information. + * + * Component also responsible for user-related updating and creating GraphQL mutations + */ + +import Checkbox from '@material-ui/core/Checkbox'; +import FormHelperText from '@material-ui/core/FormHelperText'; +import React, { useState, useEffect } from 'react'; +import { Box, TextField, Button, FormControl, Select, MenuItem } from '@material-ui/core'; +import { extractISOMonthDateYear, formatISOToHoursMinutes } from '../../../constants/index'; +import { useParams, useLocation, useHistory } from 'react-router'; +import { Link } from 'react-router-dom'; +import { useGetUserQuery, CreateUserDocument, UpdateUserDocument, GetAllUsersDocument, User_Status } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import { makeStyles } from '@material-ui/core/styles'; +import GenericBreadcrumbsView from '../../../components/shared/GenericBreadcrumbsView'; +import { toast } from 'react-toastify'; +import * as yup from 'yup'; + +const useStyles = makeStyles({ + AdminUsersViewContainer: { + display: 'flex', + flex: 1, + flexDirection: 'column', + overflow: 'auto', + maxHeight: 'calc(100vh - 60px)', + paddingLeft: '1%', + width: '1200px', + margin: '0 auto' + }, + formControl: { + minWidth: 120 + }, + AdminUserFormContainer: { + display: 'flex', + flexDirection: 'column', + flexWrap: 'nowrap', + width: '500px', + backgroundColor: '#EFF2FC', + borderRadius: '4px', + border: '1px solid #B7D2E5CC', + boxShadow: '0 0 0 15px #75B3DF', + letterSpacing: 'var(--unnamed-character-spacing-0)', + textAlign: 'left', + padding: '10px 20px', + marginTop: '2%', + marginLeft: '1%' + }, + AdminUserFormRowLabel: { + gridColumnStart: '1' + }, + AdminUserFormRowInput: { + gridColumnStart: '2' + }, + AdminUserFormRow: { + display: 'grid', + gridTemplateColumns: '40% 60%', + gridGap: '10px', + alignItems: 'center', + '&:not(:last-child)': { + borderBottom: '1px solid #D8E5EE' + } + }, + AdminUserFormButtonGroup: { + marginTop: '30px', + '& Button': { + marginRight: '30px' + } + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + }, + AdminBreadCrumbsContainer: { + display: 'flex', + alignItems: 'center', + minHeight: '46px', + paddingLeft: '20px', + paddingRight: '20px', + background: '#0079C482', + color: '#3F536E', + marginBottom: '2%', + width: 'fit-content' + }, + searchUsersFilterButton: { + backgroundColor: '#687DDB', + color: 'white', + width: '90px', + height: '30px' + } +}); + +function AdminUserForm(): React.ReactElement { + const classes = useStyles(); + const history = useHistory(); + const parameters: { idUser: string } = useParams(); + const { idUser } = parameters; + const [name, setName] = useState(''); + const [email, setEmail] = useState(''); + const [active, setActive] = useState(true); + const [dateActivated, setDateActivated] = useState(''); + const [dateDisabled, setDateDisabled] = useState(''); + const [workflowNotificationType, setWorkflowNotificationType] = useState(undefined); + const [workflowNotificationTime, setWorkflowNotificationTime] = useState('17:00'); + const [validNameInput, setValidNameInput] = useState(null); + const [validEmailInput, setValidEmailInput] = useState(null); + + const location = useLocation(); + const create: boolean = idUser === 'create'; + + const schema = yup.object().shape({ + fullName: yup.string().min(1), + email: yup.string().email().min(1) + }); + + const request = useGetUserQuery({ + fetchPolicy: 'no-cache', + variables: { + input: { + idUser: Number(idUser) + } + } + }); + + const fetchedUser = request.data?.getUser.User; + + // Performs graphql query to retrieve user information + // if query returns user info, + // redirect to adminuserform + // else + // redirect to users + useEffect(() => { + if (fetchedUser) { + setName(fetchedUser?.Name); + setEmail(fetchedUser?.EmailAddress); + setActive(fetchedUser?.Active); + setDateActivated(fetchedUser?.DateActivated); + setDateDisabled(fetchedUser?.DateDisabled); + setWorkflowNotificationType(fetchedUser?.EmailSettings); + setWorkflowNotificationTime(formatISOToHoursMinutes(fetchedUser?.WorkflowNotificationTime)); + } + }, [fetchedUser]); + + const validateFields = async (): Promise => { + try { + const validNameResponse = await schema.isValid({ fullName: name }); + setValidNameInput(validNameResponse); + const validEmailResponse = await schema.isValid({ email }); + setValidEmailInput(validEmailResponse); + return validNameResponse && validEmailResponse; + } catch (error) { + toast.warn(error); + } + }; + + const updateExistingUser = async () => { + const validUpdate = await validateFields(); + if (!validUpdate) { + toast.warn('Update Failed. Please double-check your form inputs'); + return; + } + const manipulatedTime = new Date(); + const newHours = workflowNotificationTime?.slice(0, 2); + const newMinutes = workflowNotificationTime?.slice(3); + manipulatedTime.setHours(Number(newHours)); + manipulatedTime.setMinutes(Number(newMinutes)); + + await apolloClient.mutate({ + mutation: UpdateUserDocument, + variables: { + input: { + idUser: Number(idUser), + EmailAddress: email, + Name: name, + Active: active, + EmailSettings: Number(workflowNotificationType), + WorkflowNotificationTime: manipulatedTime + } + }, + refetchQueries: [{ query: GetAllUsersDocument, variables: { input: { active: User_Status.EAll, search: '' } } }], + awaitRefetchQueries: true + }); + history.push('/admin/users'); + }; + + const createNewUser = async () => { + const validCreate = await validateFields(); + if (!validCreate) { + toast.warn('Creation Failed. Please be sure to include a name and email'); + return; + } + + await apolloClient.mutate({ + mutation: CreateUserDocument, + variables: { + input: { + EmailAddress: email, + Name: name, + EmailSettings: workflowNotificationType + } + }, + refetchQueries: [{ query: GetAllUsersDocument, variables: { input: { active: User_Status.EAll, search: '' } } }], + awaitRefetchQueries: true + }); + history.push('/admin/users'); + }; + + return ( + + {/* {!create && } */} + + `} /> + + + +

Name

+ + {validNameInput !== false ? ( + { + setName(e.target.value); + }} + InputLabelProps={{ + shrink: true + }} + /> + ) : ( + + { + setName(e.target.value); + }} + InputLabelProps={{ + shrink: true + }} + /> + Required + + )} + +
+ +

Email Address

+ + {validEmailInput !== false ? ( + { + setEmail(e.target.value); + }} + /> + ) : ( + + { + setEmail(e.target.value); + }} + /> + Required + + )} + +
+ +

Active

+ { + setActive(!active); + }} + /> +
+ +

Date Activated

+ + {!dateActivated ? ( + + ) : ( + { + setDateActivated(e.target.value); + }} + value={extractISOMonthDateYear(dateActivated, true)} + /> + )} + +
+ +

Date Disabled

+ + {!dateDisabled ? ( + + ) : ( + { + setDateDisabled(e.target.value); + }} + value={extractISOMonthDateYear(dateDisabled, true)} + /> + )} + +
+ +

Workflow Notification Type

+ + +
+ +

Workflow Notification Time

+ {workflowNotificationType === 0 ? ( + + { + if (e.target.value) { + setWorkflowNotificationTime(e.target.value); + } + }} + /> + + ) : ( + + { + if (e.target.value) { + setWorkflowNotificationTime(e.target.value); + } + }} + /> + + )} +
+
+ + {create ? ( + + ) : ( + + )} + + + + + +
+ ); +} + +export default AdminUserForm; diff --git a/client/src/pages/Admin/components/AdminUsersFilter.tsx b/client/src/pages/Admin/components/AdminUsersFilter.tsx new file mode 100644 index 000000000..5ccd91e57 --- /dev/null +++ b/client/src/pages/Admin/components/AdminUsersFilter.tsx @@ -0,0 +1,97 @@ +/* eslint-disable camelcase */ + +import React, { useState } from 'react'; +import { Box, TextField, Button, FormControl, Select, MenuItem } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { User_Status } from '../../../types/graphql'; +import { Link } from 'react-router-dom'; + +const useStyles = makeStyles({ + searchUsersFilterButton: { + backgroundColor: '#687DDB', + color: 'white', + width: '90px', + height: '30px' + }, + AdminUsersSearchFilterContainer: { + display: 'flex', + justifyContent: 'space-around', + height: '70px', + width: '900px', + backgroundColor: '#FFFCD1', + paddingLeft: '20px', + paddingRight: '20px' + }, + AdminUsersSearchFilterSettingsContainer: { + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', + height: '100%', + width: '80%' + }, + AdminUsersSearchFilterSettingsContainer2: { + display: 'flex', + justifyContent: 'flex-end', + alignItems: 'center', + height: '100%', + width: '20%' + }, + formField: { + backgroundColor: 'white', + borderRadius: '4px' + }, + searchFilter: { + width: '380px' + } +}); + +function AdminUsersFilter({ queryUsersByFilter }: { queryUsersByFilter: (newActive: User_Status, newSearchText: string) => Promise }): React.ReactElement { + const [searchFilter, setSearchFilter] = useState(''); + const [activeStatusFilter, setActiveStatusFilter] = useState(User_Status.EAll); + const classes = useStyles(); + + const handleActiveStatusFilterChange = e => { + setActiveStatusFilter(e.target.value); + }; + + const handleSearchFilterChange = e => { + setSearchFilter(e.target.value); + }; + + const searchUsers = () => { + queryUsersByFilter(activeStatusFilter, searchFilter); + }; + + return ( + + + +

Active

+ + + + +
+ + + + + +
+ ); +} + +export default AdminUsersFilter; diff --git a/client/src/pages/Admin/components/AdminUsersList.tsx b/client/src/pages/Admin/components/AdminUsersList.tsx new file mode 100644 index 000000000..8e6448f44 --- /dev/null +++ b/client/src/pages/Admin/components/AdminUsersList.tsx @@ -0,0 +1,131 @@ +/* eslint-disable react/display-name */ +/* eslint-disable import/no-unresolved */ +/* eslint-disable @typescript-eslint/ban-types */ + +import React from 'react'; +import { Link } from 'react-router-dom'; +import { Box, Tooltip } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import ClearIcon from '@material-ui/icons/Clear'; +import CheckIcon from '@material-ui/icons/Check'; +import { DataGrid, Columns, CellValue } from '@material-ui/data-grid'; +import { GetAllUsersResult } from '../../../types/graphql'; +import { extractISOMonthDateYear } from '../../../constants/index'; + +const useStyles = makeStyles({ + AdminUsersListContainer: { + marginTop: '2%', + width: '1000px', + padding: '20px', + height: 'calc(100% - 120px)', + display: 'flex', + border: '1px solid #B7D2E5CC', + margin: '1px solid #B7D2E5CC', + alignItems: 'center', + backgroundColor: '#687DDB1A', + borderRadius: '4px' + }, + UsersListDataGrid: { + letterSpacing: '1.7px', + color: '#8DABC4', + border: '1px solid #B7D2E5CC', + borderRadius: '2px', + backgroundColor: 'white' + } +}); + +function AdminUsersList({ users }: { users: GetAllUsersResult['User'] }): React.ReactElement { + const classes = useStyles(); + + // usersWithId is necessary because DataGrid only takes in objects with id + const usersWithId = users.map(user => { + const { idUser, Active, DateActivated, EmailAddress, Name, SecurityID, DateDisabled, EmailSettings, WorkflowNotificationTime } = user; + + return { + id: idUser, + idUser, + Active, + DateActivated, + EmailAddress, + Name, + SecurityID, + DateDisabled, + EmailSettings, + WorkflowNotificationTime + }; + }); + + const columnHeader: Columns = [ + { + field: 'Active', + headerName: 'Active', + flex: 1, + headerAlign: 'center', + renderCell: params => (params.getValue('Active') ? : ) + }, + { + field: 'Name', + headerName: 'Name', + flex: 1.7, + renderCell: params => ( + +
{`${params.getValue('Name')}`}
+
+ ) + }, + { + field: 'EmailAddress', + headerName: 'Email', + flex: 1.7, + renderCell: params => ( + +
{`${params.getValue('EmailAddress')}`}
+
+ ) + }, + { + field: 'DateActivated', + headerName: 'Date Activated', + type: 'string', + flex: 1.7, + valueFormatter: params => extractISOMonthDateYearHelper(params.value) + }, + { + field: 'DateDisabled', + headerName: 'Date Disabled', + type: 'string', + flex: 1.6, + valueFormatter: params => extractISOMonthDateYearHelper(params.value) + }, + { + field: 'Action', + headerName: 'Action', + flex: 1, + sortable: false, + renderCell: params => Edit + } + ]; + + return ( + + + + ); +} + +function extractISOMonthDateYearHelper(iso: CellValue): string | null { + if (typeof iso !== 'string' && !(iso instanceof Date)) return null; + return extractISOMonthDateYear(iso); +} + +export default AdminUsersList; diff --git a/client/src/pages/Admin/components/AdminUsersView.tsx b/client/src/pages/Admin/components/AdminUsersView.tsx new file mode 100644 index 000000000..70fdbac72 --- /dev/null +++ b/client/src/pages/Admin/components/AdminUsersView.tsx @@ -0,0 +1,96 @@ +/* eslint-disable camelcase */ + +import React, { useState, useEffect } from 'react'; +import AdminUsersFilter from './AdminUsersFilter'; +import AdminUsersList from './AdminUsersList'; +import { Box } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { useLocation } from 'react-router'; +import { GetAllUsersDocument, User_Status } from '../../../types/graphql'; +import { GetAllUsersResult } from '../../../types/graphql'; +import { apolloClient } from '../../../graphql/index'; +import GenericBreadcrumbsView from '../../../components/shared/GenericBreadcrumbsView'; + +const useStyles = makeStyles({ + AdminUsersViewContainer: { + display: 'flex', + flex: 1, + flexDirection: 'column', + overflow: 'auto', + maxHeight: 'calc(100vh - 60px)', + paddingLeft: '1%', + width: '1200px', + margin: '0 auto' + }, + AdminBreadCrumbsContainer: { + display: 'flex', + alignItems: 'center', + minHeight: '46px', + paddingLeft: '20px', + paddingRight: '20px', + background: '#0079C482', + color: '#3F536E', + marginBottom: '2%', + width: 'fit-content' + } +}); + +function AdminUsersView(): React.ReactElement { + const classes = useStyles(); + const [usersList, setUsersList] = useState([]); + const location = useLocation(); + + useEffect(() => { + async function fetchInitialUsersList() { + const initialUsersListQuery = await apolloClient.query({ + query: GetAllUsersDocument, + variables: { + input: { + active: User_Status.EAll, + search: '' + } + } + }); + const { + data: { + getAllUsers: { User: queriedUsers } + } + } = initialUsersListQuery; + await setUsersList(queriedUsers); + } + + fetchInitialUsersList(); + }, []); + + const queryUsersByFilter = async (newActive, newSearchText) => { + const newFilterQuery = await apolloClient.query({ + query: GetAllUsersDocument, + variables: { + input: { + active: newActive, + search: newSearchText + } + } + }); + const { + data: { + getAllUsers: { User: queriedUsers } + } + } = newFilterQuery; + setUsersList(queriedUsers); + }; + + return ( + + + + + + + + + + ); +} + +export default AdminUsersView; diff --git a/client/src/pages/Admin/index.tsx b/client/src/pages/Admin/index.tsx new file mode 100644 index 000000000..39bc71c92 --- /dev/null +++ b/client/src/pages/Admin/index.tsx @@ -0,0 +1,76 @@ +/** + * Admin + * + * This component renders Admin UI and all the sub-components + * The structure is as follows: + * + * Admin + * - AdminSidebarMenu + * - AdminUserForm + * - AdminUsersView + * -- AdminUsersFilter + * -- AdminUsersList + * - AdminProjectsView + * -- AdminProjectsFilter + * -- AdminProjectsList + * - AdminUnitsView + * -- AdminUnitsFilter + * -- AdminUnitsList + * - AddProjectForm + * - AddUnitForm + * + */ +import React from 'react'; +import { Box } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core/styles'; +import { PrivateRoute } from '../../components'; +import { HOME_ROUTES, ADMIN_ROUTE, ADMIN_ROUTES_TYPE, resolveRoute, resolveSubRoute, ADMIN_EDIT_USER } from '../../constants'; +import { Redirect } from 'react-router'; +import AdminUsersView from './components/AdminUsersView'; +import AdminUserForm from './components/AdminUserForm'; +import AdminSidebarMenu from './components/AdminSidebarMenu'; +import AdminProjectsView from './components/AdminProjectsView'; +import AdminUnitsView from './components/AdminUnitsView'; +import AddUnitForm from './components/AddUnitForm'; +import AddProjectForm from './components/AddProjectForm'; + +const useStyles = makeStyles({ + AdminPageContainer: { + display: 'flex', + font: 'var(--unnamed-font-style-normal) normal medium 11px/17px var(--unnamed-font-family-heebo)' + } +}); + +function Admin(): React.ReactElement { + const classes = useStyles(); + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} + +export default Admin; diff --git a/client/src/pages/Home/components/SidePanel.tsx b/client/src/pages/Home/components/SidePanel.tsx index d78502b85..0949524a5 100644 --- a/client/src/pages/Home/components/SidePanel.tsx +++ b/client/src/pages/Home/components/SidePanel.tsx @@ -16,7 +16,7 @@ const useStyles = makeStyles(({ palette, spacing }) => ({ container: { display: 'flex', flexDirection: 'column', - backgroundColor: palette.primary.dark, + backgroundColor: palette.primary.dark }, menuOptions: { display: 'flex', @@ -47,7 +47,7 @@ interface SidePanelProps { } type SidePanelParams = { - type: string + type: string; }; function SidePanel(props: SidePanelProps): React.ReactElement { @@ -63,13 +63,13 @@ function SidePanel(props: SidePanelProps): React.ReactElement { const classes = useStyles(); const Options: SidePanelOptionProps[] = [ - { - title: 'Dashboard', - type: HOME_ROUTES.DASHBOARD, - color: Colors.sidebarOptions.dashboard, - isExpanded, - isSelected: selectedOption === HOME_ROUTES.DASHBOARD - }, + // { + // title: 'Dashboard', + // type: HOME_ROUTES.DASHBOARD, + // color: Colors.sidebarOptions.dashboard, + // isExpanded, + // isSelected: selectedOption === HOME_ROUTES.DASHBOARD + // }, { title: 'Repository', type: HOME_ROUTES.REPOSITORY, @@ -84,21 +84,21 @@ function SidePanel(props: SidePanelProps): React.ReactElement { isExpanded, isSelected: selectedOption === HOME_ROUTES.INGESTION }, - { - title: 'Workflow', - type: HOME_ROUTES.WORKFLOW, - color: Colors.sidebarOptions.workflow, - isExpanded, - isSelected: selectedOption === HOME_ROUTES.WORKFLOW - }, - { - title: 'Reporting', - type: HOME_ROUTES.REPORTING, - color: Colors.sidebarOptions.reporting, - isExpanded, - isSelected: selectedOption === HOME_ROUTES.REPORTING + // { + // title: 'Workflow', + // type: HOME_ROUTES.WORKFLOW, + // color: Colors.sidebarOptions.workflow, + // isExpanded, + // isSelected: selectedOption === HOME_ROUTES.WORKFLOW + // }, + // { + // title: 'Reporting', + // type: HOME_ROUTES.REPORTING, + // color: Colors.sidebarOptions.reporting, + // isExpanded, + // isSelected: selectedOption === HOME_ROUTES.REPORTING - }, + // }, { title: 'Admin', type: HOME_ROUTES.ADMIN, @@ -111,26 +111,20 @@ function SidePanel(props: SidePanelProps): React.ReactElement { return ( - {Options.map((props, index) => )} + {Options.map((props, index) => ( + + ))} - {isExpanded ? - : - } + {isExpanded ? ( + + ) : ( + + )} ); } -export default memo(SidePanel); \ No newline at end of file +export default memo(SidePanel); diff --git a/client/src/pages/Home/index.tsx b/client/src/pages/Home/index.tsx index 9bcc446de..67f4f4fec 100644 --- a/client/src/pages/Home/index.tsx +++ b/client/src/pages/Home/index.tsx @@ -14,6 +14,7 @@ import { useControlStore } from '../../store'; import Ingestion from '../Ingestion'; import Repository from '../Repository'; import SidePanel from './components/SidePanel'; +import Admin from '../Admin'; const useStyles = makeStyles(() => ({ container: { @@ -37,7 +38,7 @@ function Home(): React.ReactElement { return ( - +
@@ -45,10 +46,11 @@ function Home(): React.ReactElement { + ); } -export default Home; \ No newline at end of file +export default Home; diff --git a/client/src/pages/Ingestion/components/IngestionSidebar/IngestionSidebarMenuOption.tsx b/client/src/pages/Ingestion/components/IngestionSidebar/IngestionSidebarMenuOption.tsx index 5e54f9efb..c8c062728 100644 --- a/client/src/pages/Ingestion/components/IngestionSidebar/IngestionSidebarMenuOption.tsx +++ b/client/src/pages/Ingestion/components/IngestionSidebar/IngestionSidebarMenuOption.tsx @@ -23,14 +23,14 @@ const useStyles = makeStyles(({ palette }) => ({ overflow: 'hidden', borderRadius: 5, marginTop: 2, - color: ({ isSelected }: IngestionSidebarMenuOptionProps) => isSelected ? palette.primary.main : palette.primary.dark, - backgroundColor: ({ isSelected }: IngestionSidebarMenuOptionProps) => isSelected ? palette.primary.light : Colors.defaults.white, + color: ({ isSelected }: IngestionSidebarMenuOptionProps) => (isSelected ? palette.primary.main : palette.primary.dark), + backgroundColor: ({ isSelected }: IngestionSidebarMenuOptionProps) => (isSelected ? palette.primary.light : Colors.defaults.white), '&:hover': { - cursor: ({ enabled }: IngestionSidebarMenuOptionProps) => enabled ? 'pointer' : undefined, - color: ({ enabled }: IngestionSidebarMenuOptionProps) => enabled ? palette.primary.main : undefined, - backgroundColor: ({ enabled }: IngestionSidebarMenuOptionProps) => enabled ? palette.primary.light : undefined - }, - }, + cursor: ({ enabled }: IngestionSidebarMenuOptionProps) => (enabled ? 'pointer' : undefined), + color: ({ enabled }: IngestionSidebarMenuOptionProps) => (enabled ? palette.primary.main : undefined), + backgroundColor: ({ enabled }: IngestionSidebarMenuOptionProps) => (enabled ? palette.primary.light : undefined) + } + } })); export type SidebarRouteTypes = INGESTION_ROUTES_TYPE | string; @@ -50,16 +50,16 @@ function IngestionSidebarMenuOption(props: IngestionSidebarMenuOptionProps): Rea const subContent: React.ReactNode = ( - {title} - {subtitle} + + {title} + + + {subtitle} + ); - let content = ( - - {subContent} - - ); + let content = {subContent}; if (enabled) { content = ( @@ -69,11 +69,7 @@ function IngestionSidebarMenuOption(props: IngestionSidebarMenuOptionProps): Rea ); } - return ( - - {content} - - ); + return {content}; } -export default memo(IngestionSidebarMenuOption); \ No newline at end of file +export default memo(IngestionSidebarMenuOption); diff --git a/client/src/pages/Ingestion/components/Metadata/Model/AssetFilesTable.tsx b/client/src/pages/Ingestion/components/Metadata/Model/AssetFilesTable.tsx new file mode 100644 index 000000000..00eebbd9c --- /dev/null +++ b/client/src/pages/Ingestion/components/Metadata/Model/AssetFilesTable.tsx @@ -0,0 +1,73 @@ +/* eslint-disable react/prop-types */ +/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ + +import React from 'react'; +import { makeStyles } from '@material-ui/core/styles'; +import { Table, TableBody, TableCell, TableHead, TableRow, Typography, Box } from '@material-ui/core'; + +const useStyles = makeStyles(theme => ({ + assetFilesTableContainer: { + width: 'calc(52vw + 20px)', + borderRadius: 5, + padding: 1, + backgroundColor: theme.palette.secondary.light + }, + headerRow: { + borderBottom: '2px solid #D8E5EE', + color: theme.palette.primary.dark + }, + tableRow: { + '&:not(:last-child)': { + borderBottom: '2px solid #D8E5EE' + }, + '& > *': { + color: '#2C405A' + } + }, + assetNameCol: { + width: '65%', + color: '#2C405A' + }, + assetTypeCol: { + width: '35%', + color: '#2C405A' + } +})); + +function AssetFilesTable({ files }): React.ReactElement { + const classes = useStyles(); + return ( + + + + + + Asset Name + + + Asset Type + + + + + {files.map((row, ind) => ( + + + + {row.assetName} + + + + + {row.assetType} + + + + ))} + +
+
+ ); +} + +export default AssetFilesTable; diff --git a/client/src/pages/Ingestion/components/Metadata/Model/BoundingBoxInput.tsx b/client/src/pages/Ingestion/components/Metadata/Model/BoundingBoxInput.tsx index 4a4758aa0..43a414cc7 100644 --- a/client/src/pages/Ingestion/components/Metadata/Model/BoundingBoxInput.tsx +++ b/client/src/pages/Ingestion/components/Metadata/Model/BoundingBoxInput.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * BoundingBoxInput * @@ -7,12 +9,12 @@ import { Box } from '@material-ui/core'; import React from 'react'; import { DebounceNumberInput, FieldType } from '../../../../../components'; -import { ModelDetailFields } from '../../../../../types/graphql'; +// import { ModelDetailFields } from '../../../../../types/graphql'; import { ViewableProps } from '../../../../../types/repository'; import { isFieldUpdated } from '../../../../../utils/repository'; interface BoundingBoxInputProps extends ViewableProps { - modelFields?: ModelDetailFields | null; + modelFields?: null; boundingBoxP1X?: number | null; boundingBoxP1Y?: number | null; boundingBoxP1Z?: number | null; @@ -37,13 +39,7 @@ function BoundingBoxInput(props: BoundingBoxInputProps): React.ReactElement { }; return ( - + + ({ + notRequiredFields: { + display: 'flex', + flexDirection: 'column', + borderRadius: 5, + backgroundColor: theme.palette.secondary.light, + '& > *': { + minHeight: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE' + }, + width: '350px' + }, + materialFields: { + display: 'flex', + flexDirection: 'column', + width: '350px', + marginRight: '30px' + }, + unindentedFields: { + '& > :first-child': { + minHeight: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE' + } + }, + indentedFields: { + '& > *': { + textIndent: '15px', + minHeight: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE' + } + }, + ModelObjectContainer: { + display: 'flex', + width: '100%', + marginBottom: '3%', + justifyContent: 'space-around' + }, + boundingBox: { + '& > *': { + height: '10px' + }, + '& :not(:first-child)': { + textIndent: '30px' + } + }, + objectMeshTable: { + display: 'flex', + flexDirection: 'row', + borderRadius: 5, + paddingTop: 5, + backgroundColor: theme.palette.primary.light, + width: 'auto' + }, + ObjectMeshContainer: { + borderRadius: 5, + padding: 10, + backgroundColor: theme.palette.primary.light, + width: 'fit-content', + display: 'flex', + flexDirection: 'column' + }, + captionContainer: { + flex: '1 1 0%', + width: '92%', + display: 'flex', + marginBottom: '8px', + flexDirection: 'row', + color: '#2C405A' + } +})); + +function roundToTwoPlaces(num) { + return Math.ceil(num * 100) / 100; +} + +function interpretTrinary(truthyOrNull: boolean | null) { + if (truthyOrNull === null) return 'Unknown'; + if (truthyOrNull === false) return 'No'; + return 'Yes'; +} + +function ObjectMeshTable({ modelObjects }): React.ReactElement { + const classes = useStyles(); + return ( + + + Material and Mesh + + + {modelObjects.map(modelObject => { + return ( + + + {modelObject.ModelMaterials.map(materialType => { + return ( + + + + {materialType.ModelMaterialChannel.map(channel => { + return ( + + + + + + + + + ); + })} + + + + ); + })} + + + + + + + + + + + + + + + + + + + + + + + + + ); + })} + + + ); +} + +export default ObjectMeshTable; diff --git a/client/src/pages/Ingestion/components/Metadata/Model/UVContents.tsx b/client/src/pages/Ingestion/components/Metadata/Model/UVContents.tsx deleted file mode 100644 index a8c1ee945..000000000 --- a/client/src/pages/Ingestion/components/Metadata/Model/UVContents.tsx +++ /dev/null @@ -1,98 +0,0 @@ -/** - * UVContents - * - * This component renders the uv map type selector for contents present in - * the uploaded assets - */ -import { Box, MenuItem, Select, Typography } from '@material-ui/core'; -import React from 'react'; -import { AiFillFileImage } from 'react-icons/ai'; -import { FieldType } from '../../../../../components'; -import { StateUVMap, VocabularyOption } from '../../../../../store'; -import { palette } from '../../../../../theme'; -import { ViewableProps } from '../../../../../types/repository'; -import { ContentHeader, EmptyContent, useStyles } from '../Photogrammetry/AssetContents'; - -interface UVContentsProps extends ViewableProps { - initialEntry: number | null; - uvMaps: StateUVMap[]; - options: VocabularyOption[]; - onUpdate: (id: number, mapType: number) => void; -} - -function UVContents(props: UVContentsProps): React.ReactElement { - const { uvMaps, options, initialEntry, onUpdate, viewMode = false, disabled = false } = props; - - return ( - - - - - {uvMaps.map(({ id, name, edgeLength, mapType }: StateUVMap, index: number) => { - const update = ({ target }) => onUpdate(id, target.value); - - return ( - - ); - })} - - - ); -} - -interface ContentProps { - fieldName: string; - value: number | null; - name: string; - edgeLength: number; - initialEntry: number | null; - options: VocabularyOption[]; - update: (event: React.ChangeEvent<{ - name?: string | undefined; - value: unknown; - }>) => void; - disabled: boolean; -} - -export function Content(props: ContentProps): React.ReactElement { - const { fieldName, value, name, edgeLength, initialEntry, update, options, disabled } = props; - const classes = useStyles(); - - return ( - - - - - - {name} - - - {edgeLength} - - - - - - ); -} - -export default UVContents; diff --git a/client/src/pages/Ingestion/components/Metadata/Model/index.tsx b/client/src/pages/Ingestion/components/Metadata/Model/index.tsx index fefadd88c..9bf7db99c 100644 --- a/client/src/pages/Ingestion/components/Metadata/Model/index.tsx +++ b/client/src/pages/Ingestion/components/Metadata/Model/index.tsx @@ -1,56 +1,178 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable react/jsx-max-props-per-line */ + /** * Metadata - Model * * This component renders the metadata fields specific to model asset. */ -import { Box, Checkbox } from '@material-ui/core'; -import { makeStyles } from '@material-ui/core/styles'; -import React, { useState } from 'react'; -import { AssetIdentifiers, CheckboxField, DateInputField, FieldType, InputField, SelectField } from '../../../../../components'; -import { StateIdentifier, StateRelatedObject, useMetadataStore, useVocabularyStore } from '../../../../../store'; +import { Box, Checkbox, makeStyles, Typography } from '@material-ui/core'; +import React, { useState, useEffect } from 'react'; +import { AssetIdentifiers, DateInputField, FieldType, InputField, SelectField, ReadOnlyRow, SidebarBottomNavigator } from '../../../../../components'; +import { StateIdentifier, StateRelatedObject, useSubjectStore, useMetadataStore, useVocabularyStore, useRepositoryStore } from '../../../../../store'; import { MetadataType } from '../../../../../store/metadata'; -import { RelatedObjectType } from '../../../../../types/graphql'; -import { eVocabularySetID } from '../../../../../types/server'; -import { withDefaultValueNumber } from '../../../../../utils/shared'; -import BoundingBoxInput from './BoundingBoxInput'; +import { GetModelConstellationForAssetVersionDocument, RelatedObjectType, useGetSubjectQuery } from '../../../../../types/graphql'; +import { eSystemObjectType, eVocabularySetID } from '../../../../../types/server'; import ObjectSelectModal from './ObjectSelectModal'; import RelatedObjectsList from './RelatedObjectsList'; -import UVContents from './UVContents'; +import ObjectMeshTable from './ObjectMeshTable'; +import AssetFilesTable from './AssetFilesTable'; +import { extractModelConstellation } from '../../../../../constants'; +import { apolloClient } from '../../../../../graphql/index'; -const useStyles = makeStyles(({ palette, typography }) => ({ +const useStyles = makeStyles(theme => ({ container: { marginTop: 20 }, notRequiredFields: { display: 'flex', - flex: 1, flexDirection: 'column', - marginLeft: 30, borderRadius: 5, - backgroundColor: palette.secondary.light + backgroundColor: theme.palette.secondary.light, + width: '350px', + '& > *': { + height: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE' + } + }, + dataEntry: { + width: '350px', + marginRight: '30px', + '& > *': { + height: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE', + width: 'auto' + }, + border: '1px solid #D8E5EE', + height: 'fit-content' + }, + ModelMetricsAndFormContainer: { + borderRadius: 5, + padding: 10, + backgroundColor: theme.palette.primary.light, + width: 'fit-content', + display: 'flex', + flexDirection: 'column' + }, + modelMetricsAndForm: { + display: 'flex', + flexDirection: 'row', + borderRadius: 5, + backgroundColor: theme.palette.primary.light, + width: 'auto', + justifyContent: 'space-around' }, - noteText: { - marginTop: 10, - fontSize: '0.8em', - fontWeight: typography.fontWeightLight, - fontStyle: 'italic', - textAlign: 'center' + captionContainer: { + flex: '1 1 0%', + width: '92%', + display: 'flex', + marginBottom: '8px', + flexDirection: 'row', + color: '#2C405A' } })); interface ModelProps { readonly metadataIndex: number; + onPrevious: () => void; + onClickRight: () => Promise; + isLast: boolean; + rightLoading: boolean; } function Model(props: ModelProps): React.ReactElement { - const { metadataIndex } = props; + const { metadataIndex, onPrevious, onClickRight, isLast, rightLoading } = props; const classes = useStyles(); const metadata = useMetadataStore(state => state.metadatas[metadataIndex]); const { model } = metadata; const [updateMetadataField, getFieldErrors] = useMetadataStore(state => [state.updateMetadataField, state.getFieldErrors]); - const [getEntries, getInitialEntry] = useVocabularyStore(state => [state.getEntries, state.getInitialEntry]); - + const [getEntries] = useVocabularyStore(state => [state.getEntries]); + const [setDefaultIngestionFilters, closeRepositoryBrowser] = useRepositoryStore(state => [state.setDefaultIngestionFilters, state.closeRepositoryBrowser]); + const [subjects] = useSubjectStore(state => [state.subjects]); const [modalOpen, setModalOpen] = useState(false); + const [ingestionModel, setIngestionModel] = useState({ + CountVertices: null, + CountFaces: null, + CountAnimations: null, + CountCameras: null, + CountLights: null, + CountMaterials: null, + CountMeshes: null, + CountEmbeddedTextures: null, + CountLinkedTextures: null, + FileEncoding: '', + idVFileType: null + }); + const [assetFiles, setAssetFiles] = useState([{ assetName: '', assetType: '' }]); + const [modelObjects, setModelObjects] = useState([ + { + idModelObject: null, + CountPoint: null, + CountFace: null, + CountColorChannel: null, + CountTextureCoordinateChannel: null, + HasBones: null, + HasFaceNormals: null, + HasTangents: null, + HasTextureCoordinates: null, + HasVertextNormals: null, + HasVertexColor: null, + IsTwoManifoldUnbounded: null, + IsTwoManifoldBounded: null, + IsWatertight: null, + SelfIntersecting: null, + BoundingBoxP1X: null, + BoundingBoxP1Y: null, + BoundingBoxP1Z: null, + BoundingBoxP2X: null, + BoundingBoxP2Y: null, + BoundingBoxP2Z: null, + ModelMaterials: [] + } + ]); + + const urlParams = new URLSearchParams(window.location.search); + const idAssetVersion = urlParams.get('fileId'); + + useEffect(() => { + async function fetchModelConstellation() { + const { data } = await apolloClient.query({ + query: GetModelConstellationForAssetVersionDocument, + variables: { + input: { + idAssetVersion: Number(idAssetVersion) + } + } + }); + if (data.getModelConstellationForAssetVersion.ModelConstellation) { + const modelConstellation = data.getModelConstellationForAssetVersion.ModelConstellation; + const { ingestionModel, modelObjects, assets } = extractModelConstellation(modelConstellation); + updateMetadataField(metadataIndex, 'name', modelConstellation.Model.Name, MetadataType.model); + + // handles 0 and non-numeric idVFileTypes + if (modelConstellation.Model.idVFileType) { + updateMetadataField(metadataIndex, 'modelFileType', Number(modelConstellation.Model.idVFileType), MetadataType.model); + } + setIngestionModel(ingestionModel); + setModelObjects(modelObjects); + setAssetFiles(assets); + } + } + + fetchModelConstellation(); + }, [idAssetVersion, metadataIndex, updateMetadataField]); + + // use subject's idSystemObject as the root to initialize the repository browser + const subjectIdSystemObject = useGetSubjectQuery({ + variables: { + input: { + idSubject: subjects[0]?.id + } + } + }); + const idSystemObject: number | undefined = subjectIdSystemObject?.data?.getSubject?.Subject?.SystemObject?.idSystemObject; const errors = getFieldErrors(metadata); @@ -74,7 +196,6 @@ function Model(props: ModelProps): React.ReactElement { updateMetadataField(metadataIndex, name, idFieldValue, MetadataType.model); }; - const setDateField = (name: string, value?: string | null): void => { if (value) { const date = new Date(value); @@ -82,21 +203,13 @@ function Model(props: ModelProps): React.ReactElement { } }; - const updateUVMapsVariant = (uvMapId: number, mapType: number) => { - const { uvMaps } = model; - const updatedUVMaps = uvMaps.map(uvMap => { - if (uvMapId === uvMap.id) { - return { - ...uvMap, - mapType - }; - } - return uvMap; - }); - updateMetadataField(metadataIndex, 'uvMaps', updatedUVMaps, MetadataType.model); + const setNameField = ({ target }): void => { + const { name, value } = target; + updateMetadataField(metadataIndex, name, value, MetadataType.model); }; const openSourceObjectModal = () => { + setDefaultIngestionFilters(eSystemObjectType.eModel, idSystemObject); setModalOpen(true); }; @@ -108,6 +221,7 @@ function Model(props: ModelProps): React.ReactElement { const onModalClose = () => { setModalOpen(false); + closeRepositoryBrowser(); }; const onSelectedObjects = (newSourceObjects: StateRelatedObject[]) => { @@ -115,157 +229,144 @@ function Model(props: ModelProps): React.ReactElement { onModalClose(); }; - const noteLabelProps = { style: { fontStyle: 'italic' } }; - const noteFieldProps = { alignItems: 'center', style: { paddingBottom: 0 } }; const rowFieldProps = { alignItems: 'center', justifyContent: 'space-between' }; - return ( - - - - - - setDateField('dateCaptured', value)} /> - - - - - - + + + + + + + + + + {/* Start of data-entry form */} + + + Model + + + + + + + + setDateField('dateCaptured', value)} /> + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + {/* End of data-entry form */} + + {/* Start of model-level metrics form */} + + + + + + + + + + + + + {/* End of model-level metrics form */} + + + ); } -export default Model; \ No newline at end of file +export default Model; + +// import UVContents from './UVContents'; +// const updateUVMapsVariant = (uvMapId: number, mapType: number) => { +// const { uvMaps } = model; +// const updatedUVMaps = uvMaps.map(uvMap => { +// if (uvMapId === uvMap.id) { +// return { +// ...uvMap, +// mapType +// }; +// } +// return uvMap; +// }); +// updateMetadataField(metadataIndex, 'uvMaps', updatedUVMaps, MetadataType.model); +// }; diff --git a/client/src/pages/Ingestion/components/Metadata/Photogrammetry/index.tsx b/client/src/pages/Ingestion/components/Metadata/Photogrammetry/index.tsx index 6ed062198..ae88f01d6 100644 --- a/client/src/pages/Ingestion/components/Metadata/Photogrammetry/index.tsx +++ b/client/src/pages/Ingestion/components/Metadata/Photogrammetry/index.tsx @@ -58,6 +58,12 @@ function Photogrammetry(props: PhotogrammetryProps): React.ReactElement { } }; + const setNameField = ({ target }): void => { + const { name, value } = target; + if (value) + updateMetadataField(metadataIndex, name, value, MetadataType.photogrammetry); + }; + const setCheckboxField = ({ target }): void => { const { name, checked } = target; updateMetadataField(metadataIndex, name, checked, MetadataType.photogrammetry); @@ -98,6 +104,9 @@ function Photogrammetry(props: PhotogrammetryProps): React.ReactElement { + ({ display: 'flex', flex: 1, flexDirection: 'column', - overflow: 'auto', - maxHeight: 'calc(100vh - 60px)' + overflow: 'auto' }, content: { display: 'flex', @@ -124,7 +125,9 @@ function Metadata(): React.ReactElement { } } else { const nextMetadata = metadatas[metadataIndex + 1]; - const { file: { id, type } } = nextMetadata; + const { + file: { id, type } + } = nextMetadata; const { isLast } = getMetadataInfo(id); const nextRoute = resolveSubRoute(HOME_ROUTES.INGESTION, `${INGESTION_ROUTE.ROUTES.METADATA}?fileId=${id}&type=${type}&last=${isLast}`); history.push(nextRoute); @@ -141,7 +144,7 @@ function Metadata(): React.ReactElement { } if (assetType.model) { - return ; + return ; } return ; @@ -153,13 +156,7 @@ function Metadata(): React.ReactElement { {getMetadataComponent(metadataIndex)} - + ); } @@ -167,7 +164,7 @@ function Metadata(): React.ReactElement { interface BreadcrumbsHeaderProps { project: StateProject | undefined; item: StateItem | undefined; - metadata: StateMetadata + metadata: StateMetadata; } function BreadcrumbsHeader(props: BreadcrumbsHeaderProps) { @@ -183,4 +180,4 @@ function BreadcrumbsHeader(props: BreadcrumbsHeaderProps) { ); } -export default Metadata; \ No newline at end of file +export default Metadata; diff --git a/client/src/pages/Ingestion/components/Uploads/FileList.tsx b/client/src/pages/Ingestion/components/Uploads/FileList.tsx index 610700206..9f1793e7a 100644 --- a/client/src/pages/Ingestion/components/Uploads/FileList.tsx +++ b/client/src/pages/Ingestion/components/Uploads/FileList.tsx @@ -33,7 +33,7 @@ function FileList(props: FileListProps): React.ReactElement { const onSelect = (id: FileId, selected: boolean): void => selectFile(id, selected); const getFileList = ({ id, name, size, status, selected, progress, type }: IngestionFile, index: number) => { - const uploading = status === FileUploadStatus.UPLOADING; + const uploading = (status === FileUploadStatus.UPLOADING || status === FileUploadStatus.PROCESSING); const complete = status === FileUploadStatus.COMPLETE; const failed = status === FileUploadStatus.FAILED; const cancelled = status === FileUploadStatus.CANCELLED; diff --git a/client/src/pages/Ingestion/hooks/useIngest.ts b/client/src/pages/Ingestion/hooks/useIngest.ts index 5d12fc4ef..e1d3c99b8 100644 --- a/client/src/pages/Ingestion/hooks/useIngest.ts +++ b/client/src/pages/Ingestion/hooks/useIngest.ts @@ -17,7 +17,6 @@ import { StateIdentifier, StateItem, StateProject, - StateUVMap, useItemStore, useMetadataStore, useProjectStore, @@ -38,7 +37,6 @@ import { IngestProjectInput, IngestSceneInput, IngestSubjectInput, - IngestUvMapInput } from '../../../types/graphql'; import { nonNullValue } from '../../../utils/shared'; @@ -102,6 +100,7 @@ function useIngest(): UseIngest { dateCaptured, datasetType, systemCreated, + name, description, cameraSettingUniform, datasetFieldId, @@ -123,6 +122,7 @@ function useIngest(): UseIngest { const photogrammetryData: IngestPhotogrammetryInput = { idAssetVersion: parseFileId(file.id), + name, dateCaptured: dateCaptured.toISOString(), datasetType: nonNullValue('datasetType', datasetType), systemCreated, @@ -147,11 +147,10 @@ function useIngest(): UseIngest { if (isModel) { const { - systemCreated, identifiers, - uvMaps, sourceObjects, - dateCaptured, + systemCreated, + name, creationMethod, master, authoritative, @@ -159,32 +158,26 @@ function useIngest(): UseIngest { units, purpose, modelFileType, - roughness, - metalness, - pointCount, - faceCount, - isWatertight, - hasNormals, - hasVertexColor, - hasUVSpace, - boundingBoxP1X, - boundingBoxP1Y, - boundingBoxP1Z, - boundingBoxP2X, - boundingBoxP2Y, - boundingBoxP2Z, - directory + directory, + } = model; + + let { + dateCaptured } = model; + if (!dateCaptured) { + dateCaptured = ''; + } else if (typeof dateCaptured === 'object') { + dateCaptured = nonNullValue('datecaptured', dateCaptured.toISOString()); + } + const ingestIdentifiers: IngestIdentifierInput[] = getIngestIdentifiers(identifiers); - const ingestUVMaps: IngestUvMapInput[] = getIngestUVMaps(uvMaps); const modelData: IngestModelInput = { + name, idAssetVersion: parseFileId(file.id), - dateCaptured: dateCaptured.toISOString(), + dateCaptured, identifiers: ingestIdentifiers, - uvMaps: ingestUVMaps, - systemCreated, creationMethod: nonNullValue('creationMethod', creationMethod), master, authoritative, @@ -192,22 +185,9 @@ function useIngest(): UseIngest { units: nonNullValue('units', units), purpose: nonNullValue('purpose', purpose), modelFileType: nonNullValue('modelFileType', modelFileType), + directory, + systemCreated, sourceObjects, - roughness, - metalness, - pointCount, - faceCount, - isWatertight, - hasNormals, - hasVertexColor, - hasUVSpace, - boundingBoxP1X, - boundingBoxP1Y, - boundingBoxP1Z, - boundingBoxP2X, - boundingBoxP2Y, - boundingBoxP2Z, - directory }; ingestModel.push(modelData); @@ -328,23 +308,6 @@ function useIngest(): UseIngest { return ingestFolders; }; - const getIngestUVMaps = (uvMaps: StateUVMap[]): IngestUvMapInput[] => { - const ingestUVMaps: IngestUvMapInput[] = []; - lodash.forEach(uvMaps, (uvMap: StateUVMap) => { - const { name, edgeLength, mapType } = uvMap; - - const uvMapData: IngestUvMapInput = { - name, - edgeLength, - mapType: nonNullValue('mapType', mapType) - }; - - ingestUVMaps.push(uvMapData); - }); - - return ingestUVMaps; - }; - return { ingestionStart, ingestionComplete, diff --git a/client/src/pages/Repository/components/DetailsView/DetailsHeader.tsx b/client/src/pages/Repository/components/DetailsView/DetailsHeader.tsx index b1a52fcfb..ef370082c 100644 --- a/client/src/pages/Repository/components/DetailsView/DetailsHeader.tsx +++ b/client/src/pages/Repository/components/DetailsView/DetailsHeader.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * DetailsHeader * @@ -26,7 +28,7 @@ const useStyles = makeStyles(({ palette }) => ({ marginRight: 20, color: palette.primary.dark, border: (updated: boolean) => `1px solid ${fade(updated ? palette.secondary.main : palette.primary.contrastText, 0.4)}`, - backgroundColor: (updated: boolean) => updated ? palette.secondary.light : palette.background.paper, + backgroundColor: (updated: boolean) => (updated ? palette.secondary.light : palette.background.paper), fontSize: '0.8em' } })); @@ -54,18 +56,12 @@ function DetailsHeader(props: DetailsHeaderProps): React.ReactElement { {title} - {getTermForSystemObjectType(objectType)} + + {getTermForSystemObjectType(objectType)} + - + {!!path.length && } @@ -74,4 +70,4 @@ function DetailsHeader(props: DetailsHeaderProps): React.ReactElement { ); } -export default DetailsHeader; \ No newline at end of file +export default DetailsHeader; diff --git a/client/src/pages/Repository/components/DetailsView/DetailsTab/ModelDetails.tsx b/client/src/pages/Repository/components/DetailsView/DetailsTab/ModelDetails.tsx index 003b2581d..c96d4c4e6 100644 --- a/client/src/pages/Repository/components/DetailsView/DetailsTab/ModelDetails.tsx +++ b/client/src/pages/Repository/components/DetailsView/DetailsTab/ModelDetails.tsx @@ -1,37 +1,111 @@ /* eslint-disable react-hooks/exhaustive-deps */ +/* eslint-disable react/jsx-max-props-per-line */ + /** * ModelDetails * * This component renders details tab for Model specific details used in DetailsTab component. */ -import { Box, makeStyles, Typography } from '@material-ui/core'; +import { Typography, Box, makeStyles, Checkbox } from '@material-ui/core'; import React, { useEffect, useState } from 'react'; -import { CheckboxField, DateInputField, FieldType, InputField, Loader, SelectField } from '../../../../../components'; -import { parseUVMapsToState, useVocabularyStore } from '../../../../../store'; -import { ModelDetailFields } from '../../../../../types/graphql'; +import { DateInputField, FieldType, Loader, SelectField, ReadOnlyRow } from '../../../../../components'; +import { useVocabularyStore, useRepositoryDetailsFormStore } from '../../../../../store'; import { eVocabularySetID } from '../../../../../types/server'; -import { isFieldUpdated } from '../../../../../utils/repository'; -import { withDefaultValueNumber } from '../../../../../utils/shared'; -import { formatBytes } from '../../../../../utils/upload'; -import BoundingBoxInput from '../../../../Ingestion/components/Metadata/Model/BoundingBoxInput'; -import UVContents from '../../../../Ingestion/components/Metadata/Model/UVContents'; +// import { isFieldUpdated } from '../../../../../utils/repository'; +// import { withDefaultValueNumber } from '../../../../../utils/shared'; +import { extractModelConstellation } from '../../../../../constants/helperfunctions'; +import ObjectMeshTable from './../../../../Ingestion/components/Metadata/Model/ObjectMeshTable'; import { DetailComponentProps } from './index'; -export const useStyles = makeStyles(({ palette }) => ({ +export const useStyles = makeStyles(theme => ({ value: { fontSize: '0.8em', - color: palette.primary.dark + color: theme.palette.primary.dark + }, + notRequiredFields: { + display: 'flex', + flexDirection: 'column', + borderRadius: 5, + backgroundColor: theme.palette.secondary.light, + width: '350px', + '& > *': { + height: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE' + } + }, + dataEntry: { + display: 'flex', + flexDirection: 'column', + width: '350px', + marginRight: '30px', + '& > *': { + height: '20px', + borderBottom: '0.5px solid #D8E5EE', + borderTop: '0.5px solid #D8E5EE', + width: 'auto' + }, + border: '1px solid #D8E5EE', + height: 'fit-content' + }, + ModelMetricsAndFormContainer: { + borderRadius: 5, + padding: 10, + backgroundColor: theme.palette.primary.light, + width: 'calc(100% - 40px)', + display: 'flex', + flexDirection: 'column' + }, + modelMetricsAndForm: { + display: 'flex', + flexDirection: 'row', + borderRadius: 5, + backgroundColor: theme.palette.primary.light, + width: 'auto', + justifyContent: 'space-around' + }, + captionContainer: { + flex: '1 1 0%', + width: '92%', + display: 'flex', + marginBottom: '8px', + flexDirection: 'row', + color: '#2C405A' + }, + objectMeshTableContainer: { + display: 'flex', + justifyContent: 'center', + width: '100%', + '& > *': { + width: 'calc(100% - 40px)' + } + }, + detailsContainer: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center' } })); function ModelDetails(props: DetailComponentProps): React.ReactElement { const classes = useStyles(); - const { data, loading, disabled, onUpdateDetail, objectType } = props; - const [details, setDetails] = useState({ - uvMaps: [] - }); - - const [getInitialEntry, getEntries] = useVocabularyStore(state => [state.getInitialEntry, state.getEntries]); + const { data, loading, onUpdateDetail, objectType } = props; + + const { ingestionModel, modelObjects } = extractModelConstellation(data?.getDetailsTabDataForObject?.Model); + const [details] = useState({}); + const [setFormField, setFormDateField, dateCaptured, master, authoritative, creationMethod, modality, purpose, units, fileType] = useRepositoryDetailsFormStore(state => [ + state.setFormField, + state.setFormDateField, + state.dateCaptured, + state.master, + state.authoritative, + state.creationMethod, + state.modality, + state.purpose, + state.units, + state.fileType + ]); + const [getEntries] = useVocabularyStore(state => [state.getEntries]); useEffect(() => { onUpdateDetail(objectType, details); @@ -39,37 +113,24 @@ function ModelDetails(props: DetailComponentProps): React.ReactElement { useEffect(() => { if (data && !loading) { - const { Model } = data.getDetailsTabDataForObject; - setDetails({ - size: Model?.size, - master: Model?.master, - authoritative: Model?.authoritative, - creationMethod: Model?.creationMethod, - modality: Model?.modality, - purpose: Model?.purpose, - units: Model?.units, - dateCaptured: Model?.dateCaptured, - modelFileType: Model?.modelFileType, - uvMaps: Model?.uvMaps || [], - boundingBoxP1X: Model?.boundingBoxP1X, - boundingBoxP1Y: Model?.boundingBoxP1Y, - boundingBoxP1Z: Model?.boundingBoxP1Z, - boundingBoxP2X: Model?.boundingBoxP2X, - boundingBoxP2Y: Model?.boundingBoxP2Y, - boundingBoxP2Z: Model?.boundingBoxP2Z, - countPoint: Model?.countPoint, - countFace: Model?.countFace, - countColorChannel: Model?.countColorChannel, - countTextureCoorinateChannel: Model?.countTextureCoorinateChannel, - hasBones: Model?.hasBones, - hasFaceNormals: Model?.hasFaceNormals, - hasTangents: Model?.hasTangents, - hasTextureCoordinates: Model?.hasTextureCoordinates, - hasVertexNormals: Model?.hasVertexNormals, - hasVertexColor: Model?.hasVertexColor, - isManifold: Model?.isManifold, - isWatertight: Model?.isWatertight, - }); + if (data.getDetailsTabDataForObject?.Model?.Model) { + const { DateCreated, Authoritative, Master, idVCreationMethod, idVModality, idVPurpose, idVUnits, idVFileType } = data.getDetailsTabDataForObject.Model.Model; + + if (DateCreated) { + setFormDateField(new Date(DateCreated)); + } + if (typeof Authoritative === 'boolean') { + setFormField('authoritative', Authoritative); + } + if (typeof Master === 'boolean') { + setFormField('master', Master); + } + setFormField('creationMethod', idVCreationMethod); + setFormField('modality', idVModality); + setFormField('purpose', idVPurpose); + setFormField('units', idVUnits); + setFormField('fileType', idVFileType); + } } }, [data, loading]); @@ -77,14 +138,10 @@ function ModelDetails(props: DetailComponentProps): React.ReactElement { return ; } - const updateUVMapsVariant = () => { - alert('TODO: KARAN: Update UV Maps'); - }; - - const setDateField = (name: string, value?: string | null): void => { + const setDateField = (value?: string | null): void => { if (value) { const date = new Date(value); - setDetails(details => ({ ...details, [name]: date })); + setFormDateField(date); } }; @@ -95,265 +152,79 @@ function ModelDetails(props: DetailComponentProps): React.ReactElement { if (value) { idFieldValue = Number.parseInt(value, 10); } - - setDetails(details => ({ ...details, [name]: idFieldValue })); + setFormField(name, idFieldValue); }; - const setCheckboxField = ({ target }): void => { const { name, checked } = target; - setDetails(details => ({ ...details, [name]: checked })); + setFormField(name, checked); }; const rowFieldProps = { alignItems: 'center', justifyContent: 'space-between', style: { borderRadius: 0 } }; - const modelData = data.getDetailsTabDataForObject?.Model; - return ( - - - - {formatBytes(details?.size ?? 0)} - - - setDateField('dateCaptured', value)} - /> - - - - - - - - - - - - - - - - + + + + Model + + + + + + setDateField(value)} /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + ); } -export default ModelDetails; \ No newline at end of file +export default ModelDetails; diff --git a/client/src/pages/Repository/components/DetailsView/ObjectDetails.tsx b/client/src/pages/Repository/components/DetailsView/ObjectDetails.tsx index c17f07448..6fd881288 100644 --- a/client/src/pages/Repository/components/DetailsView/ObjectDetails.tsx +++ b/client/src/pages/Repository/components/DetailsView/ObjectDetails.tsx @@ -22,9 +22,9 @@ const useStyles = makeStyles(({ palette, typography }) => ({ fontWeight: typography.fontWeightMedium }, value: { - color: ({ clickable = true }: DetailProps) => clickable ? palette.primary.main : palette.primary.dark, - textDecoration: ({ clickable = true, value }: DetailProps) => clickable && value ? 'underline' : undefined - }, + color: ({ clickable = true }: DetailProps) => (clickable ? palette.primary.main : palette.primary.dark), + textDecoration: ({ clickable = true, value }: DetailProps) => (clickable && value ? 'underline' : undefined) + } })); interface ObjectDetailsProps { @@ -35,12 +35,13 @@ interface ObjectDetailsProps { disabled: boolean; publishedState: string; retired: boolean; - originalFields: GetSystemObjectDetailsResult; - onRetiredUpdate: (event: React.ChangeEvent, checked: boolean) => void; + hideRetired?: boolean; + originalFields?: GetSystemObjectDetailsResult; + onRetiredUpdate?: (event: React.ChangeEvent, checked: boolean) => void; } function ObjectDetails(props: ObjectDetailsProps): React.ReactElement { - const { unit, project, subject, item, publishedState, retired, disabled, originalFields, onRetiredUpdate } = props; + const { unit, project, subject, item, publishedState, retired, hideRetired, disabled, originalFields, onRetiredUpdate } = props; const isRetiredUpdated: boolean = isFieldUpdated({ retired }, originalFields, 'retired'); @@ -51,16 +52,20 @@ function ObjectDetails(props: ObjectDetailsProps): React.ReactElement { - } - /> - + {!hideRetired && ( + + } + /> + )} ); } @@ -80,11 +85,7 @@ function Detail(props: DetailProps): React.ReactElement { let content: React.ReactNode = {value || '-'}; if (clickable && idSystemObject) { - content = ( - - {content} - - ); + content = {content}; } return ( @@ -99,4 +100,4 @@ function Detail(props: DetailProps): React.ReactElement { ); } -export default ObjectDetails; \ No newline at end of file +export default ObjectDetails; diff --git a/client/src/pages/Repository/components/DetailsView/index.tsx b/client/src/pages/Repository/components/DetailsView/index.tsx index 4cc025f22..257e1f75a 100644 --- a/client/src/pages/Repository/components/DetailsView/index.tsx +++ b/client/src/pages/Repository/components/DetailsView/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable prefer-const */ + /** * DetailsView * @@ -10,7 +12,7 @@ import { useParams } from 'react-router'; import { toast } from 'react-toastify'; import { LoadingButton } from '../../../../components'; import IdentifierList from '../../../../components/shared/IdentifierList'; -import { parseIdentifiersToState, useVocabularyStore } from '../../../../store'; +import { parseIdentifiersToState, useVocabularyStore, useRepositoryDetailsFormStore } from '../../../../store'; import { ActorDetailFieldsInput, AssetDetailFieldsInput, @@ -81,9 +83,11 @@ function DetailsView(): React.ReactElement { const idSystemObject: number = Number.parseInt(params.idSystemObject, 10); const { data, loading } = useObjectDetails(idSystemObject); - const [updatedData, setUpdatedData] = useState({}); + let [updatedData, setUpdatedData] = useState({}); const getEntries = useVocabularyStore(state => state.getEntries); + const getFormState = useRepositoryDetailsFormStore(state => state.getFormState); + const objectDetailsData = data; useEffect(() => { if (data && !loading) { @@ -203,11 +207,27 @@ function DetailsView(): React.ReactElement { }; const updateData = async (): Promise => { - const confirmed: boolean = global.confirm('Are you sure you want to update data'); - if (!confirmed) return; - setIsUpdatingData(true); try { + if (objectType === eSystemObjectType.eModel) { + const { dateCaptured, master, authoritative, creationMethod, modality, purpose, units, fileType } = getFormState(); + updatedData = { + Retired: updatedData?.Retired || details?.retired, + Name: updatedData?.Name || objectDetailsData?.getSystemObjectDetails.name, + Model: { + Name: updatedData?.Name, + Master: master, + Authoritative: authoritative, + CreationMethod: creationMethod, + Modality: modality, + Purpose: purpose, + Units: units, + ModelFileType: fileType, + DateCaptured: dateCaptured + } + }; + } + const { data } = await updateDetailsTabData(idSystemObject, idObject, objectType, updatedData); if (data?.updateObjectDetails?.success) { @@ -216,7 +236,6 @@ function DetailsView(): React.ReactElement { throw new Error('Update request returned success: false'); } } catch (error) { - console.log(JSON.stringify(error)); toast.error('Failed to save updated data'); } finally { setIsUpdatingData(false); diff --git a/client/src/pages/Repository/components/RepositoryFilterView/FilterSelect.tsx b/client/src/pages/Repository/components/RepositoryFilterView/FilterSelect.tsx index 7c4b84fba..09047d89e 100644 --- a/client/src/pages/Repository/components/RepositoryFilterView/FilterSelect.tsx +++ b/client/src/pages/Repository/components/RepositoryFilterView/FilterSelect.tsx @@ -1,3 +1,4 @@ +/* eslint-disable react/jsx-max-props-per-line */ /** * FilterSelect * @@ -12,7 +13,7 @@ import { FilterOption } from './RepositoryFilterOptions'; const useStyles = makeStyles(({ palette, breakpoints }) => ({ label: { fontSize: '0.8em', - color: palette.primary.dark, + color: palette.primary.dark }, select: { width: 160, @@ -24,11 +25,11 @@ const useStyles = makeStyles(({ palette, breakpoints }) => ({ borderRadius: 5, border: `0.5px solid ${palette.primary.contrastText}`, [breakpoints.down('lg')]: { - height: 26, + height: 26 } }, icon: { - color: palette.primary.contrastText, + color: palette.primary.contrastText } })); @@ -41,6 +42,7 @@ interface FilterSelectProps { function FilterSelect(props: FilterSelectProps): React.ReactElement { const { label, name, multiple, options } = props; + const classes = useStyles(); const [value, updateFilterValue] = useRepositoryStore(state => [state[name], state.updateFilterValue]); @@ -64,19 +66,43 @@ function FilterSelect(props: FilterSelectProps): React.ReactElement { return ( {label} - + {(name === 'has' || name === 'missing') && value.length < 1 ? ( + + ) : ( + + )} ); } -export default FilterSelect; \ No newline at end of file +export default FilterSelect; diff --git a/client/src/pages/Repository/components/RepositoryFilterView/index.tsx b/client/src/pages/Repository/components/RepositoryFilterView/index.tsx index 48d06ddc7..e0f34205a 100644 --- a/client/src/pages/Repository/components/RepositoryFilterView/index.tsx +++ b/client/src/pages/Repository/components/RepositoryFilterView/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * RepositoryFilterView * @@ -22,14 +24,14 @@ import { ChipOption, getRepositoryFilterOptions } from './RepositoryFilterOption const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ container: { display: 'flex', - height: (isExpanded: boolean) => isExpanded ? 235 : 35, + height: (isExpanded: boolean) => (isExpanded ? 235 : 35), background: palette.primary.light, borderRadius: 5, padding: 10, marginBottom: 10, transition: '250ms height ease', [breakpoints.down('lg')]: { - height: (isExpanded: boolean) => isExpanded ? 215 : 30 + height: (isExpanded: boolean) => (isExpanded ? 215 : 30) } }, content: { @@ -52,12 +54,12 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ transition: 'all 250ms linear', [breakpoints.down('lg')]: { height: 20, - padding: '0px 5px', + padding: '0px 5px' }, '&:hover': { cursor: 'pointer', backgroundColor: fade(palette.primary.light, 0.2) - }, + } }, caption: { marginTop: 4, @@ -88,7 +90,7 @@ const useStyles = makeStyles(({ palette, typography, breakpoints }) => ({ }, options: { display: 'flex', - alignItems: (isExpanded: boolean) => isExpanded ? 'flex-end' : 'center', + alignItems: (isExpanded: boolean) => (isExpanded ? 'flex-end' : 'center'), justifyContent: 'center' } })); @@ -136,13 +138,7 @@ function RepositoryFilterView(): React.ReactElement { Unit: All - + {chipsOptions.map((chip: ChipOption, index: number) => { const { id, type, name } = chip; const label: string = `${getTermForSystemObjectType(type)}: ${name}`; @@ -168,14 +164,7 @@ function RepositoryFilterView(): React.ReactElement { ); - let expandIcon: React.ReactNode = ( - - ); + let expandIcon: React.ReactNode = ; if (isExpanded) { content = ( @@ -183,8 +172,8 @@ function RepositoryFilterView(): React.ReactElement { {content} - - + + @@ -208,14 +197,7 @@ function RepositoryFilterView(): React.ReactElement { ); - expandIcon = ( - - ); + expandIcon = ; } if (!data || loading) { @@ -224,11 +206,9 @@ function RepositoryFilterView(): React.ReactElement { return ( - - {content} - + {content} - + {expandIcon} diff --git a/client/src/pages/Repository/components/RepositoryTreeView/index.tsx b/client/src/pages/Repository/components/RepositoryTreeView/index.tsx index 7d8a5269e..25f8f367f 100644 --- a/client/src/pages/Repository/components/RepositoryTreeView/index.tsx +++ b/client/src/pages/Repository/components/RepositoryTreeView/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable react/jsx-max-props-per-line */ + /** * RepositoryTreeView * @@ -8,11 +10,20 @@ import { makeStyles } from '@material-ui/core/styles'; import ChevronRightIcon from '@material-ui/icons/ChevronRight'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { TreeView } from '@material-ui/lab'; -import React, { useCallback, useEffect } from 'react'; +import React, { useCallback } from 'react'; import { Loader } from '../../../../components'; import { StateRelatedObject, treeRootKey, useControlStore, useRepositoryStore } from '../../../../store'; import { NavigationResultEntry } from '../../../../types/graphql'; -import { getObjectInterfaceDetails, getRepositoryTreeNodeId, getTreeColorVariant, getTreeViewColumns, getTreeViewStyleHeight, getTreeViewStyleWidth, getTreeWidth, isRepositoryItemSelected } from '../../../../utils/repository'; +import { + getObjectInterfaceDetails, + getRepositoryTreeNodeId, + getTreeColorVariant, + getTreeViewColumns, + getTreeViewStyleHeight, + getTreeViewStyleWidth, + getTreeWidth, + isRepositoryItemSelected +} from '../../../../utils/repository'; import RepositoryTreeHeader from './RepositoryTreeHeader'; import StyledTreeItem from './StyledTreeItem'; import TreeLabel, { TreeLabelEmpty, TreeLabelLoading } from './TreeLabel'; @@ -62,22 +73,21 @@ function RepositoryTreeView(props: RepositoryTreeViewProps): React.ReactElement const classes = useStyles({ isExpanded, sideBarExpanded, isModal }); - const [tree, initializeTree, getChildren] = useRepositoryStore(state => [state.tree, state.initializeTree, state.getChildren]); + const [tree, getChildren] = useRepositoryStore(state => [state.tree, state.getChildren]); const metadataColumns = useRepositoryStore(state => state.metadataToDisplay); - useEffect(() => { - initializeTree(); - }, [initializeTree]); - - const onNodeToggle = useCallback(async (_, nodeIds: string[]) => { - if (!nodeIds.length) return; - const [nodeId] = nodeIds.slice(); - const alreadyLoaded = tree.has(nodeId); + const onNodeToggle = useCallback( + async (_, nodeIds: string[]) => { + if (!nodeIds.length) return; + const [nodeId] = nodeIds.slice(); + const alreadyLoaded = tree.has(nodeId); - if (!alreadyLoaded) { - getChildren(nodeId); - } - }, [tree, getChildren]); + if (!alreadyLoaded) { + getChildren(nodeId); + } + }, + [tree, getChildren] + ); const renderTree = (children: NavigationResultEntry[] | undefined) => { if (!children) return null; @@ -136,13 +146,7 @@ function RepositoryTreeView(props: RepositoryTreeViewProps): React.ReactElement ); return ( - + {childNodesContent} ); @@ -157,13 +161,7 @@ function RepositoryTreeView(props: RepositoryTreeViewProps): React.ReactElement const children = tree.get(treeRootKey); content = ( - } - defaultExpandIcon={} - onNodeToggle={onNodeToggle} - style={{ width }} - > + } defaultExpandIcon={} onNodeToggle={onNodeToggle} style={{ width }}> {renderTree(children)} diff --git a/client/src/pages/Repository/hooks/useRepository.ts b/client/src/pages/Repository/hooks/useRepository.ts index ae3805004..ecabae472 100644 --- a/client/src/pages/Repository/hooks/useRepository.ts +++ b/client/src/pages/Repository/hooks/useRepository.ts @@ -8,12 +8,13 @@ import { RepositoryFilter } from '..'; import { apolloClient } from '../../../graphql'; import { GetObjectChildrenDocument, GetObjectChildrenQuery } from '../../../types/graphql'; -function getObjectChildrenForRoot(filter: RepositoryFilter): Promise> { +function getObjectChildrenForRoot(filter: RepositoryFilter, idSystemObject = 0): Promise> { return apolloClient.query({ query: GetObjectChildrenDocument, + fetchPolicy: 'network-only', variables: { input: { - idRoot: 0, + idRoot: idSystemObject, objectTypes: filter.repositoryRootType, metadataColumns: filter.metadataToDisplay, objectsToDisplay: filter.objectsToDisplay, @@ -34,6 +35,7 @@ function getObjectChildrenForRoot(filter: RepositoryFilter): Promise> { return apolloClient.query({ query: GetObjectChildrenDocument, + fetchPolicy: 'network-only', variables: { input: { idRoot, diff --git a/client/src/pages/Repository/index.tsx b/client/src/pages/Repository/index.tsx index 5b097f915..b5937a158 100644 --- a/client/src/pages/Repository/index.tsx +++ b/client/src/pages/Repository/index.tsx @@ -1,4 +1,6 @@ /* eslint-disable react-hooks/exhaustive-deps */ +/* eslint-disable @typescript-eslint/no-explicit-any */ + /** * Repository * @@ -22,20 +24,21 @@ const useStyles = makeStyles(({ breakpoints }) => ({ container: { display: 'flex', flex: 1, - maxWidth: (sideBarExpanded: boolean) => sideBarExpanded ? '85vw' : '93vw', + maxWidth: (sideBarExpanded: boolean) => (sideBarExpanded ? '85vw' : '93vw'), flexDirection: 'column', padding: 20, paddingBottom: 0, paddingRight: 0, [breakpoints.down('lg')]: { paddingRight: 20, - maxWidth: (sideBarExpanded: boolean) => sideBarExpanded ? '85vw' : '92vw', + maxWidth: (sideBarExpanded: boolean) => (sideBarExpanded ? '85vw' : '92vw') } } })); export type RepositoryFilter = { search: string; + keyword: string; repositoryRootType: eSystemObjectType[]; objectsToDisplay: eSystemObjectType[]; metadataToDisplay: eMetadata[]; @@ -56,16 +59,8 @@ function Repository(): React.ReactElement { return ( - - + + @@ -79,6 +74,7 @@ function TreeViewPage(): React.ReactElement { const location = useLocation(); const { search, + keyword, repositoryRootType, objectsToDisplay, metadataToDisplay, @@ -95,44 +91,81 @@ function TreeViewPage(): React.ReactElement { const queries: RepositoryFilter = parseRepositoryUrl(location.search); - const filterState: RepositoryFilter = React.useMemo(() => ({ - search, - repositoryRootType, - objectsToDisplay, - metadataToDisplay, - units, - projects, - has, - missing, - captureMethod, - variantType, - modelPurpose, - modelFileType, - }), [ - search, - repositoryRootType, - objectsToDisplay, - metadataToDisplay, - units, - projects, - has, - missing, - captureMethod, - variantType, - modelPurpose, - modelFileType, - ]); + const filterState: RepositoryFilter = React.useMemo( + () => ({ + search, + keyword, + repositoryRootType, + objectsToDisplay, + metadataToDisplay, + units, + projects, + has, + missing, + captureMethod, + variantType, + modelPurpose, + modelFileType + }), + [search, keyword, repositoryRootType, objectsToDisplay, metadataToDisplay, units, projects, has, missing, captureMethod, variantType, modelPurpose, modelFileType] + ); - const initialFilterState = Object.keys(queries).length ? queries : filterState; + const setDefaultFilterSelectionsCookie = () => { + document.cookie = `filterSelections=${JSON.stringify({ + repositoryRootType: [eSystemObjectType.eUnit], + objectsToDisplay: [], + metadataToDisplay: [eMetadata.eHierarchyUnit, eMetadata.eHierarchySubject, eMetadata.eHierarchyItem], + units: [], + projects: [], + has: [], + missing: [], + captureMethod: [], + variantType: [], + modelPurpose: [], + modelFileType: [] + })}`; + }; + + /* + Sets up a default cookie if no filterSelection cookie exists. + If a filterSelection cookie exists, component will read that + and generate URL and state based on cookie. + */ + let cookieFilterSelections; + (function setRepositoryViewCookies() { + if (!document.cookie.length || document.cookie.indexOf('filterSelections') === -1) { + setDefaultFilterSelectionsCookie(); + } + cookieFilterSelections = document.cookie.split(';'); + cookieFilterSelections = cookieFilterSelections.find(entry => entry.trim().startsWith('filterSelections')); + cookieFilterSelections = JSON.parse(cookieFilterSelections.split('=')[1]); + })(); + + const initialFilterState = Object.keys(queries).length ? queries : cookieFilterSelections; useEffect(() => { updateRepositoryFilter(initialFilterState); - }, [updateRepositoryFilter]); + }, [updateRepositoryFilter, location.search]); useEffect(() => { - const route = generateRepositoryUrl(filterState); + const newRepositoryFilterState: any = { + search, + repositoryRootType, + objectsToDisplay, + metadataToDisplay, + units, + projects, + has, + missing, + captureMethod, + variantType, + modelPurpose, + modelFileType + }; + + const route = generateRepositoryUrl(newRepositoryFilterState) || generateRepositoryUrl(cookieFilterSelections); history.push(route); - }, [filterState, history]); + }, [history, filterState]); return ( @@ -142,4 +175,4 @@ function TreeViewPage(): React.ReactElement { ); } -export default Repository; \ No newline at end of file +export default Repository; diff --git a/client/src/store/index.ts b/client/src/store/index.ts index 37e99e8b7..c440669de 100644 --- a/client/src/store/index.ts +++ b/client/src/store/index.ts @@ -13,3 +13,4 @@ export * from './metadata'; export * from './repository'; export * from './utils'; export * from './control'; +export * from './repositoryDetails'; \ No newline at end of file diff --git a/client/src/store/item.ts b/client/src/store/item.ts index 5ab383eb0..109bba8b7 100644 --- a/client/src/store/item.ts +++ b/client/src/store/item.ts @@ -48,13 +48,13 @@ export const useItemStore = create((set: SetState, get: Ge return; } + currentDefaultItem.selected = false; const newItemSelected = lodash.find(fetchedItems, { selected: true }); - if (newItemSelected) { - currentDefaultItem.selected = false; - } + if (!newItemSelected) + fetchedItems[0].selected = true; - const newItems: StateItem[] = [currentDefaultItem].concat(fetchedItems); + const newItems: StateItem[] = fetchedItems.concat([currentDefaultItem]); set({ items: newItems, loading: false }); } diff --git a/client/src/store/metadata/index.ts b/client/src/store/metadata/index.ts index 127e0152e..4b7723671 100644 --- a/client/src/store/metadata/index.ts +++ b/client/src/store/metadata/index.ts @@ -23,8 +23,7 @@ import { StateItem, useItemStore } from '../item'; import { StateProject, useProjectStore } from '../project'; import { StateSubject, useSubjectStore } from '../subject'; import { FileId, IngestionFile, useUploadStore } from '../upload'; -import { useUserStore } from '../user'; -import { parseFileId, parseFoldersToState, parseIdentifiersToState, parseItemToState, parseProjectToState, parseSubjectUnitIdentifierToState, parseUVMapsToState } from '../utils'; +import { parseFileId, parseFoldersToState, parseIdentifiersToState, parseItemToState, parseProjectToState, parseSubjectUnitIdentifierToState } from '../utils'; import { useVocabularyStore } from '../vocabulary'; import { defaultModelFields, defaultOtherFields, defaultPhotogrammetryFields, defaultSceneFields, ValidateFieldsSchema } from './metadata.defaults'; import { @@ -69,7 +68,7 @@ export const useMetadataStore = create((set: SetState((set: SetState((set: SetState => { - const { isAuthenticated } = useUserStore.getState(); const { completed, getSelectedFiles } = useUploadStore.getState(); const { getInitialEntry } = useVocabularyStore.getState(); const { addSubjects } = useSubjectStore.getState(); @@ -156,14 +154,8 @@ export const useMetadataStore = create((set: SetState parseFileId(id)); - const defaultIdentifier: StateIdentifier = { - id: 0, - identifier: '', - identifierType: getInitialEntry(eVocabularySetID.eIdentifierIdentifierType), - selected: false - }; - const defaultIdentifierField = [defaultIdentifier]; + const defaultIdentifierField: StateIdentifier[] = []; const defaultPhotogrammetry: PhotogrammetryFields = { ...defaultPhotogrammetryFields, @@ -174,11 +166,11 @@ export const useMetadataStore = create((set: SetState((set: SetState = await apolloClient.query({ query: GetAssetVersionsDetailsDocument, variables: { @@ -278,7 +265,7 @@ export const useMetadataStore = create((set: SetState((set: SetState((set: SetState { diff --git a/client/src/store/metadata/metadata.defaults.ts b/client/src/store/metadata/metadata.defaults.ts index d586dffd9..729bc32c3 100644 --- a/client/src/store/metadata/metadata.defaults.ts +++ b/client/src/store/metadata/metadata.defaults.ts @@ -40,6 +40,7 @@ export const defaultPhotogrammetryFields: PhotogrammetryFields = { systemCreated: true, identifiers: [], folders: [], + name: '', description: '', dateCaptured: new Date(), datasetType: null, @@ -62,6 +63,7 @@ export const photogrammetryFieldsSchema = yup.object().shape({ systemCreated: yup.boolean().required(), identifiers: yup.array().of(identifierSchema).when('systemCreated', identifiersWhenValidation), folders: yup.array().of(folderSchema), + name: yup.string(), description: yup.string().required('Description cannot be empty'), dateCaptured: yup.date().required(), datasetType: yup.number().typeError('Please select a valid dataset type'), @@ -86,44 +88,31 @@ const uvMapSchema = yup.object().shape({ const sourceObjectSchema = yup.object().shape({ idSystemObject: yup.number().required(), - name: yup.string().required(), - identifier: yup.string().required(), + name: yup.string().nullable(), + identifier: yup.string().nullable(), objectType: yup.number().required() }); export const defaultModelFields: ModelFields = { + name: '', systemCreated: true, identifiers: [], - uvMaps: [], sourceObjects: [], - dateCaptured: new Date(), + dateCaptured: null, creationMethod: null, - master: false, - authoritative: false, + master: true, + authoritative: true, modality: null, units: null, purpose: null, modelFileType: null, - roughness: null, - metalness: null, - pointCount: null, - faceCount: null, - isWatertight: null, - hasNormals: null, - hasVertexColor: null, - hasUVSpace: null, - boundingBoxP1X: null, - boundingBoxP1Y: null, - boundingBoxP1Z: null, - boundingBoxP2X: null, - boundingBoxP2Y: null, - boundingBoxP2Z: null, directory: '' }; export type ModelSchemaType = typeof modelFieldsSchema; export const modelFieldsSchema = yup.object().shape({ + name: yup.string(), systemCreated: yup.boolean().required(), identifiers: yup.array().of(identifierSchema).when('systemCreated', identifiersWhenValidation), uvMaps: yup.array().of(uvMapSchema), @@ -140,6 +129,9 @@ export const modelFieldsSchema = yup.object().shape({ metalness: yup.number().nullable(true), pointCount: yup.number().nullable(true), faceCount: yup.number().nullable(true), + isTwoManifoldUnbounded: yup.boolean().nullable(true), + isTwoManifoldBounded: yup.boolean().nullable(true), + selfIntersecting: yup.boolean().nullable(true), isWatertight: yup.boolean().nullable(true), hasNormals: yup.boolean().nullable(true), hasVertexColor: yup.boolean().nullable(true), diff --git a/client/src/store/metadata/metadata.types.ts b/client/src/store/metadata/metadata.types.ts index f26e4358f..fd1e64ab3 100644 --- a/client/src/store/metadata/metadata.types.ts +++ b/client/src/store/metadata/metadata.types.ts @@ -42,7 +42,7 @@ export type FieldErrors = { }; }; -export type MetadataFieldValue = string | number | boolean | null | Date | StateIdentifier[] | StateFolder[] | StateUVMap[] | StateRelatedObject[]; +export type MetadataFieldValue = string | number | boolean | null | Date | StateIdentifier[] | StateFolder[] | StateRelatedObject[]; export type MetadataUpdate = { valid: boolean; @@ -67,6 +67,7 @@ export type PhotogrammetryFields = { systemCreated: boolean; identifiers: StateIdentifier[]; folders: StateFolder[]; + name: string; description: string; dateCaptured: Date; datasetType: number | null; @@ -83,19 +84,12 @@ export type PhotogrammetryFields = { directory: string; }; -export type StateUVMap = { - id: number; - name: string; - edgeLength: number; - mapType: number | null; -}; - export type ModelFields = { + name: string; systemCreated: boolean; identifiers: StateIdentifier[]; - uvMaps: StateUVMap[]; sourceObjects: StateRelatedObject[]; - dateCaptured: Date; + dateCaptured: Date | string | null; creationMethod: number | null; master: boolean; authoritative: boolean; @@ -103,20 +97,6 @@ export type ModelFields = { units: number | null; purpose: number | null; modelFileType: number | null; - roughness: number | null; - metalness: number | null; - pointCount: number | null; - faceCount: number | null; - isWatertight: boolean | null; - hasNormals: boolean | null; - hasVertexColor: boolean | null; - hasUVSpace: boolean | null; - boundingBoxP1X: number | null; - boundingBoxP1Y: number | null; - boundingBoxP1Z: number | null; - boundingBoxP2X: number | null; - boundingBoxP2Y: number | null; - boundingBoxP2Z: number | null; directory: string; }; diff --git a/client/src/store/repository.ts b/client/src/store/repository.ts index adec0867b..a453df85c 100644 --- a/client/src/store/repository.ts +++ b/client/src/store/repository.ts @@ -13,6 +13,7 @@ import { parseRepositoryTreeNodeId, validateArray } from '../utils/repository'; type RepositoryStore = { isExpanded: boolean; search: string; + keyword: string; tree: Map; loading: boolean; updateSearch: (value: string) => void; @@ -30,19 +31,28 @@ type RepositoryStore = { modelFileType: number[]; fromDate: Date | null; toDate: Date | null; + repositoryBrowserRoot: number | null; getFilterState: () => RepositoryFilter; removeUnitsOrProjects: (id: number, type: eSystemObjectType) => void; updateFilterValue: (name: string, value: number | number[] | Date) => void; + resetRepositoryFilter: (modifyCookie?: boolean) => void; + resetKeywordSearch: () => void; initializeTree: () => Promise; getChildren: (nodeId: string) => Promise; updateRepositoryFilter: (filter: RepositoryFilter) => void; + setCookieToState: () => void; + setDefaultIngestionFilters: (systemObjectType: eSystemObjectType, idRoot: number | undefined) => void; + getChildrenForIngestion: (idRoot: number) => void; + closeRepositoryBrowser: () => void; }; export const treeRootKey: string = 'root'; export const useRepositoryStore = create((set: SetState, get: GetState) => ({ isExpanded: true, + // keyword is the text within input. search is the actual term used for searching search: '', + keyword: '', tree: new Map([[treeRootKey, []]]), loading: true, repositoryRootType: [eSystemObjectType.eUnit], @@ -58,37 +68,43 @@ export const useRepositoryStore = create((set: SetState { - const { initializeTree } = get(); - set({ [name]: value, loading: true }); + const { initializeTree, setCookieToState, keyword } = get(); + set({ [name]: value, loading: true, search: keyword }); + setCookieToState(); initializeTree(); }, updateSearch: (value: string): void => { - set({ search: value }); + //changed search to keyword + set({ keyword: value }); }, toggleFilter: (): void => { const { isExpanded } = get(); set({ isExpanded: !isExpanded }); }, initializeTree: async (): Promise => { - const { getFilterState } = get(); + const { getFilterState, getChildrenForIngestion, repositoryBrowserRoot } = get(); const filter = getFilterState(); - const { data, error } = await getObjectChildrenForRoot(filter); - - if (data && !error) { - const { getObjectChildren } = data; - const { entries } = getObjectChildren; - const entry: [string, NavigationResultEntry[]] = [treeRootKey, entries]; - const updatedTree = new Map([entry]); - set({ tree: updatedTree, loading: false }); + if (repositoryBrowserRoot) { + getChildrenForIngestion(repositoryBrowserRoot); + } else { + const { data, error } = await getObjectChildrenForRoot(filter); + if (data && !error) { + const { getObjectChildren } = data; + const { entries } = getObjectChildren; + const entry: [string, NavigationResultEntry[]] = [treeRootKey, entries]; + const updatedTree = new Map([entry]); + set({ tree: updatedTree, loading: false }); + } } + }, getChildren: async (nodeId: string): Promise => { const { tree, getFilterState } = get(); const filter = getFilterState(); const { idSystemObject } = parseRepositoryTreeNodeId(nodeId); const { data, error } = await getObjectChildren(idSystemObject, filter); - if (data && !error) { const { getObjectChildren } = data; const { entries } = getObjectChildren; @@ -98,24 +114,26 @@ export const useRepositoryStore = create((set: SetState { - const { units, projects } = get(); + const { units, projects, setCookieToState, initializeTree, keyword } = get(); let updatedUnits: number[] = units.slice(); let updatedProjects: number[] = projects.slice(); switch (type) { case eSystemObjectType.eUnit: { if (updatedUnits.length === 1) updatedUnits = []; - else updatedUnits = updatedUnits.filter(unit => unit === id); + else updatedUnits = updatedUnits.filter(unit => unit !== id); break; } case eSystemObjectType.eProject: { if (updatedProjects.length === 1) updatedProjects = []; - else updatedProjects = updatedProjects.filter(project => project === id); + else updatedProjects = updatedProjects.filter(project => project !== id); break; } } - set({ units: updatedUnits, projects: updatedProjects }); + set({ units: updatedUnits, projects: updatedProjects, search: keyword }); + setCookieToState(); + initializeTree(); }, updateRepositoryFilter: (filter: RepositoryFilter): void => { const { @@ -129,7 +147,9 @@ export const useRepositoryStore = create((set: SetState((set: SetState { + const { setCookieToState } = get(); + const stateValues = { + repositoryRootType: [eSystemObjectType.eUnit], + objectsToDisplay: [], + metadataToDisplay: [eMetadata.eHierarchyUnit, eMetadata.eHierarchySubject, eMetadata.eHierarchyItem], + units: [], + projects: [], + has: [], + missing: [], + captureMethod: [], + variantType: [], + modelPurpose: [], + modelFileType: [], + }; + set(stateValues); + if (modifyCookie) { + setCookieToState(); + } + }, + resetKeywordSearch: (): void => { + set({ keyword: '', search: '' }); }, getFilterState: (): RepositoryFilter => { const { search, + keyword, repositoryRootType, objectsToDisplay, metadataToDisplay, @@ -167,6 +213,7 @@ export const useRepositoryStore = create((set: SetState((set: SetState { + const { getFilterState } = get(); + const { + repositoryRootType, + objectsToDisplay, + metadataToDisplay, + units, + projects, + has, + missing, + captureMethod, + variantType, + modelPurpose, + modelFileType + } = getFilterState(); + const currentFilterState = { + repositoryRootType, + objectsToDisplay, + metadataToDisplay, + units, + projects, + has, + missing, + captureMethod, + variantType, + modelPurpose, + modelFileType + }; + // 20 years + document.cookie = `filterSelections=${JSON.stringify(currentFilterState)};max-age=630700000`; + }, + setDefaultIngestionFilters: (systemObjectType: eSystemObjectType, idRoot: number | undefined): void => { + const { resetKeywordSearch, resetRepositoryFilter, getChildrenForIngestion } = get(); + set({ isExpanded: false, repositoryBrowserRoot: idRoot }); + resetKeywordSearch(); + resetRepositoryFilter(false); + + if (systemObjectType === eSystemObjectType.eModel) { + set({ repositoryRootType: [], objectsToDisplay: [eSystemObjectType.eCaptureData, eSystemObjectType.eModel] }); + getChildrenForIngestion(idRoot || 0); + } + }, + getChildrenForIngestion: async (idSystemObject: number): Promise => { + const { getFilterState } = get(); + const filter = getFilterState(); + const { data, error } = await getObjectChildrenForRoot(filter, idSystemObject); + if (data && !error) { + const { getObjectChildren } = data; + const { entries } = getObjectChildren; + const entry: [string, NavigationResultEntry[]] = [treeRootKey, entries]; + const updatedTree = new Map([entry]); + set({ tree: updatedTree, loading: false }); + } + }, + closeRepositoryBrowser: (): void => { + set({ isExpanded: true, repositoryBrowserRoot: null }); } -})); +})); \ No newline at end of file diff --git a/client/src/store/repositoryDetails.ts b/client/src/store/repositoryDetails.ts new file mode 100644 index 000000000..b3b3fc5b4 --- /dev/null +++ b/client/src/store/repositoryDetails.ts @@ -0,0 +1,69 @@ +/** + * Repository Details Model Store + */ +import create, { GetState, SetState } from 'zustand'; + +interface FormFields { + dateCaptured?: Date | null; + master?: boolean | null; + authoritative?: boolean | null; + creationMethod?: number | null; + modality?: number | null; + purpose?: number | null; + units?: number | null; + fileType?: number | null; +} + +type RepositoryDetailsFormStore = { + dateCaptured: Date | null; + master: boolean | null; + authoritative: boolean | null; + creationMethod: number | null; + modality: number | null; + purpose: number | null; + units: number | null; + fileType: number | null; + getFormState: () => FormFields; + setFormField: (name: string, value: number | string | boolean | null) => void; + setFormDateField: (date: Date | null) => void; +}; + +export const useRepositoryDetailsFormStore = create((set: SetState, get: GetState) => ({ + dateCaptured: null, + master: null, + authoritative: null, + creationMethod: null, + modality: null, + purpose: null, + units: null, + fileType: null, + getFormState: () => { + const { + dateCaptured, + master, + authoritative, + creationMethod, + modality, + purpose, + units, + fileType + } = get(); + + return { + dateCaptured, + master, + authoritative, + creationMethod, + modality, + purpose, + units, + fileType + }; + }, + setFormField: (name: string, value: number | string | boolean | null): void => { + set({ [name]: value }); + }, + setFormDateField: (date: Date | null): void => { + set({ 'dateCaptured': date }); + } +})); \ No newline at end of file diff --git a/client/src/store/upload.ts b/client/src/store/upload.ts index b8dc9b2c7..e360a8fc0 100644 --- a/client/src/store/upload.ts +++ b/client/src/store/upload.ts @@ -5,6 +5,7 @@ */ import create, { SetState, GetState } from 'zustand'; import lodash from 'lodash'; +import path from 'path'; import { toast } from 'react-toastify'; import { eVocabularySetID } from '../types/server'; import { generateFileId } from '../utils/upload'; @@ -20,6 +21,7 @@ export type FileId = string; export enum FileUploadStatus { READY = 'READY', UPLOADING = 'UPLOADING', + PROCESSING = 'PROCESSING', COMPLETE = 'COMPLETE', CANCELLED = 'CANCELLED', FAILED = 'FAILED' @@ -75,11 +77,13 @@ export const useUploadStore = create((set: SetState, g const alreadyContains = !!lodash.find(pending, { id }); const { name, size } = file; - const { getInitialEntry } = useVocabularyStore.getState(); - const type = getInitialEntry(eVocabularySetID.eAssetAssetType); - + const extension: string = (name.toLowerCase().endsWith('.svx.json')) ? '.svx.json' : path.extname(name); + const { getAssetTypeForExtension, getInitialEntry } = useVocabularyStore.getState(); + let type = getAssetTypeForExtension(extension); + if (!type) + type = getInitialEntry(eVocabularySetID.eAssetAssetType); if (!type) { - toast.error(`Vocabulary for file ${name} not found`); + toast.error(`Asset type for file ${name} not found`); return; } @@ -182,7 +186,7 @@ export const useUploadStore = create((set: SetState, g const onProgress = (event: ProgressEvent) => { const { loaded, total } = event; const progress = Math.floor((loaded / total) * 100); - const updateProgress = !(progress % 5); + const updateProgress = !(progress % 1); if (updateProgress) { const progressEvent: UploadProgressEvent = { @@ -306,6 +310,8 @@ export const useUploadStore = create((set: SetState, g const updatedPendingProgress = lodash.forEach(pending, file => { if (file.id === id) { lodash.set(file, 'progress', progress); + if (progress === 100) + lodash.set(file, 'status', FileUploadStatus.PROCESSING); } }); set({ pending: updatedPendingProgress }); diff --git a/client/src/store/user.ts b/client/src/store/user.ts index 4e41880f7..e7e695e60 100644 --- a/client/src/store/user.ts +++ b/client/src/store/user.ts @@ -11,7 +11,6 @@ import API, { AuthResponseType } from '../api'; type UserStore = { user: User | null; - isAuthenticated: () => Promise; initialize: () => Promise; login: (email: string, password: string) => Promise; logout: () => Promise; @@ -19,9 +18,6 @@ type UserStore = { export const useUserStore = create((set: SetState, get: GetState) => ({ user: null, - isAuthenticated: async (): Promise => { - return !!(await getAuthenticatedUser()); - }, initialize: async () => { const { user } = get(); if (!user) { @@ -33,12 +29,14 @@ export const useUserStore = create((set: SetState, get: Ge const authResponse = await API.login(email, password); if (!authResponse.success) { + console.log(`Attempted login for ${email} failed`); return { ...authResponse, success: false }; } + console.log(`Attempted login for ${email} retrieving authenticated user`); const user: User | null = await getAuthenticatedUser(); if (!user) { @@ -73,7 +71,8 @@ async function getAuthenticatedUser(): Promise { const { getCurrentUser } = data; return getCurrentUser.User; - } catch { + } catch (error) { + console.log(`getAuthenticatedUser failure: ${JSON.stringify(error)}`); return null; } } diff --git a/client/src/store/utils.ts b/client/src/store/utils.ts index 7c67dda10..a990388b4 100644 --- a/client/src/store/utils.ts +++ b/client/src/store/utils.ts @@ -3,9 +3,9 @@ * * These are store specific utilities. */ -import { AssetVersion, IngestFolder, IngestIdentifier, IngestUvMap, Item, Project, SubjectUnitIdentifier, Vocabulary } from '../types/graphql'; +import { AssetVersion, IngestFolder, IngestIdentifier, Item, Project, SubjectUnitIdentifier, Vocabulary } from '../types/graphql'; import { StateItem } from './item'; -import { StateFolder, StateIdentifier, StateUVMap } from './metadata'; +import { StateFolder, StateIdentifier } from './metadata'; import { StateProject } from './project'; import { StateSubject } from './subject'; import { FileId, FileUploadStatus, IngestionFile } from './upload'; @@ -94,14 +94,3 @@ export function parseFoldersToState(folders: IngestFolder[]): StateFolder[] { return stateFolders; } - -export function parseUVMapsToState(folders: IngestUvMap[]): StateUVMap[] { - const uvMaps: StateUVMap[] = folders.map(({ name, edgeLength, mapType }: IngestUvMap, index: number) => ({ - id: index, - name, - edgeLength, - mapType - })); - - return uvMaps; -} diff --git a/client/src/store/vocabulary.ts b/client/src/store/vocabulary.ts index b3f0ee3e5..11f21b5bc 100644 --- a/client/src/store/vocabulary.ts +++ b/client/src/store/vocabulary.ts @@ -7,7 +7,7 @@ import lodash from 'lodash'; import create, { GetState, SetState } from 'zustand'; import { apolloClient } from '../graphql'; import { GetVocabularyEntriesDocument, Vocabulary } from '../types/graphql'; -import { eVocabularySetID } from '../types/server'; +import { eVocabularyID, eVocabularySetID } from '../types/server'; import { multiIncludes } from '../utils/shared'; export type VocabularyOption = Pick; @@ -22,15 +22,18 @@ type AssetType = { type VocabularyStore = { vocabularies: Map; + vocabularyMap: Map; updateVocabularyEntries: () => Promise; getEntries: (eVocabularySetID: eVocabularySetID) => VocabularyOption[]; getInitialEntry: (eVocabularySetID: eVocabularySetID) => number | null; getVocabularyTerm: (eVocabularySetID: eVocabularySetID, idVocabulary: number) => string | null; getAssetType: (idVocabulary: number) => AssetType; + getAssetTypeForExtension: (extension: string) => number | null; }; export const useVocabularyStore = create((set: SetState, get: GetState) => ({ vocabularies: new Map(), + vocabularyMap: new Map(), updateVocabularyEntries: async (): Promise => { const variables = { input: { @@ -63,12 +66,16 @@ export const useVocabularyStore = create((set: SetState(); + const vocabularyMap = new Map(); VocabularyEntries.forEach(({ eVocabSetID, Vocabulary }) => { vocabularies.set(eVocabSetID, Vocabulary); + Vocabulary.forEach(vocabEntry => { + vocabularyMap.set(vocabEntry.eVocabID, vocabEntry); + }); }); - set({ vocabularies }); + set({ vocabularies, vocabularyMap }); return vocabularies; }, @@ -101,7 +108,8 @@ export const useVocabularyStore = create((set: SetState((set: SetState { + const { vocabularyMap } = get(); + let eVocabEnum: eVocabularyID | null = null; + + switch (extension.toLowerCase()) { + case '.zip': eVocabEnum = eVocabularyID.eAssetAssetTypeBulkIngestion; break; + + case '.dcm': eVocabEnum = eVocabularyID.eAssetAssetTypeCaptureDataSetDicom; break; + + case '.raw': + case '.cr2': + case '.cr3': + case '.dng': + case '.arw': + case '.camdng': + case '.tif': + case '.tiff': + case '.jpg': + case '.jpeg': eVocabEnum = eVocabularyID.eAssetAssetTypeCaptureDataFile; break; + + case '.obj': + case '.ply': + case '.stl': + case '.glb': + case '.gltf': + case '.usda': + case '.usdc': + case '.usdz': + case '.x3d': + case '.wrl': + case '.dae': + case '.fbx': + case '.ma': + case '.3ds': + case '.ptx': + case '.pts': eVocabEnum = eVocabularyID.eAssetAssetTypeModel; break; + + case '.svx.json': + case '.json': eVocabEnum = eVocabularyID.eAssetAssetTypeScene; break; + + default: eVocabEnum = eVocabularyID.eAssetAssetTypeOther; break; + } + + const vocabulary = vocabularyMap.get(eVocabEnum); + return (vocabulary) ? vocabulary.idVocabulary : null; } })); diff --git a/client/src/types/graphql.tsx b/client/src/types/graphql.tsx index 6e502f81c..36c83e513 100644 --- a/client/src/types/graphql.tsx +++ b/client/src/types/graphql.tsx @@ -1,2631 +1,3221 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import { gql } from '@apollo/client'; import * as Apollo from '@apollo/client'; - export type Maybe = T | null; export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +const defaultOptions = {} /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { - ID: string; - String: string; - Boolean: boolean; - Int: number; - Float: number; - DateTime: any; - Upload: any; + ID: string; + String: string; + Boolean: boolean; + Int: number; + Float: number; + DateTime: any; + Upload: any; + BigInt: any; }; export type Query = { - __typename?: 'Query'; - areCameraSettingsUniform: AreCameraSettingsUniformResult; - getAccessPolicy: GetAccessPolicyResult; - getAsset: GetAssetResult; - getAssetDetailsForSystemObject: GetAssetDetailsForSystemObjectResult; - getAssetVersionsDetails: GetAssetVersionsDetailsResult; - getCaptureData: GetCaptureDataResult; - getCaptureDataPhoto: GetCaptureDataPhotoResult; - getContentsForAssetVersions: GetContentsForAssetVersionsResult; - getCurrentUser: GetCurrentUserResult; - getDetailsTabDataForObject: GetDetailsTabDataForObjectResult; - getFilterViewData: GetFilterViewDataResult; - getIngestionItemsForSubjects: GetIngestionItemsForSubjectsResult; - getIngestionProjectsForSubjects: GetIngestionProjectsForSubjectsResult; - getIntermediaryFile: GetIntermediaryFileResult; - getItem: GetItemResult; - getItemsForSubject: GetItemsForSubjectResult; - getLicense: GetLicenseResult; - getModel: GetModelResult; - getObjectChildren: GetObjectChildrenResult; - getObjectsForItem: GetObjectsForItemResult; - getProject: GetProjectResult; - getProjectDocumentation: GetProjectDocumentationResult; - getScene: GetSceneResult; - getSourceObjectIdentifer: GetSourceObjectIdentiferResult; - getSubject: GetSubjectResult; - getSubjectsForUnit: GetSubjectsForUnitResult; - getSystemObjectDetails: GetSystemObjectDetailsResult; - getUnit: GetUnitResult; - getUploadedAssetVersion: GetUploadedAssetVersionResult; - getUser: GetUserResult; - getVersionsForSystemObject: GetVersionsForSystemObjectResult; - getVocabulary: GetVocabularyResult; - getVocabularyEntries: GetVocabularyEntriesResult; - getWorkflow: GetWorkflowResult; - searchIngestionSubjects: SearchIngestionSubjectsResult; + __typename?: 'Query'; + areCameraSettingsUniform: AreCameraSettingsUniformResult; + getAccessPolicy: GetAccessPolicyResult; + getAllUsers: GetAllUsersResult; + getAsset: GetAssetResult; + getAssetDetailsForSystemObject: GetAssetDetailsForSystemObjectResult; + getAssetVersionsDetails: GetAssetVersionsDetailsResult; + getCaptureData: GetCaptureDataResult; + getCaptureDataPhoto: GetCaptureDataPhotoResult; + getContentsForAssetVersions: GetContentsForAssetVersionsResult; + getCurrentUser: GetCurrentUserResult; + getDetailsTabDataForObject: GetDetailsTabDataForObjectResult; + getFilterViewData: GetFilterViewDataResult; + getIngestionItemsForSubjects: GetIngestionItemsForSubjectsResult; + getIngestionProjectsForSubjects: GetIngestionProjectsForSubjectsResult; + getIntermediaryFile: GetIntermediaryFileResult; + getItem: GetItemResult; + getItemsForSubject: GetItemsForSubjectResult; + getLicense: GetLicenseResult; + getModel: GetModelResult; + getModelConstellation: GetModelConstellationResult; + getModelConstellationForAssetVersion: GetModelConstellationForAssetVersionResult; + getObjectChildren: GetObjectChildrenResult; + getObjectsForItem: GetObjectsForItemResult; + getProject: GetProjectResult; + getProjectDocumentation: GetProjectDocumentationResult; + getProjectList: GetProjectListResult; + getScene: GetSceneResult; + getSourceObjectIdentifer: GetSourceObjectIdentiferResult; + getSubject: GetSubjectResult; + getSubjectsForUnit: GetSubjectsForUnitResult; + getSystemObjectDetails: GetSystemObjectDetailsResult; + getUnit: GetUnitResult; + getUnitsFromNameSearch: GetUnitsFromNameSearchResult; + getUploadedAssetVersion: GetUploadedAssetVersionResult; + getUser: GetUserResult; + getVersionsForSystemObject: GetVersionsForSystemObjectResult; + getVocabulary: GetVocabularyResult; + getVocabularyEntries: GetVocabularyEntriesResult; + getWorkflow: GetWorkflowResult; + searchIngestionSubjects: SearchIngestionSubjectsResult; }; + export type QueryAreCameraSettingsUniformArgs = { - input: AreCameraSettingsUniformInput; + input: AreCameraSettingsUniformInput; }; + export type QueryGetAccessPolicyArgs = { - input: GetAccessPolicyInput; + input: GetAccessPolicyInput; +}; + + +export type QueryGetAllUsersArgs = { + input: GetAllUsersInput; }; + export type QueryGetAssetArgs = { - input: GetAssetInput; + input: GetAssetInput; }; + export type QueryGetAssetDetailsForSystemObjectArgs = { - input: GetAssetDetailsForSystemObjectInput; + input: GetAssetDetailsForSystemObjectInput; }; + export type QueryGetAssetVersionsDetailsArgs = { - input: GetAssetVersionsDetailsInput; + input: GetAssetVersionsDetailsInput; }; + export type QueryGetCaptureDataArgs = { - input: GetCaptureDataInput; + input: GetCaptureDataInput; }; + export type QueryGetCaptureDataPhotoArgs = { - input: GetCaptureDataPhotoInput; + input: GetCaptureDataPhotoInput; }; + export type QueryGetContentsForAssetVersionsArgs = { - input: GetContentsForAssetVersionsInput; + input: GetContentsForAssetVersionsInput; }; + export type QueryGetDetailsTabDataForObjectArgs = { - input: GetDetailsTabDataForObjectInput; + input: GetDetailsTabDataForObjectInput; }; + export type QueryGetIngestionItemsForSubjectsArgs = { - input: GetIngestionItemsForSubjectsInput; + input: GetIngestionItemsForSubjectsInput; }; + export type QueryGetIngestionProjectsForSubjectsArgs = { - input: GetIngestionProjectsForSubjectsInput; + input: GetIngestionProjectsForSubjectsInput; }; + export type QueryGetIntermediaryFileArgs = { - input: GetIntermediaryFileInput; + input: GetIntermediaryFileInput; }; + export type QueryGetItemArgs = { - input: GetItemInput; + input: GetItemInput; }; + export type QueryGetItemsForSubjectArgs = { - input: GetItemsForSubjectInput; + input: GetItemsForSubjectInput; }; + export type QueryGetLicenseArgs = { - input: GetLicenseInput; + input: GetLicenseInput; }; + export type QueryGetModelArgs = { - input: GetModelInput; + input: GetModelInput; +}; + + +export type QueryGetModelConstellationArgs = { + input: GetModelConstellationInput; +}; + + +export type QueryGetModelConstellationForAssetVersionArgs = { + input: GetModelConstellationForAssetVersionInput; }; + export type QueryGetObjectChildrenArgs = { - input: GetObjectChildrenInput; + input: GetObjectChildrenInput; }; + export type QueryGetObjectsForItemArgs = { - input: GetObjectsForItemInput; + input: GetObjectsForItemInput; }; + export type QueryGetProjectArgs = { - input: GetProjectInput; + input: GetProjectInput; }; + export type QueryGetProjectDocumentationArgs = { - input: GetProjectDocumentationInput; + input: GetProjectDocumentationInput; +}; + + +export type QueryGetProjectListArgs = { + input: GetProjectListInput; }; + export type QueryGetSceneArgs = { - input: GetSceneInput; + input: GetSceneInput; }; + export type QueryGetSourceObjectIdentiferArgs = { - input: GetSourceObjectIdentiferInput; + input: GetSourceObjectIdentiferInput; }; + export type QueryGetSubjectArgs = { - input: GetSubjectInput; + input: GetSubjectInput; }; + export type QueryGetSubjectsForUnitArgs = { - input: GetSubjectsForUnitInput; + input: GetSubjectsForUnitInput; }; + export type QueryGetSystemObjectDetailsArgs = { - input: GetSystemObjectDetailsInput; + input: GetSystemObjectDetailsInput; }; + export type QueryGetUnitArgs = { - input: GetUnitInput; + input: GetUnitInput; +}; + + +export type QueryGetUnitsFromNameSearchArgs = { + input: GetUnitsFromNameSearchInput; }; + export type QueryGetUserArgs = { - input: GetUserInput; + input: GetUserInput; }; + export type QueryGetVersionsForSystemObjectArgs = { - input: GetVersionsForSystemObjectInput; + input: GetVersionsForSystemObjectInput; }; + export type QueryGetVocabularyArgs = { - input: GetVocabularyInput; + input: GetVocabularyInput; }; + export type QueryGetVocabularyEntriesArgs = { - input: GetVocabularyEntriesInput; + input: GetVocabularyEntriesInput; }; + export type QueryGetWorkflowArgs = { - input: GetWorkflowInput; + input: GetWorkflowInput; }; + export type QuerySearchIngestionSubjectsArgs = { - input: SearchIngestionSubjectsInput; + input: SearchIngestionSubjectsInput; }; export type GetAccessPolicyInput = { - idAccessPolicy: Scalars['Int']; + idAccessPolicy: Scalars['Int']; }; export type GetAccessPolicyResult = { - __typename?: 'GetAccessPolicyResult'; - AccessPolicy?: Maybe; + __typename?: 'GetAccessPolicyResult'; + AccessPolicy?: Maybe; }; + export type AccessAction = { - __typename?: 'AccessAction'; - idAccessAction: Scalars['Int']; - Name: Scalars['String']; - SortOrder: Scalars['Int']; - AccessRole?: Maybe>>; + __typename?: 'AccessAction'; + idAccessAction: Scalars['Int']; + Name: Scalars['String']; + SortOrder: Scalars['Int']; + AccessRole?: Maybe>>; }; export type AccessContext = { - __typename?: 'AccessContext'; - idAccessContext: Scalars['Int']; - Authoritative: Scalars['Boolean']; - CaptureData: Scalars['Boolean']; - Global: Scalars['Boolean']; - IntermediaryFile: Scalars['Boolean']; - Model: Scalars['Boolean']; - Scene: Scalars['Boolean']; - AccessContextObject?: Maybe>>; - AccessPolicy?: Maybe>>; + __typename?: 'AccessContext'; + idAccessContext: Scalars['Int']; + Authoritative: Scalars['Boolean']; + CaptureData: Scalars['Boolean']; + Global: Scalars['Boolean']; + IntermediaryFile: Scalars['Boolean']; + Model: Scalars['Boolean']; + Scene: Scalars['Boolean']; + AccessContextObject?: Maybe>>; + AccessPolicy?: Maybe>>; }; export type AccessContextObject = { - __typename?: 'AccessContextObject'; - idAccessContextObject: Scalars['Int']; - idAccessContext: Scalars['Int']; - idSystemObject: Scalars['Int']; - AccessContext?: Maybe; - SystemObject?: Maybe; + __typename?: 'AccessContextObject'; + idAccessContextObject: Scalars['Int']; + idAccessContext: Scalars['Int']; + idSystemObject: Scalars['Int']; + AccessContext?: Maybe; + SystemObject?: Maybe; }; export type AccessPolicy = { - __typename?: 'AccessPolicy'; - idAccessPolicy: Scalars['Int']; - idAccessContext: Scalars['Int']; - idAccessRole: Scalars['Int']; - idUser: Scalars['Int']; - AccessContext?: Maybe; - AccessRole?: Maybe; - User?: Maybe; + __typename?: 'AccessPolicy'; + idAccessPolicy: Scalars['Int']; + idAccessContext: Scalars['Int']; + idAccessRole: Scalars['Int']; + idUser: Scalars['Int']; + AccessContext?: Maybe; + AccessRole?: Maybe; + User?: Maybe; }; export type AccessRole = { - __typename?: 'AccessRole'; - idAccessRole: Scalars['Int']; - Name: Scalars['String']; - AccessAction?: Maybe>>; + __typename?: 'AccessRole'; + idAccessRole: Scalars['Int']; + Name: Scalars['String']; + AccessAction?: Maybe>>; }; + export type Mutation = { - __typename?: 'Mutation'; - createCaptureData: CreateCaptureDataResult; - createCaptureDataPhoto: CreateCaptureDataPhotoResult; - createItem: CreateItemResult; - createModel: CreateModelResult; - createProject: CreateProjectResult; - createScene: CreateSceneResult; - createSubject: CreateSubjectResult; - createUnit: CreateUnitResult; - createUser: CreateUserResult; - createVocabulary: CreateVocabularyResult; - createVocabularySet: CreateVocabularySetResult; - discardUploadedAssetVersions: DiscardUploadedAssetVersionsResult; - ingestData: IngestDataResult; - updateObjectDetails: UpdateObjectDetailsResult; - uploadAsset: UploadAssetResult; + __typename?: 'Mutation'; + createCaptureData: CreateCaptureDataResult; + createCaptureDataPhoto: CreateCaptureDataPhotoResult; + createItem: CreateItemResult; + createProject: CreateProjectResult; + createScene: CreateSceneResult; + createSubject: CreateSubjectResult; + createUnit: CreateUnitResult; + createUser: CreateUserResult; + createVocabulary: CreateVocabularyResult; + createVocabularySet: CreateVocabularySetResult; + discardUploadedAssetVersions: DiscardUploadedAssetVersionsResult; + ingestData: IngestDataResult; + updateObjectDetails: UpdateObjectDetailsResult; + updateUser: CreateUserResult; + uploadAsset: UploadAssetResult; }; + export type MutationCreateCaptureDataArgs = { - input: CreateCaptureDataInput; + input: CreateCaptureDataInput; }; + export type MutationCreateCaptureDataPhotoArgs = { - input: CreateCaptureDataPhotoInput; + input: CreateCaptureDataPhotoInput; }; + export type MutationCreateItemArgs = { - input: CreateItemInput; + input: CreateItemInput; }; -export type MutationCreateModelArgs = { - input: CreateModelInput; -}; export type MutationCreateProjectArgs = { - input: CreateProjectInput; + input: CreateProjectInput; }; + export type MutationCreateSceneArgs = { - input: CreateSceneInput; + input: CreateSceneInput; }; + export type MutationCreateSubjectArgs = { - input: CreateSubjectInput; + input: CreateSubjectInput; }; + export type MutationCreateUnitArgs = { - input: CreateUnitInput; + input: CreateUnitInput; }; + export type MutationCreateUserArgs = { - input: CreateUserInput; + input: CreateUserInput; }; + export type MutationCreateVocabularyArgs = { - input: CreateVocabularyInput; + input: CreateVocabularyInput; }; + export type MutationCreateVocabularySetArgs = { - input: CreateVocabularySetInput; + input: CreateVocabularySetInput; }; + export type MutationDiscardUploadedAssetVersionsArgs = { - input: DiscardUploadedAssetVersionsInput; + input: DiscardUploadedAssetVersionsInput; }; + export type MutationIngestDataArgs = { - input: IngestDataInput; + input: IngestDataInput; }; + export type MutationUpdateObjectDetailsArgs = { - input: UpdateObjectDetailsInput; + input: UpdateObjectDetailsInput; +}; + + +export type MutationUpdateUserArgs = { + input: UpdateUserInput; }; + export type MutationUploadAssetArgs = { - file: Scalars['Upload']; - type: Scalars['Int']; + file: Scalars['Upload']; + type: Scalars['Int']; }; export type UploadAssetInput = { - __typename?: 'UploadAssetInput'; - file: Scalars['Upload']; - type: Scalars['Int']; + __typename?: 'UploadAssetInput'; + file: Scalars['Upload']; + type: Scalars['Int']; }; export enum UploadStatus { - Complete = 'COMPLETE', - Failed = 'FAILED' + Complete = 'COMPLETE', + Failed = 'FAILED' } export type UploadAssetResult = { - __typename?: 'UploadAssetResult'; - status: UploadStatus; - idAssetVersions?: Maybe>; - error?: Maybe; + __typename?: 'UploadAssetResult'; + status: UploadStatus; + idAssetVersions?: Maybe>; + error?: Maybe; }; export type DiscardUploadedAssetVersionsInput = { - idAssetVersions: Array; + idAssetVersions: Array; }; export type DiscardUploadedAssetVersionsResult = { - __typename?: 'DiscardUploadedAssetVersionsResult'; - success: Scalars['Boolean']; + __typename?: 'DiscardUploadedAssetVersionsResult'; + success: Scalars['Boolean']; }; export type GetAssetVersionsDetailsInput = { - idAssetVersions: Array; + idAssetVersions: Array; }; export type IngestIdentifier = { - __typename?: 'IngestIdentifier'; - identifier: Scalars['String']; - identifierType: Scalars['Int']; + __typename?: 'IngestIdentifier'; + identifier: Scalars['String']; + identifierType: Scalars['Int']; }; export type IngestFolder = { - __typename?: 'IngestFolder'; - name: Scalars['String']; - variantType: Scalars['Int']; + __typename?: 'IngestFolder'; + name: Scalars['String']; + variantType: Scalars['Int']; }; export type IngestPhotogrammetry = { - __typename?: 'IngestPhotogrammetry'; - idAssetVersion: Scalars['Int']; - dateCaptured: Scalars['String']; - datasetType: Scalars['Int']; - systemCreated: Scalars['Boolean']; - description: Scalars['String']; - cameraSettingUniform: Scalars['Boolean']; - datasetFieldId?: Maybe; - itemPositionType?: Maybe; - itemPositionFieldId?: Maybe; - itemArrangementFieldId?: Maybe; - focusType?: Maybe; - lightsourceType?: Maybe; - backgroundRemovalMethod?: Maybe; - clusterType?: Maybe; - clusterGeometryFieldId?: Maybe; - directory: Scalars['String']; - folders: Array; - identifiers: Array; -}; - -export type IngestUvMap = { - __typename?: 'IngestUVMap'; - name: Scalars['String']; - edgeLength: Scalars['Int']; - mapType: Scalars['Int']; + __typename?: 'IngestPhotogrammetry'; + idAssetVersion: Scalars['Int']; + name: Scalars['String']; + dateCaptured: Scalars['String']; + datasetType: Scalars['Int']; + systemCreated: Scalars['Boolean']; + description: Scalars['String']; + cameraSettingUniform: Scalars['Boolean']; + datasetFieldId?: Maybe; + itemPositionType?: Maybe; + itemPositionFieldId?: Maybe; + itemArrangementFieldId?: Maybe; + focusType?: Maybe; + lightsourceType?: Maybe; + backgroundRemovalMethod?: Maybe; + clusterType?: Maybe; + clusterGeometryFieldId?: Maybe; + directory: Scalars['String']; + folders: Array; + identifiers: Array; }; export enum RelatedObjectType { - Source = 'Source', - Derived = 'Derived' + Source = 'Source', + Derived = 'Derived' } export type RelatedObject = { - __typename?: 'RelatedObject'; - idSystemObject: Scalars['Int']; - name: Scalars['String']; - identifier?: Maybe; - objectType: Scalars['Int']; + __typename?: 'RelatedObject'; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + identifier?: Maybe; + objectType: Scalars['Int']; }; export type IngestModel = { - __typename?: 'IngestModel'; - idAssetVersion: Scalars['Int']; - systemCreated: Scalars['Boolean']; - master: Scalars['Boolean']; - authoritative: Scalars['Boolean']; - creationMethod: Scalars['Int']; - modality: Scalars['Int']; - purpose: Scalars['Int']; - units: Scalars['Int']; - dateCaptured: Scalars['String']; - modelFileType: Scalars['Int']; - directory: Scalars['String']; - identifiers: Array; - uvMaps: Array; - sourceObjects: Array; - roughness?: Maybe; - metalness?: Maybe; - pointCount?: Maybe; - faceCount?: Maybe; - isWatertight?: Maybe; - hasNormals?: Maybe; - hasVertexColor?: Maybe; - hasUVSpace?: Maybe; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; + __typename?: 'IngestModel'; + idAssetVersion: Scalars['Int']; + systemCreated: Scalars['Boolean']; + name: Scalars['String']; + master: Scalars['Boolean']; + authoritative: Scalars['Boolean']; + creationMethod: Scalars['Int']; + modality: Scalars['Int']; + purpose: Scalars['Int']; + units: Scalars['Int']; + dateCaptured: Scalars['String']; + modelFileType: Scalars['Int']; + directory: Scalars['String']; + identifiers: Array; + sourceObjects: Array; }; export enum ReferenceModelAction { - Update = 'Update', - Ingest = 'Ingest' + Update = 'Update', + Ingest = 'Ingest' } export type ReferenceModel = { - __typename?: 'ReferenceModel'; - idSystemObject: Scalars['Int']; - name: Scalars['String']; - fileSize: Scalars['Int']; - resolution?: Maybe; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; - action: ReferenceModelAction; + __typename?: 'ReferenceModel'; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + fileSize: Scalars['BigInt']; + resolution?: Maybe; + boundingBoxP1X?: Maybe; + boundingBoxP1Y?: Maybe; + boundingBoxP1Z?: Maybe; + boundingBoxP2X?: Maybe; + boundingBoxP2Y?: Maybe; + boundingBoxP2Z?: Maybe; + action: ReferenceModelAction; }; export type IngestScene = { - __typename?: 'IngestScene'; - idAssetVersion: Scalars['Int']; - systemCreated: Scalars['Boolean']; - identifiers: Array; - referenceModels: Array; + __typename?: 'IngestScene'; + idAssetVersion: Scalars['Int']; + systemCreated: Scalars['Boolean']; + identifiers: Array; + referenceModels: Array; }; export type GetAssetVersionDetailResult = { - __typename?: 'GetAssetVersionDetailResult'; - idAssetVersion: Scalars['Int']; - SubjectUnitIdentifier?: Maybe; - Project?: Maybe>; - Item?: Maybe; - CaptureDataPhoto?: Maybe; - Model?: Maybe; - Scene?: Maybe; + __typename?: 'GetAssetVersionDetailResult'; + idAssetVersion: Scalars['Int']; + SubjectUnitIdentifier?: Maybe; + Project?: Maybe>; + Item?: Maybe; + CaptureDataPhoto?: Maybe; + Model?: Maybe; + Scene?: Maybe; }; export type GetAssetVersionsDetailsResult = { - __typename?: 'GetAssetVersionsDetailsResult'; - valid: Scalars['Boolean']; - Details: Array; + __typename?: 'GetAssetVersionsDetailsResult'; + valid: Scalars['Boolean']; + Details: Array; }; export type GetAssetInput = { - idAsset: Scalars['Int']; + idAsset: Scalars['Int']; }; export type GetAssetResult = { - __typename?: 'GetAssetResult'; - Asset?: Maybe; + __typename?: 'GetAssetResult'; + Asset?: Maybe; }; export type GetUploadedAssetVersionResult = { - __typename?: 'GetUploadedAssetVersionResult'; - AssetVersion: Array; + __typename?: 'GetUploadedAssetVersionResult'; + AssetVersion: Array; }; export type GetContentsForAssetVersionsInput = { - idAssetVersions: Array; + idAssetVersions: Array; }; export type AssetVersionContent = { - __typename?: 'AssetVersionContent'; - idAssetVersion: Scalars['Int']; - folders: Array; - all: Array; + __typename?: 'AssetVersionContent'; + idAssetVersion: Scalars['Int']; + folders: Array; + all: Array; }; export type GetContentsForAssetVersionsResult = { - __typename?: 'GetContentsForAssetVersionsResult'; - AssetVersionContent: Array; + __typename?: 'GetContentsForAssetVersionsResult'; + AssetVersionContent: Array; +}; + +export type GetModelConstellationForAssetVersionInput = { + idAssetVersion: Scalars['Int']; +}; + +export type GetModelConstellationForAssetVersionResult = { + __typename?: 'GetModelConstellationForAssetVersionResult'; + idAssetVersion: Scalars['Int']; + ModelConstellation?: Maybe; }; + export type Asset = { - __typename?: 'Asset'; - idAsset: Scalars['Int']; - FileName: Scalars['String']; - FilePath: Scalars['String']; - idAssetGroup?: Maybe; - idVAssetType?: Maybe; - idSystemObject?: Maybe; - StorageKey?: Maybe; - AssetGroup?: Maybe; - SystemObjectSource?: Maybe; - AssetVersion?: Maybe>>; - VAssetType?: Maybe; - SystemObject?: Maybe; + __typename?: 'Asset'; + idAsset: Scalars['Int']; + FileName: Scalars['String']; + FilePath: Scalars['String']; + idAssetGroup?: Maybe; + idVAssetType?: Maybe; + idSystemObject?: Maybe; + StorageKey?: Maybe; + AssetGroup?: Maybe; + SystemObjectSource?: Maybe; + AssetVersion?: Maybe>>; + VAssetType?: Maybe; + SystemObject?: Maybe; }; export type AssetVersion = { - __typename?: 'AssetVersion'; - idAssetVersion: Scalars['Int']; - DateCreated: Scalars['DateTime']; - idAsset: Scalars['Int']; - idUserCreator: Scalars['Int']; - StorageHash: Scalars['String']; - StorageSize: Scalars['Int']; - StorageKeyStaging: Scalars['String']; - FileName: Scalars['String']; - Ingested: Scalars['Boolean']; - Version: Scalars['Int']; - Asset?: Maybe; - User?: Maybe; - SystemObject?: Maybe; + __typename?: 'AssetVersion'; + idAssetVersion: Scalars['Int']; + DateCreated: Scalars['DateTime']; + idAsset: Scalars['Int']; + idUserCreator: Scalars['Int']; + StorageHash: Scalars['String']; + StorageSize: Scalars['BigInt']; + StorageKeyStaging: Scalars['String']; + FileName: Scalars['String']; + Ingested?: Maybe; + Version: Scalars['Int']; + Asset?: Maybe; + User?: Maybe; + SystemObject?: Maybe; }; export type AssetGroup = { - __typename?: 'AssetGroup'; - idAssetGroup: Scalars['Int']; - Asset?: Maybe>>; + __typename?: 'AssetGroup'; + idAssetGroup: Scalars['Int']; + Asset?: Maybe>>; }; export type CreateCaptureDataInput = { - Name: Scalars['String']; - idVCaptureMethod: Scalars['Int']; - DateCaptured: Scalars['DateTime']; - Description: Scalars['String']; - idAssetThumbnail?: Maybe; + Name: Scalars['String']; + idVCaptureMethod: Scalars['Int']; + DateCaptured: Scalars['DateTime']; + Description: Scalars['String']; + idAssetThumbnail?: Maybe; }; export type CreateCaptureDataResult = { - __typename?: 'CreateCaptureDataResult'; - CaptureData?: Maybe; + __typename?: 'CreateCaptureDataResult'; + CaptureData?: Maybe; }; export type CreateCaptureDataPhotoInput = { - idCaptureData: Scalars['Int']; - idVCaptureDatasetType: Scalars['Int']; - CaptureDatasetFieldID: Scalars['Int']; - ItemPositionFieldID: Scalars['Int']; - ItemArrangementFieldID: Scalars['Int']; - idVBackgroundRemovalMethod: Scalars['Int']; - ClusterGeometryFieldID: Scalars['Int']; - CameraSettingsUniform: Scalars['Boolean']; - idVItemPositionType?: Maybe; - idVFocusType?: Maybe; - idVLightSourceType?: Maybe; - idVClusterType?: Maybe; + idCaptureData: Scalars['Int']; + idVCaptureDatasetType: Scalars['Int']; + CaptureDatasetFieldID: Scalars['Int']; + ItemPositionFieldID: Scalars['Int']; + ItemArrangementFieldID: Scalars['Int']; + idVBackgroundRemovalMethod: Scalars['Int']; + ClusterGeometryFieldID: Scalars['Int']; + CameraSettingsUniform: Scalars['Boolean']; + idVItemPositionType?: Maybe; + idVFocusType?: Maybe; + idVLightSourceType?: Maybe; + idVClusterType?: Maybe; }; export type CreateCaptureDataPhotoResult = { - __typename?: 'CreateCaptureDataPhotoResult'; - CaptureDataPhoto?: Maybe; + __typename?: 'CreateCaptureDataPhotoResult'; + CaptureDataPhoto?: Maybe; }; export type GetCaptureDataInput = { - idCaptureData: Scalars['Int']; + idCaptureData: Scalars['Int']; }; export type GetCaptureDataResult = { - __typename?: 'GetCaptureDataResult'; - CaptureData?: Maybe; + __typename?: 'GetCaptureDataResult'; + CaptureData?: Maybe; }; export type GetCaptureDataPhotoInput = { - idCaptureDataPhoto: Scalars['Int']; + idCaptureDataPhoto: Scalars['Int']; }; export type GetCaptureDataPhotoResult = { - __typename?: 'GetCaptureDataPhotoResult'; - CaptureDataPhoto?: Maybe; + __typename?: 'GetCaptureDataPhotoResult'; + CaptureDataPhoto?: Maybe; }; export type CaptureData = { - __typename?: 'CaptureData'; - idCaptureData: Scalars['Int']; - DateCaptured: Scalars['DateTime']; - Description: Scalars['String']; - idVCaptureMethod: Scalars['Int']; - idAssetThumbnail?: Maybe; - AssetThumbnail?: Maybe; - VCaptureMethod?: Maybe; - CaptureDataFile?: Maybe>>; - CaptureDataGroup?: Maybe>>; - CaptureDataPhoto?: Maybe>>; - SystemObject?: Maybe; + __typename?: 'CaptureData'; + idCaptureData: Scalars['Int']; + DateCaptured: Scalars['DateTime']; + Description: Scalars['String']; + idVCaptureMethod: Scalars['Int']; + idAssetThumbnail?: Maybe; + AssetThumbnail?: Maybe; + VCaptureMethod?: Maybe; + CaptureDataFile?: Maybe>>; + CaptureDataGroup?: Maybe>>; + CaptureDataPhoto?: Maybe>>; + SystemObject?: Maybe; }; export type CaptureDataFile = { - __typename?: 'CaptureDataFile'; - idCaptureDataFile: Scalars['Int']; - CompressedMultipleFiles: Scalars['Boolean']; - idAsset: Scalars['Int']; - idCaptureData: Scalars['Int']; - idVVariantType: Scalars['Int']; - Asset?: Maybe; - CaptureData?: Maybe; - VVariantType?: Maybe; + __typename?: 'CaptureDataFile'; + idCaptureDataFile: Scalars['Int']; + CompressedMultipleFiles: Scalars['Boolean']; + idAsset: Scalars['Int']; + idCaptureData: Scalars['Int']; + idVVariantType: Scalars['Int']; + Asset?: Maybe; + CaptureData?: Maybe; + VVariantType?: Maybe; }; export type CaptureDataGroup = { - __typename?: 'CaptureDataGroup'; - idCaptureDataGroup: Scalars['Int']; - CaptureData?: Maybe>>; + __typename?: 'CaptureDataGroup'; + idCaptureDataGroup: Scalars['Int']; + CaptureData?: Maybe>>; }; export type CaptureDataPhoto = { - __typename?: 'CaptureDataPhoto'; - idCaptureDataPhoto: Scalars['Int']; - idCaptureData: Scalars['Int']; - idVCaptureDatasetType: Scalars['Int']; - CameraSettingsUniform?: Maybe; - CaptureDatasetFieldID?: Maybe; - ClusterGeometryFieldID?: Maybe; - idVBackgroundRemovalMethod?: Maybe; - idVClusterType?: Maybe; - idVFocusType?: Maybe; - idVItemPositionType?: Maybe; - idVLightSourceType?: Maybe; - ItemArrangementFieldID?: Maybe; - ItemPositionFieldID?: Maybe; - CaptureData?: Maybe; - VBackgroundRemovalMethod?: Maybe; - VCaptureDatasetType?: Maybe; - VClusterType?: Maybe; - VFocusType?: Maybe; - VItemPositionType?: Maybe; - VLightSourceType?: Maybe; + __typename?: 'CaptureDataPhoto'; + idCaptureDataPhoto: Scalars['Int']; + idCaptureData: Scalars['Int']; + idVCaptureDatasetType: Scalars['Int']; + CameraSettingsUniform?: Maybe; + CaptureDatasetFieldID?: Maybe; + ClusterGeometryFieldID?: Maybe; + idVBackgroundRemovalMethod?: Maybe; + idVClusterType?: Maybe; + idVFocusType?: Maybe; + idVItemPositionType?: Maybe; + idVLightSourceType?: Maybe; + ItemArrangementFieldID?: Maybe; + ItemPositionFieldID?: Maybe; + CaptureData?: Maybe; + VBackgroundRemovalMethod?: Maybe; + VCaptureDatasetType?: Maybe; + VClusterType?: Maybe; + VFocusType?: Maybe; + VItemPositionType?: Maybe; + VLightSourceType?: Maybe; }; export type IngestSubjectInput = { - id?: Maybe; - name: Scalars['String']; - arkId: Scalars['String']; - unit: Scalars['String']; + id?: Maybe; + name: Scalars['String']; + arkId: Scalars['String']; + unit: Scalars['String']; }; export type IngestProjectInput = { - id: Scalars['Int']; - name: Scalars['String']; + id: Scalars['Int']; + name: Scalars['String']; }; export type IngestItemInput = { - id?: Maybe; - name: Scalars['String']; - entireSubject: Scalars['Boolean']; + id?: Maybe; + name: Scalars['String']; + entireSubject: Scalars['Boolean']; }; export type IngestIdentifierInput = { - identifier: Scalars['String']; - identifierType: Scalars['Int']; + identifier: Scalars['String']; + identifierType: Scalars['Int']; }; export type IngestFolderInput = { - name: Scalars['String']; - variantType: Scalars['Int']; + name: Scalars['String']; + variantType: Scalars['Int']; }; export type IngestPhotogrammetryInput = { - idAssetVersion: Scalars['Int']; - dateCaptured: Scalars['String']; - datasetType: Scalars['Int']; - systemCreated: Scalars['Boolean']; - description: Scalars['String']; - cameraSettingUniform: Scalars['Boolean']; - datasetFieldId?: Maybe; - itemPositionType?: Maybe; - itemPositionFieldId?: Maybe; - itemArrangementFieldId?: Maybe; - focusType?: Maybe; - lightsourceType?: Maybe; - backgroundRemovalMethod?: Maybe; - clusterType?: Maybe; - clusterGeometryFieldId?: Maybe; - directory: Scalars['String']; - folders: Array; - identifiers: Array; + idAssetVersion: Scalars['Int']; + name: Scalars['String']; + dateCaptured: Scalars['String']; + datasetType: Scalars['Int']; + systemCreated: Scalars['Boolean']; + description: Scalars['String']; + cameraSettingUniform: Scalars['Boolean']; + datasetFieldId?: Maybe; + itemPositionType?: Maybe; + itemPositionFieldId?: Maybe; + itemArrangementFieldId?: Maybe; + focusType?: Maybe; + lightsourceType?: Maybe; + backgroundRemovalMethod?: Maybe; + clusterType?: Maybe; + clusterGeometryFieldId?: Maybe; + directory: Scalars['String']; + folders: Array; + identifiers: Array; }; export type IngestUvMapInput = { - name: Scalars['String']; - edgeLength: Scalars['Int']; - mapType: Scalars['Int']; + name: Scalars['String']; + edgeLength: Scalars['Int']; + mapType: Scalars['Int']; }; export type RelatedObjectInput = { - idSystemObject: Scalars['Int']; - name: Scalars['String']; - identifier?: Maybe; - objectType: Scalars['Int']; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + identifier?: Maybe; + objectType: Scalars['Int']; }; export type IngestModelInput = { - idAssetVersion: Scalars['Int']; - systemCreated: Scalars['Boolean']; - master: Scalars['Boolean']; - authoritative: Scalars['Boolean']; - creationMethod: Scalars['Int']; - modality: Scalars['Int']; - purpose: Scalars['Int']; - units: Scalars['Int']; - dateCaptured: Scalars['String']; - modelFileType: Scalars['Int']; - directory: Scalars['String']; - identifiers: Array; - uvMaps: Array; - sourceObjects: Array; - roughness?: Maybe; - metalness?: Maybe; - pointCount?: Maybe; - faceCount?: Maybe; - isWatertight?: Maybe; - hasNormals?: Maybe; - hasVertexColor?: Maybe; - hasUVSpace?: Maybe; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; + idAssetVersion: Scalars['Int']; + systemCreated: Scalars['Boolean']; + name: Scalars['String']; + master: Scalars['Boolean']; + authoritative: Scalars['Boolean']; + creationMethod: Scalars['Int']; + modality: Scalars['Int']; + purpose: Scalars['Int']; + units: Scalars['Int']; + dateCaptured: Scalars['String']; + modelFileType: Scalars['Int']; + directory: Scalars['String']; + identifiers: Array; + sourceObjects: Array; }; export type ReferenceModelInput = { - idSystemObject: Scalars['Int']; - name: Scalars['String']; - fileSize: Scalars['Int']; - resolution?: Maybe; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; - action: ReferenceModelAction; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + fileSize: Scalars['BigInt']; + resolution?: Maybe; + boundingBoxP1X?: Maybe; + boundingBoxP1Y?: Maybe; + boundingBoxP1Z?: Maybe; + boundingBoxP2X?: Maybe; + boundingBoxP2Y?: Maybe; + boundingBoxP2Z?: Maybe; + action: ReferenceModelAction; }; export type IngestSceneInput = { - idAssetVersion: Scalars['Int']; - systemCreated: Scalars['Boolean']; - identifiers: Array; - referenceModels: Array; + idAssetVersion: Scalars['Int']; + systemCreated: Scalars['Boolean']; + identifiers: Array; + referenceModels: Array; }; export type IngestOtherInput = { - idAssetVersion: Scalars['Int']; - systemCreated: Scalars['Boolean']; - identifiers: Array; + idAssetVersion: Scalars['Int']; + systemCreated: Scalars['Boolean']; + identifiers: Array; }; export type IngestDataInput = { - subjects: Array; - project: IngestProjectInput; - item: IngestItemInput; - photogrammetry: Array; - model: Array; - scene: Array; - other: Array; + subjects: Array; + project: IngestProjectInput; + item: IngestItemInput; + photogrammetry: Array; + model: Array; + scene: Array; + other: Array; }; export type IngestDataResult = { - __typename?: 'IngestDataResult'; - success: Scalars['Boolean']; + __typename?: 'IngestDataResult'; + success: Scalars['Boolean']; }; export type AreCameraSettingsUniformInput = { - idAssetVersion: Scalars['Int']; + idAssetVersion: Scalars['Int']; }; export type AreCameraSettingsUniformResult = { - __typename?: 'AreCameraSettingsUniformResult'; - isUniform: Scalars['Boolean']; + __typename?: 'AreCameraSettingsUniformResult'; + isUniform: Scalars['Boolean']; }; export type GetLicenseInput = { - idLicense: Scalars['Int']; + idLicense: Scalars['Int']; }; export type GetLicenseResult = { - __typename?: 'GetLicenseResult'; - License?: Maybe; + __typename?: 'GetLicenseResult'; + License?: Maybe; }; export type License = { - __typename?: 'License'; - idLicense: Scalars['Int']; - Description: Scalars['String']; - Name: Scalars['String']; - LicenseAssignment?: Maybe>>; + __typename?: 'License'; + idLicense: Scalars['Int']; + Description: Scalars['String']; + Name: Scalars['String']; + LicenseAssignment?: Maybe>>; }; export type LicenseAssignment = { - __typename?: 'LicenseAssignment'; - idLicenseAssignment: Scalars['Int']; - idLicense: Scalars['Int']; - DateEnd?: Maybe; - DateStart?: Maybe; - idSystemObject?: Maybe; - idUserCreator?: Maybe; - License?: Maybe; - SystemObject?: Maybe; - UserCreator?: Maybe; -}; - -export type CreateModelInput = { - Name: Scalars['String']; - Authoritative: Scalars['Boolean']; - idVCreationMethod: Scalars['Int']; - idVModality: Scalars['Int']; - idVPurpose: Scalars['Int']; - idVUnits: Scalars['Int']; - idVFileType: Scalars['Int']; - Master: Scalars['Boolean']; - idAssetThumbnail?: Maybe; -}; - -export type CreateModelResult = { - __typename?: 'CreateModelResult'; - Model?: Maybe; + __typename?: 'LicenseAssignment'; + idLicenseAssignment: Scalars['Int']; + idLicense: Scalars['Int']; + DateEnd?: Maybe; + DateStart?: Maybe; + idSystemObject?: Maybe; + idUserCreator?: Maybe; + License?: Maybe; + SystemObject?: Maybe; + UserCreator?: Maybe; }; export type GetModelInput = { - idModel: Scalars['Int']; + idModel: Scalars['Int']; }; export type GetModelResult = { - __typename?: 'GetModelResult'; - Model?: Maybe; + __typename?: 'GetModelResult'; + Model?: Maybe; +}; + +export type GetModelConstellationInput = { + idModel: Scalars['Int']; +}; + +export type GetModelConstellationResult = { + __typename?: 'GetModelConstellationResult'; + ModelConstellation?: Maybe; }; export type Model = { - __typename?: 'Model'; - idModel: Scalars['Int']; - Name: Scalars['String']; - DateCreated: Scalars['DateTime']; - Master: Scalars['Boolean']; - Authoritative: Scalars['Boolean']; - idVCreationMethod: Scalars['Int']; - idVModality: Scalars['Int']; - idVPurpose: Scalars['Int']; - idVUnits: Scalars['Int']; - idVFileType: Scalars['Int']; - idAssetThumbnail?: Maybe; - idModelMetrics?: Maybe; - ModelConstellation?: Maybe; - VCreationMethod?: Maybe; - VModality?: Maybe; - VPurpose?: Maybe; - VUnits?: Maybe; - VFileType?: Maybe; - AssetThumbnail?: Maybe; - ModelMetrics?: Maybe; - ModelObject?: Maybe>>; - ModelProcessingAction?: Maybe>>; - ModelSceneXref?: Maybe>>; - SystemObject?: Maybe; + __typename?: 'Model'; + idModel: Scalars['Int']; + Name: Scalars['String']; + DateCreated: Scalars['DateTime']; + Master: Scalars['Boolean']; + Authoritative: Scalars['Boolean']; + idVCreationMethod: Scalars['Int']; + idVModality: Scalars['Int']; + idVPurpose: Scalars['Int']; + idVUnits: Scalars['Int']; + idVFileType: Scalars['Int']; + idAssetThumbnail?: Maybe; + CountAnimations?: Maybe; + CountCameras?: Maybe; + CountFaces?: Maybe; + CountLights?: Maybe; + CountMaterials?: Maybe; + CountMeshes?: Maybe; + CountVertices?: Maybe; + CountEmbeddedTextures?: Maybe; + CountLinkedTextures?: Maybe; + FileEncoding?: Maybe; + ModelConstellation?: Maybe; + VCreationMethod?: Maybe; + VModality?: Maybe; + VPurpose?: Maybe; + VUnits?: Maybe; + VFileType?: Maybe; + AssetThumbnail?: Maybe; + ModelObject?: Maybe>>; + ModelProcessingAction?: Maybe>>; + ModelSceneXref?: Maybe>>; + SystemObject?: Maybe; +}; + +export type ModelObjectModelMaterialXref = { + __typename?: 'ModelObjectModelMaterialXref'; + idModelObjectModelMaterialXref: Scalars['Int']; + idModelObject: Scalars['Int']; + idModelMaterial: Scalars['Int']; + ModelObject?: Maybe; + ModelMaterial?: Maybe; }; export type ModelMaterial = { - __typename?: 'ModelMaterial'; - idModelMaterial: Scalars['Int']; - idModelObject: Scalars['Int']; - Name?: Maybe; - ModelObject: ModelObject; + __typename?: 'ModelMaterial'; + idModelMaterial: Scalars['Int']; + Name?: Maybe; + ModelMaterialChannel?: Maybe>>; }; export type ModelMaterialChannel = { - __typename?: 'ModelMaterialChannel'; - idModelMaterialChannel: Scalars['Int']; - idModelMaterial: Scalars['Int']; - idVMaterialType?: Maybe; - MaterialTypeOther?: Maybe; - idModelMaterialUVMap?: Maybe; - ChannelPosition?: Maybe; - ChannelWidth?: Maybe; - Scalar1?: Maybe; - Scalar2?: Maybe; - Scalar3?: Maybe; - Scalar4?: Maybe; - ModelMaterial: ModelMaterial; - VMaterialType?: Maybe; - ModelMaterialUVMap?: Maybe; + __typename?: 'ModelMaterialChannel'; + idModelMaterialChannel: Scalars['Int']; + idModelMaterial: Scalars['Int']; + idVMaterialType?: Maybe; + MaterialTypeOther?: Maybe; + idModelMaterialUVMap?: Maybe; + UVMapEmbedded?: Maybe; + ChannelPosition?: Maybe; + ChannelWidth?: Maybe; + Scalar1?: Maybe; + Scalar2?: Maybe; + Scalar3?: Maybe; + Scalar4?: Maybe; + AdditionalAttributes?: Maybe; + ModelMaterial?: Maybe; + VMaterialType?: Maybe; + ModelMaterialUVMap?: Maybe; + Type?: Maybe; + Source?: Maybe; + Value?: Maybe; }; export type ModelMaterialUvMap = { - __typename?: 'ModelMaterialUVMap'; - idModelMaterialUVMap: Scalars['Int']; - idModel: Scalars['Int']; - idAsset: Scalars['Int']; - UVMapEdgeLength: Scalars['Int']; - Model: Model; - Asset: Asset; -}; - -export type ModelMetrics = { - __typename?: 'ModelMetrics'; - idModelMetrics: Scalars['Int']; - BoundingBoxP1X?: Maybe; - BoundingBoxP1Y?: Maybe; - BoundingBoxP1Z?: Maybe; - BoundingBoxP2X?: Maybe; - BoundingBoxP2Y?: Maybe; - BoundingBoxP2Z?: Maybe; - CountPoint?: Maybe; - CountFace?: Maybe; - CountColorChannel?: Maybe; - CountTextureCoorinateChannel?: Maybe; - HasBones?: Maybe; - HasFaceNormals?: Maybe; - HasTangents?: Maybe; - HasTextureCoordinates?: Maybe; - HasVertexNormals?: Maybe; - HasVertexColor?: Maybe; - IsManifold?: Maybe; - IsWatertight?: Maybe; + __typename?: 'ModelMaterialUVMap'; + idModelMaterialUVMap: Scalars['Int']; + idModel: Scalars['Int']; + idAsset: Scalars['Int']; + UVMapEdgeLength: Scalars['Int']; + Model?: Maybe; + Asset?: Maybe; }; export type ModelObject = { - __typename?: 'ModelObject'; - idModelObject: Scalars['Int']; - idModel: Scalars['Int']; - idModelMetrics?: Maybe; - Model: Model; - ModelMetrics?: Maybe; + __typename?: 'ModelObject'; + idModelObject: Scalars['Int']; + idModel: Scalars['Int']; + BoundingBoxP1X?: Maybe; + BoundingBoxP1Y?: Maybe; + BoundingBoxP1Z?: Maybe; + BoundingBoxP2X?: Maybe; + BoundingBoxP2Y?: Maybe; + BoundingBoxP2Z?: Maybe; + CountVertices?: Maybe; + CountFaces?: Maybe; + CountColorChannels?: Maybe; + CountTextureCoordinateChannels?: Maybe; + HasBones?: Maybe; + HasFaceNormals?: Maybe; + HasTangents?: Maybe; + HasTextureCoordinates?: Maybe; + HasVertexNormals?: Maybe; + HasVertexColor?: Maybe; + IsTwoManifoldUnbounded?: Maybe; + IsTwoManifoldBounded?: Maybe; + IsWatertight?: Maybe; + SelfIntersecting?: Maybe; + Model?: Maybe; }; export type ModelProcessingAction = { - __typename?: 'ModelProcessingAction'; - idModelProcessingAction: Scalars['Int']; - DateProcessed: Scalars['DateTime']; - Description: Scalars['String']; - idActor: Scalars['Int']; - idModel: Scalars['Int']; - ToolsUsed: Scalars['String']; - Actor?: Maybe; - Model?: Maybe; - ModelProcessingActionStep: Array>; + __typename?: 'ModelProcessingAction'; + idModelProcessingAction: Scalars['Int']; + DateProcessed: Scalars['DateTime']; + Description: Scalars['String']; + idActor: Scalars['Int']; + idModel: Scalars['Int']; + ToolsUsed: Scalars['String']; + Actor?: Maybe; + Model?: Maybe; + ModelProcessingActionStep: Array>; }; export type ModelProcessingActionStep = { - __typename?: 'ModelProcessingActionStep'; - idModelProcessingActionStep: Scalars['Int']; - Description: Scalars['String']; - idModelProcessingAction: Scalars['Int']; - idVActionMethod: Scalars['Int']; - ModelProcessingAction?: Maybe; - VActionMethod?: Maybe; + __typename?: 'ModelProcessingActionStep'; + idModelProcessingActionStep: Scalars['Int']; + Description: Scalars['String']; + idModelProcessingAction: Scalars['Int']; + idVActionMethod: Scalars['Int']; + ModelProcessingAction?: Maybe; + VActionMethod?: Maybe; }; export type ModelSceneXref = { - __typename?: 'ModelSceneXref'; - idModelSceneXref: Scalars['Int']; - idModel: Scalars['Int']; - idScene: Scalars['Int']; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; - Model?: Maybe; - Scene?: Maybe; + __typename?: 'ModelSceneXref'; + idModelSceneXref: Scalars['Int']; + idModel: Scalars['Int']; + idScene: Scalars['Int']; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; + Model?: Maybe; + Scene?: Maybe; +}; + +export type ModelAsset = { + __typename?: 'ModelAsset'; + Asset: Asset; + AssetVersion: AssetVersion; + AssetName: Scalars['String']; + AssetType: Scalars['String']; }; export type ModelConstellation = { - __typename?: 'ModelConstellation'; - Model: Model; - ModelObjects?: Maybe>>; - ModelMaterials?: Maybe>>; - ModelMaterialChannels?: Maybe>>; - ModelMaterialUVMaps?: Maybe>>; - ModelMetric?: Maybe; - ModelObjectMetrics?: Maybe>>; + __typename?: 'ModelConstellation'; + Model: Model; + ModelObjects?: Maybe>; + ModelMaterials?: Maybe>; + ModelMaterialChannels?: Maybe>; + ModelMaterialUVMaps?: Maybe>; + ModelObjectModelMaterialXref?: Maybe>; + ModelAssets?: Maybe>; }; export type PaginationInput = { - first?: Maybe; - skip?: Maybe; - offset?: Maybe; - size?: Maybe; + first?: Maybe; + skip?: Maybe; + offset?: Maybe; + size?: Maybe; }; export type GetObjectChildrenInput = { - idRoot: Scalars['Int']; - objectTypes: Array; - objectsToDisplay: Array; - metadataColumns: Array; - search: Scalars['String']; - units: Array; - projects: Array; - has: Array; - missing: Array; - captureMethod: Array; - variantType: Array; - modelPurpose: Array; - modelFileType: Array; + idRoot: Scalars['Int']; + objectTypes: Array; + objectsToDisplay: Array; + metadataColumns: Array; + search: Scalars['String']; + units: Array; + projects: Array; + has: Array; + missing: Array; + captureMethod: Array; + variantType: Array; + modelPurpose: Array; + modelFileType: Array; }; export type NavigationResultEntry = { - __typename?: 'NavigationResultEntry'; - idSystemObject: Scalars['Int']; - name: Scalars['String']; - objectType: Scalars['Int']; - idObject: Scalars['Int']; - metadata: Array; + __typename?: 'NavigationResultEntry'; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + objectType: Scalars['Int']; + idObject: Scalars['Int']; + metadata: Array; }; export type GetObjectChildrenResult = { - __typename?: 'GetObjectChildrenResult'; - success: Scalars['Boolean']; - error: Scalars['String']; - entries: Array; - metadataColumns: Array; + __typename?: 'GetObjectChildrenResult'; + success: Scalars['Boolean']; + error: Scalars['String']; + entries: Array; + metadataColumns: Array; }; export type GetFilterViewDataResult = { - __typename?: 'GetFilterViewDataResult'; - units: Array; - projects: Array; + __typename?: 'GetFilterViewDataResult'; + units: Array; + projects: Array; }; export type CreateSceneInput = { - Name: Scalars['String']; - HasBeenQCd: Scalars['Boolean']; - IsOriented: Scalars['Boolean']; - idAssetThumbnail?: Maybe; + Name: Scalars['String']; + HasBeenQCd: Scalars['Boolean']; + IsOriented: Scalars['Boolean']; + idAssetThumbnail?: Maybe; }; export type CreateSceneResult = { - __typename?: 'CreateSceneResult'; - Scene?: Maybe; + __typename?: 'CreateSceneResult'; + Scene?: Maybe; }; export type GetSceneInput = { - idScene: Scalars['Int']; + idScene: Scalars['Int']; }; export type GetSceneResult = { - __typename?: 'GetSceneResult'; - Scene?: Maybe; + __typename?: 'GetSceneResult'; + Scene?: Maybe; }; export type GetIntermediaryFileInput = { - idIntermediaryFile: Scalars['Int']; + idIntermediaryFile: Scalars['Int']; }; export type GetIntermediaryFileResult = { - __typename?: 'GetIntermediaryFileResult'; - IntermediaryFile?: Maybe; + __typename?: 'GetIntermediaryFileResult'; + IntermediaryFile?: Maybe; }; export type Scene = { - __typename?: 'Scene'; - idScene: Scalars['Int']; - HasBeenQCd: Scalars['Boolean']; - idAssetThumbnail?: Maybe; - IsOriented: Scalars['Boolean']; - Name: Scalars['String']; - AssetThumbnail?: Maybe; - ModelSceneXref?: Maybe>>; - SystemObject?: Maybe; + __typename?: 'Scene'; + idScene: Scalars['Int']; + HasBeenQCd: Scalars['Boolean']; + idAssetThumbnail?: Maybe; + IsOriented: Scalars['Boolean']; + Name: Scalars['String']; + AssetThumbnail?: Maybe; + ModelSceneXref?: Maybe>>; + SystemObject?: Maybe; }; export type Actor = { - __typename?: 'Actor'; - idActor: Scalars['Int']; - idUnit?: Maybe; - IndividualName?: Maybe; - OrganizationName?: Maybe; - Unit?: Maybe; - SystemObject?: Maybe; + __typename?: 'Actor'; + idActor: Scalars['Int']; + idUnit?: Maybe; + IndividualName?: Maybe; + OrganizationName?: Maybe; + Unit?: Maybe; + SystemObject?: Maybe; }; export type IntermediaryFile = { - __typename?: 'IntermediaryFile'; - idIntermediaryFile: Scalars['Int']; - DateCreated: Scalars['DateTime']; - idAsset: Scalars['Int']; - Asset?: Maybe; - SystemObject?: Maybe; + __typename?: 'IntermediaryFile'; + idIntermediaryFile: Scalars['Int']; + DateCreated: Scalars['DateTime']; + idAsset: Scalars['Int']; + Asset?: Maybe; + SystemObject?: Maybe; }; export type UpdateObjectDetailsInput = { - idSystemObject: Scalars['Int']; - idObject: Scalars['Int']; - objectType: Scalars['Int']; - data: UpdateObjectDetailsDataInput; + idSystemObject: Scalars['Int']; + idObject: Scalars['Int']; + objectType: Scalars['Int']; + data: UpdateObjectDetailsDataInput; }; export type UnitDetailFieldsInput = { - Abbreviation?: Maybe; - ARKPrefix?: Maybe; + Abbreviation?: Maybe; + ARKPrefix?: Maybe; }; export type ProjectDetailFieldsInput = { - Description?: Maybe; + Description?: Maybe; }; export type SubjectDetailFieldsInput = { - Altitude?: Maybe; - Latitude?: Maybe; - Longitude?: Maybe; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; + Altitude?: Maybe; + Latitude?: Maybe; + Longitude?: Maybe; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; }; export type ItemDetailFieldsInput = { - EntireSubject?: Maybe; - Altitude?: Maybe; - Latitude?: Maybe; - Longitude?: Maybe; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; + EntireSubject?: Maybe; + Altitude?: Maybe; + Latitude?: Maybe; + Longitude?: Maybe; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; }; export type CaptureDataDetailFieldsInput = { - captureMethod?: Maybe; - dateCaptured?: Maybe; - datasetType?: Maybe; - systemCreated?: Maybe; - description?: Maybe; - cameraSettingUniform?: Maybe; - datasetFieldId?: Maybe; - itemPositionType?: Maybe; - itemPositionFieldId?: Maybe; - itemArrangementFieldId?: Maybe; - focusType?: Maybe; - lightsourceType?: Maybe; - backgroundRemovalMethod?: Maybe; - clusterType?: Maybe; - clusterGeometryFieldId?: Maybe; - folders: Array; + captureMethod?: Maybe; + dateCaptured?: Maybe; + datasetType?: Maybe; + systemCreated?: Maybe; + description?: Maybe; + cameraSettingUniform?: Maybe; + datasetFieldId?: Maybe; + itemPositionType?: Maybe; + itemPositionFieldId?: Maybe; + itemArrangementFieldId?: Maybe; + focusType?: Maybe; + lightsourceType?: Maybe; + backgroundRemovalMethod?: Maybe; + clusterType?: Maybe; + clusterGeometryFieldId?: Maybe; + folders: Array; }; export type ModelDetailFieldsInput = { - size?: Maybe; - master?: Maybe; - authoritative?: Maybe; - creationMethod?: Maybe; - modality?: Maybe; - purpose?: Maybe; - units?: Maybe; - dateCaptured?: Maybe; - modelFileType?: Maybe; - uvMaps: Array; - roughness?: Maybe; - metalness?: Maybe; - pointCount?: Maybe; - faceCount?: Maybe; - isWatertight?: Maybe; - hasNormals?: Maybe; - hasVertexColor?: Maybe; - hasUVSpace?: Maybe; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; + Name?: Maybe; + Master?: Maybe; + Authoritative?: Maybe; + CreationMethod?: Maybe; + Modality?: Maybe; + Purpose?: Maybe; + Units?: Maybe; + DateCaptured?: Maybe; + ModelFileType?: Maybe; }; export type SceneDetailFieldsInput = { - Links: Array; - AssetType?: Maybe; - Tours?: Maybe; - Annotation?: Maybe; - HasBeenQCd?: Maybe; - IsOriented?: Maybe; + Links: Array; + AssetType?: Maybe; + Tours?: Maybe; + Annotation?: Maybe; + HasBeenQCd?: Maybe; + IsOriented?: Maybe; }; export type ProjectDocumentationDetailFieldsInput = { - Description?: Maybe; + Description?: Maybe; }; export type AssetDetailFieldsInput = { - FilePath?: Maybe; - AssetType?: Maybe; + FilePath?: Maybe; + AssetType?: Maybe; }; export type AssetVersionDetailFieldsInput = { - Creator?: Maybe; - DateCreated?: Maybe; - Ingested?: Maybe; - Version?: Maybe; - StorageSize?: Maybe; + Creator?: Maybe; + DateCreated?: Maybe; + Ingested?: Maybe; + Version?: Maybe; + StorageSize?: Maybe; }; export type ActorDetailFieldsInput = { - OrganizationName?: Maybe; + OrganizationName?: Maybe; }; export type StakeholderDetailFieldsInput = { - OrganizationName?: Maybe; - MailingAddress?: Maybe; - EmailAddress?: Maybe; - PhoneNumberMobile?: Maybe; - PhoneNumberOffice?: Maybe; + OrganizationName?: Maybe; + MailingAddress?: Maybe; + EmailAddress?: Maybe; + PhoneNumberMobile?: Maybe; + PhoneNumberOffice?: Maybe; }; export type UpdateObjectDetailsDataInput = { - Name?: Maybe; - Retired?: Maybe; - Unit?: Maybe; - Project?: Maybe; - Subject?: Maybe; - Item?: Maybe; - CaptureData?: Maybe; - Model?: Maybe; - Scene?: Maybe; - ProjectDocumentation?: Maybe; - Asset?: Maybe; - AssetVersion?: Maybe; - Actor?: Maybe; - Stakeholder?: Maybe; + Name?: Maybe; + Retired?: Maybe; + Unit?: Maybe; + Project?: Maybe; + Subject?: Maybe; + Item?: Maybe; + CaptureData?: Maybe; + Model?: Maybe; + Scene?: Maybe; + ProjectDocumentation?: Maybe; + Asset?: Maybe; + AssetVersion?: Maybe; + Actor?: Maybe; + Stakeholder?: Maybe; }; export type UpdateObjectDetailsResult = { - __typename?: 'UpdateObjectDetailsResult'; - success: Scalars['Boolean']; + __typename?: 'UpdateObjectDetailsResult'; + success: Scalars['Boolean']; }; export type GetDetailsTabDataForObjectInput = { - idSystemObject: Scalars['Int']; - objectType: Scalars['Int']; + idSystemObject: Scalars['Int']; + objectType: Scalars['Int']; }; export type UnitDetailFields = { - __typename?: 'UnitDetailFields'; - Abbreviation?: Maybe; - ARKPrefix?: Maybe; + __typename?: 'UnitDetailFields'; + Abbreviation?: Maybe; + ARKPrefix?: Maybe; }; export type ProjectDetailFields = { - __typename?: 'ProjectDetailFields'; - Description?: Maybe; + __typename?: 'ProjectDetailFields'; + Description?: Maybe; }; export type SubjectDetailFields = { - __typename?: 'SubjectDetailFields'; - Altitude?: Maybe; - Latitude?: Maybe; - Longitude?: Maybe; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; + __typename?: 'SubjectDetailFields'; + Altitude?: Maybe; + Latitude?: Maybe; + Longitude?: Maybe; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; }; export type ItemDetailFields = { - __typename?: 'ItemDetailFields'; - EntireSubject?: Maybe; - Altitude?: Maybe; - Latitude?: Maybe; - Longitude?: Maybe; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; + __typename?: 'ItemDetailFields'; + EntireSubject?: Maybe; + Altitude?: Maybe; + Latitude?: Maybe; + Longitude?: Maybe; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; }; export type CaptureDataDetailFields = { - __typename?: 'CaptureDataDetailFields'; - captureMethod?: Maybe; - dateCaptured?: Maybe; - datasetType?: Maybe; - systemCreated?: Maybe; - description?: Maybe; - cameraSettingUniform?: Maybe; - datasetFieldId?: Maybe; - itemPositionType?: Maybe; - itemPositionFieldId?: Maybe; - itemArrangementFieldId?: Maybe; - focusType?: Maybe; - lightsourceType?: Maybe; - backgroundRemovalMethod?: Maybe; - clusterType?: Maybe; - clusterGeometryFieldId?: Maybe; - folders: Array; -}; - -export type ModelDetailFields = { - __typename?: 'ModelDetailFields'; - size?: Maybe; - master?: Maybe; - authoritative?: Maybe; - creationMethod?: Maybe; - modality?: Maybe; - purpose?: Maybe; - units?: Maybe; - dateCaptured?: Maybe; - modelFileType?: Maybe; - uvMaps: Array; - boundingBoxP1X?: Maybe; - boundingBoxP1Y?: Maybe; - boundingBoxP1Z?: Maybe; - boundingBoxP2X?: Maybe; - boundingBoxP2Y?: Maybe; - boundingBoxP2Z?: Maybe; - countPoint?: Maybe; - countFace?: Maybe; - countColorChannel?: Maybe; - countTextureCoorinateChannel?: Maybe; - hasBones?: Maybe; - hasFaceNormals?: Maybe; - hasTangents?: Maybe; - hasTextureCoordinates?: Maybe; - hasVertexNormals?: Maybe; - hasVertexColor?: Maybe; - isManifold?: Maybe; - isWatertight?: Maybe; + __typename?: 'CaptureDataDetailFields'; + captureMethod?: Maybe; + dateCaptured?: Maybe; + datasetType?: Maybe; + systemCreated?: Maybe; + description?: Maybe; + cameraSettingUniform?: Maybe; + datasetFieldId?: Maybe; + itemPositionType?: Maybe; + itemPositionFieldId?: Maybe; + itemArrangementFieldId?: Maybe; + focusType?: Maybe; + lightsourceType?: Maybe; + backgroundRemovalMethod?: Maybe; + clusterType?: Maybe; + clusterGeometryFieldId?: Maybe; + folders: Array; }; export type SceneDetailFields = { - __typename?: 'SceneDetailFields'; - Links: Array; - AssetType?: Maybe; - Tours?: Maybe; - Annotation?: Maybe; - HasBeenQCd?: Maybe; - IsOriented?: Maybe; + __typename?: 'SceneDetailFields'; + Links: Array; + AssetType?: Maybe; + Tours?: Maybe; + Annotation?: Maybe; + HasBeenQCd?: Maybe; + IsOriented?: Maybe; }; export type IntermediaryFileDetailFields = { - __typename?: 'IntermediaryFileDetailFields'; - idIntermediaryFile: Scalars['Int']; + __typename?: 'IntermediaryFileDetailFields'; + idIntermediaryFile: Scalars['Int']; }; export type ProjectDocumentationDetailFields = { - __typename?: 'ProjectDocumentationDetailFields'; - Description?: Maybe; + __typename?: 'ProjectDocumentationDetailFields'; + Description?: Maybe; }; export type AssetDetailFields = { - __typename?: 'AssetDetailFields'; - FilePath?: Maybe; - AssetType?: Maybe; + __typename?: 'AssetDetailFields'; + FilePath?: Maybe; + AssetType?: Maybe; }; export type AssetVersionDetailFields = { - __typename?: 'AssetVersionDetailFields'; - Creator?: Maybe; - DateCreated?: Maybe; - Ingested?: Maybe; - Version?: Maybe; - StorageSize?: Maybe; + __typename?: 'AssetVersionDetailFields'; + Creator?: Maybe; + DateCreated?: Maybe; + Ingested?: Maybe; + Version?: Maybe; + StorageSize?: Maybe; }; export type ActorDetailFields = { - __typename?: 'ActorDetailFields'; - OrganizationName?: Maybe; + __typename?: 'ActorDetailFields'; + OrganizationName?: Maybe; }; export type StakeholderDetailFields = { - __typename?: 'StakeholderDetailFields'; - OrganizationName?: Maybe; - MailingAddress?: Maybe; - EmailAddress?: Maybe; - PhoneNumberMobile?: Maybe; - PhoneNumberOffice?: Maybe; + __typename?: 'StakeholderDetailFields'; + OrganizationName?: Maybe; + MailingAddress?: Maybe; + EmailAddress?: Maybe; + PhoneNumberMobile?: Maybe; + PhoneNumberOffice?: Maybe; }; export type GetDetailsTabDataForObjectResult = { - __typename?: 'GetDetailsTabDataForObjectResult'; - Unit?: Maybe; - Project?: Maybe; - Subject?: Maybe; - Item?: Maybe; - CaptureData?: Maybe; - Model?: Maybe; - Scene?: Maybe; - IntermediaryFile?: Maybe; - ProjectDocumentation?: Maybe; - Asset?: Maybe; - AssetVersion?: Maybe; - Actor?: Maybe; - Stakeholder?: Maybe; + __typename?: 'GetDetailsTabDataForObjectResult'; + Unit?: Maybe; + Project?: Maybe; + Subject?: Maybe; + Item?: Maybe; + CaptureData?: Maybe; + Model?: Maybe; + Scene?: Maybe; + IntermediaryFile?: Maybe; + ProjectDocumentation?: Maybe; + Asset?: Maybe; + AssetVersion?: Maybe; + Actor?: Maybe; + Stakeholder?: Maybe; }; export type GetSystemObjectDetailsInput = { - idSystemObject: Scalars['Int']; + idSystemObject: Scalars['Int']; }; export type RepositoryPath = { - __typename?: 'RepositoryPath'; - idSystemObject: Scalars['Int']; - name: Scalars['String']; - objectType: Scalars['Int']; + __typename?: 'RepositoryPath'; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + objectType: Scalars['Int']; }; export type GetSystemObjectDetailsResult = { - __typename?: 'GetSystemObjectDetailsResult'; - idObject: Scalars['Int']; - name: Scalars['String']; - retired: Scalars['Boolean']; - objectType: Scalars['Int']; - allowed: Scalars['Boolean']; - publishedState: Scalars['String']; - thumbnail?: Maybe; - identifiers: Array; - objectAncestors: Array>; - sourceObjects: Array; - derivedObjects: Array; - unit?: Maybe; - project?: Maybe; - subject?: Maybe; - item?: Maybe; + __typename?: 'GetSystemObjectDetailsResult'; + idObject: Scalars['Int']; + name: Scalars['String']; + retired: Scalars['Boolean']; + objectType: Scalars['Int']; + allowed: Scalars['Boolean']; + publishedState: Scalars['String']; + thumbnail?: Maybe; + identifiers: Array; + objectAncestors: Array>; + sourceObjects: Array; + derivedObjects: Array; + unit?: Maybe; + project?: Maybe; + subject?: Maybe; + item?: Maybe; }; export type GetSourceObjectIdentiferInput = { - idSystemObjects: Array; + idSystemObjects: Array; }; export type SourceObjectIdentifier = { - __typename?: 'SourceObjectIdentifier'; - idSystemObject: Scalars['Int']; - identifier?: Maybe; + __typename?: 'SourceObjectIdentifier'; + idSystemObject: Scalars['Int']; + identifier?: Maybe; }; export type GetSourceObjectIdentiferResult = { - __typename?: 'GetSourceObjectIdentiferResult'; - sourceObjectIdentifiers: Array; + __typename?: 'GetSourceObjectIdentiferResult'; + sourceObjectIdentifiers: Array; }; export type AssetDetail = { - __typename?: 'AssetDetail'; - idSystemObject: Scalars['Int']; - name: Scalars['String']; - path: Scalars['String']; - assetType: Scalars['Int']; - version: Scalars['Int']; - dateCreated: Scalars['DateTime']; - size: Scalars['Int']; + __typename?: 'AssetDetail'; + idSystemObject: Scalars['Int']; + name: Scalars['String']; + path: Scalars['String']; + assetType: Scalars['Int']; + version: Scalars['Int']; + dateCreated: Scalars['DateTime']; + size: Scalars['BigInt']; }; export type GetAssetDetailsForSystemObjectInput = { - idSystemObject: Scalars['Int']; + idSystemObject: Scalars['Int']; }; export type GetAssetDetailsForSystemObjectResult = { - __typename?: 'GetAssetDetailsForSystemObjectResult'; - assetDetails: Array; + __typename?: 'GetAssetDetailsForSystemObjectResult'; + assetDetails: Array; }; export type DetailVersion = { - __typename?: 'DetailVersion'; - idSystemObject: Scalars['Int']; - version: Scalars['Int']; - name: Scalars['String']; - creator: Scalars['String']; - dateCreated: Scalars['DateTime']; - size: Scalars['Int']; + __typename?: 'DetailVersion'; + idSystemObject: Scalars['Int']; + version: Scalars['Int']; + name: Scalars['String']; + creator: Scalars['String']; + dateCreated: Scalars['DateTime']; + size: Scalars['BigInt']; }; export type GetVersionsForSystemObjectInput = { - idSystemObject: Scalars['Int']; + idSystemObject: Scalars['Int']; }; export type GetVersionsForSystemObjectResult = { - __typename?: 'GetVersionsForSystemObjectResult'; - versions: Array; + __typename?: 'GetVersionsForSystemObjectResult'; + versions: Array; +}; + +export type GetProjectListResult = { + __typename?: 'GetProjectListResult'; + projects: Array; +}; + +export type GetProjectListInput = { + search: Scalars['String']; }; export type SystemObject = { - __typename?: 'SystemObject'; - idSystemObject: Scalars['Int']; - Retired: Scalars['Boolean']; - idActor?: Maybe; - idAsset?: Maybe; - idAssetVersion?: Maybe; - idCaptureData?: Maybe; - idIntermediaryFile?: Maybe; - idItem?: Maybe; - idModel?: Maybe; - idProject?: Maybe; - idProjectDocumentation?: Maybe; - idScene?: Maybe; - idStakeholder?: Maybe; - idSubject?: Maybe; - idUnit?: Maybe; - idWorkflow?: Maybe; - idWorkflowStep?: Maybe; - Actor?: Maybe; - Asset?: Maybe; - AssetVersion?: Maybe; - CaptureData?: Maybe; - IntermediaryFile?: Maybe; - Item?: Maybe; - Model?: Maybe; - Project?: Maybe; - ProjectDocumentation?: Maybe; - Scene?: Maybe; - Stakeholder?: Maybe; - Subject?: Maybe; - Unit?: Maybe; - Workflow?: Maybe; - WorkflowStep?: Maybe; - AccessContextObject?: Maybe>>; - Identifier?: Maybe>>; - LicenseAssignment?: Maybe>>; - Metadata?: Maybe>>; - SystemObjectVersion?: Maybe>>; - SystemObjectDerived?: Maybe>>; - SystemObjectMaster?: Maybe>>; - UserPersonalizationSystemObject?: Maybe>>; - WorkflowStepXref?: Maybe>>; + __typename?: 'SystemObject'; + idSystemObject: Scalars['Int']; + Retired: Scalars['Boolean']; + idActor?: Maybe; + idAsset?: Maybe; + idAssetVersion?: Maybe; + idCaptureData?: Maybe; + idIntermediaryFile?: Maybe; + idItem?: Maybe; + idModel?: Maybe; + idProject?: Maybe; + idProjectDocumentation?: Maybe; + idScene?: Maybe; + idStakeholder?: Maybe; + idSubject?: Maybe; + idUnit?: Maybe; + idWorkflow?: Maybe; + idWorkflowStep?: Maybe; + Actor?: Maybe; + Asset?: Maybe; + AssetVersion?: Maybe; + CaptureData?: Maybe; + IntermediaryFile?: Maybe; + Item?: Maybe; + Model?: Maybe; + Project?: Maybe; + ProjectDocumentation?: Maybe; + Scene?: Maybe; + Stakeholder?: Maybe; + Subject?: Maybe; + Unit?: Maybe; + Workflow?: Maybe; + WorkflowStep?: Maybe; + AccessContextObject?: Maybe>>; + Identifier?: Maybe>>; + LicenseAssignment?: Maybe>>; + Metadata?: Maybe>>; + SystemObjectVersion?: Maybe>>; + SystemObjectDerived?: Maybe>>; + SystemObjectMaster?: Maybe>>; + UserPersonalizationSystemObject?: Maybe>>; + WorkflowStepXref?: Maybe>>; }; export type SystemObjectVersion = { - __typename?: 'SystemObjectVersion'; - idSystemObjectVersion: Scalars['Int']; - idSystemObject: Scalars['Int']; - PublishedState: Scalars['Int']; - SystemObject?: Maybe; + __typename?: 'SystemObjectVersion'; + idSystemObjectVersion: Scalars['Int']; + idSystemObject: Scalars['Int']; + PublishedState: Scalars['Int']; + SystemObject?: Maybe; }; export type Identifier = { - __typename?: 'Identifier'; - idIdentifier: Scalars['Int']; - IdentifierValue: Scalars['String']; - idSystemObject?: Maybe; - idVIdentifierType?: Maybe; - SystemObject?: Maybe; - VIdentifierType?: Maybe; + __typename?: 'Identifier'; + idIdentifier: Scalars['Int']; + IdentifierValue: Scalars['String']; + idSystemObject?: Maybe; + idVIdentifierType?: Maybe; + SystemObject?: Maybe; + VIdentifierType?: Maybe; }; export type Metadata = { - __typename?: 'Metadata'; - idMetadata: Scalars['Int']; - Name: Scalars['String']; - idAssetValue?: Maybe; - idSystemObject?: Maybe; - idUser?: Maybe; - idVMetadataSource?: Maybe; - ValueExtended?: Maybe; - ValueShort?: Maybe; - AssetValue?: Maybe; - SystemObject?: Maybe; - User?: Maybe; - VMetadataSource?: Maybe; + __typename?: 'Metadata'; + idMetadata: Scalars['Int']; + Name: Scalars['String']; + idAssetValue?: Maybe; + idSystemObject?: Maybe; + idUser?: Maybe; + idVMetadataSource?: Maybe; + ValueExtended?: Maybe; + ValueShort?: Maybe; + AssetValue?: Maybe; + SystemObject?: Maybe; + User?: Maybe; + VMetadataSource?: Maybe; }; export type CreateUnitInput = { - Name: Scalars['String']; - Abbreviation: Scalars['String']; - ARKPrefix: Scalars['String']; + Name: Scalars['String']; + Abbreviation: Scalars['String']; + ARKPrefix: Scalars['String']; }; export type CreateUnitResult = { - __typename?: 'CreateUnitResult'; - Unit?: Maybe; + __typename?: 'CreateUnitResult'; + Unit?: Maybe; }; export type CreateProjectInput = { - Name: Scalars['String']; - Description: Scalars['String']; + Name: Scalars['String']; + Description: Scalars['String']; }; export type CreateProjectResult = { - __typename?: 'CreateProjectResult'; - Project?: Maybe; + __typename?: 'CreateProjectResult'; + Project?: Maybe; }; export type CreateSubjectInput = { - idUnit: Scalars['Int']; - Name: Scalars['String']; - idAssetThumbnail?: Maybe; - idGeoLocation?: Maybe; - idIdentifierPreferred?: Maybe; + idUnit: Scalars['Int']; + Name: Scalars['String']; + idAssetThumbnail?: Maybe; + idGeoLocation?: Maybe; + idIdentifierPreferred?: Maybe; }; export type CreateSubjectResult = { - __typename?: 'CreateSubjectResult'; - Subject?: Maybe; + __typename?: 'CreateSubjectResult'; + Subject?: Maybe; }; export type CreateItemInput = { - Name: Scalars['String']; - EntireSubject: Scalars['Boolean']; - idAssetThumbnail?: Maybe; - idGeoLocation?: Maybe; + Name: Scalars['String']; + EntireSubject: Scalars['Boolean']; + idAssetThumbnail?: Maybe; + idGeoLocation?: Maybe; }; export type CreateItemResult = { - __typename?: 'CreateItemResult'; - Item?: Maybe; + __typename?: 'CreateItemResult'; + Item?: Maybe; }; export type GetSubjectsForUnitInput = { - idUnit: Scalars['Int']; - pagination?: Maybe; + idUnit: Scalars['Int']; + pagination?: Maybe; }; export type GetSubjectsForUnitResult = { - __typename?: 'GetSubjectsForUnitResult'; - Subject: Array; + __typename?: 'GetSubjectsForUnitResult'; + Subject: Array; }; export type GetItemsForSubjectInput = { - idSubject: Scalars['Int']; - pagination?: Maybe; + idSubject: Scalars['Int']; + pagination?: Maybe; }; export type GetItemsForSubjectResult = { - __typename?: 'GetItemsForSubjectResult'; - Item: Array; + __typename?: 'GetItemsForSubjectResult'; + Item: Array; }; export type SubjectUnitIdentifier = { - __typename?: 'SubjectUnitIdentifier'; - idSubject: Scalars['Int']; - SubjectName: Scalars['String']; - UnitAbbreviation: Scalars['String']; - IdentifierPublic?: Maybe; - IdentifierCollection?: Maybe; + __typename?: 'SubjectUnitIdentifier'; + idSubject: Scalars['Int']; + SubjectName: Scalars['String']; + UnitAbbreviation: Scalars['String']; + IdentifierPublic?: Maybe; + IdentifierCollection?: Maybe; }; export type GetObjectsForItemInput = { - idItem: Scalars['Int']; + idItem: Scalars['Int']; }; export type GetObjectsForItemResult = { - __typename?: 'GetObjectsForItemResult'; - CaptureData: Array; - Model: Array; - Scene: Array; - IntermediaryFile: Array; - ProjectDocumentation: Array; + __typename?: 'GetObjectsForItemResult'; + CaptureData: Array; + Model: Array; + Scene: Array; + IntermediaryFile: Array; + ProjectDocumentation: Array; }; export type SearchIngestionSubjectsInput = { - query: Scalars['String']; + query: Scalars['String']; }; export type SearchIngestionSubjectsResult = { - __typename?: 'SearchIngestionSubjectsResult'; - SubjectUnitIdentifier: Array; + __typename?: 'SearchIngestionSubjectsResult'; + SubjectUnitIdentifier: Array; }; export type GetIngestionItemsForSubjectsInput = { - idSubjects: Array; + idSubjects: Array; }; export type GetIngestionItemsForSubjectsResult = { - __typename?: 'GetIngestionItemsForSubjectsResult'; - Item: Array; + __typename?: 'GetIngestionItemsForSubjectsResult'; + Item: Array; }; export type GetIngestionProjectsForSubjectsInput = { - idSubjects: Array; + idSubjects: Array; }; export type GetIngestionProjectsForSubjectsResult = { - __typename?: 'GetIngestionProjectsForSubjectsResult'; - Project: Array; + __typename?: 'GetIngestionProjectsForSubjectsResult'; + Project: Array; }; export type GetUnitInput = { - idUnit: Scalars['Int']; + idUnit: Scalars['Int']; }; export type GetUnitResult = { - __typename?: 'GetUnitResult'; - Unit?: Maybe; + __typename?: 'GetUnitResult'; + Unit?: Maybe; }; export type GetProjectInput = { - idProject: Scalars['Int']; + idProject: Scalars['Int']; }; export type GetProjectResult = { - __typename?: 'GetProjectResult'; - Project?: Maybe; + __typename?: 'GetProjectResult'; + Project?: Maybe; }; export type GetProjectDocumentationInput = { - idProjectDocumentation: Scalars['Int']; + idProjectDocumentation: Scalars['Int']; }; export type GetProjectDocumentationResult = { - __typename?: 'GetProjectDocumentationResult'; - ProjectDocumentation?: Maybe; + __typename?: 'GetProjectDocumentationResult'; + ProjectDocumentation?: Maybe; }; export type GetSubjectInput = { - idSubject: Scalars['Int']; + idSubject: Scalars['Int']; }; export type GetSubjectResult = { - __typename?: 'GetSubjectResult'; - Subject?: Maybe; + __typename?: 'GetSubjectResult'; + Subject?: Maybe; }; export type GetItemInput = { - idItem: Scalars['Int']; + idItem: Scalars['Int']; }; export type GetItemResult = { - __typename?: 'GetItemResult'; - Item?: Maybe; + __typename?: 'GetItemResult'; + Item?: Maybe; +}; + +export type GetUnitsFromNameSearchResult = { + __typename?: 'GetUnitsFromNameSearchResult'; + Units: Array; +}; + +export type GetUnitsFromNameSearchInput = { + search: Scalars['String']; }; export type Unit = { - __typename?: 'Unit'; - idUnit: Scalars['Int']; - Abbreviation?: Maybe; - ARKPrefix?: Maybe; - Name: Scalars['String']; - Actor?: Maybe>>; - Subject?: Maybe>>; - SystemObject?: Maybe; + __typename?: 'Unit'; + idUnit: Scalars['Int']; + Abbreviation?: Maybe; + ARKPrefix?: Maybe; + Name: Scalars['String']; + Actor?: Maybe>>; + Subject?: Maybe>>; + SystemObject?: Maybe; }; export type Project = { - __typename?: 'Project'; - idProject: Scalars['Int']; - Name: Scalars['String']; - Description?: Maybe; - ProjectDocumentation?: Maybe>>; - SystemObject?: Maybe; - Workflow?: Maybe>>; + __typename?: 'Project'; + idProject: Scalars['Int']; + Name: Scalars['String']; + Description?: Maybe; + ProjectDocumentation?: Maybe>>; + SystemObject?: Maybe; + Workflow?: Maybe>>; }; export type ProjectDocumentation = { - __typename?: 'ProjectDocumentation'; - idProjectDocumentation: Scalars['Int']; - Description: Scalars['String']; - idProject: Scalars['Int']; - Name: Scalars['String']; - Project?: Maybe; - SystemObject?: Maybe; + __typename?: 'ProjectDocumentation'; + idProjectDocumentation: Scalars['Int']; + Description: Scalars['String']; + idProject: Scalars['Int']; + Name: Scalars['String']; + Project?: Maybe; + SystemObject?: Maybe; }; export type Stakeholder = { - __typename?: 'Stakeholder'; - idStakeholder: Scalars['Int']; - IndividualName: Scalars['String']; - OrganizationName: Scalars['String']; - MailingAddress?: Maybe; - EmailAddress?: Maybe; - PhoneNumberMobile?: Maybe; - PhoneNumberOffice?: Maybe; - SystemObject?: Maybe; + __typename?: 'Stakeholder'; + idStakeholder: Scalars['Int']; + IndividualName: Scalars['String']; + OrganizationName: Scalars['String']; + MailingAddress?: Maybe; + EmailAddress?: Maybe; + PhoneNumberMobile?: Maybe; + PhoneNumberOffice?: Maybe; + SystemObject?: Maybe; }; export type GeoLocation = { - __typename?: 'GeoLocation'; - idGeoLocation: Scalars['Int']; - Altitude?: Maybe; - Latitude?: Maybe; - Longitude?: Maybe; - R0?: Maybe; - R1?: Maybe; - R2?: Maybe; - R3?: Maybe; - TS0?: Maybe; - TS1?: Maybe; - TS2?: Maybe; + __typename?: 'GeoLocation'; + idGeoLocation: Scalars['Int']; + Altitude?: Maybe; + Latitude?: Maybe; + Longitude?: Maybe; + R0?: Maybe; + R1?: Maybe; + R2?: Maybe; + R3?: Maybe; + TS0?: Maybe; + TS1?: Maybe; + TS2?: Maybe; }; export type Subject = { - __typename?: 'Subject'; - idSubject: Scalars['Int']; - idUnit: Scalars['Int']; - Name: Scalars['String']; - AssetThumbnail?: Maybe; - idAssetThumbnail?: Maybe; - idGeoLocation?: Maybe; - idIdentifierPreferred?: Maybe; - GeoLocation?: Maybe; - Unit?: Maybe; - IdentifierPreferred?: Maybe; - Item?: Maybe>>; - SystemObject?: Maybe; + __typename?: 'Subject'; + idSubject: Scalars['Int']; + idUnit: Scalars['Int']; + Name: Scalars['String']; + AssetThumbnail?: Maybe; + idAssetThumbnail?: Maybe; + idGeoLocation?: Maybe; + idIdentifierPreferred?: Maybe; + GeoLocation?: Maybe; + Unit?: Maybe; + IdentifierPreferred?: Maybe; + Item?: Maybe>>; + SystemObject?: Maybe; }; export type Item = { - __typename?: 'Item'; - idItem: Scalars['Int']; - EntireSubject: Scalars['Boolean']; - Name: Scalars['String']; - idAssetThumbnail?: Maybe; - idGeoLocation?: Maybe; - AssetThumbnail?: Maybe; - GeoLocation?: Maybe; - Subject?: Maybe; - SystemObject?: Maybe; + __typename?: 'Item'; + idItem: Scalars['Int']; + EntireSubject: Scalars['Boolean']; + Name: Scalars['String']; + idAssetThumbnail?: Maybe; + idGeoLocation?: Maybe; + AssetThumbnail?: Maybe; + GeoLocation?: Maybe; + Subject?: Maybe; + SystemObject?: Maybe; }; export type CreateUserInput = { - Name: Scalars['String']; - EmailAddress: Scalars['String']; - SecurityID: Scalars['String']; + Name: Scalars['String']; + EmailAddress: Scalars['String']; + SecurityID?: Maybe; + WorkflowNotificationTime?: Maybe; + EmailSettings?: Maybe; }; export type CreateUserResult = { - __typename?: 'CreateUserResult'; - User?: Maybe; + __typename?: 'CreateUserResult'; + User?: Maybe; +}; + +export type UpdateUserInput = { + idUser: Scalars['Int']; + Name: Scalars['String']; + EmailAddress: Scalars['String']; + Active: Scalars['Boolean']; + EmailSettings: Scalars['Int']; + WorkflowNotificationTime: Scalars['DateTime']; }; export type GetCurrentUserResult = { - __typename?: 'GetCurrentUserResult'; - User?: Maybe; + __typename?: 'GetCurrentUserResult'; + User?: Maybe; }; export type GetUserInput = { - idUser: Scalars['Int']; + idUser: Scalars['Int']; }; export type GetUserResult = { - __typename?: 'GetUserResult'; - User?: Maybe; + __typename?: 'GetUserResult'; + User?: Maybe; +}; + +export enum User_Status { + EAll = 'eAll', + EActive = 'eActive', + EInactive = 'eInactive' +} + +export type GetAllUsersInput = { + search: Scalars['String']; + active: User_Status; +}; + +export type GetAllUsersResult = { + __typename?: 'GetAllUsersResult'; + User: Array; }; export type User = { - __typename?: 'User'; - idUser: Scalars['Int']; - Active: Scalars['Boolean']; - DateActivated: Scalars['DateTime']; - EmailAddress: Scalars['String']; - Name: Scalars['String']; - SecurityID: Scalars['String']; - DateDisabled?: Maybe; - EmailSettings?: Maybe; - WorkflowNotificationTime?: Maybe; - AccessPolicy?: Maybe>>; - AssetVersion?: Maybe>>; - LicenseAssignment?: Maybe>>; - Metadata?: Maybe>>; - UserPersonalizationSystemObject?: Maybe>>; - UserPersonalizationUrl?: Maybe>>; - Workflow?: Maybe>>; - WorkflowStep?: Maybe>>; + __typename?: 'User'; + idUser: Scalars['Int']; + Active: Scalars['Boolean']; + DateActivated: Scalars['DateTime']; + EmailAddress: Scalars['String']; + Name: Scalars['String']; + SecurityID: Scalars['String']; + DateDisabled?: Maybe; + EmailSettings?: Maybe; + WorkflowNotificationTime?: Maybe; + AccessPolicy?: Maybe>>; + AssetVersion?: Maybe>>; + LicenseAssignment?: Maybe>>; + Metadata?: Maybe>>; + UserPersonalizationSystemObject?: Maybe>>; + UserPersonalizationUrl?: Maybe>>; + Workflow?: Maybe>>; + WorkflowStep?: Maybe>>; }; export type UserPersonalizationSystemObject = { - __typename?: 'UserPersonalizationSystemObject'; - idUserPersonalizationSystemObject: Scalars['Int']; - idSystemObject: Scalars['Int']; - idUser: Scalars['Int']; - Personalization?: Maybe; - SystemObject?: Maybe; - User?: Maybe; + __typename?: 'UserPersonalizationSystemObject'; + idUserPersonalizationSystemObject: Scalars['Int']; + idSystemObject: Scalars['Int']; + idUser: Scalars['Int']; + Personalization?: Maybe; + SystemObject?: Maybe; + User?: Maybe; }; export type UserPersonalizationUrl = { - __typename?: 'UserPersonalizationUrl'; - idUserPersonalizationUrl: Scalars['Int']; - idUser: Scalars['Int']; - Personalization: Scalars['String']; - URL: Scalars['String']; - User?: Maybe; + __typename?: 'UserPersonalizationUrl'; + idUserPersonalizationUrl: Scalars['Int']; + idUser: Scalars['Int']; + Personalization: Scalars['String']; + URL: Scalars['String']; + User?: Maybe; }; export type CreateVocabularyInput = { - idVocabularySet: Scalars['Int']; - SortOrder: Scalars['Int']; - Term: Scalars['String']; + idVocabularySet: Scalars['Int']; + SortOrder: Scalars['Int']; + Term: Scalars['String']; }; export type CreateVocabularyResult = { - __typename?: 'CreateVocabularyResult'; - Vocabulary?: Maybe; + __typename?: 'CreateVocabularyResult'; + Vocabulary?: Maybe; }; export type CreateVocabularySetInput = { - Name: Scalars['String']; - SystemMaintained: Scalars['Boolean']; + Name: Scalars['String']; + SystemMaintained: Scalars['Boolean']; }; export type CreateVocabularySetResult = { - __typename?: 'CreateVocabularySetResult'; - VocabularySet?: Maybe; + __typename?: 'CreateVocabularySetResult'; + VocabularySet?: Maybe; }; export type GetVocabularyInput = { - idVocabulary: Scalars['Int']; + idVocabulary: Scalars['Int']; }; export type GetVocabularyResult = { - __typename?: 'GetVocabularyResult'; - Vocabulary?: Maybe; + __typename?: 'GetVocabularyResult'; + Vocabulary?: Maybe; }; export type GetVocabularyEntriesInput = { - eVocabSetIDs: Array; + eVocabSetIDs: Array; }; export type VocabularyEntry = { - __typename?: 'VocabularyEntry'; - eVocabSetID: Scalars['Int']; - Vocabulary: Array; + __typename?: 'VocabularyEntry'; + eVocabSetID: Scalars['Int']; + Vocabulary: Array; }; export type GetVocabularyEntriesResult = { - __typename?: 'GetVocabularyEntriesResult'; - VocabularyEntries: Array; + __typename?: 'GetVocabularyEntriesResult'; + VocabularyEntries: Array; }; export type Vocabulary = { - __typename?: 'Vocabulary'; - idVocabulary: Scalars['Int']; - idVocabularySet: Scalars['Int']; - SortOrder: Scalars['Int']; - Term: Scalars['String']; - VocabularySet?: Maybe; + __typename?: 'Vocabulary'; + idVocabulary: Scalars['Int']; + idVocabularySet: Scalars['Int']; + SortOrder: Scalars['Int']; + Term: Scalars['String']; + eVocabID?: Maybe; + VocabularySet?: Maybe; }; export type VocabularySet = { - __typename?: 'VocabularySet'; - idVocabularySet: Scalars['Int']; - Name: Scalars['String']; - SystemMaintained: Scalars['Boolean']; - Vocabulary?: Maybe>>; + __typename?: 'VocabularySet'; + idVocabularySet: Scalars['Int']; + Name: Scalars['String']; + SystemMaintained: Scalars['Boolean']; + Vocabulary?: Maybe>>; }; export type GetWorkflowInput = { - idWorkflow: Scalars['Int']; + idWorkflow: Scalars['Int']; }; export type GetWorkflowResult = { - __typename?: 'GetWorkflowResult'; - Workflow?: Maybe; + __typename?: 'GetWorkflowResult'; + Workflow?: Maybe; +}; + +export type Job = { + __typename?: 'Job'; + idJob: Scalars['Int']; + idVJobType: Scalars['Int']; + Name: Scalars['String']; + Status?: Maybe; + Frequency?: Maybe; + VJobType?: Maybe; +}; + +export type JobRun = { + __typename?: 'JobRun'; + idJobRun: Scalars['Int']; + idJob: Scalars['Int']; + Status: Scalars['Int']; + Result?: Maybe; + DateStart?: Maybe; + DateEnd?: Maybe; + Configuration?: Maybe; + Parameters?: Maybe; + Output?: Maybe; + Error?: Maybe; + Job?: Maybe; }; export type Workflow = { - __typename?: 'Workflow'; - idWorkflow: Scalars['Int']; - DateInitiated: Scalars['DateTime']; - DateUpdated: Scalars['DateTime']; - idWorkflowTemplate: Scalars['Int']; - idProject?: Maybe; - idUserInitiator?: Maybe; - Project?: Maybe; - UserInitiator?: Maybe; - WorkflowTemplate?: Maybe; - WorkflowStep?: Maybe>>; + __typename?: 'Workflow'; + idWorkflow: Scalars['Int']; + idVWorkflowType: Scalars['Int']; + idProject?: Maybe; + idUserInitiator?: Maybe; + DateInitiated: Scalars['DateTime']; + DateUpdated: Scalars['DateTime']; + Parameters?: Maybe; + VWorkflowType?: Maybe; + Project?: Maybe; + UserInitiator?: Maybe; + WorkflowStep?: Maybe>>; }; export type WorkflowStep = { - __typename?: 'WorkflowStep'; - idWorkflowStep: Scalars['Int']; - DateCreated: Scalars['DateTime']; - idUserOwner: Scalars['Int']; - idVWorkflowStepType: Scalars['Int']; - idWorkflow: Scalars['Int']; - State: Scalars['Int']; - DateCompleted?: Maybe; - User?: Maybe; - VWorkflowStepType?: Maybe; - Workflow?: Maybe; - WorkflowStepSystemObjectXref?: Maybe>>; + __typename?: 'WorkflowStep'; + idWorkflowStep: Scalars['Int']; + JobRun?: Maybe; + DateCreated: Scalars['DateTime']; + idUserOwner: Scalars['Int']; + idVWorkflowStepType: Scalars['Int']; + idWorkflow: Scalars['Int']; + State: Scalars['Int']; + DateCompleted?: Maybe; + User?: Maybe; + VWorkflowStepType?: Maybe; + Workflow?: Maybe; + WorkflowStepSystemObjectXref?: Maybe>>; }; export type WorkflowStepSystemObjectXref = { - __typename?: 'WorkflowStepSystemObjectXref'; - idWorkflowStepSystemObjectXref: Scalars['Int']; - idSystemObject: Scalars['Int']; - idWorkflowStep: Scalars['Int']; - Input: Scalars['Boolean']; - SystemObject?: Maybe; - WorkflowStep?: Maybe; -}; - -export type WorkflowTemplate = { - __typename?: 'WorkflowTemplate'; - idWorkflowTemplate: Scalars['Int']; - Name: Scalars['String']; - Workflow?: Maybe>>; + __typename?: 'WorkflowStepSystemObjectXref'; + idWorkflowStepSystemObjectXref: Scalars['Int']; + idSystemObject: Scalars['Int']; + idWorkflowStep: Scalars['Int']; + Input: Scalars['Boolean']; + SystemObject?: Maybe; + WorkflowStep?: Maybe; }; export type DiscardUploadedAssetVersionsMutationVariables = Exact<{ - input: DiscardUploadedAssetVersionsInput; + input: DiscardUploadedAssetVersionsInput; }>; -export type DiscardUploadedAssetVersionsMutation = { __typename?: 'Mutation' } & { - discardUploadedAssetVersions: { __typename?: 'DiscardUploadedAssetVersionsResult' } & Pick; -}; + +export type DiscardUploadedAssetVersionsMutation = ( + { __typename?: 'Mutation' } + & { discardUploadedAssetVersions: ( + { __typename?: 'DiscardUploadedAssetVersionsResult' } + & Pick + ) } +); export type UploadAssetMutationVariables = Exact<{ - file: Scalars['Upload']; - type: Scalars['Int']; + file: Scalars['Upload']; + type: Scalars['Int']; }>; -export type UploadAssetMutation = { __typename?: 'Mutation' } & { - uploadAsset: { __typename?: 'UploadAssetResult' } & Pick; -}; + +export type UploadAssetMutation = ( + { __typename?: 'Mutation' } + & { uploadAsset: ( + { __typename?: 'UploadAssetResult' } + & Pick + ) } +); export type CreateCaptureDataMutationVariables = Exact<{ - input: CreateCaptureDataInput; + input: CreateCaptureDataInput; }>; -export type CreateCaptureDataMutation = { __typename?: 'Mutation' } & { - createCaptureData: { __typename?: 'CreateCaptureDataResult' } & { CaptureData?: Maybe<{ __typename?: 'CaptureData' } & Pick> }; -}; + +export type CreateCaptureDataMutation = ( + { __typename?: 'Mutation' } + & { createCaptureData: ( + { __typename?: 'CreateCaptureDataResult' } + & { CaptureData?: Maybe<( + { __typename?: 'CaptureData' } + & Pick + )> } + ) } +); export type CreateCaptureDataPhotoMutationVariables = Exact<{ - input: CreateCaptureDataPhotoInput; + input: CreateCaptureDataPhotoInput; }>; -export type CreateCaptureDataPhotoMutation = { __typename?: 'Mutation' } & { - createCaptureDataPhoto: { __typename?: 'CreateCaptureDataPhotoResult' } & { - CaptureDataPhoto?: Maybe<{ __typename?: 'CaptureDataPhoto' } & Pick>; - }; -}; + +export type CreateCaptureDataPhotoMutation = ( + { __typename?: 'Mutation' } + & { createCaptureDataPhoto: ( + { __typename?: 'CreateCaptureDataPhotoResult' } + & { CaptureDataPhoto?: Maybe<( + { __typename?: 'CaptureDataPhoto' } + & Pick + )> } + ) } +); export type IngestDataMutationVariables = Exact<{ - input: IngestDataInput; + input: IngestDataInput; }>; -export type IngestDataMutation = { __typename?: 'Mutation' } & { ingestData: { __typename?: 'IngestDataResult' } & Pick }; - -export type CreateModelMutationVariables = Exact<{ - input: CreateModelInput; -}>; -export type CreateModelMutation = { __typename?: 'Mutation' } & { - createModel: { __typename?: 'CreateModelResult' } & { Model?: Maybe<{ __typename?: 'Model' } & Pick> }; -}; +export type IngestDataMutation = ( + { __typename?: 'Mutation' } + & { ingestData: ( + { __typename?: 'IngestDataResult' } + & Pick + ) } +); export type CreateSceneMutationVariables = Exact<{ - input: CreateSceneInput; + input: CreateSceneInput; }>; -export type CreateSceneMutation = { __typename?: 'Mutation' } & { - createScene: { __typename?: 'CreateSceneResult' } & { Scene?: Maybe<{ __typename?: 'Scene' } & Pick> }; -}; + +export type CreateSceneMutation = ( + { __typename?: 'Mutation' } + & { createScene: ( + { __typename?: 'CreateSceneResult' } + & { Scene?: Maybe<( + { __typename?: 'Scene' } + & Pick + )> } + ) } +); export type UpdateObjectDetailsMutationVariables = Exact<{ - input: UpdateObjectDetailsInput; + input: UpdateObjectDetailsInput; }>; -export type UpdateObjectDetailsMutation = { __typename?: 'Mutation' } & { - updateObjectDetails: { __typename?: 'UpdateObjectDetailsResult' } & Pick; -}; + +export type UpdateObjectDetailsMutation = ( + { __typename?: 'Mutation' } + & { updateObjectDetails: ( + { __typename?: 'UpdateObjectDetailsResult' } + & Pick + ) } +); export type CreateItemMutationVariables = Exact<{ - input: CreateItemInput; + input: CreateItemInput; }>; -export type CreateItemMutation = { __typename?: 'Mutation' } & { - createItem: { __typename?: 'CreateItemResult' } & { Item?: Maybe<{ __typename?: 'Item' } & Pick> }; -}; + +export type CreateItemMutation = ( + { __typename?: 'Mutation' } + & { createItem: ( + { __typename?: 'CreateItemResult' } + & { Item?: Maybe<( + { __typename?: 'Item' } + & Pick + )> } + ) } +); export type CreateProjectMutationVariables = Exact<{ - input: CreateProjectInput; + input: CreateProjectInput; }>; -export type CreateProjectMutation = { __typename?: 'Mutation' } & { - createProject: { __typename?: 'CreateProjectResult' } & { Project?: Maybe<{ __typename?: 'Project' } & Pick> }; -}; + +export type CreateProjectMutation = ( + { __typename?: 'Mutation' } + & { createProject: ( + { __typename?: 'CreateProjectResult' } + & { Project?: Maybe<( + { __typename?: 'Project' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type CreateSubjectMutationVariables = Exact<{ - input: CreateSubjectInput; + input: CreateSubjectInput; }>; -export type CreateSubjectMutation = { __typename?: 'Mutation' } & { - createSubject: { __typename?: 'CreateSubjectResult' } & { Subject?: Maybe<{ __typename?: 'Subject' } & Pick> }; -}; + +export type CreateSubjectMutation = ( + { __typename?: 'Mutation' } + & { createSubject: ( + { __typename?: 'CreateSubjectResult' } + & { Subject?: Maybe<( + { __typename?: 'Subject' } + & Pick + )> } + ) } +); export type CreateUnitMutationVariables = Exact<{ - input: CreateUnitInput; + input: CreateUnitInput; }>; -export type CreateUnitMutation = { __typename?: 'Mutation' } & { - createUnit: { __typename?: 'CreateUnitResult' } & { Unit?: Maybe<{ __typename?: 'Unit' } & Pick> }; -}; + +export type CreateUnitMutation = ( + { __typename?: 'Mutation' } + & { createUnit: ( + { __typename?: 'CreateUnitResult' } + & { Unit?: Maybe<( + { __typename?: 'Unit' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type CreateUserMutationVariables = Exact<{ - input: CreateUserInput; + input: CreateUserInput; +}>; + + +export type CreateUserMutation = ( + { __typename?: 'Mutation' } + & { createUser: ( + { __typename?: 'CreateUserResult' } + & { User?: Maybe<( + { __typename?: 'User' } + & Pick + )> } + ) } +); + +export type UpdateUserMutationVariables = Exact<{ + input: UpdateUserInput; }>; -export type CreateUserMutation = { __typename?: 'Mutation' } & { - createUser: { __typename?: 'CreateUserResult' } & { User?: Maybe<{ __typename?: 'User' } & Pick> }; -}; + +export type UpdateUserMutation = ( + { __typename?: 'Mutation' } + & { updateUser: ( + { __typename?: 'CreateUserResult' } + & { User?: Maybe<( + { __typename?: 'User' } + & Pick + )> } + ) } +); export type CreateVocabularyMutationVariables = Exact<{ - input: CreateVocabularyInput; + input: CreateVocabularyInput; }>; -export type CreateVocabularyMutation = { __typename?: 'Mutation' } & { - createVocabulary: { __typename?: 'CreateVocabularyResult' } & { Vocabulary?: Maybe<{ __typename?: 'Vocabulary' } & Pick> }; -}; + +export type CreateVocabularyMutation = ( + { __typename?: 'Mutation' } + & { createVocabulary: ( + { __typename?: 'CreateVocabularyResult' } + & { Vocabulary?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )> } + ) } +); export type CreateVocabularySetMutationVariables = Exact<{ - input: CreateVocabularySetInput; + input: CreateVocabularySetInput; }>; -export type CreateVocabularySetMutation = { __typename?: 'Mutation' } & { - createVocabularySet: { __typename?: 'CreateVocabularySetResult' } & { VocabularySet?: Maybe<{ __typename?: 'VocabularySet' } & Pick> }; -}; + +export type CreateVocabularySetMutation = ( + { __typename?: 'Mutation' } + & { createVocabularySet: ( + { __typename?: 'CreateVocabularySetResult' } + & { VocabularySet?: Maybe<( + { __typename?: 'VocabularySet' } + & Pick + )> } + ) } +); export type GetAccessPolicyQueryVariables = Exact<{ - input: GetAccessPolicyInput; + input: GetAccessPolicyInput; }>; -export type GetAccessPolicyQuery = { __typename?: 'Query' } & { - getAccessPolicy: { __typename?: 'GetAccessPolicyResult' } & { AccessPolicy?: Maybe<{ __typename?: 'AccessPolicy' } & Pick> }; -}; + +export type GetAccessPolicyQuery = ( + { __typename?: 'Query' } + & { getAccessPolicy: ( + { __typename?: 'GetAccessPolicyResult' } + & { AccessPolicy?: Maybe<( + { __typename?: 'AccessPolicy' } + & Pick + )> } + ) } +); export type GetAssetQueryVariables = Exact<{ - input: GetAssetInput; + input: GetAssetInput; }>; -export type GetAssetQuery = { __typename?: 'Query' } & { getAsset: { __typename?: 'GetAssetResult' } & { Asset?: Maybe<{ __typename?: 'Asset' } & Pick> } }; + +export type GetAssetQuery = ( + { __typename?: 'Query' } + & { getAsset: ( + { __typename?: 'GetAssetResult' } + & { Asset?: Maybe<( + { __typename?: 'Asset' } + & Pick + )> } + ) } +); export type GetAssetVersionsDetailsQueryVariables = Exact<{ - input: GetAssetVersionsDetailsInput; + input: GetAssetVersionsDetailsInput; }>; -export type GetAssetVersionsDetailsQuery = { __typename?: 'Query' } & { - getAssetVersionsDetails: { __typename?: 'GetAssetVersionsDetailsResult' } & Pick & { - Details: Array< - { __typename?: 'GetAssetVersionDetailResult' } & Pick & { - SubjectUnitIdentifier?: Maybe< - { __typename?: 'SubjectUnitIdentifier' } & Pick< - SubjectUnitIdentifier, - 'idSubject' | 'SubjectName' | 'UnitAbbreviation' | 'IdentifierPublic' | 'IdentifierCollection' - > - >; - Project?: Maybe>>; - Item?: Maybe<{ __typename?: 'Item' } & Pick>; - CaptureDataPhoto?: Maybe< - { __typename?: 'IngestPhotogrammetry' } & Pick< - IngestPhotogrammetry, - | 'idAssetVersion' - | 'dateCaptured' - | 'datasetType' - | 'systemCreated' - | 'description' - | 'cameraSettingUniform' - | 'datasetFieldId' - | 'itemPositionType' - | 'itemPositionFieldId' - | 'itemArrangementFieldId' - | 'focusType' - | 'lightsourceType' - | 'backgroundRemovalMethod' - | 'clusterType' - | 'clusterGeometryFieldId' - | 'directory' - > & { - folders: Array<{ __typename?: 'IngestFolder' } & Pick>; - identifiers: Array<{ __typename?: 'IngestIdentifier' } & Pick>; - } - >; - Model?: Maybe< - { __typename?: 'IngestModel' } & Pick< - IngestModel, - | 'idAssetVersion' - | 'systemCreated' - | 'master' - | 'authoritative' - | 'creationMethod' - | 'modality' - | 'purpose' - | 'units' - | 'dateCaptured' - | 'modelFileType' - | 'directory' - | 'roughness' - | 'metalness' - | 'pointCount' - | 'faceCount' - | 'isWatertight' - | 'hasNormals' - | 'hasVertexColor' - | 'hasUVSpace' - | 'boundingBoxP1X' - | 'boundingBoxP1Y' - | 'boundingBoxP1Z' - | 'boundingBoxP2X' - | 'boundingBoxP2Y' - | 'boundingBoxP2Z' - > & { - identifiers: Array<{ __typename?: 'IngestIdentifier' } & Pick>; - uvMaps: Array<{ __typename?: 'IngestUVMap' } & Pick>; - } - >; - Scene?: Maybe< - { __typename?: 'IngestScene' } & Pick & { - identifiers: Array<{ __typename?: 'IngestIdentifier' } & Pick>; - } - >; - } - >; - }; -}; + +export type GetAssetVersionsDetailsQuery = ( + { __typename?: 'Query' } + & { getAssetVersionsDetails: ( + { __typename?: 'GetAssetVersionsDetailsResult' } + & Pick + & { Details: Array<( + { __typename?: 'GetAssetVersionDetailResult' } + & Pick + & { SubjectUnitIdentifier?: Maybe<( + { __typename?: 'SubjectUnitIdentifier' } + & Pick + )>, Project?: Maybe + )>>, Item?: Maybe<( + { __typename?: 'Item' } + & Pick + )>, CaptureDataPhoto?: Maybe<( + { __typename?: 'IngestPhotogrammetry' } + & Pick + & { folders: Array<( + { __typename?: 'IngestFolder' } + & Pick + )>, identifiers: Array<( + { __typename?: 'IngestIdentifier' } + & Pick + )> } + )>, Model?: Maybe<( + { __typename?: 'IngestModel' } + & Pick + & { identifiers: Array<( + { __typename?: 'IngestIdentifier' } + & Pick + )> } + )>, Scene?: Maybe<( + { __typename?: 'IngestScene' } + & Pick + & { identifiers: Array<( + { __typename?: 'IngestIdentifier' } + & Pick + )> } + )> } + )> } + ) } +); export type GetContentsForAssetVersionsQueryVariables = Exact<{ - input: GetContentsForAssetVersionsInput; + input: GetContentsForAssetVersionsInput; }>; -export type GetContentsForAssetVersionsQuery = { __typename?: 'Query' } & { - getContentsForAssetVersions: { __typename?: 'GetContentsForAssetVersionsResult' } & { - AssetVersionContent: Array<{ __typename?: 'AssetVersionContent' } & Pick>; - }; -}; -export type GetUploadedAssetVersionQueryVariables = Exact<{ [key: string]: never }>; +export type GetContentsForAssetVersionsQuery = ( + { __typename?: 'Query' } + & { getContentsForAssetVersions: ( + { __typename?: 'GetContentsForAssetVersionsResult' } + & { AssetVersionContent: Array<( + { __typename?: 'AssetVersionContent' } + & Pick + )> } + ) } +); + +export type GetModelConstellationForAssetVersionQueryVariables = Exact<{ + input: GetModelConstellationForAssetVersionInput; +}>; -export type GetUploadedAssetVersionQuery = { __typename?: 'Query' } & { - getUploadedAssetVersion: { __typename?: 'GetUploadedAssetVersionResult' } & { - AssetVersion: Array< - { __typename?: 'AssetVersion' } & Pick & { - Asset?: Maybe< - { __typename?: 'Asset' } & Pick & { VAssetType?: Maybe<{ __typename?: 'Vocabulary' } & Pick> } - >; - } - >; - }; -}; + +export type GetModelConstellationForAssetVersionQuery = ( + { __typename?: 'Query' } + & { getModelConstellationForAssetVersion: ( + { __typename?: 'GetModelConstellationForAssetVersionResult' } + & Pick + & { ModelConstellation?: Maybe<( + { __typename?: 'ModelConstellation' } + & { Model: ( + { __typename?: 'Model' } + & Pick + ), ModelObjects?: Maybe + )>>, ModelMaterials?: Maybe + )>>, ModelMaterialChannels?: Maybe + )>>, ModelObjectModelMaterialXref?: Maybe + )>>, ModelAssets?: Maybe + )>> } + )> } + ) } +); + +export type GetUploadedAssetVersionQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetUploadedAssetVersionQuery = ( + { __typename?: 'Query' } + & { getUploadedAssetVersion: ( + { __typename?: 'GetUploadedAssetVersionResult' } + & { AssetVersion: Array<( + { __typename?: 'AssetVersion' } + & Pick + & { Asset?: Maybe<( + { __typename?: 'Asset' } + & Pick + & { VAssetType?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )> } + )> } + )> } + ) } +); export type GetCaptureDataQueryVariables = Exact<{ - input: GetCaptureDataInput; + input: GetCaptureDataInput; }>; -export type GetCaptureDataQuery = { __typename?: 'Query' } & { - getCaptureData: { __typename?: 'GetCaptureDataResult' } & { CaptureData?: Maybe<{ __typename?: 'CaptureData' } & Pick> }; -}; + +export type GetCaptureDataQuery = ( + { __typename?: 'Query' } + & { getCaptureData: ( + { __typename?: 'GetCaptureDataResult' } + & { CaptureData?: Maybe<( + { __typename?: 'CaptureData' } + & Pick + )> } + ) } +); export type GetCaptureDataPhotoQueryVariables = Exact<{ - input: GetCaptureDataPhotoInput; + input: GetCaptureDataPhotoInput; }>; -export type GetCaptureDataPhotoQuery = { __typename?: 'Query' } & { - getCaptureDataPhoto: { __typename?: 'GetCaptureDataPhotoResult' } & { - CaptureDataPhoto?: Maybe<{ __typename?: 'CaptureDataPhoto' } & Pick>; - }; -}; + +export type GetCaptureDataPhotoQuery = ( + { __typename?: 'Query' } + & { getCaptureDataPhoto: ( + { __typename?: 'GetCaptureDataPhotoResult' } + & { CaptureDataPhoto?: Maybe<( + { __typename?: 'CaptureDataPhoto' } + & Pick + )> } + ) } +); export type AreCameraSettingsUniformQueryVariables = Exact<{ - input: AreCameraSettingsUniformInput; + input: AreCameraSettingsUniformInput; }>; -export type AreCameraSettingsUniformQuery = { __typename?: 'Query' } & { - areCameraSettingsUniform: { __typename?: 'AreCameraSettingsUniformResult' } & Pick; -}; + +export type AreCameraSettingsUniformQuery = ( + { __typename?: 'Query' } + & { areCameraSettingsUniform: ( + { __typename?: 'AreCameraSettingsUniformResult' } + & Pick + ) } +); export type GetLicenseQueryVariables = Exact<{ - input: GetLicenseInput; + input: GetLicenseInput; }>; -export type GetLicenseQuery = { __typename?: 'Query' } & { - getLicense: { __typename?: 'GetLicenseResult' } & { License?: Maybe<{ __typename?: 'License' } & Pick> }; -}; + +export type GetLicenseQuery = ( + { __typename?: 'Query' } + & { getLicense: ( + { __typename?: 'GetLicenseResult' } + & { License?: Maybe<( + { __typename?: 'License' } + & Pick + )> } + ) } +); export type GetModelQueryVariables = Exact<{ - input: GetModelInput; + input: GetModelInput; }>; -export type GetModelQuery = { __typename?: 'Query' } & { getModel: { __typename?: 'GetModelResult' } & { Model?: Maybe<{ __typename?: 'Model' } & Pick> } }; -export type GetFilterViewDataQueryVariables = Exact<{ [key: string]: never }>; +export type GetModelQuery = ( + { __typename?: 'Query' } + & { getModel: ( + { __typename?: 'GetModelResult' } + & { Model?: Maybe<( + { __typename?: 'Model' } + & Pick + )> } + ) } +); + +export type GetModelConstellationQueryVariables = Exact<{ + input: GetModelConstellationInput; +}>; -export type GetFilterViewDataQuery = { __typename?: 'Query' } & { - getFilterViewData: { __typename?: 'GetFilterViewDataResult' } & { - units: Array<{ __typename?: 'Unit' } & Pick & { SystemObject?: Maybe<{ __typename?: 'SystemObject' } & Pick> }>; - projects: Array< - { __typename?: 'Project' } & Pick & { SystemObject?: Maybe<{ __typename?: 'SystemObject' } & Pick> } - >; - }; -}; + +export type GetModelConstellationQuery = ( + { __typename?: 'Query' } + & { getModelConstellation: ( + { __typename?: 'GetModelConstellationResult' } + & { ModelConstellation?: Maybe<( + { __typename?: 'ModelConstellation' } + & { Model: ( + { __typename?: 'Model' } + & Pick + & { VCreationMethod?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )>, VModality?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )>, VPurpose?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )>, VUnits?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )>, VFileType?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )> } + ), ModelObjects?: Maybe + )>>, ModelMaterials?: Maybe + )>>, ModelMaterialChannels?: Maybe + & { VMaterialType?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )> } + )>>, ModelMaterialUVMaps?: Maybe + )>>, ModelObjectModelMaterialXref?: Maybe + )>>, ModelAssets?: Maybe + & { AssetVersion: ( + { __typename?: 'AssetVersion' } + & Pick + ) } + )>> } + )> } + ) } +); + +export type GetFilterViewDataQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetFilterViewDataQuery = ( + { __typename?: 'Query' } + & { getFilterViewData: ( + { __typename?: 'GetFilterViewDataResult' } + & { units: Array<( + { __typename?: 'Unit' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )>, projects: Array<( + { __typename?: 'Project' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type GetObjectChildrenQueryVariables = Exact<{ - input: GetObjectChildrenInput; + input: GetObjectChildrenInput; }>; -export type GetObjectChildrenQuery = { __typename?: 'Query' } & { - getObjectChildren: { __typename?: 'GetObjectChildrenResult' } & Pick & { - entries: Array<{ __typename?: 'NavigationResultEntry' } & Pick>; - }; -}; + +export type GetObjectChildrenQuery = ( + { __typename?: 'Query' } + & { getObjectChildren: ( + { __typename?: 'GetObjectChildrenResult' } + & Pick + & { entries: Array<( + { __typename?: 'NavigationResultEntry' } + & Pick + )> } + ) } +); export type GetIntermediaryFileQueryVariables = Exact<{ - input: GetIntermediaryFileInput; + input: GetIntermediaryFileInput; }>; -export type GetIntermediaryFileQuery = { __typename?: 'Query' } & { - getIntermediaryFile: { __typename?: 'GetIntermediaryFileResult' } & { - IntermediaryFile?: Maybe<{ __typename?: 'IntermediaryFile' } & Pick>; - }; -}; + +export type GetIntermediaryFileQuery = ( + { __typename?: 'Query' } + & { getIntermediaryFile: ( + { __typename?: 'GetIntermediaryFileResult' } + & { IntermediaryFile?: Maybe<( + { __typename?: 'IntermediaryFile' } + & Pick + )> } + ) } +); export type GetSceneQueryVariables = Exact<{ - input: GetSceneInput; + input: GetSceneInput; }>; -export type GetSceneQuery = { __typename?: 'Query' } & { getScene: { __typename?: 'GetSceneResult' } & { Scene?: Maybe<{ __typename?: 'Scene' } & Pick> } }; + +export type GetSceneQuery = ( + { __typename?: 'Query' } + & { getScene: ( + { __typename?: 'GetSceneResult' } + & { Scene?: Maybe<( + { __typename?: 'Scene' } + & Pick + )> } + ) } +); export type GetAssetDetailsForSystemObjectQueryVariables = Exact<{ - input: GetAssetDetailsForSystemObjectInput; + input: GetAssetDetailsForSystemObjectInput; }>; -export type GetAssetDetailsForSystemObjectQuery = { __typename?: 'Query' } & { - getAssetDetailsForSystemObject: { __typename?: 'GetAssetDetailsForSystemObjectResult' } & { - assetDetails: Array<{ __typename?: 'AssetDetail' } & Pick>; - }; -}; + +export type GetAssetDetailsForSystemObjectQuery = ( + { __typename?: 'Query' } + & { getAssetDetailsForSystemObject: ( + { __typename?: 'GetAssetDetailsForSystemObjectResult' } + & { assetDetails: Array<( + { __typename?: 'AssetDetail' } + & Pick + )> } + ) } +); export type GetDetailsTabDataForObjectQueryVariables = Exact<{ - input: GetDetailsTabDataForObjectInput; + input: GetDetailsTabDataForObjectInput; +}>; + + +export type GetDetailsTabDataForObjectQuery = ( + { __typename?: 'Query' } + & { getDetailsTabDataForObject: ( + { __typename?: 'GetDetailsTabDataForObjectResult' } + & { Unit?: Maybe<( + { __typename?: 'UnitDetailFields' } + & Pick + )>, Project?: Maybe<( + { __typename?: 'ProjectDetailFields' } + & Pick + )>, Subject?: Maybe<( + { __typename?: 'SubjectDetailFields' } + & Pick + )>, Item?: Maybe<( + { __typename?: 'ItemDetailFields' } + & Pick + )>, CaptureData?: Maybe<( + { __typename?: 'CaptureDataDetailFields' } + & Pick + & { folders: Array<( + { __typename?: 'IngestFolder' } + & Pick + )> } + )>, Model?: Maybe<( + { __typename?: 'ModelConstellation' } + & { Model: ( + { __typename?: 'Model' } + & Pick + ), ModelObjects?: Maybe + )>>, ModelMaterials?: Maybe + )>>, ModelMaterialChannels?: Maybe + )>>, ModelObjectModelMaterialXref?: Maybe + )>>, ModelAssets?: Maybe + )>> } + )>, Scene?: Maybe<( + { __typename?: 'SceneDetailFields' } + & Pick + )>, IntermediaryFile?: Maybe<( + { __typename?: 'IntermediaryFileDetailFields' } + & Pick + )>, ProjectDocumentation?: Maybe<( + { __typename?: 'ProjectDocumentationDetailFields' } + & Pick + )>, Asset?: Maybe<( + { __typename?: 'AssetDetailFields' } + & Pick + )>, AssetVersion?: Maybe<( + { __typename?: 'AssetVersionDetailFields' } + & Pick + )>, Actor?: Maybe<( + { __typename?: 'ActorDetailFields' } + & Pick + )>, Stakeholder?: Maybe<( + { __typename?: 'StakeholderDetailFields' } + & Pick + )> } + ) } +); + +export type GetProjectListQueryVariables = Exact<{ + input: GetProjectListInput; }>; -export type GetDetailsTabDataForObjectQuery = { __typename?: 'Query' } & { - getDetailsTabDataForObject: { __typename?: 'GetDetailsTabDataForObjectResult' } & { - Unit?: Maybe<{ __typename?: 'UnitDetailFields' } & Pick>; - Project?: Maybe<{ __typename?: 'ProjectDetailFields' } & Pick>; - Subject?: Maybe< - { __typename?: 'SubjectDetailFields' } & Pick - >; - Item?: Maybe< - { __typename?: 'ItemDetailFields' } & Pick< - ItemDetailFields, - 'EntireSubject' | 'Altitude' | 'Latitude' | 'Longitude' | 'R0' | 'R1' | 'R2' | 'R3' | 'TS0' | 'TS1' | 'TS2' - > - >; - CaptureData?: Maybe< - { __typename?: 'CaptureDataDetailFields' } & Pick< - CaptureDataDetailFields, - | 'captureMethod' - | 'dateCaptured' - | 'datasetType' - | 'description' - | 'cameraSettingUniform' - | 'datasetFieldId' - | 'itemPositionType' - | 'itemPositionFieldId' - | 'itemArrangementFieldId' - | 'focusType' - | 'lightsourceType' - | 'backgroundRemovalMethod' - | 'clusterType' - | 'clusterGeometryFieldId' - > & { folders: Array<{ __typename?: 'IngestFolder' } & Pick> } - >; - Model?: Maybe< - { __typename?: 'ModelDetailFields' } & Pick< - ModelDetailFields, - | 'size' - | 'master' - | 'authoritative' - | 'creationMethod' - | 'modality' - | 'purpose' - | 'units' - | 'modelFileType' - | 'dateCaptured' - | 'boundingBoxP1X' - | 'boundingBoxP1Y' - | 'boundingBoxP1Z' - | 'boundingBoxP2X' - | 'boundingBoxP2Y' - | 'boundingBoxP2Z' - | 'countPoint' - | 'countFace' - | 'countColorChannel' - | 'countTextureCoorinateChannel' - | 'hasBones' - | 'hasFaceNormals' - | 'hasTangents' - | 'hasTextureCoordinates' - | 'hasVertexNormals' - | 'hasVertexColor' - | 'isManifold' - | 'isWatertight' - > & { uvMaps: Array<{ __typename?: 'IngestUVMap' } & Pick> } - >; - Scene?: Maybe<{ __typename?: 'SceneDetailFields' } & Pick>; - IntermediaryFile?: Maybe<{ __typename?: 'IntermediaryFileDetailFields' } & Pick>; - ProjectDocumentation?: Maybe<{ __typename?: 'ProjectDocumentationDetailFields' } & Pick>; - Asset?: Maybe<{ __typename?: 'AssetDetailFields' } & Pick>; - AssetVersion?: Maybe<{ __typename?: 'AssetVersionDetailFields' } & Pick>; - Actor?: Maybe<{ __typename?: 'ActorDetailFields' } & Pick>; - Stakeholder?: Maybe< - { __typename?: 'StakeholderDetailFields' } & Pick< - StakeholderDetailFields, - 'OrganizationName' | 'EmailAddress' | 'PhoneNumberMobile' | 'PhoneNumberOffice' | 'MailingAddress' - > - >; - }; -}; + +export type GetProjectListQuery = ( + { __typename?: 'Query' } + & { getProjectList: ( + { __typename?: 'GetProjectListResult' } + & { projects: Array<( + { __typename?: 'Project' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type GetSourceObjectIdentiferQueryVariables = Exact<{ - input: GetSourceObjectIdentiferInput; + input: GetSourceObjectIdentiferInput; }>; -export type GetSourceObjectIdentiferQuery = { __typename?: 'Query' } & { - getSourceObjectIdentifer: { __typename?: 'GetSourceObjectIdentiferResult' } & { - sourceObjectIdentifiers: Array<{ __typename?: 'SourceObjectIdentifier' } & Pick>; - }; -}; + +export type GetSourceObjectIdentiferQuery = ( + { __typename?: 'Query' } + & { getSourceObjectIdentifer: ( + { __typename?: 'GetSourceObjectIdentiferResult' } + & { sourceObjectIdentifiers: Array<( + { __typename?: 'SourceObjectIdentifier' } + & Pick + )> } + ) } +); export type GetSystemObjectDetailsQueryVariables = Exact<{ - input: GetSystemObjectDetailsInput; + input: GetSystemObjectDetailsInput; }>; -export type GetSystemObjectDetailsQuery = { __typename?: 'Query' } & { - getSystemObjectDetails: { __typename?: 'GetSystemObjectDetailsResult' } & Pick< - GetSystemObjectDetailsResult, - 'idObject' | 'name' | 'retired' | 'objectType' | 'allowed' | 'publishedState' | 'thumbnail' - > & { - identifiers: Array<{ __typename?: 'IngestIdentifier' } & Pick>; - unit?: Maybe<{ __typename?: 'RepositoryPath' } & Pick>; - project?: Maybe<{ __typename?: 'RepositoryPath' } & Pick>; - subject?: Maybe<{ __typename?: 'RepositoryPath' } & Pick>; - item?: Maybe<{ __typename?: 'RepositoryPath' } & Pick>; - objectAncestors: Array>>; - sourceObjects: Array<{ __typename?: 'RelatedObject' } & Pick>; - derivedObjects: Array<{ __typename?: 'RelatedObject' } & Pick>; - }; -}; + +export type GetSystemObjectDetailsQuery = ( + { __typename?: 'Query' } + & { getSystemObjectDetails: ( + { __typename?: 'GetSystemObjectDetailsResult' } + & Pick + & { identifiers: Array<( + { __typename?: 'IngestIdentifier' } + & Pick + )>, unit?: Maybe<( + { __typename?: 'RepositoryPath' } + & Pick + )>, project?: Maybe<( + { __typename?: 'RepositoryPath' } + & Pick + )>, subject?: Maybe<( + { __typename?: 'RepositoryPath' } + & Pick + )>, item?: Maybe<( + { __typename?: 'RepositoryPath' } + & Pick + )>, objectAncestors: Array + )>>, sourceObjects: Array<( + { __typename?: 'RelatedObject' } + & Pick + )>, derivedObjects: Array<( + { __typename?: 'RelatedObject' } + & Pick + )> } + ) } +); export type GetVersionsForSystemObjectQueryVariables = Exact<{ - input: GetVersionsForSystemObjectInput; + input: GetVersionsForSystemObjectInput; }>; -export type GetVersionsForSystemObjectQuery = { __typename?: 'Query' } & { - getVersionsForSystemObject: { __typename?: 'GetVersionsForSystemObjectResult' } & { - versions: Array<{ __typename?: 'DetailVersion' } & Pick>; - }; -}; + +export type GetVersionsForSystemObjectQuery = ( + { __typename?: 'Query' } + & { getVersionsForSystemObject: ( + { __typename?: 'GetVersionsForSystemObjectResult' } + & { versions: Array<( + { __typename?: 'DetailVersion' } + & Pick + )> } + ) } +); export type GetIngestionItemsForSubjectsQueryVariables = Exact<{ - input: GetIngestionItemsForSubjectsInput; + input: GetIngestionItemsForSubjectsInput; }>; -export type GetIngestionItemsForSubjectsQuery = { __typename?: 'Query' } & { - getIngestionItemsForSubjects: { __typename?: 'GetIngestionItemsForSubjectsResult' } & { - Item: Array<{ __typename?: 'Item' } & Pick>; - }; -}; + +export type GetIngestionItemsForSubjectsQuery = ( + { __typename?: 'Query' } + & { getIngestionItemsForSubjects: ( + { __typename?: 'GetIngestionItemsForSubjectsResult' } + & { Item: Array<( + { __typename?: 'Item' } + & Pick + )> } + ) } +); export type GetIngestionProjectsForSubjectsQueryVariables = Exact<{ - input: GetIngestionProjectsForSubjectsInput; + input: GetIngestionProjectsForSubjectsInput; }>; -export type GetIngestionProjectsForSubjectsQuery = { __typename?: 'Query' } & { - getIngestionProjectsForSubjects: { __typename?: 'GetIngestionProjectsForSubjectsResult' } & { - Project: Array<{ __typename?: 'Project' } & Pick>; - }; -}; + +export type GetIngestionProjectsForSubjectsQuery = ( + { __typename?: 'Query' } + & { getIngestionProjectsForSubjects: ( + { __typename?: 'GetIngestionProjectsForSubjectsResult' } + & { Project: Array<( + { __typename?: 'Project' } + & Pick + )> } + ) } +); export type GetItemQueryVariables = Exact<{ - input: GetItemInput; + input: GetItemInput; }>; -export type GetItemQuery = { __typename?: 'Query' } & { getItem: { __typename?: 'GetItemResult' } & { Item?: Maybe<{ __typename?: 'Item' } & Pick> } }; + +export type GetItemQuery = ( + { __typename?: 'Query' } + & { getItem: ( + { __typename?: 'GetItemResult' } + & { Item?: Maybe<( + { __typename?: 'Item' } + & Pick + )> } + ) } +); export type GetItemsForSubjectQueryVariables = Exact<{ - input: GetItemsForSubjectInput; + input: GetItemsForSubjectInput; }>; -export type GetItemsForSubjectQuery = { __typename?: 'Query' } & { - getItemsForSubject: { __typename?: 'GetItemsForSubjectResult' } & { Item: Array<{ __typename?: 'Item' } & Pick> }; -}; + +export type GetItemsForSubjectQuery = ( + { __typename?: 'Query' } + & { getItemsForSubject: ( + { __typename?: 'GetItemsForSubjectResult' } + & { Item: Array<( + { __typename?: 'Item' } + & Pick + )> } + ) } +); export type GetObjectsForItemQueryVariables = Exact<{ - input: GetObjectsForItemInput; + input: GetObjectsForItemInput; }>; -export type GetObjectsForItemQuery = { __typename?: 'Query' } & { - getObjectsForItem: { __typename?: 'GetObjectsForItemResult' } & { - CaptureData: Array<{ __typename?: 'CaptureData' } & Pick>; - Model: Array<{ __typename?: 'Model' } & Pick>; - Scene: Array<{ __typename?: 'Scene' } & Pick>; - IntermediaryFile: Array<{ __typename?: 'IntermediaryFile' } & Pick>; - ProjectDocumentation: Array<{ __typename?: 'ProjectDocumentation' } & Pick>; - }; -}; + +export type GetObjectsForItemQuery = ( + { __typename?: 'Query' } + & { getObjectsForItem: ( + { __typename?: 'GetObjectsForItemResult' } + & { CaptureData: Array<( + { __typename?: 'CaptureData' } + & Pick + )>, Model: Array<( + { __typename?: 'Model' } + & Pick + )>, Scene: Array<( + { __typename?: 'Scene' } + & Pick + )>, IntermediaryFile: Array<( + { __typename?: 'IntermediaryFile' } + & Pick + )>, ProjectDocumentation: Array<( + { __typename?: 'ProjectDocumentation' } + & Pick + )> } + ) } +); export type GetProjectQueryVariables = Exact<{ - input: GetProjectInput; + input: GetProjectInput; }>; -export type GetProjectQuery = { __typename?: 'Query' } & { - getProject: { __typename?: 'GetProjectResult' } & { Project?: Maybe<{ __typename?: 'Project' } & Pick> }; -}; + +export type GetProjectQuery = ( + { __typename?: 'Query' } + & { getProject: ( + { __typename?: 'GetProjectResult' } + & { Project?: Maybe<( + { __typename?: 'Project' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type GetProjectDocumentationQueryVariables = Exact<{ - input: GetProjectDocumentationInput; + input: GetProjectDocumentationInput; }>; -export type GetProjectDocumentationQuery = { __typename?: 'Query' } & { - getProjectDocumentation: { __typename?: 'GetProjectDocumentationResult' } & { - ProjectDocumentation?: Maybe<{ __typename?: 'ProjectDocumentation' } & Pick>; - }; -}; + +export type GetProjectDocumentationQuery = ( + { __typename?: 'Query' } + & { getProjectDocumentation: ( + { __typename?: 'GetProjectDocumentationResult' } + & { ProjectDocumentation?: Maybe<( + { __typename?: 'ProjectDocumentation' } + & Pick + )> } + ) } +); export type GetSubjectQueryVariables = Exact<{ - input: GetSubjectInput; + input: GetSubjectInput; }>; -export type GetSubjectQuery = { __typename?: 'Query' } & { - getSubject: { __typename?: 'GetSubjectResult' } & { Subject?: Maybe<{ __typename?: 'Subject' } & Pick> }; -}; + +export type GetSubjectQuery = ( + { __typename?: 'Query' } + & { getSubject: ( + { __typename?: 'GetSubjectResult' } + & { Subject?: Maybe<( + { __typename?: 'Subject' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type GetSubjectsForUnitQueryVariables = Exact<{ - input: GetSubjectsForUnitInput; + input: GetSubjectsForUnitInput; }>; -export type GetSubjectsForUnitQuery = { __typename?: 'Query' } & { - getSubjectsForUnit: { __typename?: 'GetSubjectsForUnitResult' } & { Subject: Array<{ __typename?: 'Subject' } & Pick> }; -}; + +export type GetSubjectsForUnitQuery = ( + { __typename?: 'Query' } + & { getSubjectsForUnit: ( + { __typename?: 'GetSubjectsForUnitResult' } + & { Subject: Array<( + { __typename?: 'Subject' } + & Pick + )> } + ) } +); export type GetUnitQueryVariables = Exact<{ - input: GetUnitInput; + input: GetUnitInput; +}>; + + +export type GetUnitQuery = ( + { __typename?: 'Query' } + & { getUnit: ( + { __typename?: 'GetUnitResult' } + & { Unit?: Maybe<( + { __typename?: 'Unit' } + & Pick + )> } + ) } +); + +export type GetUnitsFromNameSearchQueryVariables = Exact<{ + input: GetUnitsFromNameSearchInput; }>; -export type GetUnitQuery = { __typename?: 'Query' } & { getUnit: { __typename?: 'GetUnitResult' } & { Unit?: Maybe<{ __typename?: 'Unit' } & Pick> } }; + +export type GetUnitsFromNameSearchQuery = ( + { __typename?: 'Query' } + & { getUnitsFromNameSearch: ( + { __typename?: 'GetUnitsFromNameSearchResult' } + & { Units: Array<( + { __typename?: 'Unit' } + & Pick + & { SystemObject?: Maybe<( + { __typename?: 'SystemObject' } + & Pick + )> } + )> } + ) } +); export type SearchIngestionSubjectsQueryVariables = Exact<{ - input: SearchIngestionSubjectsInput; + input: SearchIngestionSubjectsInput; }>; -export type SearchIngestionSubjectsQuery = { __typename?: 'Query' } & { - searchIngestionSubjects: { __typename?: 'SearchIngestionSubjectsResult' } & { - SubjectUnitIdentifier: Array< - { __typename?: 'SubjectUnitIdentifier' } & Pick - >; - }; -}; -export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never }>; +export type SearchIngestionSubjectsQuery = ( + { __typename?: 'Query' } + & { searchIngestionSubjects: ( + { __typename?: 'SearchIngestionSubjectsResult' } + & { SubjectUnitIdentifier: Array<( + { __typename?: 'SubjectUnitIdentifier' } + & Pick + )> } + ) } +); -export type GetCurrentUserQuery = { __typename?: 'Query' } & { - getCurrentUser: { __typename?: 'GetCurrentUserResult' } & { - User?: Maybe< - { __typename?: 'User' } & Pick< - User, - 'idUser' | 'Name' | 'Active' | 'DateActivated' | 'DateDisabled' | 'EmailAddress' | 'EmailSettings' | 'SecurityID' | 'WorkflowNotificationTime' - > - >; - }; -}; +export type GetAllUsersQueryVariables = Exact<{ + input: GetAllUsersInput; +}>; + + +export type GetAllUsersQuery = ( + { __typename?: 'Query' } + & { getAllUsers: ( + { __typename?: 'GetAllUsersResult' } + & { User: Array<( + { __typename?: 'User' } + & Pick + )> } + ) } +); + +export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>; + + +export type GetCurrentUserQuery = ( + { __typename?: 'Query' } + & { getCurrentUser: ( + { __typename?: 'GetCurrentUserResult' } + & { User?: Maybe<( + { __typename?: 'User' } + & Pick + )> } + ) } +); export type GetUserQueryVariables = Exact<{ - input: GetUserInput; + input: GetUserInput; }>; -export type GetUserQuery = { __typename?: 'Query' } & { - getUser: { __typename?: 'GetUserResult' } & { User?: Maybe<{ __typename?: 'User' } & Pick> }; -}; + +export type GetUserQuery = ( + { __typename?: 'Query' } + & { getUser: ( + { __typename?: 'GetUserResult' } + & { User?: Maybe<( + { __typename?: 'User' } + & Pick + )> } + ) } +); export type GetVocabularyQueryVariables = Exact<{ - input: GetVocabularyInput; + input: GetVocabularyInput; }>; -export type GetVocabularyQuery = { __typename?: 'Query' } & { - getVocabulary: { __typename?: 'GetVocabularyResult' } & { Vocabulary?: Maybe<{ __typename?: 'Vocabulary' } & Pick> }; -}; + +export type GetVocabularyQuery = ( + { __typename?: 'Query' } + & { getVocabulary: ( + { __typename?: 'GetVocabularyResult' } + & { Vocabulary?: Maybe<( + { __typename?: 'Vocabulary' } + & Pick + )> } + ) } +); export type GetVocabularyEntriesQueryVariables = Exact<{ - input: GetVocabularyEntriesInput; + input: GetVocabularyEntriesInput; }>; -export type GetVocabularyEntriesQuery = { __typename?: 'Query' } & { - getVocabularyEntries: { __typename?: 'GetVocabularyEntriesResult' } & { - VocabularyEntries: Array< - { __typename?: 'VocabularyEntry' } & Pick & { - Vocabulary: Array<{ __typename?: 'Vocabulary' } & Pick>; - } - >; - }; -}; + +export type GetVocabularyEntriesQuery = ( + { __typename?: 'Query' } + & { getVocabularyEntries: ( + { __typename?: 'GetVocabularyEntriesResult' } + & { VocabularyEntries: Array<( + { __typename?: 'VocabularyEntry' } + & Pick + & { Vocabulary: Array<( + { __typename?: 'Vocabulary' } + & Pick + )> } + )> } + ) } +); export type GetWorkflowQueryVariables = Exact<{ - input: GetWorkflowInput; + input: GetWorkflowInput; }>; -export type GetWorkflowQuery = { __typename?: 'Query' } & { - getWorkflow: { __typename?: 'GetWorkflowResult' } & { Workflow?: Maybe<{ __typename?: 'Workflow' } & Pick> }; -}; + +export type GetWorkflowQuery = ( + { __typename?: 'Query' } + & { getWorkflow: ( + { __typename?: 'GetWorkflowResult' } + & { Workflow?: Maybe<( + { __typename?: 'Workflow' } + & Pick + )> } + ) } +); + export const DiscardUploadedAssetVersionsDocument = gql` mutation discardUploadedAssetVersions($input: DiscardUploadedAssetVersionsInput!) { - discardUploadedAssetVersions(input: $input) { - success - } - } -`; + discardUploadedAssetVersions(input: $input) { + success + } +} + `; export type DiscardUploadedAssetVersionsMutationFn = Apollo.MutationFunction; /** @@ -2645,23 +3235,22 @@ export type DiscardUploadedAssetVersionsMutationFn = Apollo.MutationFunction -) { - return Apollo.useMutation(DiscardUploadedAssetVersionsDocument, baseOptions); -} +export function useDiscardUploadedAssetVersionsMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(DiscardUploadedAssetVersionsDocument, options); + } export type DiscardUploadedAssetVersionsMutationHookResult = ReturnType; export type DiscardUploadedAssetVersionsMutationResult = Apollo.MutationResult; export type DiscardUploadedAssetVersionsMutationOptions = Apollo.BaseMutationOptions; export const UploadAssetDocument = gql` mutation uploadAsset($file: Upload!, $type: Int!) { - uploadAsset(file: $file, type: $type) { - status - idAssetVersions - error - } - } -`; + uploadAsset(file: $file, type: $type) { + status + idAssetVersions + error + } +} + `; export type UploadAssetMutationFn = Apollo.MutationFunction; /** @@ -2683,20 +3272,21 @@ export type UploadAssetMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(UploadAssetDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UploadAssetDocument, options); + } export type UploadAssetMutationHookResult = ReturnType; export type UploadAssetMutationResult = Apollo.MutationResult; export type UploadAssetMutationOptions = Apollo.BaseMutationOptions; export const CreateCaptureDataDocument = gql` mutation createCaptureData($input: CreateCaptureDataInput!) { - createCaptureData(input: $input) { - CaptureData { - idCaptureData - } - } + createCaptureData(input: $input) { + CaptureData { + idCaptureData } -`; + } +} + `; export type CreateCaptureDataMutationFn = Apollo.MutationFunction; /** @@ -2717,20 +3307,21 @@ export type CreateCaptureDataMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateCaptureDataDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateCaptureDataDocument, options); + } export type CreateCaptureDataMutationHookResult = ReturnType; export type CreateCaptureDataMutationResult = Apollo.MutationResult; export type CreateCaptureDataMutationOptions = Apollo.BaseMutationOptions; export const CreateCaptureDataPhotoDocument = gql` mutation createCaptureDataPhoto($input: CreateCaptureDataPhotoInput!) { - createCaptureDataPhoto(input: $input) { - CaptureDataPhoto { - idCaptureDataPhoto - } - } + createCaptureDataPhoto(input: $input) { + CaptureDataPhoto { + idCaptureDataPhoto } -`; + } +} + `; export type CreateCaptureDataPhotoMutationFn = Apollo.MutationFunction; /** @@ -2751,18 +3342,19 @@ export type CreateCaptureDataPhotoMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateCaptureDataPhotoDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateCaptureDataPhotoDocument, options); + } export type CreateCaptureDataPhotoMutationHookResult = ReturnType; export type CreateCaptureDataPhotoMutationResult = Apollo.MutationResult; export type CreateCaptureDataPhotoMutationOptions = Apollo.BaseMutationOptions; export const IngestDataDocument = gql` mutation ingestData($input: IngestDataInput!) { - ingestData(input: $input) { - success - } - } -`; + ingestData(input: $input) { + success + } +} + `; export type IngestDataMutationFn = Apollo.MutationFunction; /** @@ -2783,54 +3375,21 @@ export type IngestDataMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(IngestDataDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(IngestDataDocument, options); + } export type IngestDataMutationHookResult = ReturnType; export type IngestDataMutationResult = Apollo.MutationResult; export type IngestDataMutationOptions = Apollo.BaseMutationOptions; -export const CreateModelDocument = gql` - mutation createModel($input: CreateModelInput!) { - createModel(input: $input) { - Model { - idModel - } - } - } -`; -export type CreateModelMutationFn = Apollo.MutationFunction; - -/** - * __useCreateModelMutation__ - * - * To run a mutation, you first call `useCreateModelMutation` within a React component and pass it any options that fit your needs. - * When your component renders, `useCreateModelMutation` returns a tuple that includes: - * - A mutate function that you can call at any time to execute the mutation - * - An object with fields that represent the current status of the mutation's execution - * - * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; - * - * @example - * const [createModelMutation, { data, loading, error }] = useCreateModelMutation({ - * variables: { - * input: // value for 'input' - * }, - * }); - */ -export function useCreateModelMutation(baseOptions?: Apollo.MutationHookOptions) { - return Apollo.useMutation(CreateModelDocument, baseOptions); -} -export type CreateModelMutationHookResult = ReturnType; -export type CreateModelMutationResult = Apollo.MutationResult; -export type CreateModelMutationOptions = Apollo.BaseMutationOptions; export const CreateSceneDocument = gql` mutation createScene($input: CreateSceneInput!) { - createScene(input: $input) { - Scene { - idScene - } - } + createScene(input: $input) { + Scene { + idScene } -`; + } +} + `; export type CreateSceneMutationFn = Apollo.MutationFunction; /** @@ -2851,18 +3410,19 @@ export type CreateSceneMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateSceneDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateSceneDocument, options); + } export type CreateSceneMutationHookResult = ReturnType; export type CreateSceneMutationResult = Apollo.MutationResult; export type CreateSceneMutationOptions = Apollo.BaseMutationOptions; export const UpdateObjectDetailsDocument = gql` mutation updateObjectDetails($input: UpdateObjectDetailsInput!) { - updateObjectDetails(input: $input) { - success - } - } -`; + updateObjectDetails(input: $input) { + success + } +} + `; export type UpdateObjectDetailsMutationFn = Apollo.MutationFunction; /** @@ -2883,20 +3443,21 @@ export type UpdateObjectDetailsMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(UpdateObjectDetailsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateObjectDetailsDocument, options); + } export type UpdateObjectDetailsMutationHookResult = ReturnType; export type UpdateObjectDetailsMutationResult = Apollo.MutationResult; export type UpdateObjectDetailsMutationOptions = Apollo.BaseMutationOptions; export const CreateItemDocument = gql` mutation createItem($input: CreateItemInput!) { - createItem(input: $input) { - Item { - idItem - } - } + createItem(input: $input) { + Item { + idItem } -`; + } +} + `; export type CreateItemMutationFn = Apollo.MutationFunction; /** @@ -2917,20 +3478,24 @@ export type CreateItemMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateItemDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateItemDocument, options); + } export type CreateItemMutationHookResult = ReturnType; export type CreateItemMutationResult = Apollo.MutationResult; export type CreateItemMutationOptions = Apollo.BaseMutationOptions; export const CreateProjectDocument = gql` mutation createProject($input: CreateProjectInput!) { - createProject(input: $input) { - Project { - idProject - } - } + createProject(input: $input) { + Project { + idProject + SystemObject { + idSystemObject + } } -`; + } +} + `; export type CreateProjectMutationFn = Apollo.MutationFunction; /** @@ -2951,20 +3516,21 @@ export type CreateProjectMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateProjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateProjectDocument, options); + } export type CreateProjectMutationHookResult = ReturnType; export type CreateProjectMutationResult = Apollo.MutationResult; export type CreateProjectMutationOptions = Apollo.BaseMutationOptions; export const CreateSubjectDocument = gql` mutation createSubject($input: CreateSubjectInput!) { - createSubject(input: $input) { - Subject { - idSubject - } - } + createSubject(input: $input) { + Subject { + idSubject } -`; + } +} + `; export type CreateSubjectMutationFn = Apollo.MutationFunction; /** @@ -2985,20 +3551,24 @@ export type CreateSubjectMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateSubjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateSubjectDocument, options); + } export type CreateSubjectMutationHookResult = ReturnType; export type CreateSubjectMutationResult = Apollo.MutationResult; export type CreateSubjectMutationOptions = Apollo.BaseMutationOptions; export const CreateUnitDocument = gql` mutation createUnit($input: CreateUnitInput!) { - createUnit(input: $input) { - Unit { - idUnit - } - } + createUnit(input: $input) { + Unit { + idUnit + SystemObject { + idSystemObject + } } -`; + } +} + `; export type CreateUnitMutationFn = Apollo.MutationFunction; /** @@ -3019,23 +3589,26 @@ export type CreateUnitMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateUnitDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateUnitDocument, options); + } export type CreateUnitMutationHookResult = ReturnType; export type CreateUnitMutationResult = Apollo.MutationResult; export type CreateUnitMutationOptions = Apollo.BaseMutationOptions; export const CreateUserDocument = gql` mutation createUser($input: CreateUserInput!) { - createUser(input: $input) { - User { - idUser - Name - Active - DateActivated - } - } + createUser(input: $input) { + User { + idUser + Name + Active + DateActivated + WorkflowNotificationTime + EmailSettings } -`; + } +} + `; export type CreateUserMutationFn = Apollo.MutationFunction; /** @@ -3056,20 +3629,63 @@ export type CreateUserMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateUserDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateUserDocument, options); + } export type CreateUserMutationHookResult = ReturnType; export type CreateUserMutationResult = Apollo.MutationResult; export type CreateUserMutationOptions = Apollo.BaseMutationOptions; +export const UpdateUserDocument = gql` + mutation updateUser($input: UpdateUserInput!) { + updateUser(input: $input) { + User { + idUser + EmailAddress + Name + Active + DateActivated + DateDisabled + EmailSettings + WorkflowNotificationTime + } + } +} + `; +export type UpdateUserMutationFn = Apollo.MutationFunction; + +/** + * __useUpdateUserMutation__ + * + * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUpdateUserMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUpdateUserMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UpdateUserDocument, options); + } +export type UpdateUserMutationHookResult = ReturnType; +export type UpdateUserMutationResult = Apollo.MutationResult; +export type UpdateUserMutationOptions = Apollo.BaseMutationOptions; export const CreateVocabularyDocument = gql` mutation createVocabulary($input: CreateVocabularyInput!) { - createVocabulary(input: $input) { - Vocabulary { - idVocabulary - } - } + createVocabulary(input: $input) { + Vocabulary { + idVocabulary } -`; + } +} + `; export type CreateVocabularyMutationFn = Apollo.MutationFunction; /** @@ -3090,20 +3706,21 @@ export type CreateVocabularyMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateVocabularyDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateVocabularyDocument, options); + } export type CreateVocabularyMutationHookResult = ReturnType; export type CreateVocabularyMutationResult = Apollo.MutationResult; export type CreateVocabularyMutationOptions = Apollo.BaseMutationOptions; export const CreateVocabularySetDocument = gql` mutation createVocabularySet($input: CreateVocabularySetInput!) { - createVocabularySet(input: $input) { - VocabularySet { - idVocabularySet - } - } + createVocabularySet(input: $input) { + VocabularySet { + idVocabularySet } -`; + } +} + `; export type CreateVocabularySetMutationFn = Apollo.MutationFunction; /** @@ -3124,20 +3741,21 @@ export type CreateVocabularySetMutationFn = Apollo.MutationFunction) { - return Apollo.useMutation(CreateVocabularySetDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(CreateVocabularySetDocument, options); + } export type CreateVocabularySetMutationHookResult = ReturnType; export type CreateVocabularySetMutationResult = Apollo.MutationResult; export type CreateVocabularySetMutationOptions = Apollo.BaseMutationOptions; export const GetAccessPolicyDocument = gql` query getAccessPolicy($input: GetAccessPolicyInput!) { - getAccessPolicy(input: $input) { - AccessPolicy { - idAccessPolicy - } - } + getAccessPolicy(input: $input) { + AccessPolicy { + idAccessPolicy } -`; + } +} + `; /** * __useGetAccessPolicyQuery__ @@ -3155,24 +3773,26 @@ export const GetAccessPolicyDocument = gql` * }, * }); */ -export function useGetAccessPolicyQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetAccessPolicyDocument, baseOptions); -} +export function useGetAccessPolicyQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetAccessPolicyDocument, options); + } export function useGetAccessPolicyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetAccessPolicyDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetAccessPolicyDocument, options); + } export type GetAccessPolicyQueryHookResult = ReturnType; export type GetAccessPolicyLazyQueryHookResult = ReturnType; export type GetAccessPolicyQueryResult = Apollo.QueryResult; export const GetAssetDocument = gql` query getAsset($input: GetAssetInput!) { - getAsset(input: $input) { - Asset { - idAsset - } - } + getAsset(input: $input) { + Asset { + idAsset } -`; + } +} + `; /** * __useGetAssetQuery__ @@ -3190,110 +3810,94 @@ export const GetAssetDocument = gql` * }, * }); */ -export function useGetAssetQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetAssetDocument, baseOptions); -} +export function useGetAssetQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetAssetDocument, options); + } export function useGetAssetLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetAssetDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetAssetDocument, options); + } export type GetAssetQueryHookResult = ReturnType; export type GetAssetLazyQueryHookResult = ReturnType; export type GetAssetQueryResult = Apollo.QueryResult; export const GetAssetVersionsDetailsDocument = gql` query getAssetVersionsDetails($input: GetAssetVersionsDetailsInput!) { - getAssetVersionsDetails(input: $input) { - valid - Details { - idAssetVersion - SubjectUnitIdentifier { - idSubject - SubjectName - UnitAbbreviation - IdentifierPublic - IdentifierCollection - } - Project { - idProject - Name - } - Item { - idItem - Name - EntireSubject - } - CaptureDataPhoto { - idAssetVersion - dateCaptured - datasetType - systemCreated - description - cameraSettingUniform - datasetFieldId - itemPositionType - itemPositionFieldId - itemArrangementFieldId - focusType - lightsourceType - backgroundRemovalMethod - clusterType - clusterGeometryFieldId - directory - folders { - name - variantType - } - identifiers { - identifier - identifierType - } - } - Model { - idAssetVersion - systemCreated - master - authoritative - creationMethod - modality - purpose - units - dateCaptured - modelFileType - directory - identifiers { - identifier - identifierType - } - uvMaps { - name - edgeLength - mapType - } - roughness - metalness - pointCount - faceCount - isWatertight - hasNormals - hasVertexColor - hasUVSpace - boundingBoxP1X - boundingBoxP1Y - boundingBoxP1Z - boundingBoxP2X - boundingBoxP2Y - boundingBoxP2Z - } - Scene { - idAssetVersion - identifiers { - identifier - identifierType - } - } - } + getAssetVersionsDetails(input: $input) { + valid + Details { + idAssetVersion + SubjectUnitIdentifier { + idSubject + SubjectName + UnitAbbreviation + IdentifierPublic + IdentifierCollection + } + Project { + idProject + Name + } + Item { + idItem + Name + EntireSubject + } + CaptureDataPhoto { + idAssetVersion + dateCaptured + datasetType + systemCreated + description + cameraSettingUniform + datasetFieldId + itemPositionType + itemPositionFieldId + itemArrangementFieldId + focusType + lightsourceType + backgroundRemovalMethod + clusterType + clusterGeometryFieldId + directory + folders { + name + variantType + } + identifiers { + identifier + identifierType + } + } + Model { + idAssetVersion + systemCreated + name + master + authoritative + creationMethod + modality + purpose + units + dateCaptured + modelFileType + directory + identifiers { + identifier + identifierType + } + } + Scene { + idAssetVersion + identifiers { + identifier + identifierType } + } } -`; + } +} + `; /** * __useGetAssetVersionsDetailsQuery__ @@ -3311,26 +3915,28 @@ export const GetAssetVersionsDetailsDocument = gql` * }, * }); */ -export function useGetAssetVersionsDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetAssetVersionsDetailsDocument, baseOptions); -} +export function useGetAssetVersionsDetailsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetAssetVersionsDetailsDocument, options); + } export function useGetAssetVersionsDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetAssetVersionsDetailsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetAssetVersionsDetailsDocument, options); + } export type GetAssetVersionsDetailsQueryHookResult = ReturnType; export type GetAssetVersionsDetailsLazyQueryHookResult = ReturnType; export type GetAssetVersionsDetailsQueryResult = Apollo.QueryResult; export const GetContentsForAssetVersionsDocument = gql` query getContentsForAssetVersions($input: GetContentsForAssetVersionsInput!) { - getContentsForAssetVersions(input: $input) { - AssetVersionContent { - idAssetVersion - folders - all - } - } + getContentsForAssetVersions(input: $input) { + AssetVersionContent { + idAssetVersion + folders + all } -`; + } +} + `; /** * __useGetContentsForAssetVersionsQuery__ @@ -3348,34 +3954,133 @@ export const GetContentsForAssetVersionsDocument = gql` * }, * }); */ -export function useGetContentsForAssetVersionsQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetContentsForAssetVersionsDocument, baseOptions); -} +export function useGetContentsForAssetVersionsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetContentsForAssetVersionsDocument, options); + } export function useGetContentsForAssetVersionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetContentsForAssetVersionsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetContentsForAssetVersionsDocument, options); + } export type GetContentsForAssetVersionsQueryHookResult = ReturnType; export type GetContentsForAssetVersionsLazyQueryHookResult = ReturnType; export type GetContentsForAssetVersionsQueryResult = Apollo.QueryResult; +export const GetModelConstellationForAssetVersionDocument = gql` + query getModelConstellationForAssetVersion($input: GetModelConstellationForAssetVersionInput!) { + getModelConstellationForAssetVersion(input: $input) { + idAssetVersion + ModelConstellation { + Model { + idModel + CountVertices + CountFaces + CountAnimations + CountCameras + CountLights + CountMaterials + CountMeshes + CountEmbeddedTextures + CountLinkedTextures + FileEncoding + Name + idVFileType + } + ModelObjects { + idModelObject + BoundingBoxP1X + BoundingBoxP1Y + BoundingBoxP1Z + BoundingBoxP1Z + BoundingBoxP2X + BoundingBoxP2Y + BoundingBoxP2Z + CountVertices + CountFaces + CountColorChannels + CountTextureCoordinateChannels + HasBones + HasFaceNormals + HasTangents + HasTextureCoordinates + HasVertexNormals + HasVertexColor + IsTwoManifoldUnbounded + IsTwoManifoldBounded + IsWatertight + SelfIntersecting + } + ModelMaterials { + idModelMaterial + Name + } + ModelMaterialChannels { + Type + Source + Value + AdditionalAttributes + idModelMaterial + idModelMaterialChannel + } + ModelObjectModelMaterialXref { + idModelObjectModelMaterialXref + idModelObject + idModelMaterial + } + ModelAssets { + AssetName + AssetType + } + } + } +} + `; + +/** + * __useGetModelConstellationForAssetVersionQuery__ + * + * To run a query within a React component, call `useGetModelConstellationForAssetVersionQuery` and pass it any options that fit your needs. + * When your component renders, `useGetModelConstellationForAssetVersionQuery` 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 } = useGetModelConstellationForAssetVersionQuery({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGetModelConstellationForAssetVersionQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetModelConstellationForAssetVersionDocument, options); + } +export function useGetModelConstellationForAssetVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetModelConstellationForAssetVersionDocument, options); + } +export type GetModelConstellationForAssetVersionQueryHookResult = ReturnType; +export type GetModelConstellationForAssetVersionLazyQueryHookResult = ReturnType; +export type GetModelConstellationForAssetVersionQueryResult = Apollo.QueryResult; export const GetUploadedAssetVersionDocument = gql` query getUploadedAssetVersion { - getUploadedAssetVersion { - AssetVersion { - idAssetVersion - StorageSize - FileName - DateCreated - Asset { - idAsset - VAssetType { - idVocabulary - Term - } - } - } + getUploadedAssetVersion { + AssetVersion { + idAssetVersion + StorageSize + FileName + DateCreated + Asset { + idAsset + VAssetType { + idVocabulary + Term } + } } -`; + } +} + `; /** * __useGetUploadedAssetVersionQuery__ @@ -3393,23 +4098,25 @@ export const GetUploadedAssetVersionDocument = gql` * }); */ export function useGetUploadedAssetVersionQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetUploadedAssetVersionDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetUploadedAssetVersionDocument, options); + } export function useGetUploadedAssetVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetUploadedAssetVersionDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetUploadedAssetVersionDocument, options); + } export type GetUploadedAssetVersionQueryHookResult = ReturnType; export type GetUploadedAssetVersionLazyQueryHookResult = ReturnType; export type GetUploadedAssetVersionQueryResult = Apollo.QueryResult; export const GetCaptureDataDocument = gql` query getCaptureData($input: GetCaptureDataInput!) { - getCaptureData(input: $input) { - CaptureData { - idCaptureData - } - } + getCaptureData(input: $input) { + CaptureData { + idCaptureData } -`; + } +} + `; /** * __useGetCaptureDataQuery__ @@ -3427,24 +4134,26 @@ export const GetCaptureDataDocument = gql` * }, * }); */ -export function useGetCaptureDataQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetCaptureDataDocument, baseOptions); -} +export function useGetCaptureDataQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetCaptureDataDocument, options); + } export function useGetCaptureDataLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetCaptureDataDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetCaptureDataDocument, options); + } export type GetCaptureDataQueryHookResult = ReturnType; export type GetCaptureDataLazyQueryHookResult = ReturnType; export type GetCaptureDataQueryResult = Apollo.QueryResult; export const GetCaptureDataPhotoDocument = gql` query getCaptureDataPhoto($input: GetCaptureDataPhotoInput!) { - getCaptureDataPhoto(input: $input) { - CaptureDataPhoto { - idCaptureDataPhoto - } - } + getCaptureDataPhoto(input: $input) { + CaptureDataPhoto { + idCaptureDataPhoto } -`; + } +} + `; /** * __useGetCaptureDataPhotoQuery__ @@ -3462,22 +4171,24 @@ export const GetCaptureDataPhotoDocument = gql` * }, * }); */ -export function useGetCaptureDataPhotoQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetCaptureDataPhotoDocument, baseOptions); -} +export function useGetCaptureDataPhotoQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetCaptureDataPhotoDocument, options); + } export function useGetCaptureDataPhotoLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetCaptureDataPhotoDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetCaptureDataPhotoDocument, options); + } export type GetCaptureDataPhotoQueryHookResult = ReturnType; export type GetCaptureDataPhotoLazyQueryHookResult = ReturnType; export type GetCaptureDataPhotoQueryResult = Apollo.QueryResult; export const AreCameraSettingsUniformDocument = gql` query areCameraSettingsUniform($input: AreCameraSettingsUniformInput!) { - areCameraSettingsUniform(input: $input) { - isUniform - } - } -`; + areCameraSettingsUniform(input: $input) { + isUniform + } +} + `; /** * __useAreCameraSettingsUniformQuery__ @@ -3495,24 +4206,26 @@ export const AreCameraSettingsUniformDocument = gql` * }, * }); */ -export function useAreCameraSettingsUniformQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(AreCameraSettingsUniformDocument, baseOptions); -} +export function useAreCameraSettingsUniformQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(AreCameraSettingsUniformDocument, options); + } export function useAreCameraSettingsUniformLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(AreCameraSettingsUniformDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(AreCameraSettingsUniformDocument, options); + } export type AreCameraSettingsUniformQueryHookResult = ReturnType; export type AreCameraSettingsUniformLazyQueryHookResult = ReturnType; export type AreCameraSettingsUniformQueryResult = Apollo.QueryResult; export const GetLicenseDocument = gql` query getLicense($input: GetLicenseInput!) { - getLicense(input: $input) { - License { - idLicense - } - } + getLicense(input: $input) { + License { + idLicense } -`; + } +} + `; /** * __useGetLicenseQuery__ @@ -3530,24 +4243,26 @@ export const GetLicenseDocument = gql` * }, * }); */ -export function useGetLicenseQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetLicenseDocument, baseOptions); -} +export function useGetLicenseQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetLicenseDocument, options); + } export function useGetLicenseLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetLicenseDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetLicenseDocument, options); + } export type GetLicenseQueryHookResult = ReturnType; export type GetLicenseLazyQueryHookResult = ReturnType; export type GetLicenseQueryResult = Apollo.QueryResult; export const GetModelDocument = gql` query getModel($input: GetModelInput!) { - getModel(input: $input) { - Model { - idModel - } - } + getModel(input: $input) { + Model { + idModel } -`; + } +} + `; /** * __useGetModelQuery__ @@ -3565,35 +4280,173 @@ export const GetModelDocument = gql` * }, * }); */ -export function useGetModelQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetModelDocument, baseOptions); -} +export function useGetModelQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetModelDocument, options); + } export function useGetModelLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetModelDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetModelDocument, options); + } export type GetModelQueryHookResult = ReturnType; export type GetModelLazyQueryHookResult = ReturnType; export type GetModelQueryResult = Apollo.QueryResult; +export const GetModelConstellationDocument = gql` + query getModelConstellation($input: GetModelConstellationInput!) { + getModelConstellation(input: $input) { + ModelConstellation { + Model { + idModel + Name + DateCreated + Master + Authoritative + VCreationMethod { + Term + } + VModality { + Term + } + VPurpose { + Term + } + VUnits { + Term + } + VFileType { + Term + } + idAssetThumbnail + CountAnimations + CountCameras + CountFaces + CountLights + CountMaterials + CountMeshes + CountVertices + CountEmbeddedTextures + CountLinkedTextures + FileEncoding + } + ModelObjects { + idModelObject + idModel + BoundingBoxP1X + BoundingBoxP1Y + BoundingBoxP1Z + BoundingBoxP2X + BoundingBoxP2Y + BoundingBoxP2Z + CountVertices + CountFaces + CountColorChannels + CountTextureCoordinateChannels + HasBones + HasFaceNormals + HasTangents + HasTextureCoordinates + HasVertexNormals + HasVertexColor + IsTwoManifoldUnbounded + IsTwoManifoldBounded + IsWatertight + SelfIntersecting + } + ModelMaterials { + idModelMaterial + Name + } + ModelMaterialChannels { + idModelMaterialChannel + idModelMaterial + Type + Source + Value + VMaterialType { + Term + } + MaterialTypeOther + idModelMaterialUVMap + UVMapEmbedded + ChannelPosition + ChannelWidth + Scalar1 + Scalar2 + Scalar3 + Scalar4 + AdditionalAttributes + } + ModelMaterialUVMaps { + idModelMaterialUVMap + idModel + idAsset + UVMapEdgeLength + } + ModelObjectModelMaterialXref { + idModelObject + idModelMaterial + } + ModelAssets { + AssetName + AssetType + AssetVersion { + idAsset + idAssetVersion + FileName + } + } + } + } +} + `; + +/** + * __useGetModelConstellationQuery__ + * + * To run a query within a React component, call `useGetModelConstellationQuery` and pass it any options that fit your needs. + * When your component renders, `useGetModelConstellationQuery` 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 } = useGetModelConstellationQuery({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGetModelConstellationQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetModelConstellationDocument, options); + } +export function useGetModelConstellationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetModelConstellationDocument, options); + } +export type GetModelConstellationQueryHookResult = ReturnType; +export type GetModelConstellationLazyQueryHookResult = ReturnType; +export type GetModelConstellationQueryResult = Apollo.QueryResult; export const GetFilterViewDataDocument = gql` query getFilterViewData { - getFilterViewData { - units { - idUnit - Name - SystemObject { - idSystemObject - } - } - projects { - idProject - Name - SystemObject { - idSystemObject - } - } - } + getFilterViewData { + units { + idUnit + Name + SystemObject { + idSystemObject + } + } + projects { + idProject + Name + SystemObject { + idSystemObject + } } -`; + } +} + `; /** * __useGetFilterViewDataQuery__ @@ -3611,30 +4464,32 @@ export const GetFilterViewDataDocument = gql` * }); */ export function useGetFilterViewDataQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetFilterViewDataDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetFilterViewDataDocument, options); + } export function useGetFilterViewDataLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetFilterViewDataDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetFilterViewDataDocument, options); + } export type GetFilterViewDataQueryHookResult = ReturnType; export type GetFilterViewDataLazyQueryHookResult = ReturnType; export type GetFilterViewDataQueryResult = Apollo.QueryResult; export const GetObjectChildrenDocument = gql` query getObjectChildren($input: GetObjectChildrenInput!) { - getObjectChildren(input: $input) { - success - error - entries { - idSystemObject - name - objectType - idObject - metadata - } - metadataColumns - } + getObjectChildren(input: $input) { + success + error + entries { + idSystemObject + name + objectType + idObject + metadata } -`; + metadataColumns + } +} + `; /** * __useGetObjectChildrenQuery__ @@ -3652,24 +4507,26 @@ export const GetObjectChildrenDocument = gql` * }, * }); */ -export function useGetObjectChildrenQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetObjectChildrenDocument, baseOptions); -} +export function useGetObjectChildrenQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetObjectChildrenDocument, options); + } export function useGetObjectChildrenLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetObjectChildrenDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetObjectChildrenDocument, options); + } export type GetObjectChildrenQueryHookResult = ReturnType; export type GetObjectChildrenLazyQueryHookResult = ReturnType; export type GetObjectChildrenQueryResult = Apollo.QueryResult; export const GetIntermediaryFileDocument = gql` query getIntermediaryFile($input: GetIntermediaryFileInput!) { - getIntermediaryFile(input: $input) { - IntermediaryFile { - idIntermediaryFile - } - } + getIntermediaryFile(input: $input) { + IntermediaryFile { + idIntermediaryFile } -`; + } +} + `; /** * __useGetIntermediaryFileQuery__ @@ -3687,24 +4544,26 @@ export const GetIntermediaryFileDocument = gql` * }, * }); */ -export function useGetIntermediaryFileQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetIntermediaryFileDocument, baseOptions); -} +export function useGetIntermediaryFileQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetIntermediaryFileDocument, options); + } export function useGetIntermediaryFileLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetIntermediaryFileDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetIntermediaryFileDocument, options); + } export type GetIntermediaryFileQueryHookResult = ReturnType; export type GetIntermediaryFileLazyQueryHookResult = ReturnType; export type GetIntermediaryFileQueryResult = Apollo.QueryResult; export const GetSceneDocument = gql` query getScene($input: GetSceneInput!) { - getScene(input: $input) { - Scene { - idScene - } - } + getScene(input: $input) { + Scene { + idScene } -`; + } +} + `; /** * __useGetSceneQuery__ @@ -3722,30 +4581,32 @@ export const GetSceneDocument = gql` * }, * }); */ -export function useGetSceneQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetSceneDocument, baseOptions); -} +export function useGetSceneQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSceneDocument, options); + } export function useGetSceneLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetSceneDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSceneDocument, options); + } export type GetSceneQueryHookResult = ReturnType; export type GetSceneLazyQueryHookResult = ReturnType; export type GetSceneQueryResult = Apollo.QueryResult; export const GetAssetDetailsForSystemObjectDocument = gql` query getAssetDetailsForSystemObject($input: GetAssetDetailsForSystemObjectInput!) { - getAssetDetailsForSystemObject(input: $input) { - assetDetails { - idSystemObject - name - path - assetType - version - dateCreated - size - } - } + getAssetDetailsForSystemObject(input: $input) { + assetDetails { + idSystemObject + name + path + assetType + version + dateCreated + size } -`; + } +} + `; /** * __useGetAssetDetailsForSystemObjectQuery__ @@ -3763,144 +4624,179 @@ export const GetAssetDetailsForSystemObjectDocument = gql` * }, * }); */ -export function useGetAssetDetailsForSystemObjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetAssetDetailsForSystemObjectDocument, baseOptions); -} -export function useGetAssetDetailsForSystemObjectLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions -) { - return Apollo.useLazyQuery(GetAssetDetailsForSystemObjectDocument, baseOptions); -} +export function useGetAssetDetailsForSystemObjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetAssetDetailsForSystemObjectDocument, options); + } +export function useGetAssetDetailsForSystemObjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetAssetDetailsForSystemObjectDocument, options); + } export type GetAssetDetailsForSystemObjectQueryHookResult = ReturnType; export type GetAssetDetailsForSystemObjectLazyQueryHookResult = ReturnType; export type GetAssetDetailsForSystemObjectQueryResult = Apollo.QueryResult; export const GetDetailsTabDataForObjectDocument = gql` query getDetailsTabDataForObject($input: GetDetailsTabDataForObjectInput!) { - getDetailsTabDataForObject(input: $input) { - Unit { - Abbreviation - ARKPrefix - } - Project { - Description - } - Subject { - Altitude - Latitude - Longitude - R0 - R1 - R2 - R3 - TS0 - TS1 - TS2 - } - Item { - EntireSubject - Altitude - Latitude - Longitude - R0 - R1 - R2 - R3 - TS0 - TS1 - TS2 - } - CaptureData { - captureMethod - dateCaptured - datasetType - description - cameraSettingUniform - datasetFieldId - itemPositionType - itemPositionFieldId - itemArrangementFieldId - focusType - lightsourceType - backgroundRemovalMethod - clusterType - clusterGeometryFieldId - folders { - name - variantType - } - } - Model { - size - master - authoritative - creationMethod - modality - purpose - units - modelFileType - dateCaptured - uvMaps { - name - edgeLength - mapType - } - boundingBoxP1X - boundingBoxP1Y - boundingBoxP1Z - boundingBoxP2X - boundingBoxP2Y - boundingBoxP2Z - countPoint - countFace - countColorChannel - countTextureCoorinateChannel - hasBones - hasFaceNormals - hasTangents - hasTextureCoordinates - hasVertexNormals - hasVertexColor - isManifold - isWatertight - } - Scene { - Links - AssetType - Tours - Annotation - HasBeenQCd - IsOriented - } - IntermediaryFile { - idIntermediaryFile - } - ProjectDocumentation { - Description - } - Asset { - FilePath - AssetType - } - AssetVersion { - Creator - DateCreated - StorageSize - Ingested - Version - } - Actor { - OrganizationName - } - Stakeholder { - OrganizationName - EmailAddress - PhoneNumberMobile - PhoneNumberOffice - MailingAddress - } - } + getDetailsTabDataForObject(input: $input) { + Unit { + Abbreviation + ARKPrefix + } + Project { + Description + } + Subject { + Altitude + Latitude + Longitude + R0 + R1 + R2 + R3 + TS0 + TS1 + TS2 + } + Item { + EntireSubject + Altitude + Latitude + Longitude + R0 + R1 + R2 + R3 + TS0 + TS1 + TS2 + } + CaptureData { + captureMethod + dateCaptured + datasetType + description + cameraSettingUniform + datasetFieldId + itemPositionType + itemPositionFieldId + itemArrangementFieldId + focusType + lightsourceType + backgroundRemovalMethod + clusterType + clusterGeometryFieldId + folders { + name + variantType + } + } + Model { + Model { + idModel + CountVertices + CountFaces + CountAnimations + CountCameras + CountLights + CountMaterials + CountMeshes + CountEmbeddedTextures + CountLinkedTextures + FileEncoding + Name + DateCreated + Master + Authoritative + idVCreationMethod + idVModality + idVUnits + idVPurpose + idVFileType + } + ModelObjects { + idModelObject + BoundingBoxP1X + BoundingBoxP1Y + BoundingBoxP1Z + BoundingBoxP1Z + BoundingBoxP2X + BoundingBoxP2Y + BoundingBoxP2Z + CountVertices + CountFaces + CountColorChannels + CountTextureCoordinateChannels + HasBones + HasFaceNormals + HasTangents + HasTextureCoordinates + HasVertexNormals + HasVertexColor + IsTwoManifoldUnbounded + IsTwoManifoldBounded + IsWatertight + SelfIntersecting + } + ModelMaterials { + idModelMaterial + Name + } + ModelMaterialChannels { + Type + Source + Value + AdditionalAttributes + idModelMaterial + idModelMaterialChannel + } + ModelObjectModelMaterialXref { + idModelObjectModelMaterialXref + idModelObject + idModelMaterial + } + ModelAssets { + AssetName + AssetType + } + } + Scene { + Links + AssetType + Tours + Annotation + HasBeenQCd + IsOriented + } + IntermediaryFile { + idIntermediaryFile + } + ProjectDocumentation { + Description + } + Asset { + FilePath + AssetType + } + AssetVersion { + Creator + DateCreated + StorageSize + Ingested + Version } -`; + Actor { + OrganizationName + } + Stakeholder { + OrganizationName + EmailAddress + PhoneNumberMobile + PhoneNumberOffice + MailingAddress + } + } +} + `; /** * __useGetDetailsTabDataForObjectQuery__ @@ -3918,25 +4814,68 @@ export const GetDetailsTabDataForObjectDocument = gql` * }, * }); */ -export function useGetDetailsTabDataForObjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetDetailsTabDataForObjectDocument, baseOptions); -} +export function useGetDetailsTabDataForObjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetDetailsTabDataForObjectDocument, options); + } export function useGetDetailsTabDataForObjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetDetailsTabDataForObjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetDetailsTabDataForObjectDocument, options); + } export type GetDetailsTabDataForObjectQueryHookResult = ReturnType; export type GetDetailsTabDataForObjectLazyQueryHookResult = ReturnType; export type GetDetailsTabDataForObjectQueryResult = Apollo.QueryResult; +export const GetProjectListDocument = gql` + query getProjectList($input: GetProjectListInput!) { + getProjectList(input: $input) { + projects { + idProject + Name + SystemObject { + idSystemObject + } + } + } +} + `; + +/** + * __useGetProjectListQuery__ + * + * To run a query within a React component, call `useGetProjectListQuery` and pass it any options that fit your needs. + * When your component renders, `useGetProjectListQuery` 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 } = useGetProjectListQuery({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGetProjectListQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetProjectListDocument, options); + } +export function useGetProjectListLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetProjectListDocument, options); + } +export type GetProjectListQueryHookResult = ReturnType; +export type GetProjectListLazyQueryHookResult = ReturnType; +export type GetProjectListQueryResult = Apollo.QueryResult; export const GetSourceObjectIdentiferDocument = gql` query getSourceObjectIdentifer($input: GetSourceObjectIdentiferInput!) { - getSourceObjectIdentifer(input: $input) { - sourceObjectIdentifiers { - idSystemObject - identifier - } - } + getSourceObjectIdentifer(input: $input) { + sourceObjectIdentifiers { + idSystemObject + identifier } -`; + } +} + `; /** * __useGetSourceObjectIdentiferQuery__ @@ -3954,69 +4893,71 @@ export const GetSourceObjectIdentiferDocument = gql` * }, * }); */ -export function useGetSourceObjectIdentiferQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetSourceObjectIdentiferDocument, baseOptions); -} +export function useGetSourceObjectIdentiferQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSourceObjectIdentiferDocument, options); + } export function useGetSourceObjectIdentiferLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetSourceObjectIdentiferDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSourceObjectIdentiferDocument, options); + } export type GetSourceObjectIdentiferQueryHookResult = ReturnType; export type GetSourceObjectIdentiferLazyQueryHookResult = ReturnType; export type GetSourceObjectIdentiferQueryResult = Apollo.QueryResult; export const GetSystemObjectDetailsDocument = gql` query getSystemObjectDetails($input: GetSystemObjectDetailsInput!) { - getSystemObjectDetails(input: $input) { - idObject - name - retired - objectType - allowed - publishedState - thumbnail - identifiers { - identifier - identifierType - } - unit { - idSystemObject - name - objectType - } - project { - idSystemObject - name - objectType - } - subject { - idSystemObject - name - objectType - } - item { - idSystemObject - name - objectType - } - objectAncestors { - idSystemObject - name - objectType - } - sourceObjects { - idSystemObject - name - identifier - objectType - } - derivedObjects { - idSystemObject - name - identifier - objectType - } - } + getSystemObjectDetails(input: $input) { + idObject + name + retired + objectType + allowed + publishedState + thumbnail + identifiers { + identifier + identifierType + } + unit { + idSystemObject + name + objectType + } + project { + idSystemObject + name + objectType } -`; + subject { + idSystemObject + name + objectType + } + item { + idSystemObject + name + objectType + } + objectAncestors { + idSystemObject + name + objectType + } + sourceObjects { + idSystemObject + name + identifier + objectType + } + derivedObjects { + idSystemObject + name + identifier + objectType + } + } +} + `; /** * __useGetSystemObjectDetailsQuery__ @@ -4034,29 +4975,31 @@ export const GetSystemObjectDetailsDocument = gql` * }, * }); */ -export function useGetSystemObjectDetailsQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetSystemObjectDetailsDocument, baseOptions); -} +export function useGetSystemObjectDetailsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSystemObjectDetailsDocument, options); + } export function useGetSystemObjectDetailsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetSystemObjectDetailsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSystemObjectDetailsDocument, options); + } export type GetSystemObjectDetailsQueryHookResult = ReturnType; export type GetSystemObjectDetailsLazyQueryHookResult = ReturnType; export type GetSystemObjectDetailsQueryResult = Apollo.QueryResult; export const GetVersionsForSystemObjectDocument = gql` query getVersionsForSystemObject($input: GetVersionsForSystemObjectInput!) { - getVersionsForSystemObject(input: $input) { - versions { - idSystemObject - version - name - creator - dateCreated - size - } - } + getVersionsForSystemObject(input: $input) { + versions { + idSystemObject + version + name + creator + dateCreated + size } -`; + } +} + `; /** * __useGetVersionsForSystemObjectQuery__ @@ -4074,26 +5017,28 @@ export const GetVersionsForSystemObjectDocument = gql` * }, * }); */ -export function useGetVersionsForSystemObjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetVersionsForSystemObjectDocument, baseOptions); -} +export function useGetVersionsForSystemObjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetVersionsForSystemObjectDocument, options); + } export function useGetVersionsForSystemObjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetVersionsForSystemObjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetVersionsForSystemObjectDocument, options); + } export type GetVersionsForSystemObjectQueryHookResult = ReturnType; export type GetVersionsForSystemObjectLazyQueryHookResult = ReturnType; export type GetVersionsForSystemObjectQueryResult = Apollo.QueryResult; export const GetIngestionItemsForSubjectsDocument = gql` query getIngestionItemsForSubjects($input: GetIngestionItemsForSubjectsInput!) { - getIngestionItemsForSubjects(input: $input) { - Item { - idItem - EntireSubject - Name - } - } + getIngestionItemsForSubjects(input: $input) { + Item { + idItem + EntireSubject + Name } -`; + } +} + `; /** * __useGetIngestionItemsForSubjectsQuery__ @@ -4111,25 +5056,27 @@ export const GetIngestionItemsForSubjectsDocument = gql` * }, * }); */ -export function useGetIngestionItemsForSubjectsQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetIngestionItemsForSubjectsDocument, baseOptions); -} +export function useGetIngestionItemsForSubjectsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetIngestionItemsForSubjectsDocument, options); + } export function useGetIngestionItemsForSubjectsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetIngestionItemsForSubjectsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetIngestionItemsForSubjectsDocument, options); + } export type GetIngestionItemsForSubjectsQueryHookResult = ReturnType; export type GetIngestionItemsForSubjectsLazyQueryHookResult = ReturnType; export type GetIngestionItemsForSubjectsQueryResult = Apollo.QueryResult; export const GetIngestionProjectsForSubjectsDocument = gql` query getIngestionProjectsForSubjects($input: GetIngestionProjectsForSubjectsInput!) { - getIngestionProjectsForSubjects(input: $input) { - Project { - idProject - Name - } - } + getIngestionProjectsForSubjects(input: $input) { + Project { + idProject + Name } -`; + } +} + `; /** * __useGetIngestionProjectsForSubjectsQuery__ @@ -4147,28 +5094,26 @@ export const GetIngestionProjectsForSubjectsDocument = gql` * }, * }); */ -export function useGetIngestionProjectsForSubjectsQuery( - baseOptions?: Apollo.QueryHookOptions -) { - return Apollo.useQuery(GetIngestionProjectsForSubjectsDocument, baseOptions); -} -export function useGetIngestionProjectsForSubjectsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions -) { - return Apollo.useLazyQuery(GetIngestionProjectsForSubjectsDocument, baseOptions); -} +export function useGetIngestionProjectsForSubjectsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetIngestionProjectsForSubjectsDocument, options); + } +export function useGetIngestionProjectsForSubjectsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetIngestionProjectsForSubjectsDocument, options); + } export type GetIngestionProjectsForSubjectsQueryHookResult = ReturnType; export type GetIngestionProjectsForSubjectsLazyQueryHookResult = ReturnType; export type GetIngestionProjectsForSubjectsQueryResult = Apollo.QueryResult; export const GetItemDocument = gql` query getItem($input: GetItemInput!) { - getItem(input: $input) { - Item { - idItem - } - } + getItem(input: $input) { + Item { + idItem } -`; + } +} + `; /** * __useGetItemQuery__ @@ -4186,25 +5131,27 @@ export const GetItemDocument = gql` * }, * }); */ -export function useGetItemQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetItemDocument, baseOptions); -} +export function useGetItemQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetItemDocument, options); + } export function useGetItemLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetItemDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetItemDocument, options); + } export type GetItemQueryHookResult = ReturnType; export type GetItemLazyQueryHookResult = ReturnType; export type GetItemQueryResult = Apollo.QueryResult; export const GetItemsForSubjectDocument = gql` query getItemsForSubject($input: GetItemsForSubjectInput!) { - getItemsForSubject(input: $input) { - Item { - idItem - Name - } - } + getItemsForSubject(input: $input) { + Item { + idItem + Name } -`; + } +} + `; /** * __useGetItemsForSubjectQuery__ @@ -4222,46 +5169,48 @@ export const GetItemsForSubjectDocument = gql` * }, * }); */ -export function useGetItemsForSubjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetItemsForSubjectDocument, baseOptions); -} +export function useGetItemsForSubjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetItemsForSubjectDocument, options); + } export function useGetItemsForSubjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetItemsForSubjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetItemsForSubjectDocument, options); + } export type GetItemsForSubjectQueryHookResult = ReturnType; export type GetItemsForSubjectLazyQueryHookResult = ReturnType; export type GetItemsForSubjectQueryResult = Apollo.QueryResult; export const GetObjectsForItemDocument = gql` query getObjectsForItem($input: GetObjectsForItemInput!) { - getObjectsForItem(input: $input) { - CaptureData { - idCaptureData - DateCaptured - Description - } - Model { - idModel - Authoritative - DateCreated - } - Scene { - idScene - HasBeenQCd - IsOriented - Name - } - IntermediaryFile { - idIntermediaryFile - DateCreated - } - ProjectDocumentation { - idProjectDocumentation - Description - Name - } - } + getObjectsForItem(input: $input) { + CaptureData { + idCaptureData + DateCaptured + Description } -`; + Model { + idModel + Authoritative + DateCreated + } + Scene { + idScene + HasBeenQCd + IsOriented + Name + } + IntermediaryFile { + idIntermediaryFile + DateCreated + } + ProjectDocumentation { + idProjectDocumentation + Description + Name + } + } +} + `; /** * __useGetObjectsForItemQuery__ @@ -4279,24 +5228,29 @@ export const GetObjectsForItemDocument = gql` * }, * }); */ -export function useGetObjectsForItemQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetObjectsForItemDocument, baseOptions); -} +export function useGetObjectsForItemQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetObjectsForItemDocument, options); + } export function useGetObjectsForItemLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetObjectsForItemDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetObjectsForItemDocument, options); + } export type GetObjectsForItemQueryHookResult = ReturnType; export type GetObjectsForItemLazyQueryHookResult = ReturnType; export type GetObjectsForItemQueryResult = Apollo.QueryResult; export const GetProjectDocument = gql` query getProject($input: GetProjectInput!) { - getProject(input: $input) { - Project { - idProject - } - } + getProject(input: $input) { + Project { + idProject + SystemObject { + idSystemObject + } } -`; + } +} + `; /** * __useGetProjectQuery__ @@ -4314,24 +5268,26 @@ export const GetProjectDocument = gql` * }, * }); */ -export function useGetProjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetProjectDocument, baseOptions); -} +export function useGetProjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetProjectDocument, options); + } export function useGetProjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetProjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetProjectDocument, options); + } export type GetProjectQueryHookResult = ReturnType; export type GetProjectLazyQueryHookResult = ReturnType; export type GetProjectQueryResult = Apollo.QueryResult; export const GetProjectDocumentationDocument = gql` query getProjectDocumentation($input: GetProjectDocumentationInput!) { - getProjectDocumentation(input: $input) { - ProjectDocumentation { - idProjectDocumentation - } - } + getProjectDocumentation(input: $input) { + ProjectDocumentation { + idProjectDocumentation } -`; + } +} + `; /** * __useGetProjectDocumentationQuery__ @@ -4349,24 +5305,29 @@ export const GetProjectDocumentationDocument = gql` * }, * }); */ -export function useGetProjectDocumentationQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetProjectDocumentationDocument, baseOptions); -} +export function useGetProjectDocumentationQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetProjectDocumentationDocument, options); + } export function useGetProjectDocumentationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetProjectDocumentationDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetProjectDocumentationDocument, options); + } export type GetProjectDocumentationQueryHookResult = ReturnType; export type GetProjectDocumentationLazyQueryHookResult = ReturnType; export type GetProjectDocumentationQueryResult = Apollo.QueryResult; export const GetSubjectDocument = gql` query getSubject($input: GetSubjectInput!) { - getSubject(input: $input) { - Subject { - idSubject - } - } + getSubject(input: $input) { + Subject { + idSubject + SystemObject { + idSystemObject + } } -`; + } +} + `; /** * __useGetSubjectQuery__ @@ -4384,25 +5345,27 @@ export const GetSubjectDocument = gql` * }, * }); */ -export function useGetSubjectQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetSubjectDocument, baseOptions); -} +export function useGetSubjectQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSubjectDocument, options); + } export function useGetSubjectLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetSubjectDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSubjectDocument, options); + } export type GetSubjectQueryHookResult = ReturnType; export type GetSubjectLazyQueryHookResult = ReturnType; export type GetSubjectQueryResult = Apollo.QueryResult; export const GetSubjectsForUnitDocument = gql` query getSubjectsForUnit($input: GetSubjectsForUnitInput!) { - getSubjectsForUnit(input: $input) { - Subject { - idSubject - Name - } - } + getSubjectsForUnit(input: $input) { + Subject { + idSubject + Name } -`; + } +} + `; /** * __useGetSubjectsForUnitQuery__ @@ -4420,24 +5383,26 @@ export const GetSubjectsForUnitDocument = gql` * }, * }); */ -export function useGetSubjectsForUnitQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetSubjectsForUnitDocument, baseOptions); -} +export function useGetSubjectsForUnitQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetSubjectsForUnitDocument, options); + } export function useGetSubjectsForUnitLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetSubjectsForUnitDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetSubjectsForUnitDocument, options); + } export type GetSubjectsForUnitQueryHookResult = ReturnType; export type GetSubjectsForUnitLazyQueryHookResult = ReturnType; export type GetSubjectsForUnitQueryResult = Apollo.QueryResult; export const GetUnitDocument = gql` query getUnit($input: GetUnitInput!) { - getUnit(input: $input) { - Unit { - idUnit - } - } + getUnit(input: $input) { + Unit { + idUnit } -`; + } +} + `; /** * __useGetUnitQuery__ @@ -4455,28 +5420,72 @@ export const GetUnitDocument = gql` * }, * }); */ -export function useGetUnitQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetUnitDocument, baseOptions); -} +export function useGetUnitQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetUnitDocument, options); + } export function useGetUnitLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetUnitDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetUnitDocument, options); + } export type GetUnitQueryHookResult = ReturnType; export type GetUnitLazyQueryHookResult = ReturnType; export type GetUnitQueryResult = Apollo.QueryResult; +export const GetUnitsFromNameSearchDocument = gql` + query getUnitsFromNameSearch($input: GetUnitsFromNameSearchInput!) { + getUnitsFromNameSearch(input: $input) { + Units { + idUnit + Name + Abbreviation + SystemObject { + idSystemObject + } + } + } +} + `; + +/** + * __useGetUnitsFromNameSearchQuery__ + * + * To run a query within a React component, call `useGetUnitsFromNameSearchQuery` and pass it any options that fit your needs. + * When your component renders, `useGetUnitsFromNameSearchQuery` 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 } = useGetUnitsFromNameSearchQuery({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGetUnitsFromNameSearchQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetUnitsFromNameSearchDocument, options); + } +export function useGetUnitsFromNameSearchLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetUnitsFromNameSearchDocument, options); + } +export type GetUnitsFromNameSearchQueryHookResult = ReturnType; +export type GetUnitsFromNameSearchLazyQueryHookResult = ReturnType; +export type GetUnitsFromNameSearchQueryResult = Apollo.QueryResult; export const SearchIngestionSubjectsDocument = gql` query searchIngestionSubjects($input: SearchIngestionSubjectsInput!) { - searchIngestionSubjects(input: $input) { - SubjectUnitIdentifier { - idSubject - SubjectName - UnitAbbreviation - IdentifierPublic - IdentifierCollection - } - } + searchIngestionSubjects(input: $input) { + SubjectUnitIdentifier { + idSubject + SubjectName + UnitAbbreviation + IdentifierPublic + IdentifierCollection } -`; + } +} + `; /** * __useSearchIngestionSubjectsQuery__ @@ -4494,32 +5503,79 @@ export const SearchIngestionSubjectsDocument = gql` * }, * }); */ -export function useSearchIngestionSubjectsQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(SearchIngestionSubjectsDocument, baseOptions); -} +export function useSearchIngestionSubjectsQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(SearchIngestionSubjectsDocument, options); + } export function useSearchIngestionSubjectsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(SearchIngestionSubjectsDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(SearchIngestionSubjectsDocument, options); + } export type SearchIngestionSubjectsQueryHookResult = ReturnType; export type SearchIngestionSubjectsLazyQueryHookResult = ReturnType; export type SearchIngestionSubjectsQueryResult = Apollo.QueryResult; +export const GetAllUsersDocument = gql` + query getAllUsers($input: GetAllUsersInput!) { + getAllUsers(input: $input) { + User { + idUser + Active + DateActivated + EmailAddress + Name + SecurityID + DateDisabled + EmailSettings + WorkflowNotificationTime + } + } +} + `; + +/** + * __useGetAllUsersQuery__ + * + * To run a query within a React component, call `useGetAllUsersQuery` and pass it any options that fit your needs. + * When your component renders, `useGetAllUsersQuery` 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 } = useGetAllUsersQuery({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useGetAllUsersQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetAllUsersDocument, options); + } +export function useGetAllUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetAllUsersDocument, options); + } +export type GetAllUsersQueryHookResult = ReturnType; +export type GetAllUsersLazyQueryHookResult = ReturnType; +export type GetAllUsersQueryResult = Apollo.QueryResult; export const GetCurrentUserDocument = gql` query getCurrentUser { - getCurrentUser { - User { - idUser - Name - Active - DateActivated - DateDisabled - EmailAddress - EmailSettings - SecurityID - WorkflowNotificationTime - } - } + getCurrentUser { + User { + idUser + Name + Active + DateActivated + DateDisabled + EmailAddress + EmailSettings + SecurityID + WorkflowNotificationTime } -`; + } +} + `; /** * __useGetCurrentUserQuery__ @@ -4537,26 +5593,32 @@ export const GetCurrentUserDocument = gql` * }); */ export function useGetCurrentUserQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetCurrentUserDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetCurrentUserDocument, options); + } export function useGetCurrentUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetCurrentUserDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetCurrentUserDocument, options); + } export type GetCurrentUserQueryHookResult = ReturnType; export type GetCurrentUserLazyQueryHookResult = ReturnType; export type GetCurrentUserQueryResult = Apollo.QueryResult; export const GetUserDocument = gql` query getUser($input: GetUserInput!) { - getUser(input: $input) { - User { - idUser - Name - Active - DateActivated - } - } + getUser(input: $input) { + User { + idUser + Name + Active + DateActivated + DateDisabled + EmailSettings + EmailAddress + WorkflowNotificationTime } -`; + } +} + `; /** * __useGetUserQuery__ @@ -4574,24 +5636,26 @@ export const GetUserDocument = gql` * }, * }); */ -export function useGetUserQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetUserDocument, baseOptions); -} +export function useGetUserQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetUserDocument, options); + } export function useGetUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetUserDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetUserDocument, options); + } export type GetUserQueryHookResult = ReturnType; export type GetUserLazyQueryHookResult = ReturnType; export type GetUserQueryResult = Apollo.QueryResult; export const GetVocabularyDocument = gql` query getVocabulary($input: GetVocabularyInput!) { - getVocabulary(input: $input) { - Vocabulary { - idVocabulary - } - } + getVocabulary(input: $input) { + Vocabulary { + idVocabulary } -`; + } +} + `; /** * __useGetVocabularyQuery__ @@ -4609,28 +5673,31 @@ export const GetVocabularyDocument = gql` * }, * }); */ -export function useGetVocabularyQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetVocabularyDocument, baseOptions); -} +export function useGetVocabularyQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetVocabularyDocument, options); + } export function useGetVocabularyLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetVocabularyDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetVocabularyDocument, options); + } export type GetVocabularyQueryHookResult = ReturnType; export type GetVocabularyLazyQueryHookResult = ReturnType; export type GetVocabularyQueryResult = Apollo.QueryResult; export const GetVocabularyEntriesDocument = gql` query getVocabularyEntries($input: GetVocabularyEntriesInput!) { - getVocabularyEntries(input: $input) { - VocabularyEntries { - eVocabSetID - Vocabulary { - idVocabulary - Term - } - } - } + getVocabularyEntries(input: $input) { + VocabularyEntries { + eVocabSetID + Vocabulary { + idVocabulary + Term + eVocabID + } } -`; + } +} + `; /** * __useGetVocabularyEntriesQuery__ @@ -4648,24 +5715,26 @@ export const GetVocabularyEntriesDocument = gql` * }, * }); */ -export function useGetVocabularyEntriesQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetVocabularyEntriesDocument, baseOptions); -} +export function useGetVocabularyEntriesQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetVocabularyEntriesDocument, options); + } export function useGetVocabularyEntriesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetVocabularyEntriesDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetVocabularyEntriesDocument, options); + } export type GetVocabularyEntriesQueryHookResult = ReturnType; export type GetVocabularyEntriesLazyQueryHookResult = ReturnType; export type GetVocabularyEntriesQueryResult = Apollo.QueryResult; export const GetWorkflowDocument = gql` query getWorkflow($input: GetWorkflowInput!) { - getWorkflow(input: $input) { - Workflow { - idWorkflow - } - } + getWorkflow(input: $input) { + Workflow { + idWorkflow } -`; + } +} + `; /** * __useGetWorkflowQuery__ @@ -4683,12 +5752,14 @@ export const GetWorkflowDocument = gql` * }, * }); */ -export function useGetWorkflowQuery(baseOptions?: Apollo.QueryHookOptions) { - return Apollo.useQuery(GetWorkflowDocument, baseOptions); -} +export function useGetWorkflowQuery(baseOptions: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetWorkflowDocument, options); + } export function useGetWorkflowLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { - return Apollo.useLazyQuery(GetWorkflowDocument, baseOptions); -} + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetWorkflowDocument, options); + } export type GetWorkflowQueryHookResult = ReturnType; export type GetWorkflowLazyQueryHookResult = ReturnType; -export type GetWorkflowQueryResult = Apollo.QueryResult; +export type GetWorkflowQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/client/src/types/server.ts b/client/src/types/server.ts index 83da29d00..14a4c8015 100644 --- a/client/src/types/server.ts +++ b/client/src/types/server.ts @@ -19,6 +19,8 @@ export enum eVocabularySetID { eMetadataMetadataSource, eWorkflowStepWorkflowStepType, eAssetAssetType, + eJobJobType, + eWorkflowType, eNone = -1 } @@ -42,6 +44,7 @@ export enum eVocabularyID { eAssetAssetTypeProjectDocumentation, eAssetAssetTypeIntermediaryFile, eAssetAssetTypeOther, + eMetadataMetadataSourceBulkIngestion, eCaptureDataCaptureMethodPhotogrammetry, eCaptureDataCaptureMethodCT, eCaptureDataCaptureMethodStructuredLight, @@ -50,7 +53,53 @@ export enum eVocabularyID { eCaptureDataFileVariantTypeRaw, eCaptureDataFileVariantTypeProcessed, eCaptureDataFileVariantTypeFromCamera, - eMetadataMetadataSourceBulkIngestion, + eModelCreationMethodScanToMesh, + eModelCreationMethodCAD, + eModelModalityPointCloud, + eModelModalityMesh, + eModelUnitsMicrometer, + eModelUnitsMillimeter, + eModelUnitsCentimeter, + eModelUnitsMeter, + eModelUnitsKilometer, + eModelUnitsInch, + eModelUnitsFoot, + eModelUnitsYard, + eModelUnitsMile, + eModelUnitsAstronomicalUnit, + eModelPurposeMaster, + eModelPurposeWebDelivery, + eModelPurposePrintDelivery, + eModelPurposeIntermediateProcessingStep, + eModelFileTypeobj, + eModelFileTypeply, + eModelFileTypestl, + eModelFileTypeglb, + eModelFileTypegltf, + eModelFileTypeusdz, + eModelFileTypex3d, + eModelFileTypewrl, + eModelFileTypedae, + eModelFileTypefbx, + eModelFileTypema, + eModelFileType3ds, + eModelFileTypeptx, + eModelFileTypepts, + eJobJobTypeCookBake, + eJobJobTypeCookDecimateUnwrap, + eJobJobTypeCookDecimate, + eJobJobTypeCookGenerateUsdz, + eJobJobTypeCookGenerateWebGltf, + eJobJobTypeCookInspectMesh, + eJobJobTypeCookSIArBackfillFix, + eJobJobTypeCookSIGenerateDownloads, + eJobJobTypeCookSIOrientModelToSvx, + eJobJobTypeCookSIPackratInspect, + eJobJobTypeCookSIVoyagerAsset, + eJobJobTypeCookSIVoyagerScene, + eJobJobTypeCookUnwrap, + eWorkflowTypeCookJob, + eWorkflowStepTypeStart, eNone = -1 } diff --git a/client/src/utils/repository.tsx b/client/src/utils/repository.tsx index 9af8e68a2..9a8fe8d22 100644 --- a/client/src/utils/repository.tsx +++ b/client/src/utils/repository.tsx @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ + /** * Repository utilities * @@ -35,6 +36,7 @@ export function getSystemObjectTypesForFilter(filter: RepositoryFilter): eSystem return objectTypes; } +// prettier-ignore export function getTermForSystemObjectType(objectType: eSystemObjectType): string { switch (objectType) { case eSystemObjectType.eUnit: return 'Unit'; @@ -130,6 +132,7 @@ export function getTreeColorVariant(index: number): RepositoryColorVariant { // cached data, computed once let metadataTitleMap: Map | null = null; +// prettier-ignore export function getTreeViewColumns(metadataColumns: eMetadata[], isHeader: boolean, values?: string[]): TreeViewColumn[] { const treeColumns: TreeViewColumn[] = []; const MIN_SIZE = 5; @@ -171,6 +174,7 @@ type ObjectInterfaceDetails = { color: string; }; +// prettier-ignore export function getObjectInterfaceDetails(objectType: eSystemObjectType, variant: RepositoryColorVariant): ObjectInterfaceDetails { const color: string = Colors.repository[objectType][variant]; const textColor: string = Colors.defaults.white; @@ -207,6 +211,7 @@ export function getDetailsUrlForObject(idSystemObject: number): string { return `/repository/details/${idSystemObject}`; } +// prettier-ignore export function getTreeViewStyleHeight(isExpanded: boolean, isModal: boolean, breakpoint: Breakpoint): string { const isSmallScreen: boolean = breakpoint === 'lg'; diff --git a/conf/docker/client-dev.Dockerfile b/conf/docker/client-dev.Dockerfile new file mode 100644 index 000000000..1dcde7550 --- /dev/null +++ b/conf/docker/client-dev.Dockerfile @@ -0,0 +1,18 @@ +FROM node:12.18.4-alpine AS base +# Add a work directory +WORKDIR /app +# Copy package.json for caching +ADD package*.json . +# Copy app files +COPY . . + +# Build client from common base +FROM base AS client +# Remove server to prevent duplication +RUN rm -rf server +# Expose port(s) +EXPOSE 3000 +# Install dependencies and build +RUN yarn && yarn build:dev +# Start on excecution +CMD [ "yarn", "start:client" ] \ No newline at end of file diff --git a/conf/docker/client-prod.Dockerfile b/conf/docker/client-prod.Dockerfile new file mode 100644 index 000000000..3791b0ab9 --- /dev/null +++ b/conf/docker/client-prod.Dockerfile @@ -0,0 +1,26 @@ +FROM node:12.18.4-alpine AS base +# Add a work directory +WORKDIR /app +# Copy package.json for caching +ADD package.json yarn.lock ./ +# Copy app files +COPY . . + +FROM base AS client-builder +# Remove server from client build +RUN rm -rf server +# Install dependencies (production mode) and build +RUN yarn install --frozen-lockfile && yarn build:prod + +# Client's production image +FROM node:12.18.4-alpine AS client +# Add a work directory +WORKDIR /app +# Copy from client-builder +COPY --from=client-builder /app/client/build . +# Expose port(s) +EXPOSE 3000 +# Install static file server +RUN npm i -g serve +# Start on excecution +CMD serve -s . -l 3000 diff --git a/conf/docker/db.Dockerfile b/conf/docker/db.Dockerfile new file mode 100644 index 000000000..2518360b2 --- /dev/null +++ b/conf/docker/db.Dockerfile @@ -0,0 +1 @@ +FROM mariadb:10.5 as db \ No newline at end of file diff --git a/docker-compose.deploy.yml b/conf/docker/docker-compose.deploy.yml similarity index 75% rename from docker-compose.deploy.yml rename to conf/docker/docker-compose.deploy.yml index 6af1e1f23..064397e14 100644 --- a/docker-compose.deploy.yml +++ b/conf/docker/docker-compose.deploy.yml @@ -6,8 +6,8 @@ services: image: "packrat-client-dev:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/client-dev.Dockerfile target: client ports: - $PACKRAT_CLIENT_PORT:3000 @@ -20,8 +20,8 @@ services: image: "packrat-client-prod:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/prod.Dockerfile + context: ../.. + dockerfile: ./conf/docker/client-prod.Dockerfile target: client ports: - $PACKRAT_CLIENT_PORT:3000 @@ -34,8 +34,8 @@ services: image: "packrat-server-dev:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/server-dev.Dockerfile target: server ports: - $PACKRAT_SERVER_PORT:4000 @@ -50,14 +50,21 @@ services: - OCFL_STORAGE_ROOT=$OCFL_STORAGE_ROOT - OCFL_STAGING_ROOT=$OCFL_STAGING_ROOT - PACKRAT_SOLR_HOST=$PACKRAT_SOLR_HOST + - COOK_SERVER_URL=$COOK_SERVER_URL + - AUTH_TYPE=$AUTH_TYPE + - LDAP_SERVER=$LDAP_SERVER + - LDAP_PASSWORD=$LDAP_PASSWORD + - LDAP_CN=$LDAP_CN + - LDAP_OU=$LDAP_OU + - LDAP_DC=$LDAP_DC packrat-server-prod: container_name: packrat-server-prod image: "packrat-server-prod:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/prod.Dockerfile + context: ../.. + dockerfile: ./conf/docker/server-prod.Dockerfile target: server ports: - $PACKRAT_SERVER_PORT:4000 @@ -72,6 +79,13 @@ services: - OCFL_STORAGE_ROOT=$OCFL_STORAGE_ROOT - OCFL_STAGING_ROOT=$OCFL_STAGING_ROOT - PACKRAT_SOLR_HOST=$PACKRAT_SOLR_HOST + - COOK_SERVER_URL=$COOK_SERVER_URL + - AUTH_TYPE=$AUTH_TYPE + - LDAP_SERVER=$LDAP_SERVER + - LDAP_PASSWORD=$LDAP_PASSWORD + - LDAP_CN=$LDAP_CN + - LDAP_OU=$LDAP_OU + - LDAP_DC=$LDAP_DC packrat-db-dev: container_name: packrat-db-dev @@ -82,7 +96,7 @@ services: environment: - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD volumes: - - ./server/db/sql:/app/ + - ../../server/db/sql:/app/ packrat-db-prod: container_name: packrat-db-prod @@ -93,15 +107,15 @@ services: environment: - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD volumes: - - ./server/db/sql:/app/ + - ../../server/db/sql:/app/ packrat-solr-dev: container_name: packrat-solr-dev image: "packrat-solr-dev:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/solr.Dockerfile + context: ../.. + dockerfile: ./conf/docker/solr.Dockerfile target: solr ports: - $PACKRAT_SOLR_PORT:8983 @@ -113,8 +127,8 @@ services: image: "packrat-solr-prod:${IMAGE_TAG}" restart: always build: - context: . - dockerfile: ./docker/solr.Dockerfile + context: ../.. + dockerfile: ./conf/docker/solr.Dockerfile target: solr ports: - $PACKRAT_SOLR_PORT:8983 diff --git a/docker-compose.dev.yml b/conf/docker/docker-compose.dev.yml similarity index 61% rename from docker-compose.dev.yml rename to conf/docker/docker-compose.dev.yml index 6d5c7236d..f447bd7eb 100644 --- a/docker-compose.dev.yml +++ b/conf/docker/docker-compose.dev.yml @@ -6,24 +6,24 @@ services: image: packrat-proxy restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/proxy-dev.Dockerfile target: proxy depends_on: - packrat-client - packrat-server volumes: - - ./nginx.conf:/etc/nginx/nginx.conf + - ../../conf/nginx/nginx-dev.conf:/etc/nginx/nginx.conf ports: - - 80:80 + - $PACKRAT_PROXY_PORT:80 packrat-client: container_name: packrat-client image: packrat-client restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/client-dev.Dockerfile target: client ports: - $PACKRAT_CLIENT_PORT:3000 @@ -31,17 +31,17 @@ services: - NODE_ENV=$NODE_ENV - REACT_APP_SERVER_ENDPOINT=$REACT_APP_SERVER_ENDPOINT volumes: - - ./node_modules:/app/node_modules - - ./package.json:/app/package.json - - ./client:/app/client + - ../../node_modules:/app/node_modules + - ../../package.json:/app/package.json + - ../../client:/app/client packrat-server: container_name: packrat-server image: packrat-server restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/server-dev.Dockerfile target: server ports: - $PACKRAT_SERVER_PORT:4000 @@ -56,10 +56,18 @@ services: - OCFL_STORAGE_ROOT=$OCFL_STORAGE_ROOT - OCFL_STAGING_ROOT=$OCFL_STAGING_ROOT - PACKRAT_SOLR_HOST=$PACKRAT_SOLR_HOST + - COOK_SERVER_URL=$COOK_SERVER_URL + - AUTH_TYPE=$AUTH_TYPE + - LDAP_SERVER=$LDAP_SERVER + - LDAP_PASSWORD=$LDAP_PASSWORD + - LDAP_CN=$LDAP_CN + - LDAP_OU=$LDAP_OU + - LDAP_DC=$LDAP_DC + volumes: - - ./node_modules:/app/node_modules - - ./package.json:/app/package.json - - ./server:/app/server + - ../../node_modules:/app/node_modules + - ../../package.json:/app/package.json + - ../../server:/app/server depends_on: - db @@ -68,26 +76,28 @@ services: image: packrat-db restart: always build: - context: . - dockerfile: ./docker/dev.Dockerfile + context: ../.. + dockerfile: ./conf/docker/db.Dockerfile target: db ports: - $PACKRAT_DB_PORT:3306 environment: - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD volumes: - - ./server/db/sql:/app/ + - ../../server/db/sql:/app/ packrat-solr: container_name: packrat-solr image: packrat-solr restart: always build: - context: . - dockerfile: ./docker/solr.Dockerfile + context: ../.. + dockerfile: ./conf/docker/solr.Dockerfile target: solr ports: - $PACKRAT_SOLR_PORT:8983 + volumes: + - ../../server/config/solr/data/packrat:/var/solr/data/packrat networks: default: diff --git a/docker-compose.prod.yml b/conf/docker/docker-compose.prod.yml similarity index 71% rename from docker-compose.prod.yml rename to conf/docker/docker-compose.prod.yml index 795aa1870..4cb009ea2 100644 --- a/docker-compose.prod.yml +++ b/conf/docker/docker-compose.prod.yml @@ -6,22 +6,22 @@ services: image: packrat-proxy restart: always build: - context: . - dockerfile: ./docker/prod.Dockerfile + context: ../.. + dockerfile: ./conf/docker/proxy-prod.Dockerfile target: proxy depends_on: - packrat-client - packrat-server ports: - - 80:80 + - $PACKRAT_PROXY_PORT:80 packrat-client: container_name: packrat-client image: packrat-client restart: always build: - context: . - dockerfile: ./docker/prod.Dockerfile + context: ../.. + dockerfile: ./conf/docker/client-prod.Dockerfile target: client ports: - $PACKRAT_CLIENT_PORT:3000 @@ -34,8 +34,8 @@ services: image: packrat-server restart: always build: - context: . - dockerfile: ./docker/prod.Dockerfile + context: ../.. + dockerfile: ./conf/docker/server-prod.Dockerfile target: server ports: - $PACKRAT_SERVER_PORT:4000 @@ -50,6 +50,14 @@ services: - OCFL_STORAGE_ROOT=$OCFL_STORAGE_ROOT - OCFL_STAGING_ROOT=$OCFL_STAGING_ROOT - PACKRAT_SOLR_HOST=$PACKRAT_SOLR_HOST + - COOK_SERVER_URL=$COOK_SERVER_URL + - AUTH_TYPE=$AUTH_TYPE + - LDAP_SERVER=$LDAP_SERVER + - LDAP_PASSWORD=$LDAP_PASSWORD + - LDAP_CN=$LDAP_CN + - LDAP_OU=$LDAP_OU + - LDAP_DC=$LDAP_DC + depends_on: - db @@ -67,11 +75,13 @@ services: image: packrat-solr restart: always build: - context: . - dockerfile: ./docker/solr.Dockerfile + context: ../.. + dockerfile: ./conf/docker/solr.Dockerfile target: solr ports: - $PACKRAT_SOLR_PORT:8983 + volumes: + - ../../server/config/solr/data/packrat:/var/solr/data/packrat networks: default: diff --git a/conf/docker/proxy-dev.Dockerfile b/conf/docker/proxy-dev.Dockerfile new file mode 100644 index 000000000..52f20d24b --- /dev/null +++ b/conf/docker/proxy-dev.Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.17.10 as proxy +EXPOSE 80 +RUN rm /usr/share/nginx/html/* +COPY ./conf/nginx/nginx-dev.conf /etc/nginx/nginx.conf +CMD ["nginx", "-g", "daemon off;"] diff --git a/conf/docker/proxy-prod.Dockerfile b/conf/docker/proxy-prod.Dockerfile new file mode 100644 index 000000000..47d41e076 --- /dev/null +++ b/conf/docker/proxy-prod.Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.17.10 as proxy +EXPOSE 80 +RUN rm /usr/share/nginx/html/* +COPY ./conf/nginx/nginx-prod.conf /etc/nginx/nginx.conf +CMD ["nginx", "-g", "daemon off;"] diff --git a/conf/docker/server-dev.Dockerfile b/conf/docker/server-dev.Dockerfile new file mode 100644 index 000000000..5afa13b61 --- /dev/null +++ b/conf/docker/server-dev.Dockerfile @@ -0,0 +1,18 @@ +FROM node:12.18.4-alpine AS base +# Add a work directory +WORKDIR /app +# Copy package.json for caching +ADD package*.json . +# Copy app files +COPY . . + +# Build server from common base +FROM base AS server +# Remove client to prevent duplication +RUN rm -rf client +# Expose port(s) +EXPOSE 4000 +# Install dependencies and build +RUN yarn && yarn build:dev +# Start on excecution +CMD [ "yarn", "start:server" ] diff --git a/conf/docker/server-prod.Dockerfile b/conf/docker/server-prod.Dockerfile new file mode 100644 index 000000000..68993140d --- /dev/null +++ b/conf/docker/server-prod.Dockerfile @@ -0,0 +1,25 @@ +FROM node:12.18.4-alpine AS base +# Add a work directory +WORKDIR /app +# Copy package.json for caching +ADD package.json yarn.lock ./ +# Copy app files +COPY . . + +FROM base AS server-builder +# Remove client from server build +RUN rm -rf client +# Install dependencies (production mode) and build +RUN yarn install --frozen-lockfile && yarn build:prod + +# Server's production image +FROM node:12.18.4-alpine AS server +# Add a work directory +WORKDIR /app +# Copy from server-builder +COPY --from=server-builder /app/node_modules ./node_modules +COPY --from=server-builder /app/server ./server +# Expose port(s) +EXPOSE 4000 +# Start on excecution +CMD [ "node", "server/build/index.js" ] diff --git a/docker/solr.Dockerfile b/conf/docker/solr.Dockerfile similarity index 100% rename from docker/solr.Dockerfile rename to conf/docker/solr.Dockerfile diff --git a/nginx.conf b/conf/nginx/nginx-dev.conf similarity index 100% rename from nginx.conf rename to conf/nginx/nginx-dev.conf diff --git a/scripts/proxy/nginx.conf b/conf/nginx/nginx-prod.conf similarity index 100% rename from scripts/proxy/nginx.conf rename to conf/nginx/nginx-prod.conf diff --git a/scripts/cleanup.sh b/conf/scripts/cleanup.sh similarity index 78% rename from scripts/cleanup.sh rename to conf/scripts/cleanup.sh index 9946f0934..d55cdf9ae 100644 --- a/scripts/cleanup.sh +++ b/conf/scripts/cleanup.sh @@ -1,3 +1,3 @@ # This script is used to cleanup dangaling images after build -# usage: ./scripts/cleanup.sh +# usage: ./conf/scripts/cleanup.sh sudo docker rmi $(sudo docker images -f "dangling=true" -q) \ No newline at end of file diff --git a/scripts/deploy.sh b/conf/scripts/deploy.sh similarity index 83% rename from scripts/deploy.sh rename to conf/scripts/deploy.sh index ba38e053d..9fef5ab86 100644 --- a/scripts/deploy.sh +++ b/conf/scripts/deploy.sh @@ -1,5 +1,5 @@ # This script helps with deployment of Packrat system -# usage: ./scripts/deploy.sh (environment: dev | prod) +# usage: ./conf/scripts/deploy.sh (environment: dev | prod) DEV="dev" PROD="prod" @@ -44,4 +44,4 @@ export ENV=$ENV echo "Deploying docker images for env $1 with tag: $IMAGE_TAG" # Build packrat-server and client dynamically for environment's requested -docker-compose --env-file .env.$1 -f docker-compose.deploy.yml up --build -d packrat-server-$1 packrat-client-$1 packrat-solr-$1 +docker-compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up --build -d packrat-server-$1 packrat-client-$1 packrat-solr-$1 diff --git a/conf/scripts/devbox/db.sh b/conf/scripts/devbox/db.sh new file mode 100755 index 000000000..5b40a5dcf --- /dev/null +++ b/conf/scripts/devbox/db.sh @@ -0,0 +1,12 @@ +# Creates and seeds the packrat db + +docker run --name packrat-devbox-db -p 3306:3306 -v ${PWD}/server/db/sql:/app --env-file ./.env.dev -itd mariadb:10.5 + +SQL_PASSWORD=$(grep MYSQL_ROOT_PASSWORD .env.dev | cut -d '=' -f2) + +docker exec -i packrat-devbox-db sh -c "mysql -u root -p$SQL_PASSWORD -e 'CREATE DATABASE IF NOT EXISTS Packrat'" +docker exec -i packrat-devbox-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.SCHEMA.sql" +docker exec -i packrat-devbox-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.PROC.sql" +docker exec -i packrat-devbox-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.DATA.sql" + +echo "Done" \ No newline at end of file diff --git a/conf/scripts/devbox/network.sh b/conf/scripts/devbox/network.sh new file mode 100755 index 000000000..961889864 --- /dev/null +++ b/conf/scripts/devbox/network.sh @@ -0,0 +1,8 @@ +# Creates a docker network and connect devbox and db + +docker network create packrat-devbox-network +docker network connect packrat-devbox-network packrat-devbox +docker network connect packrat-devbox-network packrat-devbox-db +docker network connect packrat-devbox-network packrat-devbox-solr + +echo "Done" \ No newline at end of file diff --git a/conf/scripts/devbox/solr.sh b/conf/scripts/devbox/solr.sh new file mode 100644 index 000000000..104a4d6d4 --- /dev/null +++ b/conf/scripts/devbox/solr.sh @@ -0,0 +1,7 @@ +# Devbox for Packrat + +# Run node docker image and map port 8983 for access to solr +docker run --name packrat-devbox-solr -p 8983:8983 -v ${PWD}/server/config/solr/data/packrat/:/var/solr/data/packrat/ --env-file ./.env.dev -itd solr:8 + +echo "Done" +## COPY --chown=solr:solr ./server/config/solr/data/packrat/ /var/solr/data/packrat/ diff --git a/scripts/devbox/up.sh b/conf/scripts/devbox/up.sh similarity index 64% rename from scripts/devbox/up.sh rename to conf/scripts/devbox/up.sh index a48180165..b155b15a8 100755 --- a/scripts/devbox/up.sh +++ b/conf/scripts/devbox/up.sh @@ -1,8 +1,6 @@ # Devbox for Packrat -IMAGE=node:12.18.4 -PACKRAT_WORKDIR=/app # Run node docker image and map port 3000, 4000 for access to client and server -docker run --name packrat-devbox -p 3000:3000 -p 4000:4000 -v ${PWD}:${PACKRAT_WORKDIR} --env-file ./.env.dev -itd $IMAGE +docker run --name packrat-devbox -p 3000:3000 -p 4000:4000 -v ${PWD}:/app --env-file ./.env.dev -itd node:12.18.4-alpine echo "Done" \ No newline at end of file diff --git a/scripts/initdb.sh b/conf/scripts/initdb.sh similarity index 65% rename from scripts/initdb.sh rename to conf/scripts/initdb.sh index 69e1727ed..195ff7283 100755 --- a/scripts/initdb.sh +++ b/conf/scripts/initdb.sh @@ -1,7 +1,7 @@ # This script helps with deployment of Packrat system's DB -# usage: ./scripts/initdb.sh (environment: dev | prod) +# usage: ./conf/scripts/initdb.sh (environment: dev | prod) # -# example: MYSQL_ROOT_PASSWORD= ./scripts/initdb.sh dev +# example: MYSQL_ROOT_PASSWORD= ./conf/scripts/initdb.sh dev # Check if the variable MYSQL_ROOT_PASSWORD is set or not if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] @@ -38,9 +38,10 @@ export ENV=$ENV echo "Starting docker DB image for env $1 with tag: $IMAGE_TAG" # Start the databases -docker-compose --env-file .env.$1 -f docker-compose.deploy.yml up -d packrat-db-$1 +docker-compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-db-$1 # DB init scripts -docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD < /app/scripts/Packrat.SCHEMA.sql" -docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD < /app/scripts/Packrat.PROC.sql" -docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD < /app/scripts/Packrat.DATA.sql" +docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD -e 'CREATE DATABASE IF NOT EXISTS Packrat'" +docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD --database=Packrat < /app/scripts/Packrat.SCHEMA.sql" +docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD --database=Packrat < /app/scripts/Packrat.PROC.sql" +docker exec -i packrat-db-$1 sh -c "mysql -u root -p$MYSQL_ROOT_PASSWORD --database=Packrat < /app/scripts/Packrat.DATA.sql" diff --git a/conf/scripts/packs.sh b/conf/scripts/packs.sh new file mode 100644 index 000000000..b7fc2a942 --- /dev/null +++ b/conf/scripts/packs.sh @@ -0,0 +1,24 @@ +# Opens a shell in the specified docker container +# Input validation +if [[ $1 != "server" && + $1 != "client" && + $1 != "solr" && + $1 != "db" ]] +then + echo "Usage: packsh.sh (server|client|solr|db) (dev|prod)" + echo "Example: packsh.sh server dev" + echo " Opens a shell in the specified docker container" + exit 1 +fi + +# Input validation +if [[ $2 == "prod" ]] +then + ENV="prod" +else + ENV="dev" +fi + +CONTAINER=packrat-$1-$ENV + +docker exec -it $CONTAINER /bin/sh diff --git a/scripts/proxy/refresh.sh b/conf/scripts/refreshProxy.sh similarity index 83% rename from scripts/proxy/refresh.sh rename to conf/scripts/refreshProxy.sh index 13b85efa8..27a93332e 100755 --- a/scripts/proxy/refresh.sh +++ b/conf/scripts/refreshProxy.sh @@ -1,5 +1,5 @@ # Updates the global nginx.conf on the server -sudo cp -v ./scripts/proxy/nginx.conf /etc/nginx/nginx.conf +sudo cp -v ./conf/nginx/nginx-prod.conf /etc/nginx/nginx.conf echo "Restarting nginx service" # Restart nginx service diff --git a/scripts/reload.sh b/conf/scripts/reload.sh similarity index 79% rename from scripts/reload.sh rename to conf/scripts/reload.sh index ea289e85f..d0b110642 100644 --- a/scripts/reload.sh +++ b/conf/scripts/reload.sh @@ -1,5 +1,5 @@ # This script helps with updating docker images with new .env's -# usage: ./scripts/reload.sh (environment: dev | prod) +# usage: ./conf/scripts/reload.sh (environment: dev | prod) DEV="dev" PROD="prod" @@ -31,4 +31,4 @@ export ENV=$ENV echo "Reloading docker images for env $1 with tag: $IMAGE_TAG" # Build packrat-server and client dynamically for environment's requested -docker-compose --env-file .env.$1 -f docker-compose.deploy.yml up -d packrat-server-$1 packrat-client-$1 packrat-solr-$1 +docker-compose --env-file .env.$1 -f ./conf/docker/docker-compose.deploy.yml up -d packrat-server-$1 packrat-client-$1 packrat-solr-$1 diff --git a/docker/dev.Dockerfile b/docker/dev.Dockerfile deleted file mode 100644 index eeb21b3fe..000000000 --- a/docker/dev.Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -FROM node:12.18.4-alpine AS base -# Add a work directory -WORKDIR /app -# Copy package.json for caching -ADD package*.json . -# Copy app files -COPY . . - -# Build client from common base -FROM base AS client -# Remove server to prevent duplication -RUN rm -rf server -# Expose port(s) -EXPOSE 3000 -# Install dependencies and build -RUN yarn && yarn build:dev -# Start on excecution -CMD [ "yarn", "start:client" ] - -# Build server from common base -FROM base AS server -# Remove client to prevent duplication -RUN rm -rf client -# Expose port(s) -EXPOSE 4000 -# Install dependencies and build -RUN yarn && yarn build:dev -# Start on excecution -CMD [ "yarn", "start:server" ] - -FROM nginx:1.17.10 as proxy -EXPOSE 80 -RUN rm /usr/share/nginx/html/* -COPY nginx.conf /etc/nginx/nginx.conf -CMD ["nginx", "-g", "daemon off;"] - -FROM mariadb:10.5 as db - -FROM solr:8 as solr -COPY --chown=solr:solr ./server/config/solr/data/packrat/ /var/solr/data/packrat/ diff --git a/docker/prod.Dockerfile b/docker/prod.Dockerfile deleted file mode 100644 index 7e0fd2e23..000000000 --- a/docker/prod.Dockerfile +++ /dev/null @@ -1,53 +0,0 @@ -FROM node:12.18.4-alpine AS base -# Add a work directory -WORKDIR /app -# Copy package.json for caching -ADD package.json yarn.lock ./ -# Copy app files -COPY . . - -FROM base AS client-builder -# Remove server from client build -RUN rm -rf server -# Install dependencies (production mode) and build -RUN yarn install --frozen-lockfile && yarn build:prod - -FROM base AS server-builder -# Remove client from server build -RUN rm -rf client -# Install dependencies (production mode) and build -RUN yarn install --frozen-lockfile && yarn build:prod - -# Client's production image -FROM node:12.18.4-alpine AS client -# Add a work directory -WORKDIR /app -# Copy from client-builder -COPY --from=client-builder /app/client/build . -# Expose port(s) -EXPOSE 3000 -# Install static file server -RUN npm i -g serve -# Start on excecution -CMD serve -s . -l 3000 - -# Server's production image -FROM node:12.18.4-alpine AS server -# Add a work directory -WORKDIR /app -# Copy from server-builder -COPY --from=server-builder /app/node_modules ./node_modules -COPY --from=server-builder /app/server ./server -# Expose port(s) -EXPOSE 4000 -# Start on excecution -CMD [ "node", "server/build/index.js" ] - -FROM nginx:1.17.10 as proxy -EXPOSE 80 -RUN rm /usr/share/nginx/html/* -COPY nginx.conf /etc/nginx/nginx.conf -CMD ["nginx", "-g", "daemon off;"] - -FROM solr:8 as solr -COPY --chown=solr:solr ./server/config/solr/data/packrat/ /var/solr/data/packrat/ diff --git a/e2e/package.json b/e2e/package.json index d32808bd5..ba9c8cb85 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -1,6 +1,6 @@ { "name": "@dpo-packrat/e2e", - "version": "0.4.0", + "version": "0.6.0", "private": true, "license": "Apache-2.0", "description": "E2E tests for packrat", @@ -26,12 +26,12 @@ "test": "jest --passWithNoTests --detectOpenHandles --forceExit" }, "devDependencies": { - "jest": "26.6.0", + "jest": "26.6.3", "playwright": "1.5.1", - "ts-jest": "26.4.1" + "ts-jest": "26.5.4" }, "volta": { - "node": "12.18.4", - "yarn": "1.22.4" + "node": "14.16.0", + "yarn": "1.22.10" } } diff --git a/e2e/yarn.lock b/e2e/yarn.lock index 80748467a..f786f1747 100644 --- a/e2e/yarn.lock +++ b/e2e/yarn.lock @@ -97,6 +97,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz#2f75a831269d4f677de49986dff59927533cf375" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== +"@babel/helper-plugin-utils@^7.12.13": + version "7.13.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" + integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== + "@babel/helper-replace-supers@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz#f15c9cc897439281891e11d5ce12562ac0cf3fa9" @@ -226,6 +231,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-top-level-await@^7.8.3": + version "7.12.13" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" + integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== + dependencies: + "@babel/helper-plugin-utils" "^7.12.13" + "@babel/template@^7.10.4", "@babel/template@^7.3.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278" @@ -288,93 +300,93 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.2.tgz#26520bf09abe4a5644cd5414e37125a8954241dd" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== -"@jest/console@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.0.tgz#fd4a4733df3c50260aefb227414296aee96e682f" - integrity sha512-ArGcZWAEYMWmWnc/QvxLDvFmGRPvmHeulhS7FUUAlUGR5vS/SqMfArsGaYmIFEThSotCMnEihwx1h62I1eg5lg== +"@jest/console@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" + integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^26.6.0" - jest-util "^26.6.0" + jest-message-util "^26.6.2" + jest-util "^26.6.2" slash "^3.0.0" -"@jest/core@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.0.tgz#04dd3e046e9ebbe06a4f330e05a67f21f7bb314a" - integrity sha512-7wbunxosnC5zXjxrEtTQSblFjRVOT8qz1eSytw8riEeWgegy3ct91NLPEP440CDuWrmW3cOLcEGxIf9q2u6O9Q== +"@jest/core@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" + integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== dependencies: - "@jest/console" "^26.6.0" - "@jest/reporters" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.2" + "@jest/reporters" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" - jest-changed-files "^26.6.0" - jest-config "^26.6.0" - jest-haste-map "^26.6.0" - jest-message-util "^26.6.0" + jest-changed-files "^26.6.2" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-resolve-dependencies "^26.6.0" - jest-runner "^26.6.0" - jest-runtime "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" - jest-watcher "^26.6.0" + jest-resolve "^26.6.2" + jest-resolve-dependencies "^26.6.3" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" + jest-watcher "^26.6.2" micromatch "^4.0.2" p-each-series "^2.1.0" rimraf "^3.0.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.0.tgz#695ee24cbf110456272caa9debbbf7e01afb2f78" - integrity sha512-l+5MSdiC4rUUrz8xPdj0TwHBwuoqMcAbFnsYDTn5FkenJl8b+lvC5NdJl1tVICGHWnx0fnjdd1luRZ7u3U4xyg== +"@jest/environment@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" + integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== dependencies: - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.0" + jest-mock "^26.6.2" -"@jest/fake-timers@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.0.tgz#5b4cc83fab91029963c53e6e2716f02544323b22" - integrity sha512-7VQpjChrwlwvGNysS10lDBLOVLxMvMtpx0Xo6aIotzNVyojYk0NN0CR8R4T6h/eu7Zva/LB3P71jqwGdtADoag== +"@jest/fake-timers@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" + integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@sinonjs/fake-timers" "^6.0.1" "@types/node" "*" - jest-message-util "^26.6.0" - jest-mock "^26.6.0" - jest-util "^26.6.0" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" + jest-util "^26.6.2" -"@jest/globals@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.0.tgz#da2f58d17105b6a7531ee3c8724acb5f233400e2" - integrity sha512-rs3a/a8Lq8FgTx11SxbqIU2bDjsFU2PApl2oK2oUVlo84RSF76afFm2nLojW93AGssr715GHUwhq5b6mpCI5BQ== +"@jest/globals@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" + integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== dependencies: - "@jest/environment" "^26.6.0" - "@jest/types" "^26.6.0" - expect "^26.6.0" + "@jest/environment" "^26.6.2" + "@jest/types" "^26.6.2" + expect "^26.6.2" -"@jest/reporters@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.0.tgz#2a8d631ad3b19a722fd0fae58ce9fa25e8aac1cf" - integrity sha512-PXbvHhdci5Rj1VFloolgLb+0kkdtzswhG8MzVENKJRI3O1ndwr52G6E/2QupjwrRcYnApZOelFf4nNpf5+SDxA== +"@jest/reporters@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" + integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" @@ -385,79 +397,69 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.0.2" - jest-haste-map "^26.6.0" - jest-resolve "^26.6.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-haste-map "^26.6.2" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" slash "^3.0.0" source-map "^0.6.0" string-length "^4.0.1" terminal-link "^2.0.0" - v8-to-istanbul "^6.0.1" + v8-to-istanbul "^7.0.0" optionalDependencies: node-notifier "^8.0.0" -"@jest/source-map@^26.5.0": - version "26.5.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.5.0.tgz#98792457c85bdd902365cd2847b58fff05d96367" - integrity sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g== +"@jest/source-map@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" + integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== dependencies: callsites "^3.0.0" graceful-fs "^4.2.4" source-map "^0.6.0" -"@jest/test-result@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.0.tgz#79705c8a57165777af5ef1d45c65dcc4a5965c11" - integrity sha512-LV6X1ry+sKjseQsIFz3e6XAZYxwidvmeJFnVF08fq98q08dF1mJYI0lDq/LmH/jas+R4s0pwnNGiz1hfC4ZUBw== +"@jest/test-result@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" + integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== dependencies: - "@jest/console" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.2" + "@jest/types" "^26.6.2" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.0.tgz#a9dbc6545b1c59e7f375b05466e172126609906d" - integrity sha512-rWPTMa+8rejvePZnJmnKkmKWh0qILFDPpN0qbSif+KNGvFxqqDGafMo4P2Y8+I9XWrZQBeXL9IxPL4ZzDgRlbw== +"@jest/test-sequencer@^26.6.3": + version "26.6.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" + integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== dependencies: - "@jest/test-result" "^26.6.0" + "@jest/test-result" "^26.6.2" graceful-fs "^4.2.4" - jest-haste-map "^26.6.0" - jest-runner "^26.6.0" - jest-runtime "^26.6.0" + jest-haste-map "^26.6.2" + jest-runner "^26.6.3" + jest-runtime "^26.6.3" -"@jest/transform@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.0.tgz#1a6b95d0c7f9b4f96dd3aab9d28422a9e5e4043e" - integrity sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg== +"@jest/transform@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" + integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== dependencies: "@babel/core" "^7.1.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" babel-plugin-istanbul "^6.0.0" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.4" - jest-haste-map "^26.6.0" + jest-haste-map "^26.6.2" jest-regex-util "^26.0.0" - jest-util "^26.6.0" + jest-util "^26.6.2" micromatch "^4.0.2" pirates "^4.0.1" slash "^3.0.0" source-map "^0.6.1" write-file-atomic "^3.0.0" -"@jest/types@^25.5.0": - version "25.5.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.5.0.tgz#4d6a4793f7b9599fc3680877b856a97dbccf2a9d" - integrity sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - "@jest/types@^26.6.0": version "26.6.0" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.0.tgz#2c045f231bfd79d52514cda3fbc93ef46157fa6a" @@ -469,6 +471,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^26.6.2": + version "26.6.2" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" + integrity sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^15.0.0" + chalk "^4.0.0" + "@sinonjs/commons@^1.7.0": version "1.8.1" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.1.tgz#e7df00f98a203324f6dc7cc606cad9d4a8ab2217" @@ -535,14 +548,6 @@ dependencies: "@types/istanbul-lib-coverage" "*" -"@types/istanbul-reports@^1.1.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz#e875cc689e47bce549ec81f3df5e6f6f11cfaeb2" - integrity sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - "@types/istanbul-reports@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz#508b13aa344fa4976234e75dddcc34925737d821" @@ -550,14 +555,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@26.x": - version "26.0.14" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.14.tgz#078695f8f65cb55c5a98450d65083b2b73e5a3f3" - integrity sha512-Hz5q8Vu0D288x3iWXePSn53W7hAjP0H7EQ6QvDO9c7t46mR0lNOLlfuwQ+JkVxuhygHzlzPX+0jKdA3ZgSh+Vg== - dependencies: - jest-diff "^25.2.1" - pretty-format "^25.2.1" - "@types/node@*": version "14.11.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.11.10.tgz#8c102aba13bf5253f35146affbf8b26275069bef" @@ -743,16 +740,16 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428" integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA== -babel-jest@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.0.tgz#eca57ac8af99d6e06047e595b1faf0b5adf8a7bb" - integrity sha512-JI66yILI7stzjHccAoQtRKcUwJrJb4oMIxLTirL3GdAjGpaUBQSjZDFi9LsPkN4gftsS4R2AThAJwOjJxadwbg== +babel-jest@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" + integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== dependencies: - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/babel__core" "^7.1.7" babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.5.0" + babel-preset-jest "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" slash "^3.0.0" @@ -768,20 +765,20 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz#3916b3a28129c29528de91e5784a44680db46385" - integrity sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw== +babel-plugin-jest-hoist@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" + integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.0.0" "@types/babel__traverse" "^7.0.6" -babel-preset-current-node-syntax@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.4.tgz#826f1f8e7245ad534714ba001f84f7e906c3b615" - integrity sha512-5/INNCYhUGqw7VbVjT/hb3ucjgkVHKXY7lX3ZjlN4gm565VyFmJUrJ/h+h16ECVB38R/9SF6aACydpKMLZ/c9w== +babel-preset-current-node-syntax@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" + integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== dependencies: "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-bigint" "^7.8.3" @@ -794,14 +791,15 @@ babel-preset-current-node-syntax@^0.1.3: "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz#f1b166045cd21437d1188d29f7fba470d5bdb0e7" - integrity sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA== +babel-preset-jest@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" + integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== dependencies: - babel-plugin-jest-hoist "^26.5.0" - babel-preset-current-node-syntax "^0.1.3" + babel-plugin-jest-hoist "^26.6.2" + babel-preset-current-node-syntax "^1.0.0" balanced-match@^1.0.0: version "1.0.0" @@ -939,14 +937,6 @@ chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" @@ -965,6 +955,11 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== +cjs-module-lexer@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" + integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== + class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1184,15 +1179,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - -diff-sequences@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.5.0.tgz#ef766cf09d43ed40406611f11c6d8d9dd8b2fefd" - integrity sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q== +diff-sequences@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" + integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== domexception@^2.0.1: version "2.0.1" @@ -1321,16 +1311,16 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.0.tgz#f48861317f62bb9f1248eaab7ae9e50a9a5a8339" - integrity sha512-EzhbZ1tbwcaa5Ok39BI11flIMeIUSlg1QsnXOrleaMvltwHsvIQPBtL710l+ma+qDFLUgktCXK4YuQzmHdm7cg== +expect@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" + integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" ansi-styles "^4.0.0" jest-get-type "^26.3.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" jest-regex-util "^26.0.0" extend-shallow@^2.0.1: @@ -1727,6 +1717,13 @@ is-core-module@^2.0.0: dependencies: has "^1.0.3" +is-core-module@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" + integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -1905,77 +1902,67 @@ istanbul-reports@^3.0.2: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.0.tgz#63b04aa261b5733c6ade96b7dd24784d12d8bb2d" - integrity sha512-k8PZzlp3cRWDe0fDc/pYs+c4w36+hiWXe1PpW/pW1UJmu1TNTAcQfZUrVYleij+uEqlY6z4mPv7Iff3kY0o5SQ== +jest-changed-files@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" + integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" execa "^4.0.0" throat "^5.0.0" -jest-cli@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.0.tgz#dc3ae34fd5937310493ed07dc79c5ffba2bf6671" - integrity sha512-lJAMZGpmML+y3Kfln6L5DGRTfKGQ+n1JDM1RQstojSLUhe/EaXWR8vmcx70v4CyJKvFZs7c/0QDkPX5ra/aDew== +jest-cli@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" + integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== dependencies: - "@jest/core" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/core" "^26.6.3" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" chalk "^4.0.0" exit "^0.1.2" graceful-fs "^4.2.4" import-local "^3.0.2" is-ci "^2.0.0" - jest-config "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-config "^26.6.3" + jest-util "^26.6.2" + jest-validate "^26.6.2" prompts "^2.0.1" yargs "^15.4.1" -jest-config@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.0.tgz#cb879a37002f881edb66d673fd40b6704595de89" - integrity sha512-RCR1Kf7MGJ5waVCvrj/k3nCAJKquWZlzs8rkskzj0KlG392hNBOaYd5FQ4cCac08j6pwfIDOwNvMcy0/FqguJg== +jest-config@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" + integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== dependencies: "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.0" - "@jest/types" "^26.6.0" - babel-jest "^26.6.0" + "@jest/test-sequencer" "^26.6.3" + "@jest/types" "^26.6.2" + babel-jest "^26.6.3" chalk "^4.0.0" deepmerge "^4.2.2" glob "^7.1.1" graceful-fs "^4.2.4" - jest-environment-jsdom "^26.6.0" - jest-environment-node "^26.6.0" + jest-environment-jsdom "^26.6.2" + jest-environment-node "^26.6.2" jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.0" + jest-jasmine2 "^26.6.3" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-resolve "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" micromatch "^4.0.2" - pretty-format "^26.6.0" + pretty-format "^26.6.2" -jest-diff@^25.2.1: - version "25.5.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.5.0.tgz#1dd26ed64f96667c068cef026b677dfa01afcfa9" - integrity sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.5.0" - -jest-diff@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.0.tgz#5e5bbbaf93ec5017fae2b3ef12fc895e29988379" - integrity sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w== +jest-diff@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" + integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== dependencies: chalk "^4.0.0" - diff-sequences "^26.5.0" + diff-sequences "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.6.0" + pretty-format "^26.6.2" jest-docblock@^26.0.0: version "26.0.0" @@ -1984,135 +1971,131 @@ jest-docblock@^26.0.0: dependencies: detect-newline "^3.0.0" -jest-each@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.0.tgz#9e9d90a4fc5a79e1d99a008897038325a6c7fbbf" - integrity sha512-7LzSNwNviYnm4FWK46itIE03NqD/8O8/7tVQ5rwTdTNrmPMQoQ1Z7hEFQ1uzRReluOFislpurpnQ0QsclSiDkA== +jest-each@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" + integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" chalk "^4.0.0" jest-get-type "^26.3.0" - jest-util "^26.6.0" - pretty-format "^26.6.0" + jest-util "^26.6.2" + pretty-format "^26.6.2" -jest-environment-jsdom@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.0.tgz#2ce353fb82d27a9066bfea3ff2c27d9405076c69" - integrity sha512-bXO9IG7a3YlyiHxwfKF+OWoTA+GIw4FrD+Y0pb6CC+nKs5JuSRZmR2ovEX6PWo6KY42ka3JoZOp3KEnXiFPPCg== +jest-environment-jsdom@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" + integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== dependencies: - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.0" - jest-util "^26.6.0" + jest-mock "^26.6.2" + jest-util "^26.6.2" jsdom "^16.4.0" -jest-environment-node@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.0.tgz#97f6e48085e67bda43b97f48e678ce78d760cd14" - integrity sha512-kWU6ZD1h6fs7sIl6ufuK0sXW/3d6WLaj48iow0NxhgU6eY89d9K+0MVmE0cRcVlh53yMyxTK6b+TnhLOnlGp/A== +jest-environment-node@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" + integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== dependencies: - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" - jest-mock "^26.6.0" - jest-util "^26.6.0" - -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== + jest-mock "^26.6.2" + jest-util "^26.6.2" jest-get-type@^26.3.0: version "26.3.0" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-haste-map@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.0.tgz#4cd392bc51109bd8e0f765b2d5afa746bebb5ce2" - integrity sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w== +jest-haste-map@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" + integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@types/graceful-fs" "^4.1.2" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.4" jest-regex-util "^26.0.0" - jest-serializer "^26.5.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-serializer "^26.6.2" + jest-util "^26.6.2" + jest-worker "^26.6.2" micromatch "^4.0.2" sane "^4.0.3" walker "^1.0.7" optionalDependencies: fsevents "^2.1.2" -jest-jasmine2@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.0.tgz#1b59e26aa56651bae3d4637965c8cd4d3851de6d" - integrity sha512-2E3c+0A9y2OIK5caw5qlcm3b4doaf8FSfXKTX3xqKTUJoR4zXh0xvERBNWxZP9xMNXEi/2Z3LVsZpR2hROgixA== +jest-jasmine2@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" + integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== dependencies: "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.6.0" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/environment" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - expect "^26.6.0" + expect "^26.6.2" is-generator-fn "^2.0.0" - jest-each "^26.6.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" - jest-runtime "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - pretty-format "^26.6.0" + jest-each "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-runtime "^26.6.3" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + pretty-format "^26.6.2" throat "^5.0.0" -jest-leak-detector@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.0.tgz#a211c4c7627743e8d87b392bf92502cd64275df3" - integrity sha512-3oMv34imWTl1/nwKnmE/DxYo3QqHnZeF3nO6UzldppkhW0Za7OY2DYyWiamqVzwdUrjhoQkY5g+aF6Oc3alYEQ== +jest-leak-detector@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" + integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== dependencies: jest-get-type "^26.3.0" - pretty-format "^26.6.0" + pretty-format "^26.6.2" -jest-matcher-utils@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.0.tgz#8f57d78353275bfa7a3ccea128c1030b347138e2" - integrity sha512-BUy/dQYb7ELGRazmK4ZVkbfPYCaNnrMtw1YljVhcKzWUxBM0xQ+bffrfnMLdRZp4wUUcT4ahaVnA3VWZtXWP9Q== +jest-matcher-utils@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" + integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== dependencies: chalk "^4.0.0" - jest-diff "^26.6.0" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - pretty-format "^26.6.0" + pretty-format "^26.6.2" -jest-message-util@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.0.tgz#c3499053022e05765f71b8c2535af63009e2d4be" - integrity sha512-WPAeS38Kza29f04I0iOIQrXeiebRXjmn6cFehzI7KKJOgT0NmqYAcLgjWnIAfKs5FBmEQgje1kXab0DaLKCl2w== +jest-message-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" + integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== dependencies: "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.4" micromatch "^4.0.2" + pretty-format "^26.6.2" slash "^3.0.0" stack-utils "^2.0.2" -jest-mock@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.0.tgz#5d13a41f3662a98a55c7742ac67c482e232ded13" - integrity sha512-HsNmL8vVIn1rL1GWA21Drpy9Cl+7GImwbWz/0fkWHrUXVzuaG7rP0vwLtE+/n70Mt0U8nPkz8fxioi3SC0wqhw== +jest-mock@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" + integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@types/node" "*" jest-pnp-resolver@^1.2.2: @@ -2125,118 +2108,119 @@ jest-regex-util@^26.0.0: resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== -jest-resolve-dependencies@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.0.tgz#05bfecc977a3a48929fc7d9876f03d93a16b7df0" - integrity sha512-4di+XUT7LwJJ8b8qFEEDQssC5+aeVjLhvRICCaS4alh/EVS9JCT1armfJ3pnSS8t4o6659WbMmKVo82H4LuUVw== +jest-resolve-dependencies@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" + integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" jest-regex-util "^26.0.0" - jest-snapshot "^26.6.0" + jest-snapshot "^26.6.2" -jest-resolve@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.0.tgz#070fe7159af87b03e50f52ea5e17ee95bbee40e1" - integrity sha512-tRAz2bwraHufNp+CCmAD8ciyCpXCs1NQxB5EJAmtCFy6BN81loFEGWKzYu26Y62lAJJe4X4jg36Kf+NsQyiStQ== +jest-resolve@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" + integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" chalk "^4.0.0" graceful-fs "^4.2.4" jest-pnp-resolver "^1.2.2" - jest-util "^26.6.0" + jest-util "^26.6.2" read-pkg-up "^7.0.1" - resolve "^1.17.0" + resolve "^1.18.1" slash "^3.0.0" -jest-runner@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.0.tgz#465a76efc9ec12cfd83a2af3a6cfb695b13a3efe" - integrity sha512-QpeN6pje8PQvFgT+wYOlzeycKd67qAvSw5FgYBiX2cTW+QTiObTzv/k09qRvT09rcCntFxUhy9VB1mgNGFLYIA== +jest-runner@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" + integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== dependencies: - "@jest/console" "^26.6.0" - "@jest/environment" "^26.6.0" - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" chalk "^4.0.0" emittery "^0.7.1" exit "^0.1.2" graceful-fs "^4.2.4" - jest-config "^26.6.0" + jest-config "^26.6.3" jest-docblock "^26.0.0" - jest-haste-map "^26.6.0" - jest-leak-detector "^26.6.0" - jest-message-util "^26.6.0" - jest-resolve "^26.6.0" - jest-runtime "^26.6.0" - jest-util "^26.6.0" - jest-worker "^26.5.0" + jest-haste-map "^26.6.2" + jest-leak-detector "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" + jest-runtime "^26.6.3" + jest-util "^26.6.2" + jest-worker "^26.6.2" source-map-support "^0.5.6" throat "^5.0.0" -jest-runtime@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.0.tgz#90f80ea5eb0d97a1089120f582fb84bd36ca5491" - integrity sha512-JEz4YGnybFvtN4NLID6lsZf0bcd8jccwjWcG5TRE3fYVnxoX1egTthPjnC4btIwWJ6QaaHhtOQ/E3AGn8iClAw== - dependencies: - "@jest/console" "^26.6.0" - "@jest/environment" "^26.6.0" - "@jest/fake-timers" "^26.6.0" - "@jest/globals" "^26.6.0" - "@jest/source-map" "^26.5.0" - "@jest/test-result" "^26.6.0" - "@jest/transform" "^26.6.0" - "@jest/types" "^26.6.0" +jest-runtime@^26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" + integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== + dependencies: + "@jest/console" "^26.6.2" + "@jest/environment" "^26.6.2" + "@jest/fake-timers" "^26.6.2" + "@jest/globals" "^26.6.2" + "@jest/source-map" "^26.6.2" + "@jest/test-result" "^26.6.2" + "@jest/transform" "^26.6.2" + "@jest/types" "^26.6.2" "@types/yargs" "^15.0.0" chalk "^4.0.0" + cjs-module-lexer "^0.6.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" glob "^7.1.3" graceful-fs "^4.2.4" - jest-config "^26.6.0" - jest-haste-map "^26.6.0" - jest-message-util "^26.6.0" - jest-mock "^26.6.0" + jest-config "^26.6.3" + jest-haste-map "^26.6.2" + jest-message-util "^26.6.2" + jest-mock "^26.6.2" jest-regex-util "^26.0.0" - jest-resolve "^26.6.0" - jest-snapshot "^26.6.0" - jest-util "^26.6.0" - jest-validate "^26.6.0" + jest-resolve "^26.6.2" + jest-snapshot "^26.6.2" + jest-util "^26.6.2" + jest-validate "^26.6.2" slash "^3.0.0" strip-bom "^4.0.0" yargs "^15.4.1" -jest-serializer@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.5.0.tgz#f5425cc4c5f6b4b355f854b5f0f23ec6b962bc13" - integrity sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA== +jest-serializer@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" + integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== dependencies: "@types/node" "*" graceful-fs "^4.2.4" -jest-snapshot@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.0.tgz#457aa9c1761efc781ac9c02b021a0b21047c6a38" - integrity sha512-mcqJZeIZqxomvBcsaiIbiEe2g7K1UxnUpTwjMoHb+DX4uFGnuZoZ6m28YOYRyCfZsdU9mmq73rNBnEH2atTR4Q== +jest-snapshot@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" + integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== dependencies: "@babel/types" "^7.0.0" - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" "@types/babel__traverse" "^7.0.4" "@types/prettier" "^2.0.0" chalk "^4.0.0" - expect "^26.6.0" + expect "^26.6.2" graceful-fs "^4.2.4" - jest-diff "^26.6.0" + jest-diff "^26.6.2" jest-get-type "^26.3.0" - jest-haste-map "^26.6.0" - jest-matcher-utils "^26.6.0" - jest-message-util "^26.6.0" - jest-resolve "^26.6.0" + jest-haste-map "^26.6.2" + jest-matcher-utils "^26.6.2" + jest-message-util "^26.6.2" + jest-resolve "^26.6.2" natural-compare "^1.4.0" - pretty-format "^26.6.0" + pretty-format "^26.6.2" semver "^7.3.2" -jest-util@^26.1.0, jest-util@^26.6.0: +jest-util@^26.1.0: version "26.6.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.0.tgz#a81547f6d38738b505c5a594b37d911335dea60f" integrity sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg== @@ -2248,48 +2232,60 @@ jest-util@^26.1.0, jest-util@^26.6.0: is-ci "^2.0.0" micromatch "^4.0.2" -jest-validate@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.0.tgz#b95e2076cca1a58b183e5bcce2bf43af52eebf10" - integrity sha512-FKHNqvh1Pgs4NWas56gsTPmjcIoGAAzSVUCK1+g8euzuCGbmdEr8LRTtOEFjd29uMZUk0PhzmzKGlHPe6j3UWw== +jest-util@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" + integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" + "@types/node" "*" + chalk "^4.0.0" + graceful-fs "^4.2.4" + is-ci "^2.0.0" + micromatch "^4.0.2" + +jest-validate@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" + integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== + dependencies: + "@jest/types" "^26.6.2" camelcase "^6.0.0" chalk "^4.0.0" jest-get-type "^26.3.0" leven "^3.1.0" - pretty-format "^26.6.0" + pretty-format "^26.6.2" -jest-watcher@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.0.tgz#06001c22831583a16f9ccb388ee33316a7f4200f" - integrity sha512-gw5BvcgPi0PKpMlNWQjUet5C5A4JOYrT7gexdP6+DR/f7mRm7wE0o1GqwPwcTsTwo0/FNf9c/kIDXTRaSAYwlw== +jest-watcher@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" + integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== dependencies: - "@jest/test-result" "^26.6.0" - "@jest/types" "^26.6.0" + "@jest/test-result" "^26.6.2" + "@jest/types" "^26.6.2" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^26.6.0" + jest-util "^26.6.2" string-length "^4.0.1" -jest-worker@^26.5.0: - version "26.5.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.5.0.tgz#87deee86dbbc5f98d9919e0dadf2c40e3152fa30" - integrity sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug== +jest-worker@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" + integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^7.0.0" -jest@26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.0.tgz#546b25a1d8c888569dbbe93cae131748086a4a25" - integrity sha512-jxTmrvuecVISvKFFhOkjsWRZV7sFqdSUAd1ajOKY+/QE/aLBVstsJ/dX8GczLzwiT6ZEwwmZqtCUHLHHQVzcfA== +jest@26.6.3: + version "26.6.3" + resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" + integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== dependencies: - "@jest/core" "^26.6.0" + "@jest/core" "^26.6.3" import-local "^3.0.2" - jest-cli "^26.6.0" + jest-cli "^26.6.3" jpeg-js@^0.4.2: version "0.4.2" @@ -2442,16 +2438,16 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= +lodash@4.x: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + lodash@^4.17.19: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" @@ -2856,25 +2852,15 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= -pretty-format@^25.2.1, pretty-format@^25.5.0: - version "25.5.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.5.0.tgz#7873c1d774f682c34b8d48b6743a2bf2ac55791a" - integrity sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ== - dependencies: - "@jest/types" "^25.5.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-format@^26.6.0: - version "26.6.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.0.tgz#1e1030e3c70e3ac1c568a5fd15627671ea159391" - integrity sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA== +pretty-format@^26.6.2: + version "26.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" + integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== dependencies: - "@jest/types" "^26.6.0" + "@jest/types" "^26.6.2" ansi-regex "^5.0.0" ansi-styles "^4.0.0" - react-is "^16.12.0" + react-is "^17.0.1" progress@^2.0.3: version "2.0.3" @@ -2926,10 +2912,10 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -react-is@^16.12.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.1: + version "17.0.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.1.tgz#5b3531bd76a645a4c9fb6e693ed36419e3301339" + integrity sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA== read-pkg-up@^7.0.1: version "7.0.1" @@ -3042,7 +3028,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.3.2: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== @@ -3050,6 +3036,14 @@ resolve@^1.10.0, resolve@^1.17.0, resolve@^1.3.2: is-core-module "^2.0.0" path-parse "^1.0.6" +resolve@^1.18.1: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -3486,18 +3480,17 @@ tr46@^2.0.2: dependencies: punycode "^2.1.1" -ts-jest@26.4.1: - version "26.4.1" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.4.1.tgz#08ec0d3fc2c3a39e4a46eae5610b69fafa6babd0" - integrity sha512-F4aFq01aS6mnAAa0DljNmKr/Kk9y4HVZ1m6/rtJ0ED56cuxINGq3Q9eVAh+z5vcYKe5qnTMvv90vE8vUMFxomg== +ts-jest@26.5.4: + version "26.5.4" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-26.5.4.tgz#207f4c114812a9c6d5746dd4d1cdf899eafc9686" + integrity sha512-I5Qsddo+VTm94SukBJ4cPimOoFZsYTeElR2xy6H2TOVs+NsvgYglW8KuQgKoApOKuaU/Ix/vrF9ebFZlb5D2Pg== dependencies: - "@types/jest" "26.x" bs-logger "0.x" buffer-from "1.x" fast-json-stable-stringify "2.x" jest-util "^26.1.0" json5 "2.x" - lodash.memoize "4.x" + lodash "4.x" make-error "1.x" mkdirp "1.x" semver "7.x" @@ -3594,10 +3587,10 @@ uuid@^8.3.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.1.tgz#2ba2e6ca000da60fce5a196954ab241131e05a31" integrity sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg== -v8-to-istanbul@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-6.0.1.tgz#7ef0e32faa10f841fe4c1b0f8de96ed067c0be1e" - integrity sha512-PzM1WlqquhBvsV+Gco6WSFeg1AGdD53ccMRkFeyHRE/KRZaVacPOmQYP3EeVgDBtKD2BJ8kgynBQ5OtKiHCH+w== +v8-to-istanbul@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz#5b95cef45c0f83217ec79f8fc7ee1c8b486aee07" + integrity sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g== dependencies: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^1.6.0" diff --git a/lerna.json b/lerna.json index 125743586..a039d8d50 100644 --- a/lerna.json +++ b/lerna.json @@ -1,10 +1,10 @@ { - "lerna": "3.22.0", + "lerna": "4.0.0", "packages": [ "client", "server" ], - "version": "0.4.0", + "version": "0.6.0", "npmClient": "yarn", "useWorkspaces": true } \ No newline at end of file diff --git a/package.json b/package.json index a0335808d..5a842d43d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dpo-packrat", - "version": "0.4.0", + "version": "0.6.0", "private": true, "license": "Apache-2.0", "description": "Data Repository and Workflow Management for 3D data captures, models, and scenes", @@ -29,19 +29,20 @@ "log:server": "docker logs -f packrat-server", "start:client:prod": "yarn workspace @dpo-packrat/client start:prod", "start:server:prod": "yarn workspace @dpo-packrat/server start:prod", - "devbox:up": "./scripts/devbox/up.sh", - "devbox:db": "./scripts/devbox/db.sh", - "devbox:network": "./scripts/devbox/network.sh", + "devbox:up": "./conf/scripts/devbox/up.sh", + "devbox:db": "./conf/scripts/devbox/db.sh", + "devbox:solr": "./conf/scripts/devbox/solr.sh", + "devbox:network": "./conf/scripts/devbox/network.sh", "devbox:start": "docker exec -it packrat-devbox bash", "devbox:down": "docker container rm packrat-devbox --force", - "dev": "docker-compose --env-file .env.dev -f docker-compose.dev.yml up -d", - "prod": "docker-compose --env-file .env.prod -f docker-compose.prod.yml up -d", + "dev": "docker-compose --env-file .env.dev -p dpo-packrat -f ./conf/docker/docker-compose.dev.yml up -d", + "prod": "docker-compose --env-file .env.prod -p dpo-packrat -f ./conf/docker/docker-compose.prod.yml up -d", "deploy:dev": "sh ./scripts/deploy.sh dev", "deploy:prod": "sh ./scripts/deploy.sh prod", "build:dev": "lerna run build:dev", "build:prod": "lerna run build:prod", "clean": "lerna run clean && rm -rf node_modules/", - "clean:docker": "docker-compose -f docker-compose.dev.yml down && docker system prune -f", + "clean:docker": "docker-compose -f ./conf/docker/docker-compose.dev.yml down && docker system prune -f", "generate:server:prisma": "yarn workspace @dpo-packrat/server generate:prisma", "postinstall": "lerna run postinstall && yarn install:e2e", "install:e2e": "cd e2e && yarn && cd ..", @@ -68,7 +69,7 @@ "lerna": "3.22.1", "nodemon": "2.0.4", "prettier": "2.1.1", - "typescript": "3.9.3" + "typescript": "4.2.3" }, "husky": { "hooks": { @@ -85,7 +86,7 @@ ] }, "volta": { - "node": "12.18.4", - "yarn": "1.22.4" + "node": "14.16.0", + "yarn": "1.22.10" } } diff --git a/scripts/devbox/db.sh b/scripts/devbox/db.sh deleted file mode 100755 index 32e9f6cbc..000000000 --- a/scripts/devbox/db.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Creates and seeds the packrat db - -IMAGE=mariadb:10.5 -PACKRAT_WORKDIR=/app - -docker run --name packrat-db -p 3306:3306 -v ${PWD}/server/db/sql:${PACKRAT_WORKDIR} --env-file ./.env.dev -itd $IMAGE - -SQL_PASSWORD=$(grep MYSQL_ROOT_PASSWORD .env.dev | cut -d '=' -f2) - -docker exec -i packrat-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.SCHEMA.sql" -docker exec -i packrat-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.PROC.sql" -docker exec -i packrat-db sh -c "mysql -u root -p$SQL_PASSWORD < /app/scripts/Packrat.DATA.sql" - -echo "Done" \ No newline at end of file diff --git a/scripts/devbox/network.sh b/scripts/devbox/network.sh deleted file mode 100755 index 2667e9b8d..000000000 --- a/scripts/devbox/network.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Creates a docker network and connect devbox and db - -NETWORK_NAME=packrat-devbox-network - -docker network create $NETWORK_NAME -docker network connect $NETWORK_NAME packrat-devbox -docker network connect $NETWORK_NAME packrat-db - -echo "Done" \ No newline at end of file diff --git a/server/auth/AuthRouter.ts b/server/auth/AuthRouter.ts index c3fb3ec78..4b42c7f18 100644 --- a/server/auth/AuthRouter.ts +++ b/server/auth/AuthRouter.ts @@ -1,14 +1,15 @@ import express, { Request, Response, NextFunction } from 'express'; import { passport } from './framework'; -import { AUTH_TYPE } from '../config'; const AuthRouter = express.Router(); AuthRouter.post('/login', (request: Request, response: Response, next: NextFunction) => { - passport.authenticate(AUTH_TYPE.LOCAL, (error, user) => { - if (error) return response.send({ success: false, message: error }); - return request.logIn(user, error => { - if (error) return next(error); + passport.authenticate('local', (error, user) => { + if (error) + return response.send({ success: false, message: error }); + return request.logIn(user, error => { // assigns user to request.user + if (error) + return next(error); return response.send({ success: true }); }); })(request, response, next); diff --git a/server/auth/framework/passport.ts b/server/auth/framework/passport.ts index 79c45cdb7..add0fa27d 100644 --- a/server/auth/framework/passport.ts +++ b/server/auth/framework/passport.ts @@ -1,17 +1,16 @@ import PassportLocal from 'passport-local'; import passport from 'passport'; -import { User } from '../../db'; + +import { AuthFactory, VerifiedUser } from '../interface'; import * as DBAPI from '../../db'; -import { AuthFactory, IAuth, VerifiedUser } from '../interface'; +// import { ASL, LocalStore } from '../../utils/localStore'; const options = { usernameField: 'email' }; const verifyFunction = async (email: string, password: string, done) => { - const auth: IAuth = AuthFactory.getInstance(); - const { user, error }: VerifiedUser = await auth.verifyUser(email, password); - + const { user, error }: VerifiedUser = await AuthFactory.verifyUser(email, password); if (error) { done(error, null); } else { @@ -23,13 +22,25 @@ const Strategy = new PassportLocal.Strategy(options, verifyFunction); passport.use(Strategy); -passport.serializeUser((user: User, done) => { - if (!user) return done('Invalid user'); +passport.serializeUser((user: DBAPI.User, done) => { + if (!user) + return done('Invalid user'); done(null, user.idUser); }); passport.deserializeUser(async (id: number, done) => { - const user = await DBAPI.User.fetch(id); + const user: DBAPI.User | null = await DBAPI.User.fetch(id); + // At this point, our express middleware hasn't yet been called, so ASL.getStore() will return null + // Instead of the code below, we rely on passport stashing the user object in req['user'] + // This is likely accomplished via this method here! + // We use that stashed user when creating the local store + /* + if (user) { + const LS: LocalStore | undefined = ASL.getStore(); + if (LS) + LS.user = user; + } + */ done(null, user); }); diff --git a/server/auth/impl/LDAPAuth.ts b/server/auth/impl/LDAPAuth.ts new file mode 100644 index 000000000..a9772323e --- /dev/null +++ b/server/auth/impl/LDAPAuth.ts @@ -0,0 +1,116 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { IAuth, VerifyUserResult } from '../interface'; +import { Config, LDAPConfig } from '../../config'; +import * as LOG from '../../utils/logger'; +import * as LDAP from 'ldapjs'; + +type UserSearchResult = { + success: boolean; + error: string | null; + DN: string | null; +}; + +class LDAPAuth implements IAuth { + async verifyUser(email: string, password: string): Promise { + const ldapConfig: LDAPConfig = Config.auth.ldap; + + // Step 1: Create a ldap client using server address + const client: LDAP.Client = LDAP.createClient({ + url: ldapConfig.server + }); + + // this is needed to avoid nodejs crash of server when the LDAP connection is unavailable + client.on('error', error=> { LOG.error('LDAPAuth.verifyUser', error, LOG.LS.eAUTH); }); + + // Step 2: Bind Packrat Service Account + const res: VerifyUserResult = await this.bindService(client, ldapConfig); + if (!res.success) + return res; + + // Step 3: Search for passed user by email + const resUserSearch: UserSearchResult = await this.searchForUser(client, ldapConfig, email); + if (!resUserSearch.success|| !resUserSearch.DN) + return resUserSearch; + + //Step 4: If user is found, bind on their credentials + return await this.bindUser(client, resUserSearch.DN, email, password); + } + + private async bindService(client: LDAP.Client, ldapConfig: LDAPConfig): Promise { + let ldapBind: string = ldapConfig.CN; + if (ldapBind) + ldapBind += `,${ldapConfig.OU}`; + if (ldapBind) + ldapBind += `,${ldapConfig.DC}`; + return new Promise(function(resolve) { + client.bind(ldapBind, ldapConfig.password, (err: any): void => { + if (err) { + LOG.error(`LDAPAuth.bindService failed: ${JSON.stringify(err)}`, LOG.LS.eAUTH); + resolve({ success: false, error: 'Unable to connect to LDAP server' }); + } else + resolve({ success: true, error: '' }); + }); + }); + } + + private async searchForUser(client: LDAP.Client, ldapConfig: LDAPConfig, email: string): Promise { + // LDAP Search Options + const searchOptions: LDAP.SearchOptions = { + scope: 'sub', + filter: '(mail=' + email + ')', // (Searches on mail value) + attributes: ['cn'] ,// return cn value + sizeLimit: 1, // return only one result + paged: true, + }; + + let searchComplete: boolean = false; + + return new Promise(function(resolve) { + client.search(ldapConfig.DC, searchOptions, (err: any, res: LDAP.SearchCallbackResponse): void => { + if (err) { + const error: string = `Unable to locate ${email}`; + LOG.error(`LDAPAuth.searchForUser ${error}`, LOG.LS.eAUTH); + resolve({ success: false, error, DN: null }); + } + + res.on('searchEntry', (entry: any) => { + LOG.info(`LDAPAuth.searchForUser found ${email}: ${JSON.stringify(entry.objectName)}`, LOG.LS.eAUTH); + searchComplete = true; + resolve({ success: true, error: '', DN: entry.objectName }); + }); + + res.on('error', (err: any) => { + err; + const error: string = `Unable to locate ${email}`; + LOG.error(`LDAPAuth.searchForUser ${error}`, LOG.LS.eAUTH); + resolve({ success: false, error, DN: null }); + }); + + res.on('end', (result: any) => { + if (!searchComplete) { + result; + const error: string = `Unable to locate ${email}`; + LOG.error(`LDAPAuth.searchForUser ${error}`, LOG.LS.eAUTH); + resolve({ success: false, error, DN: null }); + } + }); + }); + }); + } + + private async bindUser(client: LDAP.Client, DN: string, email: string, password: string): Promise { + return new Promise(function(resolve) { + client.bind(DN, password, (err: any): void => { + if (err) { + err; + const error: string = `Invalid password for ${email}`; + LOG.error(`LDAPAuth.bindUser ${error}`, LOG.LS.eAUTH); + resolve({ success: false, error }); + } else + resolve({ success: true, error: '' }); + }); + }); + } +} + +export default LDAPAuth; diff --git a/server/auth/impl/LocalAuth.ts b/server/auth/impl/LocalAuth.ts new file mode 100644 index 000000000..70ec1bffa --- /dev/null +++ b/server/auth/impl/LocalAuth.ts @@ -0,0 +1,16 @@ +import * as LOG from '../../utils/logger'; +import { IAuth, VerifyUserResult } from '../interface'; + +class LocalAuth implements IAuth { + async verifyUser(email: string, password: string): Promise { + if (password !== email) { + LOG.error(`LocalAuth.verifyUser invalid password for ${email}`, LOG.LS.eAUTH); + return { success: false, error: 'Invalid password for user' }; + } + + LOG.info(`LocalAuth.verifyUser successful login for ${email}`, LOG.LS.eAUTH); + return { success: true, error: null }; + } +} + +export default LocalAuth; diff --git a/server/auth/impl/index.ts b/server/auth/impl/index.ts index 58cdbddb1..ea22fb222 100644 --- a/server/auth/impl/index.ts +++ b/server/auth/impl/index.ts @@ -1,4 +1,4 @@ -import LocalAuth from './local'; -import LDAPAuth from './ldap'; +import LocalAuth from './LocalAuth'; +import LDAPAuth from './LDAPAuth'; export { LocalAuth, LDAPAuth }; diff --git a/server/auth/impl/ldap.ts b/server/auth/impl/ldap.ts deleted file mode 100644 index d4af4a15d..000000000 --- a/server/auth/impl/ldap.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IAuth, VerifiedUser } from '../interface'; - -class LDAPAuth implements IAuth { - async verifyUser(email: string, password: string): Promise { - // TODO: implement verify user for LDAP - email; - password; - return { - user: null, - error: null - }; - } -} - -export default LDAPAuth; diff --git a/server/auth/impl/local.ts b/server/auth/impl/local.ts deleted file mode 100644 index 645f1d21e..000000000 --- a/server/auth/impl/local.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as DBAPI from '../../db'; -import { IAuth, VerifiedUser } from '../interface'; - -class LocalAuth implements IAuth { - async verifyUser(email: string, password: string): Promise { - const users: DBAPI.User[] | null = await DBAPI.User.fetchByEmail(email); - - if (!users) { - return { - user: null, - error: 'User does not exist' - }; - } - - if (users.length > 1) { - return { - user: null, - error: 'Multiple users exist for specified email address' - }; - } - - const user: DBAPI.User = users[0]; - - if (!user) { - return { - user: null, - error: 'User does not exist' - }; - } - - if (!user.Active) { - return { - user, - error: 'User is not active' - }; - } - - // TODO: password is same as email (to be removed/updated) - if (password !== user.EmailAddress) { - return { - user, - error: 'Invalid password for user' - }; - } - - return { - user, - error: null - }; - } -} - -export default LocalAuth; diff --git a/server/auth/index.ts b/server/auth/index.ts index f548e85b7..70ffb9144 100644 --- a/server/auth/index.ts +++ b/server/auth/index.ts @@ -2,7 +2,7 @@ import { passport } from './framework'; import AuthRouter from './AuthRouter'; import session from 'express-session'; import MemoryStore from 'memorystore'; -import Config from '../config'; +import { Config } from '../config'; const { CLIENT_ENDPOINT, SESSION_SECRET } = process.env; @@ -26,12 +26,12 @@ if (!SESSION_SECRET) { const Store = MemoryStore(session); -const { maxAge, checkPeriod, expires } = Config.auth.session; +const { maxAge, checkPeriod } = Config.auth.session; +// const maxAge: number = Date.now() + age; const sessionConfig = { cookie: { - maxAge, - expires + maxAge }, secret: SESSION_SECRET, resave: true, diff --git a/server/auth/interface/AuthFactory.ts b/server/auth/interface/AuthFactory.ts index 7f4fdb72c..0c12afa02 100644 --- a/server/auth/interface/AuthFactory.ts +++ b/server/auth/interface/AuthFactory.ts @@ -1,8 +1,18 @@ +import { IAuth, VerifyUserResult } from './IAuth'; import { LocalAuth, LDAPAuth } from '../impl'; -import Config, { AUTH_TYPE } from '../../config'; +import { Config, AUTH_TYPE } from '../../config'; +import { ASL, LocalStore } from '../../utils/localStore'; +import * as DBAPI from '../../db'; +import * as LOG from '../../utils/logger'; + +export type VerifiedUser = { + user: DBAPI.User | null; + error: string | null; +}; class AuthFactory { private static instance: LocalAuth | LDAPAuth; + static getInstance(): LocalAuth | LDAPAuth { if (!AuthFactory.instance) { if (Config.auth.type === AUTH_TYPE.LOCAL) { @@ -13,6 +23,41 @@ class AuthFactory { } return AuthFactory.instance; } + + static async verifyUser(email: string, password: string): Promise { + const auth: IAuth = AuthFactory.getInstance(); + const verifyRes: VerifyUserResult = await auth.verifyUser(email, password); + if (!verifyRes.success) + return { user: null, error: verifyRes.error }; + + const users: DBAPI.User[] | null = await DBAPI.User.fetchByEmail(email); + if (!users || users.length == 0) { + const error: string = `${email} is not a Packrat user`; + LOG.error(`AuthFactory.verifyUser: ${error}`, LOG.LS.eAUTH); + return { user: null, error }; + } + + if (users.length > 1) { + const error: string = `Multiple users exist for ${email}`; + LOG.error(`AuthFactory.verifyUser: ${error}`, LOG.LS.eAUTH); + return { user: null, error }; + } + + const user: DBAPI.User = users[0]; + if (!user.Active) { + const error: string = `${email} is not active in Packrat`; + LOG.info(`AuthFactory.verifyUser: ${error}`, LOG.LS.eAUTH); + return { user: null, error }; + } + + // record user in local storage: + const LS: LocalStore | undefined = ASL.getStore(); + if (LS) + LS.idUser = user.idUser; + + LOG.info(`AuthFactory.verifyUser ${email} successfully authenticated`, LOG.LS.eAUTH); + return { user, error: null }; + } } export default AuthFactory; diff --git a/server/auth/interface/IAuth.ts b/server/auth/interface/IAuth.ts index 1c91bdeba..5bce8ce73 100644 --- a/server/auth/interface/IAuth.ts +++ b/server/auth/interface/IAuth.ts @@ -1,12 +1,10 @@ -import { User } from '../../db'; - -type VerifiedUser = { - user: User | null; +export type VerifyUserResult = { + success: boolean; error: string | null; }; -interface IAuth { - verifyUser: (email: string, password: string) => Promise; +export interface IAuth { + verifyUser: (email: string, password: string) => Promise; } -export { IAuth as default, VerifiedUser }; +export { IAuth as default }; diff --git a/server/auth/interface/index.ts b/server/auth/interface/index.ts index d0a258c9a..b949bfa28 100644 --- a/server/auth/interface/index.ts +++ b/server/auth/interface/index.ts @@ -1,4 +1,4 @@ -import AuthFactory from './AuthFactory'; -import IAuth, { VerifiedUser } from './IAuth'; +import AuthFactory, { VerifiedUser } from './AuthFactory'; +import IAuth, { VerifyUserResult } from './IAuth'; -export { IAuth, VerifiedUser, AuthFactory }; +export { IAuth, VerifiedUser, VerifyUserResult, AuthFactory }; diff --git a/server/cache/SystemObjectCache.ts b/server/cache/SystemObjectCache.ts index 6bbfe2859..5f0fd0f3f 100644 --- a/server/cache/SystemObjectCache.ts +++ b/server/cache/SystemObjectCache.ts @@ -44,11 +44,11 @@ export class SystemObjectCache { // Cache Construction // ************************** private async flushInternalWorker(): Promise { - LOG.logger.info('CACHE: SystemObjectCache.flushInternalWorker() start'); + LOG.info('CACHE SystemObjectCache.flushInternalWorker() start', LOG.LS.eCACHE ); // TODO: replace with paged output const SOFetch: SystemObject[] | null = await SystemObject.fetchAll(); /* istanbul ignore next */ if (!SOFetch) { - LOG.logger.error('SystemObjectCache.flushInternalWorker unable to fetch System Objects'); + LOG.error('SystemObjectCache.flushInternalWorker unable to fetch System Objects', LOG.LS.eCACHE ); return false; } @@ -59,7 +59,7 @@ export class SystemObjectCache { this.systemIDToObjectMap.set(SO.idSystemObject, oID); } } - LOG.logger.info('CACHE: SystemObjectCache.flushInternalWorker() done'); + LOG.info('CACHE SystemObjectCache.flushInternalWorker() done', LOG.LS.eCACHE ); return true; } @@ -93,7 +93,7 @@ export class SystemObjectCache { this.objectIDToSystemMap.set(oID, sID); this.systemIDToObjectMap.set(SO.idSystemObject, oID); } else - LOG.logger.error(`SystemObjectCache.getSystemFromObjectIDInternal unable to lookup ${eSystemObjectType[eObjectType]}, id ${idObject}`); + LOG.error(`SystemObjectCache.getSystemFromObjectIDInternal unable to lookup ${eSystemObjectType[eObjectType]}, id ${idObject}`, LOG.LS.eCACHE ); } return sID; } @@ -107,7 +107,7 @@ export class SystemObjectCache { oID = SystemObjectCache.convertSystemObjectToObjectID(SO); Retired = SO.Retired; } else - LOG.logger.error(`SystemObjectCache.getObjectFromSystemInternal unable to lookup idSystemObject ${idSystemObject}`); + LOG.error(`SystemObjectCache.getObjectFromSystemInternal unable to lookup idSystemObject ${idSystemObject}`, LOG.LS.eCACHE ); if (oID) { this.objectIDToSystemMap.set(oID, { idSystemObject, Retired }); @@ -206,7 +206,7 @@ export class SystemObjectCache { else if (SO.idActor) return { idObject: SO.idActor, eObjectType: eSystemObjectType.eActor }; else if (SO.idStakeholder) return { idObject: SO.idStakeholder, eObjectType: eSystemObjectType.eStakeholder }; - LOG.logger.error(`SystemObjectCache.convertSystemObjectToObjectID unable to interpret ${JSON.stringify(SO)}`); + LOG.error(`SystemObjectCache.convertSystemObjectToObjectID unable to interpret ${JSON.stringify(SO)}`, LOG.LS.eCACHE ); return undefined; } diff --git a/server/cache/VocabularyCache.ts b/server/cache/VocabularyCache.ts index 4a0f385a0..4a49cdcb8 100644 --- a/server/cache/VocabularyCache.ts +++ b/server/cache/VocabularyCache.ts @@ -1,6 +1,7 @@ import * as LOG from '../utils/logger'; import { CacheControl } from './CacheControl'; import { Vocabulary, VocabularySet } from '../db'; +import * as path from 'path'; /** * enum used to provide declarative, programmatic access to sorted vocabulary for system-generated vocabulary sets @@ -28,6 +29,9 @@ export enum eVocabularySetID { eMetadataMetadataSource, eWorkflowStepWorkflowStepType, eAssetAssetType, + eJobJobType, + eWorkflowType, + eWorkflowEvent, eNone = -1 } @@ -51,6 +55,7 @@ export enum eVocabularyID { eAssetAssetTypeProjectDocumentation, eAssetAssetTypeIntermediaryFile, eAssetAssetTypeOther, + eMetadataMetadataSourceBulkIngestion, eCaptureDataCaptureMethodPhotogrammetry, eCaptureDataCaptureMethodCT, eCaptureDataCaptureMethodStructuredLight, @@ -59,7 +64,70 @@ export enum eVocabularyID { eCaptureDataFileVariantTypeRaw, eCaptureDataFileVariantTypeProcessed, eCaptureDataFileVariantTypeFromCamera, - eMetadataMetadataSourceBulkIngestion, + eModelCreationMethodScanToMesh, + eModelCreationMethodCAD, + eModelModalityPointCloud, + eModelModalityMesh, + eModelUnitsMicrometer, + eModelUnitsMillimeter, + eModelUnitsCentimeter, + eModelUnitsMeter, + eModelUnitsKilometer, + eModelUnitsInch, + eModelUnitsFoot, + eModelUnitsYard, + eModelUnitsMile, + eModelUnitsAstronomicalUnit, + eModelPurposeMaster, + eModelPurposeWebDelivery, + eModelPurposePrintDelivery, + eModelPurposeIntermediateProcessingStep, + eModelFileTypeobj, + eModelFileTypeply, + eModelFileTypestl, + eModelFileTypeglb, + eModelFileTypegltf, + eModelFileTypeusd, + eModelFileTypeusdz, + eModelFileTypex3d, + eModelFileTypewrl, + eModelFileTypedae, + eModelFileTypefbx, + eModelFileTypema, + eModelFileType3ds, + eModelFileTypeptx, + eModelFileTypepts, + eModelMaterialChannelMaterialTypeDiffuse, + eModelMaterialChannelMaterialTypeSpecular, + eModelMaterialChannelMaterialTypeAmbient, + eModelMaterialChannelMaterialTypeEmissive, + eModelMaterialChannelMaterialTypeBump, + eModelMaterialChannelMaterialTypeNormal, + eModelMaterialChannelMaterialTypeGlossiness, + eModelMaterialChannelMaterialTypeOpacity, + eModelMaterialChannelMaterialTypeDisplacement, + eModelMaterialChannelMaterialTypeOcclusion, + eModelMaterialChannelMaterialTypeReflection, + eModelMaterialChannelMaterialTypeMetalness, + eModelMaterialChannelMaterialTypeRoughness, + eModelMaterialChannelMaterialTypeNone, + eModelMaterialChannelMaterialTypeUnknown, + eJobJobTypeCookBake, + eJobJobTypeCookDecimateUnwrap, + eJobJobTypeCookDecimate, + eJobJobTypeCookGenerateUsdz, + eJobJobTypeCookGenerateWebGltf, + eJobJobTypeCookInspectMesh, + eJobJobTypeCookSIArBackfillFix, + eJobJobTypeCookSIGenerateDownloads, + eJobJobTypeCookSIOrientModelToSvx, + eJobJobTypeCookSIPackratInspect, + eJobJobTypeCookSIVoyagerAsset, + eJobJobTypeCookSIVoyagerScene, + eJobJobTypeCookUnwrap, + eWorkflowTypeCookJob, + eWorkflowStepTypeStart, + eWorkflowEventIngestionUploadAssetVersion, eNone = -1 } @@ -102,7 +170,7 @@ export class VocabularyCache { // Cache Construction // ************************** private async flushInternalWorker(): Promise { - LOG.logger.info('CACHE: VocabularyCache.flushInternalWorker() start'); + LOG.info('CACHE VocabularyCache.flushInternalWorker() start', LOG.LS.eCACHE); const vocabArray: Vocabulary[] | null = await Vocabulary.fetchAll(); /* istanbul ignore if */ if (!vocabArray) @@ -138,6 +206,9 @@ export class VocabularyCache { case 'Metadata.MetadataSource': eVocabSetEnum = eVocabularySetID.eMetadataMetadataSource; break; case 'WorkflowStep.WorkflowStepType': eVocabSetEnum = eVocabularySetID.eWorkflowStepWorkflowStepType; break; case 'Asset.AssetType': eVocabSetEnum = eVocabularySetID.eAssetAssetType; break; + case 'Job.JobType': eVocabSetEnum = eVocabularySetID.eJobJobType; break; + case 'Workflow.Type': eVocabSetEnum = eVocabularySetID.eWorkflowType; break; + case 'Workflow.Event': eVocabSetEnum = eVocabularySetID.eWorkflowEvent; break; } /* istanbul ignore else */ @@ -212,6 +283,120 @@ export class VocabularyCache { case 'Bulk Ingestion': eVocabEnum = eVocabularyID.eMetadataMetadataSourceBulkIngestion; break; } } break; + + case eVocabularySetID.eModelCreationMethod: { + switch (vocabulary.Term) { + case 'Scan To Mesh': eVocabEnum = eVocabularyID.eModelCreationMethodScanToMesh; break; + case 'CAD': eVocabEnum = eVocabularyID.eModelCreationMethodCAD; break; + } + } break; + + case eVocabularySetID.eModelModality: { + switch (vocabulary.Term) { + case 'Point Cloud': eVocabEnum = eVocabularyID.eModelModalityPointCloud; break; + case 'Mesh': eVocabEnum = eVocabularyID.eModelModalityMesh; break; + } + } break; + + case eVocabularySetID.eModelUnits: { + switch (vocabulary.Term) { + case 'Micrometer': eVocabEnum = eVocabularyID.eModelUnitsMicrometer; break; + case 'Millimeter': eVocabEnum = eVocabularyID.eModelUnitsMillimeter; break; + case 'Centimeter': eVocabEnum = eVocabularyID.eModelUnitsCentimeter; break; + case 'Meter': eVocabEnum = eVocabularyID.eModelUnitsMeter; break; + case 'Kilometer': eVocabEnum = eVocabularyID.eModelUnitsKilometer; break; + case 'Inch': eVocabEnum = eVocabularyID.eModelUnitsInch; break; + case 'Foot': eVocabEnum = eVocabularyID.eModelUnitsFoot; break; + case 'Yard': eVocabEnum = eVocabularyID.eModelUnitsYard; break; + case 'Mile': eVocabEnum = eVocabularyID.eModelUnitsMile; break; + case 'Astronomical Unit': eVocabEnum = eVocabularyID.eModelUnitsAstronomicalUnit; break; + } + } break; + + case eVocabularySetID.eModelPurpose: { + switch (vocabulary.Term) { + case 'Master': eVocabEnum = eVocabularyID.eModelPurposeMaster; break; + case 'Web Delivery': eVocabEnum = eVocabularyID.eModelPurposeWebDelivery; break; + case 'Print Delivery': eVocabEnum = eVocabularyID.eModelPurposePrintDelivery; break; + case 'Intermediate Processing Step': eVocabEnum = eVocabularyID.eModelPurposeIntermediateProcessingStep; break; + } + } break; + + case eVocabularySetID.eModelFileType: { + switch (vocabulary.Term) { + case 'obj - Alias Wavefront Object': eVocabEnum = eVocabularyID.eModelFileTypeobj; break; + case 'ply - Stanford Polygon File Format': eVocabEnum = eVocabularyID.eModelFileTypeply; break; + case 'stl - StereoLithography': eVocabEnum = eVocabularyID.eModelFileTypestl; break; + case 'glb - GL Transmission Format Binary': eVocabEnum = eVocabularyID.eModelFileTypeglb; break; + case 'gltf - GL Transmission Format': eVocabEnum = eVocabularyID.eModelFileTypegltf; break; + case 'usd - Universal Scene Description': eVocabEnum = eVocabularyID.eModelFileTypeusd; break; + case 'usdz - Universal Scene Description (zipped)': eVocabEnum = eVocabularyID.eModelFileTypeusdz; break; + case 'x3d': eVocabEnum = eVocabularyID.eModelFileTypex3d; break; + case 'wrl - VRML': eVocabEnum = eVocabularyID.eModelFileTypewrl; break; + case 'dae - COLLADA': eVocabEnum = eVocabularyID.eModelFileTypedae; break; + case 'fbx - Filmbox': eVocabEnum = eVocabularyID.eModelFileTypefbx; break; + case 'ma - Maya': eVocabEnum = eVocabularyID.eModelFileTypema; break; + case '3ds - 3D Studio': eVocabEnum = eVocabularyID.eModelFileType3ds; break; + case 'ptx': eVocabEnum = eVocabularyID.eModelFileTypeptx; break; + case 'pts': eVocabEnum = eVocabularyID.eModelFileTypepts; break; + } + } break; + + case eVocabularySetID.eModelMaterialChannelMaterialType: { + switch (vocabulary.Term) { + case 'Diffuse': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeDiffuse; break; + case 'Specular': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeSpecular; break; + case 'Ambient': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeAmbient; break; + case 'Emissive': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeEmissive; break; + case 'Bump': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeBump; break; + case 'Normal': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeNormal; break; + case 'Glossiness': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeGlossiness; break; + case 'Opacity': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeOpacity; break; + case 'Displacement': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeDisplacement; break; + case 'Occlusion': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeOcclusion; break; + case 'Reflection': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeReflection; break; + case 'Metalness': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeMetalness; break; + case 'Roughness': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeRoughness; break; + case 'None': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeNone; break; + case 'Unknown': eVocabEnum = eVocabularyID.eModelMaterialChannelMaterialTypeUnknown; break; + } + } break; + + case eVocabularySetID.eJobJobType: { + switch (vocabulary.Term) { + case 'Cook: bake': eVocabEnum = eVocabularyID.eJobJobTypeCookBake; break; + case 'Cook: decimate-unwrap': eVocabEnum = eVocabularyID.eJobJobTypeCookDecimateUnwrap; break; + case 'Cook: decimate': eVocabEnum = eVocabularyID.eJobJobTypeCookDecimate; break; + case 'Cook: generate-usdz': eVocabEnum = eVocabularyID.eJobJobTypeCookGenerateUsdz; break; + case 'Cook: generate-web-gltf': eVocabEnum = eVocabularyID.eJobJobTypeCookGenerateWebGltf; break; + case 'Cook: inspect-mesh': eVocabEnum = eVocabularyID.eJobJobTypeCookInspectMesh; break; + case 'Cook: si-ar-backfill-fix': eVocabEnum = eVocabularyID.eJobJobTypeCookSIArBackfillFix; break; + case 'Cook: si-generate-downloads': eVocabEnum = eVocabularyID.eJobJobTypeCookSIGenerateDownloads; break; + case 'Cook: si-orient-model-to-svx': eVocabEnum = eVocabularyID.eJobJobTypeCookSIOrientModelToSvx; break; + case 'Cook: si-packrat-inspect': eVocabEnum = eVocabularyID.eJobJobTypeCookSIPackratInspect; break; + case 'Cook: si-voyager-asset': eVocabEnum = eVocabularyID.eJobJobTypeCookSIVoyagerAsset; break; + case 'Cook: si-voyager-scene': eVocabEnum = eVocabularyID.eJobJobTypeCookSIVoyagerScene; break; + case 'Cook: unwrap': eVocabEnum = eVocabularyID.eJobJobTypeCookUnwrap; break; + } + } break; + + case eVocabularySetID.eWorkflowType: { + switch (vocabulary.Term) { + case 'Cook Job': eVocabEnum = eVocabularyID.eWorkflowTypeCookJob; break; + } + } break; + + case eVocabularySetID.eWorkflowStepWorkflowStepType: { + switch (vocabulary.Term) { + case 'Start': eVocabEnum = eVocabularyID.eWorkflowStepTypeStart; break; + } + } break; + + case eVocabularySetID.eWorkflowEvent: { + switch (vocabulary.Term) { + case 'Ingestion: Upload Asset Version': eVocabEnum = eVocabularyID.eWorkflowEventIngestionUploadAssetVersion; break; + } + } break; } if (eVocabEnum != eVocabularyID.eNone) { @@ -224,8 +409,8 @@ export class VocabularyCache { if (vocabEntryArray) vocabEntryArray.push(vocabulary); else { - LOG.logger.error('VocabularyCache.flushInternalWorker() encountered invalid VocabularySet ID [' + - vocabulary.idVocabularySet + '] in vocabulary object ID [' + vocabulary.idVocabularySet + ']'); + LOG.error('VocabularyCache.flushInternalWorker() encountered invalid VocabularySet ID [' + + vocabulary.idVocabularySet + '] in vocabulary object ID [' + vocabulary.idVocabularySet + ']', LOG.LS.eCACHE); continue; } } @@ -234,7 +419,7 @@ export class VocabularyCache { for (const vocabList of this.vocabSetEntries.values()) vocabList.sort((vocab1, vocab2) => vocab1.SortOrder - vocab2.SortOrder); - LOG.logger.info('CACHE: VocabularyCache.flushInternalWorker() done'); + LOG.info('CACHE VocabularyCache.flushInternalWorker() done', LOG.LS.eCACHE); return true; } @@ -286,6 +471,35 @@ export class VocabularyCache { return this.vocabIDEnumMap.get(idVocabulary); } + private vocabularySetEnumToIdInternal(eVocabSetID: eVocabularySetID): number | undefined { + return this.vocabSetEnumIDMap.get(eVocabSetID); + } + + private vocabularySetIdToEnumInternal(idVocabularySet: number): eVocabularySetID | undefined { + return this.vocabSetIDEnumMap.get(idVocabularySet); + } + + private isVocabularyInSetInternal(eVocabEnum: eVocabularyID, eVocabSetEnum: eVocabularySetID): boolean { + const vocab: Vocabulary | undefined = this.vocabularyByEnumInternal(eVocabEnum); + if (!vocab) { + // LOG.info(`isVocabularyInSetInternal ${eVocabularyID[eVocabEnum]} in ${eVocabularySetID[eVocabSetEnum]}: false 1`, { eLS: LOG.eLS.eCACHE }); + return false; + } + + const vocabSet: VocabularySet | undefined = this.vocabularySetByEnumInternal(eVocabSetEnum); + if (!vocabSet) { + // LOG.info(`isVocabularyInSetInternal ${eVocabularyID[eVocabEnum]} in ${eVocabularySetID[eVocabSetEnum]}: false 2`, { eLS: LOG.eLS.eCACHE }); + return false; + } + + if (vocabSet.idVocabularySet === vocab.idVocabularySet) { + // LOG.info(`isVocabularyInSetInternal ${eVocabularyID[eVocabEnum]} in ${eVocabularySetID[eVocabSetEnum]}: true`, { eLS: LOG.eLS.eCACHE }); + return true; + } + // LOG.info(`isVocabularyInSetInternal ${eVocabularyID[eVocabEnum]} in ${eVocabularySetID[eVocabSetEnum]}: false 3`, { eLS: LOG.eLS.eCACHE }); + return false; + } + // ************************** // Public Interface // ************************** @@ -354,6 +568,21 @@ export class VocabularyCache { return (await this.getInstance()).vocabularyIdToEnumInternal(idVocabulary); } + /** fetches the VocabularySet.idVocabularySet for a given vocabulary set enum. */ + static async vocabularySetEnumToId(eVocabSetID: eVocabularySetID): Promise { + return (await this.getInstance()).vocabularySetEnumToIdInternal(eVocabSetID); + } + + /** fetches the VocabularySet.idVocabularySet for a given vocabulary set enum */ + static async vocabularySetIdToEnum(idVocabularySet: number): Promise { + return (await this.getInstance()).vocabularySetIdToEnumInternal(idVocabularySet); + } + + /** fetches the VocabularySet.idVocabularySet for a given vocabulary set enum */ + static async isVocabularyInSet(eVocabEnum: eVocabularyID, eVocabSetEnum: eVocabularySetID): Promise { + return (await this.getInstance()).isVocabularyInSetInternal(eVocabEnum, eVocabSetEnum); + } + static async mapPhotogrammetryVariantType(variantType: string): Promise { let eVocabID: eVocabularyID; switch (variantType.toLowerCase().replace(/_/g, '')) { @@ -365,6 +594,8 @@ export class VocabularyCache { case 'camdng': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeRaw; break; case 'tif': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeRaw; break; case 'tiff': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeRaw; break; + case 'bmp': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeRaw; break; + case 'png': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeRaw; break; case 'processed': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeProcessed; break; case 'colcor': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeProcessed; break; case 'zeroed': eVocabID = eVocabularyID.eCaptureDataFileVariantTypeProcessed; break; @@ -379,6 +610,59 @@ export class VocabularyCache { return await VocabularyCache.vocabularyByEnum(eVocabID); } + static async mapModelFileByExtension(fileName: string): Promise { + let eVocabID: eVocabularyID; + const extension: string = path.extname(fileName).toLowerCase() || fileName.toLowerCase(); + + switch (extension) { + case '.obj': eVocabID = eVocabularyID.eModelFileTypeobj; break; + case '.ply': eVocabID = eVocabularyID.eModelFileTypeply; break; + case '.stl': eVocabID = eVocabularyID.eModelFileTypestl; break; + case '.glb': eVocabID = eVocabularyID.eModelFileTypeglb; break; + case '.gltf': eVocabID = eVocabularyID.eModelFileTypegltf; break; + case '.usda': eVocabID = eVocabularyID.eModelFileTypeusd; break; + case '.usdc': eVocabID = eVocabularyID.eModelFileTypeusd; break; + case '.usdz': eVocabID = eVocabularyID.eModelFileTypeusdz; break; + case '.x3d': eVocabID = eVocabularyID.eModelFileTypex3d; break; + case '.wrl': eVocabID = eVocabularyID.eModelFileTypewrl; break; + case '.dae': eVocabID = eVocabularyID.eModelFileTypedae; break; + case '.fbx': eVocabID = eVocabularyID.eModelFileTypefbx; break; + case '.ma': eVocabID = eVocabularyID.eModelFileTypema; break; + case '.3ds': eVocabID = eVocabularyID.eModelFileType3ds; break; + case '.ptx': eVocabID = eVocabularyID.eModelFileTypeptx; break; + case '.pts': eVocabID = eVocabularyID.eModelFileTypepts; break; + default: + // LOG.info(`VocabularyCache.mapModelFileByExtension(${fileName}) using unrecognized ext ${extension}`, { eLS: LOG.eLS.eCACHE }); + return undefined; + } + // LOG.info(`VocabularyCache.mapModelFileByExtension(${fileName}) = ${eVocabularyID[eVocabID]} using ext ${extension}`, { eLS: LOG.eLS.eCACHE }); + return await VocabularyCache.vocabularyByEnum(eVocabID); + } + + static async mapModelChannelMaterialType(materialType: string): Promise { + let eVocabID: eVocabularyID; + + switch (materialType.toLowerCase()) { + case 'diffuse': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeDiffuse; break; + case 'specular': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeSpecular; break; + case 'ambient': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeAmbient; break; + case 'emissive': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeEmissive; break; + case 'bump': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeBump; break; + case 'normal': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeNormal; break; + case 'glossiness': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeGlossiness; break; + case 'opacity': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeOpacity; break; + case 'displacement': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeDisplacement; break; + case 'occlusion': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeOcclusion; break; + case 'reflection': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeReflection; break; + case 'metalness': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeMetalness; break; + case 'roughness': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeRoughness; break; + case 'none': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeNone; break; + case 'unknown': eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeUnknown; break; + default: eVocabID = eVocabularyID.eModelMaterialChannelMaterialTypeUnknown; break; + } + return await VocabularyCache.vocabularyByEnum(eVocabID); + } + static async flush(): Promise { VocabularyCache.singleton = null; await this.getInstance(); diff --git a/server/collections/impl/EdanCollection.ts b/server/collections/impl/EdanCollection.ts index b34b3b22a..d871f0ece 100644 --- a/server/collections/impl/EdanCollection.ts +++ b/server/collections/impl/EdanCollection.ts @@ -3,7 +3,7 @@ import fetch from 'node-fetch'; import { v4 as uuidv4 } from 'uuid'; import * as COL from '../interface'; -import Config from '../../config'; +import { Config } from '../../config'; import * as LOG from '../../utils/logger'; import * as H from '../../utils/helpers'; @@ -49,7 +49,13 @@ class EdanCollection implements COL.ICollection { const params: string = `q=${escape(query)}${filter}&rows=${rows}&start=${start}`; const reqResult: GetRequestResults = await this.sendGetRequest(path, params); - const jsonResult = reqResult.output ? JSON.parse(reqResult.output) : /* istanbul ignore next */ null; + let jsonResult: any | null = null; + try { + jsonResult = reqResult.output ? JSON.parse(reqResult.output) : /* istanbul ignore next */ null; + } catch (error) { + LOG.error(`EdanCollection.queryCollection ${query}`, LOG.LS.eCOLL, error); + jsonResult = null; + } // jsonResult.rows -- array of { ..., title, id, unitCode, ..., content }; // content.descriptiveNonRepeating.title.content = name @@ -92,8 +98,8 @@ class EdanCollection implements COL.ICollection { } } - // LOG.logger.info(JSON.stringify(result) + '\n\n'); - // LOG.logger.info(reqResult.output + '\n\n'); + // LOG.info(JSON.stringify(result) + '\n\n', LOG.LS.eCOLL); + // LOG.info(reqResult.output + '\n\n', LOG.LS.eCOLL); return result; } @@ -165,7 +171,7 @@ class EdanCollection implements COL.ICollection { success: res.ok }; } catch (error) /* istanbul ignore next */ { - LOG.logger.error('EdanCollection.sendGetRequest', error); + LOG.error('EdanCollection.sendGetRequest', LOG.LS.eCOLL, error); return { output: JSON.stringify(error), statusText: 'node-fetch error', diff --git a/server/collections/interface/CollectionFactory.ts b/server/collections/interface/CollectionFactory.ts index 4068bdc3a..64ec94779 100644 --- a/server/collections/interface/CollectionFactory.ts +++ b/server/collections/interface/CollectionFactory.ts @@ -1,6 +1,6 @@ import { ICollection } from './ICollection'; import { EdanCollection } from '../impl'; -import Config, { COLLECTION_TYPE } from '../../config'; +import { Config, COLLECTION_TYPE } from '../../config'; export class CollectionFactory { private static instance: ICollection | null = null; diff --git a/server/config/index.ts b/server/config/index.ts index 4103e2133..98c2af59b 100644 --- a/server/config/index.ts +++ b/server/config/index.ts @@ -3,33 +3,49 @@ * * Organize and export server config here by extending from .env */ -enum AUTH_TYPE { +export enum AUTH_TYPE { LOCAL = 'local', - LDAP = 'ldapauth' + LDAP = 'ldap' } -enum STORAGE_TYPE { - LOCAL = 'local' +export enum COLLECTION_TYPE { + EDAN = 'edan' } -enum COLLECTION_TYPE { - EDAN = 'edan' +export enum JOB_TYPE { + NODE_SCHEDULE = 'node-schedule' } -enum NAVIGATION_TYPE { +export enum NAVIGATION_TYPE { DEFAULT, DB = 'db', SOLR = 'solr' } -type ConfigType = { +export enum STORAGE_TYPE { + LOCAL = 'local' +} + +export enum WORKFLOW_TYPE { + PACKRAT = 'packrat' +} + +export interface LDAPConfig { + server: string; + password: string; + CN: string; + OU: string; + DC: string; +} + +export type ConfigType = { auth: { type: AUTH_TYPE; session: { maxAge: number; checkPeriod: number; - expires: Date; }; + ldap: LDAPConfig; }, collection: { type: COLLECTION_TYPE; @@ -39,29 +55,43 @@ type ConfigType = { authKey: string; } } + job: { + type: JOB_TYPE; + cookServerUrl: string; + cookClientId: string; + }, log: { root: string; - } + }, + navigation: { + type: NAVIGATION_TYPE; + }, storage: { type: STORAGE_TYPE; rootRepository: string; rootStaging: string; // this should be local storage (not NAS or cloud) }, - navigation: { - type: NAVIGATION_TYPE; + workflow: { + type: WORKFLOW_TYPE; }, }; -const oneDayMs = 24 * 60 * 60 * 1000; // 24hrs in milliseconds +const oneDayInSeconds = 24 * 60 * 60; // 24hrs in seconds -const Config: ConfigType = { +export const Config: ConfigType = { auth: { - type: AUTH_TYPE.LOCAL, + type: process.env.AUTH_TYPE == 'LDAP' ? AUTH_TYPE.LDAP : AUTH_TYPE.LOCAL, session: { - maxAge: Date.now() + oneDayMs, // 24hrs expiration time - expires: new Date(Date.now() + oneDayMs), - checkPeriod: 24 * 60 * 60 // prune expired entries every 24h - } + maxAge: oneDayInSeconds * 1000, // expiration time = 24 hours, in milliseconds + checkPeriod: oneDayInSeconds // prune expired entries every 24 hours + }, + ldap: { + server: process.env.LDAP_SERVER ? process.env.LDAP_SERVER : 'ldap://160.111.103.197:389', + password: process.env.LDAP_PASSWORD ? process.env.LDAP_PASSWORD : '', + CN: process.env.LDAP_CN ? process.env.LDAP_CN : 'CN=PackratAuthUser', + OU: process.env.LDAP_OU ? process.env.LDAP_OU : 'OU=Service Accounts,OU=Enterprise', + DC: process.env.LDAP_DC ? process.env.LDAP_DC : 'DC=US,DC=SINET,DC=SI,DC=EDU', + }, }, collection: { type: COLLECTION_TYPE.EDAN, @@ -71,17 +101,23 @@ const Config: ConfigType = { authKey: process.env.EDAN_AUTH_KEY ? process.env.EDAN_AUTH_KEY : /* istanbul ignore next */ '' } }, + job: { + type: JOB_TYPE.NODE_SCHEDULE, + cookServerUrl: process.env.COOK_SERVER_URL ? process.env.COOK_SERVER_URL : /* istanbul ignore next */ 'http://si-3ddigip01.si.edu:8000/', + cookClientId: '5b258c8e-108c-4990-a088-17ffd6e22852', // Concierge's client ID; taken from C:\Tools\CookDev\server\clients.json on Cook server + }, log: { root: './var/logs' }, + navigation: { + type: NAVIGATION_TYPE.SOLR, + }, storage: { type: STORAGE_TYPE.LOCAL, rootRepository: process.env.OCFL_STORAGE_ROOT ? process.env.OCFL_STORAGE_ROOT : /* istanbul ignore next */ './var/Storage/Repository', rootStaging: process.env.OCFL_STAGING_ROOT ? process.env.OCFL_STAGING_ROOT : /* istanbul ignore next */ './var/Storage/Staging' }, - navigation: { - type: NAVIGATION_TYPE.SOLR, - }, + workflow: { + type: WORKFLOW_TYPE.PACKRAT, + } }; - -export { Config as default, AUTH_TYPE, COLLECTION_TYPE, STORAGE_TYPE, NAVIGATION_TYPE }; \ No newline at end of file diff --git a/server/config/solr/data/packrat/conf/schema.xml b/server/config/solr/data/packrat/conf/schema.xml index 6ea64558c..e3a879c6c 100644 --- a/server/config/solr/data/packrat/conf/schema.xml +++ b/server/config/solr/data/packrat/conf/schema.xml @@ -6,7 +6,7 @@ - + @@ -56,34 +56,49 @@ + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -116,6 +131,7 @@ + @@ -135,57 +151,20 @@ - + - --> - --> - --> - --> - --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - idSystemObject + id @@ -268,7 +247,6 @@ --> - @@ -308,8 +286,6 @@ is that it takes up more space on disk; which is why it's not used in place of TextField for every fieldType in this _default schema. --> - - @@ -327,7 +303,6 @@ - @@ -375,7 +350,6 @@ cases will work, for example query "wi fi" will match document "WiFi" or "wi-fi". --> - @@ -410,7 +384,6 @@ - @@ -442,7 +415,6 @@ - @@ -459,7 +431,6 @@ - @@ -468,7 +439,6 @@ - @@ -480,7 +450,6 @@ Example of using PathHierarchyTokenizerFactory at index time, so queries for paths match documents at that path, or in descendent paths --> - @@ -494,7 +463,6 @@ Example of using PathHierarchyTokenizerFactory at query time, so queries for paths match documents at that path, or in ancestor paths --> - @@ -515,7 +483,6 @@ The subFields are an implementation detail of the fieldType, and end users normally should not need to know about them. --> - diff --git a/server/config/solr/data/packrat/conf/solrconfig.xml b/server/config/solr/data/packrat/conf/solrconfig.xml index 9e07f1c9c..9e19de2b0 100644 --- a/server/config/solr/data/packrat/conf/solrconfig.xml +++ b/server/config/solr/data/packrat/conf/solrconfig.xml @@ -593,6 +593,7 @@ --> false + 1000