diff --git a/.aws/src/config/index.ts b/.aws/src/config/index.ts
index 1965a922e..303587ae7 100644
--- a/.aws/src/config/index.ts
+++ b/.aws/src/config/index.ts
@@ -5,8 +5,6 @@ const prodDomain = 'readitlater.com';
export const isDev = process.env.NODE_ENV === 'development';
const environment = isDev ? 'Dev' : 'Prod';
const domain = `${domainPrefix}.` + (isDev ? devDomain : prodDomain);
-const collectionApiEndpoint =
- 'https://collection-api.' + (isDev ? devDomain : prodDomain) + '/admin';
// We use production client api always,
// because the dev one will not have item data and that is all we are going to use it for
const clientApiEndpoint = 'https://client-api.getpocket.com';
@@ -34,7 +32,6 @@ export const config = {
branch,
},
envVars: {
- collectionApiEndpoint,
clientApiEndpoint,
oauth2ClientId,
oauth2Provider,
diff --git a/.aws/src/pocketAlbApplication.ts b/.aws/src/pocketAlbApplication.ts
index 99e7702dc..543ff1bdb 100644
--- a/.aws/src/pocketAlbApplication.ts
+++ b/.aws/src/pocketAlbApplication.ts
@@ -73,10 +73,6 @@ export function createPocketAlbApplication(
name: 'NODE_ENV',
value: process.env.NODE_ENV, // this gives us a nice lowercase production and development
},
- {
- name: 'REACT_APP_COLLECTION_API_ENDPOINT',
- value: config.envVars.collectionApiEndpoint,
- },
{
name: 'REACT_APP_CLIENT_API_ENDPOINT',
value: config.envVars.clientApiEndpoint,
diff --git a/Dockerfile b/Dockerfile
index 938ee5752..efdeaf875 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,8 +12,7 @@ RUN REACT_APP_ENV=${APP_ENV} npm run build
# production environment
FROM nginx:1.21.6@sha256:2bcabc23b45489fb0885d69a06ba1d648aeda973fae7bb981bafbb884165e514
-# Copy collections build into nginx html directory for now,
-# collections will be at the root of the server
+# Copy app build into nginx html directory
COPY --from=builder /usr/src/app/build /usr/share/nginx/html
COPY --from=builder /usr/src/app/.docker/nginx.conf /etc/nginx/nginx.conf
ENV PORT 80
diff --git a/README.md b/README.md
index bce5fe809..cbe399b38 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,7 @@
This repository is home to a suite of internal tools for Pocket curators developed with React and TypeScript. With React, we use functional components and hooks throughout.
We also use:
+
- [Material UI](https://mui.com/) for the UI,
- [Apollo Client](https://www.apollographql.com/docs/react/) for connecting to the APIs the tools interact with,
- [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) for unit testing,
@@ -84,24 +85,24 @@ npm run test
- The `src/api` folder contains GraphQL queries and mutations the app needs to execute to retrieve and manipulate data, as well as generated types for these and the Apollo Client connection.
-- `src/collections` is the home for Collections Admin Tool that lets Pocket curators create, edit and publish collections of stories for Pocket users.
-
- `src/curated-corpus` houses the Curated Corpus Tool.
-Within the folder for each tool, the structure is as follows (taking Collections as an example):
+- `src/moderation` DEPRECATED home of moderation of a legacy Pocket feature
+
+Within the folder for each tool, the structure is as follows (taking Curated Corpus as an example):
```bash
-collections/
+curated-corpus/
├─ components/
├─ pages/
├─ utils/
```
-The `components` folder houses any components specific to that particular tool, for example, `CollectionListCard`. The `pages` folder is home to page-level components, i.e. `AddCollectionPage`.
+The `components` folder houses any components specific to that particular tool, for example, `ApprovedItemListCard`. The `pages` folder is home to page-level components, i.e. `CorpusItemPage`.
All components are functional React components. Each component lives in its own folder. Unit tests, styles, validation schemas (for form components) are placed in separate files alongside each component.
-Routing within the app is set up with React Router. The entrypoint to the app, [App.tsx](/src/App.tsx), sets up all requests to be routed to specific paths within the apps - `/collections` for Collections and `/prospects` for the Prospecting tool, for example. More detailed routing, for example, individual collection pages, is set up within the landing page - see [this example for Collections](/src/collections/pages/CollectionsLandingPage/CollectionsLandingPage.tsx)
+Routing within the app is set up with React Router. The entrypoint to the app, [App.tsx](/src/App.tsx), sets up all requests to be routed to specific paths within the apps - `/prospects` for the Prospecting tool, for example. More detailed routing, for example, individual curated corpus pages, is set up within the landing page - see [this example for Curated Corpus](/src/curated-corpus/pages/CuratedCorpusLandingPage/CuratedCorpusLandingPage.tsx)
## Working with the Admin API
@@ -116,12 +117,13 @@ The generated types and custom hooks are saved in a file named `generatedTypes.t
Now that the generated code is ready to use, you can:
-- Use the generated types elsewhere in the code to type hint the shape of the returned data or data that is expected by components in the app, for example, `Collection` or `CollectionAuthor`.
-- Use strongly typed custom Apollo hooks to fetch and manipulate data. Apollo Client has generic `useQuery`, `useLazyQuery`, `useMutation` and `useSubscription` hooks. GraphQL Code Generator builds on that by providing hooks that are specific to the queries and mutations you need to run, for example, `useGetCollectionByExternalIdQuery`.
+- Use the generated types elsewhere in the code to type hint the shape of the returned data or data that is expected by components in the app, for example, `ApprovedCorpusItem` or `CorpusLanguage`.
+- Use strongly typed custom Apollo hooks to fetch and manipulate data. Apollo Client has generic `useQuery`, `useLazyQuery`, `useMutation` and `useSubscription` hooks. GraphQL Code Generator builds on that by providing hooks that are specific to the queries and mutations you need to run, for example, `useGetSectionsWithSectionItemsQuery`.
## Troubleshooting
+
1. If you receive an error similar to the following `error:xyz:digital envelope routines`, make sure you are using the correct Node version. Run `nvm use` in the project root to switch to the version specified in `.nvmrc` (currently Node 18). If you don't have it installed:
- ```shell
- nvm install
- nvm use
- ```
+ ```shell
+ nvm install
+ nvm use
+ ```
diff --git a/package-lock.json b/package-lock.json
index 551b457d5..6b1a87f61 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -26,7 +26,6 @@
"@svgr/webpack": "^8.1.0",
"@types/apollo-upload-client": "18.0.0",
"@types/luxon": "2.0.9",
- "@types/react-beautiful-dnd": "13.1.4",
"@types/react-dom": "17.0.20",
"@types/react-router-dom": "5.3.3",
"apollo-upload-client": "18.0.1",
@@ -75,11 +74,9 @@
"prompts": "2.4.0",
"react": "17.0.2",
"react-app-polyfill": "^2.0.0",
- "react-beautiful-dnd": "13.1.1",
"react-dev-utils": "^12.0.1",
"react-dom": "17.0.2",
"react-dropzone": "11.5.3",
- "react-markdown": "6.0.3",
"react-oauth2-pkce": "2.0.7",
"react-refresh": "^0.14.2",
"react-router-dom": "5.3.4",
@@ -87,7 +84,6 @@
"resolve-url-loader": "^5.0.0",
"sass-loader": "^12.6.0",
"semver": "7.6.0",
- "slugify": "1.6.6",
"stream-browserify": "^3.0.0",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.14",
@@ -2939,37 +2935,6 @@
"integrity": "sha512-+EQE8xZhRM/hsY0CDTVyayMDDY5ihc4MqXCrPxooKw19yAzUIC6uUqsZeaOFNL9YKTNxYKrJP5DFgE8o5xRCOw==",
"license": "MIT"
},
- "node_modules/@emnapi/core": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz",
- "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/wasi-threads": "1.1.0",
- "tslib": "^2.4.0"
- }
- },
- "node_modules/@emnapi/runtime": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz",
- "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
- "node_modules/@emnapi/wasi-threads": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz",
- "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
"node_modules/@emotion/babel-plugin": {
"version": "11.13.5",
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz",
@@ -5890,18 +5855,6 @@
}
}
},
- "node_modules/@napi-rs/wasm-runtime": {
- "version": "0.2.12",
- "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz",
- "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/core": "^1.4.3",
- "@emnapi/runtime": "^1.4.3",
- "@tybys/wasm-util": "^0.10.0"
- }
- },
"node_modules/@nicolo-ribaudo/eslint-scope-5-internals": {
"version": "5.1.1-v1",
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
@@ -6984,16 +6937,6 @@
"devOptional": true,
"license": "MIT"
},
- "node_modules/@tybys/wasm-util": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
- "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
"node_modules/@types/apollo-upload-client": {
"version": "18.0.0",
"resolved": "https://registry.npmjs.org/@types/apollo-upload-client/-/apollo-upload-client-18.0.0.tgz",
@@ -7154,33 +7097,12 @@
"integrity": "sha512-4sd7uDB0OVZmwH2wD6w7Qlpr2P5Pn8C9IGwnaq9aiiBDD3Lou7CwFjjkJTDYCDsEvk9zxAtmv9TaMg1lt/YJfA==",
"license": "MIT"
},
- "node_modules/@types/hast": {
- "version": "2.3.10",
- "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.10.tgz",
- "integrity": "sha512-McWspRw8xx8J9HurkVBfYj0xKoE25tOFlHGdx4MJ5xORQrMGZNqJhVQWaIbm6Oyla5kYOXtDiopzKRJzEOkwJw==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2"
- }
- },
"node_modules/@types/history": {
"version": "4.7.11",
"resolved": "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz",
"integrity": "sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==",
"license": "MIT"
},
- "node_modules/@types/hoist-non-react-statics": {
- "version": "3.3.7",
- "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.7.tgz",
- "integrity": "sha512-PQTyIulDkIDro8P+IHbKCsw7U2xxBYflVzW/FgWdCAePD9xGSidgA76/GeJ6lBKoblyhf9pBY763gbrN+1dI8g==",
- "license": "MIT",
- "dependencies": {
- "hoist-non-react-statics": "^3.3.0"
- },
- "peerDependencies": {
- "@types/react": "*"
- }
- },
"node_modules/@types/html-minifier-terser": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
@@ -7335,15 +7257,6 @@
"integrity": "sha512-ZuzIc7aN+i2ZDMWIiSmMdubR9EMMSTdEzF6R+FckP4p6xdnOYKqknTo/k+xXQvciSXlNGIwA4OPU5X7JIFzYdA==",
"license": "MIT"
},
- "node_modules/@types/mdast": {
- "version": "3.0.15",
- "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz",
- "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2"
- }
- },
"node_modules/@types/mime": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz",
@@ -7409,15 +7322,6 @@
"csstype": "^3.0.2"
}
},
- "node_modules/@types/react-beautiful-dnd": {
- "version": "13.1.4",
- "resolved": "https://registry.npmjs.org/@types/react-beautiful-dnd/-/react-beautiful-dnd-13.1.4.tgz",
- "integrity": "sha512-4bIBdzOr0aavN+88q3C7Pgz+xkb7tz3whORYrmSj77wfVEMfiWiooIwVWFR7KM2e+uGTe5BVrXqSfb0aHeflJA==",
- "license": "MIT",
- "dependencies": {
- "@types/react": "*"
- }
- },
"node_modules/@types/react-dom": {
"version": "17.0.20",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.20.tgz",
@@ -7427,18 +7331,6 @@
"@types/react": "^17"
}
},
- "node_modules/@types/react-redux": {
- "version": "7.1.34",
- "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.34.tgz",
- "integrity": "sha512-GdFaVjEbYv4Fthm2ZLvj1VSCedV7TqE5y1kNwnjSdBOTXuRSgowux6J8TAct15T3CKBr63UMk+2CO7ilRhyrAQ==",
- "license": "MIT",
- "dependencies": {
- "@types/hoist-non-react-statics": "^3.3.0",
- "@types/react": "*",
- "hoist-non-react-statics": "^3.3.0",
- "redux": "^4.0.0"
- }
- },
"node_modules/@types/react-router": {
"version": "5.1.20",
"resolved": "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.20.tgz",
@@ -7561,12 +7453,6 @@
"integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
"license": "MIT"
},
- "node_modules/@types/unist": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
- "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
- "license": "MIT"
- },
"node_modules/@types/uuid": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz",
@@ -7938,32 +7824,6 @@
"integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
"license": "ISC"
},
- "node_modules/@unrs/resolver-binding-android-arm-eabi": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.11.1.tgz",
- "integrity": "sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
- "node_modules/@unrs/resolver-binding-android-arm64": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.11.1.tgz",
- "integrity": "sha512-lCxkVtb4wp1v+EoN+HjIG9cIIzPkX5OtM03pQYkG+U5O/wL53LC4QbIeazgiKqluGeVEeBlZahHalCaBvU1a2g==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "android"
- ]
- },
"node_modules/@unrs/resolver-binding-darwin-arm64": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.11.1.tgz",
@@ -7977,217 +7837,6 @@
"darwin"
]
},
- "node_modules/@unrs/resolver-binding-darwin-x64": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.11.1.tgz",
- "integrity": "sha512-cFzP7rWKd3lZaCsDze07QX1SC24lO8mPty9vdP+YVa3MGdVgPmFc59317b2ioXtgCMKGiCLxJ4HQs62oz6GfRQ==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ]
- },
- "node_modules/@unrs/resolver-binding-freebsd-x64": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.11.1.tgz",
- "integrity": "sha512-fqtGgak3zX4DCB6PFpsH5+Kmt/8CIi4Bry4rb1ho6Av2QHTREM+47y282Uqiu3ZRF5IQioJQ5qWRV6jduA+iGw==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "freebsd"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.11.1.tgz",
- "integrity": "sha512-u92mvlcYtp9MRKmP+ZvMmtPN34+/3lMHlyMj7wXJDeXxuM0Vgzz0+PPJNsro1m3IZPYChIkn944wW8TYgGKFHw==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.11.1.tgz",
- "integrity": "sha512-cINaoY2z7LVCrfHkIcmvj7osTOtm6VVT16b5oQdS4beibX2SYBwgYLmqhBjA1t51CarSaBuX5YNsWLjsqfW5Cw==",
- "cpu": [
- "arm"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-arm64-gnu": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.11.1.tgz",
- "integrity": "sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-arm64-musl": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.11.1.tgz",
- "integrity": "sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.11.1.tgz",
- "integrity": "sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==",
- "cpu": [
- "ppc64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.11.1.tgz",
- "integrity": "sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-riscv64-musl": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.11.1.tgz",
- "integrity": "sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==",
- "cpu": [
- "riscv64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-s390x-gnu": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.11.1.tgz",
- "integrity": "sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==",
- "cpu": [
- "s390x"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-x64-gnu": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.11.1.tgz",
- "integrity": "sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-linux-x64-musl": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.11.1.tgz",
- "integrity": "sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "linux"
- ]
- },
- "node_modules/@unrs/resolver-binding-wasm32-wasi": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.11.1.tgz",
- "integrity": "sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==",
- "cpu": [
- "wasm32"
- ],
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@napi-rs/wasm-runtime": "^0.2.11"
- },
- "engines": {
- "node": ">=14.0.0"
- }
- },
- "node_modules/@unrs/resolver-binding-win32-arm64-msvc": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz",
- "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==",
- "cpu": [
- "arm64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@unrs/resolver-binding-win32-ia32-msvc": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz",
- "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==",
- "cpu": [
- "ia32"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
- "node_modules/@unrs/resolver-binding-win32-x64-msvc": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz",
- "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==",
- "cpu": [
- "x64"
- ],
- "license": "MIT",
- "optional": true,
- "os": [
- "win32"
- ]
- },
"node_modules/@webassemblyjs/ast": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz",
@@ -9395,16 +9044,6 @@
"babel-plugin-transform-react-remove-prop-types": "^0.4.24"
}
},
- "node_modules/bail": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz",
- "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
@@ -10041,36 +9680,6 @@
"node": ">=10"
}
},
- "node_modules/character-entities": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz",
- "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/character-entities-legacy": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz",
- "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/character-reference-invalid": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz",
- "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/chardet": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz",
@@ -10345,16 +9954,6 @@
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==",
"license": "MIT"
},
- "node_modules/comma-separated-tokens": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz",
- "integrity": "sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/commander": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
@@ -10699,15 +10298,6 @@
"postcss": "^8.4"
}
},
- "node_modules/css-box-model": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/css-box-model/-/css-box-model-1.2.1.tgz",
- "integrity": "sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==",
- "license": "MIT",
- "dependencies": {
- "tiny-invariant": "^1.0.6"
- }
- },
"node_modules/css-declaration-sorter": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz",
@@ -13487,12 +13077,6 @@
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
"license": "MIT"
},
- "node_modules/extend": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
- "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
- "license": "MIT"
- },
"node_modules/extract-files": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/extract-files/-/extract-files-11.0.0.tgz",
@@ -15364,12 +14948,6 @@
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"license": "ISC"
},
- "node_modules/inline-style-parser": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz",
- "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==",
- "license": "MIT"
- },
"node_modules/inquirer": {
"version": "8.2.7",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.7.tgz",
@@ -15444,30 +15022,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-alphabetical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz",
- "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
- "node_modules/is-alphanumerical": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz",
- "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==",
- "license": "MIT",
- "dependencies": {
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/is-arguments": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz",
@@ -15570,29 +15124,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-buffer": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
- "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/is-callable": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
@@ -15671,16 +15202,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/is-decimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz",
- "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/is-docker": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
@@ -15769,16 +15290,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/is-hexadecimal": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz",
- "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/is-inside-container": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
@@ -15917,15 +15428,6 @@
"node": ">=8"
}
},
- "node_modules/is-plain-obj": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
- "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
@@ -18600,78 +18102,12 @@
"safe-buffer": "^5.1.2"
}
},
- "node_modules/mdast-util-definitions": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz",
- "integrity": "sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ==",
- "license": "MIT",
- "dependencies": {
- "unist-util-visit": "^2.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/mdast-util-from-markdown": {
- "version": "0.8.5",
- "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz",
- "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==",
- "license": "MIT",
- "dependencies": {
- "@types/mdast": "^3.0.0",
- "mdast-util-to-string": "^2.0.0",
- "micromark": "~2.11.0",
- "parse-entities": "^2.0.0",
- "unist-util-stringify-position": "^2.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/mdast-util-to-hast": {
- "version": "10.2.0",
- "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.2.0.tgz",
- "integrity": "sha512-JoPBfJ3gBnHZ18icCwHR50orC9kNH81tiR1gs01D8Q5YpV6adHNO9nKNuFBCJQ941/32PT1a63UF/DitmS3amQ==",
- "license": "MIT",
- "dependencies": {
- "@types/mdast": "^3.0.0",
- "@types/unist": "^2.0.0",
- "mdast-util-definitions": "^4.0.0",
- "mdurl": "^1.0.0",
- "unist-builder": "^2.0.0",
- "unist-util-generated": "^1.0.0",
- "unist-util-position": "^3.0.0",
- "unist-util-visit": "^2.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/mdast-util-to-string": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz",
- "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/mdn-data": {
"version": "2.0.30",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz",
"integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==",
"license": "CC0-1.0"
},
- "node_modules/mdurl": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
- "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==",
- "license": "MIT"
- },
"node_modules/media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
@@ -18693,12 +18129,6 @@
"node": ">= 4.0.0"
}
},
- "node_modules/memoize-one": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-5.2.1.tgz",
- "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==",
- "license": "MIT"
- },
"node_modules/merge-descriptors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
@@ -18750,26 +18180,6 @@
"node": ">= 0.6"
}
},
- "node_modules/micromark": {
- "version": "2.11.4",
- "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz",
- "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==",
- "funding": [
- {
- "type": "GitHub Sponsors",
- "url": "https://github.com/sponsors/unifiedjs"
- },
- {
- "type": "OpenCollective",
- "url": "https://opencollective.com/unified"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "debug": "^4.0.0",
- "parse-entities": "^2.0.0"
- }
- },
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
@@ -19595,24 +19005,6 @@
"node": ">= 0.10"
}
},
- "node_modules/parse-entities": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz",
- "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==",
- "license": "MIT",
- "dependencies": {
- "character-entities": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "character-reference-invalid": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/parse-filepath": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
@@ -21428,19 +20820,6 @@
"integrity": "sha512-SVtmxhRE/CGkn3eZY1T6pC8Nln6Fr/lu1mKSgRud0eC73whjGfoAogbn78LkD8aFL0zz3bAFerKSnOl7NlErBA==",
"license": "MIT"
},
- "node_modules/property-information": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz",
- "integrity": "sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==",
- "license": "MIT",
- "dependencies": {
- "xtend": "^4.0.0"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
@@ -21572,12 +20951,6 @@
"performance-now": "^2.1.0"
}
},
- "node_modules/raf-schd": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/raf-schd/-/raf-schd-4.0.3.tgz",
- "integrity": "sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==",
- "license": "MIT"
- },
"node_modules/randombytes": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -21672,26 +21045,6 @@
"asap": "~2.0.6"
}
},
- "node_modules/react-beautiful-dnd": {
- "version": "13.1.1",
- "resolved": "https://registry.npmjs.org/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz",
- "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==",
- "deprecated": "react-beautiful-dnd is now deprecated. Context and options: https://github.com/atlassian/react-beautiful-dnd/issues/2672",
- "license": "Apache-2.0",
- "dependencies": {
- "@babel/runtime": "^7.9.2",
- "css-box-model": "^1.2.0",
- "memoize-one": "^5.1.1",
- "raf-schd": "^4.0.2",
- "react-redux": "^7.2.0",
- "redux": "^4.0.4",
- "use-memo-one": "^1.1.1"
- },
- "peerDependencies": {
- "react": "^16.8.5 || ^17.0.0 || ^18.0.0",
- "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/react-dev-utils": {
"version": "12.0.1",
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz",
@@ -21861,41 +21214,6 @@
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
"license": "MIT"
},
- "node_modules/react-markdown": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-6.0.3.tgz",
- "integrity": "sha512-kQbpWiMoBHnj9myLlmZG9T1JdoT/OEyHK7hqM6CqFT14MAkgWiWBUYijLyBmxbntaN6dCDicPcUhWhci1QYodg==",
- "license": "MIT",
- "dependencies": {
- "@types/hast": "^2.0.0",
- "@types/unist": "^2.0.3",
- "comma-separated-tokens": "^1.0.0",
- "prop-types": "^15.7.2",
- "property-information": "^5.3.0",
- "react-is": "^17.0.0",
- "remark-parse": "^9.0.0",
- "remark-rehype": "^8.0.0",
- "space-separated-tokens": "^1.1.0",
- "style-to-object": "^0.3.0",
- "unified": "^9.0.0",
- "unist-util-visit": "^2.0.0",
- "vfile": "^4.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- },
- "peerDependencies": {
- "@types/react": ">=16",
- "react": ">=16"
- }
- },
- "node_modules/react-markdown/node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
- "license": "MIT"
- },
"node_modules/react-oauth2-pkce": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/react-oauth2-pkce/-/react-oauth2-pkce-2.0.7.tgz",
@@ -21913,37 +21231,6 @@
"react-dom": ">=16.8.0"
}
},
- "node_modules/react-redux": {
- "version": "7.2.9",
- "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.9.tgz",
- "integrity": "sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.15.4",
- "@types/react-redux": "^7.1.20",
- "hoist-non-react-statics": "^3.3.2",
- "loose-envify": "^1.4.0",
- "prop-types": "^15.7.2",
- "react-is": "^17.0.2"
- },
- "peerDependencies": {
- "react": "^16.8.3 || ^17 || ^18"
- },
- "peerDependenciesMeta": {
- "react-dom": {
- "optional": true
- },
- "react-native": {
- "optional": true
- }
- }
- },
- "node_modules/react-redux/node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
- "license": "MIT"
- },
"node_modules/react-refresh": {
"version": "0.14.2",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.2.tgz",
@@ -22150,15 +21437,6 @@
"node": ">=8"
}
},
- "node_modules/redux": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz",
- "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==",
- "license": "MIT",
- "dependencies": {
- "@babel/runtime": "^7.9.2"
- }
- },
"node_modules/reflect.getprototypeof": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.10.tgz",
@@ -22287,32 +21565,6 @@
"invariant": "^2.2.4"
}
},
- "node_modules/remark-parse": {
- "version": "9.0.0",
- "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz",
- "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==",
- "license": "MIT",
- "dependencies": {
- "mdast-util-from-markdown": "^0.8.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/remark-rehype": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/remark-rehype/-/remark-rehype-8.1.0.tgz",
- "integrity": "sha512-EbCu9kHgAxKmW1yEYjx3QafMyGY3q8noUbNUI5xyKbaFP89wbhDrKxyIQNukNYthzjNHZu6J7hwFg7hRm1svYA==",
- "license": "MIT",
- "dependencies": {
- "mdast-util-to-hast": "^10.2.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/remedial": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/remedial/-/remedial-1.0.8.tgz",
@@ -23250,15 +22502,6 @@
"node": ">=8"
}
},
- "node_modules/slugify": {
- "version": "1.6.6",
- "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz",
- "integrity": "sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw==",
- "license": "MIT",
- "engines": {
- "node": ">=8.0.0"
- }
- },
"node_modules/smob": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
@@ -23336,16 +22579,6 @@
"deprecated": "Please use @jridgewell/sourcemap-codec instead",
"license": "MIT"
},
- "node_modules/space-separated-tokens": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz",
- "integrity": "sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/spdx-correct": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
@@ -23808,15 +23041,6 @@
"webpack": "^5.0.0"
}
},
- "node_modules/style-to-object": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz",
- "integrity": "sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA==",
- "license": "MIT",
- "dependencies": {
- "inline-style-parser": "0.1.1"
- }
- },
"node_modules/stylehacks": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.1.tgz",
@@ -24328,16 +23552,6 @@
"tslib": "2"
}
},
- "node_modules/trough": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz",
- "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==",
- "license": "MIT",
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/wooorm"
- }
- },
"node_modules/tryer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
@@ -24734,24 +23948,6 @@
"node": ">=4"
}
},
- "node_modules/unified": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz",
- "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==",
- "license": "MIT",
- "dependencies": {
- "bail": "^1.0.0",
- "extend": "^3.0.0",
- "is-buffer": "^2.0.0",
- "is-plain-obj": "^2.0.0",
- "trough": "^1.0.0",
- "vfile": "^4.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/unique-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
@@ -24764,88 +23960,6 @@
"node": ">=8"
}
},
- "node_modules/unist-builder": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz",
- "integrity": "sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-generated": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz",
- "integrity": "sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-is": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz",
- "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-position": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz",
- "integrity": "sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA==",
- "license": "MIT",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-stringify-position": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz",
- "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2.0.2"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-visit": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz",
- "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2.0.0",
- "unist-util-is": "^4.0.0",
- "unist-util-visit-parents": "^3.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/unist-util-visit-parents": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz",
- "integrity": "sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2.0.0",
- "unist-util-is": "^4.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/universalify": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz",
@@ -25098,15 +24212,6 @@
"braces": "^3.0.2"
}
},
- "node_modules/use-memo-one": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/use-memo-one/-/use-memo-one-1.1.3.tgz",
- "integrity": "sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==",
- "license": "MIT",
- "peerDependencies": {
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
- }
- },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -25193,36 +24298,6 @@
"node": ">= 0.8"
}
},
- "node_modules/vfile": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
- "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2.0.0",
- "is-buffer": "^2.0.0",
- "unist-util-stringify-position": "^2.0.0",
- "vfile-message": "^2.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
- "node_modules/vfile-message": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz",
- "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==",
- "license": "MIT",
- "dependencies": {
- "@types/unist": "^2.0.0",
- "unist-util-stringify-position": "^2.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/unified"
- }
- },
"node_modules/w3c-xmlserializer": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz",
@@ -26178,15 +25253,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.4"
- }
- },
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
diff --git a/package.json b/package.json
index 79f9a8cbf..3bda2746a 100644
--- a/package.json
+++ b/package.json
@@ -21,7 +21,6 @@
"@svgr/webpack": "^8.1.0",
"@types/apollo-upload-client": "18.0.0",
"@types/luxon": "2.0.9",
- "@types/react-beautiful-dnd": "13.1.4",
"@types/react-dom": "17.0.20",
"@types/react-router-dom": "5.3.3",
"apollo-upload-client": "18.0.1",
@@ -70,11 +69,9 @@
"prompts": "2.4.0",
"react": "17.0.2",
"react-app-polyfill": "^2.0.0",
- "react-beautiful-dnd": "13.1.1",
"react-dev-utils": "^12.0.1",
"react-dom": "17.0.2",
"react-dropzone": "11.5.3",
- "react-markdown": "6.0.3",
"react-oauth2-pkce": "2.0.7",
"react-refresh": "^0.14.2",
"react-router-dom": "5.3.4",
@@ -82,7 +79,6 @@
"resolve-url-loader": "^5.0.0",
"sass-loader": "^12.6.0",
"semver": "7.6.0",
- "slugify": "1.6.6",
"stream-browserify": "^3.0.0",
"style-loader": "^3.3.4",
"terser-webpack-plugin": "^5.3.14",
diff --git a/src/App.tsx b/src/App.tsx
index 75e351567..1a9d5037f 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -8,19 +8,14 @@ import theme from './theme';
import { LandingPage } from './_shared/pages';
import { PageNotFound } from './_shared/components/';
-import { CollectionsLandingPage } from './collections/pages';
import { CuratedCorpusLandingPage } from './curated-corpus/pages';
import { ModerationLandingPage } from './moderation/pages';
import { useMozillaAuth } from './_shared/hooks';
import { client } from './api/client';
function App(): JSX.Element {
- const {
- canAccessCollections,
- canAccessCuration,
- canAccessModeration,
- jwtIdToken,
- } = useMozillaAuth();
+ const { canAccessCuration, canAccessModeration, jwtIdToken } =
+ useMozillaAuth();
// create an ApolloLink that adds the authorization header
const authLink = setContext((_, { headers }) => {
@@ -47,11 +42,6 @@ function App(): JSX.Element {
- {canAccessCollections && (
-
-
-
- )}
{canAccessCuration && (
diff --git a/src/_shared/components/Header/Header.tsx b/src/_shared/components/Header/Header.tsx
index 4cb151958..50f567e07 100644
--- a/src/_shared/components/Header/Header.tsx
+++ b/src/_shared/components/Header/Header.tsx
@@ -60,7 +60,7 @@ interface HeaderProps {
productLink: string;
/**
- * The name of the Admin UI, i.e. 'Collections'
+ * The name of the Admin UI, i.e. 'Curated Corpus'
*/
productName: string;
}
diff --git a/src/_shared/components/HeaderConnector/HeaderConnector.tsx b/src/_shared/components/HeaderConnector/HeaderConnector.tsx
index 13331a78e..23820cb04 100644
--- a/src/_shared/components/HeaderConnector/HeaderConnector.tsx
+++ b/src/_shared/components/HeaderConnector/HeaderConnector.tsx
@@ -4,7 +4,7 @@ import { useMozillaAuth } from '../../hooks';
interface HeaderConnectorProps {
/**
- * The name of the Admin UI, i.e. 'Collections'
+ * The name of the Admin UI, i.e. 'Curated Corpus'
*/
productName: string;
diff --git a/src/_shared/components/LoadMore/LoadMore.test.tsx b/src/_shared/components/LoadMore/LoadMore.test.tsx
deleted file mode 100644
index 102eae1b1..000000000
--- a/src/_shared/components/LoadMore/LoadMore.test.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import { LoadMore } from './LoadMore';
-import userEvent from '@testing-library/user-event';
-
-describe('The LoadMore component', () => {
- let buttonDisabled: boolean;
- let loadMore: () => void;
- let showSpinner: boolean;
-
- beforeEach(() => {
- buttonDisabled = false;
- loadMore = jest.fn();
- showSpinner = false;
- });
-
- it('renders with props', () => {
- render(
- ,
- );
-
- expect(screen.getByText(/load more results/i)).toBeInTheDocument();
- });
-
- it('disables button if requested', () => {
- buttonDisabled = true;
-
- render(
- ,
- );
-
- const button = screen.getByRole('button') as HTMLButtonElement;
-
- // Helpfully, Material UI doesn't actually use the 'disabled' attribute
- // on a button element - instead, it adds a couple of 'disabled' classes to it.
- expect(button.getAttribute('class')).toContain('disabled');
- });
-
- it('shows the loading spinner if requested', () => {
- showSpinner = true;
-
- render(
- ,
- );
- expect(screen.getByRole('progressbar')).toBeInTheDocument();
- });
-
- it('calls the "loadMore" method on click', async () => {
- render(
- ,
- );
-
- const button = screen.getByRole('button') as HTMLButtonElement;
-
- await waitFor(() => {
- userEvent.click(button);
- });
-
- expect(loadMore).toHaveBeenCalled();
- });
-});
diff --git a/src/_shared/components/LoadMore/LoadMore.tsx b/src/_shared/components/LoadMore/LoadMore.tsx
deleted file mode 100644
index 73e661689..000000000
--- a/src/_shared/components/LoadMore/LoadMore.tsx
+++ /dev/null
@@ -1,58 +0,0 @@
-import React from 'react';
-import { Box, CircularProgress } from '@mui/material';
-import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
-import { Button } from '../';
-
-interface LoadMoreProps {
- /**
- * Whether the button is disabled - it *should* be disabled if no more results
- * exist for a query.
- */
- buttonDisabled: boolean;
-
- /**
- * A function to execute when the button is clicked.
- */
- loadMore: () => void;
-
- /**
- * Whether to show a loading spinner as part of the button label
- * to indicate request status.
- */
- showSpinner: boolean;
-}
-
-/**
- * A 'Load More Results' button, placed below a pageful of results, such as
- * published collections.
- *
- * @param props
- * @constructor
- */
-export const LoadMore: React.FC = (props): JSX.Element => {
- const { buttonDisabled, loadMore, showSpinner } = props;
-
- return (
-
-
-
- );
-};
diff --git a/src/_shared/components/MarkdownPreview/MarkdownPreview.test.tsx b/src/_shared/components/MarkdownPreview/MarkdownPreview.test.tsx
deleted file mode 100644
index a32288060..000000000
--- a/src/_shared/components/MarkdownPreview/MarkdownPreview.test.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import React from 'react';
-import { render, screen } from '@testing-library/react';
-import userEvent from '@testing-library/user-event';
-import { MarkdownPreview } from './MarkdownPreview';
-
-describe('The MarkdownPreview component', () => {
- const markdownSource =
- '* Lists\n' +
- '* [ ] todo\n' +
- '* [x] done\n' +
- '\n' +
- 'A table:\n' +
- '\n' +
- '| a | b |\n' +
- '| - | - |\n' +
- '\n' +
- '## A heading\n' +
- '\n' +
- '```\n' +
- 'a code block\n' +
- '```';
-
- it('renders the default tab successfully', () => {
- render(
-
-
- ,
- );
-
- // Let's check if we can see the tabs
- expect(screen.getByText('Write')).toBeInTheDocument();
- expect(screen.getByText('Preview')).toBeInTheDocument();
-
- // And the textarea field
- expect(screen.getByRole('textbox')).toBeInTheDocument();
- });
-
- it('renders markdown on the "Preview" tab', () => {
- render(
-
-
- ,
- );
-
- userEvent.click(screen.getByText(/preview/i));
-
- // Expect to see a heading defined in the source as "## A heading"
- expect(screen.getByRole('heading')).toBeInTheDocument();
- });
-});
diff --git a/src/_shared/components/MarkdownPreview/MarkdownPreview.tsx b/src/_shared/components/MarkdownPreview/MarkdownPreview.tsx
deleted file mode 100644
index 8c37a216f..000000000
--- a/src/_shared/components/MarkdownPreview/MarkdownPreview.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import React, { useState } from 'react';
-import { CustomTabType, TabPanel, TabSet } from '../';
-import { Box, Link } from '@mui/material';
-import ReactMarkdown from 'react-markdown';
-
-interface MarkdownPreviewProps {
- /**
- * The form field displayed on the first tab
- */
- children: JSX.Element;
-
- /**
- * The height of the preview element in rem - so that the rest of the form
- * doesn't jump around too much.
- */
- minHeight: number;
-
- /**
- * The value of the form field - for rendering into markdown
- */
- source: string;
-}
-
-export const MarkdownPreview: React.FC = (
- props,
-): JSX.Element => {
- const { children, minHeight, source } = props;
-
- // set the default tab
- const [value, setValue] = useState('write');
-
- // switch to active tab when user clicks on tab heading
- const handleChange = (
- event: React.ChangeEvent,
- newValue: string,
- ): void => {
- setValue(newValue);
- };
-
- // Define the set of tabs that we're going to show on this page
- const tabs: CustomTabType[] = [
- {
- label: 'Write',
- pathname: 'write',
- hasLink: false,
- },
- {
- label: 'Preview',
- pathname: 'preview',
- hasLink: false,
- },
- ];
-
- return (
- <>
-
-
- {children}
-
-
-
-
- {source ? source : 'Nothing to preview'}
-
-
-
-
- 👉 Pocket Markdown reference
-
- >
- );
-};
diff --git a/src/_shared/components/ScrollToTop/ScrollToTop.test.tsx b/src/_shared/components/ScrollToTop/ScrollToTop.test.tsx
deleted file mode 100644
index c2d595a57..000000000
--- a/src/_shared/components/ScrollToTop/ScrollToTop.test.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import React from 'react';
-import { render } from '@testing-library/react';
-import { Router } from 'react-router-dom';
-import { createMemoryHistory } from 'history';
-import { ScrollToTop } from './ScrollToTop';
-
-describe('The ScrollToTop component', () => {
- it('scrolls to the top on moving from page to page', () => {
- const history = createMemoryHistory();
-
- window.scrollTo = jest.fn();
-
- render(
-
-
- ,
- );
-
- // move to another page
- history.push('/prospects/?page=2');
-
- expect(window.scrollTo).toHaveBeenCalled();
- });
-});
diff --git a/src/_shared/components/ScrollToTop/ScrollToTop.tsx b/src/_shared/components/ScrollToTop/ScrollToTop.tsx
deleted file mode 100644
index a51228061..000000000
--- a/src/_shared/components/ScrollToTop/ScrollToTop.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { useEffect } from 'react';
-import { useHistory } from 'react-router-dom';
-
-/**
- * A component that scrolls to the top of the page on every URL update.
- */
-export const ScrollToTop: React.FC = (): null => {
- const history = useHistory();
-
- // credit goes to https://stackoverflow.com/a/54343182
- useEffect(() => {
- const unlisten = history.listen(() => {
- window.scrollTo({ top: 0, behavior: 'smooth' });
- });
- return () => {
- unlisten();
- };
- }, [history]);
-
- return null;
-};
diff --git a/src/_shared/components/Tab/Tab.test.tsx b/src/_shared/components/Tab/Tab.test.tsx
deleted file mode 100644
index d1ccfbea5..000000000
--- a/src/_shared/components/Tab/Tab.test.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import { render, screen, within } from '@testing-library/react';
-import { MemoryRouter } from 'react-router-dom';
-import { Tab } from './Tab';
-
-describe('The Tab component', () => {
- it('renders successfully', () => {
- render(
-
-
- ,
- );
-
- const tab = screen.getByRole('tab');
-
- expect(tab).toBeInTheDocument();
- expect(tab).toHaveTextContent('Live');
- expect(within(tab).getByText('22')).toBeInTheDocument();
- });
-});
diff --git a/src/_shared/components/Tab/Tab.tsx b/src/_shared/components/Tab/Tab.tsx
deleted file mode 100644
index 9d321c5bd..000000000
--- a/src/_shared/components/Tab/Tab.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import React from 'react';
-import {
- LinkProps,
- Tab as MuiTab,
- TabProps as MuiTabProps,
-} from '@mui/material';
-import { TabLink } from '../';
-
-interface TabProps {
- /**
- * Optional number of articles in that tab
- */
- count?: number;
-
- /**
- * Tabs use a Link-based component for routing.
- */
- component?: LinkProps;
-
- /**
- * The TabLink component that is rendered inside the Tab
- * needs to know if the tab is selected but we can't use
- * the Tab.selected property as it won't be forwarded to the
- * TabLink component; a custom property is needed.
- */
- isCurrentTab?: boolean;
-
- /**
- * The route for the TabLink component.
- */
- to?: string;
-
- /**
- * Whether this tab has a clickable link to another page
- */
- hasLink?: boolean;
-}
-
-/**
- * A custom Tab component that uses TabLink (a customised Link
- * from react-router-dom) to display a tab with, optionally,
- * the number of items under that tab.
- */
-export const Tab: React.FC = (props): JSX.Element => {
- const { count, label, value } = props;
-
- // Destructure `hasLink` property from ~280 others so that it doesn't get
- // passed down to the child component.
- // We use it here to set the link component if the tab needs a working link
- // with a route to elsewhere in the app
- const { hasLink, ...otherProps } = props;
-
- return (
-
- );
-};
diff --git a/src/_shared/components/TabNavigation/TabNavigation.test.tsx b/src/_shared/components/TabNavigation/TabNavigation.test.tsx
deleted file mode 100644
index 03c5da109..000000000
--- a/src/_shared/components/TabNavigation/TabNavigation.test.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import React from 'react';
-import { render, screen, within } from '@testing-library/react';
-import { MemoryRouter } from 'react-router-dom';
-import { Tab, TabNavigation } from '../';
-
-describe('The TabNavigation component', () => {
- it('renders successfully with the first tab selected by default', () => {
- const activeTab = '/de-DE/live/';
-
- render(
-
- true}>
-
-
-
- ,
- );
- const tabNavigation = screen.getByRole('tablist');
- const tabs = within(tabNavigation).getAllByRole('tab');
-
- expect(tabNavigation).toBeInTheDocument();
- expect(tabs.length).toEqual(2);
-
- tabs.forEach((tab: HTMLElement) => {
- expect(tab).toBeInTheDocument();
- });
-
- expect(tabs[0].getAttribute('aria-selected')).toEqual('true');
- expect(tabs[1].getAttribute('aria-selected')).toEqual('false');
- });
-
- it('shows selected tab in the foreground', () => {
- // second tab
- const activeTab = '/de-DE/scheduled/';
-
- render(
-
- true}>
-
-
-
- ,
- );
-
- const tabNavigation = screen.getByRole('tablist');
- const tabs = within(tabNavigation).getAllByRole('tab');
-
- expect(tabs[1].getAttribute('aria-selected')).toEqual('true');
- expect(tabs[0].getAttribute('aria-selected')).toEqual('false');
- });
-});
diff --git a/src/_shared/components/TabNavigation/TabNavigation.tsx b/src/_shared/components/TabNavigation/TabNavigation.tsx
deleted file mode 100644
index 8d15e8983..000000000
--- a/src/_shared/components/TabNavigation/TabNavigation.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import React from 'react';
-import { AppBar, Tabs, TabsProps as MuiTabsProps } from '@mui/material';
-import { curationPalette } from '../../../theme';
-
-interface TabsProps {
- /**
- * Event types in Material UI are quite inflexible for some components
- * and need to be overriden with event signatures we actually use.
- * @param event
- * @param value
- */
- onChange: (event: React.ChangeEvent, value: string) => void;
-}
-
-/**
- * TabNavigation - a wrapper component for custom tabs (see Tab, TabLink, and TabPanel)
- * that are passed as children.
- */
-export const TabNavigation: React.FC<
- Omit & TabsProps
-> = (props) => {
- const { value, onChange, children } = props;
-
- return (
-
-
- {children}
-
-
- );
-};
diff --git a/src/_shared/components/TabPanel/TabPanel.test.tsx b/src/_shared/components/TabPanel/TabPanel.test.tsx
deleted file mode 100644
index ac4235c3b..000000000
--- a/src/_shared/components/TabPanel/TabPanel.test.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-import { render, screen, within } from '@testing-library/react';
-import { TabPanel } from './TabPanel';
-
-describe('The TabPanel component', () => {
- it('renders successfully', () => {
- // if value === index, this tab panel belongs to the active tab
- // and should be shown on the screen
- render(
-
-
Tab contents
- ,
- );
-
- const tabPanel = screen.getByRole('tabpanel');
-
- expect(tabPanel).toBeInTheDocument();
- expect(tabPanel).not.toHaveAttribute('hidden');
- expect(within(tabPanel).getByText(/tab contents/i)).toBeInTheDocument();
- });
-});
diff --git a/src/_shared/components/TabPanel/TabPanel.tsx b/src/_shared/components/TabPanel/TabPanel.tsx
deleted file mode 100644
index 60601f41e..000000000
--- a/src/_shared/components/TabPanel/TabPanel.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import React from 'react';
-import { Box, Typography } from '@mui/material';
-
-interface TabPanelProps {
- /**
- * The contents of the TabPanel
- */
- children: React.ReactNode;
-
- /**
- * The unique identifier of this tab panel, i.e. "/:feed/prospects/rejected/"
- */
- index: string;
-
- /**
- * The heading of the panel, i.e. "Prospects".
- */
- heading?: string;
-
- /**
- * The value of the current tab, i.e. "/:feed/prospects/approved/.
- * If equal to index, the contents of this tab will be visible to the user.
- */
- value: string;
-}
-
-/**
- * The contents of the tab the user clicks over to. See also TabNavigation, Tab.
- */
-export const TabPanel = (props: TabPanelProps): JSX.Element => {
- const { children, index, heading, value, ...other } = props;
-
- return (
-
- );
-};
diff --git a/src/_shared/components/TabSet/TabSet.test.tsx b/src/_shared/components/TabSet/TabSet.test.tsx
deleted file mode 100644
index 8003aec8e..000000000
--- a/src/_shared/components/TabSet/TabSet.test.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-import { render, screen } from '@testing-library/react';
-import { MemoryRouter } from 'react-router-dom';
-import { CustomTabType, TabSet } from './TabSet';
-
-describe('The TabSet component', () => {
- it('renders successfully', () => {
- const tabs: CustomTabType[] = [
- {
- count: 222,
- label: 'Snoozed',
- pathname: '/en-US/prospects/snoozed/',
- hasLink: true,
- },
- ];
- render(
-
-
- ,
- );
-
- const tab = screen.getByRole('tab');
- expect(tab).toBeInTheDocument();
- expect(tab).toHaveTextContent('Snoozed222');
- });
-});
diff --git a/src/_shared/components/TabSet/TabSet.tsx b/src/_shared/components/TabSet/TabSet.tsx
deleted file mode 100644
index 2124f4cfa..000000000
--- a/src/_shared/components/TabSet/TabSet.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import React from 'react';
-import { Tab, TabNavigation } from '../';
-
-/**
- * Appending 'Type' to the name of this interface so that it's not confused with any
- * tab-related components elsewhere in the repository.
- */
-export interface CustomTabType {
- /**
- * The name of the tab, i.e. "Approved".
- */
- label: string;
-
- /**
- * The number of items on this tab - fetched from the API, hence undefined initially.
- */
- count?: number;
-
- /**
- * The path for the tab link, i.e. "/prospects/approved/".
- */
- pathname: string;
-
- /**
- * Whether this tab needs a link at all
- */
- hasLink?: boolean;
-}
-
-interface TabSetProps {
- /**
- * The tab to be highlighted as active.
- */
- currentTab: string;
-
- /**
- * This function handles switching from tab to tab. It needs to be lifted up
- * to the parent component that uses it since it is needed both here and in
- * TabPanel components used to display the data underneath each tab.
- */
- handleChange: (
- event: React.ChangeEvent,
- newCurrentTab: string,
- ) => void;
-
- /**
- * The list of tabs to display on the page.
- */
- tabs: CustomTabType[];
-}
-
-/**
- * This component produces a ready-to-use set of tabs with links and pills indicating
- * the number of items accessible under each tab.
- */
-export const TabSet: React.FC = (props): JSX.Element => {
- const { currentTab, handleChange, tabs } = props;
-
- return (
-
- {tabs.map((tab: CustomTabType) => {
- return (
-
- );
- })}
-
- );
-};
diff --git a/src/_shared/components/index.ts b/src/_shared/components/index.ts
index 0daa29e36..1a4409c80 100644
--- a/src/_shared/components/index.ts
+++ b/src/_shared/components/index.ts
@@ -7,18 +7,10 @@ export { HandleApiResponse } from './HandleApiResponse/HandleApiResponse';
export { Header } from './Header/Header';
export type { MenuLink } from './Header/Header';
export { HeaderConnector } from './HeaderConnector/HeaderConnector';
-export { LoadMore } from './LoadMore/LoadMore';
-export { MarkdownPreview } from './MarkdownPreview/MarkdownPreview';
export { Modal } from './Modal/Modal';
export { SharedFormButtons } from './_form-elements/SharedFormButtons/SharedFormButtons';
export type { SharedFormButtonsProps } from './_form-elements/SharedFormButtons/SharedFormButtons';
-export { ScrollToTop } from './ScrollToTop/ScrollToTop';
-export { Tab } from './Tab/Tab';
export { TabLink } from './TabLink/TabLink';
-export { TabNavigation } from './TabNavigation/TabNavigation';
-export { TabPanel } from './TabPanel/TabPanel';
-export { TabSet } from './TabSet/TabSet';
-export type { CustomTabType } from './TabSet/TabSet';
export { ImageUpload } from '../../curated-corpus/components/ImageUpload/ImageUpload';
export { PageNotFound } from '../components/PageNotFound/PageNotFound';
export { FloatingActionButton } from '../components/FloatingActionButton/FloatingActionButton';
diff --git a/src/_shared/hooks/index.ts b/src/_shared/hooks/index.ts
index a2a1bdfdc..20e7b359f 100644
--- a/src/_shared/hooks/index.ts
+++ b/src/_shared/hooks/index.ts
@@ -1,4 +1,3 @@
-export { useFetchMoreResults } from './useFetchMoreResults/useFetchMoreResults';
export { useNotifications } from './useNotifications/useNotifications';
export { useToggle } from './useToggle/useToggle';
export { useRunMutation } from './useRunMutation/useRunMutation';
diff --git a/src/_shared/hooks/useFetchMoreResults/useFetchMoreResults.ts b/src/_shared/hooks/useFetchMoreResults/useFetchMoreResults.ts
deleted file mode 100644
index ee555738c..000000000
--- a/src/_shared/hooks/useFetchMoreResults/useFetchMoreResults.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { useState } from 'react';
-import * as Apollo from '@apollo/client';
-import { ApolloError } from '@apollo/client';
-import { useNotifications } from '../';
-
-/**
- * This hook handles loading lists of data in paginated chunks:
- * coupled with field policies on queries, i.e. getCollectionAuthors,
- * this returns an initial pageful of data from the API or cache.
- * On subsequent user requests for more data, it requests the next pageful
- * from the GraphQL server.
- *
- * Returns the three standard Apollo Client useQuery hook variables:
- * loading, error and data, as well as a 'reloading' variable that indicates
- * request status for subsequent calls to the API, and an 'updateData' helper
- * function that can be attached to a UI element on the page and executed
- * on demand to fetch more results.
- *
- * @param queryHook
- * @param options
- */
-export const useFetchMoreResults = (
- queryHook: any,
- options: Apollo.QueryHookOptions,
-): [
- loading: boolean,
- reloading: boolean,
- error: ApolloError | undefined,
- data: any,
- updateData: () => void,
-] => {
- const { showNotification } = useNotifications();
-
- // We need to keep track of the current page
- const [currentPage, setCurrentPage] = useState(options.variables?.page ?? 1);
-
- // Keep track of whether we're doing an initial data load (which is captured
- // in the 'loading' variable or we're fetching data for subsequent pagefuls
- // of data.
- const [reloading, setReloading] = useState(false);
-
- // Send a request for the data to Apollo Client
- const { loading, error, data, fetchMore } = queryHook(options);
-
- /**
- * Send off a request to fetch data for the next page's worth of results
- */
- const updateData = () => {
- setReloading(true);
-
- // Refresh query results with another pageful of data. Bypasses cache
- fetchMore({
- // Any other variables passed to the initial query remain the same,
- // only the 'page' variable will be overridden on subsequent calls
- // to the GraphQL server.
- variables: {
- page: currentPage + 1,
- },
- })
- .then(() => {
- setReloading(false);
- setCurrentPage(currentPage + 1);
- })
- .catch((error: ApolloError) => {
- // Show an error in a toast message, if any
- showNotification(error.message, 'error');
- });
- };
-
- return [loading, reloading, error, data, updateData];
-};
diff --git a/src/_shared/hooks/useMozillaAuth/useMozillaAuth.ts b/src/_shared/hooks/useMozillaAuth/useMozillaAuth.ts
index ed070a491..e98aae30f 100644
--- a/src/_shared/hooks/useMozillaAuth/useMozillaAuth.ts
+++ b/src/_shared/hooks/useMozillaAuth/useMozillaAuth.ts
@@ -26,7 +26,6 @@ export const useMozillaAuth = (): {
authService: AuthService;
parsedIdToken: IDToken;
jwtIdToken: string;
- canAccessCollections: boolean;
canAccessCuration: boolean;
canAccessModeration: boolean;
} => {
@@ -50,7 +49,6 @@ export const useMozillaAuth = (): {
// Everyone at Pocket has read-only access to this tool
// Access groups are checked on the backend when actions (mutations)
// are performed.
- canAccessCollections: true, //parsedIdToken.groups.includes('asd'),
canAccessCuration: true, //parsedIdToken.groups.includes('asd'),
canAccessModeration: true,
};
diff --git a/src/_shared/pages/LandingPage/LandingPage.tsx b/src/_shared/pages/LandingPage/LandingPage.tsx
index 68fdf5106..72fdce0f9 100644
--- a/src/_shared/pages/LandingPage/LandingPage.tsx
+++ b/src/_shared/pages/LandingPage/LandingPage.tsx
@@ -1,6 +1,5 @@
import React from 'react';
import { Grid, Paper, Typography } from '@mui/material';
-import CollectionsBookmarkIcon from '@mui/icons-material/CollectionsBookmark';
import GavelIcon from '@mui/icons-material/Gavel';
import LibraryAddCheckIcon from '@mui/icons-material/LibraryAddCheck';
import { HeaderConnector } from '../../components';
@@ -8,8 +7,7 @@ import { StyledContainer, StyledRouterLink } from '../../styled';
import { useMozillaAuth } from '../../hooks';
export const LandingPage = (): JSX.Element => {
- const { canAccessCuration, canAccessCollections, canAccessModeration } =
- useMozillaAuth();
+ const { canAccessCuration, canAccessModeration } = useMozillaAuth();
return (
<>
@@ -26,19 +24,6 @@ export const LandingPage = (): JSX.Element => {
flexGrow: 1,
}}
>
- {canAccessCollections && (
-
-
-
-
-
-
-
Collections
-
-
-
- )}
-
{canAccessCuration && (
diff --git a/src/_shared/styled/StyledCardLink.tsx b/src/_shared/styled/StyledCardLink.tsx
deleted file mode 100644
index 191b06ce8..000000000
--- a/src/_shared/styled/StyledCardLink.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import { Link } from '@mui/material';
-import { styled } from '@mui/system';
-
-/**
- * A styled link to elsewhere in the app that wraps around a MUI Card element
- * so that the entire Card area is clickable.
- */
-export const StyledCardLink = styled(Link)(() => ({
- textDecoration: 'none',
- padding: '1.25rem 0',
-})) as typeof Link;
diff --git a/src/_shared/styled/StyledChipComponent.tsx b/src/_shared/styled/StyledChipComponent.tsx
deleted file mode 100644
index ed4efcd56..000000000
--- a/src/_shared/styled/StyledChipComponent.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Chip } from '@mui/material';
-import { styled } from '@mui/system';
-
-/**
- * A custom styled element. Currently, used to display labels on CollectionListCard and CollectionInfo components.
- */
-export const StyledChipComponent = styled(Chip)(() => ({
- '&.MuiChip-root': {
- color: 'white',
- background: `linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(0,128,120,0.5942577714679622) 0%)`,
- },
- '&.MuiChip-root .MuiChip-icon': {
- color: 'white',
- },
-}));
diff --git a/src/_shared/styled/index.ts b/src/_shared/styled/index.ts
index 6e9a15916..ed743fcdc 100644
--- a/src/_shared/styled/index.ts
+++ b/src/_shared/styled/index.ts
@@ -1,7 +1,5 @@
export { StyledAppBar } from './StyledAppBar';
export { StyledCardActions } from './StyledCardActions';
-export { StyledCardLink } from './StyledCardLink';
-export { StyledChipComponent } from './StyledChipComponent';
export { StyledContainer } from './StyledContainer';
export { StyledCorpusItemCard } from './StyledCorpusItemCard';
export { StyledDrawerHeader } from './StyledDrawerHeader';
diff --git a/src/_shared/utils/flattenAuthors.ts b/src/_shared/utils/flattenAuthors.ts
index b83cadeff..1e6147a8b 100644
--- a/src/_shared/utils/flattenAuthors.ts
+++ b/src/_shared/utils/flattenAuthors.ts
@@ -1,23 +1,15 @@
-import {
- CollectionAuthor,
- CollectionStoryAuthor,
- CorpusItemAuthor,
-} from '../../api/generatedTypes';
+import { CorpusItemAuthor } from '../../api/generatedTypes';
/**
- * A helper function that takes in an array of corpus/collection [story] authors
+ * A helper function that takes in an array of corpus item authors
* and returns a comma-separated list suitable for displaying to end users.
*
* @param authors
*/
-export const flattenAuthors = (
- authors: CollectionStoryAuthor[] | CollectionAuthor[] | CorpusItemAuthor[],
-): string => {
+export const flattenAuthors = (authors: CorpusItemAuthor[]): string => {
return authors
- .map(
- (author: CollectionStoryAuthor | CollectionAuthor | CorpusItemAuthor) => {
- return author.name;
- },
- )
+ .map((author: CorpusItemAuthor) => {
+ return author.name;
+ })
.join(', ');
};
diff --git a/src/_shared/utils/transformAuthors.ts b/src/_shared/utils/transformAuthors.ts
index 213bb5958..6183c69b0 100644
--- a/src/_shared/utils/transformAuthors.ts
+++ b/src/_shared/utils/transformAuthors.ts
@@ -1,8 +1,4 @@
-import {
- CollectionStoryAuthor,
- CorpusItemAuthor,
- Maybe,
-} from '../../api/generatedTypes';
+import { CorpusItemAuthor, Maybe } from '../../api/generatedTypes';
/**
* A helper function that transforms a comma-separated string of names
@@ -12,7 +8,7 @@ import {
*/
export const transformAuthors = (
authors: string | Maybe | undefined,
-): CollectionStoryAuthor[] | CorpusItemAuthor[] => {
+): CorpusItemAuthor[] => {
// get rid of any whitespace on the sides
authors = authors ? authors.trim() : authors;
diff --git a/src/api/client.ts b/src/api/client.ts
index 7ba8a6672..b698cf32b 100644
--- a/src/api/client.ts
+++ b/src/api/client.ts
@@ -1,11 +1,6 @@
import { ApolloClient, ApolloLink, InMemoryCache } from '@apollo/client';
import createUploadLink from 'apollo-upload-client/createUploadLink.mjs';
import { config } from '../config';
-import {
- getCollectionAuthorsFieldPolicy,
- getCollectionPartnersFieldPolicy,
- searchCollectionsFieldPolicy,
-} from './field-policies';
/**
* Custom type policies for Apollo Cache. Now in their own
@@ -13,15 +8,6 @@ import {
*/
export const apolloCache = new InMemoryCache({
typePolicies: {
- CollectionAuthor: {
- keyFields: ['externalId'],
- },
- CollectionStory: {
- keyFields: ['externalId'],
- },
- Collection: {
- keyFields: ['externalId'],
- },
ApprovedCorpusItem: {
keyFields: ['externalId'],
},
@@ -34,13 +20,6 @@ export const apolloCache = new InMemoryCache({
ScheduledCorpusItemsResult: {
keyFields: ['scheduledDate'],
},
- Query: {
- fields: {
- getCollectionAuthors: getCollectionAuthorsFieldPolicy,
- getCollectionPartners: getCollectionPartnersFieldPolicy,
- searchCollections: searchCollectionsFieldPolicy,
- },
- },
},
});
diff --git a/src/api/field-policies/getCollectionAuthorsFieldPolicy.ts b/src/api/field-policies/getCollectionAuthorsFieldPolicy.ts
deleted file mode 100644
index 420823036..000000000
--- a/src/api/field-policies/getCollectionAuthorsFieldPolicy.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { CollectionAuthorsResult } from '../generatedTypes';
-import { FieldPolicy } from '@apollo/client/cache/inmemory/policies';
-import { mergePaginatedDataInCache } from '../helpers/mergePaginatedDataInCache';
-import { readPaginatedDataFromCache } from '../helpers/readPaginatedDataFromCache';
-
-/**
- * A field policy for the 'getCollectionAuthors' query that is used
- * on the Authors page and also in the 'Authors' dropdown
- * in the 'Add/Edit Collection' form.
- *
- * The field policy is required to implement caching on the frontend properly.
- */
-export const getCollectionAuthorsFieldPolicy: FieldPolicy<
- CollectionAuthorsResult,
- CollectionAuthorsResult,
- CollectionAuthorsResult
-> = {
- // Ignore all query variables when merging CollectionAuthor objects in the cache.
- keyArgs: false,
-
- // Merge the authors into a single list in the cache.
- merge: function (existing, incoming, options): CollectionAuthorsResult {
- return mergePaginatedDataInCache(existing, incoming, options, 'authors');
- },
-
- // Read the right chunk of data from the cache
- read: function (existing, options): CollectionAuthorsResult {
- return readPaginatedDataFromCache(existing, options, 'authors');
- },
-};
diff --git a/src/api/field-policies/getCollectionPartnersFieldPolicy.ts b/src/api/field-policies/getCollectionPartnersFieldPolicy.ts
deleted file mode 100644
index 98c811e38..000000000
--- a/src/api/field-policies/getCollectionPartnersFieldPolicy.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { FieldPolicy } from '@apollo/client/cache/inmemory/policies';
-import { mergePaginatedDataInCache } from '../helpers/mergePaginatedDataInCache';
-import { readPaginatedDataFromCache } from '../helpers/readPaginatedDataFromCache';
-import { CollectionPartnersResult } from '../generatedTypes';
-
-/**
- * A field policy for the 'getCollectionPartners' query that is used
- * on the Partners page and also in the 'Partners' dropdown
- * in the 'Add/Edit Partnership' form.
- *
- * The field policy is required to implement caching on the frontend properly.
- */
-export const getCollectionPartnersFieldPolicy: FieldPolicy<
- CollectionPartnersResult,
- CollectionPartnersResult,
- CollectionPartnersResult
-> = {
- // Ignore all query variables when merging CollectionAuthor objects in the cache.
- keyArgs: false,
-
- // Merge the authors into a single list in the cache.
- merge: function (existing, incoming, options): CollectionPartnersResult {
- return mergePaginatedDataInCache(existing, incoming, options, 'partners');
- },
-
- // Read the right chunk of data from the cache
- read: function (existing, options): CollectionPartnersResult {
- return readPaginatedDataFromCache(existing, options, 'partners');
- },
-};
diff --git a/src/api/field-policies/index.ts b/src/api/field-policies/index.ts
deleted file mode 100644
index 455feee7b..000000000
--- a/src/api/field-policies/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export { getCollectionAuthorsFieldPolicy } from './getCollectionAuthorsFieldPolicy';
-export { getCollectionPartnersFieldPolicy } from './getCollectionPartnersFieldPolicy';
-export { searchCollectionsFieldPolicy } from './searchCollectionsFieldPolicy';
diff --git a/src/api/field-policies/searchCollectionsFieldPolicy.ts b/src/api/field-policies/searchCollectionsFieldPolicy.ts
deleted file mode 100644
index 1ba77fba6..000000000
--- a/src/api/field-policies/searchCollectionsFieldPolicy.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { CollectionsResult } from '../generatedTypes';
-import { FieldPolicy } from '@apollo/client/cache/inmemory/policies';
-import { mergePaginatedDataInCache } from '../helpers/mergePaginatedDataInCache';
-import { readPaginatedDataFromCache } from '../helpers/readPaginatedDataFromCache';
-
-/**
- * A field policy for the 'searchCollections' query.
- *
- * The field policy is required to implement caching on the frontend properly.
- */
-export const searchCollectionsFieldPolicy: FieldPolicy<
- CollectionsResult,
- CollectionsResult,
- CollectionsResult
-> = {
- // Group collections in the cache by the value of the 'Status' field
- // to be able to provide independent pagination to Draft/Published/Archived tabs.
- keyArgs: function (args) {
- // Collection status is hidden deep in the query arguments and cannot be
- // picked up by Apollo with a simple reference to 'status',
- // i.e. keyArgs: ['status'], so let's fish it out of the filters
- if (args) {
- return args.filters.status;
- }
- return false;
- },
-
- // Merge the collections into a single list in the cache, segmented by status
- // (see keyArgs function above).
- merge: function (existing, incoming, options): CollectionsResult {
- return mergePaginatedDataInCache(
- existing,
- incoming,
- options,
- 'collections',
- );
- },
-
- // Read the right chunk of data from the cache
- read: function (existing, options): CollectionsResult {
- return readPaginatedDataFromCache(existing, options, 'collections');
- },
-};
diff --git a/src/api/fragments/CollectionAuthorData.ts b/src/api/fragments/CollectionAuthorData.ts
deleted file mode 100644
index 472eaeacd..000000000
--- a/src/api/fragments/CollectionAuthorData.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * All the properties that are needed to display cards and forms with author data
- */
-export const CollectionAuthorData = gql`
- fragment CollectionAuthorData on CollectionAuthor {
- externalId
- name
- slug
- bio
- imageUrl
- active
- }
-`;
diff --git a/src/api/fragments/CollectionData.ts b/src/api/fragments/CollectionData.ts
deleted file mode 100644
index 337b4f9d9..000000000
--- a/src/api/fragments/CollectionData.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from './CollectionAuthorData';
-
-/**
- * All the properties that are needed to display and edit collections
- *
- * Note that the data returned by this fragment does not include collection
- * stories which are loaded on the individual collection page separately.
- */
-export const CollectionData = gql`
- fragment CollectionData on Collection {
- externalId
- title
- slug
- excerpt
- intro
- imageUrl
- language
- status
- authors {
- ...CollectionAuthorData
- }
- curationCategory {
- externalId
- name
- slug
- }
- IABParentCategory {
- externalId
- name
- slug
- }
- IABChildCategory {
- externalId
- name
- slug
- }
- labels {
- externalId
- name
- }
- partnership {
- externalId
- type
- name
- url
- imageUrl
- blurb
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/fragments/CollectionPartnerAssociationData.ts b/src/api/fragments/CollectionPartnerAssociationData.ts
deleted file mode 100644
index 949c47566..000000000
--- a/src/api/fragments/CollectionPartnerAssociationData.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from './CollectionPartnerData';
-
-/**
- * All the properties that are needed to display cards and forms
- * for collection-partner associations
- */
-export const CollectionPartnerAssociationData = gql`
- fragment CollectionPartnerAssociationData on CollectionPartnerAssociation {
- externalId
- type
- name
- url
- imageUrl
- blurb
- partner {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/fragments/CollectionPartnerData.ts b/src/api/fragments/CollectionPartnerData.ts
deleted file mode 100644
index fee059b04..000000000
--- a/src/api/fragments/CollectionPartnerData.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * All the properties that are needed to display cards and forms with partner data
- */
-export const CollectionPartnerData = gql`
- fragment CollectionPartnerData on CollectionPartner {
- externalId
- name
- url
- imageUrl
- blurb
- }
-`;
diff --git a/src/api/fragments/CollectionStoryData.ts b/src/api/fragments/CollectionStoryData.ts
deleted file mode 100644
index 72f36d284..000000000
--- a/src/api/fragments/CollectionStoryData.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * All the properties that are needed to display components with collection
- * story data in them (such as media cards or forms)
- */
-export const CollectionStoryData = gql`
- fragment CollectionStoryData on CollectionStory {
- externalId
- url
- title
- excerpt
- imageUrl
- authors {
- name
- sortOrder
- }
- publisher
- fromPartner
- sortOrder
- }
-`;
diff --git a/src/api/fragments/SectionData.ts b/src/api/fragments/SectionData.ts
index ee2647cc2..0547ef979 100644
--- a/src/api/fragments/SectionData.ts
+++ b/src/api/fragments/SectionData.ts
@@ -20,8 +20,8 @@ export const BaseSectionData = gql`
startDate
endDate
status
- followable
allowAds
+ followable
}
`;
export const SectionData = gql`
diff --git a/src/api/generatedTypes.ts b/src/api/generatedTypes.ts
index 3d675ff4d..dd3c4c3f0 100644
--- a/src/api/generatedTypes.ts
+++ b/src/api/generatedTypes.ts
@@ -2648,113 +2648,6 @@ export enum Videoness {
NoVideos = 'NO_VIDEOS',
}
-export type CollectionAuthorDataFragment = {
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
-};
-
-export type CollectionDataFragment = {
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
-};
-
-export type CollectionPartnerAssociationDataFragment = {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
-};
-
-export type CollectionPartnerDataFragment = {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
-};
-
-export type CollectionStoryDataFragment = {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
-};
-
export type CuratedItemDataWithHistoryFragment = {
__typename?: 'ApprovedCorpusItem';
externalId: string;
@@ -2805,8 +2698,8 @@ export type BaseSectionDataFragment = {
startDate?: any | null;
endDate?: any | null;
status: SectionStatus;
- followable: boolean;
allowAds: boolean;
+ followable: boolean;
iab?: {
__typename?: 'IABMetadata';
taxonomy: string;
@@ -2831,8 +2724,8 @@ export type SectionDataFragment = {
startDate?: any | null;
endDate?: any | null;
status: SectionStatus;
- followable: boolean;
allowAds: boolean;
+ followable: boolean;
sectionItems: Array<{
__typename?: 'SectionItem';
createdAt: number;
@@ -3225,169 +3118,6 @@ export type CreateApprovedCorpusItemMutation = {
};
};
-export type CreateCollectionMutationVariables = Exact<{
- data: CreateCollectionInput;
-}>;
-
-export type CreateCollectionMutation = {
- __typename?: 'Mutation';
- createCollection: {
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- };
-};
-
-export type CreateCollectionAuthorMutationVariables = Exact<{
- name: Scalars['String'];
- slug?: InputMaybe;
- bio?: InputMaybe;
- imageUrl?: InputMaybe;
- active?: InputMaybe;
-}>;
-
-export type CreateCollectionAuthorMutation = {
- __typename?: 'Mutation';
- createCollectionAuthor: {
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- };
-};
-
-export type CreateCollectionPartnerMutationVariables = Exact<{
- name: Scalars['String'];
- url: Scalars['Url'];
- blurb: Scalars['Markdown'];
- imageUrl: Scalars['Url'];
-}>;
-
-export type CreateCollectionPartnerMutation = {
- __typename?: 'Mutation';
- createCollectionPartner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
-};
-
-export type CreateCollectionPartnerAssociationMutationVariables = Exact<{
- type: CollectionPartnershipType;
- partnerExternalId: Scalars['String'];
- collectionExternalId: Scalars['String'];
- name?: InputMaybe;
- url?: InputMaybe;
- imageUrl?: InputMaybe;
- blurb?: InputMaybe;
-}>;
-
-export type CreateCollectionPartnerAssociationMutation = {
- __typename?: 'Mutation';
- createCollectionPartnerAssociation: {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
- };
-};
-
-export type CreateCollectionStoryMutationVariables = Exact<{
- collectionExternalId: Scalars['String'];
- url: Scalars['Url'];
- title: Scalars['String'];
- excerpt: Scalars['Markdown'];
- imageUrl: Scalars['Url'];
- authors: Array | CollectionStoryAuthorInput;
- publisher: Scalars['String'];
- sortOrder?: InputMaybe;
- fromPartner?: InputMaybe;
-}>;
-
-export type CreateCollectionStoryMutation = {
- __typename?: 'Mutation';
- createCollectionStory: {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- };
-};
-
export type CreateCustomSectionMutationVariables = Exact<{
data: CreateCustomSectionInput;
}>;
@@ -3409,8 +3139,8 @@ export type CreateCustomSectionMutation = {
startDate?: any | null;
endDate?: any | null;
status: SectionStatus;
- followable: boolean;
allowAds: boolean;
+ followable: boolean;
iab?: {
__typename?: 'IABMetadata';
taxonomy: string;
@@ -3419,15 +3149,6 @@ export type CreateCustomSectionMutation = {
};
};
-export type CreateLabelMutationVariables = Exact<{
- name: Scalars['String'];
-}>;
-
-export type CreateLabelMutation = {
- __typename?: 'Mutation';
- createLabel: { __typename?: 'Label'; externalId: string; name: string };
-};
-
export type CreateOrUpdatePublisherDomainMutationVariables = Exact<{
data: CreateOrUpdatePublisherDomainInput;
}>;
@@ -3516,55 +3237,6 @@ export type CreateSectionItemMutation = {
};
};
-export type DeleteCollectionPartnerAssociationMutationVariables = Exact<{
- externalId: Scalars['String'];
-}>;
-
-export type DeleteCollectionPartnerAssociationMutation = {
- __typename?: 'Mutation';
- deleteCollectionPartnerAssociation: {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
- };
-};
-
-export type DeleteCollectionStoryMutationVariables = Exact<{
- externalId: Scalars['String'];
-}>;
-
-export type DeleteCollectionStoryMutation = {
- __typename?: 'Mutation';
- deleteCollectionStory: {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- };
-};
-
export type DeleteCustomSectionMutationVariables = Exact<{
externalId: Scalars['ID'];
}>;
@@ -3653,8 +3325,8 @@ export type DisableEnableSectionMutation = {
startDate?: any | null;
endDate?: any | null;
status: SectionStatus;
- followable: boolean;
allowAds: boolean;
+ followable: boolean;
sectionItems: Array<{
__typename?: 'SectionItem';
createdAt: number;
@@ -3705,18 +3377,6 @@ export type DisableEnableSectionMutation = {
};
};
-export type ImageUploadMutationVariables = Exact<{
- image: Scalars['Upload'];
- width: Scalars['Int'];
- height: Scalars['Int'];
- fileSizeBytes: Scalars['Int'];
-}>;
-
-export type ImageUploadMutation = {
- __typename?: 'Mutation';
- collectionImageUpload: { __typename?: 'CollectionImageUrl'; url: string };
-};
-
export type ModerateShareableListMutationVariables = Exact<{
data: ModerateShareableListInput;
}>;
@@ -3999,384 +3659,37 @@ export type UpdateApprovedCorpusItemMutation = {
};
};
-export type UpdateCollectionMutationVariables = Exact<{
- data: UpdateCollectionInput;
+export type UpdateCustomSectionMutationVariables = Exact<{
+ data: UpdateCustomSectionInput;
}>;
-export type UpdateCollectionMutation = {
+export type UpdateCustomSectionMutation = {
__typename?: 'Mutation';
- updateCollection: {
- __typename?: 'Collection';
+ updateCustomSection: {
+ __typename?: 'Section';
externalId: string;
title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- };
-};
-
-export type UpdateCollectionAuthorMutationVariables = Exact<{
- externalId: Scalars['String'];
- name: Scalars['String'];
- slug: Scalars['String'];
- bio?: InputMaybe;
- imageUrl?: InputMaybe;
- active?: InputMaybe;
-}>;
-
-export type UpdateCollectionAuthorMutation = {
- __typename?: 'Mutation';
- updateCollectionAuthor: {
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- };
-};
-
-export type UpdateCollectionAuthorImageUrlMutationVariables = Exact<{
- externalId: Scalars['String'];
- imageUrl: Scalars['Url'];
-}>;
-
-export type UpdateCollectionAuthorImageUrlMutation = {
- __typename?: 'Mutation';
- updateCollectionAuthorImageUrl: {
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- };
-};
-
-export type UpdateCollectionImageUrlMutationVariables = Exact<{
- externalId: Scalars['String'];
- imageUrl: Scalars['Url'];
-}>;
-
-export type UpdateCollectionImageUrlMutation = {
- __typename?: 'Mutation';
- updateCollectionImageUrl: {
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- };
-};
-
-export type UpdateCollectionPartnerMutationVariables = Exact<{
- externalId: Scalars['String'];
- name: Scalars['String'];
- url: Scalars['Url'];
- blurb: Scalars['Markdown'];
- imageUrl?: InputMaybe;
-}>;
-
-export type UpdateCollectionPartnerMutation = {
- __typename?: 'Mutation';
- updateCollectionPartner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
-};
-
-export type UpdateCollectionPartnerAssociationMutationVariables = Exact<{
- externalId: Scalars['String'];
- type: CollectionPartnershipType;
- partnerExternalId: Scalars['String'];
- name?: InputMaybe;
- url?: InputMaybe;
- imageUrl?: InputMaybe;
- blurb?: InputMaybe;
-}>;
-
-export type UpdateCollectionPartnerAssociationMutation = {
- __typename?: 'Mutation';
- updateCollectionPartnerAssociation: {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
- };
-};
-
-export type UpdateCollectionPartnerAssociationImageUrlMutationVariables =
- Exact<{
- externalId: Scalars['String'];
- imageUrl: Scalars['Url'];
- }>;
-
-export type UpdateCollectionPartnerAssociationImageUrlMutation = {
- __typename?: 'Mutation';
- updateCollectionPartnerAssociationImageUrl: {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
- };
-};
-
-export type UpdateCollectionPartnerImageUrlMutationVariables = Exact<{
- externalId: Scalars['String'];
- imageUrl: Scalars['Url'];
-}>;
-
-export type UpdateCollectionPartnerImageUrlMutation = {
- __typename?: 'Mutation';
- updateCollectionPartnerImageUrl: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
-};
-
-export type UpdateCollectionStoryMutationVariables = Exact<{
- externalId: Scalars['String'];
- url: Scalars['Url'];
- title: Scalars['String'];
- excerpt: Scalars['Markdown'];
- imageUrl: Scalars['Url'];
- authors: Array | CollectionStoryAuthorInput;
- publisher: Scalars['String'];
- sortOrder?: InputMaybe;
- fromPartner?: InputMaybe;
-}>;
-
-export type UpdateCollectionStoryMutation = {
- __typename?: 'Mutation';
- updateCollectionStory: {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- };
-};
-
-export type UpdateCollectionStoryImageUrlMutationVariables = Exact<{
- externalId: Scalars['String'];
- imageUrl: Scalars['Url'];
-}>;
-
-export type UpdateCollectionStoryImageUrlMutation = {
- __typename?: 'Mutation';
- updateCollectionStoryImageUrl: {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- };
-};
-
-export type UpdateCollectionStorySortOrderMutationVariables = Exact<{
- externalId: Scalars['String'];
- sortOrder: Scalars['Int'];
-}>;
-
-export type UpdateCollectionStorySortOrderMutation = {
- __typename?: 'Mutation';
- updateCollectionStorySortOrder: {
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- };
-};
-
-export type UpdateCustomSectionMutationVariables = Exact<{
- data: UpdateCustomSectionInput;
-}>;
-
-export type UpdateCustomSectionMutation = {
- __typename?: 'Mutation';
- updateCustomSection: {
- __typename?: 'Section';
- externalId: string;
- title: string;
- scheduledSurfaceGuid: string;
- sort?: number | null;
- createSource: ActivitySource;
- disabled: boolean;
- active: boolean;
- description?: string | null;
- heroTitle?: string | null;
- heroDescription?: string | null;
- startDate?: any | null;
- endDate?: any | null;
- status: SectionStatus;
- followable: boolean;
- allowAds: boolean;
- iab?: {
- __typename?: 'IABMetadata';
- taxonomy: string;
- categories: Array;
+ scheduledSurfaceGuid: string;
+ sort?: number | null;
+ createSource: ActivitySource;
+ disabled: boolean;
+ active: boolean;
+ description?: string | null;
+ heroTitle?: string | null;
+ heroDescription?: string | null;
+ startDate?: any | null;
+ endDate?: any | null;
+ status: SectionStatus;
+ allowAds: boolean;
+ followable: boolean;
+ iab?: {
+ __typename?: 'IABMetadata';
+ taxonomy: string;
+ categories: Array;
} | null;
};
};
-export type UpdateLabelMutationVariables = Exact<{
- data: UpdateLabelInput;
-}>;
-
-export type UpdateLabelMutation = {
- __typename?: 'Mutation';
- updateLabel: { __typename?: 'Label'; externalId: string; name: string };
-};
-
export type UpdateProspectAsCuratedMutationVariables = Exact<{
id: Scalars['ID'];
historyFilter?: InputMaybe;
@@ -4611,336 +3924,25 @@ export type GetApprovedItemsQuery = {
};
};
-export type GetAuthorByIdQueryVariables = Exact<{
- id: Scalars['String'];
+export type GetOpenGraphFieldsQueryVariables = Exact<{
+ url: Scalars['Url'];
}>;
-export type GetAuthorByIdQuery = {
+export type GetOpenGraphFieldsQuery = {
__typename?: 'Query';
- getCollectionAuthor?: {
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
+ getOpenGraphFields?: {
+ __typename?: 'OpenGraphFields';
+ description: string;
} | null;
};
-export type GetAuthorsQueryVariables = Exact<{
- page?: InputMaybe;
- perPage?: InputMaybe;
+export type GetProspectsQueryVariables = Exact<{
+ scheduledSurfaceGuid: Scalars['String'];
+ prospectType?: InputMaybe;
+ historyFilter?: InputMaybe;
}>;
-export type GetAuthorsQuery = {
- __typename?: 'Query';
- getCollectionAuthors: {
- __typename?: 'CollectionAuthorsResult';
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- pagination?: {
- __typename?: 'Pagination';
- currentPage: number;
- totalPages: number;
- totalResults: number;
- } | null;
- };
-};
-
-export type GetCollectionByExternalIdQueryVariables = Exact<{
- externalId: Scalars['String'];
-}>;
-
-export type GetCollectionByExternalIdQuery = {
- __typename?: 'Query';
- getCollection?: {
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- } | null;
-};
-
-export type GetCollectionPartnerQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetCollectionPartnerQuery = {
- __typename?: 'Query';
- getCollectionPartner?: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
-};
-
-export type GetCollectionPartnerAssociationQueryVariables = Exact<{
- externalId: Scalars['String'];
-}>;
-
-export type GetCollectionPartnerAssociationQuery = {
- __typename?: 'Query';
- getCollectionPartnerAssociationForCollection?: {
- __typename?: 'CollectionPartnerAssociation';
- externalId: string;
- type: CollectionPartnershipType;
- name?: string | null;
- url?: any | null;
- imageUrl?: any | null;
- blurb?: any | null;
- partner: {
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- };
- } | null;
-};
-
-export type GetCollectionPartnersQueryVariables = Exact<{
- page?: InputMaybe;
- perPage?: InputMaybe;
-}>;
-
-export type GetCollectionPartnersQuery = {
- __typename?: 'Query';
- getCollectionPartners: {
- __typename?: 'CollectionPartnersResult';
- partners: Array<{
- __typename?: 'CollectionPartner';
- externalId: string;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- }>;
- pagination?: {
- __typename?: 'Pagination';
- currentPage: number;
- totalPages: number;
- totalResults: number;
- } | null;
- };
-};
-
-export type GetCollectionStoriesQueryVariables = Exact<{
- id: Scalars['String'];
-}>;
-
-export type GetCollectionStoriesQuery = {
- __typename?: 'Query';
- getCollection?: {
- __typename?: 'Collection';
- externalId: string;
- stories: Array<{
- __typename?: 'CollectionStory';
- externalId: string;
- url: any;
- title: string;
- excerpt: any;
- imageUrl?: any | null;
- publisher?: string | null;
- fromPartner: boolean;
- sortOrder?: number | null;
- authors: Array<{
- __typename?: 'CollectionStoryAuthor';
- name: string;
- sortOrder: number;
- }>;
- }>;
- } | null;
-};
-
-export type GetCollectionsQueryVariables = Exact<{
- page: Scalars['Int'];
- perPage: Scalars['Int'];
- status: CollectionStatus;
-}>;
-
-export type GetCollectionsQuery = {
- __typename?: 'Query';
- searchCollections: {
- __typename?: 'CollectionsResult';
- collections: Array<{
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- }>;
- pagination: {
- __typename?: 'Pagination';
- currentPage: number;
- totalPages: number;
- totalResults: number;
- };
- };
-};
-
-export type GetInitialCollectionFormDataQueryVariables = Exact<{
- page?: InputMaybe;
- perPage?: InputMaybe;
-}>;
-
-export type GetInitialCollectionFormDataQuery = {
- __typename?: 'Query';
- getLanguages: Array;
- getCollectionAuthors: {
- __typename?: 'CollectionAuthorsResult';
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- };
- labels: Array<{ __typename?: 'Label'; externalId: string; name: string }>;
- getCurationCategories: Array<{
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- }>;
- getIABCategories: Array<{
- __typename?: 'IABParentCategory';
- externalId: string;
- name: string;
- slug: string;
- children: Array<{
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- }>;
- }>;
-};
-
-export type GetOpenGraphFieldsQueryVariables = Exact<{
- url: Scalars['Url'];
-}>;
-
-export type GetOpenGraphFieldsQuery = {
- __typename?: 'Query';
- getOpenGraphFields?: {
- __typename?: 'OpenGraphFields';
- description: string;
- } | null;
-};
-
-export type GetProspectsQueryVariables = Exact<{
- scheduledSurfaceGuid: Scalars['String'];
- prospectType?: InputMaybe;
- historyFilter?: InputMaybe;
-}>;
-
-export type GetProspectsQuery = {
+export type GetProspectsQuery = {
__typename?: 'Query';
getProspects: Array<{
__typename?: 'Prospect';
@@ -5139,78 +4141,6 @@ export type GetScheduledSurfacesForUserQuery = {
}>;
};
-export type SearchCollectionsQueryVariables = Exact<{
- filters: SearchCollectionsFilters;
- page?: InputMaybe;
- perPage?: InputMaybe;
-}>;
-
-export type SearchCollectionsQuery = {
- __typename?: 'Query';
- searchCollections: {
- __typename?: 'CollectionsResult';
- collections: Array<{
- __typename?: 'Collection';
- externalId: string;
- title: string;
- slug: string;
- excerpt?: any | null;
- intro?: any | null;
- imageUrl?: any | null;
- language: CollectionLanguage;
- status: CollectionStatus;
- authors: Array<{
- __typename?: 'CollectionAuthor';
- externalId: string;
- name: string;
- slug?: string | null;
- bio?: any | null;
- imageUrl?: any | null;
- active: boolean;
- }>;
- curationCategory?: {
- __typename?: 'CurationCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABParentCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- IABChildCategory?: {
- __typename?: 'IABCategory';
- externalId: string;
- name: string;
- slug: string;
- } | null;
- labels?: Array<{
- __typename?: 'Label';
- externalId: string;
- name: string;
- } | null> | null;
- partnership?: {
- __typename?: 'CollectionPartnership';
- externalId: string;
- type: CollectionPartnershipType;
- name: string;
- url: any;
- imageUrl: any;
- blurb: any;
- } | null;
- }>;
- pagination: {
- __typename?: 'Pagination';
- currentPage: number;
- totalPages: number;
- totalResults: number;
- perPage: number;
- };
- };
-};
-
export type GetSectionsWithSectionItemsQueryVariables = Exact<{
scheduledSurfaceGuid: Scalars['ID'];
createSource?: InputMaybe;
@@ -5235,8 +4165,8 @@ export type GetSectionsWithSectionItemsQuery = {
startDate?: any | null;
endDate?: any | null;
status: SectionStatus;
- followable: boolean;
allowAds: boolean;
+ followable: boolean;
sectionItems: Array<{
__typename?: 'SectionItem';
createdAt: number;
@@ -5287,35 +4217,6 @@ export type GetSectionsWithSectionItemsQuery = {
}>;
};
-export type GetStoryFromParserQueryVariables = Exact<{
- url: Scalars['String'];
-}>;
-
-export type GetStoryFromParserQuery = {
- __typename?: 'Query';
- getItemByUrl?: {
- __typename?: 'Item';
- resolvedUrl?: any | null;
- title?: string | null;
- excerpt?: string | null;
- topImageUrl?: any | null;
- images?: Array<{
- __typename?: 'Image';
- src: string;
- width?: number | null;
- height?: number | null;
- } | null> | null;
- authors?: Array<{
- __typename?: 'Author';
- name?: string | null;
- } | null> | null;
- domainMetadata?: {
- __typename?: 'DomainMetadata';
- name?: string | null;
- } | null;
- } | null;
-};
-
export type GetUrlMetadataQueryVariables = Exact<{
url: Scalars['String'];
}>;
@@ -5338,13 +4239,6 @@ export type GetUrlMetadataQuery = {
};
};
-export type LabelsQueryVariables = Exact<{ [key: string]: never }>;
-
-export type LabelsQuery = {
- __typename?: 'Query';
- labels: Array<{ __typename?: 'Label'; externalId: string; name: string }>;
-};
-
export type SearchShareableListQueryVariables = Exact<{
externalId: Scalars['ID'];
}>;
@@ -5385,138 +4279,46 @@ export type SearchShareableListQuery = {
} | null;
};
-export const CollectionAuthorDataFragmentDoc = gql`
- fragment CollectionAuthorData on CollectionAuthor {
+export const BaseSectionDataFragmentDoc = gql`
+ fragment BaseSectionData on Section {
externalId
- name
- slug
- bio
- imageUrl
+ title
+ scheduledSurfaceGuid
+ iab {
+ taxonomy
+ categories
+ }
+ sort
+ createSource
+ disabled
active
+ description
+ heroTitle
+ heroDescription
+ startDate
+ endDate
+ status
+ allowAds
+ followable
}
`;
-export const CollectionDataFragmentDoc = gql`
- fragment CollectionData on Collection {
+export const BaseSectionItemDataFragmentDoc = gql`
+ fragment BaseSectionItemData on SectionItem {
+ externalId
+ rank
+ }
+`;
+export const CuratedItemDataFragmentDoc = gql`
+ fragment CuratedItemData on ApprovedCorpusItem {
externalId
+ prospectId
title
- slug
- excerpt
- intro
- imageUrl
language
- status
+ publisher
+ datePublished
authors {
- ...CollectionAuthorData
- }
- curationCategory {
- externalId
- name
- slug
- }
- IABParentCategory {
- externalId
- name
- slug
- }
- IABChildCategory {
- externalId
- name
- slug
- }
- labels {
- externalId
- name
- }
- partnership {
- externalId
- type
name
- url
- imageUrl
- blurb
- }
- }
- ${CollectionAuthorDataFragmentDoc}
-`;
-export const CollectionPartnerDataFragmentDoc = gql`
- fragment CollectionPartnerData on CollectionPartner {
- externalId
- name
- url
- imageUrl
- blurb
- }
-`;
-export const CollectionPartnerAssociationDataFragmentDoc = gql`
- fragment CollectionPartnerAssociationData on CollectionPartnerAssociation {
- externalId
- type
- name
- url
- imageUrl
- blurb
- partner {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerDataFragmentDoc}
-`;
-export const CollectionStoryDataFragmentDoc = gql`
- fragment CollectionStoryData on CollectionStory {
- externalId
- url
- title
- excerpt
- imageUrl
- authors {
- name
- sortOrder
- }
- publisher
- fromPartner
- sortOrder
- }
-`;
-export const BaseSectionDataFragmentDoc = gql`
- fragment BaseSectionData on Section {
- externalId
- title
- scheduledSurfaceGuid
- iab {
- taxonomy
- categories
- }
- sort
- createSource
- disabled
- active
- description
- heroTitle
- heroDescription
- startDate
- endDate
- status
- followable
- allowAds
- }
-`;
-export const BaseSectionItemDataFragmentDoc = gql`
- fragment BaseSectionItemData on SectionItem {
- externalId
- rank
- }
-`;
-export const CuratedItemDataFragmentDoc = gql`
- fragment CuratedItemData on ApprovedCorpusItem {
- externalId
- prospectId
- title
- language
- publisher
- datePublished
- authors {
- name
- sortOrder
+ sortOrder
}
url
hasTrustedDomain
@@ -5785,345 +4587,6 @@ export type CreateApprovedCorpusItemMutationOptions =
CreateApprovedCorpusItemMutation,
CreateApprovedCorpusItemMutationVariables
>;
-export const CreateCollectionDocument = gql`
- mutation createCollection($data: CreateCollectionInput!) {
- createCollection(data: $data) {
- ...CollectionData
- }
- }
- ${CollectionDataFragmentDoc}
-`;
-export type CreateCollectionMutationFn = Apollo.MutationFunction<
- CreateCollectionMutation,
- CreateCollectionMutationVariables
->;
-
-/**
- * __useCreateCollectionMutation__
- *
- * To run a mutation, you first call `useCreateCollectionMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCollectionMutation` 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 [createCollectionMutation, { data, loading, error }] = useCreateCollectionMutation({
- * variables: {
- * data: // value for 'data'
- * },
- * });
- */
-export function useCreateCollectionMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateCollectionMutation,
- CreateCollectionMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- CreateCollectionMutation,
- CreateCollectionMutationVariables
- >(CreateCollectionDocument, options);
-}
-export type CreateCollectionMutationHookResult = ReturnType<
- typeof useCreateCollectionMutation
->;
-export type CreateCollectionMutationResult =
- Apollo.MutationResult;
-export type CreateCollectionMutationOptions = Apollo.BaseMutationOptions<
- CreateCollectionMutation,
- CreateCollectionMutationVariables
->;
-export const CreateCollectionAuthorDocument = gql`
- mutation createCollectionAuthor(
- $name: String!
- $slug: String
- $bio: Markdown
- $imageUrl: Url
- $active: Boolean
- ) {
- createCollectionAuthor(
- data: {
- name: $name
- slug: $slug
- bio: $bio
- imageUrl: $imageUrl
- active: $active
- }
- ) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorDataFragmentDoc}
-`;
-export type CreateCollectionAuthorMutationFn = Apollo.MutationFunction<
- CreateCollectionAuthorMutation,
- CreateCollectionAuthorMutationVariables
->;
-
-/**
- * __useCreateCollectionAuthorMutation__
- *
- * To run a mutation, you first call `useCreateCollectionAuthorMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCollectionAuthorMutation` 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 [createCollectionAuthorMutation, { data, loading, error }] = useCreateCollectionAuthorMutation({
- * variables: {
- * name: // value for 'name'
- * slug: // value for 'slug'
- * bio: // value for 'bio'
- * imageUrl: // value for 'imageUrl'
- * active: // value for 'active'
- * },
- * });
- */
-export function useCreateCollectionAuthorMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateCollectionAuthorMutation,
- CreateCollectionAuthorMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- CreateCollectionAuthorMutation,
- CreateCollectionAuthorMutationVariables
- >(CreateCollectionAuthorDocument, options);
-}
-export type CreateCollectionAuthorMutationHookResult = ReturnType<
- typeof useCreateCollectionAuthorMutation
->;
-export type CreateCollectionAuthorMutationResult =
- Apollo.MutationResult;
-export type CreateCollectionAuthorMutationOptions = Apollo.BaseMutationOptions<
- CreateCollectionAuthorMutation,
- CreateCollectionAuthorMutationVariables
->;
-export const CreateCollectionPartnerDocument = gql`
- mutation createCollectionPartner(
- $name: String!
- $url: Url!
- $blurb: Markdown!
- $imageUrl: Url!
- ) {
- createCollectionPartner(
- data: { name: $name, url: $url, blurb: $blurb, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerDataFragmentDoc}
-`;
-export type CreateCollectionPartnerMutationFn = Apollo.MutationFunction<
- CreateCollectionPartnerMutation,
- CreateCollectionPartnerMutationVariables
->;
-
-/**
- * __useCreateCollectionPartnerMutation__
- *
- * To run a mutation, you first call `useCreateCollectionPartnerMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCollectionPartnerMutation` 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 [createCollectionPartnerMutation, { data, loading, error }] = useCreateCollectionPartnerMutation({
- * variables: {
- * name: // value for 'name'
- * url: // value for 'url'
- * blurb: // value for 'blurb'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useCreateCollectionPartnerMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateCollectionPartnerMutation,
- CreateCollectionPartnerMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- CreateCollectionPartnerMutation,
- CreateCollectionPartnerMutationVariables
- >(CreateCollectionPartnerDocument, options);
-}
-export type CreateCollectionPartnerMutationHookResult = ReturnType<
- typeof useCreateCollectionPartnerMutation
->;
-export type CreateCollectionPartnerMutationResult =
- Apollo.MutationResult;
-export type CreateCollectionPartnerMutationOptions = Apollo.BaseMutationOptions<
- CreateCollectionPartnerMutation,
- CreateCollectionPartnerMutationVariables
->;
-export const CreateCollectionPartnerAssociationDocument = gql`
- mutation createCollectionPartnerAssociation(
- $type: CollectionPartnershipType!
- $partnerExternalId: String!
- $collectionExternalId: String!
- $name: String
- $url: Url
- $imageUrl: Url
- $blurb: Markdown
- ) {
- createCollectionPartnerAssociation(
- data: {
- type: $type
- partnerExternalId: $partnerExternalId
- collectionExternalId: $collectionExternalId
- name: $name
- url: $url
- imageUrl: $imageUrl
- blurb: $blurb
- }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationDataFragmentDoc}
-`;
-export type CreateCollectionPartnerAssociationMutationFn =
- Apollo.MutationFunction<
- CreateCollectionPartnerAssociationMutation,
- CreateCollectionPartnerAssociationMutationVariables
- >;
-
-/**
- * __useCreateCollectionPartnerAssociationMutation__
- *
- * To run a mutation, you first call `useCreateCollectionPartnerAssociationMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCollectionPartnerAssociationMutation` 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 [createCollectionPartnerAssociationMutation, { data, loading, error }] = useCreateCollectionPartnerAssociationMutation({
- * variables: {
- * type: // value for 'type'
- * partnerExternalId: // value for 'partnerExternalId'
- * collectionExternalId: // value for 'collectionExternalId'
- * name: // value for 'name'
- * url: // value for 'url'
- * imageUrl: // value for 'imageUrl'
- * blurb: // value for 'blurb'
- * },
- * });
- */
-export function useCreateCollectionPartnerAssociationMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateCollectionPartnerAssociationMutation,
- CreateCollectionPartnerAssociationMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- CreateCollectionPartnerAssociationMutation,
- CreateCollectionPartnerAssociationMutationVariables
- >(CreateCollectionPartnerAssociationDocument, options);
-}
-export type CreateCollectionPartnerAssociationMutationHookResult = ReturnType<
- typeof useCreateCollectionPartnerAssociationMutation
->;
-export type CreateCollectionPartnerAssociationMutationResult =
- Apollo.MutationResult;
-export type CreateCollectionPartnerAssociationMutationOptions =
- Apollo.BaseMutationOptions<
- CreateCollectionPartnerAssociationMutation,
- CreateCollectionPartnerAssociationMutationVariables
- >;
-export const CreateCollectionStoryDocument = gql`
- mutation createCollectionStory(
- $collectionExternalId: String!
- $url: Url!
- $title: String!
- $excerpt: Markdown!
- $imageUrl: Url!
- $authors: [CollectionStoryAuthorInput!]!
- $publisher: String!
- $sortOrder: Int
- $fromPartner: Boolean
- ) {
- createCollectionStory(
- data: {
- collectionExternalId: $collectionExternalId
- url: $url
- title: $title
- excerpt: $excerpt
- imageUrl: $imageUrl
- authors: $authors
- publisher: $publisher
- sortOrder: $sortOrder
- fromPartner: $fromPartner
- }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryDataFragmentDoc}
-`;
-export type CreateCollectionStoryMutationFn = Apollo.MutationFunction<
- CreateCollectionStoryMutation,
- CreateCollectionStoryMutationVariables
->;
-
-/**
- * __useCreateCollectionStoryMutation__
- *
- * To run a mutation, you first call `useCreateCollectionStoryMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateCollectionStoryMutation` 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 [createCollectionStoryMutation, { data, loading, error }] = useCreateCollectionStoryMutation({
- * variables: {
- * collectionExternalId: // value for 'collectionExternalId'
- * url: // value for 'url'
- * title: // value for 'title'
- * excerpt: // value for 'excerpt'
- * imageUrl: // value for 'imageUrl'
- * authors: // value for 'authors'
- * publisher: // value for 'publisher'
- * sortOrder: // value for 'sortOrder'
- * fromPartner: // value for 'fromPartner'
- * },
- * });
- */
-export function useCreateCollectionStoryMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateCollectionStoryMutation,
- CreateCollectionStoryMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- CreateCollectionStoryMutation,
- CreateCollectionStoryMutationVariables
- >(CreateCollectionStoryDocument, options);
-}
-export type CreateCollectionStoryMutationHookResult = ReturnType<
- typeof useCreateCollectionStoryMutation
->;
-export type CreateCollectionStoryMutationResult =
- Apollo.MutationResult;
-export type CreateCollectionStoryMutationOptions = Apollo.BaseMutationOptions<
- CreateCollectionStoryMutation,
- CreateCollectionStoryMutationVariables
->;
export const CreateCustomSectionDocument = gql`
mutation createCustomSection($data: CreateCustomSectionInput!) {
createCustomSection(data: $data) {
@@ -6175,57 +4638,6 @@ export type CreateCustomSectionMutationOptions = Apollo.BaseMutationOptions<
CreateCustomSectionMutation,
CreateCustomSectionMutationVariables
>;
-export const CreateLabelDocument = gql`
- mutation createLabel($name: String!) {
- createLabel(name: $name) {
- externalId
- name
- }
- }
-`;
-export type CreateLabelMutationFn = Apollo.MutationFunction<
- CreateLabelMutation,
- CreateLabelMutationVariables
->;
-
-/**
- * __useCreateLabelMutation__
- *
- * To run a mutation, you first call `useCreateLabelMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useCreateLabelMutation` 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 [createLabelMutation, { data, loading, error }] = useCreateLabelMutation({
- * variables: {
- * name: // value for 'name'
- * },
- * });
- */
-export function useCreateLabelMutation(
- baseOptions?: Apollo.MutationHookOptions<
- CreateLabelMutation,
- CreateLabelMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation(
- CreateLabelDocument,
- options,
- );
-}
-export type CreateLabelMutationHookResult = ReturnType<
- typeof useCreateLabelMutation
->;
-export type CreateLabelMutationResult =
- Apollo.MutationResult;
-export type CreateLabelMutationOptions = Apollo.BaseMutationOptions<
- CreateLabelMutation,
- CreateLabelMutationVariables
->;
export const CreateOrUpdatePublisherDomainDocument = gql`
mutation createOrUpdatePublisherDomain(
$data: CreateOrUpdatePublisherDomainInput!
@@ -6419,144 +4831,40 @@ export type CreateSectionItemMutationOptions = Apollo.BaseMutationOptions<
CreateSectionItemMutation,
CreateSectionItemMutationVariables
>;
-export const DeleteCollectionPartnerAssociationDocument = gql`
- mutation deleteCollectionPartnerAssociation($externalId: String!) {
- deleteCollectionPartnerAssociation(externalId: $externalId) {
- ...CollectionPartnerAssociationData
+export const DeleteCustomSectionDocument = gql`
+ mutation deleteCustomSection($externalId: ID!) {
+ deleteCustomSection(externalId: $externalId) {
+ externalId
+ title
}
}
- ${CollectionPartnerAssociationDataFragmentDoc}
`;
-export type DeleteCollectionPartnerAssociationMutationFn =
- Apollo.MutationFunction<
- DeleteCollectionPartnerAssociationMutation,
- DeleteCollectionPartnerAssociationMutationVariables
- >;
+export type DeleteCustomSectionMutationFn = Apollo.MutationFunction<
+ DeleteCustomSectionMutation,
+ DeleteCustomSectionMutationVariables
+>;
/**
- * __useDeleteCollectionPartnerAssociationMutation__
+ * __useDeleteCustomSectionMutation__
*
- * To run a mutation, you first call `useDeleteCollectionPartnerAssociationMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteCollectionPartnerAssociationMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useDeleteCustomSectionMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useDeleteCustomSectionMutation` 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 [deleteCollectionPartnerAssociationMutation, { data, loading, error }] = useDeleteCollectionPartnerAssociationMutation({
+ * const [deleteCustomSectionMutation, { data, loading, error }] = useDeleteCustomSectionMutation({
* variables: {
* externalId: // value for 'externalId'
* },
* });
*/
-export function useDeleteCollectionPartnerAssociationMutation(
+export function useDeleteCustomSectionMutation(
baseOptions?: Apollo.MutationHookOptions<
- DeleteCollectionPartnerAssociationMutation,
- DeleteCollectionPartnerAssociationMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- DeleteCollectionPartnerAssociationMutation,
- DeleteCollectionPartnerAssociationMutationVariables
- >(DeleteCollectionPartnerAssociationDocument, options);
-}
-export type DeleteCollectionPartnerAssociationMutationHookResult = ReturnType<
- typeof useDeleteCollectionPartnerAssociationMutation
->;
-export type DeleteCollectionPartnerAssociationMutationResult =
- Apollo.MutationResult;
-export type DeleteCollectionPartnerAssociationMutationOptions =
- Apollo.BaseMutationOptions<
- DeleteCollectionPartnerAssociationMutation,
- DeleteCollectionPartnerAssociationMutationVariables
- >;
-export const DeleteCollectionStoryDocument = gql`
- mutation deleteCollectionStory($externalId: String!) {
- deleteCollectionStory(externalId: $externalId) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryDataFragmentDoc}
-`;
-export type DeleteCollectionStoryMutationFn = Apollo.MutationFunction<
- DeleteCollectionStoryMutation,
- DeleteCollectionStoryMutationVariables
->;
-
-/**
- * __useDeleteCollectionStoryMutation__
- *
- * To run a mutation, you first call `useDeleteCollectionStoryMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteCollectionStoryMutation` 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 [deleteCollectionStoryMutation, { data, loading, error }] = useDeleteCollectionStoryMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * },
- * });
- */
-export function useDeleteCollectionStoryMutation(
- baseOptions?: Apollo.MutationHookOptions<
- DeleteCollectionStoryMutation,
- DeleteCollectionStoryMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- DeleteCollectionStoryMutation,
- DeleteCollectionStoryMutationVariables
- >(DeleteCollectionStoryDocument, options);
-}
-export type DeleteCollectionStoryMutationHookResult = ReturnType<
- typeof useDeleteCollectionStoryMutation
->;
-export type DeleteCollectionStoryMutationResult =
- Apollo.MutationResult;
-export type DeleteCollectionStoryMutationOptions = Apollo.BaseMutationOptions<
- DeleteCollectionStoryMutation,
- DeleteCollectionStoryMutationVariables
->;
-export const DeleteCustomSectionDocument = gql`
- mutation deleteCustomSection($externalId: ID!) {
- deleteCustomSection(externalId: $externalId) {
- externalId
- title
- }
- }
-`;
-export type DeleteCustomSectionMutationFn = Apollo.MutationFunction<
- DeleteCustomSectionMutation,
- DeleteCustomSectionMutationVariables
->;
-
-/**
- * __useDeleteCustomSectionMutation__
- *
- * To run a mutation, you first call `useDeleteCustomSectionMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useDeleteCustomSectionMutation` 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 [deleteCustomSectionMutation, { data, loading, error }] = useDeleteCustomSectionMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * },
- * });
- */
-export function useDeleteCustomSectionMutation(
- baseOptions?: Apollo.MutationHookOptions<
- DeleteCustomSectionMutation,
- DeleteCustomSectionMutationVariables
+ DeleteCustomSectionMutation,
+ DeleteCustomSectionMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
@@ -6684,71 +4992,6 @@ export type DisableEnableSectionMutationOptions = Apollo.BaseMutationOptions<
DisableEnableSectionMutation,
DisableEnableSectionMutationVariables
>;
-export const ImageUploadDocument = gql`
- mutation imageUpload(
- $image: Upload!
- $width: Int!
- $height: Int!
- $fileSizeBytes: Int!
- ) {
- collectionImageUpload(
- data: {
- image: $image
- width: $width
- height: $height
- fileSizeBytes: $fileSizeBytes
- }
- ) {
- url
- }
- }
-`;
-export type ImageUploadMutationFn = Apollo.MutationFunction<
- ImageUploadMutation,
- ImageUploadMutationVariables
->;
-
-/**
- * __useImageUploadMutation__
- *
- * To run a mutation, you first call `useImageUploadMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useImageUploadMutation` 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 [imageUploadMutation, { data, loading, error }] = useImageUploadMutation({
- * variables: {
- * image: // value for 'image'
- * width: // value for 'width'
- * height: // value for 'height'
- * fileSizeBytes: // value for 'fileSizeBytes'
- * },
- * });
- */
-export function useImageUploadMutation(
- baseOptions?: Apollo.MutationHookOptions<
- ImageUploadMutation,
- ImageUploadMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation(
- ImageUploadDocument,
- options,
- );
-}
-export type ImageUploadMutationHookResult = ReturnType<
- typeof useImageUploadMutation
->;
-export type ImageUploadMutationResult =
- Apollo.MutationResult;
-export type ImageUploadMutationOptions = Apollo.BaseMutationOptions<
- ImageUploadMutation,
- ImageUploadMutationVariables
->;
export const ModerateShareableListDocument = gql`
mutation moderateShareableList($data: ModerateShareableListInput!) {
moderateShareableList(data: $data) {
@@ -7123,1693 +5366,359 @@ export type UpdateApprovedCorpusItemMutationOptions =
UpdateApprovedCorpusItemMutation,
UpdateApprovedCorpusItemMutationVariables
>;
-export const UpdateCollectionDocument = gql`
- mutation updateCollection($data: UpdateCollectionInput!) {
- updateCollection(data: $data) {
- ...CollectionData
+export const UpdateCustomSectionDocument = gql`
+ mutation updateCustomSection($data: UpdateCustomSectionInput!) {
+ updateCustomSection(data: $data) {
+ ...BaseSectionData
}
}
- ${CollectionDataFragmentDoc}
+ ${BaseSectionDataFragmentDoc}
`;
-export type UpdateCollectionMutationFn = Apollo.MutationFunction<
- UpdateCollectionMutation,
- UpdateCollectionMutationVariables
+export type UpdateCustomSectionMutationFn = Apollo.MutationFunction<
+ UpdateCustomSectionMutation,
+ UpdateCustomSectionMutationVariables
>;
/**
- * __useUpdateCollectionMutation__
+ * __useUpdateCustomSectionMutation__
*
- * To run a mutation, you first call `useUpdateCollectionMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useUpdateCustomSectionMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateCustomSectionMutation` 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 [updateCollectionMutation, { data, loading, error }] = useUpdateCollectionMutation({
+ * const [updateCustomSectionMutation, { data, loading, error }] = useUpdateCustomSectionMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
-export function useUpdateCollectionMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionMutation,
- UpdateCollectionMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionMutation,
- UpdateCollectionMutationVariables
- >(UpdateCollectionDocument, options);
-}
-export type UpdateCollectionMutationHookResult = ReturnType<
- typeof useUpdateCollectionMutation
->;
-export type UpdateCollectionMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionMutationOptions = Apollo.BaseMutationOptions<
- UpdateCollectionMutation,
- UpdateCollectionMutationVariables
->;
-export const UpdateCollectionAuthorDocument = gql`
- mutation updateCollectionAuthor(
- $externalId: String!
- $name: String!
- $slug: String!
- $bio: Markdown
- $imageUrl: Url
- $active: Boolean
- ) {
- updateCollectionAuthor(
- data: {
- externalId: $externalId
- name: $name
- slug: $slug
- bio: $bio
- imageUrl: $imageUrl
- active: $active
- }
- ) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorDataFragmentDoc}
-`;
-export type UpdateCollectionAuthorMutationFn = Apollo.MutationFunction<
- UpdateCollectionAuthorMutation,
- UpdateCollectionAuthorMutationVariables
->;
-
-/**
- * __useUpdateCollectionAuthorMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionAuthorMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionAuthorMutation` 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 [updateCollectionAuthorMutation, { data, loading, error }] = useUpdateCollectionAuthorMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * name: // value for 'name'
- * slug: // value for 'slug'
- * bio: // value for 'bio'
- * imageUrl: // value for 'imageUrl'
- * active: // value for 'active'
- * },
- * });
- */
-export function useUpdateCollectionAuthorMutation(
+export function useUpdateCustomSectionMutation(
baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionAuthorMutation,
- UpdateCollectionAuthorMutationVariables
+ UpdateCustomSectionMutation,
+ UpdateCustomSectionMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
- UpdateCollectionAuthorMutation,
- UpdateCollectionAuthorMutationVariables
- >(UpdateCollectionAuthorDocument, options);
+ UpdateCustomSectionMutation,
+ UpdateCustomSectionMutationVariables
+ >(UpdateCustomSectionDocument, options);
}
-export type UpdateCollectionAuthorMutationHookResult = ReturnType<
- typeof useUpdateCollectionAuthorMutation
+export type UpdateCustomSectionMutationHookResult = ReturnType<
+ typeof useUpdateCustomSectionMutation
>;
-export type UpdateCollectionAuthorMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionAuthorMutationOptions = Apollo.BaseMutationOptions<
- UpdateCollectionAuthorMutation,
- UpdateCollectionAuthorMutationVariables
+export type UpdateCustomSectionMutationResult =
+ Apollo.MutationResult;
+export type UpdateCustomSectionMutationOptions = Apollo.BaseMutationOptions<
+ UpdateCustomSectionMutation,
+ UpdateCustomSectionMutationVariables
>;
-export const UpdateCollectionAuthorImageUrlDocument = gql`
- mutation updateCollectionAuthorImageUrl(
- $externalId: String!
- $imageUrl: Url!
+export const UpdateProspectAsCuratedDocument = gql`
+ mutation updateProspectAsCurated(
+ $id: ID!
+ $historyFilter: ApprovedCorpusItemScheduledSurfaceHistoryFilters
) {
- updateCollectionAuthorImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionAuthorData
+ updateProspectAsCurated(id: $id) {
+ ...ProspectDataWithCorpusItems
}
}
- ${CollectionAuthorDataFragmentDoc}
+ ${ProspectDataWithCorpusItemsFragmentDoc}
`;
-export type UpdateCollectionAuthorImageUrlMutationFn = Apollo.MutationFunction<
- UpdateCollectionAuthorImageUrlMutation,
- UpdateCollectionAuthorImageUrlMutationVariables
+export type UpdateProspectAsCuratedMutationFn = Apollo.MutationFunction<
+ UpdateProspectAsCuratedMutation,
+ UpdateProspectAsCuratedMutationVariables
>;
/**
- * __useUpdateCollectionAuthorImageUrlMutation__
+ * __useUpdateProspectAsCuratedMutation__
*
- * To run a mutation, you first call `useUpdateCollectionAuthorImageUrlMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionAuthorImageUrlMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useUpdateProspectAsCuratedMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUpdateProspectAsCuratedMutation` 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 [updateCollectionAuthorImageUrlMutation, { data, loading, error }] = useUpdateCollectionAuthorImageUrlMutation({
+ * const [updateProspectAsCuratedMutation, { data, loading, error }] = useUpdateProspectAsCuratedMutation({
* variables: {
- * externalId: // value for 'externalId'
- * imageUrl: // value for 'imageUrl'
+ * id: // value for 'id'
+ * historyFilter: // value for 'historyFilter'
* },
* });
*/
-export function useUpdateCollectionAuthorImageUrlMutation(
+export function useUpdateProspectAsCuratedMutation(
baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionAuthorImageUrlMutation,
- UpdateCollectionAuthorImageUrlMutationVariables
+ UpdateProspectAsCuratedMutation,
+ UpdateProspectAsCuratedMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
- UpdateCollectionAuthorImageUrlMutation,
- UpdateCollectionAuthorImageUrlMutationVariables
- >(UpdateCollectionAuthorImageUrlDocument, options);
+ UpdateProspectAsCuratedMutation,
+ UpdateProspectAsCuratedMutationVariables
+ >(UpdateProspectAsCuratedDocument, options);
}
-export type UpdateCollectionAuthorImageUrlMutationHookResult = ReturnType<
- typeof useUpdateCollectionAuthorImageUrlMutation
->;
-export type UpdateCollectionAuthorImageUrlMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionAuthorImageUrlMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionAuthorImageUrlMutation,
- UpdateCollectionAuthorImageUrlMutationVariables
- >;
-export const UpdateCollectionImageUrlDocument = gql`
- mutation updateCollectionImageUrl($externalId: String!, $imageUrl: Url!) {
- updateCollectionImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionData
- }
- }
- ${CollectionDataFragmentDoc}
-`;
-export type UpdateCollectionImageUrlMutationFn = Apollo.MutationFunction<
- UpdateCollectionImageUrlMutation,
- UpdateCollectionImageUrlMutationVariables
+export type UpdateProspectAsCuratedMutationHookResult = ReturnType<
+ typeof useUpdateProspectAsCuratedMutation
>;
-
-/**
- * __useUpdateCollectionImageUrlMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionImageUrlMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionImageUrlMutation` 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 [updateCollectionImageUrlMutation, { data, loading, error }] = useUpdateCollectionImageUrlMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useUpdateCollectionImageUrlMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionImageUrlMutation,
- UpdateCollectionImageUrlMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionImageUrlMutation,
- UpdateCollectionImageUrlMutationVariables
- >(UpdateCollectionImageUrlDocument, options);
-}
-export type UpdateCollectionImageUrlMutationHookResult = ReturnType<
- typeof useUpdateCollectionImageUrlMutation
+export type UpdateProspectAsCuratedMutationResult =
+ Apollo.MutationResult;
+export type UpdateProspectAsCuratedMutationOptions = Apollo.BaseMutationOptions<
+ UpdateProspectAsCuratedMutation,
+ UpdateProspectAsCuratedMutationVariables
>;
-export type UpdateCollectionImageUrlMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionImageUrlMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionImageUrlMutation,
- UpdateCollectionImageUrlMutationVariables
- >;
-export const UpdateCollectionPartnerDocument = gql`
- mutation updateCollectionPartner(
- $externalId: String!
- $name: String!
- $url: Url!
- $blurb: Markdown!
- $imageUrl: Url
- ) {
- updateCollectionPartner(
- data: {
- externalId: $externalId
- name: $name
- url: $url
- blurb: $blurb
- imageUrl: $imageUrl
- }
- ) {
- ...CollectionPartnerData
+export const UploadApprovedCorpusItemImageDocument = gql`
+ mutation uploadApprovedCorpusItemImage($image: Upload!) {
+ uploadApprovedCorpusItemImage(data: $image) {
+ url
}
}
- ${CollectionPartnerDataFragmentDoc}
`;
-export type UpdateCollectionPartnerMutationFn = Apollo.MutationFunction<
- UpdateCollectionPartnerMutation,
- UpdateCollectionPartnerMutationVariables
+export type UploadApprovedCorpusItemImageMutationFn = Apollo.MutationFunction<
+ UploadApprovedCorpusItemImageMutation,
+ UploadApprovedCorpusItemImageMutationVariables
>;
/**
- * __useUpdateCollectionPartnerMutation__
+ * __useUploadApprovedCorpusItemImageMutation__
*
- * To run a mutation, you first call `useUpdateCollectionPartnerMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionPartnerMutation` returns a tuple that includes:
+ * To run a mutation, you first call `useUploadApprovedCorpusItemImageMutation` within a React component and pass it any options that fit your needs.
+ * When your component renders, `useUploadApprovedCorpusItemImageMutation` 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 [updateCollectionPartnerMutation, { data, loading, error }] = useUpdateCollectionPartnerMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * name: // value for 'name'
- * url: // value for 'url'
- * blurb: // value for 'blurb'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useUpdateCollectionPartnerMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionPartnerMutation,
- UpdateCollectionPartnerMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionPartnerMutation,
- UpdateCollectionPartnerMutationVariables
- >(UpdateCollectionPartnerDocument, options);
-}
-export type UpdateCollectionPartnerMutationHookResult = ReturnType<
- typeof useUpdateCollectionPartnerMutation
->;
-export type UpdateCollectionPartnerMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionPartnerMutationOptions = Apollo.BaseMutationOptions<
- UpdateCollectionPartnerMutation,
- UpdateCollectionPartnerMutationVariables
->;
-export const UpdateCollectionPartnerAssociationDocument = gql`
- mutation updateCollectionPartnerAssociation(
- $externalId: String!
- $type: CollectionPartnershipType!
- $partnerExternalId: String!
- $name: String
- $url: Url
- $imageUrl: Url
- $blurb: Markdown
- ) {
- updateCollectionPartnerAssociation(
- data: {
- externalId: $externalId
- type: $type
- partnerExternalId: $partnerExternalId
- name: $name
- url: $url
- imageUrl: $imageUrl
- blurb: $blurb
- }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationDataFragmentDoc}
-`;
-export type UpdateCollectionPartnerAssociationMutationFn =
- Apollo.MutationFunction<
- UpdateCollectionPartnerAssociationMutation,
- UpdateCollectionPartnerAssociationMutationVariables
- >;
-
-/**
- * __useUpdateCollectionPartnerAssociationMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionPartnerAssociationMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionPartnerAssociationMutation` 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 [updateCollectionPartnerAssociationMutation, { data, loading, error }] = useUpdateCollectionPartnerAssociationMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * type: // value for 'type'
- * partnerExternalId: // value for 'partnerExternalId'
- * name: // value for 'name'
- * url: // value for 'url'
- * imageUrl: // value for 'imageUrl'
- * blurb: // value for 'blurb'
- * },
- * });
- */
-export function useUpdateCollectionPartnerAssociationMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionPartnerAssociationMutation,
- UpdateCollectionPartnerAssociationMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionPartnerAssociationMutation,
- UpdateCollectionPartnerAssociationMutationVariables
- >(UpdateCollectionPartnerAssociationDocument, options);
-}
-export type UpdateCollectionPartnerAssociationMutationHookResult = ReturnType<
- typeof useUpdateCollectionPartnerAssociationMutation
->;
-export type UpdateCollectionPartnerAssociationMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionPartnerAssociationMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionPartnerAssociationMutation,
- UpdateCollectionPartnerAssociationMutationVariables
- >;
-export const UpdateCollectionPartnerAssociationImageUrlDocument = gql`
- mutation updateCollectionPartnerAssociationImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionPartnerAssociationImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationDataFragmentDoc}
-`;
-export type UpdateCollectionPartnerAssociationImageUrlMutationFn =
- Apollo.MutationFunction<
- UpdateCollectionPartnerAssociationImageUrlMutation,
- UpdateCollectionPartnerAssociationImageUrlMutationVariables
- >;
-
-/**
- * __useUpdateCollectionPartnerAssociationImageUrlMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionPartnerAssociationImageUrlMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionPartnerAssociationImageUrlMutation` 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 [updateCollectionPartnerAssociationImageUrlMutation, { data, loading, error }] = useUpdateCollectionPartnerAssociationImageUrlMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useUpdateCollectionPartnerAssociationImageUrlMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionPartnerAssociationImageUrlMutation,
- UpdateCollectionPartnerAssociationImageUrlMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionPartnerAssociationImageUrlMutation,
- UpdateCollectionPartnerAssociationImageUrlMutationVariables
- >(UpdateCollectionPartnerAssociationImageUrlDocument, options);
-}
-export type UpdateCollectionPartnerAssociationImageUrlMutationHookResult =
- ReturnType;
-export type UpdateCollectionPartnerAssociationImageUrlMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionPartnerAssociationImageUrlMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionPartnerAssociationImageUrlMutation,
- UpdateCollectionPartnerAssociationImageUrlMutationVariables
- >;
-export const UpdateCollectionPartnerImageUrlDocument = gql`
- mutation updateCollectionPartnerImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionPartnerImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerDataFragmentDoc}
-`;
-export type UpdateCollectionPartnerImageUrlMutationFn = Apollo.MutationFunction<
- UpdateCollectionPartnerImageUrlMutation,
- UpdateCollectionPartnerImageUrlMutationVariables
->;
-
-/**
- * __useUpdateCollectionPartnerImageUrlMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionPartnerImageUrlMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionPartnerImageUrlMutation` 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 [updateCollectionPartnerImageUrlMutation, { data, loading, error }] = useUpdateCollectionPartnerImageUrlMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useUpdateCollectionPartnerImageUrlMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionPartnerImageUrlMutation,
- UpdateCollectionPartnerImageUrlMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionPartnerImageUrlMutation,
- UpdateCollectionPartnerImageUrlMutationVariables
- >(UpdateCollectionPartnerImageUrlDocument, options);
-}
-export type UpdateCollectionPartnerImageUrlMutationHookResult = ReturnType<
- typeof useUpdateCollectionPartnerImageUrlMutation
->;
-export type UpdateCollectionPartnerImageUrlMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionPartnerImageUrlMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionPartnerImageUrlMutation,
- UpdateCollectionPartnerImageUrlMutationVariables
- >;
-export const UpdateCollectionStoryDocument = gql`
- mutation updateCollectionStory(
- $externalId: String!
- $url: Url!
- $title: String!
- $excerpt: Markdown!
- $imageUrl: Url!
- $authors: [CollectionStoryAuthorInput!]!
- $publisher: String!
- $sortOrder: Int
- $fromPartner: Boolean
- ) {
- updateCollectionStory(
- data: {
- externalId: $externalId
- url: $url
- title: $title
- excerpt: $excerpt
- imageUrl: $imageUrl
- authors: $authors
- publisher: $publisher
- sortOrder: $sortOrder
- fromPartner: $fromPartner
- }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryDataFragmentDoc}
-`;
-export type UpdateCollectionStoryMutationFn = Apollo.MutationFunction<
- UpdateCollectionStoryMutation,
- UpdateCollectionStoryMutationVariables
->;
-
-/**
- * __useUpdateCollectionStoryMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionStoryMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionStoryMutation` 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 [updateCollectionStoryMutation, { data, loading, error }] = useUpdateCollectionStoryMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * url: // value for 'url'
- * title: // value for 'title'
- * excerpt: // value for 'excerpt'
- * imageUrl: // value for 'imageUrl'
- * authors: // value for 'authors'
- * publisher: // value for 'publisher'
- * sortOrder: // value for 'sortOrder'
- * fromPartner: // value for 'fromPartner'
- * },
- * });
- */
-export function useUpdateCollectionStoryMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionStoryMutation,
- UpdateCollectionStoryMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionStoryMutation,
- UpdateCollectionStoryMutationVariables
- >(UpdateCollectionStoryDocument, options);
-}
-export type UpdateCollectionStoryMutationHookResult = ReturnType<
- typeof useUpdateCollectionStoryMutation
->;
-export type UpdateCollectionStoryMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionStoryMutationOptions = Apollo.BaseMutationOptions<
- UpdateCollectionStoryMutation,
- UpdateCollectionStoryMutationVariables
->;
-export const UpdateCollectionStoryImageUrlDocument = gql`
- mutation updateCollectionStoryImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionStoryImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryDataFragmentDoc}
-`;
-export type UpdateCollectionStoryImageUrlMutationFn = Apollo.MutationFunction<
- UpdateCollectionStoryImageUrlMutation,
- UpdateCollectionStoryImageUrlMutationVariables
->;
-
-/**
- * __useUpdateCollectionStoryImageUrlMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionStoryImageUrlMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionStoryImageUrlMutation` 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 [updateCollectionStoryImageUrlMutation, { data, loading, error }] = useUpdateCollectionStoryImageUrlMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * imageUrl: // value for 'imageUrl'
- * },
- * });
- */
-export function useUpdateCollectionStoryImageUrlMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionStoryImageUrlMutation,
- UpdateCollectionStoryImageUrlMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionStoryImageUrlMutation,
- UpdateCollectionStoryImageUrlMutationVariables
- >(UpdateCollectionStoryImageUrlDocument, options);
-}
-export type UpdateCollectionStoryImageUrlMutationHookResult = ReturnType<
- typeof useUpdateCollectionStoryImageUrlMutation
->;
-export type UpdateCollectionStoryImageUrlMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionStoryImageUrlMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionStoryImageUrlMutation,
- UpdateCollectionStoryImageUrlMutationVariables
- >;
-export const UpdateCollectionStorySortOrderDocument = gql`
- mutation updateCollectionStorySortOrder(
- $externalId: String!
- $sortOrder: Int!
- ) {
- updateCollectionStorySortOrder(
- data: { externalId: $externalId, sortOrder: $sortOrder }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryDataFragmentDoc}
-`;
-export type UpdateCollectionStorySortOrderMutationFn = Apollo.MutationFunction<
- UpdateCollectionStorySortOrderMutation,
- UpdateCollectionStorySortOrderMutationVariables
->;
-
-/**
- * __useUpdateCollectionStorySortOrderMutation__
- *
- * To run a mutation, you first call `useUpdateCollectionStorySortOrderMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCollectionStorySortOrderMutation` 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 [updateCollectionStorySortOrderMutation, { data, loading, error }] = useUpdateCollectionStorySortOrderMutation({
- * variables: {
- * externalId: // value for 'externalId'
- * sortOrder: // value for 'sortOrder'
- * },
- * });
- */
-export function useUpdateCollectionStorySortOrderMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCollectionStorySortOrderMutation,
- UpdateCollectionStorySortOrderMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCollectionStorySortOrderMutation,
- UpdateCollectionStorySortOrderMutationVariables
- >(UpdateCollectionStorySortOrderDocument, options);
-}
-export type UpdateCollectionStorySortOrderMutationHookResult = ReturnType<
- typeof useUpdateCollectionStorySortOrderMutation
->;
-export type UpdateCollectionStorySortOrderMutationResult =
- Apollo.MutationResult;
-export type UpdateCollectionStorySortOrderMutationOptions =
- Apollo.BaseMutationOptions<
- UpdateCollectionStorySortOrderMutation,
- UpdateCollectionStorySortOrderMutationVariables
- >;
-export const UpdateCustomSectionDocument = gql`
- mutation updateCustomSection($data: UpdateCustomSectionInput!) {
- updateCustomSection(data: $data) {
- ...BaseSectionData
- }
- }
- ${BaseSectionDataFragmentDoc}
-`;
-export type UpdateCustomSectionMutationFn = Apollo.MutationFunction<
- UpdateCustomSectionMutation,
- UpdateCustomSectionMutationVariables
->;
-
-/**
- * __useUpdateCustomSectionMutation__
- *
- * To run a mutation, you first call `useUpdateCustomSectionMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateCustomSectionMutation` 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 [updateCustomSectionMutation, { data, loading, error }] = useUpdateCustomSectionMutation({
- * variables: {
- * data: // value for 'data'
- * },
- * });
- */
-export function useUpdateCustomSectionMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateCustomSectionMutation,
- UpdateCustomSectionMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateCustomSectionMutation,
- UpdateCustomSectionMutationVariables
- >(UpdateCustomSectionDocument, options);
-}
-export type UpdateCustomSectionMutationHookResult = ReturnType<
- typeof useUpdateCustomSectionMutation
->;
-export type UpdateCustomSectionMutationResult =
- Apollo.MutationResult;
-export type UpdateCustomSectionMutationOptions = Apollo.BaseMutationOptions<
- UpdateCustomSectionMutation,
- UpdateCustomSectionMutationVariables
->;
-export const UpdateLabelDocument = gql`
- mutation updateLabel($data: UpdateLabelInput!) {
- updateLabel(data: $data) {
- externalId
- name
- }
- }
-`;
-export type UpdateLabelMutationFn = Apollo.MutationFunction<
- UpdateLabelMutation,
- UpdateLabelMutationVariables
->;
-
-/**
- * __useUpdateLabelMutation__
- *
- * To run a mutation, you first call `useUpdateLabelMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateLabelMutation` 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 [updateLabelMutation, { data, loading, error }] = useUpdateLabelMutation({
- * variables: {
- * data: // value for 'data'
- * },
- * });
- */
-export function useUpdateLabelMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateLabelMutation,
- UpdateLabelMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation(
- UpdateLabelDocument,
- options,
- );
-}
-export type UpdateLabelMutationHookResult = ReturnType<
- typeof useUpdateLabelMutation
->;
-export type UpdateLabelMutationResult =
- Apollo.MutationResult;
-export type UpdateLabelMutationOptions = Apollo.BaseMutationOptions<
- UpdateLabelMutation,
- UpdateLabelMutationVariables
->;
-export const UpdateProspectAsCuratedDocument = gql`
- mutation updateProspectAsCurated(
- $id: ID!
- $historyFilter: ApprovedCorpusItemScheduledSurfaceHistoryFilters
- ) {
- updateProspectAsCurated(id: $id) {
- ...ProspectDataWithCorpusItems
- }
- }
- ${ProspectDataWithCorpusItemsFragmentDoc}
-`;
-export type UpdateProspectAsCuratedMutationFn = Apollo.MutationFunction<
- UpdateProspectAsCuratedMutation,
- UpdateProspectAsCuratedMutationVariables
->;
-
-/**
- * __useUpdateProspectAsCuratedMutation__
- *
- * To run a mutation, you first call `useUpdateProspectAsCuratedMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUpdateProspectAsCuratedMutation` 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 [updateProspectAsCuratedMutation, { data, loading, error }] = useUpdateProspectAsCuratedMutation({
- * variables: {
- * id: // value for 'id'
- * historyFilter: // value for 'historyFilter'
- * },
- * });
- */
-export function useUpdateProspectAsCuratedMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UpdateProspectAsCuratedMutation,
- UpdateProspectAsCuratedMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UpdateProspectAsCuratedMutation,
- UpdateProspectAsCuratedMutationVariables
- >(UpdateProspectAsCuratedDocument, options);
-}
-export type UpdateProspectAsCuratedMutationHookResult = ReturnType<
- typeof useUpdateProspectAsCuratedMutation
->;
-export type UpdateProspectAsCuratedMutationResult =
- Apollo.MutationResult;
-export type UpdateProspectAsCuratedMutationOptions = Apollo.BaseMutationOptions<
- UpdateProspectAsCuratedMutation,
- UpdateProspectAsCuratedMutationVariables
->;
-export const UploadApprovedCorpusItemImageDocument = gql`
- mutation uploadApprovedCorpusItemImage($image: Upload!) {
- uploadApprovedCorpusItemImage(data: $image) {
- url
- }
- }
-`;
-export type UploadApprovedCorpusItemImageMutationFn = Apollo.MutationFunction<
- UploadApprovedCorpusItemImageMutation,
- UploadApprovedCorpusItemImageMutationVariables
->;
-
-/**
- * __useUploadApprovedCorpusItemImageMutation__
- *
- * To run a mutation, you first call `useUploadApprovedCorpusItemImageMutation` within a React component and pass it any options that fit your needs.
- * When your component renders, `useUploadApprovedCorpusItemImageMutation` 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 [uploadApprovedCorpusItemImageMutation, { data, loading, error }] = useUploadApprovedCorpusItemImageMutation({
- * variables: {
- * image: // value for 'image'
- * },
- * });
- */
-export function useUploadApprovedCorpusItemImageMutation(
- baseOptions?: Apollo.MutationHookOptions<
- UploadApprovedCorpusItemImageMutation,
- UploadApprovedCorpusItemImageMutationVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useMutation<
- UploadApprovedCorpusItemImageMutation,
- UploadApprovedCorpusItemImageMutationVariables
- >(UploadApprovedCorpusItemImageDocument, options);
-}
-export type UploadApprovedCorpusItemImageMutationHookResult = ReturnType<
- typeof useUploadApprovedCorpusItemImageMutation
->;
-export type UploadApprovedCorpusItemImageMutationResult =
- Apollo.MutationResult;
-export type UploadApprovedCorpusItemImageMutationOptions =
- Apollo.BaseMutationOptions<
- UploadApprovedCorpusItemImageMutation,
- UploadApprovedCorpusItemImageMutationVariables
- >;
-export const ApprovedCorpusItemByExternalIdDocument = gql`
- query approvedCorpusItemByExternalId(
- $externalId: ID!
- $historyFilter: ApprovedCorpusItemScheduledSurfaceHistoryFilters
- ) {
- approvedCorpusItemByExternalId(externalId: $externalId) {
- ...CuratedItemDataWithHistory
- }
- }
- ${CuratedItemDataWithHistoryFragmentDoc}
-`;
-
-/**
- * __useApprovedCorpusItemByExternalIdQuery__
- *
- * To run a query within a React component, call `useApprovedCorpusItemByExternalIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useApprovedCorpusItemByExternalIdQuery` 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 } = useApprovedCorpusItemByExternalIdQuery({
- * variables: {
- * externalId: // value for 'externalId'
- * historyFilter: // value for 'historyFilter'
- * },
- * });
- */
-export function useApprovedCorpusItemByExternalIdQuery(
- baseOptions: Apollo.QueryHookOptions<
- ApprovedCorpusItemByExternalIdQuery,
- ApprovedCorpusItemByExternalIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- ApprovedCorpusItemByExternalIdQuery,
- ApprovedCorpusItemByExternalIdQueryVariables
- >(ApprovedCorpusItemByExternalIdDocument, options);
-}
-export function useApprovedCorpusItemByExternalIdLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- ApprovedCorpusItemByExternalIdQuery,
- ApprovedCorpusItemByExternalIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- ApprovedCorpusItemByExternalIdQuery,
- ApprovedCorpusItemByExternalIdQueryVariables
- >(ApprovedCorpusItemByExternalIdDocument, options);
-}
-export type ApprovedCorpusItemByExternalIdQueryHookResult = ReturnType<
- typeof useApprovedCorpusItemByExternalIdQuery
->;
-export type ApprovedCorpusItemByExternalIdLazyQueryHookResult = ReturnType<
- typeof useApprovedCorpusItemByExternalIdLazyQuery
->;
-export type ApprovedCorpusItemByExternalIdQueryResult = Apollo.QueryResult<
- ApprovedCorpusItemByExternalIdQuery,
- ApprovedCorpusItemByExternalIdQueryVariables
->;
-export const GetApprovedItemByUrlDocument = gql`
- query getApprovedItemByUrl($url: String!) {
- getApprovedCorpusItemByUrl(url: $url) {
- ...CuratedItemData
- }
- }
- ${CuratedItemDataFragmentDoc}
-`;
-
-/**
- * __useGetApprovedItemByUrlQuery__
- *
- * To run a query within a React component, call `useGetApprovedItemByUrlQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetApprovedItemByUrlQuery` 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 } = useGetApprovedItemByUrlQuery({
- * variables: {
- * url: // value for 'url'
- * },
- * });
- */
-export function useGetApprovedItemByUrlQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetApprovedItemByUrlQuery,
- GetApprovedItemByUrlQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetApprovedItemByUrlQuery,
- GetApprovedItemByUrlQueryVariables
- >(GetApprovedItemByUrlDocument, options);
-}
-export function useGetApprovedItemByUrlLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetApprovedItemByUrlQuery,
- GetApprovedItemByUrlQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetApprovedItemByUrlQuery,
- GetApprovedItemByUrlQueryVariables
- >(GetApprovedItemByUrlDocument, options);
-}
-export type GetApprovedItemByUrlQueryHookResult = ReturnType<
- typeof useGetApprovedItemByUrlQuery
->;
-export type GetApprovedItemByUrlLazyQueryHookResult = ReturnType<
- typeof useGetApprovedItemByUrlLazyQuery
->;
-export type GetApprovedItemByUrlQueryResult = Apollo.QueryResult<
- GetApprovedItemByUrlQuery,
- GetApprovedItemByUrlQueryVariables
->;
-export const GetApprovedItemsDocument = gql`
- query getApprovedItems(
- $filters: ApprovedCorpusItemFilter
- $pagination: PaginationInput
- ) {
- getApprovedCorpusItems(filters: $filters, pagination: $pagination) {
- totalCount
- pageInfo {
- hasNextPage
- hasPreviousPage
- startCursor
- endCursor
- }
- edges {
- cursor
- node {
- ...CuratedItemData
- }
- }
- }
- }
- ${CuratedItemDataFragmentDoc}
-`;
-
-/**
- * __useGetApprovedItemsQuery__
- *
- * To run a query within a React component, call `useGetApprovedItemsQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetApprovedItemsQuery` 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 } = useGetApprovedItemsQuery({
- * variables: {
- * filters: // value for 'filters'
- * pagination: // value for 'pagination'
- * },
- * });
- */
-export function useGetApprovedItemsQuery(
- baseOptions?: Apollo.QueryHookOptions<
- GetApprovedItemsQuery,
- GetApprovedItemsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery(
- GetApprovedItemsDocument,
- options,
- );
-}
-export function useGetApprovedItemsLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetApprovedItemsQuery,
- GetApprovedItemsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetApprovedItemsQuery,
- GetApprovedItemsQueryVariables
- >(GetApprovedItemsDocument, options);
-}
-export type GetApprovedItemsQueryHookResult = ReturnType<
- typeof useGetApprovedItemsQuery
->;
-export type GetApprovedItemsLazyQueryHookResult = ReturnType<
- typeof useGetApprovedItemsLazyQuery
->;
-export type GetApprovedItemsQueryResult = Apollo.QueryResult<
- GetApprovedItemsQuery,
- GetApprovedItemsQueryVariables
->;
-export const GetAuthorByIdDocument = gql`
- query getAuthorById($id: String!) {
- getCollectionAuthor(externalId: $id) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorDataFragmentDoc}
-`;
-
-/**
- * __useGetAuthorByIdQuery__
- *
- * To run a query within a React component, call `useGetAuthorByIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetAuthorByIdQuery` 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 } = useGetAuthorByIdQuery({
- * variables: {
- * id: // value for 'id'
- * },
- * });
- */
-export function useGetAuthorByIdQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetAuthorByIdQuery,
- GetAuthorByIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery(
- GetAuthorByIdDocument,
- options,
- );
-}
-export function useGetAuthorByIdLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetAuthorByIdQuery,
- GetAuthorByIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery(
- GetAuthorByIdDocument,
- options,
- );
-}
-export type GetAuthorByIdQueryHookResult = ReturnType<
- typeof useGetAuthorByIdQuery
->;
-export type GetAuthorByIdLazyQueryHookResult = ReturnType<
- typeof useGetAuthorByIdLazyQuery
->;
-export type GetAuthorByIdQueryResult = Apollo.QueryResult<
- GetAuthorByIdQuery,
- GetAuthorByIdQueryVariables
->;
-export const GetAuthorsDocument = gql`
- query getAuthors($page: Int, $perPage: Int) {
- getCollectionAuthors(page: $page, perPage: $perPage) {
- authors {
- ...CollectionAuthorData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
- }
- }
- ${CollectionAuthorDataFragmentDoc}
-`;
-
-/**
- * __useGetAuthorsQuery__
- *
- * To run a query within a React component, call `useGetAuthorsQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetAuthorsQuery` 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 } = useGetAuthorsQuery({
- * variables: {
- * page: // value for 'page'
- * perPage: // value for 'perPage'
- * },
- * });
- */
-export function useGetAuthorsQuery(
- baseOptions?: Apollo.QueryHookOptions<
- GetAuthorsQuery,
- GetAuthorsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery(
- GetAuthorsDocument,
- options,
- );
-}
-export function useGetAuthorsLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetAuthorsQuery,
- GetAuthorsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery(
- GetAuthorsDocument,
- options,
- );
-}
-export type GetAuthorsQueryHookResult = ReturnType;
-export type GetAuthorsLazyQueryHookResult = ReturnType<
- typeof useGetAuthorsLazyQuery
->;
-export type GetAuthorsQueryResult = Apollo.QueryResult<
- GetAuthorsQuery,
- GetAuthorsQueryVariables
->;
-export const GetCollectionByExternalIdDocument = gql`
- query getCollectionByExternalId($externalId: String!) {
- getCollection(externalId: $externalId) {
- ...CollectionData
- }
- }
- ${CollectionDataFragmentDoc}
-`;
-
-/**
- * __useGetCollectionByExternalIdQuery__
- *
- * To run a query within a React component, call `useGetCollectionByExternalIdQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionByExternalIdQuery` 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 } = useGetCollectionByExternalIdQuery({
- * variables: {
- * externalId: // value for 'externalId'
- * },
- * });
- */
-export function useGetCollectionByExternalIdQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetCollectionByExternalIdQuery,
- GetCollectionByExternalIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetCollectionByExternalIdQuery,
- GetCollectionByExternalIdQueryVariables
- >(GetCollectionByExternalIdDocument, options);
-}
-export function useGetCollectionByExternalIdLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionByExternalIdQuery,
- GetCollectionByExternalIdQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetCollectionByExternalIdQuery,
- GetCollectionByExternalIdQueryVariables
- >(GetCollectionByExternalIdDocument, options);
-}
-export type GetCollectionByExternalIdQueryHookResult = ReturnType<
- typeof useGetCollectionByExternalIdQuery
->;
-export type GetCollectionByExternalIdLazyQueryHookResult = ReturnType<
- typeof useGetCollectionByExternalIdLazyQuery
->;
-export type GetCollectionByExternalIdQueryResult = Apollo.QueryResult<
- GetCollectionByExternalIdQuery,
- GetCollectionByExternalIdQueryVariables
->;
-export const GetCollectionPartnerDocument = gql`
- query getCollectionPartner($id: String!) {
- getCollectionPartner(externalId: $id) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerDataFragmentDoc}
-`;
-
-/**
- * __useGetCollectionPartnerQuery__
- *
- * To run a query within a React component, call `useGetCollectionPartnerQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionPartnerQuery` 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 } = useGetCollectionPartnerQuery({
- * variables: {
- * id: // value for 'id'
- * },
- * });
- */
-export function useGetCollectionPartnerQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetCollectionPartnerQuery,
- GetCollectionPartnerQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetCollectionPartnerQuery,
- GetCollectionPartnerQueryVariables
- >(GetCollectionPartnerDocument, options);
-}
-export function useGetCollectionPartnerLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionPartnerQuery,
- GetCollectionPartnerQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetCollectionPartnerQuery,
- GetCollectionPartnerQueryVariables
- >(GetCollectionPartnerDocument, options);
-}
-export type GetCollectionPartnerQueryHookResult = ReturnType<
- typeof useGetCollectionPartnerQuery
->;
-export type GetCollectionPartnerLazyQueryHookResult = ReturnType<
- typeof useGetCollectionPartnerLazyQuery
->;
-export type GetCollectionPartnerQueryResult = Apollo.QueryResult<
- GetCollectionPartnerQuery,
- GetCollectionPartnerQueryVariables
->;
-export const GetCollectionPartnerAssociationDocument = gql`
- query getCollectionPartnerAssociation($externalId: String!) {
- getCollectionPartnerAssociationForCollection(externalId: $externalId) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationDataFragmentDoc}
-`;
-
-/**
- * __useGetCollectionPartnerAssociationQuery__
- *
- * To run a query within a React component, call `useGetCollectionPartnerAssociationQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionPartnerAssociationQuery` 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 } = useGetCollectionPartnerAssociationQuery({
- * variables: {
- * externalId: // value for 'externalId'
- * },
- * });
- */
-export function useGetCollectionPartnerAssociationQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetCollectionPartnerAssociationQuery,
- GetCollectionPartnerAssociationQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetCollectionPartnerAssociationQuery,
- GetCollectionPartnerAssociationQueryVariables
- >(GetCollectionPartnerAssociationDocument, options);
-}
-export function useGetCollectionPartnerAssociationLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionPartnerAssociationQuery,
- GetCollectionPartnerAssociationQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetCollectionPartnerAssociationQuery,
- GetCollectionPartnerAssociationQueryVariables
- >(GetCollectionPartnerAssociationDocument, options);
-}
-export type GetCollectionPartnerAssociationQueryHookResult = ReturnType<
- typeof useGetCollectionPartnerAssociationQuery
->;
-export type GetCollectionPartnerAssociationLazyQueryHookResult = ReturnType<
- typeof useGetCollectionPartnerAssociationLazyQuery
->;
-export type GetCollectionPartnerAssociationQueryResult = Apollo.QueryResult<
- GetCollectionPartnerAssociationQuery,
- GetCollectionPartnerAssociationQueryVariables
->;
-export const GetCollectionPartnersDocument = gql`
- query getCollectionPartners($page: Int, $perPage: Int) {
- getCollectionPartners(page: $page, perPage: $perPage) {
- partners {
- ...CollectionPartnerData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
- }
- }
- ${CollectionPartnerDataFragmentDoc}
-`;
-
-/**
- * __useGetCollectionPartnersQuery__
- *
- * To run a query within a React component, call `useGetCollectionPartnersQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionPartnersQuery` 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;
+ * @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 { data, loading, error } = useGetCollectionPartnersQuery({
+ * const [uploadApprovedCorpusItemImageMutation, { data, loading, error }] = useUploadApprovedCorpusItemImageMutation({
* variables: {
- * page: // value for 'page'
- * perPage: // value for 'perPage'
+ * image: // value for 'image'
* },
* });
*/
-export function useGetCollectionPartnersQuery(
- baseOptions?: Apollo.QueryHookOptions<
- GetCollectionPartnersQuery,
- GetCollectionPartnersQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetCollectionPartnersQuery,
- GetCollectionPartnersQueryVariables
- >(GetCollectionPartnersDocument, options);
-}
-export function useGetCollectionPartnersLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionPartnersQuery,
- GetCollectionPartnersQueryVariables
+export function useUploadApprovedCorpusItemImageMutation(
+ baseOptions?: Apollo.MutationHookOptions<
+ UploadApprovedCorpusItemImageMutation,
+ UploadApprovedCorpusItemImageMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetCollectionPartnersQuery,
- GetCollectionPartnersQueryVariables
- >(GetCollectionPartnersDocument, options);
+ return Apollo.useMutation<
+ UploadApprovedCorpusItemImageMutation,
+ UploadApprovedCorpusItemImageMutationVariables
+ >(UploadApprovedCorpusItemImageDocument, options);
}
-export type GetCollectionPartnersQueryHookResult = ReturnType<
- typeof useGetCollectionPartnersQuery
->;
-export type GetCollectionPartnersLazyQueryHookResult = ReturnType<
- typeof useGetCollectionPartnersLazyQuery
->;
-export type GetCollectionPartnersQueryResult = Apollo.QueryResult<
- GetCollectionPartnersQuery,
- GetCollectionPartnersQueryVariables
+export type UploadApprovedCorpusItemImageMutationHookResult = ReturnType<
+ typeof useUploadApprovedCorpusItemImageMutation
>;
-export const GetCollectionStoriesDocument = gql`
- query getCollectionStories($id: String!) {
- getCollection(externalId: $id) {
- externalId
- stories {
- ...CollectionStoryData
- }
+export type UploadApprovedCorpusItemImageMutationResult =
+ Apollo.MutationResult;
+export type UploadApprovedCorpusItemImageMutationOptions =
+ Apollo.BaseMutationOptions<
+ UploadApprovedCorpusItemImageMutation,
+ UploadApprovedCorpusItemImageMutationVariables
+ >;
+export const ApprovedCorpusItemByExternalIdDocument = gql`
+ query approvedCorpusItemByExternalId(
+ $externalId: ID!
+ $historyFilter: ApprovedCorpusItemScheduledSurfaceHistoryFilters
+ ) {
+ approvedCorpusItemByExternalId(externalId: $externalId) {
+ ...CuratedItemDataWithHistory
}
}
- ${CollectionStoryDataFragmentDoc}
+ ${CuratedItemDataWithHistoryFragmentDoc}
`;
/**
- * __useGetCollectionStoriesQuery__
+ * __useApprovedCorpusItemByExternalIdQuery__
*
- * To run a query within a React component, call `useGetCollectionStoriesQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionStoriesQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useApprovedCorpusItemByExternalIdQuery` and pass it any options that fit your needs.
+ * When your component renders, `useApprovedCorpusItemByExternalIdQuery` 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 } = useGetCollectionStoriesQuery({
+ * const { data, loading, error } = useApprovedCorpusItemByExternalIdQuery({
* variables: {
- * id: // value for 'id'
+ * externalId: // value for 'externalId'
+ * historyFilter: // value for 'historyFilter'
* },
* });
*/
-export function useGetCollectionStoriesQuery(
+export function useApprovedCorpusItemByExternalIdQuery(
baseOptions: Apollo.QueryHookOptions<
- GetCollectionStoriesQuery,
- GetCollectionStoriesQueryVariables
+ ApprovedCorpusItemByExternalIdQuery,
+ ApprovedCorpusItemByExternalIdQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
- GetCollectionStoriesQuery,
- GetCollectionStoriesQueryVariables
- >(GetCollectionStoriesDocument, options);
+ ApprovedCorpusItemByExternalIdQuery,
+ ApprovedCorpusItemByExternalIdQueryVariables
+ >(ApprovedCorpusItemByExternalIdDocument, options);
}
-export function useGetCollectionStoriesLazyQuery(
+export function useApprovedCorpusItemByExternalIdLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionStoriesQuery,
- GetCollectionStoriesQueryVariables
+ ApprovedCorpusItemByExternalIdQuery,
+ ApprovedCorpusItemByExternalIdQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
- GetCollectionStoriesQuery,
- GetCollectionStoriesQueryVariables
- >(GetCollectionStoriesDocument, options);
+ ApprovedCorpusItemByExternalIdQuery,
+ ApprovedCorpusItemByExternalIdQueryVariables
+ >(ApprovedCorpusItemByExternalIdDocument, options);
}
-export type GetCollectionStoriesQueryHookResult = ReturnType<
- typeof useGetCollectionStoriesQuery
+export type ApprovedCorpusItemByExternalIdQueryHookResult = ReturnType<
+ typeof useApprovedCorpusItemByExternalIdQuery
>;
-export type GetCollectionStoriesLazyQueryHookResult = ReturnType<
- typeof useGetCollectionStoriesLazyQuery
+export type ApprovedCorpusItemByExternalIdLazyQueryHookResult = ReturnType<
+ typeof useApprovedCorpusItemByExternalIdLazyQuery
>;
-export type GetCollectionStoriesQueryResult = Apollo.QueryResult<
- GetCollectionStoriesQuery,
- GetCollectionStoriesQueryVariables
+export type ApprovedCorpusItemByExternalIdQueryResult = Apollo.QueryResult<
+ ApprovedCorpusItemByExternalIdQuery,
+ ApprovedCorpusItemByExternalIdQueryVariables
>;
-export const GetCollectionsDocument = gql`
- query getCollections(
- $page: Int!
- $perPage: Int!
- $status: CollectionStatus!
- ) {
- searchCollections(
- filters: { status: $status }
- page: $page
- perPage: $perPage
- ) {
- collections {
- ...CollectionData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
+export const GetApprovedItemByUrlDocument = gql`
+ query getApprovedItemByUrl($url: String!) {
+ getApprovedCorpusItemByUrl(url: $url) {
+ ...CuratedItemData
}
}
- ${CollectionDataFragmentDoc}
+ ${CuratedItemDataFragmentDoc}
`;
/**
- * __useGetCollectionsQuery__
+ * __useGetApprovedItemByUrlQuery__
*
- * To run a query within a React component, call `useGetCollectionsQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetCollectionsQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetApprovedItemByUrlQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetApprovedItemByUrlQuery` 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 } = useGetCollectionsQuery({
+ * const { data, loading, error } = useGetApprovedItemByUrlQuery({
* variables: {
- * page: // value for 'page'
- * perPage: // value for 'perPage'
- * status: // value for 'status'
+ * url: // value for 'url'
* },
* });
*/
-export function useGetCollectionsQuery(
+export function useGetApprovedItemByUrlQuery(
baseOptions: Apollo.QueryHookOptions<
- GetCollectionsQuery,
- GetCollectionsQueryVariables
+ GetApprovedItemByUrlQuery,
+ GetApprovedItemByUrlQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery(
- GetCollectionsDocument,
- options,
- );
+ return Apollo.useQuery<
+ GetApprovedItemByUrlQuery,
+ GetApprovedItemByUrlQueryVariables
+ >(GetApprovedItemByUrlDocument, options);
}
-export function useGetCollectionsLazyQuery(
+export function useGetApprovedItemByUrlLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
- GetCollectionsQuery,
- GetCollectionsQueryVariables
+ GetApprovedItemByUrlQuery,
+ GetApprovedItemByUrlQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery(
- GetCollectionsDocument,
- options,
- );
+ return Apollo.useLazyQuery<
+ GetApprovedItemByUrlQuery,
+ GetApprovedItemByUrlQueryVariables
+ >(GetApprovedItemByUrlDocument, options);
}
-export type GetCollectionsQueryHookResult = ReturnType<
- typeof useGetCollectionsQuery
+export type GetApprovedItemByUrlQueryHookResult = ReturnType<
+ typeof useGetApprovedItemByUrlQuery
>;
-export type GetCollectionsLazyQueryHookResult = ReturnType<
- typeof useGetCollectionsLazyQuery
+export type GetApprovedItemByUrlLazyQueryHookResult = ReturnType<
+ typeof useGetApprovedItemByUrlLazyQuery
>;
-export type GetCollectionsQueryResult = Apollo.QueryResult<
- GetCollectionsQuery,
- GetCollectionsQueryVariables
+export type GetApprovedItemByUrlQueryResult = Apollo.QueryResult<
+ GetApprovedItemByUrlQuery,
+ GetApprovedItemByUrlQueryVariables
>;
-export const GetInitialCollectionFormDataDocument = gql`
- query getInitialCollectionFormData($page: Int, $perPage: Int) {
- getCollectionAuthors(page: $page, perPage: $perPage) {
- authors {
- ...CollectionAuthorData
+export const GetApprovedItemsDocument = gql`
+ query getApprovedItems(
+ $filters: ApprovedCorpusItemFilter
+ $pagination: PaginationInput
+ ) {
+ getApprovedCorpusItems(filters: $filters, pagination: $pagination) {
+ totalCount
+ pageInfo {
+ hasNextPage
+ hasPreviousPage
+ startCursor
+ endCursor
}
- }
- labels {
- externalId
- name
- }
- getLanguages
- getCurationCategories {
- externalId
- name
- slug
- }
- getIABCategories {
- externalId
- name
- slug
- children {
- externalId
- name
- slug
+ edges {
+ cursor
+ node {
+ ...CuratedItemData
+ }
}
}
}
- ${CollectionAuthorDataFragmentDoc}
+ ${CuratedItemDataFragmentDoc}
`;
/**
- * __useGetInitialCollectionFormDataQuery__
+ * __useGetApprovedItemsQuery__
*
- * To run a query within a React component, call `useGetInitialCollectionFormDataQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetInitialCollectionFormDataQuery` returns an object from Apollo Client that contains loading, error, and data properties
+ * To run a query within a React component, call `useGetApprovedItemsQuery` and pass it any options that fit your needs.
+ * When your component renders, `useGetApprovedItemsQuery` 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 } = useGetInitialCollectionFormDataQuery({
+ * const { data, loading, error } = useGetApprovedItemsQuery({
* variables: {
- * page: // value for 'page'
- * perPage: // value for 'perPage'
+ * filters: // value for 'filters'
+ * pagination: // value for 'pagination'
* },
* });
*/
-export function useGetInitialCollectionFormDataQuery(
+export function useGetApprovedItemsQuery(
baseOptions?: Apollo.QueryHookOptions<
- GetInitialCollectionFormDataQuery,
- GetInitialCollectionFormDataQueryVariables
+ GetApprovedItemsQuery,
+ GetApprovedItemsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetInitialCollectionFormDataQuery,
- GetInitialCollectionFormDataQueryVariables
- >(GetInitialCollectionFormDataDocument, options);
+ return Apollo.useQuery(
+ GetApprovedItemsDocument,
+ options,
+ );
}
-export function useGetInitialCollectionFormDataLazyQuery(
+export function useGetApprovedItemsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
- GetInitialCollectionFormDataQuery,
- GetInitialCollectionFormDataQueryVariables
+ GetApprovedItemsQuery,
+ GetApprovedItemsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
- GetInitialCollectionFormDataQuery,
- GetInitialCollectionFormDataQueryVariables
- >(GetInitialCollectionFormDataDocument, options);
+ GetApprovedItemsQuery,
+ GetApprovedItemsQueryVariables
+ >(GetApprovedItemsDocument, options);
}
-export type GetInitialCollectionFormDataQueryHookResult = ReturnType<
- typeof useGetInitialCollectionFormDataQuery
+export type GetApprovedItemsQueryHookResult = ReturnType<
+ typeof useGetApprovedItemsQuery
>;
-export type GetInitialCollectionFormDataLazyQueryHookResult = ReturnType<
- typeof useGetInitialCollectionFormDataLazyQuery
+export type GetApprovedItemsLazyQueryHookResult = ReturnType<
+ typeof useGetApprovedItemsLazyQuery
>;
-export type GetInitialCollectionFormDataQueryResult = Apollo.QueryResult<
- GetInitialCollectionFormDataQuery,
- GetInitialCollectionFormDataQueryVariables
+export type GetApprovedItemsQueryResult = Apollo.QueryResult<
+ GetApprovedItemsQuery,
+ GetApprovedItemsQueryVariables
>;
export const GetOpenGraphFieldsDocument = gql`
query getOpenGraphFields($url: Url!) {
@@ -9199,79 +6108,6 @@ export type GetScheduledSurfacesForUserQueryResult = Apollo.QueryResult<
GetScheduledSurfacesForUserQuery,
GetScheduledSurfacesForUserQueryVariables
>;
-export const SearchCollectionsDocument = gql`
- query searchCollections(
- $filters: SearchCollectionsFilters!
- $page: Int
- $perPage: Int
- ) {
- searchCollections(filters: $filters, page: $page, perPage: $perPage) {
- collections {
- ...CollectionData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- perPage
- }
- }
- }
- ${CollectionDataFragmentDoc}
-`;
-
-/**
- * __useSearchCollectionsQuery__
- *
- * To run a query within a React component, call `useSearchCollectionsQuery` and pass it any options that fit your needs.
- * When your component renders, `useSearchCollectionsQuery` 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 } = useSearchCollectionsQuery({
- * variables: {
- * filters: // value for 'filters'
- * page: // value for 'page'
- * perPage: // value for 'perPage'
- * },
- * });
- */
-export function useSearchCollectionsQuery(
- baseOptions: Apollo.QueryHookOptions<
- SearchCollectionsQuery,
- SearchCollectionsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- SearchCollectionsQuery,
- SearchCollectionsQueryVariables
- >(SearchCollectionsDocument, options);
-}
-export function useSearchCollectionsLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- SearchCollectionsQuery,
- SearchCollectionsQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- SearchCollectionsQuery,
- SearchCollectionsQueryVariables
- >(SearchCollectionsDocument, options);
-}
-export type SearchCollectionsQueryHookResult = ReturnType<
- typeof useSearchCollectionsQuery
->;
-export type SearchCollectionsLazyQueryHookResult = ReturnType<
- typeof useSearchCollectionsLazyQuery
->;
-export type SearchCollectionsQueryResult = Apollo.QueryResult<
- SearchCollectionsQuery,
- SearchCollectionsQueryVariables
->;
export const GetSectionsWithSectionItemsDocument = gql`
query getSectionsWithSectionItems(
$scheduledSurfaceGuid: ID!
@@ -9338,78 +6174,6 @@ export type GetSectionsWithSectionItemsQueryResult = Apollo.QueryResult<
GetSectionsWithSectionItemsQuery,
GetSectionsWithSectionItemsQueryVariables
>;
-export const GetStoryFromParserDocument = gql`
- query getStoryFromParser($url: String!) {
- getItemByUrl(url: $url) {
- resolvedUrl
- title
- excerpt
- topImageUrl
- images {
- src
- width
- height
- }
- authors {
- name
- }
- domainMetadata {
- name
- }
- }
- }
-`;
-
-/**
- * __useGetStoryFromParserQuery__
- *
- * To run a query within a React component, call `useGetStoryFromParserQuery` and pass it any options that fit your needs.
- * When your component renders, `useGetStoryFromParserQuery` 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 } = useGetStoryFromParserQuery({
- * variables: {
- * url: // value for 'url'
- * },
- * });
- */
-export function useGetStoryFromParserQuery(
- baseOptions: Apollo.QueryHookOptions<
- GetStoryFromParserQuery,
- GetStoryFromParserQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery<
- GetStoryFromParserQuery,
- GetStoryFromParserQueryVariables
- >(GetStoryFromParserDocument, options);
-}
-export function useGetStoryFromParserLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions<
- GetStoryFromParserQuery,
- GetStoryFromParserQueryVariables
- >,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery<
- GetStoryFromParserQuery,
- GetStoryFromParserQueryVariables
- >(GetStoryFromParserDocument, options);
-}
-export type GetStoryFromParserQueryHookResult = ReturnType<
- typeof useGetStoryFromParserQuery
->;
-export type GetStoryFromParserLazyQueryHookResult = ReturnType<
- typeof useGetStoryFromParserLazyQuery
->;
-export type GetStoryFromParserQueryResult = Apollo.QueryResult<
- GetStoryFromParserQuery,
- GetStoryFromParserQueryVariables
->;
export const GetUrlMetadataDocument = gql`
query getUrlMetadata($url: String!) {
getUrlMetadata(url: $url) {
@@ -9469,54 +6233,6 @@ export type GetUrlMetadataQueryResult = Apollo.QueryResult<
GetUrlMetadataQuery,
GetUrlMetadataQueryVariables
>;
-export const LabelsDocument = gql`
- query labels {
- labels {
- externalId
- name
- }
- }
-`;
-
-/**
- * __useLabelsQuery__
- *
- * To run a query within a React component, call `useLabelsQuery` and pass it any options that fit your needs.
- * When your component renders, `useLabelsQuery` 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 } = useLabelsQuery({
- * variables: {
- * },
- * });
- */
-export function useLabelsQuery(
- baseOptions?: Apollo.QueryHookOptions,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useQuery(
- LabelsDocument,
- options,
- );
-}
-export function useLabelsLazyQuery(
- baseOptions?: Apollo.LazyQueryHookOptions,
-) {
- const options = { ...defaultOptions, ...baseOptions };
- return Apollo.useLazyQuery(
- LabelsDocument,
- options,
- );
-}
-export type LabelsQueryHookResult = ReturnType;
-export type LabelsLazyQueryHookResult = ReturnType;
-export type LabelsQueryResult = Apollo.QueryResult<
- LabelsQuery,
- LabelsQueryVariables
->;
export const SearchShareableListDocument = gql`
query searchShareableList($externalId: ID!) {
searchShareableList(externalId: $externalId) {
diff --git a/src/api/helpers/mergePaginatedDataInCache.ts b/src/api/helpers/mergePaginatedDataInCache.ts
deleted file mode 100644
index cc60c4d52..000000000
--- a/src/api/helpers/mergePaginatedDataInCache.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { SafeReadonly } from '@apollo/client/cache/core/types/common';
-import { FieldFunctionOptions } from '@apollo/client/cache/inmemory/policies';
-
-/**
- * A helper function that merges paginated data from a query into a single list
- * in Apollo Client cache.
- *
- * @param existing
- * @param incoming
- * @param options
- * @param dataPropName
- */
-export const mergePaginatedDataInCache = (
- existing: SafeReadonly,
- incoming: SafeReadonly,
- options: FieldFunctionOptions,
- dataPropName: string,
-) => {
- const { args } = options;
-
- if (!args || !existing) {
- return incoming;
- } else {
- // We only need to merge the data part of the result, i.e. 'authors' or 'collections'
- const mergedData = existing ? existing[dataPropName].slice(0) : [];
-
- // Insert the incoming elements in the right places, according to args.
- const offset = (args.page - 1) * args.perPage;
- const end = offset + Math.min(args.perPage, incoming[dataPropName].length);
-
- for (let i = offset; i < end; ++i) {
- mergedData[i] = incoming[dataPropName][i - offset];
- }
-
- // Return the merged list and the updated pagination values
- return {
- [dataPropName]: mergedData,
- pagination: incoming.pagination,
- };
- }
-};
diff --git a/src/api/helpers/readPaginatedDataFromCache.ts b/src/api/helpers/readPaginatedDataFromCache.ts
deleted file mode 100644
index 2f1fdd965..000000000
--- a/src/api/helpers/readPaginatedDataFromCache.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { SafeReadonly } from '@apollo/client/cache/core/types/common';
-import { FieldFunctionOptions } from '@apollo/client/cache/inmemory/policies';
-
-/**
- * A helper function that returns the right slice of paginated data for a query.
- *
- * @param existing
- * @param options
- * @param dataPropName
- */
-export const readPaginatedDataFromCache = (
- existing: SafeReadonly,
- options: FieldFunctionOptions,
- dataPropName: string,
-) => {
- const { args } = options;
-
- if (!args) {
- return existing;
- } else {
- // Args object always returns 'page: 1' when it should return the actual page
- // requested in follow-up fetchMore() calls ¯\_(ツ)_/¯.
- // Work around this by using the data returned with the query
- // in the `pagination` object.
- const currentPage =
- existing && existing.pagination
- ? existing.pagination.currentPage
- : args.page;
-
- const offset = (currentPage - 1) * args.perPage;
-
- // Always return the data from the first item in the cache array
- // so that on each subsequent click of the "Load more..." button
- // the old results are delivered alongside with a page's worth
- // of new ones.
- const pagefulOfData =
- existing && existing[dataPropName].slice(0, offset + args.perPage);
-
- // Only return values if there's actually something in the cache.
- // If nothing is returned from this function, Apollo Client will
- // attempt to fetch fresh data from the GraphQL API.
- if (pagefulOfData && pagefulOfData.length > 0) {
- return {
- [dataPropName]: pagefulOfData,
- pagination: existing.pagination,
- };
- }
- }
-};
diff --git a/src/api/mutations/createCollection.ts b/src/api/mutations/createCollection.ts
deleted file mode 100644
index 273150439..000000000
--- a/src/api/mutations/createCollection.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Create a collection
- */
-export const createCollection = gql`
- mutation createCollection($data: CreateCollectionInput!) {
- createCollection(data: $data) {
- ...CollectionData
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/mutations/createCollectionAuthor.ts b/src/api/mutations/createCollectionAuthor.ts
deleted file mode 100644
index d44595e6a..000000000
--- a/src/api/mutations/createCollectionAuthor.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Create an author
- */
-export const createCollectionAuthor = gql`
- mutation createCollectionAuthor(
- $name: String!
- $slug: String
- $bio: Markdown
- $imageUrl: Url
- $active: Boolean
- ) {
- createCollectionAuthor(
- data: {
- name: $name
- slug: $slug
- bio: $bio
- imageUrl: $imageUrl
- active: $active
- }
- ) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/mutations/createCollectionPartner.ts b/src/api/mutations/createCollectionPartner.ts
deleted file mode 100644
index 9588c4972..000000000
--- a/src/api/mutations/createCollectionPartner.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from '../fragments/CollectionPartnerData';
-
-/**
- * Create a collection partner
- */
-export const createCollectionPartner = gql`
- mutation createCollectionPartner(
- $name: String!
- $url: Url!
- $blurb: Markdown!
- $imageUrl: Url!
- ) {
- createCollectionPartner(
- data: { name: $name, url: $url, blurb: $blurb, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/mutations/createCollectionPartnerAssociation.ts b/src/api/mutations/createCollectionPartnerAssociation.ts
deleted file mode 100644
index e71d200e8..000000000
--- a/src/api/mutations/createCollectionPartnerAssociation.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerAssociationData } from '../fragments/CollectionPartnerAssociationData';
-
-/**
- * Create a collection-partner association
- */
-export const createCollectionPartnerAssociation = gql`
- mutation createCollectionPartnerAssociation(
- $type: CollectionPartnershipType!
- $partnerExternalId: String!
- $collectionExternalId: String!
- $name: String
- $url: Url
- $imageUrl: Url
- $blurb: Markdown
- ) {
- createCollectionPartnerAssociation(
- data: {
- type: $type
- partnerExternalId: $partnerExternalId
- collectionExternalId: $collectionExternalId
- name: $name
- url: $url
- imageUrl: $imageUrl
- blurb: $blurb
- }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationData}
-`;
diff --git a/src/api/mutations/createCollectionStory.ts b/src/api/mutations/createCollectionStory.ts
deleted file mode 100644
index 1dc9b805b..000000000
--- a/src/api/mutations/createCollectionStory.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Create a collection story
- */
-export const createCollectionStory = gql`
- mutation createCollectionStory(
- $collectionExternalId: String!
- $url: Url!
- $title: String!
- $excerpt: Markdown!
- $imageUrl: Url!
- $authors: [CollectionStoryAuthorInput!]!
- $publisher: String!
- $sortOrder: Int
- $fromPartner: Boolean
- ) {
- createCollectionStory(
- data: {
- collectionExternalId: $collectionExternalId
- url: $url
- title: $title
- excerpt: $excerpt
- imageUrl: $imageUrl
- authors: $authors
- publisher: $publisher
- sortOrder: $sortOrder
- fromPartner: $fromPartner
- }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/mutations/createLabel.ts b/src/api/mutations/createLabel.ts
deleted file mode 100644
index 68b17c6b8..000000000
--- a/src/api/mutations/createLabel.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { gql } from '@apollo/client';
-/**
- * Create a label
- */
-export const createLabel = gql`
- mutation createLabel($name: String!) {
- createLabel(name: $name) {
- externalId
- name
- }
- }
-`;
diff --git a/src/api/mutations/deleteCollectionPartnerAssociation.ts b/src/api/mutations/deleteCollectionPartnerAssociation.ts
deleted file mode 100644
index 0f7ff9655..000000000
--- a/src/api/mutations/deleteCollectionPartnerAssociation.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerAssociationData } from '../fragments/CollectionPartnerAssociationData';
-
-/**
- * Delete a collection-partner association
- */
-export const deleteCollectionPartnerAssociation = gql`
- mutation deleteCollectionPartnerAssociation($externalId: String!) {
- deleteCollectionPartnerAssociation(externalId: $externalId) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationData}
-`;
diff --git a/src/api/mutations/deleteCollectionStory.ts b/src/api/mutations/deleteCollectionStory.ts
deleted file mode 100644
index 184ed4c1b..000000000
--- a/src/api/mutations/deleteCollectionStory.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Delete a collection story
- */
-export const deleteCollectionStory = gql`
- mutation deleteCollectionStory($externalId: String!) {
- deleteCollectionStory(externalId: $externalId) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/mutations/imageUpload.ts b/src/api/mutations/imageUpload.ts
deleted file mode 100644
index a4d8bcd52..000000000
--- a/src/api/mutations/imageUpload.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * Upload an image to S3
- */
-export const imageUpload = gql`
- mutation imageUpload(
- $image: Upload!
- $width: Int!
- $height: Int!
- $fileSizeBytes: Int!
- ) {
- collectionImageUpload(
- data: {
- image: $image
- width: $width
- height: $height
- fileSizeBytes: $fileSizeBytes
- }
- ) {
- url
- }
- }
-`;
diff --git a/src/api/mutations/updateCollection.ts b/src/api/mutations/updateCollection.ts
deleted file mode 100644
index 963d19c70..000000000
--- a/src/api/mutations/updateCollection.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Update a collection
- */
-export const updateCollection = gql`
- mutation updateCollection($data: UpdateCollectionInput!) {
- updateCollection(data: $data) {
- ...CollectionData
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/mutations/updateCollectionAuthor.ts b/src/api/mutations/updateCollectionAuthor.ts
deleted file mode 100644
index 958620fee..000000000
--- a/src/api/mutations/updateCollectionAuthor.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Update an author
- */
-export const updateCollectionAuthor = gql`
- mutation updateCollectionAuthor(
- $externalId: String!
- $name: String!
- $slug: String!
- $bio: Markdown
- $imageUrl: Url
- $active: Boolean
- ) {
- updateCollectionAuthor(
- data: {
- externalId: $externalId
- name: $name
- slug: $slug
- bio: $bio
- imageUrl: $imageUrl
- active: $active
- }
- ) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/mutations/updateCollectionAuthorImageUrl.ts b/src/api/mutations/updateCollectionAuthorImageUrl.ts
deleted file mode 100644
index 9fda8942e..000000000
--- a/src/api/mutations/updateCollectionAuthorImageUrl.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Update a collection author's image url
- */
-export const updateCollectionAuthorImageUrl = gql`
- mutation updateCollectionAuthorImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionAuthorImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/mutations/updateCollectionImageUrl.ts b/src/api/mutations/updateCollectionImageUrl.ts
deleted file mode 100644
index f801285a7..000000000
--- a/src/api/mutations/updateCollectionImageUrl.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Update a collection's image url
- */
-export const updateCollectionImageUrl = gql`
- mutation updateCollectionImageUrl($externalId: String!, $imageUrl: Url!) {
- updateCollectionImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionData
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/mutations/updateCollectionPartner.ts b/src/api/mutations/updateCollectionPartner.ts
deleted file mode 100644
index dbec9aeff..000000000
--- a/src/api/mutations/updateCollectionPartner.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from '../fragments/CollectionPartnerData';
-
-/**
- * Update a collection partner
- */
-export const updateCollectionPartner = gql`
- mutation updateCollectionPartner(
- $externalId: String!
- $name: String!
- $url: Url!
- $blurb: Markdown!
- $imageUrl: Url
- ) {
- updateCollectionPartner(
- data: {
- externalId: $externalId
- name: $name
- url: $url
- blurb: $blurb
- imageUrl: $imageUrl
- }
- ) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/mutations/updateCollectionPartnerAssociation.ts b/src/api/mutations/updateCollectionPartnerAssociation.ts
deleted file mode 100644
index f0739ca92..000000000
--- a/src/api/mutations/updateCollectionPartnerAssociation.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerAssociationData } from '../fragments/CollectionPartnerAssociationData';
-
-/**
- * Update a collection-partner association
- */
-export const updateCollectionPartnerAssociation = gql`
- mutation updateCollectionPartnerAssociation(
- $externalId: String!
- $type: CollectionPartnershipType!
- $partnerExternalId: String!
- $name: String
- $url: Url
- $imageUrl: Url
- $blurb: Markdown
- ) {
- updateCollectionPartnerAssociation(
- data: {
- externalId: $externalId
- type: $type
- partnerExternalId: $partnerExternalId
- name: $name
- url: $url
- imageUrl: $imageUrl
- blurb: $blurb
- }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationData}
-`;
diff --git a/src/api/mutations/updateCollectionPartnerAssociationImageUrl.ts b/src/api/mutations/updateCollectionPartnerAssociationImageUrl.ts
deleted file mode 100644
index d685caa0c..000000000
--- a/src/api/mutations/updateCollectionPartnerAssociationImageUrl.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerAssociationData } from '../fragments/CollectionPartnerAssociationData';
-
-/**
- * Update the image URL for a collection-partner association
- */
-export const updateCollectionPartnerAssociationImageUrl = gql`
- mutation updateCollectionPartnerAssociationImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionPartnerAssociationImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationData}
-`;
diff --git a/src/api/mutations/updateCollectionPartnerImageUrl.ts b/src/api/mutations/updateCollectionPartnerImageUrl.ts
deleted file mode 100644
index c29b9d7d9..000000000
--- a/src/api/mutations/updateCollectionPartnerImageUrl.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from '../fragments/CollectionPartnerData';
-
-/**
- * Update a collection partner's image url
- */
-export const updateCollectionPartnerImageUrl = gql`
- mutation updateCollectionPartnerImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionPartnerImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/mutations/updateCollectionStory.ts b/src/api/mutations/updateCollectionStory.ts
deleted file mode 100644
index 259c5cc14..000000000
--- a/src/api/mutations/updateCollectionStory.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Update a collection story
- */
-export const updateCollectionStory = gql`
- mutation updateCollectionStory(
- $externalId: String!
- $url: Url!
- $title: String!
- $excerpt: Markdown!
- $imageUrl: Url!
- $authors: [CollectionStoryAuthorInput!]!
- $publisher: String!
- $sortOrder: Int
- $fromPartner: Boolean
- ) {
- updateCollectionStory(
- data: {
- externalId: $externalId
- url: $url
- title: $title
- excerpt: $excerpt
- imageUrl: $imageUrl
- authors: $authors
- publisher: $publisher
- sortOrder: $sortOrder
- fromPartner: $fromPartner
- }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/mutations/updateCollectionStoryImageUrl.ts b/src/api/mutations/updateCollectionStoryImageUrl.ts
deleted file mode 100644
index 8d823b1d6..000000000
--- a/src/api/mutations/updateCollectionStoryImageUrl.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Update a collection story's image url
- */
-export const updateCollectionStoryImageUrl = gql`
- mutation updateCollectionStoryImageUrl(
- $externalId: String!
- $imageUrl: Url!
- ) {
- updateCollectionStoryImageUrl(
- data: { externalId: $externalId, imageUrl: $imageUrl }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/mutations/updateCollectionStorySortOrder.ts b/src/api/mutations/updateCollectionStorySortOrder.ts
deleted file mode 100644
index bf538f492..000000000
--- a/src/api/mutations/updateCollectionStorySortOrder.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Update a sort order for a collection story
- */
-export const updateCollectionStorySortOrder = gql`
- mutation updateCollectionStorySortOrder(
- $externalId: String!
- $sortOrder: Int!
- ) {
- updateCollectionStorySortOrder(
- data: { externalId: $externalId, sortOrder: $sortOrder }
- ) {
- ...CollectionStoryData
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/mutations/updateLabel.ts b/src/api/mutations/updateLabel.ts
deleted file mode 100644
index 2d9b4a453..000000000
--- a/src/api/mutations/updateLabel.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * Updates a label not associated with a collection.
- */
-export const updateLabel = gql`
- mutation updateLabel($data: UpdateLabelInput!) {
- updateLabel(data: $data) {
- externalId
- name
- }
- }
-`;
diff --git a/src/api/queries/getAuthorById.ts b/src/api/queries/getAuthorById.ts
deleted file mode 100644
index 73241eb30..000000000
--- a/src/api/queries/getAuthorById.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Get author information by their external id.
- */
-export const getAuthorById = gql`
- query getAuthorById($id: String!) {
- getCollectionAuthor(externalId: $id) {
- ...CollectionAuthorData
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/queries/getAuthors.ts b/src/api/queries/getAuthors.ts
deleted file mode 100644
index 5b82d38cd..000000000
--- a/src/api/queries/getAuthors.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Get a list of authors
- */
-export const getAuthors = gql`
- query getAuthors($page: Int, $perPage: Int) {
- getCollectionAuthors(page: $page, perPage: $perPage) {
- authors {
- ...CollectionAuthorData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/queries/getCollectionById.ts b/src/api/queries/getCollectionById.ts
deleted file mode 100644
index 2acea810e..000000000
--- a/src/api/queries/getCollectionById.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Get collection by its external id.
- */
-export const getCollectionById = gql`
- query getCollectionByExternalId($externalId: String!) {
- getCollection(externalId: $externalId) {
- ...CollectionData
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/queries/getCollectionPartner.ts b/src/api/queries/getCollectionPartner.ts
deleted file mode 100644
index 72430dc43..000000000
--- a/src/api/queries/getCollectionPartner.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from '../fragments/CollectionPartnerData';
-
-/**
- * Get partner information by their external id.
- */
-export const getCollectionPartner = gql`
- query getCollectionPartner($id: String!) {
- getCollectionPartner(externalId: $id) {
- ...CollectionPartnerData
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/queries/getCollectionPartnerAssociation.ts b/src/api/queries/getCollectionPartnerAssociation.ts
deleted file mode 100644
index 3742e62df..000000000
--- a/src/api/queries/getCollectionPartnerAssociation.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerAssociationData } from '../fragments/CollectionPartnerAssociationData';
-
-/**
- * Get collection-partner association information by the external id.
- * of the collection it's related to.
- */
-export const getCollectionPartnerAssociation = gql`
- query getCollectionPartnerAssociation($externalId: String!) {
- getCollectionPartnerAssociationForCollection(externalId: $externalId) {
- ...CollectionPartnerAssociationData
- }
- }
- ${CollectionPartnerAssociationData}
-`;
diff --git a/src/api/queries/getCollectionPartners.ts b/src/api/queries/getCollectionPartners.ts
deleted file mode 100644
index 3ca3f6720..000000000
--- a/src/api/queries/getCollectionPartners.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionPartnerData } from '../fragments/CollectionPartnerData';
-
-/**
- * Get a list of collection partners
- */
-export const getCollectionPartners = gql`
- query getCollectionPartners($page: Int, $perPage: Int) {
- getCollectionPartners(page: $page, perPage: $perPage) {
- partners {
- ...CollectionPartnerData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
- }
- }
- ${CollectionPartnerData}
-`;
diff --git a/src/api/queries/getCollectionStories.ts b/src/api/queries/getCollectionStories.ts
deleted file mode 100644
index 7a7d271c7..000000000
--- a/src/api/queries/getCollectionStories.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionStoryData } from '../fragments/CollectionStoryData';
-
-/**
- * Get collection stories for a given collection external id.
- * Deliberately fetching stories for a collection in a separate
- * query to make managing cache updates easier
- */
-export const getCollectionStories = gql`
- query getCollectionStories($id: String!) {
- getCollection(externalId: $id) {
- externalId
- stories {
- ...CollectionStoryData
- }
- }
- }
- ${CollectionStoryData}
-`;
diff --git a/src/api/queries/getCollections.ts b/src/api/queries/getCollections.ts
deleted file mode 100644
index fcc4fc9b0..000000000
--- a/src/api/queries/getCollections.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Get a paginated list of collections with a given status
- */
-export const getCollections = gql`
- query getCollections(
- $page: Int!
- $perPage: Int!
- $status: CollectionStatus!
- ) {
- searchCollections(
- filters: { status: $status }
- page: $page
- perPage: $perPage
- ) {
- collections {
- ...CollectionData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- }
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/queries/getInitialCollectionFormData.ts b/src/api/queries/getInitialCollectionFormData.ts
deleted file mode 100644
index e46aff99e..000000000
--- a/src/api/queries/getInitialCollectionFormData.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionAuthorData } from '../fragments/CollectionAuthorData';
-
-/**
- * Get a list of authors
- */
-export const getInitialCollectionFormData = gql`
- query getInitialCollectionFormData($page: Int, $perPage: Int) {
- getCollectionAuthors(page: $page, perPage: $perPage) {
- authors {
- ...CollectionAuthorData
- }
- }
-
- labels {
- externalId
- name
- }
-
- getLanguages
-
- getCurationCategories {
- externalId
- name
- slug
- }
-
- getIABCategories {
- externalId
- name
- slug
- children {
- externalId
- name
- slug
- }
- }
- }
- ${CollectionAuthorData}
-`;
diff --git a/src/api/queries/getSearchCollections.ts b/src/api/queries/getSearchCollections.ts
deleted file mode 100644
index a3acd730c..000000000
--- a/src/api/queries/getSearchCollections.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { gql } from '@apollo/client';
-import { CollectionData } from '../fragments/CollectionData';
-
-/**
- * Seach collections
- */
-export const getSearchCollections = gql`
- query searchCollections(
- $filters: SearchCollectionsFilters!
- $page: Int
- $perPage: Int
- ) {
- searchCollections(filters: $filters, page: $page, perPage: $perPage) {
- collections {
- ...CollectionData
- }
- pagination {
- currentPage
- totalPages
- totalResults
- perPage
- }
- }
- }
- ${CollectionData}
-`;
diff --git a/src/api/queries/getStoryFromParser.ts b/src/api/queries/getStoryFromParser.ts
deleted file mode 100644
index 7d7e8daf3..000000000
--- a/src/api/queries/getStoryFromParser.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { gql } from '@apollo/client';
-
-/**
- * Get author information by their external id.
- *
- * Note that we request the `topImageUrl` to get the publisher's preferred image
- * for a story, and if that's not there, the frontend will check the array of
- * `images` and pick the first image off there (this is usually the hero image).
- *
- * `domainMetadata.name` is fed into the 'Publisher' field on the frontend.
- */
-export const getStoryFromParser = gql`
- query getStoryFromParser($url: String!) {
- getItemByUrl(url: $url) {
- resolvedUrl
- title
- excerpt
- topImageUrl
- images {
- src
- width
- height
- }
- authors {
- name
- }
- domainMetadata {
- name
- }
- }
- }
-`;
diff --git a/src/api/queries/labels.ts b/src/api/queries/labels.ts
deleted file mode 100644
index be1d78566..000000000
--- a/src/api/queries/labels.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { gql } from '@apollo/client';
-
-export const labels = gql`
- query labels {
- labels {
- externalId
- name
- }
- }
-`;
diff --git a/src/collections/components/AuthorForm/AuthorForm.test.tsx b/src/collections/components/AuthorForm/AuthorForm.test.tsx
deleted file mode 100644
index e26c4eb2f..000000000
--- a/src/collections/components/AuthorForm/AuthorForm.test.tsx
+++ /dev/null
@@ -1,203 +0,0 @@
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import userEvent from '@testing-library/user-event';
-import { AuthorForm } from './AuthorForm';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-
-describe('The AuthorForm component', () => {
- let author: CollectionAuthor;
- const handleSubmit = jest.fn();
-
- beforeEach(() => {
- author = {
- externalId: '124abc',
- name: 'Nigel Rutherford',
- slug: 'nigel-rutherford',
- imageUrl: 'http://placeimg.com/640/480/people?random=494',
- bio:
- 'Incidunt corrupti earum. Quasi aut qui magnam eum. ' +
- 'Quia non dolores voluptatem est aut. Id officiis nulla est.\n \r' +
- 'Harum et velit debitis. Quia assumenda commodi et dolor. ' +
- 'Ut dicta veritatis perspiciatis suscipit. ' +
- 'Aspernatur reprehenderit laboriosam voluptates ut. Ut minus aut est.',
- active: true,
- };
- });
-
- it('renders successfully', () => {
- render();
-
- // there is at least a form and nothing falls over
- const form = screen.getByRole('form');
- expect(form).toBeInTheDocument();
- });
-
- it('shows three action buttons by default', () => {
- render();
-
- const buttons = screen.getAllByRole('button');
- expect(buttons.length).toEqual(3);
- });
-
- it('only shows two buttons if cancel button is not requested', () => {
- render(
- ,
- );
-
- const buttons = screen.getAllByRole('button');
- expect(buttons.length).toEqual(2);
- });
-
- it('displays author information', () => {
- render();
-
- const nameField = screen.getByLabelText('Full name');
- expect(nameField).toBeInTheDocument();
-
- const slugField = screen.getByLabelText('Slug');
- expect(slugField).toBeInTheDocument();
-
- const bioField = screen.getByLabelText('Bio');
- expect(bioField).toBeInTheDocument();
-
- const activeField = screen.getByLabelText('Active');
- expect(activeField).toBeInTheDocument();
- });
-
- it('validates the "name" field', async () => {
- render();
-
- const nameField = screen.getByLabelText(/full name/i);
- const saveButton = screen.getByText(/save/i);
-
- // Submit an empty field
- userEvent.clear(nameField);
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter the full name of the author/i),
- ).toBeInTheDocument();
- expect(
- screen.queryByText(/name must be at least 2 characters/i),
- ).not.toBeInTheDocument();
-
- // Submit a name that is too short (under 2 characters)
- // Note that a full name is expected here - few first name + last name combinations
- // are shorter than this.
- // **NOTE** As of November 28, 2022. We changed the minimum author name requirement to 2 as per curators' request.
- userEvent.type(nameField, 'J');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter the full name of the author/i),
- ).not.toBeInTheDocument();
- expect(
- screen.queryByText(/name must be at least 2 characters/i),
- ).toBeInTheDocument();
-
- // Submit a name that satisfies all the requirements
- userEvent.type(nameField, 'John Citizen');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter the full name of the author/i),
- ).not.toBeInTheDocument();
- expect(
- screen.queryByText(/name must be at least 2 characters/i),
- ).not.toBeInTheDocument();
- });
-
- it('validates the "slug" field', async () => {
- render();
-
- const slugField = screen.getByLabelText(/slug/i);
- const saveButton = screen.getByText(/save/i);
-
- // Submit an empty field
- userEvent.clear(slugField);
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 2 characters/i),
- ).not.toBeInTheDocument();
-
- // Submit a slug that is too short (under 2 characters)
- // **NOTE** As of November 28, 2022. We changed the minimum author name requirement to 2 as per curators' request. This affects the slug length as well.
- userEvent.type(slugField, 'q');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).not.toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 2 characters/i),
- ).toBeInTheDocument();
-
- // Submit a slug that satisfies all the requirements
- userEvent.type(slugField, 'queen-bee');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).not.toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 2 characters/i),
- ).not.toBeInTheDocument();
- });
-
- it('suggests the slug correctly', async () => {
- render();
-
- // The "Suggest slug" button slugifies whatever is present in the "Full name" field
- const slugField = screen.getByLabelText(/slug/i);
- const nameField = screen.getByLabelText(/name/i);
- const suggestSlugButton = screen.getByText(/suggest slug/i);
-
- // Try with an empty field first
- userEvent.clear(slugField);
- userEvent.clear(nameField);
-
- await waitFor(() => {
- userEvent.click(suggestSlugButton);
- });
-
- // Slugify button returned an empty string
- expect(slugField).toHaveTextContent('');
-
- // Try with an actual name
- userEvent.type(nameField, 'John Citizen');
-
- await waitFor(() => {
- userEvent.click(suggestSlugButton);
- });
-
- // Slugified version of the name appears in the slug input field
- expect(screen.getByDisplayValue('john-citizen')).toBeInTheDocument();
- });
-
- it('displays the "active" status correctly', async () => {
- render();
-
- // By default the mock author set up before each test is active
- const checkbox = screen.getByLabelText(/active/i);
- expect(checkbox).toBeInTheDocument();
-
- // Let's uncheck it
- await waitFor(() => {
- userEvent.click(checkbox);
- });
-
- // Checkbox now displays "Inactive" as its label
- expect(screen.queryByLabelText(/inactive/i)).toBeInTheDocument();
- });
-
- it('has markdown preview tabs', () => {
- render();
-
- expect(screen.getByText(/write/i)).toBeInTheDocument();
- expect(screen.getByText(/preview/i)).toBeInTheDocument();
- });
-});
diff --git a/src/collections/components/AuthorForm/AuthorForm.tsx b/src/collections/components/AuthorForm/AuthorForm.tsx
deleted file mode 100644
index 4282e327a..000000000
--- a/src/collections/components/AuthorForm/AuthorForm.tsx
+++ /dev/null
@@ -1,140 +0,0 @@
-import React from 'react';
-import {
- Box,
- FormControlLabel,
- Grid,
- LinearProgress,
- Switch,
-} from '@mui/material';
-import slugify from 'slugify';
-import { FormikValues, useFormik } from 'formik';
-import { FormikHelpers } from 'formik/dist/types';
-import {
- Button,
- FormikTextField,
- MarkdownPreview,
- SharedFormButtons,
- SharedFormButtonsProps,
-} from '../../../_shared/components';
-import { validationSchema } from './AuthorForm.validation';
-import { config } from '../../../config';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-
-interface AuthorFormProps {
- /**
- * An object with everything author-related in it.
- */
- author: CollectionAuthor;
-
- /**
- * What do we do with the submitted data?
- */
- onSubmit: (values: FormikValues, formikHelpers: FormikHelpers) => void;
-}
-
-/**
- * A form for adding authors or editing information for existing authors
- */
-export const AuthorForm: React.FC = (
- props,
-): JSX.Element => {
- const { author, onSubmit, editMode, onCancel } = props;
-
- /**
- * Set up form validation
- */
- const formik = useFormik({
- initialValues: {
- name: author.name ?? '',
- slug: author.slug ?? '',
- bio: author.bio ?? '',
- active: author.active ?? true,
- },
- // We don't want to irritate users by displaying validation errors
- // before they actually submit the form
- validateOnChange: false,
- validateOnBlur: false,
- validationSchema,
- onSubmit: (values, formikHelpers) => {
- onSubmit(values, formikHelpers);
- },
- });
-
- /**
- * Suggest a slug for the author - works off the "name" field
- */
- const suggestSlug = () => {
- const newSlug = slugify(formik.values.name, config.slugify);
- formik.setFieldValue('slug', newSlug);
- };
-
- return (
-
- );
-};
diff --git a/src/collections/components/AuthorForm/AuthorForm.validation.tsx b/src/collections/components/AuthorForm/AuthorForm.validation.tsx
deleted file mode 100644
index c9f147879..000000000
--- a/src/collections/components/AuthorForm/AuthorForm.validation.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as yup from 'yup';
-
-/**
- * Validation schema for the Author add/edit form
- */
-export const validationSchema = yup.object({
- name: yup
- .string()
- .required('Please enter the full name of the author')
- .min(2),
- slug: yup
- .string()
- .trim()
- .required(
- 'Please enter a slug or use the "Suggest slug" button to generate one from the name of the author',
- )
- .matches(
- /^[a-z0-9-]+$/,
- 'Slug can only contain lowercase alphanumeric characters and hyphens',
- )
- .min(2),
- bio: yup.string(),
- active: yup.boolean().required(),
-});
diff --git a/src/collections/components/AuthorInfo/AuthorInfo.test.tsx b/src/collections/components/AuthorInfo/AuthorInfo.test.tsx
deleted file mode 100644
index 664f9232c..000000000
--- a/src/collections/components/AuthorInfo/AuthorInfo.test.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import React from 'react';
-import { render, screen } from '@testing-library/react';
-import { MemoryRouter } from 'react-router-dom';
-import { AuthorInfo } from './AuthorInfo';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-import { MockedProvider } from '@apollo/client/testing';
-
-describe('The AuthorInfo component', () => {
- let author: CollectionAuthor;
-
- beforeEach(() => {
- author = {
- externalId: '124abc',
- name: 'Nigel Rutherford',
- slug: 'nigel-rutherford',
- imageUrl: 'http://placeimg.com/640/480/people?random=494',
- bio:
- 'Incidunt corrupti earum. Quasi aut qui magnam eum. ' +
- 'Quia non dolores voluptatem est aut. Id officiis nulla est.\n \r' +
- 'Harum et velit debitis. Quia assumenda commodi et dolor. ' +
- 'Ut dicta veritatis perspiciatis suscipit. ' +
- 'Aspernatur reprehenderit laboriosam voluptates ut. Ut minus aut est.',
- active: true,
- };
- });
-
- it('shows basic author information', () => {
- render(
-
-
-
-
- ,
- );
-
- // The author bio is present
- const bio = screen.getByText(/voluptatem est aut/i);
- expect(bio).toBeInTheDocument();
- });
-
- it('shows "active" status correctly', () => {
- render(
-
-
-
-
- ,
- );
-
- // Shows 'Active' subtitle for an active author
- const activeSubtitle = screen.getByText(/^active/i);
- expect(activeSubtitle).toBeInTheDocument();
-
- // Doesn't show 'Inactive' for an active author
- const inactiveSubtitle = screen.queryByText(/^inactive/i);
- expect(inactiveSubtitle).not.toBeInTheDocument();
- });
-
- it('shows "inactive" status correctly', () => {
- author.active = false;
-
- render(
-
-
-
-
- ,
- );
-
- // Shows 'Inactive' subtitle for an inactive author
- const inactiveSubtitle = screen.getByText(/^inactive/i);
- expect(inactiveSubtitle).toBeInTheDocument();
-
- // Doesn't show 'Active' for an inactive author
- const activeSubtitle = screen.queryByText(/^active/i);
- expect(activeSubtitle).not.toBeInTheDocument();
- });
-});
diff --git a/src/collections/components/AuthorInfo/AuthorInfo.tsx b/src/collections/components/AuthorInfo/AuthorInfo.tsx
deleted file mode 100644
index d02dcb4c9..000000000
--- a/src/collections/components/AuthorInfo/AuthorInfo.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import React from 'react';
-import { Typography } from '@mui/material';
-import ReactMarkdown from 'react-markdown';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-
-interface AuthorInfoProps {
- /**
- * An object with everything author-related in it.
- */
- author: CollectionAuthor;
-}
-
-/**
- * A simple component that shows author information. The name of the author
- * and their photo are rendered by other components.
- *
- * @param props
- * @constructor
- */
-export const AuthorInfo: React.FC = (props): JSX.Element => {
- const { author } = props;
-
- return (
- <>
-
- {author.active ? 'Active' : 'Inactive'}
-
- {author.bio}
- >
- );
-};
diff --git a/src/collections/components/AuthorListCard/AuthorListCard.test.tsx b/src/collections/components/AuthorListCard/AuthorListCard.test.tsx
deleted file mode 100644
index cdcab3b9f..000000000
--- a/src/collections/components/AuthorListCard/AuthorListCard.test.tsx
+++ /dev/null
@@ -1,117 +0,0 @@
-import React from 'react';
-import { render, screen } from '@testing-library/react';
-import { MemoryRouter, Router } from 'react-router-dom';
-import { AuthorListCard } from './AuthorListCard';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-import { MockedProvider } from '@apollo/client/testing';
-import userEvent from '@testing-library/user-event';
-import { createMemoryHistory } from 'history';
-
-describe('The AuthorListCard component', () => {
- let author: CollectionAuthor;
-
- beforeEach(() => {
- author = {
- externalId: '124abc',
- name: 'Nigel Rutherford',
- slug: 'nigel-rutherford',
- imageUrl: 'http://placeimg.com/640/480/people?random=494',
- bio:
- 'Incidunt corrupti earum. Quasi aut qui magnam eum. ' +
- 'Quia non dolores voluptatem est aut. Id officiis nulla est.\n \r' +
- 'Harum et velit debitis. Quia assumenda commodi et dolor. ' +
- 'Ut dicta veritatis perspiciatis suscipit. ' +
- 'Aspernatur reprehenderit laboriosam voluptates ut. Ut minus aut est.',
- active: true,
- };
- });
-
- it('shows basic author information', () => {
- render(
-
-
- ,
- );
-
- // The author photo is present and the alt text is the author's name
- const authorPhoto = screen.getByAltText(author.name);
- expect(authorPhoto).toBeInTheDocument();
-
- // The link to the author page is present and is well-formed
- const linkToAuthorPage = screen.getByRole('link');
- expect(linkToAuthorPage).toBeInTheDocument();
- expect(linkToAuthorPage).toHaveAttribute(
- 'href',
- expect.stringContaining(author.externalId),
- );
-
- // The author bio is also present
- const bio = screen.getByText(/voluptatem est aut/i);
- expect(bio).toBeInTheDocument();
- });
-
- it('shows "active" status correctly', () => {
- render(
-
-
- ,
- );
-
- // Shows 'Active' subtitle for an active author
- const activeSubtitle = screen.getByText(/^active/i);
- expect(activeSubtitle).toBeInTheDocument();
-
- // Doesn't show 'Inactive' for an active author
- const inactiveSubtitle = screen.queryByText(/^inactive/i);
- expect(inactiveSubtitle).not.toBeInTheDocument();
- });
-
- it('shows "inactive" status correctly', () => {
- author.active = false;
-
- render(
-
-
- ,
- );
-
- // Shows 'Inactive' subtitle for an inactive author
- const inactiveSubtitle = screen.getByText(/^inactive/i);
- expect(inactiveSubtitle).toBeInTheDocument();
-
- // Doesn't show 'Active' for an inactive author
- const activeSubtitle = screen.queryByText(/^active/i);
- expect(activeSubtitle).not.toBeInTheDocument();
- });
-
- it("links to an individual author's page", () => {
- const history = createMemoryHistory({
- initialEntries: ['/collections/authors/'],
- });
-
- render(
-
-
-
-
- ,
- );
-
- // While the entire card is a giant link, we can click on
- // anything we like within that link - i.e., the author's name
- userEvent.click(screen.getByText(author.name));
- expect(history.location.pathname).toEqual(
- `/collections/authors/${author.externalId}/`,
- );
-
- // Let's go back to the Authors page
- history.goBack();
- expect(history.location.pathname).toEqual('/collections/authors/');
-
- // And click on the image this time
- userEvent.click(screen.getByRole('img'));
- expect(history.location.pathname).toEqual(
- `/collections/authors/${author.externalId}/`,
- );
- });
-});
diff --git a/src/collections/components/AuthorListCard/AuthorListCard.tsx b/src/collections/components/AuthorListCard/AuthorListCard.tsx
deleted file mode 100644
index ccde22785..000000000
--- a/src/collections/components/AuthorListCard/AuthorListCard.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import React from 'react';
-import { Link as RouterLink } from 'react-router-dom';
-import ReactMarkdown from 'react-markdown';
-import { CardMedia, Grid, Typography } from '@mui/material';
-import { CollectionAuthor } from '../../../api/generatedTypes';
-import { StyledCardLink, StyledListCard } from '../../../_shared/styled';
-
-interface AuthorListCardProps {
- /**
- * An object with everything author-related in it.
- */
- author: CollectionAuthor;
-}
-
-/**
- * A compact card that displays author information and links to the author page.
- *
- * @param props
- */
-export const AuthorListCard: React.FC = (props) => {
- const { author } = props;
-
- // We pass the author object along with the link so that when the user clicks
- // on the card to go to an individual author's page, the page is loaded instantly.
- return (
-
-
-
-
- 0
- ? author.imageUrl
- : '/placeholders/authorSmall.svg'
- }
- alt={author.name}
- sx={{
- borderRadius: 1,
- }}
- />
-
-
-
- {author.name}
-
-
- {author.active ? 'Active' : 'Inactive'}
-
-
-
- {author.bio ? author.bio.substring(0, 100) : ''}
-
-
-
-
-
-
- );
-};
diff --git a/src/collections/components/ChipLabelsList/ChipLabelsList.test.tsx b/src/collections/components/ChipLabelsList/ChipLabelsList.test.tsx
deleted file mode 100644
index 9c834946f..000000000
--- a/src/collections/components/ChipLabelsList/ChipLabelsList.test.tsx
+++ /dev/null
@@ -1,131 +0,0 @@
-import React from 'react';
-import { render, screen } from '@testing-library/react';
-import { MemoryRouter } from 'react-router-dom';
-import userEvent from '@testing-library/user-event';
-import { ChipLabelsList } from './ChipLabelsList';
-import {
- Collection,
- CollectionLanguage,
- CollectionStatus,
-} from '../../../api/generatedTypes';
-
-describe('The ChipLabelsList component', () => {
- let collection: Omit;
-
- beforeEach(() => {
- collection = {
- externalId: '124abc',
- title: 'Hidden Histories of Presidential Medical Dramas',
- slug: 'collection-slug',
- imageUrl: 'https://placeimg.com/640/480/people?random=494',
- excerpt:
- 'There’s a long history of presidential ailments, including George Washington’s near-death encounter with the flu, Grover Cleveland’s secret tumor, and the clandestine suffering of John F. Kennedy. ',
- intro: 'Intro text is generally longer than the excerpt.',
- language: CollectionLanguage.De,
- status: CollectionStatus.Draft,
- authors: [{ externalId: '123-abc', name: 'Joe Bloggs', active: true }],
- };
- });
-
- it('shows label if labels are set', () => {
- collection.labels = [
- {
- externalId: 'label-1',
- name: 'region-east-africa',
- },
- {
- externalId: 'label-2',
- name: 'region-west-africa',
- },
- ];
-
- render(
-
-
- ,
- );
-
- expect(screen.getByText('region-east-africa')).toBeInTheDocument();
- expect(screen.getByText('region-west-africa')).toBeInTheDocument();
- });
-
- it('shows 2 out of 3 labels, click on expand button and show one more label', () => {
- collection.labels = [
- {
- externalId: 'label-1',
- name: 'region-east-africa',
- },
- {
- externalId: 'label-2',
- name: 'region-west-africa',
- },
- {
- externalId: 'label-3',
- name: 'region-south-africa',
- },
- ];
-
- render(
-
-
- ,
- );
-
- // grab expand button, expect +1 as there are total of 3 labels
- const expandButton = screen.getByRole('button', {
- name: /\+ 1/i,
- });
- expect(expandButton).toBeInTheDocument();
-
- // click on the expand button
- userEvent.click(expandButton);
-
- expect(screen.getByText('region-east-africa')).toBeInTheDocument();
- expect(screen.getByText('region-west-africa')).toBeInTheDocument();
- expect(screen.getByText('region-south-africa')).toBeInTheDocument();
- });
-
- it('shows 2 out of 3 labels, one label is hidden', () => {
- collection.labels = [
- {
- externalId: 'label-1',
- name: 'region-east-africa',
- },
- {
- externalId: 'label-2',
- name: 'region-west-africa',
- },
- {
- externalId: 'label-3',
- name: 'region-south-africa',
- },
- ];
-
- render(
-
-
- ,
- );
-
- // grab expand button, expect +1 as there are total of 3 labels
- const expandButton = screen.getByRole('button', {
- name: /\+ 1/i,
- });
- expect(expandButton).toBeInTheDocument();
-
- expect(screen.getByText('region-east-africa')).toBeInTheDocument();
- expect(screen.getByText('region-west-africa')).toBeInTheDocument();
- // expand button not clicked, don't expect this label to shown
- expect(screen.queryByText('region-south-africa')).not.toBeInTheDocument();
- });
-
- it('omits label if labels are not set', () => {
- render(
-
-
- ,
- );
-
- expect(screen.queryByText('region-east-africa')).not.toBeInTheDocument();
- });
-});
diff --git a/src/collections/components/ChipLabelsList/ChipLabelsList.tsx b/src/collections/components/ChipLabelsList/ChipLabelsList.tsx
deleted file mode 100644
index 9aa6b29f7..000000000
--- a/src/collections/components/ChipLabelsList/ChipLabelsList.tsx
+++ /dev/null
@@ -1,119 +0,0 @@
-import React, { useState } from 'react';
-import { Button, Collapse } from '@mui/material';
-import LabelOutlinedIcon from '@mui/icons-material/LabelOutlined';
-import ExpandLess from '@mui/icons-material/ExpandLess';
-import ExpandMore from '@mui/icons-material/ExpandMore';
-
-import { Collection } from '../../../api/generatedTypes';
-import { StyledChipComponent } from '../../../_shared/styled';
-
-interface ChipLabelsListProps {
- /**
- * An object with everything collection-related in it.
- * Except for stories.
- */
- collection: Omit;
-
- /**
- * Boolean flag whether or not enable the onClick event.
- * */
- enableOnClick: boolean;
-}
-
-/**
- * A custom styled chip label list component to display labels and expand more/less button.
- *
- * @param props
- */
-export const ChipLabelsList: React.FC = (props) => {
- const { collection, enableOnClick } = props;
-
- // expand more/less button state
- const [expandButtonToggled, setExpandButtonToggle] = useState(true);
-
- // onMouseDown event is used when pressing the mouse button on the expand button.
- // this event is needed in order to fire logic as soon as the mouse is pressed, instead of waiting for the full click.
- const handleMouseDown = (event: React.MouseEvent) => {
- event.preventDefault();
- // invert
- setExpandButtonToggle(!expandButtonToggled);
- };
-
- // onClick event fires after a full click on a button. This event is also needed
- // to prevent the clickable collection card component to fire its chain of reactions
- // having both onMouseDown & onClick events allows to control the button inside a clickable
- // component
- const handleClick = (event: React.MouseEvent) => {
- event.preventDefault();
- setExpandButtonToggle(expandButtonToggled);
- };
-
- return (
-
- {/* display only the first two labels if label length > 2*/}
- {collection.labels &&
- collection.labels.length > 2 && [
- collection.labels.slice(0, 2).map((data) => {
- return (
-
- }
- />{' '}
-
- );
- }),
- : }
- >
- {expandButtonToggled
- ? '+ ' + collection.labels.slice(2).length
- : ''}
- ,
- ,
- ,
-
- {/* display the rest of the labels under the expand button*/}
- {collection.labels.slice(2).map((data) => {
- return (
-
- }
- />{' '}
-
- );
- })}
- ,
- ]}{' '}
- {/* display labels where length <= 2*/}
- {collection.labels &&
- collection.labels.length <= 2 &&
- collection.labels.map((data) => {
- return (
-
- }
- />{' '}
-
- );
- })}
-
- );
-};
diff --git a/src/collections/components/CollectionForm/CollectionForm.test.tsx b/src/collections/components/CollectionForm/CollectionForm.test.tsx
deleted file mode 100644
index bff3924c7..000000000
--- a/src/collections/components/CollectionForm/CollectionForm.test.tsx
+++ /dev/null
@@ -1,426 +0,0 @@
-import React from 'react';
-import { render, screen, waitFor } from '@testing-library/react';
-import userEvent from '@testing-library/user-event';
-import { CollectionForm } from './CollectionForm';
-import {
- Collection,
- CollectionAuthor,
- CollectionLanguage,
- CollectionStatus,
- CurationCategory,
- IabParentCategory,
- Label,
-} from '../../../api/generatedTypes';
-
-describe('The CollectionForm component', () => {
- let collection: Omit;
- let authors: CollectionAuthor[];
- let curationCategories: CurationCategory[];
- let iabCategories: IabParentCategory[];
- let labels: Label[];
- let languages: CollectionLanguage[];
- const handleSubmit = jest.fn();
-
- // This test suite occasionally takes forever to run on a local machine
- jest.setTimeout(10000);
-
- beforeEach(() => {
- collection = {
- externalId: '124abc',
- title: 'Collection of Collections',
- slug: 'collection-of-collections',
- imageUrl: 'http://placeimg.com/640/480/nature?random=494',
- excerpt:
- 'Incidunt corrupti earum. Quasi aut qui magnam eum. ' +
- 'Quia non dolores voluptatem est aut. Id officiis nulla est.\n \r' +
- 'Harum et velit debitis. Quia assumenda commodi et dolor. ',
- intro:
- ' Lorem ipsum dolor sit amet, consectetur adipiscing elit. ' +
- 'Nulla sed ultricies odio. Ut egestas urna neque, nec viverra risus' +
- ' egestas id. Nulla eget felis quis enim blandit vehicula. Donec ac ' +
- 'semper diam. Aenean eu sapien ornare, venenatis metus a, euismod metus.' +
- ' Maecenas ullamcorper, nunc eu rhoncus luctus, ante augue lobortis nisi,' +
- ' eu imperdiet est nisi non sapien. Pellentesque habitant morbi tristique' +
- ' senectus et netus et malesuada fames ac turpis egestas.\n' +
- '\n' +
- 'Etiam vel maximus diam, hendrerit egestas augue. Etiam vel tincidunt ' +
- 'mauris. Duis et elit quis nisl commodo sodales ut at dui. Aenean blandit' +
- ' pellentesque aliquam. Mauris nec hendrerit lacus, et ultricies magna.' +
- ' Praesent hendrerit eros luctus ligula facilisis, non sodales est ' +
- 'suscipit. Nunc a lorem a metus venenatis euismod. Praesent id lectus' +
- ' lobortis, ullamcorper ipsum in, eleifend sapien.',
- language: CollectionLanguage.De,
- status: CollectionStatus.Draft,
- authors: [],
- curationCategory: { externalId: 'cde-234', name: 'Food', slug: 'food' },
- };
-
- authors = [
- {
- externalId: '123abc',
- name: 'Nigel Rutherford',
- slug: 'nigel-rutherford',
- imageUrl: 'http://placeimg.com/640/480/people?random=494',
- bio:
- 'Incidunt corrupti earum. Quasi aut qui magnam eum. ' +
- 'Quia non dolores voluptatem est aut. Id officiis nulla est.\n \r' +
- 'Harum et velit debitis. Quia assumenda commodi et dolor. ' +
- 'Ut dicta veritatis perspiciatis suscipit. ' +
- 'Aspernatur reprehenderit laboriosam voluptates ut. Ut minus aut est.',
- active: true,
- },
- ];
-
- curationCategories = [
- {
- externalId: 'abc-123',
- name: 'Business',
- slug: 'business',
- },
- { externalId: 'cde-234', name: 'Food', slug: 'food' },
- ];
-
- iabCategories = [
- {
- externalId: 'abc-345',
- name: 'Education',
- slug: 'education',
- children: [
- {
- externalId: '123-abc',
- name: 'Language Learning',
- slug: 'language-learning',
- },
- ],
- },
- ];
-
- labels = [
- { externalId: '345-dfg', name: 'test-label-one' },
- { externalId: '789-yui', name: 'test-label-two' },
- ];
-
- languages = Object.values(CollectionLanguage);
- });
-
- it('renders successfully', () => {
- render(
- ,
- );
-
- // there is at least a form and nothing falls over
- const form = screen.getByRole('form');
- expect(form).toBeInTheDocument();
- });
-
- it('shows six action buttons by default', () => {
- render(
- ,
- );
-
- const buttons = screen.getAllByRole('button');
-
- // The seventh button is part of the MUI Autocomplete component
- expect(buttons.length).toEqual(7);
- });
-
- it('only shows five buttons if not in edit mode', () => {
- render(
- ,
- );
-
- const buttons = screen.getAllByRole('button');
-
- // The sixth button is part of the MUI Autocomplete component
- expect(buttons.length).toEqual(6);
- });
-
- it('displays collection information', () => {
- render(
- ,
- );
-
- const titleField = screen.getByLabelText('Title');
- expect(titleField).toBeInTheDocument();
-
- const slugField = screen.getByLabelText('Slug');
- expect(slugField).toBeInTheDocument();
-
- const statusField = screen.getByLabelText('Status');
- expect(statusField).toBeInTheDocument();
-
- const languageField = screen.getByLabelText('Language Code');
- expect(languageField).toBeInTheDocument();
-
- const authorField = screen.getByLabelText('Author');
- expect(authorField).toBeInTheDocument();
-
- const excerptField = screen.getByLabelText('Excerpt');
- expect(excerptField).toBeInTheDocument();
-
- const introField = screen.getByLabelText('Intro');
- expect(introField).toBeInTheDocument();
-
- const curationCategoryField = screen.getByLabelText('Curation Category');
- expect(curationCategoryField).toBeInTheDocument();
-
- const iabParentCategoryField = screen.getByLabelText('IAB Parent Category');
- expect(iabParentCategoryField).toBeInTheDocument();
-
- const iabChildCategoryField = screen.getByLabelText('IAB Child Category');
- expect(iabChildCategoryField).toBeInTheDocument();
- });
-
- it('validates the "title" field', async () => {
- render(
- ,
- );
-
- const titleField = screen.getByLabelText(/title/i);
- const saveButton = screen.getByText(/save/i);
-
- // Submit an empty field
- userEvent.clear(titleField);
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter a title for this collection/i),
- ).toBeInTheDocument();
- expect(
- screen.queryByText(/title must be at least 6 characters/i),
- ).not.toBeInTheDocument();
-
- // Submit a collection title that is too short (under 6 characters)
- userEvent.type(titleField, 'All');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter a title for this collection/i),
- ).not.toBeInTheDocument();
- expect(
- screen.queryByText(/title must be at least 6 characters/i),
- ).toBeInTheDocument();
-
- // Submit a title that satisfies all the requirements
- userEvent.type(titleField, 'All About Standing Desks');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(
- screen.queryByText(/please enter a title for this collection/i),
- ).not.toBeInTheDocument();
- expect(
- screen.queryByText(/title must be at least 6 characters/i),
- ).not.toBeInTheDocument();
- });
-
- it('validates the "slug" field', async () => {
- render(
- ,
- );
-
- const slugField = screen.getByLabelText(/slug/i);
- const saveButton = screen.getByText(/save/i);
-
- // Submit an empty field
- userEvent.clear(slugField);
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 6 characters/i),
- ).not.toBeInTheDocument();
-
- // Submit a slug that is too short (under 6 characters)
- userEvent.type(slugField, 'q-bee');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).not.toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 6 characters/i),
- ).toBeInTheDocument();
-
- // Submit a slug that satisfies all the requirements
- userEvent.type(slugField, 'queen-bee');
- await waitFor(() => {
- userEvent.click(saveButton);
- });
- expect(screen.queryByText(/please enter a slug/i)).not.toBeInTheDocument();
- expect(
- screen.queryByText(/slug must be at least 6 characters/i),
- ).not.toBeInTheDocument();
- });
-
- it('suggests the slug correctly', async () => {
- render(
- ,
- );
-
- // The "Suggest slug" button slugifies whatever is present in the "Title" field
- const slugField = screen.getByLabelText(/slug/i);
- const titleField = screen.getByLabelText(/title/i);
- const suggestSlugButton = screen.getByText(/suggest slug/i);
-
- // Try with an empty field first
- userEvent.clear(slugField);
- userEvent.clear(titleField);
-
- await waitFor(() => {
- userEvent.click(suggestSlugButton);
- });
-
- // Slugify button returned an empty string
- expect(slugField).toHaveTextContent('');
-
- // Try with an actual title
- userEvent.type(titleField, 'A Very Long And Elaborate Collection Name');
-
- await waitFor(() => {
- userEvent.click(suggestSlugButton);
- });
-
- // Slugified version of the title appears in the slug input field
- expect(
- screen.getByDisplayValue('a-very-long-and-elaborate-collection-name'),
- ).toBeInTheDocument();
- });
-
- it('suggests a slug free of punctuation and other special characters', async () => {
- render(
- ,
- );
-
- const slugField = screen.getByLabelText(/slug/i);
- const titleField = screen.getByLabelText(/title/i);
- const suggestSlugButton = screen.getByText(/suggest slug/i);
-
- // Clear the fields or the user event further on will add to the input
- // rather than overwrite it
- userEvent.clear(slugField);
- userEvent.clear(titleField);
-
- userEvent.type(
- titleField,
- 'A !!!title ??? full ### of ```special~~~ chars!#@*^*#^.,;*_/',
- );
-
- await waitFor(() => {
- userEvent.click(suggestSlugButton);
- });
-
- // Get a slug that is free
- expect(
- screen.getByDisplayValue('a-title-full-of-special-chars'),
- ).toBeInTheDocument();
- });
-
- it('has markdown preview tabs on two fields', () => {
- render(
- ,
- );
-
- const writeTabs = screen.getAllByText(/write/i);
- expect(writeTabs.length).toEqual(2);
-
- const previewTabs = screen.getAllByText(/preview/i);
- expect(previewTabs.length).toEqual(2);
- });
-
- it('displays pre-existing labels for a collection', () => {
- // Let's assign the two mock labels that we have to a collection
- collection.labels = labels;
-
- render(
- ,
- );
-
- // Expect to see both of these labels on the screen
- expect(screen.getByText(labels[0].name)).toBeInTheDocument();
- expect(screen.getByText(labels[1].name)).toBeInTheDocument();
- });
-});
diff --git a/src/collections/components/CollectionForm/CollectionForm.tsx b/src/collections/components/CollectionForm/CollectionForm.tsx
deleted file mode 100644
index 4bc8e7793..000000000
--- a/src/collections/components/CollectionForm/CollectionForm.tsx
+++ /dev/null
@@ -1,443 +0,0 @@
-import React, { useState } from 'react';
-import {
- Autocomplete,
- Box,
- FormHelperText,
- Grid,
- LinearProgress,
- TextField,
-} from '@mui/material';
-import slugify from 'slugify';
-import { FormikValues, useFormik } from 'formik';
-import { FormikHelpers } from 'formik/dist/types';
-import {
- Button,
- FormikSelectField,
- FormikTextField,
- MarkdownPreview,
- SharedFormButtons,
- SharedFormButtonsProps,
-} from '../../../_shared/components';
-import { getValidationSchema } from './CollectionForm.validation';
-import { config } from '../../../config';
-import {
- Collection,
- CollectionAuthor,
- CollectionLanguage,
- CollectionStatus,
- CurationCategory,
- IabCategory,
- IabParentCategory,
- Label,
-} from '../../../api/generatedTypes';
-import { applyCurlyQuotes } from '../../../_shared/utils/applyCurlyQuotes';
-import { applyApTitleCase } from '../../../_shared/utils/applyApTitleCase';
-
-interface CollectionFormProps {
- /**
- * An object with everything collection-related in it bar stories
- */
- collection: Omit;
-
- /**
- * A list of all collection authors - for the dropdown
- */
- authors: CollectionAuthor[];
-
- /**
- * A list of curation categories
- */
- curationCategories: CurationCategory[];
-
- /**
- * A list of IAB categories
- */
- iabCategories: IabParentCategory[];
-
- /**
- * A list of available labels
- */
- labels: Label[];
-
- /**
- * A list of all supported languages
- */
- languages: CollectionLanguage[];
-
- /**
- * What do we do with the submitted data?
- *
- * Note: unlike most other onSubmit functions in this repository,
- * this one consumes the value for one field (labels) directly, circumventing
- * form validation.
- *
- * This is due to the fact that Formik cannot process objects as input values
- * while `labels` must be an array of objects in order for the MUI Autocomplete
- * component to work as intended.
- */
- onSubmit: (
- values: FormikValues,
- formikHelpers: FormikHelpers,
- labels: Label[],
- ) => void | Promise;
-}
-
-/**
- * A form for adding authors or editing information for existing authors
- */
-export const CollectionForm: React.FC<
- CollectionFormProps & SharedFormButtonsProps
-> = (props): JSX.Element => {
- const {
- authors,
- collection,
- curationCategories,
- iabCategories,
- labels,
- languages,
- onSubmit,
- editMode = true,
- onCancel,
- } = props;
-
- // get a list of author ids for the validation schema
- const authorIds = authors.map((author: CollectionAuthor) => {
- return author.externalId;
- });
-
- // if we're editing, grab the currently assigned author's external id
- const authorExternalId =
- collection.authors.length > 0 ? collection.authors[0].externalId : '';
-
- // pull out external ids of all the available labels in a separate variable
- const availableLabelExternalIds = labels.map((label) => label.externalId);
-
- // If this collection has any labels, let's keep track of them here
- // to be able to show them in the form correctly
- const [selectedLabels, setSelectedLabels] = useState