From 99599973ad620cd23d194ed9aae974bb4f712922 Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Wed, 31 Jan 2024 12:44:59 -0800 Subject: [PATCH 1/3] Initial Frontend Commit Signed-off-by: Russell Troxel --- frontend/.eslintrc.cjs | 18 + frontend/.gitignore | 24 + frontend/.vite/deps/_metadata.json | 8 + frontend/.vite/deps/package.json | 3 + frontend/README.md | 30 + frontend/index.html | 12 + frontend/package.json | 35 + frontend/pnpm-lock.yaml | 2518 ++++++++++++++++++++++ frontend/postcss.config.js | 6 + frontend/public/.gitkeep | 0 frontend/src/assets/.gitkeep | 0 frontend/src/hooks/useToken.ts | 0 frontend/src/index.css | 15 + frontend/src/main.tsx | 28 + frontend/src/routeTree.gen.ts | 78 + frontend/src/routes/__root.tsx | 11 + frontend/src/routes/_layout.layout-a.tsx | 9 + frontend/src/routes/_layout.tsx | 14 + frontend/src/routes/about.lazy.tsx | 9 + frontend/src/routes/index.lazy.tsx | 11 + frontend/src/routes/login.lazy.tsx | 184 ++ frontend/src/vite-env.d.ts | 1 + frontend/tailwind.config.js | 65 + frontend/tsconfig.json | 25 + frontend/tsconfig.node.json | 10 + frontend/vite.config.ts | 11 + 26 files changed, 3125 insertions(+) create mode 100644 frontend/.eslintrc.cjs create mode 100644 frontend/.gitignore create mode 100644 frontend/.vite/deps/_metadata.json create mode 100644 frontend/.vite/deps/package.json create mode 100644 frontend/README.md create mode 100644 frontend/index.html create mode 100644 frontend/package.json create mode 100644 frontend/pnpm-lock.yaml create mode 100644 frontend/postcss.config.js create mode 100644 frontend/public/.gitkeep create mode 100644 frontend/src/assets/.gitkeep create mode 100644 frontend/src/hooks/useToken.ts create mode 100644 frontend/src/index.css create mode 100644 frontend/src/main.tsx create mode 100644 frontend/src/routeTree.gen.ts create mode 100644 frontend/src/routes/__root.tsx create mode 100644 frontend/src/routes/_layout.layout-a.tsx create mode 100644 frontend/src/routes/_layout.tsx create mode 100644 frontend/src/routes/about.lazy.tsx create mode 100644 frontend/src/routes/index.lazy.tsx create mode 100644 frontend/src/routes/login.lazy.tsx create mode 100644 frontend/src/vite-env.d.ts create mode 100644 frontend/tailwind.config.js create mode 100644 frontend/tsconfig.json create mode 100644 frontend/tsconfig.node.json create mode 100644 frontend/vite.config.ts diff --git a/frontend/.eslintrc.cjs b/frontend/.eslintrc.cjs new file mode 100644 index 00000000..d6c95379 --- /dev/null +++ b/frontend/.eslintrc.cjs @@ -0,0 +1,18 @@ +module.exports = { + root: true, + env: { browser: true, es2020: true }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', + ], + ignorePatterns: ['dist', '.eslintrc.cjs'], + parser: '@typescript-eslint/parser', + plugins: ['react-refresh'], + rules: { + 'react-refresh/only-export-components': [ + 'warn', + { allowConstantExport: true }, + ], + }, +} diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/.vite/deps/_metadata.json b/frontend/.vite/deps/_metadata.json new file mode 100644 index 00000000..5e5b4c94 --- /dev/null +++ b/frontend/.vite/deps/_metadata.json @@ -0,0 +1,8 @@ +{ + "hash": "75f588e2", + "configHash": "f6f02ffb", + "lockfileHash": "e3b0c442", + "browserHash": "729aa610", + "optimized": {}, + "chunks": {} +} \ No newline at end of file diff --git a/frontend/.vite/deps/package.json b/frontend/.vite/deps/package.json new file mode 100644 index 00000000..3dbc1ca5 --- /dev/null +++ b/frontend/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 00000000..0d6babed --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,30 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh + +## Expanding the ESLint configuration + +If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: + +- Configure the top-level `parserOptions` property like this: + +```js +export default { + // other rules... + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + project: ['./tsconfig.json', './tsconfig.node.json'], + tsconfigRootDir: __dirname, + }, +} +``` + +- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` +- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` +- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 00000000..7852d41d --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,12 @@ + + + + + + Vite + React + TS + + +
+ + + diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 00000000..474f2538 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,35 @@ +{ + "name": "frontend", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc && vite build", + "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "preview": "vite preview" + }, + "dependencies": { + "@tanstack/react-router": "^1.12.12", + "react": "^18.2.0", + "react-dom": "^18.2.0", + "react-icons": "^5.0.1" + }, + "devDependencies": { + "@tanstack/router-devtools": "^1.12.13", + "@tanstack/router-vite-plugin": "^1.12.8", + "@types/react": "^18.2.43", + "@types/react-dom": "^18.2.17", + "@typescript-eslint/eslint-plugin": "^6.14.0", + "@typescript-eslint/parser": "^6.14.0", + "@vitejs/plugin-react": "^4.2.1", + "autoprefixer": "^10.4.17", + "eslint": "^8.55.0", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-react-refresh": "^0.4.5", + "postcss": "^8.4.33", + "tailwindcss": "^3.4.1", + "typescript": "^5.2.2", + "vite": "^5.0.8" + } +} diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml new file mode 100644 index 00000000..9be208a3 --- /dev/null +++ b/frontend/pnpm-lock.yaml @@ -0,0 +1,2518 @@ +lockfileVersion: '6.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +dependencies: + '@tanstack/react-router': + specifier: ^1.12.12 + version: 1.12.12(react-dom@18.2.0)(react@18.2.0) + react: + specifier: ^18.2.0 + version: 18.2.0 + react-dom: + specifier: ^18.2.0 + version: 18.2.0(react@18.2.0) + react-icons: + specifier: ^5.0.1 + version: 5.0.1(react@18.2.0) + +devDependencies: + '@tanstack/router-devtools': + specifier: ^1.12.13 + version: 1.12.13(react-dom@18.2.0)(react@18.2.0) + '@tanstack/router-vite-plugin': + specifier: ^1.12.8 + version: 1.12.8 + '@types/react': + specifier: ^18.2.43 + version: 18.2.48 + '@types/react-dom': + specifier: ^18.2.17 + version: 18.2.18 + '@typescript-eslint/eslint-plugin': + specifier: ^6.14.0 + version: 6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': + specifier: ^6.14.0 + version: 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@vitejs/plugin-react': + specifier: ^4.2.1 + version: 4.2.1(vite@5.0.12) + autoprefixer: + specifier: ^10.4.17 + version: 10.4.17(postcss@8.4.33) + eslint: + specifier: ^8.55.0 + version: 8.56.0 + eslint-plugin-react-hooks: + specifier: ^4.6.0 + version: 4.6.0(eslint@8.56.0) + eslint-plugin-react-refresh: + specifier: ^0.4.5 + version: 0.4.5(eslint@8.56.0) + postcss: + specifier: ^8.4.33 + version: 8.4.33 + tailwindcss: + specifier: ^3.4.1 + version: 3.4.1 + typescript: + specifier: ^5.2.2 + version: 5.3.3 + vite: + specifier: ^5.0.8 + version: 5.0.12 + +packages: + + /@aashutoshrathi/word-wrap@1.2.6: + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + dev: true + + /@alloc/quick-lru@5.2.0: + resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} + engines: {node: '>=10'} + dev: true + + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.22 + dev: true + + /@babel/code-frame@7.23.5: + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.23.4 + chalk: 2.4.2 + dev: true + + /@babel/compat-data@7.23.5: + resolution: {integrity: sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/core@7.23.9: + resolution: {integrity: sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) + '@babel/helpers': 7.23.9 + '@babel/parser': 7.23.9 + '@babel/template': 7.23.9 + '@babel/traverse': 7.23.9 + '@babel/types': 7.23.9 + convert-source-map: 2.0.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/generator@7.23.6: + resolution: {integrity: sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.22 + jsesc: 2.5.2 + dev: true + + /@babel/helper-compilation-targets@7.23.6: + resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/compat-data': 7.23.5 + '@babel/helper-validator-option': 7.23.5 + browserslist: 4.22.3 + lru-cache: 5.1.1 + semver: 6.3.1 + dev: true + + /@babel/helper-environment-visitor@7.22.20: + resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-function-name@7.23.0: + resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.23.9 + '@babel/types': 7.23.9 + dev: true + + /@babel/helper-hoist-variables@7.22.5: + resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@babel/helper-module-imports@7.22.15: + resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + dev: true + + /@babel/helper-plugin-utils@7.22.5: + resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-simple-access@7.22.5: + resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@babel/helper-string-parser@7.23.4: + resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-identifier@7.22.20: + resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-option@7.23.5: + resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers@7.23.9: + resolution: {integrity: sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.23.9 + '@babel/traverse': 7.23.9 + '@babel/types': 7.23.9 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/highlight@7.23.4: + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/parser@7.23.9: + resolution: {integrity: sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@babel/plugin-transform-react-jsx-self@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-react-jsx-source@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-91RS0MDnAWDNvGC6Wio5XYkyWI39FMFO+JK9+4AlgaTH+yWwVTsw7/sn6LK0lH7c5F+TFkpv/3LfCJ1Ydwof/g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/runtime@7.23.9: + resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: true + + /@babel/template@7.23.9: + resolution: {integrity: sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/parser': 7.23.9 + '@babel/types': 7.23.9 + dev: true + + /@babel/traverse@7.23.9: + resolution: {integrity: sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.23.5 + '@babel/generator': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/parser': 7.23.9 + '@babel/types': 7.23.9 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/types@7.23.9: + resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.23.4 + '@babel/helper-validator-identifier': 7.22.20 + to-fast-properties: 2.0.0 + dev: true + + /@esbuild/aix-ppc64@0.19.12: + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm64@0.19.12: + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.19.12: + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.19.12: + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.19.12: + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.19.12: + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.19.12: + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.19.12: + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.19.12: + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.19.12: + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.19.12: + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.19.12: + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.19.12: + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.19.12: + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.56.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.0 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} + engines: {node: '>=10.10.0'} + dependencies: + '@humanwhocodes/object-schema': 2.0.2 + debug: 4.3.4 + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@humanwhocodes/module-importer@1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + dev: true + + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 + dev: true + + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.22 + dev: true + + /@jridgewell/resolve-uri@3.1.1: + resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.22: + resolution: {integrity: sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.17.0 + dev: true + + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm-eabi@4.9.6: + resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-android-arm64@4.9.6: + resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-arm64@4.9.6: + resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-darwin-x64@4.9.6: + resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm-gnueabihf@4.9.6: + resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-gnu@4.9.6: + resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-arm64-musl@4.9.6: + resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.9.6: + resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.9.6: + resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-musl@4.9.6: + resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-arm64-msvc@4.9.6: + resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-ia32-msvc@4.9.6: + resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-win32-x64-msvc@4.9.6: + resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@tanstack/history@1.8.0: + resolution: {integrity: sha512-RPukIMPedYLs3XySxcsD2PUAYnRh2GR1dKix/Rlaf8iIdl+fKH7nuX/V0+vYv7pSJZ6m/a/zmsX3Rm4xSyVB7g==} + engines: {node: '>=12'} + + /@tanstack/react-router@1.12.12(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-NAKWrwcJY18kUI6EkdoRXix6FcuDZ75ZRPKnx5MKJBYZj0FlzbKSxxAwwWFEwkKUS4mD6+O8+ifq1cwVr/RibQ==} + engines: {node: '>=12'} + peerDependencies: + react: '>=16' + react-dom: '>=16' + dependencies: + '@tanstack/history': 1.8.0 + '@tanstack/react-store': 0.2.1(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tiny-invariant: 1.3.1 + tiny-warning: 1.0.3 + + /@tanstack/react-store@0.2.1(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-tEbMCQjbeVw9KOP/202LfqZMSNAVi6zYkkp1kBom8nFuMx/965Hzes3+6G6b/comCwVxoJU8Gg9IrcF8yRPthw==} + peerDependencies: + react: '>=16' + react-dom: '>=16' + dependencies: + '@tanstack/store': 0.1.3 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + use-sync-external-store: 1.2.0(react@18.2.0) + + /@tanstack/router-devtools@1.12.13(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-NAMZnGbMJuYdYflU4khZUwPxPZh/iOBwZyb2WRaCCtxZO5RuGFZ9ciWuyPVye9xs8XiMimDQWQgoTzCLnYlLKQ==} + engines: {node: '>=12'} + peerDependencies: + react: '>=16' + react-dom: '>=16' + dependencies: + '@tanstack/react-router': 1.12.12(react-dom@18.2.0)(react@18.2.0) + date-fns: 2.30.0 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: true + + /@tanstack/router-generator@1.12.8: + resolution: {integrity: sha512-3fzIvp3BfKADX47WWLUCK9CmaIiVPXINXzSbFGzTlQxz5q7mLe0TrhQlN9ecyEnbCon3sLaIkVfFy4zzftpJQw==} + engines: {node: '>=12'} + dependencies: + prettier: 3.2.4 + zod: 3.22.4 + dev: true + + /@tanstack/router-vite-plugin@1.12.8: + resolution: {integrity: sha512-Ulidp2xZaGjooRqew8zEqz+v1Ed6HOVv/GKjzsgn+s0sxZ4Kw5Ey1QqrjYqejRfURWnars01rSwpkL5NlSFYxg==} + engines: {node: '>=12'} + dependencies: + '@tanstack/router-generator': 1.12.8 + dev: true + + /@tanstack/store@0.1.3: + resolution: {integrity: sha512-GnolmC8Fr4mvsHE1fGQmR3Nm0eBO3KnZjDU0a+P3TeQNM/dDscFGxtA7p31NplQNW3KwBw4t1RVFmz0VeKLxcw==} + + /@types/babel__core@7.20.5: + resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + dependencies: + '@babel/parser': 7.23.9 + '@babel/types': 7.23.9 + '@types/babel__generator': 7.6.8 + '@types/babel__template': 7.4.4 + '@types/babel__traverse': 7.20.5 + dev: true + + /@types/babel__generator@7.6.8: + resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@types/babel__template@7.4.4: + resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + dependencies: + '@babel/parser': 7.23.9 + '@babel/types': 7.23.9 + dev: true + + /@types/babel__traverse@7.20.5: + resolution: {integrity: sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==} + dependencies: + '@babel/types': 7.23.9 + dev: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + + /@types/json-schema@7.0.15: + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + dev: true + + /@types/prop-types@15.7.11: + resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} + dev: true + + /@types/react-dom@18.2.18: + resolution: {integrity: sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==} + dependencies: + '@types/react': 18.2.48 + dev: true + + /@types/react@18.2.48: + resolution: {integrity: sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==} + dependencies: + '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.8 + csstype: 3.1.3 + dev: true + + /@types/scheduler@0.16.8: + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + dev: true + + /@types/semver@7.5.6: + resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} + dev: true + + /@typescript-eslint/eslint-plugin@6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/type-utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + eslint: 8.56.0 + graphemer: 1.4.0 + ignore: 5.3.0 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + eslint: 8.56.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/scope-manager@6.19.1: + resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/visitor-keys': 6.19.1 + dev: true + + /@typescript-eslint/type-utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + debug: 4.3.4 + eslint: 8.56.0 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/types@6.19.1: + resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3): + resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/visitor-keys': 6.19.1 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + + /@typescript-eslint/utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.19.1 + '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + eslint: 8.56.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@typescript-eslint/visitor-keys@6.19.1: + resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.19.1 + eslint-visitor-keys: 3.4.3 + dev: true + + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + + /@vitejs/plugin-react@4.2.1(vite@5.0.12): + resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 || ^5.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/plugin-transform-react-jsx-self': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.0 + vite: 5.0.12 + transitivePeerDependencies: + - supports-color + dev: true + + /acorn-jsx@5.3.2(acorn@8.11.3): + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + dependencies: + acorn: 8.11.3 + dev: true + + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + engines: {node: '>=0.4.0'} + hasBin: true + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: true + + /ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /autoprefixer@10.4.17(postcss@8.4.33): + resolution: {integrity: sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==} + engines: {node: ^10 || ^12 || >=14} + hasBin: true + peerDependencies: + postcss: ^8.1.0 + dependencies: + browserslist: 4.22.3 + caniuse-lite: 1.0.30001580 + fraction.js: 4.3.7 + normalize-range: 0.1.2 + picocolors: 1.0.0 + postcss: 8.4.33 + postcss-value-parser: 4.2.0 + dev: true + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /browserslist@4.22.3: + resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001580 + electron-to-chromium: 1.4.648 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.3) + dev: true + + /callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + dev: true + + /camelcase-css@2.0.1: + resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} + engines: {node: '>= 6'} + dev: true + + /caniuse-lite@1.0.30001580: + resolution: {integrity: sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==} + dev: true + + /chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chokidar@3.5.3: + resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + dev: true + + /date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + dependencies: + '@babel/runtime': 7.23.9 + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + dev: true + + /deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + dev: true + + /didyoumean@1.2.2: + resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /dlv@1.1.3: + resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} + dev: true + + /doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} + dependencies: + esutils: 2.0.3 + dev: true + + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + + /electron-to-chromium@1.4.648: + resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==} + dev: true + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + dev: true + + /esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + dev: true + + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + dev: true + + /eslint-plugin-react-hooks@4.6.0(eslint@8.56.0): + resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-plugin-react-refresh@0.4.5(eslint@8.56.0): + resolution: {integrity: sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==} + peerDependencies: + eslint: '>=7' + dependencies: + eslint: 8.56.0 + dev: true + + /eslint-scope@7.2.2: + resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + dev: true + + /eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + hasBin: true + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.56.0 + '@humanwhocodes/config-array': 0.11.14 + '@humanwhocodes/module-importer': 1.0.1 + '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.3 + debug: 4.3.4 + doctrine: 3.0.0 + escape-string-regexp: 4.0.0 + eslint-scope: 7.2.2 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + esquery: 1.5.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 6.0.1 + find-up: 5.0.0 + glob-parent: 6.0.2 + globals: 13.24.0 + graphemer: 1.4.0 + ignore: 5.3.0 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + is-path-inside: 3.0.3 + js-yaml: 4.1.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.3 + strip-ansi: 6.0.1 + text-table: 0.2.0 + transitivePeerDependencies: + - supports-color + dev: true + + /espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 + dev: true + + /esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + engines: {node: '>=0.10'} + dependencies: + estraverse: 5.3.0 + dev: true + + /esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + dependencies: + estraverse: 5.3.0 + dev: true + + /estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + dev: true + + /esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.3.2: + resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + dev: true + + /fastq@1.17.0: + resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} + dependencies: + reusify: 1.0.4 + dev: true + + /file-entry-cache@6.0.1: + resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flat-cache: 3.2.0 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + dev: true + + /flat-cache@3.2.0: + resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} + engines: {node: ^10.12.0 || >=12.0.0} + dependencies: + flatted: 3.2.9 + keyv: 4.5.4 + rimraf: 3.0.2 + dev: true + + /flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + dev: true + + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + + /fraction.js@4.3.7: + resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} + dev: true + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + dev: true + + /gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: true + + /glob@7.2.3: + resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + dev: true + + /globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.2 + ignore: 5.3.0 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + dev: true + + /has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /hasown@2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} + dependencies: + function-bind: 1.1.2 + dev: true + + /ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} + engines: {node: '>= 4'} + dev: true + + /import-fresh@3.3.0: + resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} + engines: {node: '>=6'} + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + + /imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + dev: true + + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + dependencies: + hasown: 2.0.0 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-path-inside@3.0.3: + resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} + engines: {node: '>=8'} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + + /jiti@1.21.0: + resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} + hasBin: true + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /jsesc@2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + dev: true + + /json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: true + + /levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + + /lilconfig@3.0.0: + resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} + engines: {node: '>=14'} + dev: true + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + + /locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + dependencies: + p-locate: 5.0.0 + dev: true + + /lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + dev: true + + /loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + + /lru-cache@10.2.0: + resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} + engines: {node: 14 || >=16.14} + dev: true + + /lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + dependencies: + yallist: 3.1.1 + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@9.0.3: + resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true + + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + + /node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + dev: true + + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /normalize-range@0.1.2: + resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} + engines: {node: '>=0.10.0'} + dev: true + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + dev: true + + /object-hash@3.0.0: + resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} + engines: {node: '>= 6'} + dev: true + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + engines: {node: '>= 0.8.0'} + dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.2.0 + minipass: 7.0.4 + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pify@2.3.0: + resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} + engines: {node: '>=0.10.0'} + dev: true + + /pirates@4.0.6: + resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} + engines: {node: '>= 6'} + dev: true + + /postcss-import@15.1.0(postcss@8.4.33): + resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} + engines: {node: '>=14.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.33 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + + /postcss-js@4.0.1(postcss@8.4.33): + resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} + engines: {node: ^12 || ^14 || >= 16} + peerDependencies: + postcss: ^8.4.21 + dependencies: + camelcase-css: 2.0.1 + postcss: 8.4.33 + dev: true + + /postcss-load-config@4.0.2(postcss@8.4.33): + resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} + engines: {node: '>= 14'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 3.0.0 + postcss: 8.4.33 + yaml: 2.3.4 + dev: true + + /postcss-nested@6.0.1(postcss@8.4.33): + resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + dependencies: + postcss: 8.4.33 + postcss-selector-parser: 6.0.15 + dev: true + + /postcss-selector-parser@6.0.15: + resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==} + engines: {node: '>=4'} + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 + dev: true + + /postcss-value-parser@4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: true + + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + + /prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + dev: true + + /prettier@3.2.4: + resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} + engines: {node: '>=14'} + hasBin: true + dev: true + + /punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + dev: true + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /react-dom@18.2.0(react@18.2.0): + resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} + peerDependencies: + react: ^18.2.0 + dependencies: + loose-envify: 1.4.0 + react: 18.2.0 + scheduler: 0.23.0 + + /react-icons@5.0.1(react@18.2.0): + resolution: {integrity: sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==} + peerDependencies: + react: '*' + dependencies: + react: 18.2.0 + dev: false + + /react-refresh@0.14.0: + resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} + engines: {node: '>=0.10.0'} + dev: true + + /react@18.2.0: + resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + + /read-cache@1.0.0: + resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + dependencies: + pify: 2.3.0 + dev: true + + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + dev: true + + /resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + dev: true + + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rimraf@3.0.2: + resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + hasBin: true + dependencies: + glob: 7.2.3 + dev: true + + /rollup@4.9.6: + resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + dependencies: + '@types/estree': 1.0.5 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.9.6 + '@rollup/rollup-android-arm64': 4.9.6 + '@rollup/rollup-darwin-arm64': 4.9.6 + '@rollup/rollup-darwin-x64': 4.9.6 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 + '@rollup/rollup-linux-arm64-gnu': 4.9.6 + '@rollup/rollup-linux-arm64-musl': 4.9.6 + '@rollup/rollup-linux-riscv64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-gnu': 4.9.6 + '@rollup/rollup-linux-x64-musl': 4.9.6 + '@rollup/rollup-win32-arm64-msvc': 4.9.6 + '@rollup/rollup-win32-ia32-msvc': 4.9.6 + '@rollup/rollup-win32-x64-msvc': 4.9.6 + fsevents: 2.3.3 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /scheduler@0.23.0: + resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + dependencies: + loose-envify: 1.4.0 + + /semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + dev: true + + /semver@7.5.4: + resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} + dev: true + + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: true + + /strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: true + + /strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + + /sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 10.3.10 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + dev: true + + /supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + + /tailwindcss@3.4.1: + resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + '@alloc/quick-lru': 5.2.0 + arg: 5.0.2 + chokidar: 3.5.3 + didyoumean: 1.2.2 + dlv: 1.1.3 + fast-glob: 3.3.2 + glob-parent: 6.0.2 + is-glob: 4.0.3 + jiti: 1.21.0 + lilconfig: 2.1.0 + micromatch: 4.0.5 + normalize-path: 3.0.0 + object-hash: 3.0.0 + picocolors: 1.0.0 + postcss: 8.4.33 + postcss-import: 15.1.0(postcss@8.4.33) + postcss-js: 4.0.1(postcss@8.4.33) + postcss-load-config: 4.0.2(postcss@8.4.33) + postcss-nested: 6.0.1(postcss@8.4.33) + postcss-selector-parser: 6.0.15 + resolve: 1.22.8 + sucrase: 3.35.0 + transitivePeerDependencies: + - ts-node + dev: true + + /text-table@0.2.0: + resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + dev: true + + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + + /tiny-invariant@1.3.1: + resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} + + /tiny-warning@1.0.3: + resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} + + /to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /ts-api-utils@1.0.3(typescript@5.3.3): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.3.3 + dev: true + + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + + /type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + dependencies: + prelude-ls: 1.2.1 + dev: true + + /type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + dev: true + + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + + /update-browserslist-db@1.0.13(browserslist@4.22.3): + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.22.3 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.1 + dev: true + + /use-sync-external-store@1.2.0(react@18.2.0): + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /vite@5.0.12: + resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + esbuild: 0.19.12 + postcss: 8.4.33 + rollup: 4.9.6 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + dev: true + + /yaml@2.3.4: + resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} + engines: {node: '>= 14'} + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true + + /zod@3.22.4: + resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} + dev: true diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js new file mode 100644 index 00000000..2e7af2b7 --- /dev/null +++ b/frontend/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/frontend/public/.gitkeep b/frontend/public/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/assets/.gitkeep b/frontend/src/assets/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/hooks/useToken.ts b/frontend/src/hooks/useToken.ts new file mode 100644 index 00000000..e69de29b diff --git a/frontend/src/index.css b/frontend/src/index.css new file mode 100644 index 00000000..310edf6c --- /dev/null +++ b/frontend/src/index.css @@ -0,0 +1,15 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +@import url("https://fonts.googleapis.com/css2?family=Merriweather"); +@import url("https://fonts.googleapis.com/css2?family=Lato"); + +::selection { + @apply bg-primary-500; +} + +body { + @apply bg-dark-500; + @apply text-light-500; +} diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx new file mode 100644 index 00000000..ae308155 --- /dev/null +++ b/frontend/src/main.tsx @@ -0,0 +1,28 @@ +import './index.css' +import { StrictMode } from "react"; +import ReactDOM from "react-dom/client"; +import { RouterProvider, createRouter } from "@tanstack/react-router"; + +// Import the generated route tree +import { routeTree } from "./routeTree.gen"; + +// Create a new router instance +const router = createRouter({ routeTree }); + +// Register the router instance for type safety +declare module "@tanstack/react-router" { + interface Register { + router: typeof router; + } +} + +// Render the app +const rootElement = document.getElementById("app")!; +if (!rootElement.innerHTML) { + const root = ReactDOM.createRoot(rootElement); + root.render( + + + + ); +} diff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.ts new file mode 100644 index 00000000..e3046927 --- /dev/null +++ b/frontend/src/routeTree.gen.ts @@ -0,0 +1,78 @@ +// This file is auto-generated by TanStack Router + +import { createFileRoute } from '@tanstack/react-router' + +// Import Routes + +import { Route as rootRoute } from './routes/__root' +import { Route as LayoutImport } from './routes/_layout' +import { Route as LayoutLayoutAImport } from './routes/_layout.layout-a' + +// Create Virtual Routes + +const LoginLazyImport = createFileRoute('/login')() +const AboutLazyImport = createFileRoute('/about')() +const IndexLazyImport = createFileRoute('/')() + +// Create/Update Routes + +const LoginLazyRoute = LoginLazyImport.update({ + path: '/login', + getParentRoute: () => rootRoute, +} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route)) + +const AboutLazyRoute = AboutLazyImport.update({ + path: '/about', + getParentRoute: () => rootRoute, +} as any).lazy(() => import('./routes/about.lazy').then((d) => d.Route)) + +const LayoutRoute = LayoutImport.update({ + id: '/_layout', + getParentRoute: () => rootRoute, +} as any) + +const IndexLazyRoute = IndexLazyImport.update({ + path: '/', + getParentRoute: () => rootRoute, +} as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route)) + +const LayoutLayoutARoute = LayoutLayoutAImport.update({ + path: '/layout-a', + getParentRoute: () => LayoutRoute, +} as any) + +// Populate the FileRoutesByPath interface + +declare module '@tanstack/react-router' { + interface FileRoutesByPath { + '/': { + preLoaderRoute: typeof IndexLazyImport + parentRoute: typeof rootRoute + } + '/_layout': { + preLoaderRoute: typeof LayoutImport + parentRoute: typeof rootRoute + } + '/about': { + preLoaderRoute: typeof AboutLazyImport + parentRoute: typeof rootRoute + } + '/login': { + preLoaderRoute: typeof LoginLazyImport + parentRoute: typeof rootRoute + } + '/_layout/layout-a': { + preLoaderRoute: typeof LayoutLayoutAImport + parentRoute: typeof LayoutImport + } + } +} + +// Create and export the route tree + +export const routeTree = rootRoute.addChildren([ + IndexLazyRoute, + LayoutRoute.addChildren([LayoutLayoutARoute]), + AboutLazyRoute, + LoginLazyRoute, +]) diff --git a/frontend/src/routes/__root.tsx b/frontend/src/routes/__root.tsx new file mode 100644 index 00000000..12c933e1 --- /dev/null +++ b/frontend/src/routes/__root.tsx @@ -0,0 +1,11 @@ +import { createRootRoute, Link, Outlet } from "@tanstack/react-router"; +import { TanStackRouterDevtools } from "@tanstack/router-devtools"; + +export const Route = createRootRoute({ + component: () => ( + <> + + + + ), +}); diff --git a/frontend/src/routes/_layout.layout-a.tsx b/frontend/src/routes/_layout.layout-a.tsx new file mode 100644 index 00000000..f0184fd9 --- /dev/null +++ b/frontend/src/routes/_layout.layout-a.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from "@tanstack/react-router"; + +export const Route = createFileRoute("/_layout/layout-a")({ + component: About, +}); + +function About() { + return

Hello from Layout A!

; +} diff --git a/frontend/src/routes/_layout.tsx b/frontend/src/routes/_layout.tsx new file mode 100644 index 00000000..34dd0658 --- /dev/null +++ b/frontend/src/routes/_layout.tsx @@ -0,0 +1,14 @@ +import { createFileRoute, Outlet } from "@tanstack/react-router"; + +export const Route = createFileRoute("/_layout")({ + component: LayoutComponent, +}); + +function LayoutComponent() { + return ( +
+

Layout

+ +
+ ); +} diff --git a/frontend/src/routes/about.lazy.tsx b/frontend/src/routes/about.lazy.tsx new file mode 100644 index 00000000..232245a6 --- /dev/null +++ b/frontend/src/routes/about.lazy.tsx @@ -0,0 +1,9 @@ +import { createLazyFileRoute } from "@tanstack/react-router"; + +export const Route = createLazyFileRoute("/about")({ + component: About, +}); + +function About() { + return

Hello from About!

; +} diff --git a/frontend/src/routes/index.lazy.tsx b/frontend/src/routes/index.lazy.tsx new file mode 100644 index 00000000..bdfa06b3 --- /dev/null +++ b/frontend/src/routes/index.lazy.tsx @@ -0,0 +1,11 @@ +import { createLazyFileRoute } from "@tanstack/react-router"; + +export const Route = createLazyFileRoute("/")({ + component: Index, +}); + +function Index() { + return ( +

Welcome Home!

+ ); +} diff --git a/frontend/src/routes/login.lazy.tsx b/frontend/src/routes/login.lazy.tsx new file mode 100644 index 00000000..1a711a57 --- /dev/null +++ b/frontend/src/routes/login.lazy.tsx @@ -0,0 +1,184 @@ +import { useState } from "react"; +import { createLazyFileRoute } from "@tanstack/react-router"; + +import { IconType } from "react-icons"; +import { FaRegEnvelope, FaRegUser } from "react-icons/fa"; +import { MdLockOutline } from "react-icons/md"; + +export const Route = createLazyFileRoute("/login")({ + component: Login, +}); + +enum ButtonColor { + Primary = 1, + Accent, +} + +interface ButtonProps { + color: ButtonColor; + children: React.ReactNode; + onClick?: () => void; +} + +function Button({ color, children, onClick }: ButtonProps) { + const onClickFunc = onClick || (() => {}); + const bgColor = + color === ButtonColor.Primary ? "bg-primary-500" : "bg-accent-500"; + const hoverColor = + color === ButtonColor.Primary + ? "hover:bg-primary-400" + : "hover:bg-accent-400"; + return ( +
+ {children} +
+ ); +} + +interface FormFieldProps { + name: string; + placeholder: string; + type: string; + Icon: IconType; +} + +function FormField({ name, placeholder, type, Icon }: FormFieldProps) { + return ( +
+ + +
+ ); +} + +interface FormProps { + children: React.ReactNode; + translate: string; + isActive: boolean; +} +function Form({ children, isActive, translate }: FormProps) { + const t = isActive ? "" : translate; + return ( +
+ {children} +
+ ); +} + +function Login() { + const [isSignIn, setIsSignIn] = useState(true); + const h = isSignIn ? "h-[600px]" : "h-[640px]"; + + return ( +
+
+
+ {/* Sign In */} +

+ Sign in to Start Reading +

+
+ + + + +
+ + + Forgot Password? + +
+
+
+

or

+
+
+ + +
+

+ Don't have an account?{" "} + setIsSignIn(false)} + > + Sign up + +

{" "} +
+ + +
+ {/* Register */} +

+ Create an Account +

+
+ + + + + +
+
+

or

+
+
+ + +
+

+ Already Registered?{" "} + setIsSignIn(true)} + > + Sign in + +

{" "} +
+ +
+
+ ); +} diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js new file mode 100644 index 00000000..bef60c41 --- /dev/null +++ b/frontend/tailwind.config.js @@ -0,0 +1,65 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], + theme: { + fontFamily: { + serif: ["Merriweather", "serif"], + sans: ["Lato", "sans-serif"], + }, + extend: { + colors: { + light: { + 100: "#fcfdfd", + 200: "#f9fbfb", + 300: "#f7f9f8", + 400: "#f4f7f6", + 500: "#f1f5f4", // default + 600: "#cfcfd0", // common grey + 700: "#919392", + 800: "#606262", + 900: "#303131", + }, + dark: { + 100: "#d4d4d5", + 200: "#a9a9ab", + 300: "#7f7d82", + 400: "#545258", + 500: "#29272e", // default + 600: "#211f25", + 700: "#19171c", + 800: "#111012", + 900: "#080809", + }, + accent: { + 100: "#fcead2", + 200: "#f9d5a5", + 300: "#f5bf78", + 400: "#f2aa4b", + 500: "#ef951e", + 600: "#bf7718", + 700: "#8f5912", + 800: "#603c0c", + 900: "#301e06", + }, + primary: { + 100: "#d3e2e2", + 200: "#a6c5c4", + 300: "#7aa9a7", + 400: "#4d8c89", + 500: "#216f6c", + 600: "#1a5956", + 700: "#144341", + 800: "#0d2c2b", + 900: "#071616", + }, + "light-accent": "#9cc1a2", + "muted-light-accent": "#a7c0ba", + success: "#3f9c58", + warning: "#bc8c20", + danger: "#f44336", + default: "#999999", + }, + }, + }, + plugins: [], +}; diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 00000000..a7fc6fbf --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "ES2020", + "useDefineForClassFields": true, + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react-jsx", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true + }, + "include": ["src"], + "references": [{ "path": "./tsconfig.node.json" }] +} diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json new file mode 100644 index 00000000..42872c59 --- /dev/null +++ b/frontend/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "composite": true, + "skipLibCheck": true, + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 00000000..badf506b --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vite' +import react from '@vitejs/plugin-react' +import { TanStackRouterVite } from '@tanstack/router-vite-plugin' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [ + react(), + TanStackRouterVite(), + ], +}) From f9e9cb4cafd7e3d8c33797818f353c175ffc9534 Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Fri, 2 Feb 2024 19:26:20 -0800 Subject: [PATCH 2/3] Working GraphQL Implementation Signed-off-by: Russell Troxel --- frontend/codegen.ts | 14 + frontend/package.json | 39 +- frontend/pnpm-lock.yaml | 3135 +++++++++++++++-- frontend/postcss.config.js | 3 +- frontend/src/components/Book.tsx | 26 + frontend/src/components/Login/Button.tsx | 29 + frontend/src/components/Login/Form.tsx | 23 + frontend/src/components/Login/FormField.tsx | 38 + frontend/src/components/Login/LoginError.tsx | 20 + frontend/src/components/Login/LoginForm.tsx | 120 + .../src/components/Login/RegisterForm.tsx | 73 + frontend/src/context/AuthProvider.tsx | 169 + frontend/src/context/GraphQLProvider.tsx | 28 + frontend/src/gql/fragment-masking.ts | 66 + frontend/src/gql/gql.ts | 47 + frontend/src/gql/graphql.ts | 2181 ++++++++++++ frontend/src/gql/index.ts | 2 + frontend/src/hooks/useDebounce.ts | 28 + frontend/src/hooks/useToken.ts | 100 + frontend/src/index.css | 10 +- frontend/src/main.tsx | 33 +- frontend/src/routeTree.gen.ts | 46 +- frontend/src/routes/__root.tsx | 13 +- frontend/src/routes/about.lazy.tsx | 9 - frontend/src/routes/about.tsx | 50 + frontend/src/routes/books.tsx | 51 + frontend/src/routes/index.lazy.tsx | 11 - frontend/src/routes/index.tsx | 40 + frontend/src/routes/login.lazy.tsx | 184 - frontend/src/routes/login.tsx | 62 + frontend/tailwind.config.js | 36 +- frontend/vite.config.ts | 13 +- internal/commands/root.go | 2 + internal/config/config.go | 8 + internal/config/config_test.go | 9 + internal/handler/auth.go | 3 +- internal/handler/web.go | 66 + 37 files changed, 6326 insertions(+), 461 deletions(-) create mode 100644 frontend/codegen.ts create mode 100644 frontend/src/components/Book.tsx create mode 100644 frontend/src/components/Login/Button.tsx create mode 100644 frontend/src/components/Login/Form.tsx create mode 100644 frontend/src/components/Login/FormField.tsx create mode 100644 frontend/src/components/Login/LoginError.tsx create mode 100644 frontend/src/components/Login/LoginForm.tsx create mode 100644 frontend/src/components/Login/RegisterForm.tsx create mode 100644 frontend/src/context/AuthProvider.tsx create mode 100644 frontend/src/context/GraphQLProvider.tsx create mode 100644 frontend/src/gql/fragment-masking.ts create mode 100644 frontend/src/gql/gql.ts create mode 100644 frontend/src/gql/graphql.ts create mode 100644 frontend/src/gql/index.ts create mode 100644 frontend/src/hooks/useDebounce.ts delete mode 100644 frontend/src/routes/about.lazy.tsx create mode 100644 frontend/src/routes/about.tsx create mode 100644 frontend/src/routes/books.tsx delete mode 100644 frontend/src/routes/index.lazy.tsx create mode 100644 frontend/src/routes/index.tsx delete mode 100644 frontend/src/routes/login.lazy.tsx create mode 100644 frontend/src/routes/login.tsx create mode 100644 internal/handler/web.go diff --git a/frontend/codegen.ts b/frontend/codegen.ts new file mode 100644 index 00000000..09f3a209 --- /dev/null +++ b/frontend/codegen.ts @@ -0,0 +1,14 @@ +import { CodegenConfig } from "@graphql-codegen/cli"; + +const config: CodegenConfig = { + schema: "../internal/graph/*.graphql", + documents: ["src/**/*.tsx"], + ignoreNoDocuments: true, // for better experience with the watcher + generates: { + "./src/gql/": { + preset: "client", + }, + }, +}; + +export default config; diff --git a/frontend/package.json b/frontend/package.json index 474f2538..1037cb0f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,31 +5,48 @@ "type": "module", "scripts": { "dev": "vite", + "build-watch": "tsc && vite build --watch", "build": "tsc && vite build", + "watch-all": "concurrently \"pnpm build-watch\" \"pnpm generate -- --watch\"", + "generate": "pnpm graphql-codegen", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview" }, "dependencies": { - "@tanstack/react-router": "^1.12.12", + "@graphql-typed-document-node/core": "^3.2.0", + "@tanstack/react-query": "^5.18.1", + "@tanstack/react-router": "^1.15.13", + "@tanstack/router-cli": "^1.15.10", + "graphql": "^16.8.1", + "graphql-request": "^6.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-icons": "^5.0.1" + "react-icons": "^5.0.1", + "react-intersection-observer": "^9.6.0", + "unstated-next": "^1.1.0", + "zod": "^3.22.4" }, "devDependencies": { - "@tanstack/router-devtools": "^1.12.13", - "@tanstack/router-vite-plugin": "^1.12.8", - "@types/react": "^18.2.43", - "@types/react-dom": "^18.2.17", - "@typescript-eslint/eslint-plugin": "^6.14.0", - "@typescript-eslint/parser": "^6.14.0", + "@graphql-codegen/cli": "^5.0.0", + "@graphql-codegen/client-preset": "^4.1.0", + "@parcel/watcher": "^2.4.0", + "@tanstack/router-devtools": "^1.15.13", + "@tanstack/router-vite-plugin": "^1.15.11", + "@types/react": "^18.2.51", + "@types/react-dom": "^18.2.18", + "@typescript-eslint/eslint-plugin": "^6.20.0", + "@typescript-eslint/parser": "^6.20.0", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.17", - "eslint": "^8.55.0", + "concurrently": "^8.2.2", + "eslint": "^8.56.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "postcss": "^8.4.33", + "postcss-import": "^16.0.0", "tailwindcss": "^3.4.1", - "typescript": "^5.2.2", - "vite": "^5.0.8" + "ts-node": "^10.9.2", + "typescript": "^5.3.3", + "vite": "^5.0.12" } } diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 9be208a3..f238f227 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -5,9 +5,24 @@ settings: excludeLinksFromLockfile: false dependencies: + '@graphql-typed-document-node/core': + specifier: ^3.2.0 + version: 3.2.0(graphql@16.8.1) + '@tanstack/react-query': + specifier: ^5.18.1 + version: 5.18.1(react@18.2.0) '@tanstack/react-router': - specifier: ^1.12.12 - version: 1.12.12(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.15.13 + version: 1.15.13(react-dom@18.2.0)(react@18.2.0) + '@tanstack/router-cli': + specifier: ^1.15.10 + version: 1.15.10 + graphql: + specifier: ^16.8.1 + version: 16.8.1 + graphql-request: + specifier: ^6.1.0 + version: 6.1.0(graphql@16.8.1) react: specifier: ^18.2.0 version: 18.2.0 @@ -17,34 +32,55 @@ dependencies: react-icons: specifier: ^5.0.1 version: 5.0.1(react@18.2.0) + react-intersection-observer: + specifier: ^9.6.0 + version: 9.6.0(react-dom@18.2.0)(react@18.2.0) + unstated-next: + specifier: ^1.1.0 + version: 1.1.0 + zod: + specifier: ^3.22.4 + version: 3.22.4 devDependencies: + '@graphql-codegen/cli': + specifier: ^5.0.0 + version: 5.0.0(@parcel/watcher@2.4.0)(@types/node@20.11.16)(graphql@16.8.1)(typescript@5.3.3) + '@graphql-codegen/client-preset': + specifier: ^4.1.0 + version: 4.1.0(graphql@16.8.1) + '@parcel/watcher': + specifier: ^2.4.0 + version: 2.4.0 '@tanstack/router-devtools': - specifier: ^1.12.13 - version: 1.12.13(react-dom@18.2.0)(react@18.2.0) + specifier: ^1.15.13 + version: 1.15.13(react-dom@18.2.0)(react@18.2.0) '@tanstack/router-vite-plugin': - specifier: ^1.12.8 - version: 1.12.8 + specifier: ^1.15.11 + version: 1.15.11 '@types/react': - specifier: ^18.2.43 - version: 18.2.48 + specifier: ^18.2.51 + version: 18.2.51 '@types/react-dom': - specifier: ^18.2.17 + specifier: ^18.2.18 version: 18.2.18 '@typescript-eslint/eslint-plugin': - specifier: ^6.14.0 - version: 6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3) + specifier: ^6.20.0 + version: 6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': - specifier: ^6.14.0 - version: 6.19.1(eslint@8.56.0)(typescript@5.3.3) + specifier: ^6.20.0 + version: 6.20.0(eslint@8.56.0)(typescript@5.3.3) '@vitejs/plugin-react': specifier: ^4.2.1 version: 4.2.1(vite@5.0.12) autoprefixer: specifier: ^10.4.17 version: 10.4.17(postcss@8.4.33) + concurrently: + specifier: ^8.2.2 + version: 8.2.2 eslint: - specifier: ^8.55.0 + specifier: ^8.56.0 version: 8.56.0 eslint-plugin-react-hooks: specifier: ^4.6.0 @@ -55,15 +91,21 @@ devDependencies: postcss: specifier: ^8.4.33 version: 8.4.33 + postcss-import: + specifier: ^16.0.0 + version: 16.0.0(postcss@8.4.33) tailwindcss: specifier: ^3.4.1 - version: 3.4.1 + version: 3.4.1(ts-node@10.9.2) + ts-node: + specifier: ^10.9.2 + version: 10.9.2(@types/node@20.11.16)(typescript@5.3.3) typescript: - specifier: ^5.2.2 + specifier: ^5.3.3 version: 5.3.3 vite: - specifier: ^5.0.8 - version: 5.0.12 + specifier: ^5.0.12 + version: 5.0.12(@types/node@20.11.16) packages: @@ -85,6 +127,44 @@ packages: '@jridgewell/trace-mapping': 0.3.22 dev: true + /@ardatan/relay-compiler@12.0.0(graphql@16.8.1): + resolution: {integrity: sha512-9anThAaj1dQr6IGmzBMcfzOQKTa5artjuPmw8NYK/fiGEMjADbSguBY2FMDykt+QhilR3wc9VA/3yVju7JHg7Q==} + hasBin: true + peerDependencies: + graphql: '*' + dependencies: + '@babel/core': 7.23.9 + '@babel/generator': 7.23.6 + '@babel/parser': 7.23.9 + '@babel/runtime': 7.23.9 + '@babel/traverse': 7.23.9 + '@babel/types': 7.23.9 + babel-preset-fbjs: 3.4.0(@babel/core@7.23.9) + chalk: 4.1.2 + fb-watchman: 2.0.2 + fbjs: 3.0.5 + glob: 7.2.3 + graphql: 16.8.1 + immutable: 3.7.6 + invariant: 2.2.4 + nullthrows: 1.1.1 + relay-runtime: 12.0.0 + signedsource: 1.0.0 + yargs: 15.4.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@ardatan/sync-fetch@0.0.1: + resolution: {integrity: sha512-xhlTqH0m31mnsG0tIP4ETgfSB6gXDaYYsUWTrlUV93fFQPI9dd8hE0Ot6MHLCtqgB32hwJAC3YZMWlXZw7AleA==} + engines: {node: '>=14'} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + dev: true + /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -131,6 +211,13 @@ packages: jsesc: 2.5.2 dev: true + /@babel/helper-annotate-as-pure@7.22.5: + resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + /@babel/helper-compilation-targets@7.23.6: resolution: {integrity: sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==} engines: {node: '>=6.9.0'} @@ -142,6 +229,24 @@ packages: semver: 6.3.1 dev: true + /@babel/helper-create-class-features-plugin@7.23.10(@babel/core@7.23.9): + resolution: {integrity: sha512-2XpP2XhkXzgxecPNEEK8Vz8Asj9aRxt08oKOqtiZoqV2UGZ5T+EkyP9sXQ9nwMxBIG34a7jmasVqoMop7VdPUw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-member-expression-to-functions': 7.23.0 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9) + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + semver: 6.3.1 + dev: true + /@babel/helper-environment-visitor@7.22.20: resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} engines: {node: '>=6.9.0'} @@ -162,6 +267,13 @@ packages: '@babel/types': 7.23.9 dev: true + /@babel/helper-member-expression-to-functions@7.23.0: + resolution: {integrity: sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + /@babel/helper-module-imports@7.22.15: resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} engines: {node: '>=6.9.0'} @@ -183,11 +295,30 @@ packages: '@babel/helper-validator-identifier': 7.22.20 dev: true + /@babel/helper-optimise-call-expression@7.22.5: + resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-replace-supers@7.22.20(@babel/core@7.23.9): + resolution: {integrity: sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-member-expression-to-functions': 7.23.0 + '@babel/helper-optimise-call-expression': 7.22.5 + dev: true + /@babel/helper-simple-access@7.22.5: resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} engines: {node: '>=6.9.0'} @@ -195,6 +326,13 @@ packages: '@babel/types': 7.23.9 dev: true + /@babel/helper-skip-transparent-expression-wrappers@7.22.5: + resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.23.9 + dev: true + /@babel/helper-split-export-declaration@7.22.6: resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} engines: {node: '>=6.9.0'} @@ -245,6 +383,256 @@ packages: '@babel/types': 7.23.9 dev: true + /@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.23.9): + resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} + engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead. + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-create-class-features-plugin': 7.23.10(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-proposal-object-rest-spread@7.20.7(@babel/core@7.23.9): + resolution: {integrity: sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==} + engines: {node: '>=6.9.0'} + deprecated: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead. + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/compat-data': 7.23.5 + '@babel/core': 7.23.9 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.9) + '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.9) + dev: true + + /@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.23.9): + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-syntax-flow@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-YZiAIpkJAwQXBJLIQbRFayR5c+gJ35Vcz3bg954k7cd73zqjvhacJuL9RbrzPz8qPmZdgqP6EUKwy0PCNhaaPA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-syntax-import-assertions@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-syntax-jsx@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.9): + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-arrow-functions@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-block-scoped-functions@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-block-scoping@7.23.4(@babel/core@7.23.9): + resolution: {integrity: sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-classes@7.23.8(@babel/core@7.23.9): + resolution: {integrity: sha512-yAYslGsY1bX6Knmg46RjiCiNSwJKv2IUC8qOdYKqMMr0491SXFhcHqOdRDeCRohOOIzwN/90C6mQ9qAKgrP7dg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9) + '@babel/helper-split-export-declaration': 7.22.6 + globals: 11.12.0 + dev: true + + /@babel/plugin-transform-computed-properties@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/template': 7.23.9 + dev: true + + /@babel/plugin-transform-destructuring@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-flow-strip-types@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-26/pQTf9nQSNVJCrLB1IkHUKyPxR+lMrH2QDPG89+Znu9rAMbtrybdbWeE9bb7gzjmE5iXHEY+e0HUwM6Co93Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-flow': 7.23.3(@babel/core@7.23.9) + dev: true + + /@babel/plugin-transform-for-of@7.23.6(@babel/core@7.23.9): + resolution: {integrity: sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + dev: true + + /@babel/plugin-transform-function-name@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-literals@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-member-expression-literals@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-modules-commonjs@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.9) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-simple-access': 7.22.5 + dev: true + + /@babel/plugin-transform-object-super@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.20(@babel/core@7.23.9) + dev: true + + /@babel/plugin-transform-parameters@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-property-literals@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-react-display-name@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-GnvhtVfA2OAtzdX58FJxU19rhoGeQzyVndw3GgtdECQvQFXPEZIOVULHVZGAYmOgmqjXpVpfocAbSjh99V/Fqw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + /@babel/plugin-transform-react-jsx-self@7.23.3(@babel/core@7.23.9): resolution: {integrity: sha512-qXRvbeKDSfwnlJnanVRp0SfuWE5DQhwQr5xtLBzp56Wabyo+4CMosF6Kfp+eOD/4FYpql64XVJ2W0pVLlJZxOQ==} engines: {node: '>=6.9.0'} @@ -265,6 +653,51 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: true + /@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.23.9): + resolution: {integrity: sha512-5xOpoPguCZCRbo/JeHlloSkTA8Bld1J/E1/kLfD1nsuiW1m8tduTA1ERCgIZokDflX/IBzKcqR3l7VlRgiIfHA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-module-imports': 7.22.15 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.9) + '@babel/types': 7.23.9 + dev: true + + /@babel/plugin-transform-shorthand-properties@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + + /@babel/plugin-transform-spread@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + dev: true + + /@babel/plugin-transform-template-literals@7.23.3(@babel/core@7.23.9): + resolution: {integrity: sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.23.9 + '@babel/helper-plugin-utils': 7.22.5 + dev: true + /@babel/runtime@7.23.9: resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} engines: {node: '>=6.9.0'} @@ -308,6 +741,13 @@ packages: to-fast-properties: 2.0.0 dev: true + /@cspotcode/source-map-support@0.8.1: + resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: true + /@esbuild/aix-ppc64@0.19.12: resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -432,126 +872,726 @@ packages: os: [linux] requiresBuild: true dev: true - optional: true + optional: true + + /@esbuild/linux-riscv64@0.19.12: + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.19.12: + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.19.12: + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.19.12: + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.19.12: + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.19.12: + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.19.12: + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.19.12: + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.19.12: + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): + resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + dependencies: + eslint: 8.56.0 + eslint-visitor-keys: 3.4.3 + dev: true + + /@eslint-community/regexpp@4.10.0: + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + dev: true + + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + espree: 9.6.1 + globals: 13.24.0 + ignore: 5.3.1 + import-fresh: 3.3.0 + js-yaml: 4.1.0 + minimatch: 3.1.2 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@eslint/js@8.56.0: + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + + /@graphql-codegen/add@5.0.0(graphql@16.8.1): + resolution: {integrity: sha512-ynWDOsK2yxtFHwcJTB9shoSkUd7YXd6ZE57f0nk7W5cu/nAgxZZpEsnTPEpZB/Mjf14YRGe2uJHQ7AfElHjqUQ==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.5.3 + dev: true + + /@graphql-codegen/cli@5.0.0(@parcel/watcher@2.4.0)(@types/node@20.11.16)(graphql@16.8.1)(typescript@5.3.3): + resolution: {integrity: sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA==} + hasBin: true + peerDependencies: + '@parcel/watcher': ^2.1.0 + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + peerDependenciesMeta: + '@parcel/watcher': + optional: true + dependencies: + '@babel/generator': 7.23.6 + '@babel/template': 7.23.9 + '@babel/types': 7.23.9 + '@graphql-codegen/core': 4.0.0(graphql@16.8.1) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/apollo-engine-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/code-file-loader': 8.1.0(graphql@16.8.1) + '@graphql-tools/git-loader': 8.0.4(graphql@16.8.1) + '@graphql-tools/github-loader': 8.0.0(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/load': 8.0.1(graphql@16.8.1) + '@graphql-tools/prisma-loader': 8.0.2(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.1(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@parcel/watcher': 2.4.0 + '@whatwg-node/fetch': 0.8.8 + chalk: 4.1.2 + cosmiconfig: 8.3.6(typescript@5.3.3) + debounce: 1.2.1 + detect-indent: 6.1.0 + graphql: 16.8.1 + graphql-config: 5.0.3(@types/node@20.11.16)(graphql@16.8.1)(typescript@5.3.3) + inquirer: 8.2.6 + is-glob: 4.0.3 + jiti: 1.21.0 + json-to-pretty-yaml: 1.2.2 + listr2: 4.0.5 + log-symbols: 4.1.0 + micromatch: 4.0.5 + shell-quote: 1.8.1 + string-env-interpolation: 1.0.1 + ts-log: 2.2.5 + tslib: 2.6.2 + yaml: 2.3.4 + yargs: 17.7.2 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - cosmiconfig-toml-loader + - encoding + - enquirer + - supports-color + - typescript + - utf-8-validate + dev: true + + /@graphql-codegen/client-preset@4.1.0(graphql@16.8.1): + resolution: {integrity: sha512-/3Ymb/fjxIF1+HGmaI1YwSZbWsrZAWMSQjh3dU425eBjctjsVQ6gzGRr+l/gE5F1mtmCf+vlbTAT03heAc/QIw==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@babel/helper-plugin-utils': 7.22.5 + '@babel/template': 7.23.9 + '@graphql-codegen/add': 5.0.0(graphql@16.8.1) + '@graphql-codegen/gql-tag-operations': 4.0.1(graphql@16.8.1) + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/typed-document-node': 5.0.1(graphql@16.8.1) + '@graphql-codegen/typescript': 4.0.1(graphql@16.8.1) + '@graphql-codegen/typescript-operations': 4.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + '@graphql-tools/documents': 1.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-codegen/core@4.0.0(graphql@16.8.1): + resolution: {integrity: sha512-JAGRn49lEtSsZVxeIlFVIRxts2lWObR+OQo7V2LHDJ7ohYYw3ilv7nJ8pf8P4GTg/w6ptcYdSdVVdkI8kUHB/Q==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/schema': 10.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.5.3 + dev: true + + /@graphql-codegen/gql-tag-operations@4.0.1(graphql@16.8.1): + resolution: {integrity: sha512-qF6wIbBzW8BNT+wiVsBxrYOs2oYcsxQ7mRvCpfEI3HnNZMAST/uX76W8MqFEJvj4mw7NIDv7xYJAcAZIWM5LWw==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + auto-bind: 4.0.0 + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-codegen/plugin-helpers@5.0.1(graphql@16.8.1): + resolution: {integrity: sha512-6L5sb9D8wptZhnhLLBcheSPU7Tg//DGWgc5tQBWX46KYTOTQHGqDpv50FxAJJOyFVJrveN9otWk9UT9/yfY4ww==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + change-case-all: 1.0.15 + common-tags: 1.8.2 + graphql: 16.8.1 + import-from: 4.0.0 + lodash: 4.17.21 + tslib: 2.5.3 + dev: true + + /@graphql-codegen/schema-ast@4.0.0(graphql@16.8.1): + resolution: {integrity: sha512-WIzkJFa9Gz28FITAPILbt+7A8+yzOyd1NxgwFh7ie+EmO9a5zQK6UQ3U/BviirguXCYnn+AR4dXsoDrSrtRA1g==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.5.3 + dev: true + + /@graphql-codegen/typed-document-node@5.0.1(graphql@16.8.1): + resolution: {integrity: sha512-VFkhCuJnkgtbbgzoCAwTdJe2G1H6sd3LfCrDqWUrQe53y2ukfSb5Ov1PhAIkCBStKCMQBUY9YgGz9GKR40qQ8g==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + auto-bind: 4.0.0 + change-case-all: 1.0.15 + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-codegen/typescript-operations@4.0.1(graphql@16.8.1): + resolution: {integrity: sha512-GpUWWdBVUec/Zqo23aFLBMrXYxN2irypHqDcKjN78JclDPdreasAEPcIpMfqf4MClvpmvDLy4ql+djVAwmkjbw==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/typescript': 4.0.1(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + auto-bind: 4.0.0 + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-codegen/typescript@4.0.1(graphql@16.8.1): + resolution: {integrity: sha512-3YziQ21dCVdnHb+Us1uDb3pA6eG5Chjv0uTK+bt9dXeMlwYBU8MbtzvQTo4qvzWVC1AxSOKj0rgfNu1xCXqJyA==} + peerDependencies: + graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-codegen/schema-ast': 4.0.0(graphql@16.8.1) + '@graphql-codegen/visitor-plugin-common': 4.0.1(graphql@16.8.1) + auto-bind: 4.0.0 + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-codegen/visitor-plugin-common@4.0.1(graphql@16.8.1): + resolution: {integrity: sha512-Bi/1z0nHg4QMsAqAJhds+ForyLtk7A3HQOlkrZNm3xEkY7lcBzPtiOTLBtvziwopBsXUxqeSwVjOOFPLS5Yw1Q==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + '@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.1) + '@graphql-tools/optimize': 2.0.0(graphql@16.8.1) + '@graphql-tools/relay-operation-optimizer': 7.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + auto-bind: 4.0.0 + change-case-all: 1.0.15 + dependency-graph: 0.11.0 + graphql: 16.8.1 + graphql-tag: 2.12.6(graphql@16.8.1) + parse-filepath: 1.0.2 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-tools/apollo-engine-loader@8.0.0(graphql@16.8.1): + resolution: {integrity: sha512-axQTbN5+Yxs1rJ6cWQBOfw3AEeC+fvIuZSfJLPLLvFJLj4pUm9fhxey/g6oQZAAQJqKPfw+tLDUQvnfvRK8Kmg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@ardatan/sync-fetch': 0.0.1 + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@whatwg-node/fetch': 0.9.16 + graphql: 16.8.1 + tslib: 2.6.2 + transitivePeerDependencies: + - encoding + dev: true + + /@graphql-tools/batch-execute@9.0.2(graphql@16.8.1): + resolution: {integrity: sha512-Y2uwdZI6ZnatopD/SYfZ1eGuQFI7OU2KGZ2/B/7G9ISmgMl5K+ZZWz/PfIEXeiHirIDhyk54s4uka5rj2xwKqQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + dataloader: 2.2.2 + graphql: 16.8.1 + tslib: 2.6.2 + value-or-promise: 1.0.12 + dev: true + + /@graphql-tools/code-file-loader@8.1.0(graphql@16.8.1): + resolution: {integrity: sha512-HKWW/B2z15ves8N9+xnVbGmFEVGyHEK80a4ghrjeTa6nwNZaKDVfq5CoYFfF0xpfjtH6gOVUExo2XCOEz4B8mQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/graphql-tag-pluck': 8.2.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + globby: 11.1.0 + graphql: 16.8.1 + tslib: 2.6.2 + unixify: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@graphql-tools/delegate@10.0.3(graphql@16.8.1): + resolution: {integrity: sha512-Jor9oazZ07zuWkykD3OOhT/2XD74Zm6Ar0ENZMk75MDD51wB2UWUIMljtHxbJhV5A6UBC2v8x6iY0xdCGiIlyw==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/batch-execute': 9.0.2(graphql@16.8.1) + '@graphql-tools/executor': 1.2.0(graphql@16.8.1) + '@graphql-tools/schema': 10.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + dataloader: 2.2.2 + graphql: 16.8.1 + tslib: 2.6.2 + dev: true + + /@graphql-tools/documents@1.0.0(graphql@16.8.1): + resolution: {integrity: sha512-rHGjX1vg/nZ2DKqRGfDPNC55CWZBMldEVcH+91BThRa6JeT80NqXknffLLEZLRUxyikCfkwMsk6xR3UNMqG0Rg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + graphql: 16.8.1 + lodash.sortby: 4.7.0 + tslib: 2.5.3 + dev: true + + /@graphql-tools/executor-graphql-ws@1.1.0(graphql@16.8.1): + resolution: {integrity: sha512-yM67SzwE8rYRpm4z4AuGtABlOp9mXXVy6sxXnTJRoYIdZrmDbKVfIY+CpZUJCqS0FX3xf2+GoHlsj7Qswaxgcg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@types/ws': 8.5.10 + graphql: 16.8.1 + graphql-ws: 5.14.3(graphql@16.8.1) + isomorphic-ws: 5.0.0(ws@8.16.0) + tslib: 2.6.2 + ws: 8.16.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true - /@esbuild/linux-riscv64@0.19.12: - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - requiresBuild: true + /@graphql-tools/executor-http@1.0.7(@types/node@20.11.16)(graphql@16.8.1): + resolution: {integrity: sha512-/MoRYzQS50Tz5mxRfq3ZmeZ2SOins9wGZAGetsJ55F3PxL0PmHdSGlCq12KzffZDbwHV5YMlwigBsSGWq4y9Iw==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@repeaterjs/repeater': 3.0.5 + '@whatwg-node/fetch': 0.9.16 + extract-files: 11.0.0 + graphql: 16.8.1 + meros: 1.3.0(@types/node@20.11.16) + tslib: 2.6.2 + value-or-promise: 1.0.12 + transitivePeerDependencies: + - '@types/node' dev: true - optional: true - /@esbuild/linux-s390x@0.19.12: - resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - requiresBuild: true + /@graphql-tools/executor-legacy-ws@1.0.5(graphql@16.8.1): + resolution: {integrity: sha512-w54AZ7zkNuvpyV09FH+eGHnnAmaxhBVHg4Yh2ICcsMfRg0brkLt77PlbjBuxZ4HY8XZnKJaYWf+tKazQZtkQtg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@types/ws': 8.5.10 + graphql: 16.8.1 + isomorphic-ws: 5.0.0(ws@8.16.0) + tslib: 2.6.2 + ws: 8.16.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate dev: true - optional: true - /@esbuild/linux-x64@0.19.12: - resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - requiresBuild: true + /@graphql-tools/executor@1.2.0(graphql@16.8.1): + resolution: {integrity: sha512-SKlIcMA71Dha5JnEWlw4XxcaJ+YupuXg0QCZgl2TOLFz4SkGCwU/geAsJvUJFwK2RbVLpQv/UMq67lOaBuwDtg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + '@repeaterjs/repeater': 3.0.5 + graphql: 16.8.1 + tslib: 2.6.2 + value-or-promise: 1.0.12 dev: true - optional: true - /@esbuild/netbsd-x64@0.19.12: - resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - requiresBuild: true + /@graphql-tools/git-loader@8.0.4(graphql@16.8.1): + resolution: {integrity: sha512-fBmKtnOVqzMT2N8L6nggM4skPq3y2t0eBITZJXCOuxeIlIRAeCOdjNLPKgyGb0rezIyGsn55DKMua5101VN0Sg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/graphql-tag-pluck': 8.2.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + is-glob: 4.0.3 + micromatch: 4.0.5 + tslib: 2.6.2 + unixify: 1.0.0 + transitivePeerDependencies: + - supports-color dev: true - optional: true - /@esbuild/openbsd-x64@0.19.12: - resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - requiresBuild: true + /@graphql-tools/github-loader@8.0.0(@types/node@20.11.16)(graphql@16.8.1): + resolution: {integrity: sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@ardatan/sync-fetch': 0.0.1 + '@graphql-tools/executor-http': 1.0.7(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/graphql-tag-pluck': 8.2.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@whatwg-node/fetch': 0.9.16 + graphql: 16.8.1 + tslib: 2.6.2 + value-or-promise: 1.0.12 + transitivePeerDependencies: + - '@types/node' + - encoding + - supports-color dev: true - optional: true - /@esbuild/sunos-x64@0.19.12: - resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - requiresBuild: true + /@graphql-tools/graphql-file-loader@8.0.0(graphql@16.8.1): + resolution: {integrity: sha512-wRXj9Z1IFL3+zJG1HWEY0S4TXal7+s1vVhbZva96MSp0kbb/3JBF7j0cnJ44Eq0ClccMgGCDFqPFXty4JlpaPg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/import': 7.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + globby: 11.1.0 + graphql: 16.8.1 + tslib: 2.6.2 + unixify: 1.0.0 dev: true - optional: true - /@esbuild/win32-arm64@0.19.12: - resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - requiresBuild: true + /@graphql-tools/graphql-tag-pluck@8.2.0(graphql@16.8.1): + resolution: {integrity: sha512-aGIuHxyrJB+LlUfXrH73NVlQTA6LkFbLKQzHojFuwXZJpf7wPkxceN2yp7VjMedARkLJg589IoXgZeMb1EztGQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/parser': 7.23.9 + '@babel/plugin-syntax-import-assertions': 7.23.3(@babel/core@7.23.9) + '@babel/traverse': 7.23.9 + '@babel/types': 7.23.9 + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.6.2 + transitivePeerDependencies: + - supports-color dev: true - optional: true - /@esbuild/win32-ia32@0.19.12: - resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - requiresBuild: true + /@graphql-tools/import@7.0.0(graphql@16.8.1): + resolution: {integrity: sha512-NVZiTO8o1GZs6OXzNfjB+5CtQtqsZZpQOq+Uu0w57kdUkT4RlQKlwhT8T81arEsbV55KpzkpFsOZP7J1wdmhBw==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + resolve-from: 5.0.0 + tslib: 2.6.2 dev: true - optional: true - /@esbuild/win32-x64@0.19.12: - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - requiresBuild: true + /@graphql-tools/json-file-loader@8.0.0(graphql@16.8.1): + resolution: {integrity: sha512-ki6EF/mobBWJjAAC84xNrFMhNfnUFD6Y0rQMGXekrUgY0NdeYXHU0ZUgHzC9O5+55FslqUmAUHABePDHTyZsLg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + globby: 11.1.0 + graphql: 16.8.1 + tslib: 2.6.2 + unixify: 1.0.0 dev: true - optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@graphql-tools/load@8.0.1(graphql@16.8.1): + resolution: {integrity: sha512-qSMsKngJhDqRbuWyo3NvakEFqFL6+eSjy8ooJ1o5qYD26N7dqXkKzIMycQsX7rBK19hOuINAUSaRcVWH6hTccw==} + engines: {node: '>=16.0.0'} peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - eslint: 8.56.0 - eslint-visitor-keys: 3.4.3 + '@graphql-tools/schema': 10.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + p-limit: 3.1.0 + tslib: 2.6.2 dev: true - /@eslint-community/regexpp@4.10.0: - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + /@graphql-tools/merge@9.0.1(graphql@16.8.1): + resolution: {integrity: sha512-hIEExWO9fjA6vzsVjJ3s0cCQ+Q/BEeMVJZtMXd7nbaVefVy0YDyYlEkeoYYNV3NVVvu1G9lr6DM1Qd0DGo9Caw==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.6.2 dev: true - /@eslint/eslintrc@2.1.4: - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@graphql-tools/optimize@2.0.0(graphql@16.8.1): + resolution: {integrity: sha512-nhdT+CRGDZ+bk68ic+Jw1OZ99YCDIKYA5AlVAnBHJvMawSx9YQqQAIj4refNc1/LRieGiuWvhbG3jvPVYho0Dg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - ajv: 6.12.6 + graphql: 16.8.1 + tslib: 2.5.3 + dev: true + + /@graphql-tools/prisma-loader@8.0.2(@types/node@20.11.16)(graphql@16.8.1): + resolution: {integrity: sha512-8d28bIB0bZ9Bj0UOz9sHagVPW+6AHeqvGljjERtwCnWl8OCQw2c2pNboYXISLYUG5ub76r4lDciLLTU+Ks7Q0w==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/url-loader': 8.0.1(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@types/js-yaml': 4.0.9 + '@types/json-stable-stringify': 1.0.36 + '@whatwg-node/fetch': 0.9.16 + chalk: 4.1.2 debug: 4.3.4 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.0 - import-fresh: 3.3.0 + dotenv: 16.4.1 + graphql: 16.8.1 + graphql-request: 6.1.0(graphql@16.8.1) + http-proxy-agent: 7.0.0 + https-proxy-agent: 7.0.2 + jose: 5.2.0 js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 + json-stable-stringify: 1.1.1 + lodash: 4.17.21 + scuid: 1.1.0 + tslib: 2.6.2 + yaml-ast-parser: 0.0.43 transitivePeerDependencies: + - '@types/node' + - bufferutil + - encoding - supports-color + - utf-8-validate dev: true - /@eslint/js@8.56.0: - resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + /@graphql-tools/relay-operation-optimizer@7.0.0(graphql@16.8.1): + resolution: {integrity: sha512-UNlJi5y3JylhVWU4MBpL0Hun4Q7IoJwv9xYtmAz+CgRa066szzY7dcuPfxrA7cIGgG/Q6TVsKsYaiF4OHPs1Fw==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.5.3 + transitivePeerDependencies: + - encoding + - supports-color + dev: true + + /@graphql-tools/schema@10.0.2(graphql@16.8.1): + resolution: {integrity: sha512-TbPsIZnWyDCLhgPGnDjt4hosiNU2mF/rNtSk5BVaXWnZqvKJ6gzJV4fcHcvhRIwtscDMW2/YTnK6dLVnk8pc4w==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/merge': 9.0.1(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.6.2 + value-or-promise: 1.0.12 + dev: true + + /@graphql-tools/url-loader@8.0.1(@types/node@20.11.16)(graphql@16.8.1): + resolution: {integrity: sha512-B2k8KQEkEQmfV1zhurT5GLoXo8jbXP+YQHUayhCSxKYlRV7j/1Fhp1b21PDM8LXIDGlDRXaZ0FbWKOs7eYXDuQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@ardatan/sync-fetch': 0.0.1 + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/executor-graphql-ws': 1.1.0(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.7(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/executor-legacy-ws': 1.0.5(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + '@graphql-tools/wrap': 10.0.1(graphql@16.8.1) + '@types/ws': 8.5.10 + '@whatwg-node/fetch': 0.9.16 + graphql: 16.8.1 + isomorphic-ws: 5.0.0(ws@8.16.0) + tslib: 2.6.2 + value-or-promise: 1.0.12 + ws: 8.16.0 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - encoding + - utf-8-validate + dev: true + + /@graphql-tools/utils@10.0.13(graphql@16.8.1): + resolution: {integrity: sha512-fMILwGr5Dm2zefNItjQ6C2rauigklv69LIwppccICuGTnGaOp3DspLt/6Lxj72cbg5d9z60Sr+Egco3CJKLsNg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + cross-inspect: 1.0.0 + dset: 3.1.3 + graphql: 16.8.1 + tslib: 2.6.2 + dev: true + + /@graphql-tools/wrap@10.0.1(graphql@16.8.1): + resolution: {integrity: sha512-Cw6hVrKGM2OKBXeuAGltgy4tzuqQE0Nt7t/uAqnuokSXZhMHXJUb124Bnvxc2gPZn5chfJSDafDe4Cp8ZAVJgg==} + engines: {node: '>=16.0.0'} + peerDependencies: + graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) + '@graphql-tools/schema': 10.0.2(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + graphql: 16.8.1 + tslib: 2.6.2 + value-or-promise: 1.0.12 dev: true + /@graphql-typed-document-node/core@3.2.0(graphql@16.8.1): + resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==} + peerDependencies: + graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 + dependencies: + graphql: 16.8.1 + /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} @@ -614,6 +1654,17 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /@kamilkisiela/fast-url-parser@1.1.4: + resolution: {integrity: sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==} + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -635,6 +1686,163 @@ packages: fastq: 1.17.0 dev: true + /@parcel/watcher-android-arm64@2.4.0: + resolution: {integrity: sha512-+fPtO/GsbYX1LJnCYCaDVT3EOBjvSFdQN9Mrzh9zWAOOfvidPWyScTrHIZHHfJBvlHzNA0Gy0U3NXFA/M7PHUA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-darwin-arm64@2.4.0: + resolution: {integrity: sha512-T/At5pansFuQ8VJLRx0C6C87cgfqIYhW2N/kBfLCUvDhCah0EnLLwaD/6MW3ux+rpgkpQAnMELOCTKlbwncwiA==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-darwin-x64@2.4.0: + resolution: {integrity: sha512-vZMv9jl+szz5YLsSqEGCMSllBl1gU1snfbRL5ysJU03MEa6gkVy9OMcvXV1j4g0++jHEcvzhs3Z3LpeEbVmY6Q==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-freebsd-x64@2.4.0: + resolution: {integrity: sha512-dHTRMIplPDT1M0+BkXjtMN+qLtqq24sLDUhmU+UxxLP2TEY2k8GIoqIJiVrGWGomdWsy5IO27aDV1vWyQ6gfHA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-linux-arm-glibc@2.4.0: + resolution: {integrity: sha512-9NQXD+qk46RwATNC3/UB7HWurscY18CnAPMTFcI9Y8CTbtm63/eex1SNt+BHFinEQuLBjaZwR2Lp+n7pmEJPpQ==} + engines: {node: '>= 10.0.0'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-linux-arm64-glibc@2.4.0: + resolution: {integrity: sha512-QuJTAQdsd7PFW9jNGaV9Pw+ZMWV9wKThEzzlY3Lhnnwy7iW23qtQFPql8iEaSFMCVI5StNNmONUopk+MFKpiKg==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-linux-arm64-musl@2.4.0: + resolution: {integrity: sha512-oyN+uA9xcTDo/45bwsd6TFHa7Lc7hKujyMlvwrCLvSckvWogndCEoVYFNfZ6JJ2KNL/6fFiGPcbjp8jJmEh5Ng==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-linux-x64-glibc@2.4.0: + resolution: {integrity: sha512-KphV8awJmxU3q52JQvJot0QMu07CIyEjV+2Tb2ZtbucEgqyRcxOBDMsqp1JNq5nuDXtcCC0uHQICeiEz38dPBQ==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-linux-x64-musl@2.4.0: + resolution: {integrity: sha512-7jzcOonpXNWcSijPpKD5IbC6xC7yTibjJw9jviVzZostYLGxbz8LDJLUnLzLzhASPlPGgpeKLtFUMjAAzM+gSA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-win32-arm64@2.4.0: + resolution: {integrity: sha512-NOej2lqlq8bQNYhUMnOD0nwvNql8ToQF+1Zhi9ULZoG+XTtJ9hNnCFfyICxoZLXor4bBPTOnzs/aVVoefYnjIg==} + engines: {node: '>= 10.0.0'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-win32-ia32@2.4.0: + resolution: {integrity: sha512-IO/nM+K2YD/iwjWAfHFMBPz4Zqn6qBDqZxY4j2n9s+4+OuTSRM/y/irksnuqcspom5DjkSeF9d0YbO+qpys+JA==} + engines: {node: '>= 10.0.0'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher-win32-x64@2.4.0: + resolution: {integrity: sha512-pAUyUVjfFjWaf/pShmJpJmNxZhbMvJASUpdes9jL6bTEJ+gDxPRSpXTIemNyNsb9AtbiGXs9XduP1reThmd+dA==} + engines: {node: '>= 10.0.0'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@parcel/watcher@2.4.0: + resolution: {integrity: sha512-XJLGVL0DEclX5pcWa2N9SX1jCGTDd8l972biNooLFtjneuGqodupPQh6XseXIBBeVIMaaJ7bTcs3qGvXwsp4vg==} + engines: {node: '>= 10.0.0'} + dependencies: + detect-libc: 1.0.3 + is-glob: 4.0.3 + micromatch: 4.0.5 + node-addon-api: 7.1.0 + optionalDependencies: + '@parcel/watcher-android-arm64': 2.4.0 + '@parcel/watcher-darwin-arm64': 2.4.0 + '@parcel/watcher-darwin-x64': 2.4.0 + '@parcel/watcher-freebsd-x64': 2.4.0 + '@parcel/watcher-linux-arm-glibc': 2.4.0 + '@parcel/watcher-linux-arm64-glibc': 2.4.0 + '@parcel/watcher-linux-arm64-musl': 2.4.0 + '@parcel/watcher-linux-x64-glibc': 2.4.0 + '@parcel/watcher-linux-x64-musl': 2.4.0 + '@parcel/watcher-win32-arm64': 2.4.0 + '@parcel/watcher-win32-ia32': 2.4.0 + '@parcel/watcher-win32-x64': 2.4.0 + dev: true + + /@peculiar/asn1-schema@2.3.8: + resolution: {integrity: sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==} + dependencies: + asn1js: 3.0.5 + pvtsutils: 1.3.5 + tslib: 2.6.2 + dev: true + + /@peculiar/json-schema@1.1.12: + resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} + engines: {node: '>=8.0.0'} + dependencies: + tslib: 2.6.2 + dev: true + + /@peculiar/webcrypto@1.4.5: + resolution: {integrity: sha512-oDk93QCDGdxFRM8382Zdminzs44dg3M2+E5Np+JWkpqLDyJC9DviMh8F8mEJkYuUcUOGA5jHO5AJJ10MFWdbZw==} + engines: {node: '>=10.12.0'} + dependencies: + '@peculiar/asn1-schema': 2.3.8 + '@peculiar/json-schema': 1.1.12 + pvtsutils: 1.3.5 + tslib: 2.6.2 + webcrypto-core: 1.7.8 + dev: true + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -642,6 +1850,10 @@ packages: dev: true optional: true + /@repeaterjs/repeater@3.0.5: + resolution: {integrity: sha512-l3YHBLAol6d/IKnB9LhpD0cEZWAoe3eFKUyTYWmFmCO2Q/WOckxLQAUyMZWwZV2M/m3+4vgRoaolFqaII82/TA==} + dev: true + /@rollup/rollup-android-arm-eabi@4.9.6: resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} cpu: [arm] @@ -746,18 +1958,31 @@ packages: dev: true optional: true - /@tanstack/history@1.8.0: - resolution: {integrity: sha512-RPukIMPedYLs3XySxcsD2PUAYnRh2GR1dKix/Rlaf8iIdl+fKH7nuX/V0+vYv7pSJZ6m/a/zmsX3Rm4xSyVB7g==} + /@tanstack/history@1.15.13: + resolution: {integrity: sha512-ToaeMtK5S4YaxCywAlYexc7KPFN0esjyTZ4vXzJhXEWAkro9iHgh7m/4ozPJb7oTo65WkHWX0W9GjcZbInSD8w==} engines: {node: '>=12'} - /@tanstack/react-router@1.12.12(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-NAKWrwcJY18kUI6EkdoRXix6FcuDZ75ZRPKnx5MKJBYZj0FlzbKSxxAwwWFEwkKUS4mD6+O8+ifq1cwVr/RibQ==} + /@tanstack/query-core@5.18.1: + resolution: {integrity: sha512-fYhrG7bHgSNbnkIJF2R4VUXb4lF7EBiQjKkDc5wOlB7usdQOIN4LxxHpDxyE3qjqIst1WBGvDtL48T0sHJGKCw==} + dev: false + + /@tanstack/react-query@5.18.1(react@18.2.0): + resolution: {integrity: sha512-PdI07BbsahZ+04PxSuDQsQvBWe008eWFk/YYWzt8fvzt2sALUM0TpAJa/DFpqa7+SSo7j1EQR6Jx6znXNHyaXw==} + peerDependencies: + react: ^18.0.0 + dependencies: + '@tanstack/query-core': 5.18.1 + react: 18.2.0 + dev: false + + /@tanstack/react-router@1.15.13(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-zkvYYUeK3N+799a4aEOZ/E6iXMz/LZ8i2ZThAzgk0NUNvp99PqakVosxAtfJdCTM8RrQwjFrnRwSRr0lNX1dDw==} engines: {node: '>=12'} peerDependencies: react: '>=16' react-dom: '>=16' dependencies: - '@tanstack/history': 1.8.0 + '@tanstack/history': 1.15.13 '@tanstack/react-store': 0.2.1(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -775,37 +2000,62 @@ packages: react-dom: 18.2.0(react@18.2.0) use-sync-external-store: 1.2.0(react@18.2.0) - /@tanstack/router-devtools@1.12.13(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-NAMZnGbMJuYdYflU4khZUwPxPZh/iOBwZyb2WRaCCtxZO5RuGFZ9ciWuyPVye9xs8XiMimDQWQgoTzCLnYlLKQ==} + /@tanstack/router-cli@1.15.10: + resolution: {integrity: sha512-cojlmTl58uGP1/jpy5GSM5PtApmYLRccfWB6IcdYehTtuUUJ8eRwI0XPT0N9StWhyeZkjn0NEWqg0zsItJrXag==} + engines: {node: '>=12'} + hasBin: true + dependencies: + '@tanstack/router-generator': 1.15.10 + chokidar: 3.5.3 + yargs: 17.7.2 + dev: false + + /@tanstack/router-devtools@1.15.13(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-expbGLnGtUnjsk/ftBfNtYqEHySLgMX9WAipQouSdSxK3h+8ifRy+UVGVY8xYQVFRdZyQ3TnBtyNnFnV5QOyag==} engines: {node: '>=12'} peerDependencies: react: '>=16' react-dom: '>=16' dependencies: - '@tanstack/react-router': 1.12.12(react-dom@18.2.0)(react@18.2.0) + '@tanstack/react-router': 1.15.13(react-dom@18.2.0)(react@18.2.0) date-fns: 2.30.0 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true - /@tanstack/router-generator@1.12.8: - resolution: {integrity: sha512-3fzIvp3BfKADX47WWLUCK9CmaIiVPXINXzSbFGzTlQxz5q7mLe0TrhQlN9ecyEnbCon3sLaIkVfFy4zzftpJQw==} + /@tanstack/router-generator@1.15.10: + resolution: {integrity: sha512-Q2fGptVetCiCRp2SFcLda+EQ9o7xPgJM4wUIp0b9lCnae7RRdSH9ukl66xu4PBqZDS4B+7e7+v1gH7OXEETGYA==} engines: {node: '>=12'} dependencies: prettier: 3.2.4 zod: 3.22.4 - dev: true - /@tanstack/router-vite-plugin@1.12.8: - resolution: {integrity: sha512-Ulidp2xZaGjooRqew8zEqz+v1Ed6HOVv/GKjzsgn+s0sxZ4Kw5Ey1QqrjYqejRfURWnars01rSwpkL5NlSFYxg==} + /@tanstack/router-vite-plugin@1.15.11: + resolution: {integrity: sha512-F3wa4Qos4VSi47WtIw3P6YYeLjtyvKqkD273/hN+LaGaev7YGGYNhOPHNgFju/YWcMupBAjjN2wzqyxHJ3i3Eg==} engines: {node: '>=12'} dependencies: - '@tanstack/router-generator': 1.12.8 + '@tanstack/router-generator': 1.15.10 dev: true /@tanstack/store@0.1.3: resolution: {integrity: sha512-GnolmC8Fr4mvsHE1fGQmR3Nm0eBO3KnZjDU0a+P3TeQNM/dDscFGxtA7p31NplQNW3KwBw4t1RVFmz0VeKLxcw==} + /@tsconfig/node10@1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: true + + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: true + + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: true + + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + dev: true + /@types/babel__core@7.20.5: resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} dependencies: @@ -839,10 +2089,24 @@ packages: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true + /@types/js-yaml@4.0.9: + resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true + /@types/json-stable-stringify@1.0.36: + resolution: {integrity: sha512-b7bq23s4fgBB76n34m2b3RBf6M369B0Z9uRR8aHTMd8kZISRkmDEpPD8hhpYvDFzr3bJCPES96cm3Q6qRNDbQw==} + dev: true + + /@types/node@20.11.16: + resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/prop-types@15.7.11: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} dev: true @@ -850,11 +2114,11 @@ packages: /@types/react-dom@18.2.18: resolution: {integrity: sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==} dependencies: - '@types/react': 18.2.48 + '@types/react': 18.2.51 dev: true - /@types/react@18.2.48: - resolution: {integrity: sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==} + /@types/react@18.2.51: + resolution: {integrity: sha512-XeoMaU4CzyjdRr3c4IQQtiH7Rpo18V07rYZUucEZQwOUEtGgTXv7e6igQiQ+xnV6MbMe1qjEmKdgMNnfppnXfg==} dependencies: '@types/prop-types': 15.7.11 '@types/scheduler': 0.16.8 @@ -869,8 +2133,14 @@ packages: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true - /@typescript-eslint/eslint-plugin@6.19.1(@typescript-eslint/parser@6.19.1)(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==} + /@types/ws@8.5.10: + resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} + dependencies: + '@types/node': 20.11.16 + dev: true + + /@typescript-eslint/eslint-plugin@6.20.0(@typescript-eslint/parser@6.20.0)(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-fTwGQUnjhoYHeSF6m5pWNkzmDDdsKELYrOBxhjMrofPqCkoC2k3B2wvGHFxa1CTIqkEn88nlW1HVMztjo2K8Hg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -881,15 +2151,15 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.19.1(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/type-utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 6.19.1 + '@typescript-eslint/parser': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/type-utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 eslint: 8.56.0 graphemer: 1.4.0 - ignore: 5.3.0 + ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.5.4 ts-api-utils: 1.0.3(typescript@5.3.3) @@ -898,8 +2168,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.19.1(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==} + /@typescript-eslint/parser@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-bYerPDF/H5v6V76MdMYhjwmwgMA+jlPVqjSDq2cRqMi8bP5sR3Z+RLOiOMad3nsnmDVmn2gAFCyNgh/dIrfP/w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -908,10 +2178,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) - '@typescript-eslint/visitor-keys': 6.19.1 + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 eslint: 8.56.0 typescript: 5.3.3 @@ -919,16 +2189,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@6.19.1: - resolution: {integrity: sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==} + /@typescript-eslint/scope-manager@6.20.0: + resolution: {integrity: sha512-p4rvHQRDTI1tGGMDFQm+GtxP1ZHyAh64WANVoyEcNMpaTFn3ox/3CcgtIlELnRfKzSs/DwYlDccJEtr3O6qBvA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/visitor-keys': 6.19.1 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 dev: true - /@typescript-eslint/type-utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==} + /@typescript-eslint/type-utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-qnSobiJQb1F5JjN0YDRPHruQTrX7ICsmltXhkV536mp4idGAYrIyr47zF/JmkJtEcAVnIz4gUYJ7gOZa6SmN4g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -937,8 +2207,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) - '@typescript-eslint/utils': 6.19.1(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.20.0(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.56.0 ts-api-utils: 1.0.3(typescript@5.3.3) @@ -947,13 +2217,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@6.19.1: - resolution: {integrity: sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==} + /@typescript-eslint/types@6.20.0: + resolution: {integrity: sha512-MM9mfZMAhiN4cOEcUOEx+0HmuaW3WBfukBZPCfwSqFnQy0grXYtngKCqpQN339X3RrwtzspWJrpbrupKYUSBXQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.19.1(typescript@5.3.3): - resolution: {integrity: sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==} + /@typescript-eslint/typescript-estree@6.20.0(typescript@5.3.3): + resolution: {integrity: sha512-RnRya9q5m6YYSpBN7IzKu9FmLcYtErkDkc8/dKv81I9QiLLtVBHrjz+Ev/crAqgMNW2FCsoZF4g2QUylMnJz+g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -961,8 +2231,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/visitor-keys': 6.19.1 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/visitor-keys': 6.20.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -974,8 +2244,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.19.1(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==} + /@typescript-eslint/utils@6.20.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-/EKuw+kRu2vAqCoDwDCBtDRU6CTKbUmwwI7SH7AashZ+W+7o8eiyy6V2cdOqN49KsTcASWsC5QeghYuRDTyOOg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -983,9 +2253,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.19.1 - '@typescript-eslint/types': 6.19.1 - '@typescript-eslint/typescript-estree': 6.19.1(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.20.0 + '@typescript-eslint/types': 6.20.0 + '@typescript-eslint/typescript-estree': 6.20.0(typescript@5.3.3) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -993,11 +2263,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.19.1: - resolution: {integrity: sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==} + /@typescript-eslint/visitor-keys@6.20.0: + resolution: {integrity: sha512-E8Cp98kRe4gKHjJD4NExXKz/zOJ1A2hhZc+IMVD6i7w4yjIvh6VyuRI0gRtxAsXtoC35uGMaQ9rjI2zJaXDEAw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.19.1 + '@typescript-eslint/types': 6.20.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1016,11 +2286,59 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.0.12 + vite: 5.0.12(@types/node@20.11.16) transitivePeerDependencies: - supports-color dev: true + /@whatwg-node/events@0.0.3: + resolution: {integrity: sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==} + dev: true + + /@whatwg-node/events@0.1.1: + resolution: {integrity: sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==} + engines: {node: '>=16.0.0'} + dev: true + + /@whatwg-node/fetch@0.8.8: + resolution: {integrity: sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==} + dependencies: + '@peculiar/webcrypto': 1.4.5 + '@whatwg-node/node-fetch': 0.3.6 + busboy: 1.6.0 + urlpattern-polyfill: 8.0.2 + web-streams-polyfill: 3.3.2 + dev: true + + /@whatwg-node/fetch@0.9.16: + resolution: {integrity: sha512-mqasZiUNquRe3ea9+aCAuo81BR6vq5opUKprPilIHTnrg8a21Z1T1OrI+KiMFX8OmwO5HUJe/vro47lpj2JPWQ==} + engines: {node: '>=16.0.0'} + dependencies: + '@whatwg-node/node-fetch': 0.5.5 + urlpattern-polyfill: 10.0.0 + dev: true + + /@whatwg-node/node-fetch@0.3.6: + resolution: {integrity: sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==} + dependencies: + '@whatwg-node/events': 0.0.3 + busboy: 1.6.0 + fast-querystring: 1.1.2 + fast-url-parser: 1.1.3 + tslib: 2.6.2 + dev: true + + /@whatwg-node/node-fetch@0.5.5: + resolution: {integrity: sha512-LhE0Oo95+dOrrzrJncrpCaR3VHSjJ5Gvkl5g9WVfkPKSKkxCbMeOsRQ+v9LrU9lRvXBJn8JicXqSufKFEpyRbQ==} + engines: {node: '>=16.0.0'} + dependencies: + '@kamilkisiela/fast-url-parser': 1.1.4 + '@whatwg-node/events': 0.1.1 + busboy: 1.6.0 + fast-querystring: 1.1.2 + tslib: 2.6.2 + dev: true + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -1029,12 +2347,34 @@ packages: acorn: 8.11.3 dev: true + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} + engines: {node: '>=0.4.0'} + dev: true + /acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true + /agent-base@7.1.0: + resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} + engines: {node: '>= 14'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /aggregate-error@3.1.0: + resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} + engines: {node: '>=8'} + dependencies: + clean-stack: 2.2.0 + indent-string: 4.0.0 + dev: true + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: @@ -1044,10 +2384,16 @@ packages: uri-js: 4.4.1 dev: true + /ansi-escapes@4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.21.3 + dev: true + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - dev: true /ansi-regex@6.0.1: resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} @@ -1066,7 +2412,6 @@ packages: engines: {node: '>=8'} dependencies: color-convert: 2.0.1 - dev: true /ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} @@ -1083,6 +2428,9 @@ packages: dependencies: normalize-path: 3.0.0 picomatch: 2.3.1 + + /arg@4.1.3: + resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} dev: true /arg@5.0.2: @@ -1098,6 +2446,29 @@ packages: engines: {node: '>=8'} dev: true + /asap@2.0.6: + resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} + dev: true + + /asn1js@3.0.5: + resolution: {integrity: sha512-FVnvrKJwpt9LP2lAMl8qZswRNm3T4q9CON+bxldk2iwk3FFpuwhx2FfinyitizWHsVYyaY+y5JzDR0rCMV5yTQ==} + engines: {node: '>=12.0.0'} + dependencies: + pvtsutils: 1.3.5 + pvutils: 1.1.3 + tslib: 2.6.2 + dev: true + + /astral-regex@2.0.0: + resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} + engines: {node: '>=8'} + dev: true + + /auto-bind@4.0.0: + resolution: {integrity: sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==} + engines: {node: '>=8'} + dev: true + /autoprefixer@10.4.17(postcss@8.4.33): resolution: {integrity: sha512-/cpVNRLSfhOtcGflT13P2794gVSgmPgTR+erw5ifnMLZb0UnSlkK4tquLmkd3BhA+nLo5tX8Cu0upUsGKvKbmg==} engines: {node: ^10 || ^12 || >=14} @@ -1106,7 +2477,7 @@ packages: postcss: ^8.1.0 dependencies: browserslist: 4.22.3 - caniuse-lite: 1.0.30001580 + caniuse-lite: 1.0.30001583 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.0.0 @@ -1114,13 +2485,63 @@ packages: postcss-value-parser: 4.2.0 dev: true + /babel-plugin-syntax-trailing-function-commas@7.0.0-beta.0: + resolution: {integrity: sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ==} + dev: true + + /babel-preset-fbjs@3.4.0(@babel/core@7.23.9): + resolution: {integrity: sha512-9ywCsCvo1ojrw0b+XYk7aFvTH6D9064t0RIL1rtMf3nsa02Xw41MS7sZw216Im35xj/UY0PDBQsa1brUDDF1Ow==} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.23.9 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.23.9) + '@babel/plugin-proposal-object-rest-spread': 7.20.7(@babel/core@7.23.9) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.23.9) + '@babel/plugin-syntax-flow': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-syntax-jsx': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.23.9) + '@babel/plugin-transform-arrow-functions': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-block-scoped-functions': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-block-scoping': 7.23.4(@babel/core@7.23.9) + '@babel/plugin-transform-classes': 7.23.8(@babel/core@7.23.9) + '@babel/plugin-transform-computed-properties': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-destructuring': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-flow-strip-types': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-for-of': 7.23.6(@babel/core@7.23.9) + '@babel/plugin-transform-function-name': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-literals': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-member-expression-literals': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-modules-commonjs': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-object-super': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-parameters': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-property-literals': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-react-display-name': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-react-jsx': 7.23.4(@babel/core@7.23.9) + '@babel/plugin-transform-shorthand-properties': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-spread': 7.23.3(@babel/core@7.23.9) + '@babel/plugin-transform-template-literals': 7.23.3(@babel/core@7.23.9) + babel-plugin-syntax-trailing-function-commas: 7.0.0-beta.0 + dev: true + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: true + /binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} + + /bl@4.1.0: + resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 dev: true /brace-expansion@1.1.11: @@ -1141,31 +2562,78 @@ packages: engines: {node: '>=8'} dependencies: fill-range: 7.0.1 - dev: true /browserslist@4.22.3: resolution: {integrity: sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001580 - electron-to-chromium: 1.4.648 + caniuse-lite: 1.0.30001583 + electron-to-chromium: 1.4.656 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.3) dev: true + /bser@2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + dependencies: + node-int64: 0.4.0 + dev: true + + /buffer@5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + + /busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: true + + /call-bind@1.0.5: + resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + dependencies: + function-bind: 1.1.2 + get-intrinsic: 1.2.2 + set-function-length: 1.2.0 + dev: true + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} dev: true + /camel-case@4.1.2: + resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + dependencies: + pascal-case: 3.1.2 + tslib: 2.6.2 + dev: true + /camelcase-css@2.0.1: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} dev: true - /caniuse-lite@1.0.30001580: - resolution: {integrity: sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==} + /camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + dev: true + + /caniuse-lite@1.0.30001583: + resolution: {integrity: sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==} + dev: true + + /capital-case@1.0.4: + resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} + dependencies: + no-case: 3.0.4 + tslib: 2.6.2 + upper-case-first: 2.0.2 dev: true /chalk@2.4.2: @@ -1185,6 +2653,42 @@ packages: supports-color: 7.2.0 dev: true + /change-case-all@1.0.15: + resolution: {integrity: sha512-3+GIFhk3sNuvFAJKU46o26OdzudQlPNBCu1ZQi3cMeMHhty1bhDxu2WrEilVNYaGvqUtR1VSigFcJOiS13dRhQ==} + dependencies: + change-case: 4.1.2 + is-lower-case: 2.0.2 + is-upper-case: 2.0.2 + lower-case: 2.0.2 + lower-case-first: 2.0.2 + sponge-case: 1.0.1 + swap-case: 2.0.2 + title-case: 3.0.3 + upper-case: 2.0.2 + upper-case-first: 2.0.2 + dev: true + + /change-case@4.1.2: + resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} + dependencies: + camel-case: 4.1.2 + capital-case: 1.0.4 + constant-case: 3.0.4 + dot-case: 3.0.4 + header-case: 2.0.4 + no-case: 3.0.4 + param-case: 3.0.4 + pascal-case: 3.1.2 + path-case: 3.0.4 + sentence-case: 3.0.4 + snake-case: 3.0.4 + tslib: 2.6.2 + dev: true + + /chardet@0.7.0: + resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} + dev: true + /chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -1198,6 +2702,56 @@ packages: readdirp: 3.6.0 optionalDependencies: fsevents: 2.3.3 + + /clean-stack@2.2.0: + resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} + engines: {node: '>=6'} + dev: true + + /cli-cursor@3.1.0: + resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} + engines: {node: '>=8'} + dependencies: + restore-cursor: 3.1.0 + dev: true + + /cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + dev: true + + /cli-truncate@2.1.0: + resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} + engines: {node: '>=8'} + dependencies: + slice-ansi: 3.0.0 + string-width: 4.2.3 + dev: true + + /cli-width@3.0.0: + resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} + engines: {node: '>= 10'} + dev: true + + /cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + dev: true + + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + /clone@1.0.4: + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} + engines: {node: '>=0.8'} dev: true /color-convert@1.9.3: @@ -1211,7 +2765,6 @@ packages: engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 - dev: true /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} @@ -1219,6 +2772,9 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + /colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true /commander@4.1.1: @@ -1226,14 +2782,77 @@ packages: engines: {node: '>= 6'} dev: true + /common-tags@1.8.2: + resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} + engines: {node: '>=4.0.0'} + dev: true + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /concurrently@8.2.2: + resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==} + engines: {node: ^14.13.0 || >=16.0.0} + hasBin: true + dependencies: + chalk: 4.1.2 + date-fns: 2.30.0 + lodash: 4.17.21 + rxjs: 7.8.1 + shell-quote: 1.8.1 + spawn-command: 0.0.2 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 17.7.2 + dev: true + + /constant-case@3.0.4: + resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} + dependencies: + no-case: 3.0.4 + tslib: 2.6.2 + upper-case: 2.0.2 + dev: true + /convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} dev: true + /cosmiconfig@8.3.6(typescript@5.3.3): + resolution: {integrity: sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==} + engines: {node: '>=14'} + peerDependencies: + typescript: '>=4.9.5' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + import-fresh: 3.3.0 + js-yaml: 4.1.0 + parse-json: 5.2.0 + path-type: 4.0.0 + typescript: 5.3.3 + dev: true + + /create-require@1.1.1: + resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + dev: true + + /cross-fetch@3.1.8: + resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + dependencies: + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + + /cross-inspect@1.0.0: + resolution: {integrity: sha512-4PFfn4b5ZN6FMNGSZlyb7wUhuN8wvj8t/VQHZdM4JsDcruGJ8L2kf9zao98QIrBPFCpdk27qst/AGTl7pL3ypQ==} + engines: {node: '>=16.0.0'} + dependencies: + tslib: 2.6.2 + dev: true + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -1253,6 +2872,10 @@ packages: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: true + /dataloader@2.2.2: + resolution: {integrity: sha512-8YnDaaf7N3k/q5HnTJVuzSyLETjoZjVmHc4AeKAzOvKHEFQKcn64OKBfzHYtE9zGjctNM7V9I0MfnUVLpi7M5g==} + dev: true + /date-fns@2.30.0: resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} engines: {node: '>=0.11'} @@ -1260,6 +2883,10 @@ packages: '@babel/runtime': 7.23.9 dev: true + /debounce@1.2.1: + resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==} + dev: true + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -1272,14 +2899,55 @@ packages: ms: 2.1.2 dev: true + /decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /defaults@1.0.4: + resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + dependencies: + clone: 1.0.4 + dev: true + + /define-data-property@1.1.1: + resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + + /dependency-graph@0.11.0: + resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} + engines: {node: '>= 0.6.0'} + dev: true + + /detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + dev: true + + /detect-libc@1.0.3: + resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==} + engines: {node: '>=0.10'} + hasBin: true + dev: true + /didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: true + /diff@4.0.2: + resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} + engines: {node: '>=0.3.1'} + dev: true + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1298,22 +2966,44 @@ packages: esutils: 2.0.3 dev: true + /dot-case@3.0.4: + resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dependencies: + no-case: 3.0.4 + tslib: 2.6.2 + dev: true + + /dotenv@16.4.1: + resolution: {integrity: sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==} + engines: {node: '>=12'} + dev: true + + /dset@3.1.3: + resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} + engines: {node: '>=4'} + dev: true + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /electron-to-chromium@1.4.648: - resolution: {integrity: sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==} + /electron-to-chromium@1.4.656: + resolution: {integrity: sha512-9AQB5eFTHyR3Gvt2t/NwR0le2jBSUNwCnMbUCejFWHD+so4tH40/dRLgoE+jxlPeWS43XJewyvCv+I8LPMl49Q==} dev: true /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - dev: true /emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + /esbuild@0.19.12: resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} engines: {node: '>=12'} @@ -1348,7 +3038,6 @@ packages: /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - dev: true /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -1420,7 +3109,7 @@ packages: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.0 + ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -1470,6 +3159,24 @@ packages: engines: {node: '>=0.10.0'} dev: true + /external-editor@3.1.0: + resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} + engines: {node: '>=4'} + dependencies: + chardet: 0.7.0 + iconv-lite: 0.4.24 + tmp: 0.0.33 + dev: true + + /extract-files@11.0.0: + resolution: {integrity: sha512-FuoE1qtbJ4bBVvv94CC7s0oTnKUGvQs+Rjf1L2SJFfS+HTVVjhPFtehPdQ0JiGPqVNfSSZvL5yzHHQq2Z4WNhQ==} + engines: {node: ^12.20 || >= 14.13} + dev: true + + /fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + dev: true + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -1493,12 +3200,55 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-querystring@1.1.2: + resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} + dependencies: + fast-decode-uri-component: 1.0.1 + dev: true + + /fast-url-parser@1.1.3: + resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} + dependencies: + punycode: 1.4.1 + dev: true + /fastq@1.17.0: resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} dependencies: reusify: 1.0.4 dev: true + /fb-watchman@2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + dependencies: + bser: 2.1.1 + dev: true + + /fbjs-css-vars@1.0.2: + resolution: {integrity: sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==} + dev: true + + /fbjs@3.0.5: + resolution: {integrity: sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg==} + dependencies: + cross-fetch: 3.1.8 + fbjs-css-vars: 1.0.2 + loose-envify: 1.4.0 + object-assign: 4.1.1 + promise: 7.3.1 + setimmediate: 1.0.5 + ua-parser-js: 1.0.37 + transitivePeerDependencies: + - encoding + dev: true + + /figures@3.2.0: + resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} + engines: {node: '>=8'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1511,6 +3261,13 @@ packages: engines: {node: '>=8'} dependencies: to-regex-range: 5.0.1 + + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 dev: true /find-up@5.0.0: @@ -1555,7 +3312,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] requiresBuild: true - dev: true optional: true /function-bind@1.1.2: @@ -1567,12 +3323,24 @@ packages: engines: {node: '>=6.9.0'} dev: true + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + /get-intrinsic@1.2.2: + resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + dependencies: + function-bind: 1.1.2 + has-proto: 1.0.1 + has-symbols: 1.0.3 + hasown: 2.0.0 + dev: true + /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} dependencies: is-glob: 4.0.3 - dev: true /glob-parent@6.0.2: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} @@ -1623,15 +3391,85 @@ packages: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.0 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 dev: true + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.2 + dev: true + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true + /graphql-config@5.0.3(@types/node@20.11.16)(graphql@16.8.1)(typescript@5.3.3): + resolution: {integrity: sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==} + engines: {node: '>= 16.0.0'} + peerDependencies: + cosmiconfig-toml-loader: ^1.0.0 + graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + peerDependenciesMeta: + cosmiconfig-toml-loader: + optional: true + dependencies: + '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) + '@graphql-tools/load': 8.0.1(graphql@16.8.1) + '@graphql-tools/merge': 9.0.1(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.1(@types/node@20.11.16)(graphql@16.8.1) + '@graphql-tools/utils': 10.0.13(graphql@16.8.1) + cosmiconfig: 8.3.6(typescript@5.3.3) + graphql: 16.8.1 + jiti: 1.21.0 + minimatch: 4.2.3 + string-env-interpolation: 1.0.1 + tslib: 2.6.2 + transitivePeerDependencies: + - '@types/node' + - bufferutil + - encoding + - typescript + - utf-8-validate + dev: true + + /graphql-request@6.1.0(graphql@16.8.1): + resolution: {integrity: sha512-p+XPfS4q7aIpKVcgmnZKhMNqhltk20hfXtkaIkTfjjmiKMJ5xrt5c743cL03y/K7y1rg3WrIC49xGiEQ4mxdNw==} + peerDependencies: + graphql: 14 - 16 + dependencies: + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) + cross-fetch: 3.1.8 + graphql: 16.8.1 + transitivePeerDependencies: + - encoding + + /graphql-tag@2.12.6(graphql@16.8.1): + resolution: {integrity: sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==} + engines: {node: '>=10'} + peerDependencies: + graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 + dependencies: + graphql: 16.8.1 + tslib: 2.5.3 + dev: true + + /graphql-ws@5.14.3(graphql@16.8.1): + resolution: {integrity: sha512-F/i2xNIVbaEF2xWggID0X/UZQa2V8kqKDPO8hwmu53bVOcTL7uNkxnexeEgSCVxYBQUTUNEI8+e4LO1FOhKPKQ==} + engines: {node: '>=10'} + peerDependencies: + graphql: '>=0.11 <=16' + dependencies: + graphql: 16.8.1 + dev: true + + /graphql@16.8.1: + resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} + engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -1642,6 +3480,22 @@ packages: engines: {node: '>=8'} dev: true + /has-property-descriptors@1.0.1: + resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + dependencies: + get-intrinsic: 1.2.2 + dev: true + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + dev: true + /hasown@2.0.0: resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} engines: {node: '>= 0.4'} @@ -1649,11 +3503,54 @@ packages: function-bind: 1.1.2 dev: true - /ignore@5.3.0: - resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} + /header-case@2.0.4: + resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} + dependencies: + capital-case: 1.0.4 + tslib: 2.6.2 + dev: true + + /http-proxy-agent@7.0.0: + resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /https-proxy-agent@7.0.2: + resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==} + engines: {node: '>= 14'} + dependencies: + agent-base: 7.1.0 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: true + + /iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: true + + /ignore@5.3.1: + resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} dev: true + /immutable@3.7.6: + resolution: {integrity: sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw==} + engines: {node: '>=0.8.0'} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -1662,11 +3559,21 @@ packages: resolve-from: 4.0.0 dev: true + /import-from@4.0.0: + resolution: {integrity: sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==} + engines: {node: '>=12.2'} + dev: true + /imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} dev: true + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -1678,12 +3585,50 @@ packages: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true + /inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.1 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + dev: true + + /invariant@2.2.4: + resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} + dependencies: + loose-envify: 1.4.0 + dev: true + + /is-absolute@1.0.0: + resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==} + engines: {node: '>=0.10.0'} + dependencies: + is-relative: 1.0.0 + is-windows: 1.0.2 + dev: true + + /is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + /is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} dependencies: binary-extensions: 2.2.0 - dev: true /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} @@ -1694,34 +3639,83 @@ packages: /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} - dev: true /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} dependencies: is-extglob: 2.1.1 + + /is-interactive@1.0.0: + resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} + engines: {node: '>=8'} + dev: true + + /is-lower-case@2.0.2: + resolution: {integrity: sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ==} + dependencies: + tslib: 2.6.2 dev: true /is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - dev: true /is-path-inside@3.0.3: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} dev: true + /is-relative@1.0.0: + resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==} + engines: {node: '>=0.10.0'} + dependencies: + is-unc-path: 1.0.0 + dev: true + + /is-unc-path@1.0.0: + resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} + engines: {node: '>=0.10.0'} + dependencies: + unc-path-regex: 0.1.2 + dev: true + + /is-unicode-supported@0.1.0: + resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} + engines: {node: '>=10'} + dev: true + + /is-upper-case@2.0.2: + resolution: {integrity: sha512-44pxmxAvnnAOwBg4tHPnkfvgjPwbc5QIsSstNU+YcJ1ovxVzCWpSGosPJOZh/a1tdl81fbgnLc9LLv+x2ywbPQ==} + dependencies: + tslib: 2.6.2 + dev: true + + /is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws@5.0.0(ws@8.16.0): + resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + peerDependencies: + ws: '*' + dependencies: + ws: 8.16.0 + dev: true + /jackspeak@2.3.6: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} @@ -1736,6 +3730,10 @@ packages: hasBin: true dev: true + /jose@5.2.0: + resolution: {integrity: sha512-oW3PCnvyrcm1HMvGTzqjxxfnEs9EoFOFWi2HsEGhlFVOXxTE3K9GKWVMFoFw06yPUqwpvEWic1BmtUZBI/tIjw==} + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -1756,6 +3754,10 @@ packages: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: true + /json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -1764,12 +3766,34 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true + /json-stable-stringify@1.1.1: + resolution: {integrity: sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.5 + isarray: 2.0.5 + jsonify: 0.0.1 + object-keys: 1.1.1 + dev: true + + /json-to-pretty-yaml@1.2.2: + resolution: {integrity: sha512-rvm6hunfCcqegwYaG5T4yKJWxc9FXFgBVrcTZ4XfSVRwa5HA/Xs+vB/Eo9treYYHCeNM0nrSUr82V/M31Urc7A==} + engines: {node: '>= 0.2.0'} + dependencies: + remedial: 1.0.8 + remove-trailing-spaces: 1.0.8 + dev: true + /json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true dev: true + /jsonify@0.0.1: + resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} + dev: true + /keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: @@ -1798,6 +3822,32 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /listr2@4.0.5: + resolution: {integrity: sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA==} + engines: {node: '>=12'} + peerDependencies: + enquirer: '>= 2.3.0 < 3' + peerDependenciesMeta: + enquirer: + optional: true + dependencies: + cli-truncate: 2.1.0 + colorette: 2.0.20 + log-update: 4.0.0 + p-map: 4.0.0 + rfdc: 1.3.1 + rxjs: 7.8.1 + through: 2.3.8 + wrap-ansi: 7.0.0 + dev: true + + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -1809,12 +3859,50 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + dev: true + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + + /log-symbols@4.1.0: + resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} + engines: {node: '>=10'} + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + dev: true + + /log-update@4.0.0: + resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} + engines: {node: '>=10'} + dependencies: + ansi-escapes: 4.3.2 + cli-cursor: 3.1.0 + slice-ansi: 4.0.0 + wrap-ansi: 6.2.0 + dev: true + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true dependencies: js-tokens: 4.0.0 + /lower-case-first@2.0.2: + resolution: {integrity: sha512-EVm/rR94FJTZi3zefZ82fLWab+GX14LJN4HrWBcuo6Evmsl9hEfnqxgcHCKb9q+mNf6EVdsjx/qucYFIIB84pg==} + dependencies: + tslib: 2.6.2 + dev: true + + /lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + dependencies: + tslib: 2.6.2 + dev: true + /lru-cache@10.2.0: resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} engines: {node: 14 || >=16.14} @@ -1833,11 +3921,32 @@ packages: yallist: 4.0.0 dev: true + /make-error@1.3.6: + resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + dev: true + + /map-cache@0.2.2: + resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} + engines: {node: '>=0.10.0'} + dev: true + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} dev: true + /meros@1.3.0(@types/node@20.11.16): + resolution: {integrity: sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w==} + engines: {node: '>=13'} + peerDependencies: + '@types/node': '>=13' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + '@types/node': 20.11.16 + dev: true + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -1846,12 +3955,24 @@ packages: picomatch: 2.3.1 dev: true + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: true + /minimatch@4.2.3: + resolution: {integrity: sha512-lIUdtK5hdofgCTu3aT0sOaHsYR37viUuIc0rwnnDXImbwFRcumyLMeZaM0t0I/fgxS6s6JMfu0rLD1Wz9pv1ng==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 1.1.11 + dev: true + /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -1868,6 +3989,10 @@ packages: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true + /mute-stream@0.0.8: + resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} + dev: true + /mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} dependencies: @@ -1886,20 +4011,57 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + dependencies: + lower-case: 2.0.2 + tslib: 2.6.2 + dev: true + + /node-addon-api@7.1.0: + resolution: {integrity: sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==} + engines: {node: ^16 || ^18 || >= 20} + dev: true + + /node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + + /node-int64@0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + dev: true + /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /normalize-path@2.1.1: + resolution: {integrity: sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==} + engines: {node: '>=0.10.0'} + dependencies: + remove-trailing-separator: 1.1.0 + dev: true + /normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - dev: true /normalize-range@0.1.2: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} dev: true + /nullthrows@1.1.1: + resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==} + dev: true + /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -1910,12 +4072,24 @@ packages: engines: {node: '>= 6'} dev: true + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -1928,25 +4102,111 @@ packages: type-check: 0.4.0 dev: true + /ora@5.4.1: + resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} + engines: {node: '>=10'} + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + dev: true + + /os-tmpdir@1.0.2: + resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} + engines: {node: '>=0.10.0'} + dev: true + + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} dependencies: - yocto-queue: 0.1.0 + yocto-queue: 0.1.0 + dev: true + + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + + /p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + dependencies: + p-limit: 3.1.0 + dev: true + + /p-map@4.0.0: + resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} + engines: {node: '>=10'} + dependencies: + aggregate-error: 3.1.0 + dev: true + + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + + /param-case@3.0.4: + resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} + dependencies: + dot-case: 3.0.4 + tslib: 2.6.2 + dev: true + + /parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + dependencies: + callsites: 3.1.0 + dev: true + + /parse-filepath@1.0.2: + resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==} + engines: {node: '>=0.8'} + dependencies: + is-absolute: 1.0.0 + map-cache: 0.2.2 + path-root: 0.1.1 + dev: true + + /parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.23.5 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 dev: true - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + /pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: - p-limit: 3.1.0 + no-case: 3.0.4 + tslib: 2.6.2 dev: true - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + /path-case@3.0.4: + resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: - callsites: 3.1.0 + dot-case: 3.0.4 + tslib: 2.6.2 dev: true /path-exists@4.0.0: @@ -1968,6 +4228,18 @@ packages: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} dev: true + /path-root-regex@0.1.2: + resolution: {integrity: sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==} + engines: {node: '>=0.10.0'} + dev: true + + /path-root@0.1.1: + resolution: {integrity: sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==} + engines: {node: '>=0.10.0'} + dependencies: + path-root-regex: 0.1.2 + dev: true + /path-scurry@1.10.1: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} @@ -1988,7 +4260,6 @@ packages: /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - dev: true /pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} @@ -2012,6 +4283,18 @@ packages: resolve: 1.22.8 dev: true + /postcss-import@16.0.0(postcss@8.4.33): + resolution: {integrity: sha512-e77lhVvrD1I2y7dYmBv0k9ULTdArgEYZt97T4w6sFIU5uxIHvDFQlKgUUyY7v7Barj0Yf/zm5A4OquZN7jKm5Q==} + engines: {node: '>=18.0.0'} + peerDependencies: + postcss: ^8.0.0 + dependencies: + postcss: 8.4.33 + postcss-value-parser: 4.2.0 + read-cache: 1.0.0 + resolve: 1.22.8 + dev: true + /postcss-js@4.0.1(postcss@8.4.33): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} @@ -2022,7 +4305,7 @@ packages: postcss: 8.4.33 dev: true - /postcss-load-config@4.0.2(postcss@8.4.33): + /postcss-load-config@4.0.2(postcss@8.4.33)(ts-node@10.9.2): resolution: {integrity: sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==} engines: {node: '>= 14'} peerDependencies: @@ -2036,6 +4319,7 @@ packages: dependencies: lilconfig: 3.0.0 postcss: 8.4.33 + ts-node: 10.9.2(@types/node@20.11.16)(typescript@5.3.3) yaml: 2.3.4 dev: true @@ -2079,6 +4363,15 @@ packages: resolution: {integrity: sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==} engines: {node: '>=14'} hasBin: true + + /promise@7.3.1: + resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} + dependencies: + asap: 2.0.6 + dev: true + + /punycode@1.4.1: + resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} dev: true /punycode@2.3.1: @@ -2086,6 +4379,17 @@ packages: engines: {node: '>=6'} dev: true + /pvtsutils@1.3.5: + resolution: {integrity: sha512-ARvb14YB9Nm2Xi6nBq1ZX6dAM0FsJnuk+31aUp4TrcZEdKUlSqOqsxJHUPJDNE3qiIp+iUPEIeR6Je/tgV7zsA==} + dependencies: + tslib: 2.6.2 + dev: true + + /pvutils@1.1.3: + resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} + engines: {node: '>=6.0.0'} + dev: true + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -2107,6 +4411,19 @@ packages: react: 18.2.0 dev: false + /react-intersection-observer@9.6.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-ZJCi6aOY4kIulpUhWRNIFTyMUKOmSA25iw8sKH07fhlqWTaWD5CWvWarqH4N31EyjCFKsgetvr/amRpnuEWzRg==} + peerDependencies: + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + peerDependenciesMeta: + react-dom: + optional: true + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /react-refresh@0.14.0: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} engines: {node: '>=0.10.0'} @@ -2124,22 +4441,65 @@ packages: pify: 2.3.0 dev: true + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} dependencies: picomatch: 2.3.1 - dev: true /regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: true + /relay-runtime@12.0.0: + resolution: {integrity: sha512-QU6JKr1tMsry22DXNy9Whsq5rmvwr3LSZiiWV/9+DFpuTWvp+WFhobWMc8TC4OjKFfNhEZy7mOiqUAn5atQtug==} + dependencies: + '@babel/runtime': 7.23.9 + fbjs: 3.0.5 + invariant: 2.2.4 + transitivePeerDependencies: + - encoding + dev: true + + /remedial@1.0.8: + resolution: {integrity: sha512-/62tYiOe6DzS5BqVsNpH/nkGlX45C/Sp6V+NtiN6JQNS1Viay7cWkazmRkrQrdFj2eshDe96SIQNIoMxqhzBOg==} + dev: true + + /remove-trailing-separator@1.1.0: + resolution: {integrity: sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==} + dev: true + + /remove-trailing-spaces@1.0.8: + resolution: {integrity: sha512-O3vsMYfWighyFbTd8hk8VaSj9UAGENxAtX+//ugIst2RMk5e03h6RoIS+0ylsFxY1gvmPuAY/PO4It+gPEeySA==} + dev: true + + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + /require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + /resolve@1.22.8: resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true @@ -2149,11 +4509,23 @@ packages: supports-preserve-symlinks-flag: 1.0.0 dev: true + /restore-cursor@3.1.0: + resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} + engines: {node: '>=8'} + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + dev: true + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rfdc@1.3.1: + resolution: {integrity: sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==} + dev: true + /rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true @@ -2184,17 +4556,40 @@ packages: fsevents: 2.3.3 dev: true + /run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + dev: true + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: true + /rxjs@7.8.1: + resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + dependencies: + tslib: 2.6.2 + dev: true + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: true + + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + dev: true + /scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: loose-envify: 1.4.0 + /scuid@1.1.0: + resolution: {integrity: sha512-MuCAyrGZcTLfQoH2XoBlQ8C6bzwN88XT/0slOGz0pn8+gIP85BOAfYa44ZXQUTOwRwPU0QvgU+V+OSajl/59Xg==} + dev: true + /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -2208,6 +4603,33 @@ packages: lru-cache: 6.0.0 dev: true + /sentence-case@3.0.4: + resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} + dependencies: + no-case: 3.0.4 + tslib: 2.6.2 + upper-case-first: 2.0.2 + dev: true + + /set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true + + /set-function-length@1.2.0: + resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} + engines: {node: '>= 0.4'} + dependencies: + define-data-property: 1.1.1 + function-bind: 1.1.2 + get-intrinsic: 1.2.2 + gopd: 1.0.1 + has-property-descriptors: 1.0.1 + dev: true + + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: true + /shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -2220,21 +4642,77 @@ packages: engines: {node: '>=8'} dev: true + /shell-quote@1.8.1: + resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + dev: true + + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + /signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} dev: true + /signedsource@1.0.0: + resolution: {integrity: sha512-6+eerH9fEnNmi/hyM1DXcRK3pWdoMQtlkQ+ns0ntzunjKqp5i3sKCc80ym8Fib3iaYhdJUOPdhlJWj1tvge2Ww==} + dev: true + /slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} dev: true + /slice-ansi@3.0.0: + resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: true + + /slice-ansi@4.0.0: + resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + astral-regex: 2.0.0 + is-fullwidth-code-point: 3.0.0 + dev: true + + /snake-case@3.0.4: + resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} + dependencies: + dot-case: 3.0.4 + tslib: 2.6.2 + dev: true + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} dev: true + /spawn-command@0.0.2: + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + dev: true + + /sponge-case@1.0.1: + resolution: {integrity: sha512-dblb9Et4DAtiZ5YSUZHLl4XhH4uK80GhAZrVXdN4O2P4gQ40Wa5UIOPUHlA/nFd2PLblBZWUioLMMAVrgpoYcA==} + dependencies: + tslib: 2.6.2 + dev: true + + /streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: true + + /string-env-interpolation@1.0.1: + resolution: {integrity: sha512-78lwMoCcn0nNu8LszbP1UA7g55OeE4v7rCeWnM5B453rnNr4aq+5it3FEYtZrSEiMvHZOZ9Jlqb0OD0M2VInqg==} + dev: true + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2242,7 +4720,6 @@ packages: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - dev: true /string-width@5.1.2: resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} @@ -2253,12 +4730,17 @@ packages: strip-ansi: 7.1.0 dev: true + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 - dev: true /strip-ansi@7.1.0: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} @@ -2300,12 +4782,25 @@ packages: has-flag: 4.0.0 dev: true + /supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + dev: true + /supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} dev: true - /tailwindcss@3.4.1: + /swap-case@2.0.2: + resolution: {integrity: sha512-kc6S2YS/2yXbtkSMunBtKdah4VFETZ8Oh6ONSmSd9bRxhqTrtARUCBUiWXH3xVPpvR7tz2CSnkuXVE42EcGnMw==} + dependencies: + tslib: 2.6.2 + dev: true + + /tailwindcss@3.4.1(ts-node@10.9.2): resolution: {integrity: sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==} engines: {node: '>=14.0.0'} hasBin: true @@ -2327,7 +4822,7 @@ packages: postcss: 8.4.33 postcss-import: 15.1.0(postcss@8.4.33) postcss-js: 4.0.1(postcss@8.4.33) - postcss-load-config: 4.0.2(postcss@8.4.33) + postcss-load-config: 4.0.2(postcss@8.4.33)(ts-node@10.9.2) postcss-nested: 6.0.1(postcss@8.4.33) postcss-selector-parser: 6.0.15 resolve: 1.22.8 @@ -2353,12 +4848,29 @@ packages: any-promise: 1.3.0 dev: true + /through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + dev: true + /tiny-invariant@1.3.1: resolution: {integrity: sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==} /tiny-warning@1.0.3: resolution: {integrity: sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==} + /title-case@3.0.3: + resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==} + dependencies: + tslib: 2.6.2 + dev: true + + /tmp@0.0.33: + resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} + engines: {node: '>=0.6.0'} + dependencies: + os-tmpdir: 1.0.2 + dev: true + /to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -2369,6 +4881,13 @@ packages: engines: {node: '>=8.0'} dependencies: is-number: 7.0.0 + + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true dev: true /ts-api-utils@1.0.3(typescript@5.3.3): @@ -2384,6 +4903,49 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true + /ts-log@2.2.5: + resolution: {integrity: sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==} + dev: true + + /ts-node@10.9.2(@types/node@20.11.16)(typescript@5.3.3): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.11.16 + acorn: 8.11.3 + acorn-walk: 8.3.2 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.3.3 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: true + + /tslib@2.5.3: + resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} + dev: true + + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -2396,12 +4958,41 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + dev: true + /typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true dev: true + /ua-parser-js@1.0.37: + resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==} + dev: true + + /unc-path-regex@0.1.2: + resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==} + engines: {node: '>=0.10.0'} + dev: true + + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + + /unixify@1.0.0: + resolution: {integrity: sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==} + engines: {node: '>=0.10.0'} + dependencies: + normalize-path: 2.1.1 + dev: true + + /unstated-next@1.1.0: + resolution: {integrity: sha512-AAn47ZncPvgBGOvMcn8tSRxsrqwf2VdAPxLASTuLJvZt4rhKfDvUkmYZLGfclImSfTVMv7tF4ynaVxin0JjDCA==} + dev: false + /update-browserslist-db@1.0.13(browserslist@4.22.3): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -2413,12 +5004,32 @@ packages: picocolors: 1.0.0 dev: true + /upper-case-first@2.0.2: + resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} + dependencies: + tslib: 2.6.2 + dev: true + + /upper-case@2.0.2: + resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} + dependencies: + tslib: 2.6.2 + dev: true + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.1 dev: true + /urlpattern-polyfill@10.0.0: + resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==} + dev: true + + /urlpattern-polyfill@8.0.2: + resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} + dev: true + /use-sync-external-store@1.2.0(react@18.2.0): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} peerDependencies: @@ -2430,7 +5041,16 @@ packages: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true - /vite@5.0.12: + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: true + + /value-or-promise@1.0.12: + resolution: {integrity: sha512-Z6Uz+TYwEqE7ZN50gwn+1LCVo9ZVrpxRPOhOLnncYkY1ZzOYtrX8Fwf/rFktZ8R5mJms6EZf5TqNOMeZmnPq9Q==} + engines: {node: '>=12'} + dev: true + + /vite@5.0.12(@types/node@20.11.16): resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -2458,6 +5078,7 @@ packages: terser: optional: true dependencies: + '@types/node': 20.11.16 esbuild: 0.19.12 postcss: 8.4.33 rollup: 4.9.6 @@ -2465,6 +5086,40 @@ packages: fsevents: 2.3.3 dev: true + /wcwidth@1.0.1: + resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} + dependencies: + defaults: 1.0.4 + dev: true + + /web-streams-polyfill@3.3.2: + resolution: {integrity: sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==} + engines: {node: '>= 8'} + dev: true + + /webcrypto-core@1.7.8: + resolution: {integrity: sha512-eBR98r9nQXTqXt/yDRtInszPMjTaSAMJAFDg2AHsgrnczawT1asx9YNBX6k5p+MekbPF4+s/UJJrr88zsTqkSg==} + dependencies: + '@peculiar/asn1-schema': 2.3.8 + '@peculiar/json-schema': 1.1.12 + asn1js: 3.0.5 + pvtsutils: 1.3.5 + tslib: 2.6.2 + dev: true + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + /which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + dev: true + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2473,6 +5128,15 @@ packages: isexe: 2.0.0 dev: true + /wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -2480,7 +5144,6 @@ packages: ansi-styles: 4.3.0 string-width: 4.2.3 strip-ansi: 6.0.1 - dev: true /wrap-ansi@8.1.0: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} @@ -2495,6 +5158,27 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /ws@8.16.0: + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + + /y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true + + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true @@ -2503,11 +5187,61 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true + /yaml-ast-parser@0.0.43: + resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} + dev: true + /yaml@2.3.4: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} dev: true + /yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + /yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + dev: true + + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + /yn@3.1.1: + resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} + engines: {node: '>=6'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -2515,4 +5249,3 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - dev: true diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index 2e7af2b7..4e85a41e 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -1,6 +1,7 @@ export default { plugins: { + "postcss-import": {}, tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/frontend/src/components/Book.tsx b/frontend/src/components/Book.tsx new file mode 100644 index 00000000..63ca376d --- /dev/null +++ b/frontend/src/components/Book.tsx @@ -0,0 +1,26 @@ +import { FragmentType, useFragment } from "../gql/fragment-masking"; +import { graphql } from "../gql/gql"; + +export const BookFragment = graphql(/* GraphQL */ ` + fragment BookItem on Book { + id + title + authors { + name + } + description + } +`); + +export function Book({ book }: { book: FragmentType }) { + const bk = useFragment(BookFragment, book); + return ( +
+

{bk.title}

+

+ by {bk.authors?.map((a) => {a.name})} +

+

{bk.description}

+
+ ); +} diff --git a/frontend/src/components/Login/Button.tsx b/frontend/src/components/Login/Button.tsx new file mode 100644 index 00000000..5191e145 --- /dev/null +++ b/frontend/src/components/Login/Button.tsx @@ -0,0 +1,29 @@ +export enum ButtonColor { + Primary = 1, + Accent, +} + +interface ButtonProps { + color: ButtonColor; + children: React.ReactNode; + onClick?: () => void; +} + +export default function Button({ color, children, onClick }: ButtonProps) { + const onClickFunc = onClick || (() => {}); + const bgColor = + color === ButtonColor.Primary ? "bg-primary-500" : "bg-accent-500"; + const hoverColor = + color === ButtonColor.Primary + ? "hover:bg-primary-400" + : "hover:bg-accent-400"; + return ( + + ); +} diff --git a/frontend/src/components/Login/Form.tsx b/frontend/src/components/Login/Form.tsx new file mode 100644 index 00000000..7f2e7468 --- /dev/null +++ b/frontend/src/components/Login/Form.tsx @@ -0,0 +1,23 @@ +interface FormProps { + children: React.ReactNode; + inactiveTranslate: string; + isActive: boolean; + onSubmit?: (evt: React.FormEvent) => void; +} +export default function Form({ + children, + isActive, + inactiveTranslate, + onSubmit, +}: FormProps) { + const t = isActive ? "" : inactiveTranslate; + const handleSubmit = onSubmit || (() => {}); + return ( +
+ {children} +
+ ); +} diff --git a/frontend/src/components/Login/FormField.tsx b/frontend/src/components/Login/FormField.tsx new file mode 100644 index 00000000..0f2f9ecf --- /dev/null +++ b/frontend/src/components/Login/FormField.tsx @@ -0,0 +1,38 @@ +import { IconType } from "react-icons"; + +interface FormFieldProps { + name: string; + placeholder: string; + type: string; + Icon: IconType; + isSubmitting?: boolean; + state: string; + setState?: (value: string) => void; +} + +export default function FormField({ + name, + placeholder, + type, + Icon, + state, + setState, + isSubmitting, +}: FormFieldProps) { + const set = setState || (() => {}); + const disabled = isSubmitting || false; + return ( +
+ + set(e.target.value)} + /> +
+ ); +} diff --git a/frontend/src/components/Login/LoginError.tsx b/frontend/src/components/Login/LoginError.tsx new file mode 100644 index 00000000..0cbf9a0a --- /dev/null +++ b/frontend/src/components/Login/LoginError.tsx @@ -0,0 +1,20 @@ +export default function LoginError({ + message, + visible, + onClick, +}: { + message: string; + visible: boolean; + onClick?: () => void; +}) { + const opacity = visible ? "opacity-100" : "opacity-0"; + const onClickFunc = onClick || (() => {}); + return ( +
+ {message} +
+ ); +} diff --git a/frontend/src/components/Login/LoginForm.tsx b/frontend/src/components/Login/LoginForm.tsx new file mode 100644 index 00000000..3f1aa4eb --- /dev/null +++ b/frontend/src/components/Login/LoginForm.tsx @@ -0,0 +1,120 @@ +import React, { useState } from "react"; +import { useNavigate } from "@tanstack/react-router"; +import { UnauthorizedError, useAuth } from "../../context/AuthProvider"; +import Form from "./Form"; +import FormField from "./FormField"; +import Button, { ButtonColor } from "./Button"; +import LoginError from "./LoginError"; +import { FaRegUser } from "react-icons/fa"; +import { MdLockOutline } from "react-icons/md"; + +export default function LoginForm({ + inactiveTranslate, + setRegister, + isActive, + redirect, +}: { + inactiveTranslate: string; + setRegister: () => void; + isActive: boolean; + redirect: string; +}) { + const [username, setUsername] = useState(""); + const [password, setPassword] = useState(""); + const { login } = useAuth(); + const navigate = useNavigate({ from: "/login" }); + const [isSubmitting, setIsSubmitting] = useState(false); + const [error, setError] = useState(""); + + const handleLogin = (evt: React.FormEvent) => { + evt.preventDefault(); + setIsSubmitting(true); + + login(username, password) + .then(() => { + navigate({ to: redirect }); + }) + .catch((error) => { + console.log(error); + if (error == UnauthorizedError) { + setError("Invalid username or password"); + } else { + setError("An error occurred"); + } + setUsername(""); + setPassword(""); + setIsSubmitting(false); + }); + }; + const handleSetRegister = () => { + setError(""); + setRegister(); + }; + return ( +
+ {/* Sign In */} +

+ Sign in to Start Reading +

+
+ setError("")} + /> + setUsername(value)} + /> + setPassword(value)} + /> + + +
+ + + Forgot Password? + +
+ +
+
+

or

+
+
+ + + +
+

+ Don't have an account?{" "} + + Sign up + +

{" "} +
+ + ); +} diff --git a/frontend/src/components/Login/RegisterForm.tsx b/frontend/src/components/Login/RegisterForm.tsx new file mode 100644 index 00000000..614b7e21 --- /dev/null +++ b/frontend/src/components/Login/RegisterForm.tsx @@ -0,0 +1,73 @@ +import { useState } from "react"; +import Form from "./Form"; +import FormField from "./FormField"; +import Button, { ButtonColor } from "./Button"; +import { FaRegUser, FaRegEnvelope } from "react-icons/fa"; +import { MdLockOutline } from "react-icons/md"; + +export default function RegisterForm({ + inactiveTranslate, + isActive, + setSignIn, +}: { + inactiveTranslate: string; + isActive: boolean; + setSignIn: () => void; +}) { + const [username, setUsername] = useState(""); + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + return ( +
+

+ Create an Account +

+
+ setUsername(value)} + Icon={FaRegUser} + /> + setEmail(value)} + Icon={FaRegEnvelope} + /> + setPassword(value)} + Icon={MdLockOutline} + /> + + +
+
+

or

+
+
+ + +
+

+ Already Registered?{" "} + setSignIn()} + > + Sign in + +

{" "} +
+ + ); +} diff --git a/frontend/src/context/AuthProvider.tsx b/frontend/src/context/AuthProvider.tsx new file mode 100644 index 00000000..98c034e9 --- /dev/null +++ b/frontend/src/context/AuthProvider.tsx @@ -0,0 +1,169 @@ +import React from "react"; +import { useState, useCallback, useEffect, createContext } from "react"; +import { TokenResponse, useToken } from "../hooks/useToken"; +import { useDebounce } from "../hooks/useDebounce"; + +enum AuthEvents { + LOGIN = "login", + LOGOUT = "logout", +} + +export const UnauthorizedError = new Error("Unauthorized"); +export const ForbiddenError = new Error("Forbidden"); +export const InternalServerError = new Error("Internal Server Error"); +export const UnknownError = new Error("Unknown Error"); + +export interface UserBase { + name: string; + email: string; + password: string; +} + +export interface UserPermissions { + admin: boolean; + can_create_public: boolean; + can_edit: boolean; +} + +export interface User extends UserBase { + id: string; + userPermissions: UserPermissions; +} + +interface UserAndTokenResponse extends TokenResponse { + user: User; +} + +export interface AuthContext { + user: User | null; + setUser: (user: User) => void; + loggedIn: boolean; + login: (username: string, password: string) => Promise; + logout: () => Promise; + refreshToken: () => void; + initialized: boolean; + fetcher: typeof fetch; +} + +const AuthContext = createContext(null); + +interface AuthProviderProps { + children: React.ReactNode; +} + +export function AuthProvider({ children }: AuthProviderProps) { + const [user, setUser] = useState(null); + const loggedIn = !!user; + + const [initialized, setInitialized] = useState(false); + const debouncedRefresh = useDebounce(refresh, 100); + const refreshToken = useCallback(refresh, []); + const debouncedRefreshToken = useCallback(debouncedRefresh, []); + + const onTokenInvalid = () => setUser(null); + const { setToken, clearToken, isAuthenticated, fetcher } = useToken( + onTokenInvalid, + refreshToken + ); + + useEffect(() => { + refreshToken().finally(() => setInitialized(true)); + }, [refreshToken]); + + useEffect(() => { + window.addEventListener( + "storage", + async (event: WindowEventMap["storage"]) => { + if (event.key === AuthEvents.LOGOUT && isAuthenticated()) { + await clearToken(false); + setUser(null); + } else if (event.key === AuthEvents.LOGIN && !isAuthenticated()) { + // Debounce the refresh token to avoid multiple requests + debouncedRefreshToken(); + } + } + ); + }, [clearToken, isAuthenticated, refreshToken]); + + const logout = useCallback(async () => { + return clearToken().then(() => { + setUser(null); + window.localStorage.setItem(AuthEvents.LOGOUT, new Date().toISOString()); + }); + }, [clearToken]); + + const login = useCallback( + async (username: string, password: string) => { + return fetcher("/auth/password", { + method: "POST", + body: JSON.stringify({ username, password }), + }) + .then((res) => { + if (res.ok) { + return res.json(); + } + switch (res.status) { + case 401: + throw UnauthorizedError; + case 403: + throw ForbiddenError; + case 500: + throw InternalServerError; + default: + throw UnknownError; + } + throw new Error("Login failed"); + }) + .then((data: UserAndTokenResponse) => { + setToken(data); + setUser(data.user); + window.localStorage.setItem( + AuthEvents.LOGIN, + new Date().toISOString() + ); + console.log("Logged in. User: ", data.user); + }) + .catch((error) => { + console.error("Login failed: ", error); + throw error; + }); + }, + [fetcher, setToken] + ); + + async function refresh() { + const response = await fetcher("/auth/refresh"); + if (response.ok) { + const res: UserAndTokenResponse = await response.json(); + setUser(res.user); + setToken(res); + response.headers.get("X-Request-ID"); + console.log("Token Refreshed."); + } + } + + return ( + + {children} + + ); +} + +export function useAuth() { + const context = React.useContext(AuthContext); + if (!context) { + throw new Error("useAuth must be used within an AuthProvider"); + } + return context; +} diff --git a/frontend/src/context/GraphQLProvider.tsx b/frontend/src/context/GraphQLProvider.tsx new file mode 100644 index 00000000..f4fa7ee8 --- /dev/null +++ b/frontend/src/context/GraphQLProvider.tsx @@ -0,0 +1,28 @@ +import React from "react"; +import { createContext } from "react"; +import { GraphQLClient } from "graphql-request"; +import { useAuth } from "./AuthProvider"; + +export interface GraphQLContext { + graphql: GraphQLClient; +} + +const GraphQLContext = createContext(null); + +export function GraphQLProvider({ children }: { children: React.ReactNode }) { + const { fetcher } = useAuth(); + const graphql = new GraphQLClient("/graphql", { fetch: fetcher }); + return ( + + {children} + + ); +} + +export function useGraphQLClient() { + const context = React.useContext(GraphQLContext); + if (!context) { + throw new Error("useGraphQL must be used within a GraphQLProvider"); + } + return context; +} diff --git a/frontend/src/gql/fragment-masking.ts b/frontend/src/gql/fragment-masking.ts new file mode 100644 index 00000000..2ba06f10 --- /dev/null +++ b/frontend/src/gql/fragment-masking.ts @@ -0,0 +1,66 @@ +import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import { FragmentDefinitionNode } from 'graphql'; +import { Incremental } from './graphql'; + + +export type FragmentType> = TDocumentType extends DocumentTypeDecoration< + infer TType, + any +> + ? [TType] extends [{ ' $fragmentName'?: infer TKey }] + ? TKey extends string + ? { ' $fragmentRefs'?: { [key in TKey]: TType } } + : never + : never + : never; + +// return non-nullable if `fragmentType` is non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> +): TType; +// return nullable if `fragmentType` is nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | null | undefined +): TType | null | undefined; +// return array of non-nullable if `fragmentType` is array of non-nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: ReadonlyArray>> +): ReadonlyArray; +// return array of nullable if `fragmentType` is array of nullable +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: ReadonlyArray>> | null | undefined +): ReadonlyArray | null | undefined; +export function useFragment( + _documentNode: DocumentTypeDecoration, + fragmentType: FragmentType> | ReadonlyArray>> | null | undefined +): TType | ReadonlyArray | null | undefined { + return fragmentType as any; +} + + +export function makeFragmentData< + F extends DocumentTypeDecoration, + FT extends ResultOf +>(data: FT, _fragment: F): FragmentType { + return data as FragmentType; +} +export function isFragmentReady( + queryNode: DocumentTypeDecoration, + fragmentNode: TypedDocumentNode, + data: FragmentType, any>> | null | undefined +): data is FragmentType { + const deferredFields = (queryNode as { __meta__?: { deferredFields: Record } }).__meta__ + ?.deferredFields; + + if (!deferredFields) return true; + + const fragDef = fragmentNode.definitions[0] as FragmentDefinitionNode | undefined; + const fragName = fragDef?.name?.value; + + const fields = (fragName && deferredFields[fragName]) || []; + return fields.length > 0 && fields.every(field => data && field in data); +} diff --git a/frontend/src/gql/gql.ts b/frontend/src/gql/gql.ts new file mode 100644 index 00000000..33413208 --- /dev/null +++ b/frontend/src/gql/gql.ts @@ -0,0 +1,47 @@ +/* eslint-disable */ +import * as types from './graphql'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; + +/** + * Map of all GraphQL operations in the project. + * + * This map has several performance disadvantages: + * 1. It is not tree-shakeable, so it will include all operations in the project. + * 2. It is not minifiable, so the string of a GraphQL query will be multiple times inside the bundle. + * 3. It does not support dead code elimination, so it will add unused operations. + * + * Therefore it is highly recommended to use the babel or swc plugin for production. + */ +const documents = { + "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n": types.BookItemFragmentDoc, + "\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n": types.AllBooksDocument, +}; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + * + * + * @example + * ```ts + * const query = graphql(`query GetUser($id: ID!) { user(id: $id) { name } }`); + * ``` + * + * The query argument is unknown! + * Please regenerate the types. + */ +export function graphql(source: string): unknown; + +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n"): (typeof documents)["\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n"]; +/** + * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. + */ +export function graphql(source: "\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n"): (typeof documents)["\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n"]; + +export function graphql(source: string) { + return (documents as any)[source] ?? {}; +} + +export type DocumentType> = TDocumentNode extends DocumentNode< infer TType, any> ? TType : never; \ No newline at end of file diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts new file mode 100644 index 00000000..b1b8cc20 --- /dev/null +++ b/frontend/src/gql/graphql.ts @@ -0,0 +1,2181 @@ +/* eslint-disable */ +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +export type Maybe = T | null; +export type InputMaybe = Maybe; +export type Exact = { [K in keyof T]: T[K] }; +export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; +export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; +/** All built-in and custom scalars, mapped to their actual values */ +export type Scalars = { + ID: { input: string; output: string; } + String: { input: string; output: string; } + Boolean: { input: boolean; output: boolean; } + Int: { input: number; output: number; } + Float: { input: number; output: number; } + /** + * Define a Relay Cursor type: + * https://relay.dev/graphql/connections.htm#sec-Cursor + */ + Cursor: { input: any; output: any; } + /** The builtin Time type */ + Time: { input: any; output: any; } +}; + +export type Author = Node & { + __typename?: 'Author'; + books: BookConnection; + calibreID?: Maybe; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + link?: Maybe; + name: Scalars['String']['output']; + sort: Scalars['String']['output']; + updateTime: Scalars['Time']['output']; +}; + + +export type AuthorBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +/** A connection to a list of items. */ +export type AuthorConnection = { + __typename?: 'AuthorConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type AuthorEdge = { + __typename?: 'AuthorEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Author connections */ +export type AuthorOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Authors. */ + field: AuthorOrderField; +}; + +/** Properties by which Author connections can be ordered. */ +export enum AuthorOrderField { + BooksCount = 'BOOKS_COUNT', + Name = 'NAME' +} + +/** + * AuthorWhereInput is used for filtering Author objects. + * Input was generated by ent. + */ +export type AuthorWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** link field predicates */ + link?: InputMaybe; + linkContains?: InputMaybe; + linkContainsFold?: InputMaybe; + linkEqualFold?: InputMaybe; + linkGT?: InputMaybe; + linkGTE?: InputMaybe; + linkHasPrefix?: InputMaybe; + linkHasSuffix?: InputMaybe; + linkIn?: InputMaybe>; + linkIsNil?: InputMaybe; + linkLT?: InputMaybe; + linkLTE?: InputMaybe; + linkNEQ?: InputMaybe; + linkNotIn?: InputMaybe>; + linkNotNil?: InputMaybe; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** sort field predicates */ + sort?: InputMaybe; + sortContains?: InputMaybe; + sortContainsFold?: InputMaybe; + sortEqualFold?: InputMaybe; + sortGT?: InputMaybe; + sortGTE?: InputMaybe; + sortHasPrefix?: InputMaybe; + sortHasSuffix?: InputMaybe; + sortIn?: InputMaybe>; + sortLT?: InputMaybe; + sortLTE?: InputMaybe; + sortNEQ?: InputMaybe; + sortNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +export type Book = Node & { + __typename?: 'Book'; + authors?: Maybe>; + calibreID?: Maybe; + createTime: Scalars['Time']['output']; + description?: Maybe; + files?: Maybe>; + id: Scalars['ID']['output']; + identifiers?: Maybe>; + isbn?: Maybe; + language?: Maybe>; + path: Scalars['String']['output']; + publishedDate?: Maybe; + publisher?: Maybe>; + series?: Maybe>; + seriesIndex?: Maybe; + shelf?: Maybe>; + sort: Scalars['String']['output']; + tags?: Maybe>; + title: Scalars['String']['output']; + updateTime: Scalars['Time']['output']; +}; + +/** A connection to a list of items. */ +export type BookConnection = { + __typename?: 'BookConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type BookEdge = { + __typename?: 'BookEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +export type BookFile = Node & { + __typename?: 'BookFile'; + book: Book; + createTime: Scalars['Time']['output']; + format: BookFileFormat; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + path: Scalars['String']['output']; + /** Size in bytes */ + size: Scalars['Int']['output']; + updateTime: Scalars['Time']['output']; +}; + +/** BookFileFormat is enum for the field format */ +export enum BookFileFormat { + Epub = 'EPUB', + Kepub = 'KEPUB' +} + +/** + * BookFileWhereInput is used for filtering BookFile objects. + * Input was generated by ent. + */ +export type BookFileWhereInput = { + and?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** format field predicates */ + format?: InputMaybe; + formatIn?: InputMaybe>; + formatNEQ?: InputMaybe; + formatNotIn?: InputMaybe>; + /** book edge predicates */ + hasBook?: InputMaybe; + hasBookWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** path field predicates */ + path?: InputMaybe; + pathContains?: InputMaybe; + pathContainsFold?: InputMaybe; + pathEqualFold?: InputMaybe; + pathGT?: InputMaybe; + pathGTE?: InputMaybe; + pathHasPrefix?: InputMaybe; + pathHasSuffix?: InputMaybe; + pathIn?: InputMaybe>; + pathLT?: InputMaybe; + pathLTE?: InputMaybe; + pathNEQ?: InputMaybe; + pathNotIn?: InputMaybe>; + /** size field predicates */ + size?: InputMaybe; + sizeGT?: InputMaybe; + sizeGTE?: InputMaybe; + sizeIn?: InputMaybe>; + sizeLT?: InputMaybe; + sizeLTE?: InputMaybe; + sizeNEQ?: InputMaybe; + sizeNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +/** Ordering options for Book connections */ +export type BookOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Books. */ + field: BookOrderField; +}; + +/** Properties by which Book connections can be ordered. */ +export enum BookOrderField { + FilesCount = 'FILES_COUNT', + Isbn = 'ISBN', + Name = 'NAME', + PubDate = 'PUB_DATE', + Title = 'TITLE' +} + +/** + * BookWhereInput is used for filtering Book objects. + * Input was generated by ent. + */ +export type BookWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** description field predicates */ + description?: InputMaybe; + descriptionContains?: InputMaybe; + descriptionContainsFold?: InputMaybe; + descriptionEqualFold?: InputMaybe; + descriptionGT?: InputMaybe; + descriptionGTE?: InputMaybe; + descriptionHasPrefix?: InputMaybe; + descriptionHasSuffix?: InputMaybe; + descriptionIn?: InputMaybe>; + descriptionIsNil?: InputMaybe; + descriptionLT?: InputMaybe; + descriptionLTE?: InputMaybe; + descriptionNEQ?: InputMaybe; + descriptionNotIn?: InputMaybe>; + descriptionNotNil?: InputMaybe; + /** authors edge predicates */ + hasAuthors?: InputMaybe; + hasAuthorsWith?: InputMaybe>; + /** files edge predicates */ + hasFiles?: InputMaybe; + hasFilesWith?: InputMaybe>; + /** identifiers edge predicates */ + hasIdentifiers?: InputMaybe; + hasIdentifiersWith?: InputMaybe>; + /** language edge predicates */ + hasLanguage?: InputMaybe; + hasLanguageWith?: InputMaybe>; + /** publisher edge predicates */ + hasPublisher?: InputMaybe; + hasPublisherWith?: InputMaybe>; + /** series edge predicates */ + hasSeries?: InputMaybe; + hasSeriesWith?: InputMaybe>; + /** shelf edge predicates */ + hasShelf?: InputMaybe; + hasShelfWith?: InputMaybe>; + /** tags edge predicates */ + hasTags?: InputMaybe; + hasTagsWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** isbn field predicates */ + isbn?: InputMaybe; + isbnContains?: InputMaybe; + isbnContainsFold?: InputMaybe; + isbnEqualFold?: InputMaybe; + isbnGT?: InputMaybe; + isbnGTE?: InputMaybe; + isbnHasPrefix?: InputMaybe; + isbnHasSuffix?: InputMaybe; + isbnIn?: InputMaybe>; + isbnIsNil?: InputMaybe; + isbnLT?: InputMaybe; + isbnLTE?: InputMaybe; + isbnNEQ?: InputMaybe; + isbnNotIn?: InputMaybe>; + isbnNotNil?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + /** path field predicates */ + path?: InputMaybe; + pathContains?: InputMaybe; + pathContainsFold?: InputMaybe; + pathEqualFold?: InputMaybe; + pathGT?: InputMaybe; + pathGTE?: InputMaybe; + pathHasPrefix?: InputMaybe; + pathHasSuffix?: InputMaybe; + pathIn?: InputMaybe>; + pathLT?: InputMaybe; + pathLTE?: InputMaybe; + pathNEQ?: InputMaybe; + pathNotIn?: InputMaybe>; + /** published_date field predicates */ + publishedDate?: InputMaybe; + publishedDateGT?: InputMaybe; + publishedDateGTE?: InputMaybe; + publishedDateIn?: InputMaybe>; + publishedDateIsNil?: InputMaybe; + publishedDateLT?: InputMaybe; + publishedDateLTE?: InputMaybe; + publishedDateNEQ?: InputMaybe; + publishedDateNotIn?: InputMaybe>; + publishedDateNotNil?: InputMaybe; + /** series_index field predicates */ + seriesIndex?: InputMaybe; + seriesIndexGT?: InputMaybe; + seriesIndexGTE?: InputMaybe; + seriesIndexIn?: InputMaybe>; + seriesIndexIsNil?: InputMaybe; + seriesIndexLT?: InputMaybe; + seriesIndexLTE?: InputMaybe; + seriesIndexNEQ?: InputMaybe; + seriesIndexNotIn?: InputMaybe>; + seriesIndexNotNil?: InputMaybe; + /** sort field predicates */ + sort?: InputMaybe; + sortContains?: InputMaybe; + sortContainsFold?: InputMaybe; + sortEqualFold?: InputMaybe; + sortGT?: InputMaybe; + sortGTE?: InputMaybe; + sortHasPrefix?: InputMaybe; + sortHasSuffix?: InputMaybe; + sortIn?: InputMaybe>; + sortLT?: InputMaybe; + sortLTE?: InputMaybe; + sortNEQ?: InputMaybe; + sortNotIn?: InputMaybe>; + /** title field predicates */ + title?: InputMaybe; + titleContains?: InputMaybe; + titleContainsFold?: InputMaybe; + titleEqualFold?: InputMaybe; + titleGT?: InputMaybe; + titleGTE?: InputMaybe; + titleHasPrefix?: InputMaybe; + titleHasSuffix?: InputMaybe; + titleIn?: InputMaybe>; + titleLT?: InputMaybe; + titleLTE?: InputMaybe; + titleNEQ?: InputMaybe; + titleNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +/** + * CreateAuthorInput is used for create Author object. + * Input was generated by ent. + */ +export type CreateAuthorInput = { + bookIDs?: InputMaybe>; + calibreID?: InputMaybe; + createTime?: InputMaybe; + link?: InputMaybe; + name: Scalars['String']['input']; + sort: Scalars['String']['input']; + updateTime?: InputMaybe; +}; + +/** + * CreateBookInput is used for create Book object. + * Input was generated by ent. + */ +export type CreateBookInput = { + authorIDs?: InputMaybe>; + calibreID?: InputMaybe; + createTime?: InputMaybe; + description?: InputMaybe; + fileIDs?: InputMaybe>; + identifierIDs?: InputMaybe>; + isbn?: InputMaybe; + languageIDs?: InputMaybe>; + path: Scalars['String']['input']; + publishedDate?: InputMaybe; + publisherIDs?: InputMaybe>; + seriesIDs?: InputMaybe>; + seriesIndex?: InputMaybe; + shelfIDs?: InputMaybe>; + sort: Scalars['String']['input']; + tagIDs?: InputMaybe>; + title: Scalars['String']['input']; + updateTime?: InputMaybe; +}; + +/** + * CreateIdentifierInput is used for create Identifier object. + * Input was generated by ent. + */ +export type CreateIdentifierInput = { + bookID: Scalars['ID']['input']; + calibreID?: InputMaybe; + createTime?: InputMaybe; + type: Scalars['String']['input']; + updateTime?: InputMaybe; + value: Scalars['String']['input']; +}; + +/** + * CreateLanguageInput is used for create Language object. + * Input was generated by ent. + */ +export type CreateLanguageInput = { + bookIDs?: InputMaybe>; + calibreID?: InputMaybe; + code: Scalars['String']['input']; + createTime?: InputMaybe; + updateTime?: InputMaybe; +}; + +/** + * CreatePublisherInput is used for create Publisher object. + * Input was generated by ent. + */ +export type CreatePublisherInput = { + bookIDs?: InputMaybe>; + calibreID?: InputMaybe; + createTime?: InputMaybe; + name: Scalars['String']['input']; + updateTime?: InputMaybe; +}; + +/** + * CreateSeriesInput is used for create Series object. + * Input was generated by ent. + */ +export type CreateSeriesInput = { + bookIDs?: InputMaybe>; + calibreID?: InputMaybe; + createTime?: InputMaybe; + name: Scalars['String']['input']; + sort: Scalars['String']['input']; + updateTime?: InputMaybe; +}; + +export type CreateShelfInput = { + bookIDs?: InputMaybe>; + description?: InputMaybe; + name: Scalars['String']['input']; + public?: InputMaybe; +}; + +/** + * CreateTagInput is used for create Tag object. + * Input was generated by ent. + */ +export type CreateTagInput = { + bookIDs?: InputMaybe>; + calibreID?: InputMaybe; + name: Scalars['String']['input']; +}; + +/** + * CreateTaskInput is used for create Task object. + * Input was generated by ent. + */ +export type CreateTaskInput = { + type: TaskTaskType; +}; + +/** CreateUserInput is used for create User object. */ +export type CreateUserInput = { + email: Scalars['String']['input']; + password?: InputMaybe; + userPermissions: CreateUserPermissionsInput; + username: Scalars['String']['input']; +}; + +/** + * CreateUserPermissionsInput is used for create UserPermissions object. + * Input was generated by ent. + */ +export type CreateUserPermissionsInput = { + admin?: InputMaybe; + cancreatepublic?: InputMaybe; + canedit?: InputMaybe; + createTime?: InputMaybe; + updateTime?: InputMaybe; + userID?: InputMaybe; +}; + +export type Identifier = Node & { + __typename?: 'Identifier'; + book: Book; + calibreID?: Maybe; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + type: Scalars['String']['output']; + updateTime: Scalars['Time']['output']; + value: Scalars['String']['output']; +}; + +/** A connection to a list of items. */ +export type IdentifierConnection = { + __typename?: 'IdentifierConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type IdentifierEdge = { + __typename?: 'IdentifierEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Identifier connections */ +export type IdentifierOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Identifiers. */ + field: IdentifierOrderField; +}; + +/** Properties by which Identifier connections can be ordered. */ +export enum IdentifierOrderField { + Type = 'TYPE', + Value = 'VALUE' +} + +/** + * IdentifierWhereInput is used for filtering Identifier objects. + * Input was generated by ent. + */ +export type IdentifierWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** book edge predicates */ + hasBook?: InputMaybe; + hasBookWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** type field predicates */ + type?: InputMaybe; + typeContains?: InputMaybe; + typeContainsFold?: InputMaybe; + typeEqualFold?: InputMaybe; + typeGT?: InputMaybe; + typeGTE?: InputMaybe; + typeHasPrefix?: InputMaybe; + typeHasSuffix?: InputMaybe; + typeIn?: InputMaybe>; + typeLT?: InputMaybe; + typeLTE?: InputMaybe; + typeNEQ?: InputMaybe; + typeNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** value field predicates */ + value?: InputMaybe; + valueContains?: InputMaybe; + valueContainsFold?: InputMaybe; + valueEqualFold?: InputMaybe; + valueGT?: InputMaybe; + valueGTE?: InputMaybe; + valueHasPrefix?: InputMaybe; + valueHasSuffix?: InputMaybe; + valueIn?: InputMaybe>; + valueLT?: InputMaybe; + valueLTE?: InputMaybe; + valueNEQ?: InputMaybe; + valueNotIn?: InputMaybe>; +}; + +export type Language = Node & { + __typename?: 'Language'; + books: BookConnection; + calibreID?: Maybe; + code: Scalars['String']['output']; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + updateTime: Scalars['Time']['output']; +}; + + +export type LanguageBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +/** A connection to a list of items. */ +export type LanguageConnection = { + __typename?: 'LanguageConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type LanguageEdge = { + __typename?: 'LanguageEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Language connections */ +export type LanguageOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Languages. */ + field: LanguageOrderField; +}; + +/** Properties by which Language connections can be ordered. */ +export enum LanguageOrderField { + BooksCount = 'BOOKS_COUNT' +} + +/** + * LanguageWhereInput is used for filtering Language objects. + * Input was generated by ent. + */ +export type LanguageWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** code field predicates */ + code?: InputMaybe; + codeContains?: InputMaybe; + codeContainsFold?: InputMaybe; + codeEqualFold?: InputMaybe; + codeGT?: InputMaybe; + codeGTE?: InputMaybe; + codeHasPrefix?: InputMaybe; + codeHasSuffix?: InputMaybe; + codeIn?: InputMaybe>; + codeLT?: InputMaybe; + codeLTE?: InputMaybe; + codeNEQ?: InputMaybe; + codeNotIn?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +export type Mutation = { + __typename?: 'Mutation'; + createAuthor?: Maybe; + createBook?: Maybe; + createIdentifier?: Maybe; + createLanguage?: Maybe; + createPublisher?: Maybe; + createSeries?: Maybe; + createShelf?: Maybe; + createTag?: Maybe; + createTask?: Maybe; + createUser?: Maybe; + updateAuthor?: Maybe; + updateBook?: Maybe; + updateIdentifier?: Maybe; + updateLanguage?: Maybe; + updatePublisher?: Maybe; + updateSeries?: Maybe; + updateShelf?: Maybe; + updateTag?: Maybe; + updateUser?: Maybe; +}; + + +export type MutationCreateAuthorArgs = { + input: CreateAuthorInput; +}; + + +export type MutationCreateBookArgs = { + input: CreateBookInput; +}; + + +export type MutationCreateIdentifierArgs = { + input: CreateIdentifierInput; +}; + + +export type MutationCreateLanguageArgs = { + input: CreateLanguageInput; +}; + + +export type MutationCreatePublisherArgs = { + input: CreatePublisherInput; +}; + + +export type MutationCreateSeriesArgs = { + input: CreateSeriesInput; +}; + + +export type MutationCreateShelfArgs = { + input: CreateShelfInput; +}; + + +export type MutationCreateTagArgs = { + input: CreateTagInput; +}; + + +export type MutationCreateTaskArgs = { + input: CreateTaskInput; +}; + + +export type MutationCreateUserArgs = { + input: CreateUserInput; +}; + + +export type MutationUpdateAuthorArgs = { + id: Scalars['ID']['input']; + input: UpdateAuthorInput; +}; + + +export type MutationUpdateBookArgs = { + id: Scalars['ID']['input']; + input: UpdateBookInput; +}; + + +export type MutationUpdateIdentifierArgs = { + id: Scalars['ID']['input']; + input: UpdateIdentifierInput; +}; + + +export type MutationUpdateLanguageArgs = { + id: Scalars['ID']['input']; + input: UpdateLanguageInput; +}; + + +export type MutationUpdatePublisherArgs = { + id: Scalars['ID']['input']; + input: UpdatePublisherInput; +}; + + +export type MutationUpdateSeriesArgs = { + id: Scalars['ID']['input']; + input: UpdateSeriesInput; +}; + + +export type MutationUpdateShelfArgs = { + id: Scalars['ID']['input']; + input: UpdateShelfInput; +}; + + +export type MutationUpdateTagArgs = { + id: Scalars['ID']['input']; + input: UpdateTagInput; +}; + + +export type MutationUpdateUserArgs = { + id: Scalars['ID']['input']; + input: UpdateUserInput; +}; + +/** + * An object with an ID. + * Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) + */ +export type Node = { + /** The id of the object. */ + id: Scalars['ID']['output']; +}; + +/** Possible directions in which to order a list of items when provided an `orderBy` argument. */ +export enum OrderDirection { + /** Specifies an ascending order for a given `orderBy` argument. */ + Asc = 'ASC', + /** Specifies a descending order for a given `orderBy` argument. */ + Desc = 'DESC' +} + +/** + * Information about pagination in a connection. + * https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo + */ +export type PageInfo = { + __typename?: 'PageInfo'; + /** When paginating forwards, the cursor to continue. */ + endCursor?: Maybe; + /** When paginating forwards, are there more items? */ + hasNextPage: Scalars['Boolean']['output']; + /** When paginating backwards, are there more items? */ + hasPreviousPage: Scalars['Boolean']['output']; + /** When paginating backwards, the cursor to continue. */ + startCursor?: Maybe; +}; + +export type Publisher = Node & { + __typename?: 'Publisher'; + books: BookConnection; + calibreID?: Maybe; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + updateTime: Scalars['Time']['output']; +}; + + +export type PublisherBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +/** A connection to a list of items. */ +export type PublisherConnection = { + __typename?: 'PublisherConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type PublisherEdge = { + __typename?: 'PublisherEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Publisher connections */ +export type PublisherOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Publishers. */ + field: PublisherOrderField; +}; + +/** Properties by which Publisher connections can be ordered. */ +export enum PublisherOrderField { + BooksCount = 'BOOKS_COUNT', + Name = 'NAME' +} + +/** + * PublisherWhereInput is used for filtering Publisher objects. + * Input was generated by ent. + */ +export type PublisherWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +export type Query = { + __typename?: 'Query'; + authors: AuthorConnection; + bookFiles: Array; + books: BookConnection; + identifiers: IdentifierConnection; + languages: LanguageConnection; + /** Returns the currently logged in user */ + me: User; + /** Fetches an object given its ID. */ + node?: Maybe; + /** Lookup nodes by a list of IDs. */ + nodes: Array>; + publishers: PublisherConnection; + seriesSlice: SeriesConnection; + shelves: ShelfConnection; + tags: TagConnection; + tasks: TaskConnection; + users: Array; +}; + + +export type QueryAuthorsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryIdentifiersArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryLanguagesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryNodeArgs = { + id: Scalars['ID']['input']; +}; + + +export type QueryNodesArgs = { + ids: Array; +}; + + +export type QueryPublishersArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QuerySeriesSliceArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryShelvesArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryTagsArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + + +export type QueryTasksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type Series = Node & { + __typename?: 'Series'; + books?: Maybe>; + calibreID?: Maybe; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + sort: Scalars['String']['output']; + updateTime: Scalars['Time']['output']; +}; + +/** A connection to a list of items. */ +export type SeriesConnection = { + __typename?: 'SeriesConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type SeriesEdge = { + __typename?: 'SeriesEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Series connections */ +export type SeriesOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order SeriesSlice. */ + field: SeriesOrderField; +}; + +/** Properties by which Series connections can be ordered. */ +export enum SeriesOrderField { + Name = 'NAME' +} + +/** + * SeriesWhereInput is used for filtering Series objects. + * Input was generated by ent. + */ +export type SeriesWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** sort field predicates */ + sort?: InputMaybe; + sortContains?: InputMaybe; + sortContainsFold?: InputMaybe; + sortEqualFold?: InputMaybe; + sortGT?: InputMaybe; + sortGTE?: InputMaybe; + sortHasPrefix?: InputMaybe; + sortHasSuffix?: InputMaybe; + sortIn?: InputMaybe>; + sortLT?: InputMaybe; + sortLTE?: InputMaybe; + sortNEQ?: InputMaybe; + sortNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; +}; + +export type Shelf = Node & { + __typename?: 'Shelf'; + books: BookConnection; + createTime: Scalars['Time']['output']; + description?: Maybe; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; + public: Scalars['Boolean']['output']; + updateTime: Scalars['Time']['output']; + user: User; + userID: Scalars['ID']['output']; +}; + + +export type ShelfBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +/** A connection to a list of items. */ +export type ShelfConnection = { + __typename?: 'ShelfConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type ShelfEdge = { + __typename?: 'ShelfEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Shelf connections */ +export type ShelfOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Shelves. */ + field: ShelfOrderField; +}; + +/** Properties by which Shelf connections can be ordered. */ +export enum ShelfOrderField { + BooksCount = 'BOOKS_COUNT', + Name = 'NAME' +} + +/** + * ShelfWhereInput is used for filtering Shelf objects. + * Input was generated by ent. + */ +export type ShelfWhereInput = { + and?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** description field predicates */ + description?: InputMaybe; + descriptionContains?: InputMaybe; + descriptionContainsFold?: InputMaybe; + descriptionEqualFold?: InputMaybe; + descriptionGT?: InputMaybe; + descriptionGTE?: InputMaybe; + descriptionHasPrefix?: InputMaybe; + descriptionHasSuffix?: InputMaybe; + descriptionIn?: InputMaybe>; + descriptionIsNil?: InputMaybe; + descriptionLT?: InputMaybe; + descriptionLTE?: InputMaybe; + descriptionNEQ?: InputMaybe; + descriptionNotIn?: InputMaybe>; + descriptionNotNil?: InputMaybe; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** user edge predicates */ + hasUser?: InputMaybe; + hasUserWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** public field predicates */ + public?: InputMaybe; + publicNEQ?: InputMaybe; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** user_id field predicates */ + userID?: InputMaybe; + userIDContains?: InputMaybe; + userIDContainsFold?: InputMaybe; + userIDEqualFold?: InputMaybe; + userIDGT?: InputMaybe; + userIDGTE?: InputMaybe; + userIDHasPrefix?: InputMaybe; + userIDHasSuffix?: InputMaybe; + userIDIn?: InputMaybe>; + userIDLT?: InputMaybe; + userIDLTE?: InputMaybe; + userIDNEQ?: InputMaybe; + userIDNotIn?: InputMaybe>; +}; + +export type Tag = Node & { + __typename?: 'Tag'; + books: BookConnection; + calibreID?: Maybe; + id: Scalars['ID']['output']; + name: Scalars['String']['output']; +}; + + +export type TagBooksArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +/** A connection to a list of items. */ +export type TagConnection = { + __typename?: 'TagConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type TagEdge = { + __typename?: 'TagEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Tag connections */ +export type TagOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Tags. */ + field: TagOrderField; +}; + +/** Properties by which Tag connections can be ordered. */ +export enum TagOrderField { + BooksCount = 'BOOKS_COUNT', + Name = 'NAME' +} + +/** + * TagWhereInput is used for filtering Tag objects. + * Input was generated by ent. + */ +export type TagWhereInput = { + and?: InputMaybe>; + /** calibre_id field predicates */ + calibreID?: InputMaybe; + calibreIDGT?: InputMaybe; + calibreIDGTE?: InputMaybe; + calibreIDIn?: InputMaybe>; + calibreIDIsNil?: InputMaybe; + calibreIDLT?: InputMaybe; + calibreIDLTE?: InputMaybe; + calibreIDNEQ?: InputMaybe; + calibreIDNotIn?: InputMaybe>; + calibreIDNotNil?: InputMaybe; + /** books edge predicates */ + hasBooks?: InputMaybe; + hasBooksWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** name field predicates */ + name?: InputMaybe; + nameContains?: InputMaybe; + nameContainsFold?: InputMaybe; + nameEqualFold?: InputMaybe; + nameGT?: InputMaybe; + nameGTE?: InputMaybe; + nameHasPrefix?: InputMaybe; + nameHasSuffix?: InputMaybe; + nameIn?: InputMaybe>; + nameLT?: InputMaybe; + nameLTE?: InputMaybe; + nameNEQ?: InputMaybe; + nameNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; +}; + +export type Task = Node & { + __typename?: 'Task'; + createTime: Scalars['Time']['output']; + /** Error message of the task */ + error?: Maybe; + id: Scalars['ID']['output']; + /** Whether this task is created by the system */ + isSystemTask: Scalars['Boolean']['output']; + /** Message of the task */ + message?: Maybe; + /** Progress of the task. 0-1 */ + progress: Scalars['Float']['output']; + status: TaskStatus; + type: TaskTaskType; + updateTime: Scalars['Time']['output']; + user?: Maybe; + /** The user who created this task. Empty for System Task */ + userID?: Maybe; +}; + +/** A connection to a list of items. */ +export type TaskConnection = { + __typename?: 'TaskConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type TaskEdge = { + __typename?: 'TaskEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for Task connections */ +export type TaskOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Tasks. */ + field: TaskOrderField; +}; + +/** Properties by which Task connections can be ordered. */ +export enum TaskOrderField { + Status = 'STATUS', + Type = 'TYPE' +} + +/** TaskStatus is enum for the field status */ +export enum TaskStatus { + Failure = 'failure', + InProgress = 'in_progress', + Pending = 'pending', + Success = 'success' +} + +/** TaskTaskType is enum for the field type */ +export enum TaskTaskType { + CalibreImport = 'calibre_import', + Noop = 'noop' +} + +/** + * TaskWhereInput is used for filtering Task objects. + * Input was generated by ent. + */ +export type TaskWhereInput = { + and?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** error field predicates */ + error?: InputMaybe; + errorContains?: InputMaybe; + errorContainsFold?: InputMaybe; + errorEqualFold?: InputMaybe; + errorGT?: InputMaybe; + errorGTE?: InputMaybe; + errorHasPrefix?: InputMaybe; + errorHasSuffix?: InputMaybe; + errorIn?: InputMaybe>; + errorIsNil?: InputMaybe; + errorLT?: InputMaybe; + errorLTE?: InputMaybe; + errorNEQ?: InputMaybe; + errorNotIn?: InputMaybe>; + errorNotNil?: InputMaybe; + /** user edge predicates */ + hasUser?: InputMaybe; + hasUserWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + /** is_system_task field predicates */ + isSystemTask?: InputMaybe; + isSystemTaskNEQ?: InputMaybe; + /** message field predicates */ + message?: InputMaybe; + messageContains?: InputMaybe; + messageContainsFold?: InputMaybe; + messageEqualFold?: InputMaybe; + messageGT?: InputMaybe; + messageGTE?: InputMaybe; + messageHasPrefix?: InputMaybe; + messageHasSuffix?: InputMaybe; + messageIn?: InputMaybe>; + messageIsNil?: InputMaybe; + messageLT?: InputMaybe; + messageLTE?: InputMaybe; + messageNEQ?: InputMaybe; + messageNotIn?: InputMaybe>; + messageNotNil?: InputMaybe; + not?: InputMaybe; + or?: InputMaybe>; + /** progress field predicates */ + progress?: InputMaybe; + progressGT?: InputMaybe; + progressGTE?: InputMaybe; + progressIn?: InputMaybe>; + progressLT?: InputMaybe; + progressLTE?: InputMaybe; + progressNEQ?: InputMaybe; + progressNotIn?: InputMaybe>; + /** status field predicates */ + status?: InputMaybe; + statusIn?: InputMaybe>; + statusNEQ?: InputMaybe; + statusNotIn?: InputMaybe>; + /** type field predicates */ + type?: InputMaybe; + typeIn?: InputMaybe>; + typeNEQ?: InputMaybe; + typeNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** user_id field predicates */ + userID?: InputMaybe; + userIDContains?: InputMaybe; + userIDContainsFold?: InputMaybe; + userIDEqualFold?: InputMaybe; + userIDGT?: InputMaybe; + userIDGTE?: InputMaybe; + userIDHasPrefix?: InputMaybe; + userIDHasSuffix?: InputMaybe; + userIDIn?: InputMaybe>; + userIDIsNil?: InputMaybe; + userIDLT?: InputMaybe; + userIDLTE?: InputMaybe; + userIDNEQ?: InputMaybe; + userIDNotIn?: InputMaybe>; + userIDNotNil?: InputMaybe; +}; + +/** + * UpdateAuthorInput is used for update Author object. + * Input was generated by ent. + */ +export type UpdateAuthorInput = { + addBookIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearBooks?: InputMaybe; + clearCalibreID?: InputMaybe; + clearLink?: InputMaybe; + link?: InputMaybe; + name?: InputMaybe; + removeBookIDs?: InputMaybe>; + sort?: InputMaybe; + updateTime?: InputMaybe; +}; + +/** + * UpdateBookInput is used for update Book object. + * Input was generated by ent. + */ +export type UpdateBookInput = { + addAuthorIDs?: InputMaybe>; + addFileIDs?: InputMaybe>; + addIdentifierIDs?: InputMaybe>; + addLanguageIDs?: InputMaybe>; + addPublisherIDs?: InputMaybe>; + addSeriesIDs?: InputMaybe>; + addShelfIDs?: InputMaybe>; + addTagIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearAuthors?: InputMaybe; + clearCalibreID?: InputMaybe; + clearDescription?: InputMaybe; + clearFiles?: InputMaybe; + clearIdentifiers?: InputMaybe; + clearIsbn?: InputMaybe; + clearLanguage?: InputMaybe; + clearPublishedDate?: InputMaybe; + clearPublisher?: InputMaybe; + clearSeries?: InputMaybe; + clearSeriesIndex?: InputMaybe; + clearShelf?: InputMaybe; + clearTags?: InputMaybe; + description?: InputMaybe; + isbn?: InputMaybe; + path?: InputMaybe; + publishedDate?: InputMaybe; + removeAuthorIDs?: InputMaybe>; + removeFileIDs?: InputMaybe>; + removeIdentifierIDs?: InputMaybe>; + removeLanguageIDs?: InputMaybe>; + removePublisherIDs?: InputMaybe>; + removeSeriesIDs?: InputMaybe>; + removeShelfIDs?: InputMaybe>; + removeTagIDs?: InputMaybe>; + seriesIndex?: InputMaybe; + sort?: InputMaybe; + title?: InputMaybe; + updateTime?: InputMaybe; +}; + +/** + * UpdateIdentifierInput is used for update Identifier object. + * Input was generated by ent. + */ +export type UpdateIdentifierInput = { + bookID?: InputMaybe; + calibreID?: InputMaybe; + clearCalibreID?: InputMaybe; + type?: InputMaybe; + updateTime?: InputMaybe; + value?: InputMaybe; +}; + +/** + * UpdateLanguageInput is used for update Language object. + * Input was generated by ent. + */ +export type UpdateLanguageInput = { + addBookIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearBooks?: InputMaybe; + clearCalibreID?: InputMaybe; + code?: InputMaybe; + removeBookIDs?: InputMaybe>; + updateTime?: InputMaybe; +}; + +/** + * UpdatePublisherInput is used for update Publisher object. + * Input was generated by ent. + */ +export type UpdatePublisherInput = { + addBookIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearBooks?: InputMaybe; + clearCalibreID?: InputMaybe; + name?: InputMaybe; + removeBookIDs?: InputMaybe>; + updateTime?: InputMaybe; +}; + +/** + * UpdateSeriesInput is used for update Series object. + * Input was generated by ent. + */ +export type UpdateSeriesInput = { + addBookIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearBooks?: InputMaybe; + clearCalibreID?: InputMaybe; + name?: InputMaybe; + removeBookIDs?: InputMaybe>; + sort?: InputMaybe; + updateTime?: InputMaybe; +}; + +/** + * UpdateShelfInput is used for update Shelf object. + * Input was generated by ent. + */ +export type UpdateShelfInput = { + addBookIDs?: InputMaybe>; + clearBooks?: InputMaybe; + clearDescription?: InputMaybe; + description?: InputMaybe; + name?: InputMaybe; + public?: InputMaybe; + removeBookIDs?: InputMaybe>; + updateTime?: InputMaybe; +}; + +/** + * UpdateTagInput is used for update Tag object. + * Input was generated by ent. + */ +export type UpdateTagInput = { + addBookIDs?: InputMaybe>; + calibreID?: InputMaybe; + clearBooks?: InputMaybe; + clearCalibreID?: InputMaybe; + name?: InputMaybe; + removeBookIDs?: InputMaybe>; +}; + +/** UpdateUserInput is used for update User object. */ +export type UpdateUserInput = { + email?: InputMaybe; + password?: InputMaybe; + username?: InputMaybe; +}; + +/** + * UpdateUserPermissionsInput is used for update UserPermissions object. + * Input was generated by ent. + */ +export type UpdateUserPermissionsInput = { + admin?: InputMaybe; + cancreatepublic?: InputMaybe; + canedit?: InputMaybe; + clearUser?: InputMaybe; + updateTime?: InputMaybe; + userID?: InputMaybe; +}; + +export type User = Node & { + __typename?: 'User'; + createTime: Scalars['Time']['output']; + email: Scalars['String']['output']; + id: Scalars['ID']['output']; + shelves?: Maybe>; + updateTime: Scalars['Time']['output']; + userPermissions: UserPermissions; + username: Scalars['String']['output']; +}; + +/** Ordering options for User connections */ +export type UserOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order Users. */ + field: UserOrderField; +}; + +/** Properties by which User connections can be ordered. */ +export enum UserOrderField { + Username = 'USERNAME' +} + +export type UserPermissions = Node & { + __typename?: 'UserPermissions'; + admin: Scalars['Boolean']['output']; + cancreatepublic: Scalars['Boolean']['output']; + canedit: Scalars['Boolean']['output']; + createTime: Scalars['Time']['output']; + id: Scalars['ID']['output']; + updateTime: Scalars['Time']['output']; + user?: Maybe; + userID?: Maybe; +}; + +/** + * UserPermissionsWhereInput is used for filtering UserPermissions objects. + * Input was generated by ent. + */ +export type UserPermissionsWhereInput = { + /** Admin field predicates */ + admin?: InputMaybe; + adminNEQ?: InputMaybe; + and?: InputMaybe>; + /** CanCreatePublic field predicates */ + cancreatepublic?: InputMaybe; + cancreatepublicNEQ?: InputMaybe; + /** CanEdit field predicates */ + canedit?: InputMaybe; + caneditNEQ?: InputMaybe; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** user edge predicates */ + hasUser?: InputMaybe; + hasUserWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** user_id field predicates */ + userID?: InputMaybe; + userIDContains?: InputMaybe; + userIDContainsFold?: InputMaybe; + userIDEqualFold?: InputMaybe; + userIDGT?: InputMaybe; + userIDGTE?: InputMaybe; + userIDHasPrefix?: InputMaybe; + userIDHasSuffix?: InputMaybe; + userIDIn?: InputMaybe>; + userIDIsNil?: InputMaybe; + userIDLT?: InputMaybe; + userIDLTE?: InputMaybe; + userIDNEQ?: InputMaybe; + userIDNotIn?: InputMaybe>; + userIDNotNil?: InputMaybe; +}; + +/** + * UserWhereInput is used for filtering User objects. + * Input was generated by ent. + */ +export type UserWhereInput = { + and?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** email field predicates */ + email?: InputMaybe; + emailContains?: InputMaybe; + emailContainsFold?: InputMaybe; + emailEqualFold?: InputMaybe; + emailGT?: InputMaybe; + emailGTE?: InputMaybe; + emailHasPrefix?: InputMaybe; + emailHasSuffix?: InputMaybe; + emailIn?: InputMaybe>; + emailLT?: InputMaybe; + emailLTE?: InputMaybe; + emailNEQ?: InputMaybe; + emailNotIn?: InputMaybe>; + /** shelves edge predicates */ + hasShelves?: InputMaybe; + hasShelvesWith?: InputMaybe>; + /** user_permissions edge predicates */ + hasUserPermissions?: InputMaybe; + hasUserPermissionsWith?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** username field predicates */ + username?: InputMaybe; + usernameContains?: InputMaybe; + usernameContainsFold?: InputMaybe; + usernameEqualFold?: InputMaybe; + usernameGT?: InputMaybe; + usernameGTE?: InputMaybe; + usernameHasPrefix?: InputMaybe; + usernameHasSuffix?: InputMaybe; + usernameIn?: InputMaybe>; + usernameLT?: InputMaybe; + usernameLTE?: InputMaybe; + usernameNEQ?: InputMaybe; + usernameNotIn?: InputMaybe>; +}; + +export type BookItemFragment = { __typename?: 'Book', id: string, title: string, description?: string | null, authors?: Array<{ __typename?: 'Author', name: string }> | null } & { ' $fragmentName'?: 'BookItemFragment' }; + +export type AllBooksQueryVariables = Exact<{ + first: Scalars['Int']['input']; +}>; + + +export type AllBooksQuery = { __typename?: 'Query', books: { __typename?: 'BookConnection', edges?: Array<{ __typename?: 'BookEdge', node?: ( + { __typename?: 'Book' } + & { ' $fragmentRefs'?: { 'BookItemFragment': BookItemFragment } } + ) | null } | null> | null } }; + +export const BookItemFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; +export const AllBooksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"allBooks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"books"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BookItem"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/frontend/src/gql/index.ts b/frontend/src/gql/index.ts new file mode 100644 index 00000000..f5159916 --- /dev/null +++ b/frontend/src/gql/index.ts @@ -0,0 +1,2 @@ +export * from "./fragment-masking"; +export * from "./gql"; \ No newline at end of file diff --git a/frontend/src/hooks/useDebounce.ts b/frontend/src/hooks/useDebounce.ts new file mode 100644 index 00000000..20ffb753 --- /dev/null +++ b/frontend/src/hooks/useDebounce.ts @@ -0,0 +1,28 @@ +import { useRef, useEffect } from "react"; + +type Timer = ReturnType; +type SomeFunction = (...args: any[]) => void; + +export function useDebounce( + func: Func, + delay = 1000 +) { + const timer = useRef(); + + useEffect(() => { + return () => { + if (!timer.current) return; + clearTimeout(timer.current); + }; + }, []); + + const debouncedFunction = ((...args) => { + const newTimer = setTimeout(() => { + func(...args); + }, delay); + clearTimeout(timer.current); + timer.current = newTimer; + }) as Func; + + return debouncedFunction; +} diff --git a/frontend/src/hooks/useToken.ts b/frontend/src/hooks/useToken.ts index e69de29b..80dbf2cf 100644 --- a/frontend/src/hooks/useToken.ts +++ b/frontend/src/hooks/useToken.ts @@ -0,0 +1,100 @@ +import { useEffect, useRef, useState, useCallback } from "react"; + +export interface AccessToken { + token: string; + issued_at: string; + expires_at: string; +} +export interface TokenResponse { + access_token: AccessToken; +} + +const TOKEN_REFRESH_LEEWAY = 1000 * 30; // 30 seconds + +export function useToken( + onTokenInvalid: Function, + onRefreshRequired: Function +) { + const accessToken = useRef(); + const { clearAutomaticTokenRefresh, setTokenExpiration } = + useTokenExpiration(onRefreshRequired); + + const setToken = useCallback( + (res: TokenResponse) => { + accessToken.current = res.access_token.token; + const expirationDate = new Date(res.access_token.expires_at); + setTokenExpiration(expirationDate); + }, + [setTokenExpiration] + ); + + const isAuthenticated = useCallback(() => { + return !!accessToken.current; + }, []); + + const clearToken = useCallback( + (shouldClearCookie = true) => { + const clearRefreshTokenCookie = shouldClearCookie + ? fetch("auth/logout") + : Promise.resolve(); + + return clearRefreshTokenCookie.finally(() => { + accessToken.current = ""; + clearAutomaticTokenRefresh(); + }); + }, + [clearAutomaticTokenRefresh] + ); + + const fetcher = useCallback( + async (url: RequestInfo | URL, options?: RequestInit) => { + const headers = new Headers(options?.headers); + if (accessToken.current) { + headers.set("Authorization", `Bearer ${accessToken.current}`); + } + + const response = await fetch(url, { + ...options, + headers, + }); + + if (response.status === 401 && accessToken.current) { + clearToken(); + onTokenInvalid(); + return Promise.reject(new Error("Unauthorized")); + } + + return response; + }, + [] + ); + + return { setToken, clearToken, isAuthenticated, fetcher }; +} + +export function useTokenExpiration(onTokenRefreshRequired: Function) { + const clearAutomaticRefresh = useRef(); + const [tokenExpiration, setTokenExpiration] = useState(); + + useEffect(() => { + if (tokenExpiration instanceof Date && !isNaN(tokenExpiration.valueOf())) { + const now = new Date(); + const triggerAfterMs = + tokenExpiration.getTime() - now.getTime() - TOKEN_REFRESH_LEEWAY; + clearAutomaticRefresh.current = window.setTimeout(async () => { + onTokenRefreshRequired(); + }, triggerAfterMs); + } + + return () => { + window.clearTimeout(clearAutomaticRefresh.current); + }; + }, [onTokenRefreshRequired, tokenExpiration]); + + const clearAutomaticTokenRefresh = () => { + window.clearTimeout(clearAutomaticRefresh.current); + setTokenExpiration(undefined); + }; + + return { setTokenExpiration, clearAutomaticTokenRefresh }; +} diff --git a/frontend/src/index.css b/frontend/src/index.css index 310edf6c..cc94391d 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -1,9 +1,9 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; +@import "tailwindcss/base"; +@import "tailwindcss/components"; +@import "tailwindcss/utilities"; -@import url("https://fonts.googleapis.com/css2?family=Merriweather"); -@import url("https://fonts.googleapis.com/css2?family=Lato"); +@import url("https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"); +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"); ::selection { @apply bg-primary-500; diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index ae308155..d1297666 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,13 +1,26 @@ -import './index.css' +import "./index.css"; import { StrictMode } from "react"; import ReactDOM from "react-dom/client"; import { RouterProvider, createRouter } from "@tanstack/react-router"; +import { useAuth, AuthProvider } from "./context/AuthProvider"; +import { useGraphQLClient, GraphQLProvider } from "./context/GraphQLProvider"; + +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; // Import the generated route tree -import { routeTree } from "./routeTree.gen"; +import { routeTree } from "./routeTree.gen.ts"; + +const queryClient = new QueryClient(); // Create a new router instance -const router = createRouter({ routeTree }); +const router = createRouter({ + routeTree, + context: { + auth: undefined!, + graphql: undefined!, + queryClient: queryClient, + }, +}); // Register the router instance for type safety declare module "@tanstack/react-router" { @@ -16,13 +29,25 @@ declare module "@tanstack/react-router" { } } +function InnerApp() { + const auth = useAuth(); + const graphql = useGraphQLClient(); + return ; +} + // Render the app const rootElement = document.getElementById("app")!; if (!rootElement.innerHTML) { const root = ReactDOM.createRoot(rootElement); root.render( - + + + + + + + ); } diff --git a/frontend/src/routeTree.gen.ts b/frontend/src/routeTree.gen.ts index e3046927..699fe62e 100644 --- a/frontend/src/routeTree.gen.ts +++ b/frontend/src/routeTree.gen.ts @@ -1,40 +1,41 @@ // This file is auto-generated by TanStack Router -import { createFileRoute } from '@tanstack/react-router' - // Import Routes import { Route as rootRoute } from './routes/__root' +import { Route as LoginImport } from './routes/login' +import { Route as BooksImport } from './routes/books' +import { Route as AboutImport } from './routes/about' import { Route as LayoutImport } from './routes/_layout' +import { Route as IndexImport } from './routes/index' import { Route as LayoutLayoutAImport } from './routes/_layout.layout-a' -// Create Virtual Routes - -const LoginLazyImport = createFileRoute('/login')() -const AboutLazyImport = createFileRoute('/about')() -const IndexLazyImport = createFileRoute('/')() - // Create/Update Routes -const LoginLazyRoute = LoginLazyImport.update({ +const LoginRoute = LoginImport.update({ path: '/login', getParentRoute: () => rootRoute, -} as any).lazy(() => import('./routes/login.lazy').then((d) => d.Route)) +} as any) -const AboutLazyRoute = AboutLazyImport.update({ +const BooksRoute = BooksImport.update({ + path: '/books', + getParentRoute: () => rootRoute, +} as any) + +const AboutRoute = AboutImport.update({ path: '/about', getParentRoute: () => rootRoute, -} as any).lazy(() => import('./routes/about.lazy').then((d) => d.Route)) +} as any) const LayoutRoute = LayoutImport.update({ id: '/_layout', getParentRoute: () => rootRoute, } as any) -const IndexLazyRoute = IndexLazyImport.update({ +const IndexRoute = IndexImport.update({ path: '/', getParentRoute: () => rootRoute, -} as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route)) +} as any) const LayoutLayoutARoute = LayoutLayoutAImport.update({ path: '/layout-a', @@ -46,7 +47,7 @@ const LayoutLayoutARoute = LayoutLayoutAImport.update({ declare module '@tanstack/react-router' { interface FileRoutesByPath { '/': { - preLoaderRoute: typeof IndexLazyImport + preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } '/_layout': { @@ -54,11 +55,15 @@ declare module '@tanstack/react-router' { parentRoute: typeof rootRoute } '/about': { - preLoaderRoute: typeof AboutLazyImport + preLoaderRoute: typeof AboutImport + parentRoute: typeof rootRoute + } + '/books': { + preLoaderRoute: typeof BooksImport parentRoute: typeof rootRoute } '/login': { - preLoaderRoute: typeof LoginLazyImport + preLoaderRoute: typeof LoginImport parentRoute: typeof rootRoute } '/_layout/layout-a': { @@ -71,8 +76,9 @@ declare module '@tanstack/react-router' { // Create and export the route tree export const routeTree = rootRoute.addChildren([ - IndexLazyRoute, + IndexRoute, LayoutRoute.addChildren([LayoutLayoutARoute]), - AboutLazyRoute, - LoginLazyRoute, + AboutRoute, + BooksRoute, + LoginRoute, ]) diff --git a/frontend/src/routes/__root.tsx b/frontend/src/routes/__root.tsx index 12c933e1..54ee07d2 100644 --- a/frontend/src/routes/__root.tsx +++ b/frontend/src/routes/__root.tsx @@ -1,7 +1,16 @@ -import { createRootRoute, Link, Outlet } from "@tanstack/react-router"; +import { Outlet, createRootRouteWithContext } from "@tanstack/react-router"; import { TanStackRouterDevtools } from "@tanstack/router-devtools"; +import { QueryClient } from "@tanstack/react-query"; -export const Route = createRootRoute({ +import { AuthContext } from "../context/AuthProvider"; +import { GraphQLContext } from "../context/GraphQLProvider"; + +interface RouterContext { + auth: AuthContext; + graphql: GraphQLContext; + queryClient: QueryClient; +} +export const Route = createRootRouteWithContext()({ component: () => ( <> diff --git a/frontend/src/routes/about.lazy.tsx b/frontend/src/routes/about.lazy.tsx deleted file mode 100644 index 232245a6..00000000 --- a/frontend/src/routes/about.lazy.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import { createLazyFileRoute } from "@tanstack/react-router"; - -export const Route = createLazyFileRoute("/about")({ - component: About, -}); - -function About() { - return

Hello from About!

; -} diff --git a/frontend/src/routes/about.tsx b/frontend/src/routes/about.tsx new file mode 100644 index 00000000..f89be42d --- /dev/null +++ b/frontend/src/routes/about.tsx @@ -0,0 +1,50 @@ +import { useEffect } from "react"; +import { + useNavigate, + createFileRoute, + redirect, + Link, +} from "@tanstack/react-router"; +import { useAuth } from "../context/AuthProvider"; + +export const Route = createFileRoute("/about")({ + beforeLoad: ({ context, location }) => { + if (!context.auth.loggedIn) { + console.log("Not authenticated, redirecting to login"); + console.log(context.auth.user); + console.log(context.auth); + throw redirect({ + to: "/login", + search: { + redirect: location.href, + }, + }); + } + }, + component: About, +}); + +function About() { + const { user, logout } = useAuth(); + const navigate = useNavigate({ from: "/about" }); + const handleLogout = () => { + logout().then(() => { + navigate({ to: "/login", search: { redirect: "" } }); + }); + }; + + useEffect(() => { + if (!user) { + navigate({ to: "/login", search: { redirect: "/about" } }); + } + }, [user, navigate]); + return ( +
+

Hello from About!

+ Home +
+ Logout +
+
+ ); +} diff --git a/frontend/src/routes/books.tsx b/frontend/src/routes/books.tsx new file mode 100644 index 00000000..1a42accd --- /dev/null +++ b/frontend/src/routes/books.tsx @@ -0,0 +1,51 @@ +import { createFileRoute, redirect } from "@tanstack/react-router"; +import { useGraphQLClient } from "../context/GraphQLProvider"; +import { graphql } from "../gql/gql"; +import { useQuery } from "@tanstack/react-query"; +import { Book } from "../components/Book"; + +export const Route = createFileRoute("/books")({ + component: Books, + beforeLoad: ({ context, location }) => { + if (!context.auth.loggedIn) { + throw redirect({ + to: "/login", + search: { + redirect: location.href, + }, + }); + } + }, +}); + +const bookQuery = graphql(` + query allBooks($first: Int!) { + books(first: $first) { + edges { + node { + ...BookItem + } + } + } + } +`); + +function Books() { + const { graphql: g } = useGraphQLClient(); + const { data } = useQuery({ + queryKey: ["allBooks", { first: 10 }], + queryFn: async () => g.request(bookQuery, { first: 10 }), + }); + + return ( +
+ {data && ( +
    + {data.books?.edges?.map( + (e, i) => e?.node && + )} +
+ )} +
+ ); +} diff --git a/frontend/src/routes/index.lazy.tsx b/frontend/src/routes/index.lazy.tsx deleted file mode 100644 index bdfa06b3..00000000 --- a/frontend/src/routes/index.lazy.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { createLazyFileRoute } from "@tanstack/react-router"; - -export const Route = createLazyFileRoute("/")({ - component: Index, -}); - -function Index() { - return ( -

Welcome Home!

- ); -} diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx new file mode 100644 index 00000000..149222ae --- /dev/null +++ b/frontend/src/routes/index.tsx @@ -0,0 +1,40 @@ +import { createFileRoute } from "@tanstack/react-router"; +import { Link } from "@tanstack/react-router"; +import { useAuth } from "../context/AuthProvider"; +import { useNavigate } from "@tanstack/react-router"; + +export const Route = createFileRoute("/")({ + component: Index, +}); + +function Index() { + const { loggedIn, logout } = useAuth(); + const navigate = useNavigate({ from: "/" }); + const handleLogout = () => { + logout().then(() => { + navigate({ to: "/login", search: { redirect: "/" } }); + }); + }; + return ( +
+

Welcome Home!

+
    +
  • + + Login + +
  • +
  • + About +
  • + {loggedIn && ( +
  • +
    + Logout +
    +
  • + )} +
+
+ ); +} diff --git a/frontend/src/routes/login.lazy.tsx b/frontend/src/routes/login.lazy.tsx deleted file mode 100644 index 1a711a57..00000000 --- a/frontend/src/routes/login.lazy.tsx +++ /dev/null @@ -1,184 +0,0 @@ -import { useState } from "react"; -import { createLazyFileRoute } from "@tanstack/react-router"; - -import { IconType } from "react-icons"; -import { FaRegEnvelope, FaRegUser } from "react-icons/fa"; -import { MdLockOutline } from "react-icons/md"; - -export const Route = createLazyFileRoute("/login")({ - component: Login, -}); - -enum ButtonColor { - Primary = 1, - Accent, -} - -interface ButtonProps { - color: ButtonColor; - children: React.ReactNode; - onClick?: () => void; -} - -function Button({ color, children, onClick }: ButtonProps) { - const onClickFunc = onClick || (() => {}); - const bgColor = - color === ButtonColor.Primary ? "bg-primary-500" : "bg-accent-500"; - const hoverColor = - color === ButtonColor.Primary - ? "hover:bg-primary-400" - : "hover:bg-accent-400"; - return ( -
- {children} -
- ); -} - -interface FormFieldProps { - name: string; - placeholder: string; - type: string; - Icon: IconType; -} - -function FormField({ name, placeholder, type, Icon }: FormFieldProps) { - return ( -
- - -
- ); -} - -interface FormProps { - children: React.ReactNode; - translate: string; - isActive: boolean; -} -function Form({ children, isActive, translate }: FormProps) { - const t = isActive ? "" : translate; - return ( -
- {children} -
- ); -} - -function Login() { - const [isSignIn, setIsSignIn] = useState(true); - const h = isSignIn ? "h-[600px]" : "h-[640px]"; - - return ( -
-
-
- {/* Sign In */} -

- Sign in to Start Reading -

-
- - - - -
- - - Forgot Password? - -
-
-
-

or

-
-
- - -
-

- Don't have an account?{" "} - setIsSignIn(false)} - > - Sign up - -

{" "} -
- - -
- {/* Register */} -

- Create an Account -

-
- - - - - -
-
-

or

-
-
- - -
-

- Already Registered?{" "} - setIsSignIn(true)} - > - Sign in - -

{" "} -
- -
-
- ); -} diff --git a/frontend/src/routes/login.tsx b/frontend/src/routes/login.tsx new file mode 100644 index 00000000..40f399e6 --- /dev/null +++ b/frontend/src/routes/login.tsx @@ -0,0 +1,62 @@ +import { useState, useEffect } from "react"; +import { + createFileRoute, + useNavigate, + getRouteApi, +} from "@tanstack/react-router"; + +import { useAuth } from "../context/AuthProvider"; +import { z } from "zod"; + +import LoginForm from "../components/Login/LoginForm"; +import RegisterForm from "../components/Login/RegisterForm"; + +const routeApi = getRouteApi("/login"); + +export const Route = createFileRoute("/login")({ + validateSearch: z.object({ + redirect: z.string().catch("/"), + }), + component: Login, +}); + +function Login() { + const [isSignIn, setIsSignIn] = useState(true); + const h = isSignIn ? "h-[600px]" : "h-[640px]"; + const { loggedIn, initialized } = useAuth(); + const navigate = useNavigate({ from: "/login" }); + const search = routeApi.useSearch(); + + useEffect(() => { + if (loggedIn) { + navigate({ to: search.redirect }); + } + }, [loggedIn]); + + return ( + <> + {initialized && !loggedIn ? ( +
+
+ setIsSignIn(false)} + redirect={search.redirect} + /> + + setIsSignIn(true)} + /> +
+
+ ) : ( +
+ )} + + ); +} diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index bef60c41..a47f61d9 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -54,10 +54,40 @@ export default { }, "light-accent": "#9cc1a2", "muted-light-accent": "#a7c0ba", - success: "#3f9c58", - warning: "#bc8c20", - danger: "#f44336", default: "#999999", + success: { + 100: "#d9ebde", + 200: "#b2d7bc", + 300: "#8cc49b", + 400: "#65b079", + 500: "#3f9c58", + 600: "#327d46", + 700: "#265e35", + 800: "#193e23", + 900: "#0d1f12", + }, + warning: { + 100: "#f2e8d2", + 200: "#e4d1a6", + 300: "#d7ba79", + 400: "#c9a34d", + 500: "#bc8c20", + 600: "#96701a", + 700: "#715413", + 800: "#4b380d", + 900: "#261c06", + }, + danger: { + 100: "#fdd9d7", + 200: "#fbb4af", + 300: "#f88e86", + 400: "#f6695e", + 500: "#f44336", + 600: "#c3362b", + 700: "#922820", + 800: "#621b16", + 900: "#310d0b", + }, }, }, }, diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index badf506b..94e2eaa6 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -1,11 +1,8 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' -import { TanStackRouterVite } from '@tanstack/router-vite-plugin' +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import { TanStackRouterVite } from "@tanstack/router-vite-plugin"; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [ - react(), - TanStackRouterVite(), - ], -}) + plugins: [TanStackRouterVite(), react()], +}); diff --git a/internal/commands/root.go b/internal/commands/root.go index 7265de3d..2c435abb 100644 --- a/internal/commands/root.go +++ b/internal/commands/root.go @@ -246,6 +246,8 @@ func rootRun(_ *cobra.Command, _ []string) { r.Handle("/playground", playground.Handler("Lybbrio GraphQL playground", "/graphql")) }) + r.Mount("/", handler.WebRoutes(conf.DevMode, conf.DevProxy, conf.AssetFolder)) + srv.Addr = fmt.Sprintf("%s:%d", conf.Interface, conf.Port) srv.Handler = r diff --git a/internal/config/config.go b/internal/config/config.go index 74bb235a..c4695278 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -29,6 +29,9 @@ var defaultSettings = map[string]interface{}{ "go-collector": true, "process-collector": true, "calibre-library-path": "./books/", + "dev-mode": false, + "dev-proxy": "http://localhost:5173/", + "asset-folder": "dist", "db": map[string]interface{}{ "driver": "sqlite3", "dsn": "file:database/app.db?cache=shared&_fk=1", @@ -82,6 +85,9 @@ func RegisterFlags(flagSet *flag.FlagSet) { flagSet.String("jwt.hmac-secret", "", "JWT HMACSecret") flagSet.String("jwt.rsa-private-key", "", "JWT RSAPrivateKey") flagSet.String("jwt.rsa-public-key", "", "JWT RSAPublicKey") + flagSet.Bool("dev-mode", false, "Development mode") + flagSet.String("dev-proxy", "http://localhost:3000", "Development proxy") + flagSet.String("asset-folder", "dist", "Asset folder") } type DatabaseConfig struct { @@ -153,6 +159,8 @@ type Config struct { Interface string `koanf:"interface" validate:"ip"` Port int `koanf:"port" validate:"number,gt=0"` DevMode bool `koanf:"dev-mode"` + DevProxy string `koanf:"dev-proxy" validate:"url"` + AssetFolder string `koanf:"asset-folder"` GoCollector bool `koanf:"go-collector"` ProcessCollector bool `koanf:"process-collector"` diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 40a3449d..0b79e7f2 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -200,6 +200,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -231,6 +232,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -262,6 +264,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -293,6 +296,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "invalid", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -324,6 +328,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "invalid", DSN: ""}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -355,6 +360,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "invalid", DSN: ""}, Task: TaskConfig{Workers: -1, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -386,6 +392,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -417,6 +424,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ @@ -448,6 +456,7 @@ func Test_Validate(t *testing.T) { GoCollector: false, ProcessCollector: false, CalibreLibraryPath: "/tmp/", + DevProxy: "http://localhost:3000", DB: DatabaseConfig{Driver: "sqlite3", DSN: "file::memory:?cache=shared"}, Task: TaskConfig{Workers: 10, QueueLength: 100, Cadence: 5 * time.Second}, JWT: JWTConfig{ diff --git a/internal/handler/auth.go b/internal/handler/auth.go index 03d1e3bf..61a0a3b2 100644 --- a/internal/handler/auth.go +++ b/internal/handler/auth.go @@ -25,10 +25,9 @@ type PasswordRequest struct { Username string `json:"username"` Password string `json:"password"` } - type AuthResponse struct { User *ent.User `json:"user"` - AccessToken auth.SignedToken `json:"accessToken"` + AccessToken auth.SignedToken `json:"access_token"` } func accessTokenClaimsFromUser(user *ent.User) *auth.AccessTokenClaims { diff --git a/internal/handler/web.go b/internal/handler/web.go new file mode 100644 index 00000000..e5a7a197 --- /dev/null +++ b/internal/handler/web.go @@ -0,0 +1,66 @@ +package handler + +import ( + "net/http" + "net/http/httputil" + "net/url" + "os" + "path" + "strings" + + "github.com/go-chi/chi/v5" +) + +const VITE_DEV = "http://localhost:5173" + +func WebRoutes(isDev bool, proxyPath string, assetFolder string) http.Handler { + r := chi.NewRouter() + if isDev { + r.Get("/*", FrontendProxy(proxyPath)) + } else { + r.Get("/*", FrontentDist(assetFolder)) + } + return r +} + +func FrontendProxy(proxyPath string) http.HandlerFunc { + remote, err := url.Parse(proxyPath) + if err != nil { + // Should be unreachable + panic(err) + } + proxy := httputil.ReverseProxy{Director: func(r *http.Request) { + r.URL.Scheme = remote.Scheme + r.URL.Host = remote.Host + r.URL.Path = remote.Path + r.URL.Path + r.Host = remote.Host + }} + return func(w http.ResponseWriter, r *http.Request) { + proxy.ServeHTTP(w, r) + } +} + +func FrontentDist(assetFolder string) http.HandlerFunc { + assetDir := http.Dir(assetFolder) + return func(w http.ResponseWriter, r *http.Request) { + rctx := chi.RouteContext(r.Context()) + pathPrefix := strings.TrimSuffix(rctx.RoutePattern(), "/*") + fs := http.StripPrefix(pathPrefix, http.FileServer(assetDir)) + if r.URL.Path != "/" { + fullPath, err := url.JoinPath(assetFolder, strings.TrimPrefix(path.Clean(r.URL.Path), "/")) + if err != nil { + statusCodeResponse(w, r, http.StatusNotFound) + return + } + _, err = os.Stat(fullPath) + if err != nil { + if !os.IsNotExist(err) { + statusCodeResponse(w, r, http.StatusInternalServerError) + return + } + r.URL.Path = "/" + } + } + fs.ServeHTTP(w, r) + } +} From 102dd52a32dde0defece7fa4d9dca744ba9d29de Mon Sep 17 00:00:00 2001 From: Russell Troxel Date: Fri, 2 Feb 2024 23:22:38 -0800 Subject: [PATCH 3/3] Book Cover Logic Signed-off-by: Russell Troxel Formatting Signed-off-by: Russell Troxel Remove node_modules from git Working proxy Infinite Book List Add initial devcontainer configs Signed-off-by: Russell Troxel --- .devcontainer/Dockerfile | 16 + .devcontainer/devcontainer.json | 26 + .devcontainer/docker-compose.yml | 37 + .env.sample | 16 + .gitignore | 26 + frontend/package.json | 1 + frontend/pnpm-lock.yaml | 24 +- frontend/src/components/Book.tsx | 26 - frontend/src/components/Book/Book.module.scss | 149 + frontend/src/components/Book/Book.tsx | 66 + frontend/src/components/Image.tsx | 51 + .../InfiniteBookList.module.scss | 12 + .../InfiniteBookList/InfiniteBookList.tsx | 42 + frontend/src/components/Spinner.module.scss | 9 + frontend/src/components/Spinner.tsx | 11 + frontend/src/gql/gql.ts | 8 +- frontend/src/gql/graphql.ts | 194 +- frontend/src/queries/Book.tsx | 67 + frontend/src/routes/about.tsx | 1 + frontend/src/routes/books.tsx | 39 +- frontend/src/routes/index.tsx | 3 + internal/calibre/tasks/import.go | 61 + internal/commands/root.go | 24 +- internal/ent/book.go | 45 +- internal/ent/book/book.go | 30 + internal/ent/book/where.go | 23 + internal/ent/book_create.go | 32 + internal/ent/book_query.go | 99 +- internal/ent/book_update.go | 163 + internal/ent/bookcover.go | 227 + internal/ent/bookcover/bookcover.go | 172 + internal/ent/bookcover/where.go | 530 + internal/ent/bookcover_create.go | 740 ++ internal/ent/bookcover_delete.go | 88 + internal/ent/bookcover_query.go | 634 + internal/ent/bookcover_update.go | 246 + internal/ent/client.go | 190 +- internal/ent/ent.go | 2 + internal/ent/entql.go | 194 +- internal/ent/gql_collection.go | 147 + internal/ent/gql_edge.go | 20 + internal/ent/gql_mutation_input.go | 16 + internal/ent/gql_node.go | 36 + internal/ent/gql_pagination.go | 294 + internal/ent/gql_where_input.go | 501 + internal/ent/hook/hook.go | 12 + internal/ent/internal/schema.go | 2 +- internal/ent/ksuid.go | 2 + internal/ent/migrate/schema.go | 29 + internal/ent/mutation.go | 970 +- internal/ent/predicate/predicate.go | 3 + internal/ent/privacy/privacy.go | 28 + internal/ent/runtime/runtime.go | 58 + internal/ent/schema/book.go | 2 + internal/ent/schema/bookcover.go | 128 + internal/ent/tx.go | 3 + internal/graph/ent.graphql | 1481 ++- internal/graph/ent.resolvers.go | 11 +- internal/graph/generated/generated.go | 10707 ++++++++++------ internal/graph/me.resolvers.go | 2 +- internal/graph/mutation.resolvers.go | 2 +- internal/handler/image.go | 96 + internal/handler/web.go | 9 +- internal/image/image.go | 64 + internal/image/image_test.go | 87 + internal/image/test_fixtures/broken.jpg | 0 internal/image/test_fixtures/test1.jpg | Bin 0 -> 665 bytes internal/image/test_fixtures/test2.png | Bin 0 -> 181 bytes internal/image/test_fixtures/test3.gif | Bin 0 -> 1201 bytes internal/image/test_fixtures/test4.jpeg | Bin 0 -> 634 bytes 70 files changed, 14835 insertions(+), 4199 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml create mode 100644 .env.sample delete mode 100644 frontend/src/components/Book.tsx create mode 100644 frontend/src/components/Book/Book.module.scss create mode 100644 frontend/src/components/Book/Book.tsx create mode 100644 frontend/src/components/Image.tsx create mode 100644 frontend/src/components/InfiniteBookList/InfiniteBookList.module.scss create mode 100644 frontend/src/components/InfiniteBookList/InfiniteBookList.tsx create mode 100644 frontend/src/components/Spinner.module.scss create mode 100644 frontend/src/components/Spinner.tsx create mode 100644 frontend/src/queries/Book.tsx create mode 100644 internal/ent/bookcover.go create mode 100644 internal/ent/bookcover/bookcover.go create mode 100644 internal/ent/bookcover/where.go create mode 100644 internal/ent/bookcover_create.go create mode 100644 internal/ent/bookcover_delete.go create mode 100644 internal/ent/bookcover_query.go create mode 100644 internal/ent/bookcover_update.go create mode 100644 internal/ent/schema/bookcover.go create mode 100644 internal/handler/image.go create mode 100644 internal/image/image.go create mode 100644 internal/image/image_test.go create mode 100644 internal/image/test_fixtures/broken.jpg create mode 100644 internal/image/test_fixtures/test1.jpg create mode 100644 internal/image/test_fixtures/test2.png create mode 100644 internal/image/test_fixtures/test3.gif create mode 100644 internal/image/test_fixtures/test4.jpeg diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..7c8a440c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/devcontainers/go:1-1.23-bookworm + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + +# [Optional] Uncomment the next lines to use go get to install anything else you need +USER vscode +# Install Mage +RUN git clone https://github.com/magefile/mage && cd mage && go run bootstrap.go + +# RUN go get -x +USER root + +# [Optional] Uncomment this line to install global node packages. +# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g " 2>&1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..912fd879 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/go-postgres +{ + "name": "Go & PostgreSQL", + "dockerComposeFile": "docker-compose.yml", + "service": "app", + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", + "features": { + "ghcr.io/devcontainers-extra/features/pnpm:2": {} + } + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Configure tool-specific properties. + // "customizations": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [5432], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "go version", + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 00000000..005b971f --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.8" + +volumes: + postgres-data: + +services: + app: + build: + context: . + dockerfile: Dockerfile + env_file: + # Ensure that the variables in .env match the same variables in devcontainer.json + - .env + + volumes: + - ../..:/workspaces:cached + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + # Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function. + network_mode: service:db + + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) + + db: + image: postgres:latest + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + env_file: + # Ensure that the variables in .env match the same variables in devcontainer.json + - .env + + # Add "forwardPorts": ["5432"] to **devcontainer.json** to forward PostgreSQL locally. + # (Adding the "ports" property to this file will not forward from a Codespace.) diff --git a/.env.sample b/.env.sample new file mode 100644 index 00000000..9a22350b --- /dev/null +++ b/.env.sample @@ -0,0 +1,16 @@ +LOG_LEVEL=debug +LOG_FORMAT=json +GRACEFUL_SHUTDOWN_TIMEOUT=1s +BASE_URL=http://localhost:8080 +PORT=8080 +INTERFACE="127.0.0.1" +CALIBRE_LIBRARY_PATH="internal/calibre/test_fixtures/importable" +DEV_MODE=true +DEV_PROXY="http://localhost:5173/" +DB__DRIVER=sqlite3 +DB_DSN="file:database/app.db?cache=shared&_fk=1" +JWT__SIGNING_METHOD=HS512 +JWT__HMAC_SECRET="" # openssl rand -base64 129 | tr -d '\n' +JWT__ISSUER="http://localhost:8080" +JWT__EXPIRY=1h +JWT__REFRESH_EXPIRY=24h \ No newline at end of file diff --git a/.gitignore b/.gitignore index da91340b..b71989e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,29 @@ database lybbrio .env +books + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/package.json b/frontend/package.json index 1037cb0f..3c4ec5b1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,6 +44,7 @@ "eslint-plugin-react-refresh": "^0.4.5", "postcss": "^8.4.33", "postcss-import": "^16.0.0", + "sass": "^1.70.0", "tailwindcss": "^3.4.1", "ts-node": "^10.9.2", "typescript": "^5.3.3", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index f238f227..2997e3c7 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -94,6 +94,9 @@ devDependencies: postcss-import: specifier: ^16.0.0 version: 16.0.0(postcss@8.4.33) + sass: + specifier: ^1.70.0 + version: 1.70.0 tailwindcss: specifier: ^3.4.1 version: 3.4.1(ts-node@10.9.2) @@ -105,7 +108,7 @@ devDependencies: version: 5.3.3 vite: specifier: ^5.0.12 - version: 5.0.12(@types/node@20.11.16) + version: 5.0.12(@types/node@20.11.16)(sass@1.70.0) packages: @@ -2286,7 +2289,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.23.3(@babel/core@7.23.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.0 - vite: 5.0.12(@types/node@20.11.16) + vite: 5.0.12(@types/node@20.11.16)(sass@1.70.0) transitivePeerDependencies: - supports-color dev: true @@ -3551,6 +3554,10 @@ packages: engines: {node: '>=0.8.0'} dev: true + /immutable@4.3.5: + resolution: {integrity: sha512-8eabxkth9gZatlwl5TBuJnCsoTADlL6ftEr7A4qgdaTsPyreilDSnUk57SO+jfKcNtxPa22U5KK6DSeAYhpBJw==} + dev: true + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} @@ -4581,6 +4588,16 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true + /sass@1.70.0: + resolution: {integrity: sha512-uUxNQ3zAHeAx5nRFskBnrWzDUJrrvpCPD5FNAoRvTi0WwremlheES3tg+56PaVtCs5QDRX5CBLxxKMDJMEa1WQ==} + engines: {node: '>=14.0.0'} + hasBin: true + dependencies: + chokidar: 3.5.3 + immutable: 4.3.5 + source-map-js: 1.0.2 + dev: true + /scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: @@ -5050,7 +5067,7 @@ packages: engines: {node: '>=12'} dev: true - /vite@5.0.12(@types/node@20.11.16): + /vite@5.0.12(@types/node@20.11.16)(sass@1.70.0): resolution: {integrity: sha512-4hsnEkG3q0N4Tzf1+t6NdN9dg/L3BM+q8SWgbSPnJvrgH2kgdyzfVJwbR1ic69/4uMJJ/3dqDZZE5/WwqW8U1w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -5082,6 +5099,7 @@ packages: esbuild: 0.19.12 postcss: 8.4.33 rollup: 4.9.6 + sass: 1.70.0 optionalDependencies: fsevents: 2.3.3 dev: true diff --git a/frontend/src/components/Book.tsx b/frontend/src/components/Book.tsx deleted file mode 100644 index 63ca376d..00000000 --- a/frontend/src/components/Book.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { FragmentType, useFragment } from "../gql/fragment-masking"; -import { graphql } from "../gql/gql"; - -export const BookFragment = graphql(/* GraphQL */ ` - fragment BookItem on Book { - id - title - authors { - name - } - description - } -`); - -export function Book({ book }: { book: FragmentType }) { - const bk = useFragment(BookFragment, book); - return ( -
-

{bk.title}

-

- by {bk.authors?.map((a) => {a.name})} -

-

{bk.description}

-
- ); -} diff --git a/frontend/src/components/Book/Book.module.scss b/frontend/src/components/Book/Book.module.scss new file mode 100644 index 00000000..0a616df3 --- /dev/null +++ b/frontend/src/components/Book/Book.module.scss @@ -0,0 +1,149 @@ +:root { + --book-card-transition-timing: 200ms; + --div-scale-factor: 1.02; +} +// .container:before { +// content: ""; +// position: absolute; +// display: block; +// z-index: 15; +// top: 0; +// right: 0; +// border-width: 0 24px 24px 0; +// border-style: solid; +// border-radius: 0 0 0 0.375em; +// border-color: #555 #fff; +// } +.container { + aspect-ratio: 2/3; + overflow: hidden; + border-radius: 0.375em; + display: flex; + position: relative; + box-shadow: 0 25px 50px -12px #000; + img { + width: 100%; + height: 100%; + object-fit: cover; + object-position: center; + transition-timing-function: cubic-linear(0.4, 0, 0.2, 1); + transition-duration: var(--book-card-transition-timing); + } +} + +.container:hover div.info { + opacity: 0.8; + transform: translate(0) scale(var(--div-scale-factor)); + -webkit-transform: translate(1%) scale(var(--div-scale-factor)); + -moz-transform: translate(1%) scale(var(--div-scale-factor)); + -ms-transform: translate(1%) scale(var(--div-scale-factor)); + -o-transform: translate(1%) scale(var(--div-scale-factor)); +} + +.container:hover img { + filter: blur(5px); +} + +div.info { + display: flex; + flex-direction: column; + opacity: 0; + position: absolute; + z-index: 10; + width: 110%; + background-color: #333; + padding: 1em; + padding-top: 2em; + text-align: center; + box-shadow: -25px 25px 50px -12px #00000080; + /* slide in from the right */ + transform: translate(100%) scale(var(--div-scale-factor)); + -webkit-transform: translate(100%) scale(var(--div-scale-factor)); + -moz-transform: translate(100%) scale(var(--div-scale-factor)); + -ms-transform: translate(100%) scale(var(--div-scale-factor)); + -o-transform: translate(100%) scale(var(--div-scale-factor)); + /* animation */ + transition-property: + transform, + -webkit-transform, + -moz-transform, + -ms-transform, + -o-transform; + transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); + transition-duration: var(--book-card-transition-timing); + + h1 { + font-size: 1.25em; + font-weight: bold; + color: #fff; + } + + .byline { + font-size: 0.875em; + font-style: italic; + } + + .tags { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.5em; + margin-top: auto; + margin-bottom: 1em; + width: 100%; + span { + padding: 0.125em 0.5em; + border-radius: 0.5em; + background-color: #fff; + color: #333; + font-size: 0.75em; + } + } +} + +.bottomBadges { + position: absolute; + display: flex; + gap: 0.5em; + bottom: 0; + right: 0; + padding: 0.5rem; + z-index: 15; + > * { + cursor: pointer; + } +} + +.menu { + position: absolute; + top: 0; + right: 0; + padding: 0.5rem 0.5rem; + z-index: 10; + z-index: 15; + cursor: pointer; +} + +// .tooltip { +// position: relative; +// display: inline-block; +// .tooltiptext { +// visibility: hidden; +// width: 100px; +// bottom: 100%; +// left: 50%; +// margin-left: -60px; +// background-color: #333; +// color: #fff; +// text-align: cetner; +// padding: 5px 0; +// border-radius: 6px; +// background-color: lime; + +// position: absolute; +// z-index: 1000; +// } +// :hover .tooltiptext { +// visibility: visible; +// } +// } diff --git a/frontend/src/components/Book/Book.tsx b/frontend/src/components/Book/Book.tsx new file mode 100644 index 00000000..4126538d --- /dev/null +++ b/frontend/src/components/Book/Book.tsx @@ -0,0 +1,66 @@ +import { useState, useLayoutEffect, useRef, useEffect } from "react"; +import { FragmentType, useFragment } from "../../gql/fragment-masking"; +import { useDebounce } from "../../hooks/useDebounce"; +import { BookFragment } from "../../queries/Book"; + +import { FaBook, FaCircleCheck } from "react-icons/fa6"; +import { BsThreeDots } from "react-icons/bs"; + +import { Img } from "../Image"; + +import styles from "./Book.module.scss"; + +export function Book({ book }: { book: FragmentType }) { + const bk = useFragment(BookFragment, book); + const container = useRef(null); + const [size, setSize] = useState({ width: 0, height: 0 }); + const handleResize = useDebounce(() => { + setSize({ + height: container.current?.offsetHeight || 0, + width: container.current?.offsetWidth || 0, + }); + }, 100); + useEffect(() => { + window.addEventListener("resize", handleResize); + return () => window.removeEventListener("resize", handleResize); + }); + useLayoutEffect(() => { + setSize({ + height: container.current?.offsetHeight || 0, + width: container.current?.offsetWidth || 0, + }); + }, [container.current]); + const cover = bk.covers?.[0]; + const authors = bk.authors?.map((a) => a.name).join(", "); + const url = cover?.url || ""; + return ( +
+ {bk.title} +
+
+ +
+

{bk.title}

+

by {authors}

+

+ {bk.tags?.slice(0, 5).map((tag, i) => ( + + {tag.name} + + ))} +

+
+
+ {/* console.log('Clicked "Want to Read" on ' + bk.title)} + /> + console.log('Clicked "Read" on ' + bk.title)} + /> */} +
+
+ ); +} diff --git a/frontend/src/components/Image.tsx b/frontend/src/components/Image.tsx new file mode 100644 index 00000000..72cadf2d --- /dev/null +++ b/frontend/src/components/Image.tsx @@ -0,0 +1,51 @@ +import { useState, useEffect } from "react"; +import { useAuth } from "../context/AuthProvider"; + +async function convertBlobToBase64(blob: Blob) { + const reader = new FileReader(); + reader.readAsDataURL(blob); + return new Promise((resolve, reject) => { + reader.onload = () => { + if (reader.result) { + resolve(reader.result.toString()); + } else { + reject("Failed to convert blob to base64"); + } + }; + }); +} + +interface ImgProps extends React.ImgHTMLAttributes { + url: string; + alt: string; +} + +export function Img({ url, alt, ...props }: ImgProps) { + const { fetcher } = useAuth(); + const [data, setData] = useState(""); + useEffect(() => { + interface BlobAndType { + blob: Blob; + contentType: string | null; + } + + fetcher(url, { + method: "GET", + }) + .then(async (res: Response) => { + const b = await res.blob(); + return { + blob: b, + contentType: res.headers.get("content-type"), + }; + }) + .then(async (res: BlobAndType) => { + const b64data = await convertBlobToBase64(res.blob); + setData(b64data); + }) + .catch((error: any) => { + console.error("Image fetch failed: ", error); + }); + }, [fetcher]); + return {alt}; +} diff --git a/frontend/src/components/InfiniteBookList/InfiniteBookList.module.scss b/frontend/src/components/InfiniteBookList/InfiniteBookList.module.scss new file mode 100644 index 00000000..269a2daa --- /dev/null +++ b/frontend/src/components/InfiniteBookList/InfiniteBookList.module.scss @@ -0,0 +1,12 @@ +.listContainer { + position: relative; + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 1rem; + padding: 2.5 rem; +} + +.loaderDiv { + position: absolute; + bottom: 50em; +} diff --git a/frontend/src/components/InfiniteBookList/InfiniteBookList.tsx b/frontend/src/components/InfiniteBookList/InfiniteBookList.tsx new file mode 100644 index 00000000..dbb5ae5b --- /dev/null +++ b/frontend/src/components/InfiniteBookList/InfiniteBookList.tsx @@ -0,0 +1,42 @@ +import { Fragment, useEffect } from "react"; +import { useSuspenseInfiniteQuery } from "@tanstack/react-query"; +import { useInView } from "react-intersection-observer"; + +import { infiniteBookQueryOptions } from "../../queries/Book"; +import { Book } from "../Book/Book"; +import { Spinner } from "../Spinner"; + +import styles from "./InfiniteBookList.module.scss"; + +export function InfiniteBookList() { + const { data, isFetching, isLoading, fetchNextPage } = + useSuspenseInfiniteQuery(infiniteBookQueryOptions({ pageSize: 50 })); + const [ref, inView] = useInView(); + + useEffect(() => { + if (inView) { + fetchNextPage(); + } + }, [inView, fetchNextPage]); + + return ( +
+ {isLoading ? ( +
Loading...
+ ) : ( +
+ {data?.pages.map((page, i) => ( + + {page.books.edges?.map((edge, j) => { + if (edge?.node) + return ; + })} + + ))} +
+ {isFetching && } +
+ )} +
+ ); +} diff --git a/frontend/src/components/Spinner.module.scss b/frontend/src/components/Spinner.module.scss new file mode 100644 index 00000000..f8578475 --- /dev/null +++ b/frontend/src/components/Spinner.module.scss @@ -0,0 +1,9 @@ +.spinner { + animation: spin 1s linear infinite; +} + +@keyframes spin { + to { + transform: rotate(360deg); + } +} diff --git a/frontend/src/components/Spinner.tsx b/frontend/src/components/Spinner.tsx new file mode 100644 index 00000000..95c0157c --- /dev/null +++ b/frontend/src/components/Spinner.tsx @@ -0,0 +1,11 @@ +import { FaCircleNotch } from "react-icons/fa"; + +import styles from "./Spinner.module.scss"; + +export function Spinner() { + return ( +
+ +
+ ); +} diff --git a/frontend/src/gql/gql.ts b/frontend/src/gql/gql.ts index 33413208..10957016 100644 --- a/frontend/src/gql/gql.ts +++ b/frontend/src/gql/gql.ts @@ -13,8 +13,8 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * Therefore it is highly recommended to use the babel or swc plugin for production. */ const documents = { - "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n": types.BookItemFragmentDoc, - "\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n": types.AllBooksDocument, + "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n covers {\n width\n height\n url\n }\n tags {\n name\n }\n description\n }\n": types.BookItemFragmentDoc, + "\n query whereableBooks($first: Int!, $after: Cursor, $where: BookWhereInput) {\n books(first: $first, after: $after, where: $where) {\n totalCount\n edges {\n node {\n ...BookItem\n }\n }\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n": types.WhereableBooksDocument, }; /** @@ -34,11 +34,11 @@ export function graphql(source: string): unknown; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n"): (typeof documents)["\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n description\n }\n"]; +export function graphql(source: "\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n covers {\n width\n height\n url\n }\n tags {\n name\n }\n description\n }\n"): (typeof documents)["\n fragment BookItem on Book {\n id\n title\n authors {\n name\n }\n covers {\n width\n height\n url\n }\n tags {\n name\n }\n description\n }\n"]; /** * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients. */ -export function graphql(source: "\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n"): (typeof documents)["\n query allBooks($first: Int!) {\n books(first: $first) {\n edges {\n node {\n ...BookItem\n }\n }\n }\n }\n"]; +export function graphql(source: "\n query whereableBooks($first: Int!, $after: Cursor, $where: BookWhereInput) {\n books(first: $first, after: $after, where: $where) {\n totalCount\n edges {\n node {\n ...BookItem\n }\n }\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n"): (typeof documents)["\n query whereableBooks($first: Int!, $after: Cursor, $where: BookWhereInput) {\n books(first: $first, after: $after, where: $where) {\n totalCount\n edges {\n node {\n ...BookItem\n }\n }\n pageInfo {\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n"]; export function graphql(source: string) { return (documents as any)[source] ?? {}; diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts index b1b8cc20..bea1b576 100644 --- a/frontend/src/gql/graphql.ts +++ b/frontend/src/gql/graphql.ts @@ -178,6 +178,7 @@ export type Book = Node & { __typename?: 'Book'; authors?: Maybe>; calibreID?: Maybe; + covers?: Maybe>; createTime: Scalars['Time']['output']; description?: Maybe; files?: Maybe>; @@ -208,6 +209,167 @@ export type BookConnection = { totalCount: Scalars['Int']['output']; }; +export type BookCover = Node & { + __typename?: 'BookCover'; + book: Book; + /** MIME type */ + contenttype: Scalars['String']['output']; + createTime: Scalars['Time']['output']; + /** Height in pixels */ + height: Scalars['Int']['output']; + id: Scalars['ID']['output']; + path: Scalars['String']['output']; + /** Size in bytes */ + size: Scalars['Int']['output']; + updateTime: Scalars['Time']['output']; + /** URL to the image */ + url: Scalars['String']['output']; + /** Width in pixels */ + width: Scalars['Int']['output']; +}; + +/** A connection to a list of items. */ +export type BookCoverConnection = { + __typename?: 'BookCoverConnection'; + /** A list of edges. */ + edges?: Maybe>>; + /** Information to aid in pagination. */ + pageInfo: PageInfo; + /** Identifies the total count of items in the connection. */ + totalCount: Scalars['Int']['output']; +}; + +/** An edge in a connection. */ +export type BookCoverEdge = { + __typename?: 'BookCoverEdge'; + /** A cursor for use in pagination. */ + cursor: Scalars['Cursor']['output']; + /** The item at the end of the edge. */ + node?: Maybe; +}; + +/** Ordering options for BookCover connections */ +export type BookCoverOrder = { + /** The ordering direction. */ + direction?: OrderDirection; + /** The field by which to order BookCovers. */ + field: BookCoverOrderField; +}; + +/** Properties by which BookCover connections can be ordered. */ +export enum BookCoverOrderField { + Size = 'SIZE' +} + +/** + * BookCoverWhereInput is used for filtering BookCover objects. + * Input was generated by ent. + */ +export type BookCoverWhereInput = { + and?: InputMaybe>; + /** contentType field predicates */ + contenttype?: InputMaybe; + contenttypeContains?: InputMaybe; + contenttypeContainsFold?: InputMaybe; + contenttypeEqualFold?: InputMaybe; + contenttypeGT?: InputMaybe; + contenttypeGTE?: InputMaybe; + contenttypeHasPrefix?: InputMaybe; + contenttypeHasSuffix?: InputMaybe; + contenttypeIn?: InputMaybe>; + contenttypeLT?: InputMaybe; + contenttypeLTE?: InputMaybe; + contenttypeNEQ?: InputMaybe; + contenttypeNotIn?: InputMaybe>; + /** create_time field predicates */ + createTime?: InputMaybe; + createTimeGT?: InputMaybe; + createTimeGTE?: InputMaybe; + createTimeIn?: InputMaybe>; + createTimeLT?: InputMaybe; + createTimeLTE?: InputMaybe; + createTimeNEQ?: InputMaybe; + createTimeNotIn?: InputMaybe>; + /** book edge predicates */ + hasBook?: InputMaybe; + hasBookWith?: InputMaybe>; + /** height field predicates */ + height?: InputMaybe; + heightGT?: InputMaybe; + heightGTE?: InputMaybe; + heightIn?: InputMaybe>; + heightLT?: InputMaybe; + heightLTE?: InputMaybe; + heightNEQ?: InputMaybe; + heightNotIn?: InputMaybe>; + /** id field predicates */ + id?: InputMaybe; + idGT?: InputMaybe; + idGTE?: InputMaybe; + idIn?: InputMaybe>; + idLT?: InputMaybe; + idLTE?: InputMaybe; + idNEQ?: InputMaybe; + idNotIn?: InputMaybe>; + not?: InputMaybe; + or?: InputMaybe>; + /** path field predicates */ + path?: InputMaybe; + pathContains?: InputMaybe; + pathContainsFold?: InputMaybe; + pathEqualFold?: InputMaybe; + pathGT?: InputMaybe; + pathGTE?: InputMaybe; + pathHasPrefix?: InputMaybe; + pathHasSuffix?: InputMaybe; + pathIn?: InputMaybe>; + pathLT?: InputMaybe; + pathLTE?: InputMaybe; + pathNEQ?: InputMaybe; + pathNotIn?: InputMaybe>; + /** size field predicates */ + size?: InputMaybe; + sizeGT?: InputMaybe; + sizeGTE?: InputMaybe; + sizeIn?: InputMaybe>; + sizeLT?: InputMaybe; + sizeLTE?: InputMaybe; + sizeNEQ?: InputMaybe; + sizeNotIn?: InputMaybe>; + /** update_time field predicates */ + updateTime?: InputMaybe; + updateTimeGT?: InputMaybe; + updateTimeGTE?: InputMaybe; + updateTimeIn?: InputMaybe>; + updateTimeLT?: InputMaybe; + updateTimeLTE?: InputMaybe; + updateTimeNEQ?: InputMaybe; + updateTimeNotIn?: InputMaybe>; + /** url field predicates */ + url?: InputMaybe; + urlContains?: InputMaybe; + urlContainsFold?: InputMaybe; + urlEqualFold?: InputMaybe; + urlGT?: InputMaybe; + urlGTE?: InputMaybe; + urlHasPrefix?: InputMaybe; + urlHasSuffix?: InputMaybe; + urlIn?: InputMaybe>; + urlLT?: InputMaybe; + urlLTE?: InputMaybe; + urlNEQ?: InputMaybe; + urlNotIn?: InputMaybe>; + /** width field predicates */ + width?: InputMaybe; + widthGT?: InputMaybe; + widthGTE?: InputMaybe; + widthIn?: InputMaybe>; + widthLT?: InputMaybe; + widthLTE?: InputMaybe; + widthNEQ?: InputMaybe; + widthNotIn?: InputMaybe>; +}; + /** An edge in a connection. */ export type BookEdge = { __typename?: 'BookEdge'; @@ -380,6 +542,9 @@ export type BookWhereInput = { /** authors edge predicates */ hasAuthors?: InputMaybe; hasAuthorsWith?: InputMaybe>; + /** covers edge predicates */ + hasCovers?: InputMaybe; + hasCoversWith?: InputMaybe>; /** files edge predicates */ hasFiles?: InputMaybe; hasFilesWith?: InputMaybe>; @@ -524,6 +689,7 @@ export type CreateAuthorInput = { export type CreateBookInput = { authorIDs?: InputMaybe>; calibreID?: InputMaybe; + coverIDs?: InputMaybe>; createTime?: InputMaybe; description?: InputMaybe; fileIDs?: InputMaybe>; @@ -1162,6 +1328,7 @@ export type PublisherWhereInput = { export type Query = { __typename?: 'Query'; authors: AuthorConnection; + bookCovers: BookCoverConnection; bookFiles: Array; books: BookConnection; identifiers: IdentifierConnection; @@ -1191,6 +1358,16 @@ export type QueryAuthorsArgs = { }; +export type QueryBookCoversArgs = { + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + orderBy?: InputMaybe; + where?: InputMaybe; +}; + + export type QueryBooksArgs = { after?: InputMaybe; before?: InputMaybe; @@ -1850,6 +2027,7 @@ export type UpdateAuthorInput = { */ export type UpdateBookInput = { addAuthorIDs?: InputMaybe>; + addCoverIDs?: InputMaybe>; addFileIDs?: InputMaybe>; addIdentifierIDs?: InputMaybe>; addLanguageIDs?: InputMaybe>; @@ -1860,6 +2038,7 @@ export type UpdateBookInput = { calibreID?: InputMaybe; clearAuthors?: InputMaybe; clearCalibreID?: InputMaybe; + clearCovers?: InputMaybe; clearDescription?: InputMaybe; clearFiles?: InputMaybe; clearIdentifiers?: InputMaybe; @@ -1876,6 +2055,7 @@ export type UpdateBookInput = { path?: InputMaybe; publishedDate?: InputMaybe; removeAuthorIDs?: InputMaybe>; + removeCoverIDs?: InputMaybe>; removeFileIDs?: InputMaybe>; removeIdentifierIDs?: InputMaybe>; removeLanguageIDs?: InputMaybe>; @@ -2165,17 +2345,19 @@ export type UserWhereInput = { usernameNotIn?: InputMaybe>; }; -export type BookItemFragment = { __typename?: 'Book', id: string, title: string, description?: string | null, authors?: Array<{ __typename?: 'Author', name: string }> | null } & { ' $fragmentName'?: 'BookItemFragment' }; +export type BookItemFragment = { __typename?: 'Book', id: string, title: string, description?: string | null, authors?: Array<{ __typename?: 'Author', name: string }> | null, covers?: Array<{ __typename?: 'BookCover', width: number, height: number, url: string }> | null, tags?: Array<{ __typename?: 'Tag', name: string }> | null } & { ' $fragmentName'?: 'BookItemFragment' }; -export type AllBooksQueryVariables = Exact<{ +export type WhereableBooksQueryVariables = Exact<{ first: Scalars['Int']['input']; + after?: InputMaybe; + where?: InputMaybe; }>; -export type AllBooksQuery = { __typename?: 'Query', books: { __typename?: 'BookConnection', edges?: Array<{ __typename?: 'BookEdge', node?: ( +export type WhereableBooksQuery = { __typename?: 'Query', books: { __typename?: 'BookConnection', totalCount: number, edges?: Array<{ __typename?: 'BookEdge', node?: ( { __typename?: 'Book' } & { ' $fragmentRefs'?: { 'BookItemFragment': BookItemFragment } } - ) | null } | null> | null } }; + ) | null } | null> | null, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, startCursor?: any | null, endCursor?: any | null } } }; -export const BookItemFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; -export const AllBooksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"allBooks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"books"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BookItem"}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; \ No newline at end of file +export const BookItemFragmentDoc = {"kind":"Document","definitions":[{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"covers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; +export const WhereableBooksDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"whereableBooks"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"first"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"after"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"Cursor"}}},{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"where"}},"type":{"kind":"NamedType","name":{"kind":"Name","value":"BookWhereInput"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"books"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"first"},"value":{"kind":"Variable","name":{"kind":"Name","value":"first"}}},{"kind":"Argument","name":{"kind":"Name","value":"after"},"value":{"kind":"Variable","name":{"kind":"Name","value":"after"}}},{"kind":"Argument","name":{"kind":"Name","value":"where"},"value":{"kind":"Variable","name":{"kind":"Name","value":"where"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"totalCount"}},{"kind":"Field","name":{"kind":"Name","value":"edges"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"node"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"BookItem"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"pageInfo"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"hasNextPage"}},{"kind":"Field","name":{"kind":"Name","value":"startCursor"}},{"kind":"Field","name":{"kind":"Name","value":"endCursor"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"BookItem"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"Book"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"authors"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"covers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"width"}},{"kind":"Field","name":{"kind":"Name","value":"height"}},{"kind":"Field","name":{"kind":"Name","value":"url"}}]}},{"kind":"Field","name":{"kind":"Name","value":"tags"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"name"}}]}},{"kind":"Field","name":{"kind":"Name","value":"description"}}]}}]} as unknown as DocumentNode; \ No newline at end of file diff --git a/frontend/src/queries/Book.tsx b/frontend/src/queries/Book.tsx new file mode 100644 index 00000000..cf7be028 --- /dev/null +++ b/frontend/src/queries/Book.tsx @@ -0,0 +1,67 @@ +import { infiniteQueryOptions } from "@tanstack/react-query"; +import { BookWhereInput } from "../gql/graphql"; +import { useGraphQLClient } from "../context/GraphQLProvider"; +import { graphql } from "../gql"; +import { GraphQLClient } from "graphql-request"; + +export const BookFragment = graphql(/* GraphQL */ ` + fragment BookItem on Book { + id + title + authors { + name + } + covers { + width + height + url + } + tags { + name + } + description + } +`); + +interface infiniteBookQueryProps { + pageSize: number; + where?: BookWhereInput; +} + +const whereablePaginatedBookQuery = graphql(` + query whereableBooks($first: Int!, $after: Cursor, $where: BookWhereInput) { + books(first: $first, after: $after, where: $where) { + totalCount + edges { + node { + ...BookItem + } + } + pageInfo { + hasNextPage + startCursor + endCursor + } + } + } +`); + +export const infiniteBookQueryOptions = ({ + pageSize, + where, +}: infiniteBookQueryProps) => { + const { graphql: g } = useGraphQLClient(); + return infiniteQueryOptions({ + queryKey: ["books", { first: pageSize, where: where }], + queryFn: async ({ pageParam }) => + g.request(whereablePaginatedBookQuery, { + first: pageSize, + after: pageParam, + before: pageParam, + where: where, + }), + initialPageParam: undefined, + getNextPageParam: (lastPage) => + lastPage.books.pageInfo.endCursor ?? undefined, + }); +}; diff --git a/frontend/src/routes/about.tsx b/frontend/src/routes/about.tsx index f89be42d..601f5873 100644 --- a/frontend/src/routes/about.tsx +++ b/frontend/src/routes/about.tsx @@ -42,6 +42,7 @@ function About() {

Hello from About!

Home + Books
Logout
diff --git a/frontend/src/routes/books.tsx b/frontend/src/routes/books.tsx index 1a42accd..1aee4cf2 100644 --- a/frontend/src/routes/books.tsx +++ b/frontend/src/routes/books.tsx @@ -1,8 +1,7 @@ +import { Suspense } from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; -import { useGraphQLClient } from "../context/GraphQLProvider"; -import { graphql } from "../gql/gql"; -import { useQuery } from "@tanstack/react-query"; -import { Book } from "../components/Book"; + +import { InfiniteBookList } from "../components/InfiniteBookList/InfiniteBookList"; export const Route = createFileRoute("/books")({ component: Books, @@ -18,34 +17,12 @@ export const Route = createFileRoute("/books")({ }, }); -const bookQuery = graphql(` - query allBooks($first: Int!) { - books(first: $first) { - edges { - node { - ...BookItem - } - } - } - } -`); - function Books() { - const { graphql: g } = useGraphQLClient(); - const { data } = useQuery({ - queryKey: ["allBooks", { first: 10 }], - queryFn: async () => g.request(bookQuery, { first: 10 }), - }); - return ( -
- {data && ( -
    - {data.books?.edges?.map( - (e, i) => e?.node && - )} -
- )} -
+ Loading ...}> +
+ +
+
); } diff --git a/frontend/src/routes/index.tsx b/frontend/src/routes/index.tsx index 149222ae..4f7593c7 100644 --- a/frontend/src/routes/index.tsx +++ b/frontend/src/routes/index.tsx @@ -27,6 +27,9 @@ function Index() {
  • About
  • +
  • + Books +
  • {loggedIn && (
  • diff --git a/internal/calibre/tasks/import.go b/internal/calibre/tasks/import.go index 7290baff..cfcb2305 100644 --- a/internal/calibre/tasks/import.go +++ b/internal/calibre/tasks/import.go @@ -11,6 +11,7 @@ import ( "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/schema/filetype" "lybbrio/internal/ent/schema/ksuid" + "lybbrio/internal/image" "lybbrio/internal/scheduler" "os" "path/filepath" @@ -156,6 +157,15 @@ func importBook(ctx context.Context, cal calibre.Calibre, client *ent.Client, ca Int64("bookID", calBook.ID). Msg("Failed register book files") } + if calBook.HasCover { + err = registerBookCovers(ctx, cal, client, entBook, calBook) + if err != nil { + log.Warn().Err(err). + Str("book", calBook.Title). + Int64("bookID", calBook.ID). + Msg("Failed register book covers") + } + } return nil } @@ -414,6 +424,57 @@ func registerBookFile(ctx context.Context, client *ent.Client, bookID ksuid.ID, return nil } +func registerBookCovers(ctx context.Context, cal calibre.Calibre, client *ent.Client, book *ent.Book, calBook calibre.Book) error { + log := log.Ctx(ctx).With().Str("book", calBook.Title).Str("bookID", book.ID.String()).Logger() + path := calBook.FullPath(cal) + log.Trace().Str("path", path).Msg("Registering book covers") + files, err := os.ReadDir(calBook.FullPath(cal)) + if err != nil { + return fmt.Errorf("failed to read book directory: %w", err) + } + for _, file := range files { + if file.IsDir() { + continue + } + path := filepath.Join(calBook.FullPath(cal), file.Name()) + err := registerBookCover(ctx, client, book.ID, path, file) + if err != nil { + if inner := errors.Unwrap(err); ent.IsConstraintError(inner) { + continue + } + log.Warn().Err(err). + Str("file", file.Name()). + Msg("Failed to register cover") + } + } + return nil +} + +func registerBookCover(ctx context.Context, client *ent.Client, bookID ksuid.ID, path string, file fs.DirEntry) error { + ext := strings.ToLower(filepath.Ext(file.Name())) + nameWithoutExt := strings.TrimSuffix(file.Name(), ext) + if !strings.HasPrefix(nameWithoutExt, "cover") { + return nil + } + img, err := image.ProcessFile(path) + if err != nil { + return fmt.Errorf("failed to process image: %w", err) + } + + _, err = client.BookCover.Create(). + SetPath(path). + SetSize(img.Size). + SetContentType(img.ContentType). + SetWidth(img.Width). + SetHeight(img.Height). + SetBookID(bookID). + Save(ctx) + if err != nil { + return fmt.Errorf("failed to create book cover: %w", err) + } + return nil +} + // TODO: This really should be as simple as a bulk upsert, but this is blocked by https://github.com/ent/ent/issues/3868 // Example of how to do bulk upserts post https://github.com/ent/ent/issues/3868 // func createOrAttachTags(client *ent.Client, ctx context.Context, book *ent.Book, tags []calibre.Tag) error { diff --git a/internal/commands/root.go b/internal/commands/root.go index 2c435abb..cc59b683 100644 --- a/internal/commands/root.go +++ b/internal/commands/root.go @@ -83,6 +83,7 @@ func initConfig() { } os.Exit(1) } + log.Info().Interface("config", conf).Msg("Loaded config") } func initLogger() { @@ -149,11 +150,14 @@ func rootRun(_ *cobra.Command, _ []string) { // Calibre cal, err := calibre.NewCalibreSQLite(conf.CalibreLibraryPath) - cal = cal.WithLogger(&log.Logger) if err != nil { - log.Fatal().Err(err).Msg("Failed to initialize Calibre") + log.Fatal(). + Err(err). + Str("path", conf.CalibreLibraryPath). + Msg("Failed to initialize Calibre") } + cal = cal.WithLogger(&log.Logger) // Database client, err := db.Open(&conf.DB) @@ -232,11 +236,7 @@ func rootRun(_ *cobra.Command, _ []string) { r.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{})) r.Mount("/auth", handler.AuthRoutes(client, jwtProvider, conf.Argon2ID)) - - r.With( - middleware.ViewerContextMiddleware(jwtProvider), - ).Mount("/download", - handler.DownloadRoutes(client)) + r.Mount("/", handler.WebRoutes(conf.DevMode, conf.DevProxy, conf.AssetFolder)) r.Route("/graphql", func(r chi.Router) { r.With( @@ -246,11 +246,19 @@ func rootRun(_ *cobra.Command, _ []string) { r.Handle("/playground", playground.Handler("Lybbrio GraphQL playground", "/graphql")) }) - r.Mount("/", handler.WebRoutes(conf.DevMode, conf.DevProxy, conf.AssetFolder)) + r.With( + middleware.ViewerContextMiddleware(jwtProvider), + ).Mount("/download", + handler.DownloadRoutes(client)) + r.With( + middleware.ViewerContextMiddleware(jwtProvider), + ).Mount("/image", + handler.ImageRoutes(client)) srv.Addr = fmt.Sprintf("%s:%d", conf.Interface, conf.Port) srv.Handler = r + log.Info().Str("addr", srv.Addr).Msg("Listening and serving") if err := srv.ListenAndServe(); err != http.ErrServerClosed { log.Fatal().Err(err).Msg("Failed to listen and serve") } diff --git a/internal/ent/book.go b/internal/ent/book.go index 032ee15d..97c38057 100644 --- a/internal/ent/book.go +++ b/internal/ent/book.go @@ -62,11 +62,13 @@ type BookEdges struct { Shelf []*Shelf `json:"shelf,omitempty"` // Files holds the value of the files edge. Files []*BookFile `json:"files,omitempty"` + // Covers holds the value of the covers edge. + Covers []*BookCover `json:"covers,omitempty"` // loadedTypes holds the information for reporting if a // type was loaded (or requested) in eager-loading or not. - loadedTypes [8]bool + loadedTypes [9]bool // totalCount holds the count of the edges above. - totalCount [8]map[string]int + totalCount [9]map[string]int namedAuthors map[string][]*Author namedPublisher map[string][]*Publisher @@ -76,6 +78,7 @@ type BookEdges struct { namedLanguage map[string][]*Language namedShelf map[string][]*Shelf namedFiles map[string][]*BookFile + namedCovers map[string][]*BookCover } // AuthorsOrErr returns the Authors value or an error if the edge @@ -150,6 +153,15 @@ func (e BookEdges) FilesOrErr() ([]*BookFile, error) { return nil, &NotLoadedError{edge: "files"} } +// CoversOrErr returns the Covers value or an error if the edge +// was not loaded in eager-loading. +func (e BookEdges) CoversOrErr() ([]*BookCover, error) { + if e.loadedTypes[8] { + return e.Covers, nil + } + return nil, &NotLoadedError{edge: "covers"} +} + // scanValues returns the types for scanning values from sql.Rows. func (*Book) scanValues(columns []string) ([]any, error) { values := make([]any, len(columns)) @@ -297,6 +309,11 @@ func (b *Book) QueryFiles() *BookFileQuery { return NewBookClient(b.config).QueryFiles(b) } +// QueryCovers queries the "covers" edge of the Book entity. +func (b *Book) QueryCovers() *BookCoverQuery { + return NewBookClient(b.config).QueryCovers(b) +} + // Update returns a builder for updating this Book. // Note that you need to call Book.Unwrap() before calling this method if this Book // was returned from a transaction, and the transaction was committed or rolled back. @@ -545,5 +562,29 @@ func (b *Book) appendNamedFiles(name string, edges ...*BookFile) { } } +// NamedCovers returns the Covers named value or an error if the edge was not +// loaded in eager-loading with this name. +func (b *Book) NamedCovers(name string) ([]*BookCover, error) { + if b.Edges.namedCovers == nil { + return nil, &NotLoadedError{edge: name} + } + nodes, ok := b.Edges.namedCovers[name] + if !ok { + return nil, &NotLoadedError{edge: name} + } + return nodes, nil +} + +func (b *Book) appendNamedCovers(name string, edges ...*BookCover) { + if b.Edges.namedCovers == nil { + b.Edges.namedCovers = make(map[string][]*BookCover) + } + if len(edges) == 0 { + b.Edges.namedCovers[name] = []*BookCover{} + } else { + b.Edges.namedCovers[name] = append(b.Edges.namedCovers[name], edges...) + } +} + // Books is a parsable slice of Book. type Books []*Book diff --git a/internal/ent/book/book.go b/internal/ent/book/book.go index 8788454d..bc0335af 100644 --- a/internal/ent/book/book.go +++ b/internal/ent/book/book.go @@ -52,6 +52,8 @@ const ( EdgeShelf = "shelf" // EdgeFiles holds the string denoting the files edge name in mutations. EdgeFiles = "files" + // EdgeCovers holds the string denoting the covers edge name in mutations. + EdgeCovers = "covers" // Table holds the table name of the book in the database. Table = "books" // AuthorsTable is the table that holds the authors relation/edge. The primary key declared below. @@ -98,6 +100,13 @@ const ( FilesInverseTable = "book_files" // FilesColumn is the table column denoting the files relation/edge. FilesColumn = "book_file_book" + // CoversTable is the table that holds the covers relation/edge. + CoversTable = "book_covers" + // CoversInverseTable is the table name for the BookCover entity. + // It exists in this package in order to avoid circular dependency with the "bookcover" package. + CoversInverseTable = "book_covers" + // CoversColumn is the table column denoting the covers relation/edge. + CoversColumn = "book_cover_book" ) // Columns holds all SQL columns for book fields. @@ -337,6 +346,20 @@ func ByFiles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { sqlgraph.OrderByNeighborTerms(s, newFilesStep(), append([]sql.OrderTerm{term}, terms...)...) } } + +// ByCoversCount orders the results by covers count. +func ByCoversCount(opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborsCount(s, newCoversStep(), opts...) + } +} + +// ByCovers orders the results by covers terms. +func ByCovers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newCoversStep(), append([]sql.OrderTerm{term}, terms...)...) + } +} func newAuthorsStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), @@ -393,3 +416,10 @@ func newFilesStep() *sqlgraph.Step { sqlgraph.Edge(sqlgraph.O2M, true, FilesTable, FilesColumn), ) } +func newCoversStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(CoversInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, CoversTable, CoversColumn), + ) +} diff --git a/internal/ent/book/where.go b/internal/ent/book/where.go index c02ddd1f..d7e7805e 100644 --- a/internal/ent/book/where.go +++ b/internal/ent/book/where.go @@ -865,6 +865,29 @@ func HasFilesWith(preds ...predicate.BookFile) predicate.Book { }) } +// HasCovers applies the HasEdge predicate on the "covers" edge. +func HasCovers() predicate.Book { + return predicate.Book(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, CoversTable, CoversColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasCoversWith applies the HasEdge predicate on the "covers" edge with a given conditions (other predicates). +func HasCoversWith(preds ...predicate.BookCover) predicate.Book { + return predicate.Book(func(s *sql.Selector) { + step := newCoversStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + // And groups predicates with the AND operator between them. func And(predicates ...predicate.Book) predicate.Book { return predicate.Book(sql.AndPredicates(predicates...)) diff --git a/internal/ent/book_create.go b/internal/ent/book_create.go index 23c3541f..d3d564ee 100644 --- a/internal/ent/book_create.go +++ b/internal/ent/book_create.go @@ -8,6 +8,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -282,6 +283,21 @@ func (bc *BookCreate) AddFiles(b ...*BookFile) *BookCreate { return bc.AddFileIDs(ids...) } +// AddCoverIDs adds the "covers" edge to the BookCover entity by IDs. +func (bc *BookCreate) AddCoverIDs(ids ...ksuid.ID) *BookCreate { + bc.mutation.AddCoverIDs(ids...) + return bc +} + +// AddCovers adds the "covers" edges to the BookCover entity. +func (bc *BookCreate) AddCovers(b ...*BookCover) *BookCreate { + ids := make([]ksuid.ID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bc.AddCoverIDs(ids...) +} + // Mutation returns the BookMutation object of the builder. func (bc *BookCreate) Mutation() *BookMutation { return bc.mutation @@ -574,6 +590,22 @@ func (bc *BookCreate) createSpec() (*Book, *sqlgraph.CreateSpec) { } _spec.Edges = append(_spec.Edges, edge) } + if nodes := bc.mutation.CoversIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges = append(_spec.Edges, edge) + } return _node, _spec } diff --git a/internal/ent/book_query.go b/internal/ent/book_query.go index 71242234..71b4a677 100644 --- a/internal/ent/book_query.go +++ b/internal/ent/book_query.go @@ -9,6 +9,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -40,6 +41,7 @@ type BookQuery struct { withLanguage *LanguageQuery withShelf *ShelfQuery withFiles *BookFileQuery + withCovers *BookCoverQuery modifiers []func(*sql.Selector) loadTotal []func(context.Context, []*Book) error withNamedAuthors map[string]*AuthorQuery @@ -50,6 +52,7 @@ type BookQuery struct { withNamedLanguage map[string]*LanguageQuery withNamedShelf map[string]*ShelfQuery withNamedFiles map[string]*BookFileQuery + withNamedCovers map[string]*BookCoverQuery // intermediate query (i.e. traversal path). sql *sql.Selector path func(context.Context) (*sql.Selector, error) @@ -262,6 +265,28 @@ func (bq *BookQuery) QueryFiles() *BookFileQuery { return query } +// QueryCovers chains the current query on the "covers" edge. +func (bq *BookQuery) QueryCovers() *BookCoverQuery { + query := (&BookCoverClient{config: bq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(book.Table, book.FieldID, selector), + sqlgraph.To(bookcover.Table, bookcover.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, book.CoversTable, book.CoversColumn), + ) + fromU = sqlgraph.SetNeighbors(bq.driver.Dialect(), step) + return fromU, nil + } + return query +} + // First returns the first Book entity from the query. // Returns a *NotFoundError when no Book was found. func (bq *BookQuery) First(ctx context.Context) (*Book, error) { @@ -462,6 +487,7 @@ func (bq *BookQuery) Clone() *BookQuery { withLanguage: bq.withLanguage.Clone(), withShelf: bq.withShelf.Clone(), withFiles: bq.withFiles.Clone(), + withCovers: bq.withCovers.Clone(), // clone intermediate query. sql: bq.sql.Clone(), path: bq.path, @@ -556,6 +582,17 @@ func (bq *BookQuery) WithFiles(opts ...func(*BookFileQuery)) *BookQuery { return bq } +// WithCovers tells the query-builder to eager-load the nodes that are connected to +// the "covers" edge. The optional arguments are used to configure the query builder of the edge. +func (bq *BookQuery) WithCovers(opts ...func(*BookCoverQuery)) *BookQuery { + query := (&BookCoverClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + bq.withCovers = query + return bq +} + // GroupBy is used to group vertices by one or more fields/columns. // It is often used with aggregate functions, like: count, max, mean, min, sum. // @@ -640,7 +677,7 @@ func (bq *BookQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Book, e var ( nodes = []*Book{} _spec = bq.querySpec() - loadedTypes = [8]bool{ + loadedTypes = [9]bool{ bq.withAuthors != nil, bq.withPublisher != nil, bq.withSeries != nil, @@ -649,6 +686,7 @@ func (bq *BookQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Book, e bq.withLanguage != nil, bq.withShelf != nil, bq.withFiles != nil, + bq.withCovers != nil, } ) _spec.ScanValues = func(columns []string) ([]any, error) { @@ -728,6 +766,13 @@ func (bq *BookQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Book, e return nil, err } } + if query := bq.withCovers; query != nil { + if err := bq.loadCovers(ctx, query, nodes, + func(n *Book) { n.Edges.Covers = []*BookCover{} }, + func(n *Book, e *BookCover) { n.Edges.Covers = append(n.Edges.Covers, e) }); err != nil { + return nil, err + } + } for name, query := range bq.withNamedAuthors { if err := bq.loadAuthors(ctx, query, nodes, func(n *Book) { n.appendNamedAuthors(name) }, @@ -784,6 +829,13 @@ func (bq *BookQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*Book, e return nil, err } } + for name, query := range bq.withNamedCovers { + if err := bq.loadCovers(ctx, query, nodes, + func(n *Book) { n.appendNamedCovers(name) }, + func(n *Book, e *BookCover) { n.appendNamedCovers(name, e) }); err != nil { + return nil, err + } + } for i := range bq.loadTotal { if err := bq.loadTotal[i](ctx, nodes); err != nil { return nil, err @@ -1220,6 +1272,37 @@ func (bq *BookQuery) loadFiles(ctx context.Context, query *BookFileQuery, nodes } return nil } +func (bq *BookQuery) loadCovers(ctx context.Context, query *BookCoverQuery, nodes []*Book, init func(*Book), assign func(*Book, *BookCover)) error { + fks := make([]driver.Value, 0, len(nodes)) + nodeids := make(map[ksuid.ID]*Book) + for i := range nodes { + fks = append(fks, nodes[i].ID) + nodeids[nodes[i].ID] = nodes[i] + if init != nil { + init(nodes[i]) + } + } + query.withFKs = true + query.Where(predicate.BookCover(func(s *sql.Selector) { + s.Where(sql.InValues(s.C(book.CoversColumn), fks...)) + })) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + fk := n.book_cover_book + if fk == nil { + return fmt.Errorf(`foreign-key "book_cover_book" is nil for node %v`, n.ID) + } + node, ok := nodeids[*fk] + if !ok { + return fmt.Errorf(`unexpected referenced foreign-key "book_cover_book" returned %v for node %v`, *fk, n.ID) + } + assign(node, n) + } + return nil +} func (bq *BookQuery) sqlCount(ctx context.Context) (int, error) { _spec := bq.querySpec() @@ -1417,6 +1500,20 @@ func (bq *BookQuery) WithNamedFiles(name string, opts ...func(*BookFileQuery)) * return bq } +// WithNamedCovers tells the query-builder to eager-load the nodes that are connected to the "covers" +// edge with the given name. The optional arguments are used to configure the query builder of the edge. +func (bq *BookQuery) WithNamedCovers(name string, opts ...func(*BookCoverQuery)) *BookQuery { + query := (&BookCoverClient{config: bq.config}).Query() + for _, opt := range opts { + opt(query) + } + if bq.withNamedCovers == nil { + bq.withNamedCovers = make(map[string]*BookCoverQuery) + } + bq.withNamedCovers[name] = query + return bq +} + // BookGroupBy is the group-by builder for Book entities. type BookGroupBy struct { selector diff --git a/internal/ent/book_update.go b/internal/ent/book_update.go index 3b5af2bf..04bcf5a8 100644 --- a/internal/ent/book_update.go +++ b/internal/ent/book_update.go @@ -8,6 +8,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -319,6 +320,21 @@ func (bu *BookUpdate) AddFiles(b ...*BookFile) *BookUpdate { return bu.AddFileIDs(ids...) } +// AddCoverIDs adds the "covers" edge to the BookCover entity by IDs. +func (bu *BookUpdate) AddCoverIDs(ids ...ksuid.ID) *BookUpdate { + bu.mutation.AddCoverIDs(ids...) + return bu +} + +// AddCovers adds the "covers" edges to the BookCover entity. +func (bu *BookUpdate) AddCovers(b ...*BookCover) *BookUpdate { + ids := make([]ksuid.ID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bu.AddCoverIDs(ids...) +} + // Mutation returns the BookMutation object of the builder. func (bu *BookUpdate) Mutation() *BookMutation { return bu.mutation @@ -492,6 +508,27 @@ func (bu *BookUpdate) RemoveFiles(b ...*BookFile) *BookUpdate { return bu.RemoveFileIDs(ids...) } +// ClearCovers clears all "covers" edges to the BookCover entity. +func (bu *BookUpdate) ClearCovers() *BookUpdate { + bu.mutation.ClearCovers() + return bu +} + +// RemoveCoverIDs removes the "covers" edge to BookCover entities by IDs. +func (bu *BookUpdate) RemoveCoverIDs(ids ...ksuid.ID) *BookUpdate { + bu.mutation.RemoveCoverIDs(ids...) + return bu +} + +// RemoveCovers removes "covers" edges to BookCover entities. +func (bu *BookUpdate) RemoveCovers(b ...*BookCover) *BookUpdate { + ids := make([]ksuid.ID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return bu.RemoveCoverIDs(ids...) +} + // Save executes the query and returns the number of nodes affected by the update operation. func (bu *BookUpdate) Save(ctx context.Context) (int, error) { if err := bu.defaults(); err != nil { @@ -969,6 +1006,51 @@ func (bu *BookUpdate) sqlSave(ctx context.Context) (n int, err error) { } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if bu.mutation.CoversCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.RemovedCoversIDs(); len(nodes) > 0 && !bu.mutation.CoversCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := bu.mutation.CoversIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } if n, err = sqlgraph.UpdateNodes(ctx, bu.driver, _spec); err != nil { if _, ok := err.(*sqlgraph.NotFoundError); ok { err = &NotFoundError{book.Label} @@ -1271,6 +1353,21 @@ func (buo *BookUpdateOne) AddFiles(b ...*BookFile) *BookUpdateOne { return buo.AddFileIDs(ids...) } +// AddCoverIDs adds the "covers" edge to the BookCover entity by IDs. +func (buo *BookUpdateOne) AddCoverIDs(ids ...ksuid.ID) *BookUpdateOne { + buo.mutation.AddCoverIDs(ids...) + return buo +} + +// AddCovers adds the "covers" edges to the BookCover entity. +func (buo *BookUpdateOne) AddCovers(b ...*BookCover) *BookUpdateOne { + ids := make([]ksuid.ID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return buo.AddCoverIDs(ids...) +} + // Mutation returns the BookMutation object of the builder. func (buo *BookUpdateOne) Mutation() *BookMutation { return buo.mutation @@ -1444,6 +1541,27 @@ func (buo *BookUpdateOne) RemoveFiles(b ...*BookFile) *BookUpdateOne { return buo.RemoveFileIDs(ids...) } +// ClearCovers clears all "covers" edges to the BookCover entity. +func (buo *BookUpdateOne) ClearCovers() *BookUpdateOne { + buo.mutation.ClearCovers() + return buo +} + +// RemoveCoverIDs removes the "covers" edge to BookCover entities by IDs. +func (buo *BookUpdateOne) RemoveCoverIDs(ids ...ksuid.ID) *BookUpdateOne { + buo.mutation.RemoveCoverIDs(ids...) + return buo +} + +// RemoveCovers removes "covers" edges to BookCover entities. +func (buo *BookUpdateOne) RemoveCovers(b ...*BookCover) *BookUpdateOne { + ids := make([]ksuid.ID, len(b)) + for i := range b { + ids[i] = b[i].ID + } + return buo.RemoveCoverIDs(ids...) +} + // Where appends a list predicates to the BookUpdate builder. func (buo *BookUpdateOne) Where(ps ...predicate.Book) *BookUpdateOne { buo.mutation.Where(ps...) @@ -1951,6 +2069,51 @@ func (buo *BookUpdateOne) sqlSave(ctx context.Context) (_node *Book, err error) } _spec.Edges.Add = append(_spec.Edges.Add, edge) } + if buo.mutation.CoversCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.RemovedCoversIDs(); len(nodes) > 0 && !buo.mutation.CoversCleared() { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Clear = append(_spec.Edges.Clear, edge) + } + if nodes := buo.mutation.CoversIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _spec.Edges.Add = append(_spec.Edges.Add, edge) + } _node = &Book{config: buo.config} _spec.Assign = _node.assignValues _spec.ScanValues = _node.scanValues diff --git a/internal/ent/bookcover.go b/internal/ent/bookcover.go new file mode 100644 index 00000000..74b08901 --- /dev/null +++ b/internal/ent/bookcover.go @@ -0,0 +1,227 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "fmt" + "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/schema/ksuid" + "strings" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" +) + +// BookCover is the model entity for the BookCover schema. +type BookCover struct { + config `json:"-"` + // ID of the ent. + ID ksuid.ID `json:"id,omitempty"` + // CreateTime holds the value of the "create_time" field. + CreateTime time.Time `json:"create_time,omitempty"` + // UpdateTime holds the value of the "update_time" field. + UpdateTime time.Time `json:"update_time,omitempty"` + // Path holds the value of the "path" field. + Path string `json:"path,omitempty"` + // Size in bytes + Size int64 `json:"size,omitempty"` + // Width in pixels + Width int `json:"width,omitempty"` + // Height in pixels + Height int `json:"height,omitempty"` + // URL to the image + URL string `json:"url,omitempty"` + // MIME type + ContentType string `json:"contentType,omitempty"` + // Edges holds the relations/edges for other nodes in the graph. + // The values are being populated by the BookCoverQuery when eager-loading is set. + Edges BookCoverEdges `json:"edges"` + book_cover_book *ksuid.ID + selectValues sql.SelectValues +} + +// BookCoverEdges holds the relations/edges for other nodes in the graph. +type BookCoverEdges struct { + // Book holds the value of the book edge. + Book *Book `json:"book,omitempty"` + // loadedTypes holds the information for reporting if a + // type was loaded (or requested) in eager-loading or not. + loadedTypes [1]bool + // totalCount holds the count of the edges above. + totalCount [1]map[string]int +} + +// BookOrErr returns the Book value or an error if the edge +// was not loaded in eager-loading, or loaded but was not found. +func (e BookCoverEdges) BookOrErr() (*Book, error) { + if e.loadedTypes[0] { + if e.Book == nil { + // Edge was loaded but was not found. + return nil, &NotFoundError{label: book.Label} + } + return e.Book, nil + } + return nil, &NotLoadedError{edge: "book"} +} + +// scanValues returns the types for scanning values from sql.Rows. +func (*BookCover) scanValues(columns []string) ([]any, error) { + values := make([]any, len(columns)) + for i := range columns { + switch columns[i] { + case bookcover.FieldSize, bookcover.FieldWidth, bookcover.FieldHeight: + values[i] = new(sql.NullInt64) + case bookcover.FieldID, bookcover.FieldPath, bookcover.FieldURL, bookcover.FieldContentType: + values[i] = new(sql.NullString) + case bookcover.FieldCreateTime, bookcover.FieldUpdateTime: + values[i] = new(sql.NullTime) + case bookcover.ForeignKeys[0]: // book_cover_book + values[i] = new(sql.NullString) + default: + values[i] = new(sql.UnknownType) + } + } + return values, nil +} + +// assignValues assigns the values that were returned from sql.Rows (after scanning) +// to the BookCover fields. +func (bc *BookCover) assignValues(columns []string, values []any) error { + if m, n := len(values), len(columns); m < n { + return fmt.Errorf("mismatch number of scan values: %d != %d", m, n) + } + for i := range columns { + switch columns[i] { + case bookcover.FieldID: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field id", values[i]) + } else if value.Valid { + bc.ID = ksuid.ID(value.String) + } + case bookcover.FieldCreateTime: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field create_time", values[i]) + } else if value.Valid { + bc.CreateTime = value.Time + } + case bookcover.FieldUpdateTime: + if value, ok := values[i].(*sql.NullTime); !ok { + return fmt.Errorf("unexpected type %T for field update_time", values[i]) + } else if value.Valid { + bc.UpdateTime = value.Time + } + case bookcover.FieldPath: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field path", values[i]) + } else if value.Valid { + bc.Path = value.String + } + case bookcover.FieldSize: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field size", values[i]) + } else if value.Valid { + bc.Size = value.Int64 + } + case bookcover.FieldWidth: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field width", values[i]) + } else if value.Valid { + bc.Width = int(value.Int64) + } + case bookcover.FieldHeight: + if value, ok := values[i].(*sql.NullInt64); !ok { + return fmt.Errorf("unexpected type %T for field height", values[i]) + } else if value.Valid { + bc.Height = int(value.Int64) + } + case bookcover.FieldURL: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field url", values[i]) + } else if value.Valid { + bc.URL = value.String + } + case bookcover.FieldContentType: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field contentType", values[i]) + } else if value.Valid { + bc.ContentType = value.String + } + case bookcover.ForeignKeys[0]: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field book_cover_book", values[i]) + } else if value.Valid { + bc.book_cover_book = new(ksuid.ID) + *bc.book_cover_book = ksuid.ID(value.String) + } + default: + bc.selectValues.Set(columns[i], values[i]) + } + } + return nil +} + +// Value returns the ent.Value that was dynamically selected and assigned to the BookCover. +// This includes values selected through modifiers, order, etc. +func (bc *BookCover) Value(name string) (ent.Value, error) { + return bc.selectValues.Get(name) +} + +// QueryBook queries the "book" edge of the BookCover entity. +func (bc *BookCover) QueryBook() *BookQuery { + return NewBookCoverClient(bc.config).QueryBook(bc) +} + +// Update returns a builder for updating this BookCover. +// Note that you need to call BookCover.Unwrap() before calling this method if this BookCover +// was returned from a transaction, and the transaction was committed or rolled back. +func (bc *BookCover) Update() *BookCoverUpdateOne { + return NewBookCoverClient(bc.config).UpdateOne(bc) +} + +// Unwrap unwraps the BookCover entity that was returned from a transaction after it was closed, +// so that all future queries will be executed through the driver which created the transaction. +func (bc *BookCover) Unwrap() *BookCover { + _tx, ok := bc.config.driver.(*txDriver) + if !ok { + panic("ent: BookCover is not a transactional entity") + } + bc.config.driver = _tx.drv + return bc +} + +// String implements the fmt.Stringer. +func (bc *BookCover) String() string { + var builder strings.Builder + builder.WriteString("BookCover(") + builder.WriteString(fmt.Sprintf("id=%v, ", bc.ID)) + builder.WriteString("create_time=") + builder.WriteString(bc.CreateTime.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("update_time=") + builder.WriteString(bc.UpdateTime.Format(time.ANSIC)) + builder.WriteString(", ") + builder.WriteString("path=") + builder.WriteString(bc.Path) + builder.WriteString(", ") + builder.WriteString("size=") + builder.WriteString(fmt.Sprintf("%v", bc.Size)) + builder.WriteString(", ") + builder.WriteString("width=") + builder.WriteString(fmt.Sprintf("%v", bc.Width)) + builder.WriteString(", ") + builder.WriteString("height=") + builder.WriteString(fmt.Sprintf("%v", bc.Height)) + builder.WriteString(", ") + builder.WriteString("url=") + builder.WriteString(bc.URL) + builder.WriteString(", ") + builder.WriteString("contentType=") + builder.WriteString(bc.ContentType) + builder.WriteByte(')') + return builder.String() +} + +// BookCovers is a parsable slice of BookCover. +type BookCovers []*BookCover diff --git a/internal/ent/bookcover/bookcover.go b/internal/ent/bookcover/bookcover.go new file mode 100644 index 00000000..792fbbaf --- /dev/null +++ b/internal/ent/bookcover/bookcover.go @@ -0,0 +1,172 @@ +// Code generated by ent, DO NOT EDIT. + +package bookcover + +import ( + "lybbrio/internal/ent/schema/ksuid" + "time" + + "entgo.io/ent" + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" +) + +const ( + // Label holds the string label denoting the bookcover type in the database. + Label = "book_cover" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldCreateTime holds the string denoting the create_time field in the database. + FieldCreateTime = "create_time" + // FieldUpdateTime holds the string denoting the update_time field in the database. + FieldUpdateTime = "update_time" + // FieldPath holds the string denoting the path field in the database. + FieldPath = "path" + // FieldSize holds the string denoting the size field in the database. + FieldSize = "size" + // FieldWidth holds the string denoting the width field in the database. + FieldWidth = "width" + // FieldHeight holds the string denoting the height field in the database. + FieldHeight = "height" + // FieldURL holds the string denoting the url field in the database. + FieldURL = "url" + // FieldContentType holds the string denoting the contenttype field in the database. + FieldContentType = "content_type" + // EdgeBook holds the string denoting the book edge name in mutations. + EdgeBook = "book" + // Table holds the table name of the bookcover in the database. + Table = "book_covers" + // BookTable is the table that holds the book relation/edge. + BookTable = "book_covers" + // BookInverseTable is the table name for the Book entity. + // It exists in this package in order to avoid circular dependency with the "book" package. + BookInverseTable = "books" + // BookColumn is the table column denoting the book relation/edge. + BookColumn = "book_cover_book" +) + +// Columns holds all SQL columns for bookcover fields. +var Columns = []string{ + FieldID, + FieldCreateTime, + FieldUpdateTime, + FieldPath, + FieldSize, + FieldWidth, + FieldHeight, + FieldURL, + FieldContentType, +} + +// ForeignKeys holds the SQL foreign-keys that are owned by the "book_covers" +// table and are not defined as standalone fields in the schema. +var ForeignKeys = []string{ + "book_cover_book", +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + for i := range ForeignKeys { + if column == ForeignKeys[i] { + return true + } + } + return false +} + +// Note that the variables below are initialized by the runtime +// package on the initialization of the application. Therefore, +// it should be imported in the main as follows: +// +// import _ "lybbrio/internal/ent/runtime" +var ( + Hooks [2]ent.Hook + Policy ent.Policy + // DefaultCreateTime holds the default value on creation for the "create_time" field. + DefaultCreateTime func() time.Time + // DefaultUpdateTime holds the default value on creation for the "update_time" field. + DefaultUpdateTime func() time.Time + // UpdateDefaultUpdateTime holds the default value on update for the "update_time" field. + UpdateDefaultUpdateTime func() time.Time + // PathValidator is a validator for the "path" field. It is called by the builders before save. + PathValidator func(string) error + // SizeValidator is a validator for the "size" field. It is called by the builders before save. + SizeValidator func(int64) error + // WidthValidator is a validator for the "width" field. It is called by the builders before save. + WidthValidator func(int) error + // HeightValidator is a validator for the "height" field. It is called by the builders before save. + HeightValidator func(int) error + // URLValidator is a validator for the "url" field. It is called by the builders before save. + URLValidator func(string) error + // ContentTypeValidator is a validator for the "contentType" field. It is called by the builders before save. + ContentTypeValidator func(string) error + // DefaultID holds the default value on creation for the "id" field. + DefaultID func() ksuid.ID +) + +// OrderOption defines the ordering options for the BookCover queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByCreateTime orders the results by the create_time field. +func ByCreateTime(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreateTime, opts...).ToFunc() +} + +// ByUpdateTime orders the results by the update_time field. +func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUpdateTime, opts...).ToFunc() +} + +// ByPath orders the results by the path field. +func ByPath(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldPath, opts...).ToFunc() +} + +// BySize orders the results by the size field. +func BySize(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldSize, opts...).ToFunc() +} + +// ByWidth orders the results by the width field. +func ByWidth(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldWidth, opts...).ToFunc() +} + +// ByHeight orders the results by the height field. +func ByHeight(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHeight, opts...).ToFunc() +} + +// ByURL orders the results by the url field. +func ByURL(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldURL, opts...).ToFunc() +} + +// ByContentType orders the results by the contentType field. +func ByContentType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldContentType, opts...).ToFunc() +} + +// ByBookField orders the results by book field. +func ByBookField(field string, opts ...sql.OrderTermOption) OrderOption { + return func(s *sql.Selector) { + sqlgraph.OrderByNeighborTerms(s, newBookStep(), sql.OrderByField(field, opts...)) + } +} +func newBookStep() *sqlgraph.Step { + return sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.To(BookInverseTable, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, BookTable, BookColumn), + ) +} diff --git a/internal/ent/bookcover/where.go b/internal/ent/bookcover/where.go new file mode 100644 index 00000000..585be3d7 --- /dev/null +++ b/internal/ent/bookcover/where.go @@ -0,0 +1,530 @@ +// Code generated by ent, DO NOT EDIT. + +package bookcover + +import ( + "lybbrio/internal/ent/predicate" + "lybbrio/internal/ent/schema/ksuid" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" +) + +// ID filters vertices based on their ID field. +func ID(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id ksuid.ID) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldID, id)) +} + +// CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ. +func CreateTime(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldCreateTime, v)) +} + +// UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ. +func UpdateTime(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldUpdateTime, v)) +} + +// Path applies equality check predicate on the "path" field. It's identical to PathEQ. +func Path(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldPath, v)) +} + +// Size applies equality check predicate on the "size" field. It's identical to SizeEQ. +func Size(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldSize, v)) +} + +// Width applies equality check predicate on the "width" field. It's identical to WidthEQ. +func Width(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldWidth, v)) +} + +// Height applies equality check predicate on the "height" field. It's identical to HeightEQ. +func Height(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldHeight, v)) +} + +// URL applies equality check predicate on the "url" field. It's identical to URLEQ. +func URL(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldURL, v)) +} + +// ContentType applies equality check predicate on the "contentType" field. It's identical to ContentTypeEQ. +func ContentType(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldContentType, v)) +} + +// CreateTimeEQ applies the EQ predicate on the "create_time" field. +func CreateTimeEQ(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldCreateTime, v)) +} + +// CreateTimeNEQ applies the NEQ predicate on the "create_time" field. +func CreateTimeNEQ(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldCreateTime, v)) +} + +// CreateTimeIn applies the In predicate on the "create_time" field. +func CreateTimeIn(vs ...time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldCreateTime, vs...)) +} + +// CreateTimeNotIn applies the NotIn predicate on the "create_time" field. +func CreateTimeNotIn(vs ...time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldCreateTime, vs...)) +} + +// CreateTimeGT applies the GT predicate on the "create_time" field. +func CreateTimeGT(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldCreateTime, v)) +} + +// CreateTimeGTE applies the GTE predicate on the "create_time" field. +func CreateTimeGTE(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldCreateTime, v)) +} + +// CreateTimeLT applies the LT predicate on the "create_time" field. +func CreateTimeLT(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldCreateTime, v)) +} + +// CreateTimeLTE applies the LTE predicate on the "create_time" field. +func CreateTimeLTE(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldCreateTime, v)) +} + +// UpdateTimeEQ applies the EQ predicate on the "update_time" field. +func UpdateTimeEQ(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldUpdateTime, v)) +} + +// UpdateTimeNEQ applies the NEQ predicate on the "update_time" field. +func UpdateTimeNEQ(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldUpdateTime, v)) +} + +// UpdateTimeIn applies the In predicate on the "update_time" field. +func UpdateTimeIn(vs ...time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldUpdateTime, vs...)) +} + +// UpdateTimeNotIn applies the NotIn predicate on the "update_time" field. +func UpdateTimeNotIn(vs ...time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldUpdateTime, vs...)) +} + +// UpdateTimeGT applies the GT predicate on the "update_time" field. +func UpdateTimeGT(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldUpdateTime, v)) +} + +// UpdateTimeGTE applies the GTE predicate on the "update_time" field. +func UpdateTimeGTE(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldUpdateTime, v)) +} + +// UpdateTimeLT applies the LT predicate on the "update_time" field. +func UpdateTimeLT(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldUpdateTime, v)) +} + +// UpdateTimeLTE applies the LTE predicate on the "update_time" field. +func UpdateTimeLTE(v time.Time) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldUpdateTime, v)) +} + +// PathEQ applies the EQ predicate on the "path" field. +func PathEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldPath, v)) +} + +// PathNEQ applies the NEQ predicate on the "path" field. +func PathNEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldPath, v)) +} + +// PathIn applies the In predicate on the "path" field. +func PathIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldPath, vs...)) +} + +// PathNotIn applies the NotIn predicate on the "path" field. +func PathNotIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldPath, vs...)) +} + +// PathGT applies the GT predicate on the "path" field. +func PathGT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldPath, v)) +} + +// PathGTE applies the GTE predicate on the "path" field. +func PathGTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldPath, v)) +} + +// PathLT applies the LT predicate on the "path" field. +func PathLT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldPath, v)) +} + +// PathLTE applies the LTE predicate on the "path" field. +func PathLTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldPath, v)) +} + +// PathContains applies the Contains predicate on the "path" field. +func PathContains(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContains(FieldPath, v)) +} + +// PathHasPrefix applies the HasPrefix predicate on the "path" field. +func PathHasPrefix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasPrefix(FieldPath, v)) +} + +// PathHasSuffix applies the HasSuffix predicate on the "path" field. +func PathHasSuffix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasSuffix(FieldPath, v)) +} + +// PathEqualFold applies the EqualFold predicate on the "path" field. +func PathEqualFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEqualFold(FieldPath, v)) +} + +// PathContainsFold applies the ContainsFold predicate on the "path" field. +func PathContainsFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContainsFold(FieldPath, v)) +} + +// SizeEQ applies the EQ predicate on the "size" field. +func SizeEQ(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldSize, v)) +} + +// SizeNEQ applies the NEQ predicate on the "size" field. +func SizeNEQ(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldSize, v)) +} + +// SizeIn applies the In predicate on the "size" field. +func SizeIn(vs ...int64) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldSize, vs...)) +} + +// SizeNotIn applies the NotIn predicate on the "size" field. +func SizeNotIn(vs ...int64) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldSize, vs...)) +} + +// SizeGT applies the GT predicate on the "size" field. +func SizeGT(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldSize, v)) +} + +// SizeGTE applies the GTE predicate on the "size" field. +func SizeGTE(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldSize, v)) +} + +// SizeLT applies the LT predicate on the "size" field. +func SizeLT(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldSize, v)) +} + +// SizeLTE applies the LTE predicate on the "size" field. +func SizeLTE(v int64) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldSize, v)) +} + +// WidthEQ applies the EQ predicate on the "width" field. +func WidthEQ(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldWidth, v)) +} + +// WidthNEQ applies the NEQ predicate on the "width" field. +func WidthNEQ(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldWidth, v)) +} + +// WidthIn applies the In predicate on the "width" field. +func WidthIn(vs ...int) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldWidth, vs...)) +} + +// WidthNotIn applies the NotIn predicate on the "width" field. +func WidthNotIn(vs ...int) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldWidth, vs...)) +} + +// WidthGT applies the GT predicate on the "width" field. +func WidthGT(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldWidth, v)) +} + +// WidthGTE applies the GTE predicate on the "width" field. +func WidthGTE(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldWidth, v)) +} + +// WidthLT applies the LT predicate on the "width" field. +func WidthLT(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldWidth, v)) +} + +// WidthLTE applies the LTE predicate on the "width" field. +func WidthLTE(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldWidth, v)) +} + +// HeightEQ applies the EQ predicate on the "height" field. +func HeightEQ(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldHeight, v)) +} + +// HeightNEQ applies the NEQ predicate on the "height" field. +func HeightNEQ(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldHeight, v)) +} + +// HeightIn applies the In predicate on the "height" field. +func HeightIn(vs ...int) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldHeight, vs...)) +} + +// HeightNotIn applies the NotIn predicate on the "height" field. +func HeightNotIn(vs ...int) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldHeight, vs...)) +} + +// HeightGT applies the GT predicate on the "height" field. +func HeightGT(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldHeight, v)) +} + +// HeightGTE applies the GTE predicate on the "height" field. +func HeightGTE(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldHeight, v)) +} + +// HeightLT applies the LT predicate on the "height" field. +func HeightLT(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldHeight, v)) +} + +// HeightLTE applies the LTE predicate on the "height" field. +func HeightLTE(v int) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldHeight, v)) +} + +// URLEQ applies the EQ predicate on the "url" field. +func URLEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldURL, v)) +} + +// URLNEQ applies the NEQ predicate on the "url" field. +func URLNEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldURL, v)) +} + +// URLIn applies the In predicate on the "url" field. +func URLIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldURL, vs...)) +} + +// URLNotIn applies the NotIn predicate on the "url" field. +func URLNotIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldURL, vs...)) +} + +// URLGT applies the GT predicate on the "url" field. +func URLGT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldURL, v)) +} + +// URLGTE applies the GTE predicate on the "url" field. +func URLGTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldURL, v)) +} + +// URLLT applies the LT predicate on the "url" field. +func URLLT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldURL, v)) +} + +// URLLTE applies the LTE predicate on the "url" field. +func URLLTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldURL, v)) +} + +// URLContains applies the Contains predicate on the "url" field. +func URLContains(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContains(FieldURL, v)) +} + +// URLHasPrefix applies the HasPrefix predicate on the "url" field. +func URLHasPrefix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasPrefix(FieldURL, v)) +} + +// URLHasSuffix applies the HasSuffix predicate on the "url" field. +func URLHasSuffix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasSuffix(FieldURL, v)) +} + +// URLEqualFold applies the EqualFold predicate on the "url" field. +func URLEqualFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEqualFold(FieldURL, v)) +} + +// URLContainsFold applies the ContainsFold predicate on the "url" field. +func URLContainsFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContainsFold(FieldURL, v)) +} + +// ContentTypeEQ applies the EQ predicate on the "contentType" field. +func ContentTypeEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEQ(FieldContentType, v)) +} + +// ContentTypeNEQ applies the NEQ predicate on the "contentType" field. +func ContentTypeNEQ(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldNEQ(FieldContentType, v)) +} + +// ContentTypeIn applies the In predicate on the "contentType" field. +func ContentTypeIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldIn(FieldContentType, vs...)) +} + +// ContentTypeNotIn applies the NotIn predicate on the "contentType" field. +func ContentTypeNotIn(vs ...string) predicate.BookCover { + return predicate.BookCover(sql.FieldNotIn(FieldContentType, vs...)) +} + +// ContentTypeGT applies the GT predicate on the "contentType" field. +func ContentTypeGT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGT(FieldContentType, v)) +} + +// ContentTypeGTE applies the GTE predicate on the "contentType" field. +func ContentTypeGTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldGTE(FieldContentType, v)) +} + +// ContentTypeLT applies the LT predicate on the "contentType" field. +func ContentTypeLT(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLT(FieldContentType, v)) +} + +// ContentTypeLTE applies the LTE predicate on the "contentType" field. +func ContentTypeLTE(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldLTE(FieldContentType, v)) +} + +// ContentTypeContains applies the Contains predicate on the "contentType" field. +func ContentTypeContains(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContains(FieldContentType, v)) +} + +// ContentTypeHasPrefix applies the HasPrefix predicate on the "contentType" field. +func ContentTypeHasPrefix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasPrefix(FieldContentType, v)) +} + +// ContentTypeHasSuffix applies the HasSuffix predicate on the "contentType" field. +func ContentTypeHasSuffix(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldHasSuffix(FieldContentType, v)) +} + +// ContentTypeEqualFold applies the EqualFold predicate on the "contentType" field. +func ContentTypeEqualFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldEqualFold(FieldContentType, v)) +} + +// ContentTypeContainsFold applies the ContainsFold predicate on the "contentType" field. +func ContentTypeContainsFold(v string) predicate.BookCover { + return predicate.BookCover(sql.FieldContainsFold(FieldContentType, v)) +} + +// HasBook applies the HasEdge predicate on the "book" edge. +func HasBook() predicate.BookCover { + return predicate.BookCover(func(s *sql.Selector) { + step := sqlgraph.NewStep( + sqlgraph.From(Table, FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, BookTable, BookColumn), + ) + sqlgraph.HasNeighbors(s, step) + }) +} + +// HasBookWith applies the HasEdge predicate on the "book" edge with a given conditions (other predicates). +func HasBookWith(preds ...predicate.Book) predicate.BookCover { + return predicate.BookCover(func(s *sql.Selector) { + step := newBookStep() + sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }) + }) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.BookCover) predicate.BookCover { + return predicate.BookCover(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.BookCover) predicate.BookCover { + return predicate.BookCover(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.BookCover) predicate.BookCover { + return predicate.BookCover(sql.NotPredicates(p)) +} diff --git a/internal/ent/bookcover_create.go b/internal/ent/bookcover_create.go new file mode 100644 index 00000000..7108e3f0 --- /dev/null +++ b/internal/ent/bookcover_create.go @@ -0,0 +1,740 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/schema/ksuid" + "time" + + "entgo.io/ent/dialect" + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" +) + +// BookCoverCreate is the builder for creating a BookCover entity. +type BookCoverCreate struct { + config + mutation *BookCoverMutation + hooks []Hook + conflict []sql.ConflictOption +} + +// SetCreateTime sets the "create_time" field. +func (bcc *BookCoverCreate) SetCreateTime(t time.Time) *BookCoverCreate { + bcc.mutation.SetCreateTime(t) + return bcc +} + +// SetNillableCreateTime sets the "create_time" field if the given value is not nil. +func (bcc *BookCoverCreate) SetNillableCreateTime(t *time.Time) *BookCoverCreate { + if t != nil { + bcc.SetCreateTime(*t) + } + return bcc +} + +// SetUpdateTime sets the "update_time" field. +func (bcc *BookCoverCreate) SetUpdateTime(t time.Time) *BookCoverCreate { + bcc.mutation.SetUpdateTime(t) + return bcc +} + +// SetNillableUpdateTime sets the "update_time" field if the given value is not nil. +func (bcc *BookCoverCreate) SetNillableUpdateTime(t *time.Time) *BookCoverCreate { + if t != nil { + bcc.SetUpdateTime(*t) + } + return bcc +} + +// SetPath sets the "path" field. +func (bcc *BookCoverCreate) SetPath(s string) *BookCoverCreate { + bcc.mutation.SetPath(s) + return bcc +} + +// SetSize sets the "size" field. +func (bcc *BookCoverCreate) SetSize(i int64) *BookCoverCreate { + bcc.mutation.SetSize(i) + return bcc +} + +// SetWidth sets the "width" field. +func (bcc *BookCoverCreate) SetWidth(i int) *BookCoverCreate { + bcc.mutation.SetWidth(i) + return bcc +} + +// SetHeight sets the "height" field. +func (bcc *BookCoverCreate) SetHeight(i int) *BookCoverCreate { + bcc.mutation.SetHeight(i) + return bcc +} + +// SetURL sets the "url" field. +func (bcc *BookCoverCreate) SetURL(s string) *BookCoverCreate { + bcc.mutation.SetURL(s) + return bcc +} + +// SetContentType sets the "contentType" field. +func (bcc *BookCoverCreate) SetContentType(s string) *BookCoverCreate { + bcc.mutation.SetContentType(s) + return bcc +} + +// SetID sets the "id" field. +func (bcc *BookCoverCreate) SetID(k ksuid.ID) *BookCoverCreate { + bcc.mutation.SetID(k) + return bcc +} + +// SetNillableID sets the "id" field if the given value is not nil. +func (bcc *BookCoverCreate) SetNillableID(k *ksuid.ID) *BookCoverCreate { + if k != nil { + bcc.SetID(*k) + } + return bcc +} + +// SetBookID sets the "book" edge to the Book entity by ID. +func (bcc *BookCoverCreate) SetBookID(id ksuid.ID) *BookCoverCreate { + bcc.mutation.SetBookID(id) + return bcc +} + +// SetBook sets the "book" edge to the Book entity. +func (bcc *BookCoverCreate) SetBook(b *Book) *BookCoverCreate { + return bcc.SetBookID(b.ID) +} + +// Mutation returns the BookCoverMutation object of the builder. +func (bcc *BookCoverCreate) Mutation() *BookCoverMutation { + return bcc.mutation +} + +// Save creates the BookCover in the database. +func (bcc *BookCoverCreate) Save(ctx context.Context) (*BookCover, error) { + if err := bcc.defaults(); err != nil { + return nil, err + } + return withHooks(ctx, bcc.sqlSave, bcc.mutation, bcc.hooks) +} + +// SaveX calls Save and panics if Save returns an error. +func (bcc *BookCoverCreate) SaveX(ctx context.Context) *BookCover { + v, err := bcc.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (bcc *BookCoverCreate) Exec(ctx context.Context) error { + _, err := bcc.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcc *BookCoverCreate) ExecX(ctx context.Context) { + if err := bcc.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (bcc *BookCoverCreate) defaults() error { + if _, ok := bcc.mutation.CreateTime(); !ok { + if bookcover.DefaultCreateTime == nil { + return fmt.Errorf("ent: uninitialized bookcover.DefaultCreateTime (forgotten import ent/runtime?)") + } + v := bookcover.DefaultCreateTime() + bcc.mutation.SetCreateTime(v) + } + if _, ok := bcc.mutation.UpdateTime(); !ok { + if bookcover.DefaultUpdateTime == nil { + return fmt.Errorf("ent: uninitialized bookcover.DefaultUpdateTime (forgotten import ent/runtime?)") + } + v := bookcover.DefaultUpdateTime() + bcc.mutation.SetUpdateTime(v) + } + if _, ok := bcc.mutation.ID(); !ok { + if bookcover.DefaultID == nil { + return fmt.Errorf("ent: uninitialized bookcover.DefaultID (forgotten import ent/runtime?)") + } + v := bookcover.DefaultID() + bcc.mutation.SetID(v) + } + return nil +} + +// check runs all checks and user-defined validators on the builder. +func (bcc *BookCoverCreate) check() error { + if _, ok := bcc.mutation.CreateTime(); !ok { + return &ValidationError{Name: "create_time", err: errors.New(`ent: missing required field "BookCover.create_time"`)} + } + if _, ok := bcc.mutation.UpdateTime(); !ok { + return &ValidationError{Name: "update_time", err: errors.New(`ent: missing required field "BookCover.update_time"`)} + } + if _, ok := bcc.mutation.Path(); !ok { + return &ValidationError{Name: "path", err: errors.New(`ent: missing required field "BookCover.path"`)} + } + if v, ok := bcc.mutation.Path(); ok { + if err := bookcover.PathValidator(v); err != nil { + return &ValidationError{Name: "path", err: fmt.Errorf(`ent: validator failed for field "BookCover.path": %w`, err)} + } + } + if _, ok := bcc.mutation.Size(); !ok { + return &ValidationError{Name: "size", err: errors.New(`ent: missing required field "BookCover.size"`)} + } + if v, ok := bcc.mutation.Size(); ok { + if err := bookcover.SizeValidator(v); err != nil { + return &ValidationError{Name: "size", err: fmt.Errorf(`ent: validator failed for field "BookCover.size": %w`, err)} + } + } + if _, ok := bcc.mutation.Width(); !ok { + return &ValidationError{Name: "width", err: errors.New(`ent: missing required field "BookCover.width"`)} + } + if v, ok := bcc.mutation.Width(); ok { + if err := bookcover.WidthValidator(v); err != nil { + return &ValidationError{Name: "width", err: fmt.Errorf(`ent: validator failed for field "BookCover.width": %w`, err)} + } + } + if _, ok := bcc.mutation.Height(); !ok { + return &ValidationError{Name: "height", err: errors.New(`ent: missing required field "BookCover.height"`)} + } + if v, ok := bcc.mutation.Height(); ok { + if err := bookcover.HeightValidator(v); err != nil { + return &ValidationError{Name: "height", err: fmt.Errorf(`ent: validator failed for field "BookCover.height": %w`, err)} + } + } + if _, ok := bcc.mutation.URL(); !ok { + return &ValidationError{Name: "url", err: errors.New(`ent: missing required field "BookCover.url"`)} + } + if v, ok := bcc.mutation.URL(); ok { + if err := bookcover.URLValidator(v); err != nil { + return &ValidationError{Name: "url", err: fmt.Errorf(`ent: validator failed for field "BookCover.url": %w`, err)} + } + } + if _, ok := bcc.mutation.ContentType(); !ok { + return &ValidationError{Name: "contentType", err: errors.New(`ent: missing required field "BookCover.contentType"`)} + } + if v, ok := bcc.mutation.ContentType(); ok { + if err := bookcover.ContentTypeValidator(v); err != nil { + return &ValidationError{Name: "contentType", err: fmt.Errorf(`ent: validator failed for field "BookCover.contentType": %w`, err)} + } + } + if _, ok := bcc.mutation.BookID(); !ok { + return &ValidationError{Name: "book", err: errors.New(`ent: missing required edge "BookCover.book"`)} + } + return nil +} + +func (bcc *BookCoverCreate) sqlSave(ctx context.Context) (*BookCover, error) { + if err := bcc.check(); err != nil { + return nil, err + } + _node, _spec := bcc.createSpec() + if err := sqlgraph.CreateNode(ctx, bcc.driver, _spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + if _spec.ID.Value != nil { + if id, ok := _spec.ID.Value.(ksuid.ID); ok { + _node.ID = id + } else { + return nil, fmt.Errorf("unexpected BookCover.ID type: %T", _spec.ID.Value) + } + } + bcc.mutation.id = &_node.ID + bcc.mutation.done = true + return _node, nil +} + +func (bcc *BookCoverCreate) createSpec() (*BookCover, *sqlgraph.CreateSpec) { + var ( + _node = &BookCover{config: bcc.config} + _spec = sqlgraph.NewCreateSpec(bookcover.Table, sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString)) + ) + _spec.OnConflict = bcc.conflict + if id, ok := bcc.mutation.ID(); ok { + _node.ID = id + _spec.ID.Value = id + } + if value, ok := bcc.mutation.CreateTime(); ok { + _spec.SetField(bookcover.FieldCreateTime, field.TypeTime, value) + _node.CreateTime = value + } + if value, ok := bcc.mutation.UpdateTime(); ok { + _spec.SetField(bookcover.FieldUpdateTime, field.TypeTime, value) + _node.UpdateTime = value + } + if value, ok := bcc.mutation.Path(); ok { + _spec.SetField(bookcover.FieldPath, field.TypeString, value) + _node.Path = value + } + if value, ok := bcc.mutation.Size(); ok { + _spec.SetField(bookcover.FieldSize, field.TypeInt64, value) + _node.Size = value + } + if value, ok := bcc.mutation.Width(); ok { + _spec.SetField(bookcover.FieldWidth, field.TypeInt, value) + _node.Width = value + } + if value, ok := bcc.mutation.Height(); ok { + _spec.SetField(bookcover.FieldHeight, field.TypeInt, value) + _node.Height = value + } + if value, ok := bcc.mutation.URL(); ok { + _spec.SetField(bookcover.FieldURL, field.TypeString, value) + _node.URL = value + } + if value, ok := bcc.mutation.ContentType(); ok { + _spec.SetField(bookcover.FieldContentType, field.TypeString, value) + _node.ContentType = value + } + if nodes := bcc.mutation.BookIDs(); len(nodes) > 0 { + edge := &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bookcover.BookTable, + Columns: []string{bookcover.BookColumn}, + Bidi: false, + Target: &sqlgraph.EdgeTarget{ + IDSpec: sqlgraph.NewFieldSpec(book.FieldID, field.TypeString), + }, + } + for _, k := range nodes { + edge.Target.Nodes = append(edge.Target.Nodes, k) + } + _node.book_cover_book = &nodes[0] + _spec.Edges = append(_spec.Edges, edge) + } + return _node, _spec +} + +// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause +// of the `INSERT` statement. For example: +// +// client.BookCover.Create(). +// SetCreateTime(v). +// OnConflict( +// // Update the row with the new values +// // the was proposed for insertion. +// sql.ResolveWithNewValues(), +// ). +// // Override some of the fields with custom +// // update values. +// Update(func(u *ent.BookCoverUpsert) { +// SetCreateTime(v+v). +// }). +// Exec(ctx) +func (bcc *BookCoverCreate) OnConflict(opts ...sql.ConflictOption) *BookCoverUpsertOne { + bcc.conflict = opts + return &BookCoverUpsertOne{ + create: bcc, + } +} + +// OnConflictColumns calls `OnConflict` and configures the columns +// as conflict target. Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict(sql.ConflictColumns(columns...)). +// Exec(ctx) +func (bcc *BookCoverCreate) OnConflictColumns(columns ...string) *BookCoverUpsertOne { + bcc.conflict = append(bcc.conflict, sql.ConflictColumns(columns...)) + return &BookCoverUpsertOne{ + create: bcc, + } +} + +type ( + // BookCoverUpsertOne is the builder for "upsert"-ing + // one BookCover node. + BookCoverUpsertOne struct { + create *BookCoverCreate + } + + // BookCoverUpsert is the "OnConflict" setter. + BookCoverUpsert struct { + *sql.UpdateSet + } +) + +// SetUpdateTime sets the "update_time" field. +func (u *BookCoverUpsert) SetUpdateTime(v time.Time) *BookCoverUpsert { + u.Set(bookcover.FieldUpdateTime, v) + return u +} + +// UpdateUpdateTime sets the "update_time" field to the value that was provided on create. +func (u *BookCoverUpsert) UpdateUpdateTime() *BookCoverUpsert { + u.SetExcluded(bookcover.FieldUpdateTime) + return u +} + +// UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. +// Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict( +// sql.ResolveWithNewValues(), +// sql.ResolveWith(func(u *sql.UpdateSet) { +// u.SetIgnore(bookcover.FieldID) +// }), +// ). +// Exec(ctx) +func (u *BookCoverUpsertOne) UpdateNewValues() *BookCoverUpsertOne { + u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) + u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { + if _, exists := u.create.mutation.ID(); exists { + s.SetIgnore(bookcover.FieldID) + } + if _, exists := u.create.mutation.CreateTime(); exists { + s.SetIgnore(bookcover.FieldCreateTime) + } + if _, exists := u.create.mutation.Path(); exists { + s.SetIgnore(bookcover.FieldPath) + } + if _, exists := u.create.mutation.Size(); exists { + s.SetIgnore(bookcover.FieldSize) + } + if _, exists := u.create.mutation.Width(); exists { + s.SetIgnore(bookcover.FieldWidth) + } + if _, exists := u.create.mutation.Height(); exists { + s.SetIgnore(bookcover.FieldHeight) + } + if _, exists := u.create.mutation.URL(); exists { + s.SetIgnore(bookcover.FieldURL) + } + if _, exists := u.create.mutation.ContentType(); exists { + s.SetIgnore(bookcover.FieldContentType) + } + })) + return u +} + +// Ignore sets each column to itself in case of conflict. +// Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict(sql.ResolveWithIgnore()). +// Exec(ctx) +func (u *BookCoverUpsertOne) Ignore() *BookCoverUpsertOne { + u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore()) + return u +} + +// DoNothing configures the conflict_action to `DO NOTHING`. +// Supported only by SQLite and PostgreSQL. +func (u *BookCoverUpsertOne) DoNothing() *BookCoverUpsertOne { + u.create.conflict = append(u.create.conflict, sql.DoNothing()) + return u +} + +// Update allows overriding fields `UPDATE` values. See the BookCoverCreate.OnConflict +// documentation for more info. +func (u *BookCoverUpsertOne) Update(set func(*BookCoverUpsert)) *BookCoverUpsertOne { + u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) { + set(&BookCoverUpsert{UpdateSet: update}) + })) + return u +} + +// SetUpdateTime sets the "update_time" field. +func (u *BookCoverUpsertOne) SetUpdateTime(v time.Time) *BookCoverUpsertOne { + return u.Update(func(s *BookCoverUpsert) { + s.SetUpdateTime(v) + }) +} + +// UpdateUpdateTime sets the "update_time" field to the value that was provided on create. +func (u *BookCoverUpsertOne) UpdateUpdateTime() *BookCoverUpsertOne { + return u.Update(func(s *BookCoverUpsert) { + s.UpdateUpdateTime() + }) +} + +// Exec executes the query. +func (u *BookCoverUpsertOne) Exec(ctx context.Context) error { + if len(u.create.conflict) == 0 { + return errors.New("ent: missing options for BookCoverCreate.OnConflict") + } + return u.create.Exec(ctx) +} + +// ExecX is like Exec, but panics if an error occurs. +func (u *BookCoverUpsertOne) ExecX(ctx context.Context) { + if err := u.create.Exec(ctx); err != nil { + panic(err) + } +} + +// Exec executes the UPSERT query and returns the inserted/updated ID. +func (u *BookCoverUpsertOne) ID(ctx context.Context) (id ksuid.ID, err error) { + if u.create.driver.Dialect() == dialect.MySQL { + // In case of "ON CONFLICT", there is no way to get back non-numeric ID + // fields from the database since MySQL does not support the RETURNING clause. + return id, errors.New("ent: BookCoverUpsertOne.ID is not supported by MySQL driver. Use BookCoverUpsertOne.Exec instead") + } + node, err := u.create.Save(ctx) + if err != nil { + return id, err + } + return node.ID, nil +} + +// IDX is like ID, but panics if an error occurs. +func (u *BookCoverUpsertOne) IDX(ctx context.Context) ksuid.ID { + id, err := u.ID(ctx) + if err != nil { + panic(err) + } + return id +} + +// BookCoverCreateBulk is the builder for creating many BookCover entities in bulk. +type BookCoverCreateBulk struct { + config + err error + builders []*BookCoverCreate + conflict []sql.ConflictOption +} + +// Save creates the BookCover entities in the database. +func (bccb *BookCoverCreateBulk) Save(ctx context.Context) ([]*BookCover, error) { + if bccb.err != nil { + return nil, bccb.err + } + specs := make([]*sqlgraph.CreateSpec, len(bccb.builders)) + nodes := make([]*BookCover, len(bccb.builders)) + mutators := make([]Mutator, len(bccb.builders)) + for i := range bccb.builders { + func(i int, root context.Context) { + builder := bccb.builders[i] + builder.defaults() + var mut Mutator = MutateFunc(func(ctx context.Context, m Mutation) (Value, error) { + mutation, ok := m.(*BookCoverMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type %T", m) + } + if err := builder.check(); err != nil { + return nil, err + } + builder.mutation = mutation + var err error + nodes[i], specs[i] = builder.createSpec() + if i < len(mutators)-1 { + _, err = mutators[i+1].Mutate(root, bccb.builders[i+1].mutation) + } else { + spec := &sqlgraph.BatchCreateSpec{Nodes: specs} + spec.OnConflict = bccb.conflict + // Invoke the actual operation on the latest mutation in the chain. + if err = sqlgraph.BatchCreate(ctx, bccb.driver, spec); err != nil { + if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + } + } + if err != nil { + return nil, err + } + mutation.id = &nodes[i].ID + mutation.done = true + return nodes[i], nil + }) + for i := len(builder.hooks) - 1; i >= 0; i-- { + mut = builder.hooks[i](mut) + } + mutators[i] = mut + }(i, ctx) + } + if len(mutators) > 0 { + if _, err := mutators[0].Mutate(ctx, bccb.builders[0].mutation); err != nil { + return nil, err + } + } + return nodes, nil +} + +// SaveX is like Save, but panics if an error occurs. +func (bccb *BookCoverCreateBulk) SaveX(ctx context.Context) []*BookCover { + v, err := bccb.Save(ctx) + if err != nil { + panic(err) + } + return v +} + +// Exec executes the query. +func (bccb *BookCoverCreateBulk) Exec(ctx context.Context) error { + _, err := bccb.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bccb *BookCoverCreateBulk) ExecX(ctx context.Context) { + if err := bccb.Exec(ctx); err != nil { + panic(err) + } +} + +// OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause +// of the `INSERT` statement. For example: +// +// client.BookCover.CreateBulk(builders...). +// OnConflict( +// // Update the row with the new values +// // the was proposed for insertion. +// sql.ResolveWithNewValues(), +// ). +// // Override some of the fields with custom +// // update values. +// Update(func(u *ent.BookCoverUpsert) { +// SetCreateTime(v+v). +// }). +// Exec(ctx) +func (bccb *BookCoverCreateBulk) OnConflict(opts ...sql.ConflictOption) *BookCoverUpsertBulk { + bccb.conflict = opts + return &BookCoverUpsertBulk{ + create: bccb, + } +} + +// OnConflictColumns calls `OnConflict` and configures the columns +// as conflict target. Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict(sql.ConflictColumns(columns...)). +// Exec(ctx) +func (bccb *BookCoverCreateBulk) OnConflictColumns(columns ...string) *BookCoverUpsertBulk { + bccb.conflict = append(bccb.conflict, sql.ConflictColumns(columns...)) + return &BookCoverUpsertBulk{ + create: bccb, + } +} + +// BookCoverUpsertBulk is the builder for "upsert"-ing +// a bulk of BookCover nodes. +type BookCoverUpsertBulk struct { + create *BookCoverCreateBulk +} + +// UpdateNewValues updates the mutable fields using the new values that +// were set on create. Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict( +// sql.ResolveWithNewValues(), +// sql.ResolveWith(func(u *sql.UpdateSet) { +// u.SetIgnore(bookcover.FieldID) +// }), +// ). +// Exec(ctx) +func (u *BookCoverUpsertBulk) UpdateNewValues() *BookCoverUpsertBulk { + u.create.conflict = append(u.create.conflict, sql.ResolveWithNewValues()) + u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(s *sql.UpdateSet) { + for _, b := range u.create.builders { + if _, exists := b.mutation.ID(); exists { + s.SetIgnore(bookcover.FieldID) + } + if _, exists := b.mutation.CreateTime(); exists { + s.SetIgnore(bookcover.FieldCreateTime) + } + if _, exists := b.mutation.Path(); exists { + s.SetIgnore(bookcover.FieldPath) + } + if _, exists := b.mutation.Size(); exists { + s.SetIgnore(bookcover.FieldSize) + } + if _, exists := b.mutation.Width(); exists { + s.SetIgnore(bookcover.FieldWidth) + } + if _, exists := b.mutation.Height(); exists { + s.SetIgnore(bookcover.FieldHeight) + } + if _, exists := b.mutation.URL(); exists { + s.SetIgnore(bookcover.FieldURL) + } + if _, exists := b.mutation.ContentType(); exists { + s.SetIgnore(bookcover.FieldContentType) + } + } + })) + return u +} + +// Ignore sets each column to itself in case of conflict. +// Using this option is equivalent to using: +// +// client.BookCover.Create(). +// OnConflict(sql.ResolveWithIgnore()). +// Exec(ctx) +func (u *BookCoverUpsertBulk) Ignore() *BookCoverUpsertBulk { + u.create.conflict = append(u.create.conflict, sql.ResolveWithIgnore()) + return u +} + +// DoNothing configures the conflict_action to `DO NOTHING`. +// Supported only by SQLite and PostgreSQL. +func (u *BookCoverUpsertBulk) DoNothing() *BookCoverUpsertBulk { + u.create.conflict = append(u.create.conflict, sql.DoNothing()) + return u +} + +// Update allows overriding fields `UPDATE` values. See the BookCoverCreateBulk.OnConflict +// documentation for more info. +func (u *BookCoverUpsertBulk) Update(set func(*BookCoverUpsert)) *BookCoverUpsertBulk { + u.create.conflict = append(u.create.conflict, sql.ResolveWith(func(update *sql.UpdateSet) { + set(&BookCoverUpsert{UpdateSet: update}) + })) + return u +} + +// SetUpdateTime sets the "update_time" field. +func (u *BookCoverUpsertBulk) SetUpdateTime(v time.Time) *BookCoverUpsertBulk { + return u.Update(func(s *BookCoverUpsert) { + s.SetUpdateTime(v) + }) +} + +// UpdateUpdateTime sets the "update_time" field to the value that was provided on create. +func (u *BookCoverUpsertBulk) UpdateUpdateTime() *BookCoverUpsertBulk { + return u.Update(func(s *BookCoverUpsert) { + s.UpdateUpdateTime() + }) +} + +// Exec executes the query. +func (u *BookCoverUpsertBulk) Exec(ctx context.Context) error { + if u.create.err != nil { + return u.create.err + } + for i, b := range u.create.builders { + if len(b.conflict) != 0 { + return fmt.Errorf("ent: OnConflict was set for builder %d. Set it on the BookCoverCreateBulk instead", i) + } + } + if len(u.create.conflict) == 0 { + return errors.New("ent: missing options for BookCoverCreateBulk.OnConflict") + } + return u.create.Exec(ctx) +} + +// ExecX is like Exec, but panics if an error occurs. +func (u *BookCoverUpsertBulk) ExecX(ctx context.Context) { + if err := u.create.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/internal/ent/bookcover_delete.go b/internal/ent/bookcover_delete.go new file mode 100644 index 00000000..0522408f --- /dev/null +++ b/internal/ent/bookcover_delete.go @@ -0,0 +1,88 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/predicate" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" +) + +// BookCoverDelete is the builder for deleting a BookCover entity. +type BookCoverDelete struct { + config + hooks []Hook + mutation *BookCoverMutation +} + +// Where appends a list predicates to the BookCoverDelete builder. +func (bcd *BookCoverDelete) Where(ps ...predicate.BookCover) *BookCoverDelete { + bcd.mutation.Where(ps...) + return bcd +} + +// Exec executes the deletion query and returns how many vertices were deleted. +func (bcd *BookCoverDelete) Exec(ctx context.Context) (int, error) { + return withHooks(ctx, bcd.sqlExec, bcd.mutation, bcd.hooks) +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcd *BookCoverDelete) ExecX(ctx context.Context) int { + n, err := bcd.Exec(ctx) + if err != nil { + panic(err) + } + return n +} + +func (bcd *BookCoverDelete) sqlExec(ctx context.Context) (int, error) { + _spec := sqlgraph.NewDeleteSpec(bookcover.Table, sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString)) + if ps := bcd.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + affected, err := sqlgraph.DeleteNodes(ctx, bcd.driver, _spec) + if err != nil && sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + bcd.mutation.done = true + return affected, err +} + +// BookCoverDeleteOne is the builder for deleting a single BookCover entity. +type BookCoverDeleteOne struct { + bcd *BookCoverDelete +} + +// Where appends a list predicates to the BookCoverDelete builder. +func (bcdo *BookCoverDeleteOne) Where(ps ...predicate.BookCover) *BookCoverDeleteOne { + bcdo.bcd.mutation.Where(ps...) + return bcdo +} + +// Exec executes the deletion query. +func (bcdo *BookCoverDeleteOne) Exec(ctx context.Context) error { + n, err := bcdo.bcd.Exec(ctx) + switch { + case err != nil: + return err + case n == 0: + return &NotFoundError{bookcover.Label} + default: + return nil + } +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcdo *BookCoverDeleteOne) ExecX(ctx context.Context) { + if err := bcdo.Exec(ctx); err != nil { + panic(err) + } +} diff --git a/internal/ent/bookcover_query.go b/internal/ent/bookcover_query.go new file mode 100644 index 00000000..d0a7b3e4 --- /dev/null +++ b/internal/ent/bookcover_query.go @@ -0,0 +1,634 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/predicate" + "lybbrio/internal/ent/schema/ksuid" + "math" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" +) + +// BookCoverQuery is the builder for querying BookCover entities. +type BookCoverQuery struct { + config + ctx *QueryContext + order []bookcover.OrderOption + inters []Interceptor + predicates []predicate.BookCover + withBook *BookQuery + withFKs bool + modifiers []func(*sql.Selector) + loadTotal []func(context.Context, []*BookCover) error + // intermediate query (i.e. traversal path). + sql *sql.Selector + path func(context.Context) (*sql.Selector, error) +} + +// Where adds a new predicate for the BookCoverQuery builder. +func (bcq *BookCoverQuery) Where(ps ...predicate.BookCover) *BookCoverQuery { + bcq.predicates = append(bcq.predicates, ps...) + return bcq +} + +// Limit the number of records to be returned by this query. +func (bcq *BookCoverQuery) Limit(limit int) *BookCoverQuery { + bcq.ctx.Limit = &limit + return bcq +} + +// Offset to start from. +func (bcq *BookCoverQuery) Offset(offset int) *BookCoverQuery { + bcq.ctx.Offset = &offset + return bcq +} + +// Unique configures the query builder to filter duplicate records on query. +// By default, unique is set to true, and can be disabled using this method. +func (bcq *BookCoverQuery) Unique(unique bool) *BookCoverQuery { + bcq.ctx.Unique = &unique + return bcq +} + +// Order specifies how the records should be ordered. +func (bcq *BookCoverQuery) Order(o ...bookcover.OrderOption) *BookCoverQuery { + bcq.order = append(bcq.order, o...) + return bcq +} + +// QueryBook chains the current query on the "book" edge. +func (bcq *BookCoverQuery) QueryBook() *BookQuery { + query := (&BookClient{config: bcq.config}).Query() + query.path = func(ctx context.Context) (fromU *sql.Selector, err error) { + if err := bcq.prepareQuery(ctx); err != nil { + return nil, err + } + selector := bcq.sqlQuery(ctx) + if err := selector.Err(); err != nil { + return nil, err + } + step := sqlgraph.NewStep( + sqlgraph.From(bookcover.Table, bookcover.FieldID, selector), + sqlgraph.To(book.Table, book.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bookcover.BookTable, bookcover.BookColumn), + ) + fromU = sqlgraph.SetNeighbors(bcq.driver.Dialect(), step) + return fromU, nil + } + return query +} + +// First returns the first BookCover entity from the query. +// Returns a *NotFoundError when no BookCover was found. +func (bcq *BookCoverQuery) First(ctx context.Context) (*BookCover, error) { + nodes, err := bcq.Limit(1).All(setContextOp(ctx, bcq.ctx, "First")) + if err != nil { + return nil, err + } + if len(nodes) == 0 { + return nil, &NotFoundError{bookcover.Label} + } + return nodes[0], nil +} + +// FirstX is like First, but panics if an error occurs. +func (bcq *BookCoverQuery) FirstX(ctx context.Context) *BookCover { + node, err := bcq.First(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return node +} + +// FirstID returns the first BookCover ID from the query. +// Returns a *NotFoundError when no BookCover ID was found. +func (bcq *BookCoverQuery) FirstID(ctx context.Context) (id ksuid.ID, err error) { + var ids []ksuid.ID + if ids, err = bcq.Limit(1).IDs(setContextOp(ctx, bcq.ctx, "FirstID")); err != nil { + return + } + if len(ids) == 0 { + err = &NotFoundError{bookcover.Label} + return + } + return ids[0], nil +} + +// FirstIDX is like FirstID, but panics if an error occurs. +func (bcq *BookCoverQuery) FirstIDX(ctx context.Context) ksuid.ID { + id, err := bcq.FirstID(ctx) + if err != nil && !IsNotFound(err) { + panic(err) + } + return id +} + +// Only returns a single BookCover entity found by the query, ensuring it only returns one. +// Returns a *NotSingularError when more than one BookCover entity is found. +// Returns a *NotFoundError when no BookCover entities are found. +func (bcq *BookCoverQuery) Only(ctx context.Context) (*BookCover, error) { + nodes, err := bcq.Limit(2).All(setContextOp(ctx, bcq.ctx, "Only")) + if err != nil { + return nil, err + } + switch len(nodes) { + case 1: + return nodes[0], nil + case 0: + return nil, &NotFoundError{bookcover.Label} + default: + return nil, &NotSingularError{bookcover.Label} + } +} + +// OnlyX is like Only, but panics if an error occurs. +func (bcq *BookCoverQuery) OnlyX(ctx context.Context) *BookCover { + node, err := bcq.Only(ctx) + if err != nil { + panic(err) + } + return node +} + +// OnlyID is like Only, but returns the only BookCover ID in the query. +// Returns a *NotSingularError when more than one BookCover ID is found. +// Returns a *NotFoundError when no entities are found. +func (bcq *BookCoverQuery) OnlyID(ctx context.Context) (id ksuid.ID, err error) { + var ids []ksuid.ID + if ids, err = bcq.Limit(2).IDs(setContextOp(ctx, bcq.ctx, "OnlyID")); err != nil { + return + } + switch len(ids) { + case 1: + id = ids[0] + case 0: + err = &NotFoundError{bookcover.Label} + default: + err = &NotSingularError{bookcover.Label} + } + return +} + +// OnlyIDX is like OnlyID, but panics if an error occurs. +func (bcq *BookCoverQuery) OnlyIDX(ctx context.Context) ksuid.ID { + id, err := bcq.OnlyID(ctx) + if err != nil { + panic(err) + } + return id +} + +// All executes the query and returns a list of BookCovers. +func (bcq *BookCoverQuery) All(ctx context.Context) ([]*BookCover, error) { + ctx = setContextOp(ctx, bcq.ctx, "All") + if err := bcq.prepareQuery(ctx); err != nil { + return nil, err + } + qr := querierAll[[]*BookCover, *BookCoverQuery]() + return withInterceptors[[]*BookCover](ctx, bcq, qr, bcq.inters) +} + +// AllX is like All, but panics if an error occurs. +func (bcq *BookCoverQuery) AllX(ctx context.Context) []*BookCover { + nodes, err := bcq.All(ctx) + if err != nil { + panic(err) + } + return nodes +} + +// IDs executes the query and returns a list of BookCover IDs. +func (bcq *BookCoverQuery) IDs(ctx context.Context) (ids []ksuid.ID, err error) { + if bcq.ctx.Unique == nil && bcq.path != nil { + bcq.Unique(true) + } + ctx = setContextOp(ctx, bcq.ctx, "IDs") + if err = bcq.Select(bookcover.FieldID).Scan(ctx, &ids); err != nil { + return nil, err + } + return ids, nil +} + +// IDsX is like IDs, but panics if an error occurs. +func (bcq *BookCoverQuery) IDsX(ctx context.Context) []ksuid.ID { + ids, err := bcq.IDs(ctx) + if err != nil { + panic(err) + } + return ids +} + +// Count returns the count of the given query. +func (bcq *BookCoverQuery) Count(ctx context.Context) (int, error) { + ctx = setContextOp(ctx, bcq.ctx, "Count") + if err := bcq.prepareQuery(ctx); err != nil { + return 0, err + } + return withInterceptors[int](ctx, bcq, querierCount[*BookCoverQuery](), bcq.inters) +} + +// CountX is like Count, but panics if an error occurs. +func (bcq *BookCoverQuery) CountX(ctx context.Context) int { + count, err := bcq.Count(ctx) + if err != nil { + panic(err) + } + return count +} + +// Exist returns true if the query has elements in the graph. +func (bcq *BookCoverQuery) Exist(ctx context.Context) (bool, error) { + ctx = setContextOp(ctx, bcq.ctx, "Exist") + switch _, err := bcq.FirstID(ctx); { + case IsNotFound(err): + return false, nil + case err != nil: + return false, fmt.Errorf("ent: check existence: %w", err) + default: + return true, nil + } +} + +// ExistX is like Exist, but panics if an error occurs. +func (bcq *BookCoverQuery) ExistX(ctx context.Context) bool { + exist, err := bcq.Exist(ctx) + if err != nil { + panic(err) + } + return exist +} + +// Clone returns a duplicate of the BookCoverQuery builder, including all associated steps. It can be +// used to prepare common query builders and use them differently after the clone is made. +func (bcq *BookCoverQuery) Clone() *BookCoverQuery { + if bcq == nil { + return nil + } + return &BookCoverQuery{ + config: bcq.config, + ctx: bcq.ctx.Clone(), + order: append([]bookcover.OrderOption{}, bcq.order...), + inters: append([]Interceptor{}, bcq.inters...), + predicates: append([]predicate.BookCover{}, bcq.predicates...), + withBook: bcq.withBook.Clone(), + // clone intermediate query. + sql: bcq.sql.Clone(), + path: bcq.path, + } +} + +// WithBook tells the query-builder to eager-load the nodes that are connected to +// the "book" edge. The optional arguments are used to configure the query builder of the edge. +func (bcq *BookCoverQuery) WithBook(opts ...func(*BookQuery)) *BookCoverQuery { + query := (&BookClient{config: bcq.config}).Query() + for _, opt := range opts { + opt(query) + } + bcq.withBook = query + return bcq +} + +// GroupBy is used to group vertices by one or more fields/columns. +// It is often used with aggregate functions, like: count, max, mean, min, sum. +// +// Example: +// +// var v []struct { +// CreateTime time.Time `json:"create_time,omitempty"` +// Count int `json:"count,omitempty"` +// } +// +// client.BookCover.Query(). +// GroupBy(bookcover.FieldCreateTime). +// Aggregate(ent.Count()). +// Scan(ctx, &v) +func (bcq *BookCoverQuery) GroupBy(field string, fields ...string) *BookCoverGroupBy { + bcq.ctx.Fields = append([]string{field}, fields...) + grbuild := &BookCoverGroupBy{build: bcq} + grbuild.flds = &bcq.ctx.Fields + grbuild.label = bookcover.Label + grbuild.scan = grbuild.Scan + return grbuild +} + +// Select allows the selection one or more fields/columns for the given query, +// instead of selecting all fields in the entity. +// +// Example: +// +// var v []struct { +// CreateTime time.Time `json:"create_time,omitempty"` +// } +// +// client.BookCover.Query(). +// Select(bookcover.FieldCreateTime). +// Scan(ctx, &v) +func (bcq *BookCoverQuery) Select(fields ...string) *BookCoverSelect { + bcq.ctx.Fields = append(bcq.ctx.Fields, fields...) + sbuild := &BookCoverSelect{BookCoverQuery: bcq} + sbuild.label = bookcover.Label + sbuild.flds, sbuild.scan = &bcq.ctx.Fields, sbuild.Scan + return sbuild +} + +// Aggregate returns a BookCoverSelect configured with the given aggregations. +func (bcq *BookCoverQuery) Aggregate(fns ...AggregateFunc) *BookCoverSelect { + return bcq.Select().Aggregate(fns...) +} + +func (bcq *BookCoverQuery) prepareQuery(ctx context.Context) error { + for _, inter := range bcq.inters { + if inter == nil { + return fmt.Errorf("ent: uninitialized interceptor (forgotten import ent/runtime?)") + } + if trv, ok := inter.(Traverser); ok { + if err := trv.Traverse(ctx, bcq); err != nil { + return err + } + } + } + for _, f := range bcq.ctx.Fields { + if !bookcover.ValidColumn(f) { + return &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + } + if bcq.path != nil { + prev, err := bcq.path(ctx) + if err != nil { + return err + } + bcq.sql = prev + } + if bookcover.Policy == nil { + return errors.New("ent: uninitialized bookcover.Policy (forgotten import ent/runtime?)") + } + if err := bookcover.Policy.EvalQuery(ctx, bcq); err != nil { + return err + } + return nil +} + +func (bcq *BookCoverQuery) sqlAll(ctx context.Context, hooks ...queryHook) ([]*BookCover, error) { + var ( + nodes = []*BookCover{} + withFKs = bcq.withFKs + _spec = bcq.querySpec() + loadedTypes = [1]bool{ + bcq.withBook != nil, + } + ) + if bcq.withBook != nil { + withFKs = true + } + if withFKs { + _spec.Node.Columns = append(_spec.Node.Columns, bookcover.ForeignKeys...) + } + _spec.ScanValues = func(columns []string) ([]any, error) { + return (*BookCover).scanValues(nil, columns) + } + _spec.Assign = func(columns []string, values []any) error { + node := &BookCover{config: bcq.config} + nodes = append(nodes, node) + node.Edges.loadedTypes = loadedTypes + return node.assignValues(columns, values) + } + if len(bcq.modifiers) > 0 { + _spec.Modifiers = bcq.modifiers + } + for i := range hooks { + hooks[i](ctx, _spec) + } + if err := sqlgraph.QueryNodes(ctx, bcq.driver, _spec); err != nil { + return nil, err + } + if len(nodes) == 0 { + return nodes, nil + } + if query := bcq.withBook; query != nil { + if err := bcq.loadBook(ctx, query, nodes, nil, + func(n *BookCover, e *Book) { n.Edges.Book = e }); err != nil { + return nil, err + } + } + for i := range bcq.loadTotal { + if err := bcq.loadTotal[i](ctx, nodes); err != nil { + return nil, err + } + } + return nodes, nil +} + +func (bcq *BookCoverQuery) loadBook(ctx context.Context, query *BookQuery, nodes []*BookCover, init func(*BookCover), assign func(*BookCover, *Book)) error { + ids := make([]ksuid.ID, 0, len(nodes)) + nodeids := make(map[ksuid.ID][]*BookCover) + for i := range nodes { + if nodes[i].book_cover_book == nil { + continue + } + fk := *nodes[i].book_cover_book + if _, ok := nodeids[fk]; !ok { + ids = append(ids, fk) + } + nodeids[fk] = append(nodeids[fk], nodes[i]) + } + if len(ids) == 0 { + return nil + } + query.Where(book.IDIn(ids...)) + neighbors, err := query.All(ctx) + if err != nil { + return err + } + for _, n := range neighbors { + nodes, ok := nodeids[n.ID] + if !ok { + return fmt.Errorf(`unexpected foreign-key "book_cover_book" returned %v`, n.ID) + } + for i := range nodes { + assign(nodes[i], n) + } + } + return nil +} + +func (bcq *BookCoverQuery) sqlCount(ctx context.Context) (int, error) { + _spec := bcq.querySpec() + if len(bcq.modifiers) > 0 { + _spec.Modifiers = bcq.modifiers + } + _spec.Node.Columns = bcq.ctx.Fields + if len(bcq.ctx.Fields) > 0 { + _spec.Unique = bcq.ctx.Unique != nil && *bcq.ctx.Unique + } + return sqlgraph.CountNodes(ctx, bcq.driver, _spec) +} + +func (bcq *BookCoverQuery) querySpec() *sqlgraph.QuerySpec { + _spec := sqlgraph.NewQuerySpec(bookcover.Table, bookcover.Columns, sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString)) + _spec.From = bcq.sql + if unique := bcq.ctx.Unique; unique != nil { + _spec.Unique = *unique + } else if bcq.path != nil { + _spec.Unique = true + } + if fields := bcq.ctx.Fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, bookcover.FieldID) + for i := range fields { + if fields[i] != bookcover.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, fields[i]) + } + } + } + if ps := bcq.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if limit := bcq.ctx.Limit; limit != nil { + _spec.Limit = *limit + } + if offset := bcq.ctx.Offset; offset != nil { + _spec.Offset = *offset + } + if ps := bcq.order; len(ps) > 0 { + _spec.Order = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + return _spec +} + +func (bcq *BookCoverQuery) sqlQuery(ctx context.Context) *sql.Selector { + builder := sql.Dialect(bcq.driver.Dialect()) + t1 := builder.Table(bookcover.Table) + columns := bcq.ctx.Fields + if len(columns) == 0 { + columns = bookcover.Columns + } + selector := builder.Select(t1.Columns(columns...)...).From(t1) + if bcq.sql != nil { + selector = bcq.sql + selector.Select(selector.Columns(columns...)...) + } + if bcq.ctx.Unique != nil && *bcq.ctx.Unique { + selector.Distinct() + } + for _, p := range bcq.predicates { + p(selector) + } + for _, p := range bcq.order { + p(selector) + } + if offset := bcq.ctx.Offset; offset != nil { + // limit is mandatory for offset clause. We start + // with default value, and override it below if needed. + selector.Offset(*offset).Limit(math.MaxInt32) + } + if limit := bcq.ctx.Limit; limit != nil { + selector.Limit(*limit) + } + return selector +} + +// BookCoverGroupBy is the group-by builder for BookCover entities. +type BookCoverGroupBy struct { + selector + build *BookCoverQuery +} + +// Aggregate adds the given aggregation functions to the group-by query. +func (bcgb *BookCoverGroupBy) Aggregate(fns ...AggregateFunc) *BookCoverGroupBy { + bcgb.fns = append(bcgb.fns, fns...) + return bcgb +} + +// Scan applies the selector query and scans the result into the given value. +func (bcgb *BookCoverGroupBy) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bcgb.build.ctx, "GroupBy") + if err := bcgb.build.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BookCoverQuery, *BookCoverGroupBy](ctx, bcgb.build, bcgb, bcgb.build.inters, v) +} + +func (bcgb *BookCoverGroupBy) sqlScan(ctx context.Context, root *BookCoverQuery, v any) error { + selector := root.sqlQuery(ctx).Select() + aggregation := make([]string, 0, len(bcgb.fns)) + for _, fn := range bcgb.fns { + aggregation = append(aggregation, fn(selector)) + } + if len(selector.SelectedColumns()) == 0 { + columns := make([]string, 0, len(*bcgb.flds)+len(bcgb.fns)) + for _, f := range *bcgb.flds { + columns = append(columns, selector.C(f)) + } + columns = append(columns, aggregation...) + selector.Select(columns...) + } + selector.GroupBy(selector.Columns(*bcgb.flds...)...) + if err := selector.Err(); err != nil { + return err + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bcgb.build.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} + +// BookCoverSelect is the builder for selecting fields of BookCover entities. +type BookCoverSelect struct { + *BookCoverQuery + selector +} + +// Aggregate adds the given aggregation functions to the selector query. +func (bcs *BookCoverSelect) Aggregate(fns ...AggregateFunc) *BookCoverSelect { + bcs.fns = append(bcs.fns, fns...) + return bcs +} + +// Scan applies the selector query and scans the result into the given value. +func (bcs *BookCoverSelect) Scan(ctx context.Context, v any) error { + ctx = setContextOp(ctx, bcs.ctx, "Select") + if err := bcs.prepareQuery(ctx); err != nil { + return err + } + return scanWithInterceptors[*BookCoverQuery, *BookCoverSelect](ctx, bcs.BookCoverQuery, bcs, bcs.inters, v) +} + +func (bcs *BookCoverSelect) sqlScan(ctx context.Context, root *BookCoverQuery, v any) error { + selector := root.sqlQuery(ctx) + aggregation := make([]string, 0, len(bcs.fns)) + for _, fn := range bcs.fns { + aggregation = append(aggregation, fn(selector)) + } + switch n := len(*bcs.selector.flds); { + case n == 0 && len(aggregation) > 0: + selector.Select(aggregation...) + case n != 0 && len(aggregation) > 0: + selector.AppendSelect(aggregation...) + } + rows := &sql.Rows{} + query, args := selector.Query() + if err := bcs.driver.Query(ctx, query, args, rows); err != nil { + return err + } + defer rows.Close() + return sql.ScanSlice(rows, v) +} diff --git a/internal/ent/bookcover_update.go b/internal/ent/bookcover_update.go new file mode 100644 index 00000000..996c65f2 --- /dev/null +++ b/internal/ent/bookcover_update.go @@ -0,0 +1,246 @@ +// Code generated by ent, DO NOT EDIT. + +package ent + +import ( + "context" + "errors" + "fmt" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/predicate" + "time" + + "entgo.io/ent/dialect/sql" + "entgo.io/ent/dialect/sql/sqlgraph" + "entgo.io/ent/schema/field" +) + +// BookCoverUpdate is the builder for updating BookCover entities. +type BookCoverUpdate struct { + config + hooks []Hook + mutation *BookCoverMutation +} + +// Where appends a list predicates to the BookCoverUpdate builder. +func (bcu *BookCoverUpdate) Where(ps ...predicate.BookCover) *BookCoverUpdate { + bcu.mutation.Where(ps...) + return bcu +} + +// SetUpdateTime sets the "update_time" field. +func (bcu *BookCoverUpdate) SetUpdateTime(t time.Time) *BookCoverUpdate { + bcu.mutation.SetUpdateTime(t) + return bcu +} + +// Mutation returns the BookCoverMutation object of the builder. +func (bcu *BookCoverUpdate) Mutation() *BookCoverMutation { + return bcu.mutation +} + +// Save executes the query and returns the number of nodes affected by the update operation. +func (bcu *BookCoverUpdate) Save(ctx context.Context) (int, error) { + if err := bcu.defaults(); err != nil { + return 0, err + } + return withHooks(ctx, bcu.sqlSave, bcu.mutation, bcu.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bcu *BookCoverUpdate) SaveX(ctx context.Context) int { + affected, err := bcu.Save(ctx) + if err != nil { + panic(err) + } + return affected +} + +// Exec executes the query. +func (bcu *BookCoverUpdate) Exec(ctx context.Context) error { + _, err := bcu.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcu *BookCoverUpdate) ExecX(ctx context.Context) { + if err := bcu.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (bcu *BookCoverUpdate) defaults() error { + if _, ok := bcu.mutation.UpdateTime(); !ok { + if bookcover.UpdateDefaultUpdateTime == nil { + return fmt.Errorf("ent: uninitialized bookcover.UpdateDefaultUpdateTime (forgotten import ent/runtime?)") + } + v := bookcover.UpdateDefaultUpdateTime() + bcu.mutation.SetUpdateTime(v) + } + return nil +} + +// check runs all checks and user-defined validators on the builder. +func (bcu *BookCoverUpdate) check() error { + if _, ok := bcu.mutation.BookID(); bcu.mutation.BookCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BookCover.book"`) + } + return nil +} + +func (bcu *BookCoverUpdate) sqlSave(ctx context.Context) (n int, err error) { + if err := bcu.check(); err != nil { + return n, err + } + _spec := sqlgraph.NewUpdateSpec(bookcover.Table, bookcover.Columns, sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString)) + if ps := bcu.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bcu.mutation.UpdateTime(); ok { + _spec.SetField(bookcover.FieldUpdateTime, field.TypeTime, value) + } + if n, err = sqlgraph.UpdateNodes(ctx, bcu.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{bookcover.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return 0, err + } + bcu.mutation.done = true + return n, nil +} + +// BookCoverUpdateOne is the builder for updating a single BookCover entity. +type BookCoverUpdateOne struct { + config + fields []string + hooks []Hook + mutation *BookCoverMutation +} + +// SetUpdateTime sets the "update_time" field. +func (bcuo *BookCoverUpdateOne) SetUpdateTime(t time.Time) *BookCoverUpdateOne { + bcuo.mutation.SetUpdateTime(t) + return bcuo +} + +// Mutation returns the BookCoverMutation object of the builder. +func (bcuo *BookCoverUpdateOne) Mutation() *BookCoverMutation { + return bcuo.mutation +} + +// Where appends a list predicates to the BookCoverUpdate builder. +func (bcuo *BookCoverUpdateOne) Where(ps ...predicate.BookCover) *BookCoverUpdateOne { + bcuo.mutation.Where(ps...) + return bcuo +} + +// Select allows selecting one or more fields (columns) of the returned entity. +// The default is selecting all fields defined in the entity schema. +func (bcuo *BookCoverUpdateOne) Select(field string, fields ...string) *BookCoverUpdateOne { + bcuo.fields = append([]string{field}, fields...) + return bcuo +} + +// Save executes the query and returns the updated BookCover entity. +func (bcuo *BookCoverUpdateOne) Save(ctx context.Context) (*BookCover, error) { + if err := bcuo.defaults(); err != nil { + return nil, err + } + return withHooks(ctx, bcuo.sqlSave, bcuo.mutation, bcuo.hooks) +} + +// SaveX is like Save, but panics if an error occurs. +func (bcuo *BookCoverUpdateOne) SaveX(ctx context.Context) *BookCover { + node, err := bcuo.Save(ctx) + if err != nil { + panic(err) + } + return node +} + +// Exec executes the query on the entity. +func (bcuo *BookCoverUpdateOne) Exec(ctx context.Context) error { + _, err := bcuo.Save(ctx) + return err +} + +// ExecX is like Exec, but panics if an error occurs. +func (bcuo *BookCoverUpdateOne) ExecX(ctx context.Context) { + if err := bcuo.Exec(ctx); err != nil { + panic(err) + } +} + +// defaults sets the default values of the builder before save. +func (bcuo *BookCoverUpdateOne) defaults() error { + if _, ok := bcuo.mutation.UpdateTime(); !ok { + if bookcover.UpdateDefaultUpdateTime == nil { + return fmt.Errorf("ent: uninitialized bookcover.UpdateDefaultUpdateTime (forgotten import ent/runtime?)") + } + v := bookcover.UpdateDefaultUpdateTime() + bcuo.mutation.SetUpdateTime(v) + } + return nil +} + +// check runs all checks and user-defined validators on the builder. +func (bcuo *BookCoverUpdateOne) check() error { + if _, ok := bcuo.mutation.BookID(); bcuo.mutation.BookCleared() && !ok { + return errors.New(`ent: clearing a required unique edge "BookCover.book"`) + } + return nil +} + +func (bcuo *BookCoverUpdateOne) sqlSave(ctx context.Context) (_node *BookCover, err error) { + if err := bcuo.check(); err != nil { + return _node, err + } + _spec := sqlgraph.NewUpdateSpec(bookcover.Table, bookcover.Columns, sqlgraph.NewFieldSpec(bookcover.FieldID, field.TypeString)) + id, ok := bcuo.mutation.ID() + if !ok { + return nil, &ValidationError{Name: "id", err: errors.New(`ent: missing "BookCover.id" for update`)} + } + _spec.Node.ID.Value = id + if fields := bcuo.fields; len(fields) > 0 { + _spec.Node.Columns = make([]string, 0, len(fields)) + _spec.Node.Columns = append(_spec.Node.Columns, bookcover.FieldID) + for _, f := range fields { + if !bookcover.ValidColumn(f) { + return nil, &ValidationError{Name: f, err: fmt.Errorf("ent: invalid field %q for query", f)} + } + if f != bookcover.FieldID { + _spec.Node.Columns = append(_spec.Node.Columns, f) + } + } + } + if ps := bcuo.mutation.predicates; len(ps) > 0 { + _spec.Predicate = func(selector *sql.Selector) { + for i := range ps { + ps[i](selector) + } + } + } + if value, ok := bcuo.mutation.UpdateTime(); ok { + _spec.SetField(bookcover.FieldUpdateTime, field.TypeTime, value) + } + _node = &BookCover{config: bcuo.config} + _spec.Assign = _node.assignValues + _spec.ScanValues = _node.scanValues + if err = sqlgraph.UpdateNode(ctx, bcuo.driver, _spec); err != nil { + if _, ok := err.(*sqlgraph.NotFoundError); ok { + err = &NotFoundError{bookcover.Label} + } else if sqlgraph.IsConstraintError(err) { + err = &ConstraintError{msg: err.Error(), wrap: err} + } + return nil, err + } + bcuo.mutation.done = true + return _node, nil +} diff --git a/internal/ent/client.go b/internal/ent/client.go index d3c6ccaa..e3710f90 100644 --- a/internal/ent/client.go +++ b/internal/ent/client.go @@ -14,6 +14,7 @@ import ( "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -40,6 +41,8 @@ type Client struct { Author *AuthorClient // Book is the client for interacting with the Book builders. Book *BookClient + // BookCover is the client for interacting with the BookCover builders. + BookCover *BookCoverClient // BookFile is the client for interacting with the BookFile builders. BookFile *BookFileClient // Identifier is the client for interacting with the Identifier builders. @@ -73,6 +76,7 @@ func (c *Client) init() { c.Schema = migrate.NewSchema(c.driver) c.Author = NewAuthorClient(c.config) c.Book = NewBookClient(c.config) + c.BookCover = NewBookCoverClient(c.config) c.BookFile = NewBookFileClient(c.config) c.Identifier = NewIdentifierClient(c.config) c.Language = NewLanguageClient(c.config) @@ -177,6 +181,7 @@ func (c *Client) Tx(ctx context.Context) (*Tx, error) { config: cfg, Author: NewAuthorClient(cfg), Book: NewBookClient(cfg), + BookCover: NewBookCoverClient(cfg), BookFile: NewBookFileClient(cfg), Identifier: NewIdentifierClient(cfg), Language: NewLanguageClient(cfg), @@ -208,6 +213,7 @@ func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) config: cfg, Author: NewAuthorClient(cfg), Book: NewBookClient(cfg), + BookCover: NewBookCoverClient(cfg), BookFile: NewBookFileClient(cfg), Identifier: NewIdentifierClient(cfg), Language: NewLanguageClient(cfg), @@ -247,8 +253,8 @@ func (c *Client) Close() error { // In order to add hooks to a specific client, call: `client.Node.Use(...)`. func (c *Client) Use(hooks ...Hook) { for _, n := range []interface{ Use(...Hook) }{ - c.Author, c.Book, c.BookFile, c.Identifier, c.Language, c.Publisher, c.Series, - c.Shelf, c.Tag, c.Task, c.User, c.UserPermissions, + c.Author, c.Book, c.BookCover, c.BookFile, c.Identifier, c.Language, + c.Publisher, c.Series, c.Shelf, c.Tag, c.Task, c.User, c.UserPermissions, } { n.Use(hooks...) } @@ -258,8 +264,8 @@ func (c *Client) Use(hooks ...Hook) { // In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`. func (c *Client) Intercept(interceptors ...Interceptor) { for _, n := range []interface{ Intercept(...Interceptor) }{ - c.Author, c.Book, c.BookFile, c.Identifier, c.Language, c.Publisher, c.Series, - c.Shelf, c.Tag, c.Task, c.User, c.UserPermissions, + c.Author, c.Book, c.BookCover, c.BookFile, c.Identifier, c.Language, + c.Publisher, c.Series, c.Shelf, c.Tag, c.Task, c.User, c.UserPermissions, } { n.Intercept(interceptors...) } @@ -272,6 +278,8 @@ func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) { return c.Author.mutate(ctx, m) case *BookMutation: return c.Book.mutate(ctx, m) + case *BookCoverMutation: + return c.BookCover.mutate(ctx, m) case *BookFileMutation: return c.BookFile.mutate(ctx, m) case *IdentifierMutation: @@ -683,6 +691,22 @@ func (c *BookClient) QueryFiles(b *Book) *BookFileQuery { return query } +// QueryCovers queries the covers edge of a Book. +func (c *BookClient) QueryCovers(b *Book) *BookCoverQuery { + query := (&BookCoverClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := b.ID + step := sqlgraph.NewStep( + sqlgraph.From(book.Table, book.FieldID, id), + sqlgraph.To(bookcover.Table, bookcover.FieldID), + sqlgraph.Edge(sqlgraph.O2M, true, book.CoversTable, book.CoversColumn), + ) + fromV = sqlgraph.Neighbors(b.driver.Dialect(), step) + return fromV, nil + } + return query +} + // Hooks returns the client hooks. func (c *BookClient) Hooks() []Hook { hooks := c.hooks.Book @@ -709,6 +733,156 @@ func (c *BookClient) mutate(ctx context.Context, m *BookMutation) (Value, error) } } +// BookCoverClient is a client for the BookCover schema. +type BookCoverClient struct { + config +} + +// NewBookCoverClient returns a client for the BookCover from the given config. +func NewBookCoverClient(c config) *BookCoverClient { + return &BookCoverClient{config: c} +} + +// Use adds a list of mutation hooks to the hooks stack. +// A call to `Use(f, g, h)` equals to `bookcover.Hooks(f(g(h())))`. +func (c *BookCoverClient) Use(hooks ...Hook) { + c.hooks.BookCover = append(c.hooks.BookCover, hooks...) +} + +// Intercept adds a list of query interceptors to the interceptors stack. +// A call to `Intercept(f, g, h)` equals to `bookcover.Intercept(f(g(h())))`. +func (c *BookCoverClient) Intercept(interceptors ...Interceptor) { + c.inters.BookCover = append(c.inters.BookCover, interceptors...) +} + +// Create returns a builder for creating a BookCover entity. +func (c *BookCoverClient) Create() *BookCoverCreate { + mutation := newBookCoverMutation(c.config, OpCreate) + return &BookCoverCreate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// CreateBulk returns a builder for creating a bulk of BookCover entities. +func (c *BookCoverClient) CreateBulk(builders ...*BookCoverCreate) *BookCoverCreateBulk { + return &BookCoverCreateBulk{config: c.config, builders: builders} +} + +// MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates +// a builder and applies setFunc on it. +func (c *BookCoverClient) MapCreateBulk(slice any, setFunc func(*BookCoverCreate, int)) *BookCoverCreateBulk { + rv := reflect.ValueOf(slice) + if rv.Kind() != reflect.Slice { + return &BookCoverCreateBulk{err: fmt.Errorf("calling to BookCoverClient.MapCreateBulk with wrong type %T, need slice", slice)} + } + builders := make([]*BookCoverCreate, rv.Len()) + for i := 0; i < rv.Len(); i++ { + builders[i] = c.Create() + setFunc(builders[i], i) + } + return &BookCoverCreateBulk{config: c.config, builders: builders} +} + +// Update returns an update builder for BookCover. +func (c *BookCoverClient) Update() *BookCoverUpdate { + mutation := newBookCoverMutation(c.config, OpUpdate) + return &BookCoverUpdate{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOne returns an update builder for the given entity. +func (c *BookCoverClient) UpdateOne(bc *BookCover) *BookCoverUpdateOne { + mutation := newBookCoverMutation(c.config, OpUpdateOne, withBookCover(bc)) + return &BookCoverUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// UpdateOneID returns an update builder for the given id. +func (c *BookCoverClient) UpdateOneID(id ksuid.ID) *BookCoverUpdateOne { + mutation := newBookCoverMutation(c.config, OpUpdateOne, withBookCoverID(id)) + return &BookCoverUpdateOne{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// Delete returns a delete builder for BookCover. +func (c *BookCoverClient) Delete() *BookCoverDelete { + mutation := newBookCoverMutation(c.config, OpDelete) + return &BookCoverDelete{config: c.config, hooks: c.Hooks(), mutation: mutation} +} + +// DeleteOne returns a builder for deleting the given entity. +func (c *BookCoverClient) DeleteOne(bc *BookCover) *BookCoverDeleteOne { + return c.DeleteOneID(bc.ID) +} + +// DeleteOneID returns a builder for deleting the given entity by its id. +func (c *BookCoverClient) DeleteOneID(id ksuid.ID) *BookCoverDeleteOne { + builder := c.Delete().Where(bookcover.ID(id)) + builder.mutation.id = &id + builder.mutation.op = OpDeleteOne + return &BookCoverDeleteOne{builder} +} + +// Query returns a query builder for BookCover. +func (c *BookCoverClient) Query() *BookCoverQuery { + return &BookCoverQuery{ + config: c.config, + ctx: &QueryContext{Type: TypeBookCover}, + inters: c.Interceptors(), + } +} + +// Get returns a BookCover entity by its id. +func (c *BookCoverClient) Get(ctx context.Context, id ksuid.ID) (*BookCover, error) { + return c.Query().Where(bookcover.ID(id)).Only(ctx) +} + +// GetX is like Get, but panics if an error occurs. +func (c *BookCoverClient) GetX(ctx context.Context, id ksuid.ID) *BookCover { + obj, err := c.Get(ctx, id) + if err != nil { + panic(err) + } + return obj +} + +// QueryBook queries the book edge of a BookCover. +func (c *BookCoverClient) QueryBook(bc *BookCover) *BookQuery { + query := (&BookClient{config: c.config}).Query() + query.path = func(context.Context) (fromV *sql.Selector, _ error) { + id := bc.ID + step := sqlgraph.NewStep( + sqlgraph.From(bookcover.Table, bookcover.FieldID, id), + sqlgraph.To(book.Table, book.FieldID), + sqlgraph.Edge(sqlgraph.M2O, false, bookcover.BookTable, bookcover.BookColumn), + ) + fromV = sqlgraph.Neighbors(bc.driver.Dialect(), step) + return fromV, nil + } + return query +} + +// Hooks returns the client hooks. +func (c *BookCoverClient) Hooks() []Hook { + hooks := c.hooks.BookCover + return append(hooks[:len(hooks):len(hooks)], bookcover.Hooks[:]...) +} + +// Interceptors returns the client interceptors. +func (c *BookCoverClient) Interceptors() []Interceptor { + return c.inters.BookCover +} + +func (c *BookCoverClient) mutate(ctx context.Context, m *BookCoverMutation) (Value, error) { + switch m.Op() { + case OpCreate: + return (&BookCoverCreate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdate: + return (&BookCoverUpdate{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpUpdateOne: + return (&BookCoverUpdateOne{config: c.config, hooks: c.Hooks(), mutation: m}).Save(ctx) + case OpDelete, OpDeleteOne: + return (&BookCoverDelete{config: c.config, hooks: c.Hooks(), mutation: m}).Exec(ctx) + default: + return nil, fmt.Errorf("ent: unknown BookCover mutation op: %q", m.Op()) + } +} + // BookFileClient is a client for the BookFile schema. type BookFileClient struct { config @@ -2244,11 +2418,11 @@ func (c *UserPermissionsClient) mutate(ctx context.Context, m *UserPermissionsMu // hooks and interceptors per client, for fast access. type ( hooks struct { - Author, Book, BookFile, Identifier, Language, Publisher, Series, Shelf, Tag, - Task, User, UserPermissions []ent.Hook + Author, Book, BookCover, BookFile, Identifier, Language, Publisher, Series, + Shelf, Tag, Task, User, UserPermissions []ent.Hook } inters struct { - Author, Book, BookFile, Identifier, Language, Publisher, Series, Shelf, Tag, - Task, User, UserPermissions []ent.Interceptor + Author, Book, BookCover, BookFile, Identifier, Language, Publisher, Series, + Shelf, Tag, Task, User, UserPermissions []ent.Interceptor } ) diff --git a/internal/ent/ent.go b/internal/ent/ent.go index 7ccbf31e..03abf055 100644 --- a/internal/ent/ent.go +++ b/internal/ent/ent.go @@ -8,6 +8,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -86,6 +87,7 @@ func checkColumn(table, column string) error { columnCheck = sql.NewColumnCheck(map[string]func(string) bool{ author.Table: author.ValidColumn, book.Table: book.ValidColumn, + bookcover.Table: bookcover.ValidColumn, bookfile.Table: bookfile.ValidColumn, identifier.Table: identifier.ValidColumn, language.Table: language.ValidColumn, diff --git a/internal/ent/entql.go b/internal/ent/entql.go index 70885cc1..c8788c7f 100644 --- a/internal/ent/entql.go +++ b/internal/ent/entql.go @@ -5,6 +5,7 @@ package ent import ( "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -25,7 +26,7 @@ import ( // schemaGraph holds a representation of ent/schema at runtime. var schemaGraph = func() *sqlgraph.Schema { - graph := &sqlgraph.Schema{Nodes: make([]*sqlgraph.Node, 12)} + graph := &sqlgraph.Schema{Nodes: make([]*sqlgraph.Node, 13)} graph.Nodes[0] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: author.Table, @@ -69,6 +70,27 @@ var schemaGraph = func() *sqlgraph.Schema { }, } graph.Nodes[2] = &sqlgraph.Node{ + NodeSpec: sqlgraph.NodeSpec{ + Table: bookcover.Table, + Columns: bookcover.Columns, + ID: &sqlgraph.FieldSpec{ + Type: field.TypeString, + Column: bookcover.FieldID, + }, + }, + Type: "BookCover", + Fields: map[string]*sqlgraph.FieldSpec{ + bookcover.FieldCreateTime: {Type: field.TypeTime, Column: bookcover.FieldCreateTime}, + bookcover.FieldUpdateTime: {Type: field.TypeTime, Column: bookcover.FieldUpdateTime}, + bookcover.FieldPath: {Type: field.TypeString, Column: bookcover.FieldPath}, + bookcover.FieldSize: {Type: field.TypeInt64, Column: bookcover.FieldSize}, + bookcover.FieldWidth: {Type: field.TypeInt, Column: bookcover.FieldWidth}, + bookcover.FieldHeight: {Type: field.TypeInt, Column: bookcover.FieldHeight}, + bookcover.FieldURL: {Type: field.TypeString, Column: bookcover.FieldURL}, + bookcover.FieldContentType: {Type: field.TypeString, Column: bookcover.FieldContentType}, + }, + } + graph.Nodes[3] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: bookfile.Table, Columns: bookfile.Columns, @@ -87,7 +109,7 @@ var schemaGraph = func() *sqlgraph.Schema { bookfile.FieldFormat: {Type: field.TypeEnum, Column: bookfile.FieldFormat}, }, } - graph.Nodes[3] = &sqlgraph.Node{ + graph.Nodes[4] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: identifier.Table, Columns: identifier.Columns, @@ -105,7 +127,7 @@ var schemaGraph = func() *sqlgraph.Schema { identifier.FieldValue: {Type: field.TypeString, Column: identifier.FieldValue}, }, } - graph.Nodes[4] = &sqlgraph.Node{ + graph.Nodes[5] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: language.Table, Columns: language.Columns, @@ -122,7 +144,7 @@ var schemaGraph = func() *sqlgraph.Schema { language.FieldCode: {Type: field.TypeString, Column: language.FieldCode}, }, } - graph.Nodes[5] = &sqlgraph.Node{ + graph.Nodes[6] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: publisher.Table, Columns: publisher.Columns, @@ -139,7 +161,7 @@ var schemaGraph = func() *sqlgraph.Schema { publisher.FieldName: {Type: field.TypeString, Column: publisher.FieldName}, }, } - graph.Nodes[6] = &sqlgraph.Node{ + graph.Nodes[7] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: series.Table, Columns: series.Columns, @@ -157,7 +179,7 @@ var schemaGraph = func() *sqlgraph.Schema { series.FieldSort: {Type: field.TypeString, Column: series.FieldSort}, }, } - graph.Nodes[7] = &sqlgraph.Node{ + graph.Nodes[8] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: shelf.Table, Columns: shelf.Columns, @@ -176,7 +198,7 @@ var schemaGraph = func() *sqlgraph.Schema { shelf.FieldDescription: {Type: field.TypeString, Column: shelf.FieldDescription}, }, } - graph.Nodes[8] = &sqlgraph.Node{ + graph.Nodes[9] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: tag.Table, Columns: tag.Columns, @@ -191,7 +213,7 @@ var schemaGraph = func() *sqlgraph.Schema { tag.FieldName: {Type: field.TypeString, Column: tag.FieldName}, }, } - graph.Nodes[9] = &sqlgraph.Node{ + graph.Nodes[10] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: task.Table, Columns: task.Columns, @@ -213,7 +235,7 @@ var schemaGraph = func() *sqlgraph.Schema { task.FieldIsSystemTask: {Type: field.TypeBool, Column: task.FieldIsSystemTask}, }, } - graph.Nodes[10] = &sqlgraph.Node{ + graph.Nodes[11] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: user.Table, Columns: user.Columns, @@ -231,7 +253,7 @@ var schemaGraph = func() *sqlgraph.Schema { user.FieldEmail: {Type: field.TypeString, Column: user.FieldEmail}, }, } - graph.Nodes[11] = &sqlgraph.Node{ + graph.Nodes[12] = &sqlgraph.Node{ NodeSpec: sqlgraph.NodeSpec{ Table: userpermissions.Table, Columns: userpermissions.Columns, @@ -358,6 +380,30 @@ var schemaGraph = func() *sqlgraph.Schema { "Book", "BookFile", ) + graph.MustAddE( + "covers", + &sqlgraph.EdgeSpec{ + Rel: sqlgraph.O2M, + Inverse: true, + Table: book.CoversTable, + Columns: []string{book.CoversColumn}, + Bidi: false, + }, + "Book", + "BookCover", + ) + graph.MustAddE( + "book", + &sqlgraph.EdgeSpec{ + Rel: sqlgraph.M2O, + Inverse: false, + Table: bookcover.BookTable, + Columns: []string{bookcover.BookColumn}, + Bidi: false, + }, + "BookCover", + "Book", + ) graph.MustAddE( "book", &sqlgraph.EdgeSpec{ @@ -797,6 +843,114 @@ func (f *BookFilter) WhereHasFilesWith(preds ...predicate.BookFile) { }))) } +// WhereHasCovers applies a predicate to check if query has an edge covers. +func (f *BookFilter) WhereHasCovers() { + f.Where(entql.HasEdge("covers")) +} + +// WhereHasCoversWith applies a predicate to check if query has an edge covers with a given conditions (other predicates). +func (f *BookFilter) WhereHasCoversWith(preds ...predicate.BookCover) { + f.Where(entql.HasEdgeWith("covers", sqlgraph.WrapFunc(func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }))) +} + +// addPredicate implements the predicateAdder interface. +func (bcq *BookCoverQuery) addPredicate(pred func(s *sql.Selector)) { + bcq.predicates = append(bcq.predicates, pred) +} + +// Filter returns a Filter implementation to apply filters on the BookCoverQuery builder. +func (bcq *BookCoverQuery) Filter() *BookCoverFilter { + return &BookCoverFilter{config: bcq.config, predicateAdder: bcq} +} + +// addPredicate implements the predicateAdder interface. +func (m *BookCoverMutation) addPredicate(pred func(s *sql.Selector)) { + m.predicates = append(m.predicates, pred) +} + +// Filter returns an entql.Where implementation to apply filters on the BookCoverMutation builder. +func (m *BookCoverMutation) Filter() *BookCoverFilter { + return &BookCoverFilter{config: m.config, predicateAdder: m} +} + +// BookCoverFilter provides a generic filtering capability at runtime for BookCoverQuery. +type BookCoverFilter struct { + predicateAdder + config +} + +// Where applies the entql predicate on the query filter. +func (f *BookCoverFilter) Where(p entql.P) { + f.addPredicate(func(s *sql.Selector) { + if err := schemaGraph.EvalP(schemaGraph.Nodes[2].Type, p, s); err != nil { + s.AddError(err) + } + }) +} + +// WhereID applies the entql string predicate on the id field. +func (f *BookCoverFilter) WhereID(p entql.StringP) { + f.Where(p.Field(bookcover.FieldID)) +} + +// WhereCreateTime applies the entql time.Time predicate on the create_time field. +func (f *BookCoverFilter) WhereCreateTime(p entql.TimeP) { + f.Where(p.Field(bookcover.FieldCreateTime)) +} + +// WhereUpdateTime applies the entql time.Time predicate on the update_time field. +func (f *BookCoverFilter) WhereUpdateTime(p entql.TimeP) { + f.Where(p.Field(bookcover.FieldUpdateTime)) +} + +// WherePath applies the entql string predicate on the path field. +func (f *BookCoverFilter) WherePath(p entql.StringP) { + f.Where(p.Field(bookcover.FieldPath)) +} + +// WhereSize applies the entql int64 predicate on the size field. +func (f *BookCoverFilter) WhereSize(p entql.Int64P) { + f.Where(p.Field(bookcover.FieldSize)) +} + +// WhereWidth applies the entql int predicate on the width field. +func (f *BookCoverFilter) WhereWidth(p entql.IntP) { + f.Where(p.Field(bookcover.FieldWidth)) +} + +// WhereHeight applies the entql int predicate on the height field. +func (f *BookCoverFilter) WhereHeight(p entql.IntP) { + f.Where(p.Field(bookcover.FieldHeight)) +} + +// WhereURL applies the entql string predicate on the url field. +func (f *BookCoverFilter) WhereURL(p entql.StringP) { + f.Where(p.Field(bookcover.FieldURL)) +} + +// WhereContentType applies the entql string predicate on the contentType field. +func (f *BookCoverFilter) WhereContentType(p entql.StringP) { + f.Where(p.Field(bookcover.FieldContentType)) +} + +// WhereHasBook applies a predicate to check if query has an edge book. +func (f *BookCoverFilter) WhereHasBook() { + f.Where(entql.HasEdge("book")) +} + +// WhereHasBookWith applies a predicate to check if query has an edge book with a given conditions (other predicates). +func (f *BookCoverFilter) WhereHasBookWith(preds ...predicate.Book) { + f.Where(entql.HasEdgeWith("book", sqlgraph.WrapFunc(func(s *sql.Selector) { + for _, p := range preds { + p(s) + } + }))) +} + // addPredicate implements the predicateAdder interface. func (bfq *BookFileQuery) addPredicate(pred func(s *sql.Selector)) { bfq.predicates = append(bfq.predicates, pred) @@ -826,7 +980,7 @@ type BookFileFilter struct { // Where applies the entql predicate on the query filter. func (f *BookFileFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[2].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[3].Type, p, s); err != nil { s.AddError(err) } }) @@ -910,7 +1064,7 @@ type IdentifierFilter struct { // Where applies the entql predicate on the query filter. func (f *IdentifierFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[3].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[4].Type, p, s); err != nil { s.AddError(err) } }) @@ -989,7 +1143,7 @@ type LanguageFilter struct { // Where applies the entql predicate on the query filter. func (f *LanguageFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[4].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[5].Type, p, s); err != nil { s.AddError(err) } }) @@ -1063,7 +1217,7 @@ type PublisherFilter struct { // Where applies the entql predicate on the query filter. func (f *PublisherFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[5].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[6].Type, p, s); err != nil { s.AddError(err) } }) @@ -1137,7 +1291,7 @@ type SeriesFilter struct { // Where applies the entql predicate on the query filter. func (f *SeriesFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[6].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[7].Type, p, s); err != nil { s.AddError(err) } }) @@ -1216,7 +1370,7 @@ type ShelfFilter struct { // Where applies the entql predicate on the query filter. func (f *ShelfFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[7].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[8].Type, p, s); err != nil { s.AddError(err) } }) @@ -1314,7 +1468,7 @@ type TagFilter struct { // Where applies the entql predicate on the query filter. func (f *TagFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[8].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[9].Type, p, s); err != nil { s.AddError(err) } }) @@ -1378,7 +1532,7 @@ type TaskFilter struct { // Where applies the entql predicate on the query filter. func (f *TaskFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[9].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[10].Type, p, s); err != nil { s.AddError(err) } }) @@ -1477,7 +1631,7 @@ type UserFilter struct { // Where applies the entql predicate on the query filter. func (f *UserFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[10].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[11].Type, p, s); err != nil { s.AddError(err) } }) @@ -1570,7 +1724,7 @@ type UserPermissionsFilter struct { // Where applies the entql predicate on the query filter. func (f *UserPermissionsFilter) Where(p entql.P) { f.addPredicate(func(s *sql.Selector) { - if err := schemaGraph.EvalP(schemaGraph.Nodes[11].Type, p, s); err != nil { + if err := schemaGraph.EvalP(schemaGraph.Nodes[12].Type, p, s); err != nil { s.AddError(err) } }) diff --git a/internal/ent/gql_collection.go b/internal/ent/gql_collection.go index e476c966..5db69033 100644 --- a/internal/ent/gql_collection.go +++ b/internal/ent/gql_collection.go @@ -8,6 +8,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -350,6 +351,18 @@ func (b *BookQuery) collectField(ctx context.Context, opCtx *graphql.OperationCo b.WithNamedFiles(alias, func(wq *BookFileQuery) { *wq = *query }) + case "covers": + var ( + alias = field.Alias + path = append(path, alias) + query = (&BookCoverClient{config: b.config}).Query() + ) + if err := query.collectField(ctx, opCtx, field, path, satisfies...); err != nil { + return err + } + b.WithNamedCovers(alias, func(wq *BookCoverQuery) { + *wq = *query + }) case "createTime": if _, ok := fieldSeen[book.FieldCreateTime]; !ok { selectedFields = append(selectedFields, book.FieldCreateTime) @@ -469,6 +482,140 @@ func newBookPaginateArgs(rv map[string]any) *bookPaginateArgs { return args } +// CollectFields tells the query-builder to eagerly load connected nodes by resolver context. +func (bc *BookCoverQuery) CollectFields(ctx context.Context, satisfies ...string) (*BookCoverQuery, error) { + fc := graphql.GetFieldContext(ctx) + if fc == nil { + return bc, nil + } + if err := bc.collectField(ctx, graphql.GetOperationContext(ctx), fc.Field, nil, satisfies...); err != nil { + return nil, err + } + return bc, nil +} + +func (bc *BookCoverQuery) collectField(ctx context.Context, opCtx *graphql.OperationContext, collected graphql.CollectedField, path []string, satisfies ...string) error { + path = append([]string(nil), path...) + var ( + unknownSeen bool + fieldSeen = make(map[string]struct{}, len(bookcover.Columns)) + selectedFields = []string{bookcover.FieldID} + ) + for _, field := range graphql.CollectFields(opCtx, collected.Selections, satisfies) { + switch field.Name { + case "book": + var ( + alias = field.Alias + path = append(path, alias) + query = (&BookClient{config: bc.config}).Query() + ) + if err := query.collectField(ctx, opCtx, field, path, satisfies...); err != nil { + return err + } + bc.withBook = query + case "createTime": + if _, ok := fieldSeen[bookcover.FieldCreateTime]; !ok { + selectedFields = append(selectedFields, bookcover.FieldCreateTime) + fieldSeen[bookcover.FieldCreateTime] = struct{}{} + } + case "updateTime": + if _, ok := fieldSeen[bookcover.FieldUpdateTime]; !ok { + selectedFields = append(selectedFields, bookcover.FieldUpdateTime) + fieldSeen[bookcover.FieldUpdateTime] = struct{}{} + } + case "path": + if _, ok := fieldSeen[bookcover.FieldPath]; !ok { + selectedFields = append(selectedFields, bookcover.FieldPath) + fieldSeen[bookcover.FieldPath] = struct{}{} + } + case "size": + if _, ok := fieldSeen[bookcover.FieldSize]; !ok { + selectedFields = append(selectedFields, bookcover.FieldSize) + fieldSeen[bookcover.FieldSize] = struct{}{} + } + case "width": + if _, ok := fieldSeen[bookcover.FieldWidth]; !ok { + selectedFields = append(selectedFields, bookcover.FieldWidth) + fieldSeen[bookcover.FieldWidth] = struct{}{} + } + case "height": + if _, ok := fieldSeen[bookcover.FieldHeight]; !ok { + selectedFields = append(selectedFields, bookcover.FieldHeight) + fieldSeen[bookcover.FieldHeight] = struct{}{} + } + case "url": + if _, ok := fieldSeen[bookcover.FieldURL]; !ok { + selectedFields = append(selectedFields, bookcover.FieldURL) + fieldSeen[bookcover.FieldURL] = struct{}{} + } + case "contenttype": + if _, ok := fieldSeen[bookcover.FieldContentType]; !ok { + selectedFields = append(selectedFields, bookcover.FieldContentType) + fieldSeen[bookcover.FieldContentType] = struct{}{} + } + case "id": + case "__typename": + default: + unknownSeen = true + } + } + if !unknownSeen { + bc.Select(selectedFields...) + } + return nil +} + +type bookcoverPaginateArgs struct { + first, last *int + after, before *Cursor + opts []BookCoverPaginateOption +} + +func newBookCoverPaginateArgs(rv map[string]any) *bookcoverPaginateArgs { + args := &bookcoverPaginateArgs{} + if rv == nil { + return args + } + if v := rv[firstField]; v != nil { + args.first = v.(*int) + } + if v := rv[lastField]; v != nil { + args.last = v.(*int) + } + if v := rv[afterField]; v != nil { + args.after = v.(*Cursor) + } + if v := rv[beforeField]; v != nil { + args.before = v.(*Cursor) + } + if v, ok := rv[orderByField]; ok { + switch v := v.(type) { + case map[string]any: + var ( + err1, err2 error + order = &BookCoverOrder{Field: &BookCoverOrderField{}, Direction: entgql.OrderDirectionAsc} + ) + if d, ok := v[directionField]; ok { + err1 = order.Direction.UnmarshalGQL(d) + } + if f, ok := v[fieldField]; ok { + err2 = order.Field.UnmarshalGQL(f) + } + if err1 == nil && err2 == nil { + args.opts = append(args.opts, WithBookCoverOrder(order)) + } + case *BookCoverOrder: + if v != nil { + args.opts = append(args.opts, WithBookCoverOrder(v)) + } + } + } + if v, ok := rv[whereField].(*BookCoverWhereInput); ok { + args.opts = append(args.opts, WithBookCoverFilter(v.Filter)) + } + return args +} + // CollectFields tells the query-builder to eagerly load connected nodes by resolver context. func (bf *BookFileQuery) CollectFields(ctx context.Context, satisfies ...string) (*BookFileQuery, error) { fc := graphql.GetFieldContext(ctx) diff --git a/internal/ent/gql_edge.go b/internal/ent/gql_edge.go index fa3c2164..335ce45a 100644 --- a/internal/ent/gql_edge.go +++ b/internal/ent/gql_edge.go @@ -125,6 +125,26 @@ func (b *Book) Files(ctx context.Context) (result []*BookFile, err error) { return result, err } +func (b *Book) Covers(ctx context.Context) (result []*BookCover, err error) { + if fc := graphql.GetFieldContext(ctx); fc != nil && fc.Field.Alias != "" { + result, err = b.NamedCovers(graphql.GetFieldContext(ctx).Field.Alias) + } else { + result, err = b.Edges.CoversOrErr() + } + if IsNotLoaded(err) { + result, err = b.QueryCovers().All(ctx) + } + return result, err +} + +func (bc *BookCover) Book(ctx context.Context) (*Book, error) { + result, err := bc.Edges.BookOrErr() + if IsNotLoaded(err) { + result, err = bc.QueryBook().Only(ctx) + } + return result, err +} + func (bf *BookFile) Book(ctx context.Context) (*Book, error) { result, err := bf.Edges.BookOrErr() if IsNotLoaded(err) { diff --git a/internal/ent/gql_mutation_input.go b/internal/ent/gql_mutation_input.go index 94e9cc88..eaa9e762 100644 --- a/internal/ent/gql_mutation_input.go +++ b/internal/ent/gql_mutation_input.go @@ -125,6 +125,7 @@ type CreateBookInput struct { LanguageIDs []ksuid.ID ShelfIDs []ksuid.ID FileIDs []ksuid.ID + CoverIDs []ksuid.ID } // Mutate applies the CreateBookInput on the BookMutation builder. @@ -177,6 +178,9 @@ func (i *CreateBookInput) Mutate(m *BookMutation) { if v := i.FileIDs; len(v) > 0 { m.AddFileIDs(v...) } + if v := i.CoverIDs; len(v) > 0 { + m.AddCoverIDs(v...) + } } // SetInput applies the change-set in the CreateBookInput on the BookCreate builder. @@ -225,6 +229,9 @@ type UpdateBookInput struct { ClearFiles bool AddFileIDs []ksuid.ID RemoveFileIDs []ksuid.ID + ClearCovers bool + AddCoverIDs []ksuid.ID + RemoveCoverIDs []ksuid.ID } // Mutate applies the UpdateBookInput on the BookMutation builder. @@ -343,6 +350,15 @@ func (i *UpdateBookInput) Mutate(m *BookMutation) { if v := i.RemoveFileIDs; len(v) > 0 { m.RemoveFileIDs(v...) } + if i.ClearCovers { + m.ClearCovers() + } + if v := i.AddCoverIDs; len(v) > 0 { + m.AddCoverIDs(v...) + } + if v := i.RemoveCoverIDs; len(v) > 0 { + m.RemoveCoverIDs(v...) + } } // SetInput applies the change-set in the UpdateBookInput on the BookUpdate builder. diff --git a/internal/ent/gql_node.go b/internal/ent/gql_node.go index bbdb56cf..471eecfd 100644 --- a/internal/ent/gql_node.go +++ b/internal/ent/gql_node.go @@ -7,6 +7,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -35,6 +36,9 @@ func (n *Author) IsNode() {} // IsNode implements the Node interface check for GQLGen. func (n *Book) IsNode() {} +// IsNode implements the Node interface check for GQLGen. +func (n *BookCover) IsNode() {} + // IsNode implements the Node interface check for GQLGen. func (n *BookFile) IsNode() {} @@ -155,6 +159,22 @@ func (c *Client) noder(ctx context.Context, table string, id ksuid.ID) (Noder, e return nil, err } return n, nil + case bookcover.Table: + var uid ksuid.ID + if err := uid.UnmarshalGQL(id); err != nil { + return nil, err + } + query := c.BookCover.Query(). + Where(bookcover.ID(uid)) + query, err := query.CollectFields(ctx, "BookCover") + if err != nil { + return nil, err + } + n, err := query.Only(ctx) + if err != nil { + return nil, err + } + return n, nil case bookfile.Table: var uid ksuid.ID if err := uid.UnmarshalGQL(id); err != nil { @@ -420,6 +440,22 @@ func (c *Client) noders(ctx context.Context, table string, ids []ksuid.ID) ([]No *noder = node } } + case bookcover.Table: + query := c.BookCover.Query(). + Where(bookcover.IDIn(ids...)) + query, err := query.CollectFields(ctx, "BookCover") + if err != nil { + return nil, err + } + nodes, err := query.All(ctx) + if err != nil { + return nil, err + } + for _, node := range nodes { + for _, noder := range idmap[node.ID] { + *noder = node + } + } case bookfile.Table: query := c.BookFile.Query(). Where(bookfile.IDIn(ids...)) diff --git a/internal/ent/gql_pagination.go b/internal/ent/gql_pagination.go index 0423fe3f..88fc486f 100644 --- a/internal/ent/gql_pagination.go +++ b/internal/ent/gql_pagination.go @@ -9,6 +9,7 @@ import ( "io" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -894,6 +895,299 @@ func (b *Book) ToEdge(order *BookOrder) *BookEdge { } } +// BookCoverEdge is the edge representation of BookCover. +type BookCoverEdge struct { + Node *BookCover `json:"node"` + Cursor Cursor `json:"cursor"` +} + +// BookCoverConnection is the connection containing edges to BookCover. +type BookCoverConnection struct { + Edges []*BookCoverEdge `json:"edges"` + PageInfo PageInfo `json:"pageInfo"` + TotalCount int `json:"totalCount"` +} + +func (c *BookCoverConnection) build(nodes []*BookCover, pager *bookcoverPager, after *Cursor, first *int, before *Cursor, last *int) { + c.PageInfo.HasNextPage = before != nil + c.PageInfo.HasPreviousPage = after != nil + if first != nil && *first+1 == len(nodes) { + c.PageInfo.HasNextPage = true + nodes = nodes[:len(nodes)-1] + } else if last != nil && *last+1 == len(nodes) { + c.PageInfo.HasPreviousPage = true + nodes = nodes[:len(nodes)-1] + } + var nodeAt func(int) *BookCover + if last != nil { + n := len(nodes) - 1 + nodeAt = func(i int) *BookCover { + return nodes[n-i] + } + } else { + nodeAt = func(i int) *BookCover { + return nodes[i] + } + } + c.Edges = make([]*BookCoverEdge, len(nodes)) + for i := range nodes { + node := nodeAt(i) + c.Edges[i] = &BookCoverEdge{ + Node: node, + Cursor: pager.toCursor(node), + } + } + if l := len(c.Edges); l > 0 { + c.PageInfo.StartCursor = &c.Edges[0].Cursor + c.PageInfo.EndCursor = &c.Edges[l-1].Cursor + } + if c.TotalCount == 0 { + c.TotalCount = len(nodes) + } +} + +// BookCoverPaginateOption enables pagination customization. +type BookCoverPaginateOption func(*bookcoverPager) error + +// WithBookCoverOrder configures pagination ordering. +func WithBookCoverOrder(order *BookCoverOrder) BookCoverPaginateOption { + if order == nil { + order = DefaultBookCoverOrder + } + o := *order + return func(pager *bookcoverPager) error { + if err := o.Direction.Validate(); err != nil { + return err + } + if o.Field == nil { + o.Field = DefaultBookCoverOrder.Field + } + pager.order = &o + return nil + } +} + +// WithBookCoverFilter configures pagination filter. +func WithBookCoverFilter(filter func(*BookCoverQuery) (*BookCoverQuery, error)) BookCoverPaginateOption { + return func(pager *bookcoverPager) error { + if filter == nil { + return errors.New("BookCoverQuery filter cannot be nil") + } + pager.filter = filter + return nil + } +} + +type bookcoverPager struct { + reverse bool + order *BookCoverOrder + filter func(*BookCoverQuery) (*BookCoverQuery, error) +} + +func newBookCoverPager(opts []BookCoverPaginateOption, reverse bool) (*bookcoverPager, error) { + pager := &bookcoverPager{reverse: reverse} + for _, opt := range opts { + if err := opt(pager); err != nil { + return nil, err + } + } + if pager.order == nil { + pager.order = DefaultBookCoverOrder + } + return pager, nil +} + +func (p *bookcoverPager) applyFilter(query *BookCoverQuery) (*BookCoverQuery, error) { + if p.filter != nil { + return p.filter(query) + } + return query, nil +} + +func (p *bookcoverPager) toCursor(bc *BookCover) Cursor { + return p.order.Field.toCursor(bc) +} + +func (p *bookcoverPager) applyCursors(query *BookCoverQuery, after, before *Cursor) (*BookCoverQuery, error) { + direction := p.order.Direction + if p.reverse { + direction = direction.Reverse() + } + for _, predicate := range entgql.CursorsPredicate(after, before, DefaultBookCoverOrder.Field.column, p.order.Field.column, direction) { + query = query.Where(predicate) + } + return query, nil +} + +func (p *bookcoverPager) applyOrder(query *BookCoverQuery) *BookCoverQuery { + direction := p.order.Direction + if p.reverse { + direction = direction.Reverse() + } + query = query.Order(p.order.Field.toTerm(direction.OrderTermOption())) + if p.order.Field != DefaultBookCoverOrder.Field { + query = query.Order(DefaultBookCoverOrder.Field.toTerm(direction.OrderTermOption())) + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(p.order.Field.column) + } + return query +} + +func (p *bookcoverPager) orderExpr(query *BookCoverQuery) sql.Querier { + direction := p.order.Direction + if p.reverse { + direction = direction.Reverse() + } + if len(query.ctx.Fields) > 0 { + query.ctx.AppendFieldOnce(p.order.Field.column) + } + return sql.ExprFunc(func(b *sql.Builder) { + b.Ident(p.order.Field.column).Pad().WriteString(string(direction)) + if p.order.Field != DefaultBookCoverOrder.Field { + b.Comma().Ident(DefaultBookCoverOrder.Field.column).Pad().WriteString(string(direction)) + } + }) +} + +// Paginate executes the query and returns a relay based cursor connection to BookCover. +func (bc *BookCoverQuery) Paginate( + ctx context.Context, after *Cursor, first *int, + before *Cursor, last *int, opts ...BookCoverPaginateOption, +) (*BookCoverConnection, error) { + if err := validateFirstLast(first, last); err != nil { + return nil, err + } + pager, err := newBookCoverPager(opts, last != nil) + if err != nil { + return nil, err + } + if bc, err = pager.applyFilter(bc); err != nil { + return nil, err + } + conn := &BookCoverConnection{Edges: []*BookCoverEdge{}} + ignoredEdges := !hasCollectedField(ctx, edgesField) + if hasCollectedField(ctx, totalCountField) || hasCollectedField(ctx, pageInfoField) { + hasPagination := after != nil || first != nil || before != nil || last != nil + if hasPagination || ignoredEdges { + if conn.TotalCount, err = bc.Clone().Count(ctx); err != nil { + return nil, err + } + conn.PageInfo.HasNextPage = first != nil && conn.TotalCount > 0 + conn.PageInfo.HasPreviousPage = last != nil && conn.TotalCount > 0 + } + } + if ignoredEdges || (first != nil && *first == 0) || (last != nil && *last == 0) { + return conn, nil + } + if bc, err = pager.applyCursors(bc, after, before); err != nil { + return nil, err + } + if limit := paginateLimit(first, last); limit != 0 { + bc.Limit(limit) + } + if field := collectedField(ctx, edgesField, nodeField); field != nil { + if err := bc.collectField(ctx, graphql.GetOperationContext(ctx), *field, []string{edgesField, nodeField}); err != nil { + return nil, err + } + } + bc = pager.applyOrder(bc) + nodes, err := bc.All(ctx) + if err != nil { + return nil, err + } + conn.build(nodes, pager, after, first, before, last) + return conn, nil +} + +var ( + // BookCoverOrderFieldSize orders BookCover by size. + BookCoverOrderFieldSize = &BookCoverOrderField{ + Value: func(bc *BookCover) (ent.Value, error) { + return bc.Size, nil + }, + column: bookcover.FieldSize, + toTerm: bookcover.BySize, + toCursor: func(bc *BookCover) Cursor { + return Cursor{ + ID: bc.ID, + Value: bc.Size, + } + }, + } +) + +// String implement fmt.Stringer interface. +func (f BookCoverOrderField) String() string { + var str string + switch f.column { + case BookCoverOrderFieldSize.column: + str = "SIZE" + } + return str +} + +// MarshalGQL implements graphql.Marshaler interface. +func (f BookCoverOrderField) MarshalGQL(w io.Writer) { + io.WriteString(w, strconv.Quote(f.String())) +} + +// UnmarshalGQL implements graphql.Unmarshaler interface. +func (f *BookCoverOrderField) UnmarshalGQL(v interface{}) error { + str, ok := v.(string) + if !ok { + return fmt.Errorf("BookCoverOrderField %T must be a string", v) + } + switch str { + case "SIZE": + *f = *BookCoverOrderFieldSize + default: + return fmt.Errorf("%s is not a valid BookCoverOrderField", str) + } + return nil +} + +// BookCoverOrderField defines the ordering field of BookCover. +type BookCoverOrderField struct { + // Value extracts the ordering value from the given BookCover. + Value func(*BookCover) (ent.Value, error) + column string // field or computed. + toTerm func(...sql.OrderTermOption) bookcover.OrderOption + toCursor func(*BookCover) Cursor +} + +// BookCoverOrder defines the ordering of BookCover. +type BookCoverOrder struct { + Direction OrderDirection `json:"direction"` + Field *BookCoverOrderField `json:"field"` +} + +// DefaultBookCoverOrder is the default ordering of BookCover. +var DefaultBookCoverOrder = &BookCoverOrder{ + Direction: entgql.OrderDirectionAsc, + Field: &BookCoverOrderField{ + Value: func(bc *BookCover) (ent.Value, error) { + return bc.ID, nil + }, + column: bookcover.FieldID, + toTerm: bookcover.ByID, + toCursor: func(bc *BookCover) Cursor { + return Cursor{ID: bc.ID} + }, + }, +} + +// ToEdge converts BookCover into BookCoverEdge. +func (bc *BookCover) ToEdge(order *BookCoverOrder) *BookCoverEdge { + if order == nil { + order = DefaultBookCoverOrder + } + return &BookCoverEdge{ + Node: bc, + Cursor: order.Field.toCursor(bc), + } +} + // BookFileEdge is the edge representation of BookFile. type BookFileEdge struct { Node *BookFile `json:"node"` diff --git a/internal/ent/gql_where_input.go b/internal/ent/gql_where_input.go index 9524c8f3..be0b07cc 100644 --- a/internal/ent/gql_where_input.go +++ b/internal/ent/gql_where_input.go @@ -7,6 +7,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -633,6 +634,10 @@ type BookWhereInput struct { // "files" edge predicates. HasFiles *bool `json:"hasFiles,omitempty"` HasFilesWith []*BookFileWhereInput `json:"hasFilesWith,omitempty"` + + // "covers" edge predicates. + HasCovers *bool `json:"hasCovers,omitempty"` + HasCoversWith []*BookCoverWhereInput `json:"hasCoversWith,omitempty"` } // AddPredicates adds custom predicates to the where input to be used during the filtering phase. @@ -1220,6 +1225,24 @@ func (i *BookWhereInput) P() (predicate.Book, error) { } predicates = append(predicates, book.HasFilesWith(with...)) } + if i.HasCovers != nil { + p := book.HasCovers() + if !*i.HasCovers { + p = book.Not(p) + } + predicates = append(predicates, p) + } + if len(i.HasCoversWith) > 0 { + with := make([]predicate.BookCover, 0, len(i.HasCoversWith)) + for _, w := range i.HasCoversWith { + p, err := w.P() + if err != nil { + return nil, fmt.Errorf("%w: field 'HasCoversWith'", err) + } + with = append(with, p) + } + predicates = append(predicates, book.HasCoversWith(with...)) + } switch len(predicates) { case 0: return nil, ErrEmptyBookWhereInput @@ -1230,6 +1253,484 @@ func (i *BookWhereInput) P() (predicate.Book, error) { } } +// BookCoverWhereInput represents a where input for filtering BookCover queries. +type BookCoverWhereInput struct { + Predicates []predicate.BookCover `json:"-"` + Not *BookCoverWhereInput `json:"not,omitempty"` + Or []*BookCoverWhereInput `json:"or,omitempty"` + And []*BookCoverWhereInput `json:"and,omitempty"` + + // "id" field predicates. + ID *ksuid.ID `json:"id,omitempty"` + IDNEQ *ksuid.ID `json:"idNEQ,omitempty"` + IDIn []ksuid.ID `json:"idIn,omitempty"` + IDNotIn []ksuid.ID `json:"idNotIn,omitempty"` + IDGT *ksuid.ID `json:"idGT,omitempty"` + IDGTE *ksuid.ID `json:"idGTE,omitempty"` + IDLT *ksuid.ID `json:"idLT,omitempty"` + IDLTE *ksuid.ID `json:"idLTE,omitempty"` + + // "create_time" field predicates. + CreateTime *time.Time `json:"createTime,omitempty"` + CreateTimeNEQ *time.Time `json:"createTimeNEQ,omitempty"` + CreateTimeIn []time.Time `json:"createTimeIn,omitempty"` + CreateTimeNotIn []time.Time `json:"createTimeNotIn,omitempty"` + CreateTimeGT *time.Time `json:"createTimeGT,omitempty"` + CreateTimeGTE *time.Time `json:"createTimeGTE,omitempty"` + CreateTimeLT *time.Time `json:"createTimeLT,omitempty"` + CreateTimeLTE *time.Time `json:"createTimeLTE,omitempty"` + + // "update_time" field predicates. + UpdateTime *time.Time `json:"updateTime,omitempty"` + UpdateTimeNEQ *time.Time `json:"updateTimeNEQ,omitempty"` + UpdateTimeIn []time.Time `json:"updateTimeIn,omitempty"` + UpdateTimeNotIn []time.Time `json:"updateTimeNotIn,omitempty"` + UpdateTimeGT *time.Time `json:"updateTimeGT,omitempty"` + UpdateTimeGTE *time.Time `json:"updateTimeGTE,omitempty"` + UpdateTimeLT *time.Time `json:"updateTimeLT,omitempty"` + UpdateTimeLTE *time.Time `json:"updateTimeLTE,omitempty"` + + // "path" field predicates. + Path *string `json:"path,omitempty"` + PathNEQ *string `json:"pathNEQ,omitempty"` + PathIn []string `json:"pathIn,omitempty"` + PathNotIn []string `json:"pathNotIn,omitempty"` + PathGT *string `json:"pathGT,omitempty"` + PathGTE *string `json:"pathGTE,omitempty"` + PathLT *string `json:"pathLT,omitempty"` + PathLTE *string `json:"pathLTE,omitempty"` + PathContains *string `json:"pathContains,omitempty"` + PathHasPrefix *string `json:"pathHasPrefix,omitempty"` + PathHasSuffix *string `json:"pathHasSuffix,omitempty"` + PathEqualFold *string `json:"pathEqualFold,omitempty"` + PathContainsFold *string `json:"pathContainsFold,omitempty"` + + // "size" field predicates. + Size *int64 `json:"size,omitempty"` + SizeNEQ *int64 `json:"sizeNEQ,omitempty"` + SizeIn []int64 `json:"sizeIn,omitempty"` + SizeNotIn []int64 `json:"sizeNotIn,omitempty"` + SizeGT *int64 `json:"sizeGT,omitempty"` + SizeGTE *int64 `json:"sizeGTE,omitempty"` + SizeLT *int64 `json:"sizeLT,omitempty"` + SizeLTE *int64 `json:"sizeLTE,omitempty"` + + // "width" field predicates. + Width *int `json:"width,omitempty"` + WidthNEQ *int `json:"widthNEQ,omitempty"` + WidthIn []int `json:"widthIn,omitempty"` + WidthNotIn []int `json:"widthNotIn,omitempty"` + WidthGT *int `json:"widthGT,omitempty"` + WidthGTE *int `json:"widthGTE,omitempty"` + WidthLT *int `json:"widthLT,omitempty"` + WidthLTE *int `json:"widthLTE,omitempty"` + + // "height" field predicates. + Height *int `json:"height,omitempty"` + HeightNEQ *int `json:"heightNEQ,omitempty"` + HeightIn []int `json:"heightIn,omitempty"` + HeightNotIn []int `json:"heightNotIn,omitempty"` + HeightGT *int `json:"heightGT,omitempty"` + HeightGTE *int `json:"heightGTE,omitempty"` + HeightLT *int `json:"heightLT,omitempty"` + HeightLTE *int `json:"heightLTE,omitempty"` + + // "url" field predicates. + URL *string `json:"url,omitempty"` + URLNEQ *string `json:"urlNEQ,omitempty"` + URLIn []string `json:"urlIn,omitempty"` + URLNotIn []string `json:"urlNotIn,omitempty"` + URLGT *string `json:"urlGT,omitempty"` + URLGTE *string `json:"urlGTE,omitempty"` + URLLT *string `json:"urlLT,omitempty"` + URLLTE *string `json:"urlLTE,omitempty"` + URLContains *string `json:"urlContains,omitempty"` + URLHasPrefix *string `json:"urlHasPrefix,omitempty"` + URLHasSuffix *string `json:"urlHasSuffix,omitempty"` + URLEqualFold *string `json:"urlEqualFold,omitempty"` + URLContainsFold *string `json:"urlContainsFold,omitempty"` + + // "contentType" field predicates. + ContentType *string `json:"contenttype,omitempty"` + ContentTypeNEQ *string `json:"contenttypeNEQ,omitempty"` + ContentTypeIn []string `json:"contenttypeIn,omitempty"` + ContentTypeNotIn []string `json:"contenttypeNotIn,omitempty"` + ContentTypeGT *string `json:"contenttypeGT,omitempty"` + ContentTypeGTE *string `json:"contenttypeGTE,omitempty"` + ContentTypeLT *string `json:"contenttypeLT,omitempty"` + ContentTypeLTE *string `json:"contenttypeLTE,omitempty"` + ContentTypeContains *string `json:"contenttypeContains,omitempty"` + ContentTypeHasPrefix *string `json:"contenttypeHasPrefix,omitempty"` + ContentTypeHasSuffix *string `json:"contenttypeHasSuffix,omitempty"` + ContentTypeEqualFold *string `json:"contenttypeEqualFold,omitempty"` + ContentTypeContainsFold *string `json:"contenttypeContainsFold,omitempty"` + + // "book" edge predicates. + HasBook *bool `json:"hasBook,omitempty"` + HasBookWith []*BookWhereInput `json:"hasBookWith,omitempty"` +} + +// AddPredicates adds custom predicates to the where input to be used during the filtering phase. +func (i *BookCoverWhereInput) AddPredicates(predicates ...predicate.BookCover) { + i.Predicates = append(i.Predicates, predicates...) +} + +// Filter applies the BookCoverWhereInput filter on the BookCoverQuery builder. +func (i *BookCoverWhereInput) Filter(q *BookCoverQuery) (*BookCoverQuery, error) { + if i == nil { + return q, nil + } + p, err := i.P() + if err != nil { + if err == ErrEmptyBookCoverWhereInput { + return q, nil + } + return nil, err + } + return q.Where(p), nil +} + +// ErrEmptyBookCoverWhereInput is returned in case the BookCoverWhereInput is empty. +var ErrEmptyBookCoverWhereInput = errors.New("ent: empty predicate BookCoverWhereInput") + +// P returns a predicate for filtering bookcovers. +// An error is returned if the input is empty or invalid. +func (i *BookCoverWhereInput) P() (predicate.BookCover, error) { + var predicates []predicate.BookCover + if i.Not != nil { + p, err := i.Not.P() + if err != nil { + return nil, fmt.Errorf("%w: field 'not'", err) + } + predicates = append(predicates, bookcover.Not(p)) + } + switch n := len(i.Or); { + case n == 1: + p, err := i.Or[0].P() + if err != nil { + return nil, fmt.Errorf("%w: field 'or'", err) + } + predicates = append(predicates, p) + case n > 1: + or := make([]predicate.BookCover, 0, n) + for _, w := range i.Or { + p, err := w.P() + if err != nil { + return nil, fmt.Errorf("%w: field 'or'", err) + } + or = append(or, p) + } + predicates = append(predicates, bookcover.Or(or...)) + } + switch n := len(i.And); { + case n == 1: + p, err := i.And[0].P() + if err != nil { + return nil, fmt.Errorf("%w: field 'and'", err) + } + predicates = append(predicates, p) + case n > 1: + and := make([]predicate.BookCover, 0, n) + for _, w := range i.And { + p, err := w.P() + if err != nil { + return nil, fmt.Errorf("%w: field 'and'", err) + } + and = append(and, p) + } + predicates = append(predicates, bookcover.And(and...)) + } + predicates = append(predicates, i.Predicates...) + if i.ID != nil { + predicates = append(predicates, bookcover.IDEQ(*i.ID)) + } + if i.IDNEQ != nil { + predicates = append(predicates, bookcover.IDNEQ(*i.IDNEQ)) + } + if len(i.IDIn) > 0 { + predicates = append(predicates, bookcover.IDIn(i.IDIn...)) + } + if len(i.IDNotIn) > 0 { + predicates = append(predicates, bookcover.IDNotIn(i.IDNotIn...)) + } + if i.IDGT != nil { + predicates = append(predicates, bookcover.IDGT(*i.IDGT)) + } + if i.IDGTE != nil { + predicates = append(predicates, bookcover.IDGTE(*i.IDGTE)) + } + if i.IDLT != nil { + predicates = append(predicates, bookcover.IDLT(*i.IDLT)) + } + if i.IDLTE != nil { + predicates = append(predicates, bookcover.IDLTE(*i.IDLTE)) + } + if i.CreateTime != nil { + predicates = append(predicates, bookcover.CreateTimeEQ(*i.CreateTime)) + } + if i.CreateTimeNEQ != nil { + predicates = append(predicates, bookcover.CreateTimeNEQ(*i.CreateTimeNEQ)) + } + if len(i.CreateTimeIn) > 0 { + predicates = append(predicates, bookcover.CreateTimeIn(i.CreateTimeIn...)) + } + if len(i.CreateTimeNotIn) > 0 { + predicates = append(predicates, bookcover.CreateTimeNotIn(i.CreateTimeNotIn...)) + } + if i.CreateTimeGT != nil { + predicates = append(predicates, bookcover.CreateTimeGT(*i.CreateTimeGT)) + } + if i.CreateTimeGTE != nil { + predicates = append(predicates, bookcover.CreateTimeGTE(*i.CreateTimeGTE)) + } + if i.CreateTimeLT != nil { + predicates = append(predicates, bookcover.CreateTimeLT(*i.CreateTimeLT)) + } + if i.CreateTimeLTE != nil { + predicates = append(predicates, bookcover.CreateTimeLTE(*i.CreateTimeLTE)) + } + if i.UpdateTime != nil { + predicates = append(predicates, bookcover.UpdateTimeEQ(*i.UpdateTime)) + } + if i.UpdateTimeNEQ != nil { + predicates = append(predicates, bookcover.UpdateTimeNEQ(*i.UpdateTimeNEQ)) + } + if len(i.UpdateTimeIn) > 0 { + predicates = append(predicates, bookcover.UpdateTimeIn(i.UpdateTimeIn...)) + } + if len(i.UpdateTimeNotIn) > 0 { + predicates = append(predicates, bookcover.UpdateTimeNotIn(i.UpdateTimeNotIn...)) + } + if i.UpdateTimeGT != nil { + predicates = append(predicates, bookcover.UpdateTimeGT(*i.UpdateTimeGT)) + } + if i.UpdateTimeGTE != nil { + predicates = append(predicates, bookcover.UpdateTimeGTE(*i.UpdateTimeGTE)) + } + if i.UpdateTimeLT != nil { + predicates = append(predicates, bookcover.UpdateTimeLT(*i.UpdateTimeLT)) + } + if i.UpdateTimeLTE != nil { + predicates = append(predicates, bookcover.UpdateTimeLTE(*i.UpdateTimeLTE)) + } + if i.Path != nil { + predicates = append(predicates, bookcover.PathEQ(*i.Path)) + } + if i.PathNEQ != nil { + predicates = append(predicates, bookcover.PathNEQ(*i.PathNEQ)) + } + if len(i.PathIn) > 0 { + predicates = append(predicates, bookcover.PathIn(i.PathIn...)) + } + if len(i.PathNotIn) > 0 { + predicates = append(predicates, bookcover.PathNotIn(i.PathNotIn...)) + } + if i.PathGT != nil { + predicates = append(predicates, bookcover.PathGT(*i.PathGT)) + } + if i.PathGTE != nil { + predicates = append(predicates, bookcover.PathGTE(*i.PathGTE)) + } + if i.PathLT != nil { + predicates = append(predicates, bookcover.PathLT(*i.PathLT)) + } + if i.PathLTE != nil { + predicates = append(predicates, bookcover.PathLTE(*i.PathLTE)) + } + if i.PathContains != nil { + predicates = append(predicates, bookcover.PathContains(*i.PathContains)) + } + if i.PathHasPrefix != nil { + predicates = append(predicates, bookcover.PathHasPrefix(*i.PathHasPrefix)) + } + if i.PathHasSuffix != nil { + predicates = append(predicates, bookcover.PathHasSuffix(*i.PathHasSuffix)) + } + if i.PathEqualFold != nil { + predicates = append(predicates, bookcover.PathEqualFold(*i.PathEqualFold)) + } + if i.PathContainsFold != nil { + predicates = append(predicates, bookcover.PathContainsFold(*i.PathContainsFold)) + } + if i.Size != nil { + predicates = append(predicates, bookcover.SizeEQ(*i.Size)) + } + if i.SizeNEQ != nil { + predicates = append(predicates, bookcover.SizeNEQ(*i.SizeNEQ)) + } + if len(i.SizeIn) > 0 { + predicates = append(predicates, bookcover.SizeIn(i.SizeIn...)) + } + if len(i.SizeNotIn) > 0 { + predicates = append(predicates, bookcover.SizeNotIn(i.SizeNotIn...)) + } + if i.SizeGT != nil { + predicates = append(predicates, bookcover.SizeGT(*i.SizeGT)) + } + if i.SizeGTE != nil { + predicates = append(predicates, bookcover.SizeGTE(*i.SizeGTE)) + } + if i.SizeLT != nil { + predicates = append(predicates, bookcover.SizeLT(*i.SizeLT)) + } + if i.SizeLTE != nil { + predicates = append(predicates, bookcover.SizeLTE(*i.SizeLTE)) + } + if i.Width != nil { + predicates = append(predicates, bookcover.WidthEQ(*i.Width)) + } + if i.WidthNEQ != nil { + predicates = append(predicates, bookcover.WidthNEQ(*i.WidthNEQ)) + } + if len(i.WidthIn) > 0 { + predicates = append(predicates, bookcover.WidthIn(i.WidthIn...)) + } + if len(i.WidthNotIn) > 0 { + predicates = append(predicates, bookcover.WidthNotIn(i.WidthNotIn...)) + } + if i.WidthGT != nil { + predicates = append(predicates, bookcover.WidthGT(*i.WidthGT)) + } + if i.WidthGTE != nil { + predicates = append(predicates, bookcover.WidthGTE(*i.WidthGTE)) + } + if i.WidthLT != nil { + predicates = append(predicates, bookcover.WidthLT(*i.WidthLT)) + } + if i.WidthLTE != nil { + predicates = append(predicates, bookcover.WidthLTE(*i.WidthLTE)) + } + if i.Height != nil { + predicates = append(predicates, bookcover.HeightEQ(*i.Height)) + } + if i.HeightNEQ != nil { + predicates = append(predicates, bookcover.HeightNEQ(*i.HeightNEQ)) + } + if len(i.HeightIn) > 0 { + predicates = append(predicates, bookcover.HeightIn(i.HeightIn...)) + } + if len(i.HeightNotIn) > 0 { + predicates = append(predicates, bookcover.HeightNotIn(i.HeightNotIn...)) + } + if i.HeightGT != nil { + predicates = append(predicates, bookcover.HeightGT(*i.HeightGT)) + } + if i.HeightGTE != nil { + predicates = append(predicates, bookcover.HeightGTE(*i.HeightGTE)) + } + if i.HeightLT != nil { + predicates = append(predicates, bookcover.HeightLT(*i.HeightLT)) + } + if i.HeightLTE != nil { + predicates = append(predicates, bookcover.HeightLTE(*i.HeightLTE)) + } + if i.URL != nil { + predicates = append(predicates, bookcover.URLEQ(*i.URL)) + } + if i.URLNEQ != nil { + predicates = append(predicates, bookcover.URLNEQ(*i.URLNEQ)) + } + if len(i.URLIn) > 0 { + predicates = append(predicates, bookcover.URLIn(i.URLIn...)) + } + if len(i.URLNotIn) > 0 { + predicates = append(predicates, bookcover.URLNotIn(i.URLNotIn...)) + } + if i.URLGT != nil { + predicates = append(predicates, bookcover.URLGT(*i.URLGT)) + } + if i.URLGTE != nil { + predicates = append(predicates, bookcover.URLGTE(*i.URLGTE)) + } + if i.URLLT != nil { + predicates = append(predicates, bookcover.URLLT(*i.URLLT)) + } + if i.URLLTE != nil { + predicates = append(predicates, bookcover.URLLTE(*i.URLLTE)) + } + if i.URLContains != nil { + predicates = append(predicates, bookcover.URLContains(*i.URLContains)) + } + if i.URLHasPrefix != nil { + predicates = append(predicates, bookcover.URLHasPrefix(*i.URLHasPrefix)) + } + if i.URLHasSuffix != nil { + predicates = append(predicates, bookcover.URLHasSuffix(*i.URLHasSuffix)) + } + if i.URLEqualFold != nil { + predicates = append(predicates, bookcover.URLEqualFold(*i.URLEqualFold)) + } + if i.URLContainsFold != nil { + predicates = append(predicates, bookcover.URLContainsFold(*i.URLContainsFold)) + } + if i.ContentType != nil { + predicates = append(predicates, bookcover.ContentTypeEQ(*i.ContentType)) + } + if i.ContentTypeNEQ != nil { + predicates = append(predicates, bookcover.ContentTypeNEQ(*i.ContentTypeNEQ)) + } + if len(i.ContentTypeIn) > 0 { + predicates = append(predicates, bookcover.ContentTypeIn(i.ContentTypeIn...)) + } + if len(i.ContentTypeNotIn) > 0 { + predicates = append(predicates, bookcover.ContentTypeNotIn(i.ContentTypeNotIn...)) + } + if i.ContentTypeGT != nil { + predicates = append(predicates, bookcover.ContentTypeGT(*i.ContentTypeGT)) + } + if i.ContentTypeGTE != nil { + predicates = append(predicates, bookcover.ContentTypeGTE(*i.ContentTypeGTE)) + } + if i.ContentTypeLT != nil { + predicates = append(predicates, bookcover.ContentTypeLT(*i.ContentTypeLT)) + } + if i.ContentTypeLTE != nil { + predicates = append(predicates, bookcover.ContentTypeLTE(*i.ContentTypeLTE)) + } + if i.ContentTypeContains != nil { + predicates = append(predicates, bookcover.ContentTypeContains(*i.ContentTypeContains)) + } + if i.ContentTypeHasPrefix != nil { + predicates = append(predicates, bookcover.ContentTypeHasPrefix(*i.ContentTypeHasPrefix)) + } + if i.ContentTypeHasSuffix != nil { + predicates = append(predicates, bookcover.ContentTypeHasSuffix(*i.ContentTypeHasSuffix)) + } + if i.ContentTypeEqualFold != nil { + predicates = append(predicates, bookcover.ContentTypeEqualFold(*i.ContentTypeEqualFold)) + } + if i.ContentTypeContainsFold != nil { + predicates = append(predicates, bookcover.ContentTypeContainsFold(*i.ContentTypeContainsFold)) + } + + if i.HasBook != nil { + p := bookcover.HasBook() + if !*i.HasBook { + p = bookcover.Not(p) + } + predicates = append(predicates, p) + } + if len(i.HasBookWith) > 0 { + with := make([]predicate.Book, 0, len(i.HasBookWith)) + for _, w := range i.HasBookWith { + p, err := w.P() + if err != nil { + return nil, fmt.Errorf("%w: field 'HasBookWith'", err) + } + with = append(with, p) + } + predicates = append(predicates, bookcover.HasBookWith(with...)) + } + switch len(predicates) { + case 0: + return nil, ErrEmptyBookCoverWhereInput + case 1: + return predicates[0], nil + default: + return bookcover.And(predicates...), nil + } +} + // BookFileWhereInput represents a where input for filtering BookFile queries. type BookFileWhereInput struct { Predicates []predicate.BookFile `json:"-"` diff --git a/internal/ent/hook/hook.go b/internal/ent/hook/hook.go index caf286f4..7b80bdc8 100644 --- a/internal/ent/hook/hook.go +++ b/internal/ent/hook/hook.go @@ -32,6 +32,18 @@ func (f BookFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BookMutation", m) } +// The BookCoverFunc type is an adapter to allow the use of ordinary +// function as BookCover mutator. +type BookCoverFunc func(context.Context, *ent.BookCoverMutation) (ent.Value, error) + +// Mutate calls f(ctx, m). +func (f BookCoverFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if mv, ok := m.(*ent.BookCoverMutation); ok { + return f(ctx, mv) + } + return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BookCoverMutation", m) +} + // The BookFileFunc type is an adapter to allow the use of ordinary // function as BookFile mutator. type BookFileFunc func(context.Context, *ent.BookFileMutation) (ent.Value, error) diff --git a/internal/ent/internal/schema.go b/internal/ent/internal/schema.go index 5d8f23e7..80e3318b 100644 --- a/internal/ent/internal/schema.go +++ b/internal/ent/internal/schema.go @@ -6,4 +6,4 @@ // Package internal holds a loadable version of the latest schema. package internal -const Schema = `{"Schema":"lybbrio/internal/ent/schema","Package":"lybbrio/internal/ent","Schemas":[{"name":"Author","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"link","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"unique":true,"fields":["name"]},{"unique":true,"fields":["sort"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"atr"}}},{"name":"Book","config":{"Table":""},"edges":[{"name":"authors","type":"Author","ref_name":"books","inverse":true},{"name":"publisher","type":"Publisher","ref_name":"books","inverse":true},{"name":"series","type":"Series","ref_name":"books","inverse":true},{"name":"identifiers","type":"Identifier","ref_name":"book","inverse":true},{"name":"tags","type":"Tag","ref_name":"books","inverse":true},{"name":"language","type":"Language","ref_name":"books","inverse":true},{"name":"shelf","type":"Shelf","ref_name":"books","inverse":true},{"name":"files","type":"BookFile","ref_name":"book","inverse":true,"annotations":{"EntGQL":{"OrderField":"FILES_COUNT"}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"title","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TITLE"}}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"published_date","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"PUB_DATE"}}},{"name":"path","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":3,"MixedIn":false,"MixinIndex":0}},{"name":"isbn","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"optional":true,"position":{"Index":4,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"ISBN"}}},{"name":"description","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"optional":true,"position":{"Index":5,"MixedIn":false,"MixinIndex":0}},{"name":"series_index","type":{"Type":20,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":6,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["title"]},{"fields":["sort"]},{"fields":["published_date"]},{"fields":["isbn"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"bok"}}},{"name":"BookFile","config":{"Table":""},"edges":[{"name":"book","type":"Book","unique":true,"required":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"path","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"unique":true,"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}},{"name":"size","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"comment":"Size in bytes"},{"name":"format","type":{"Type":6,"Ident":"bookfile.Format","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"enums":[{"N":"EPUB","V":"EPUB"},{"N":"KEPUB","V":"KEPUB"}],"position":{"Index":3,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"QueryField":{}},"KSUID":{"Prefix":"fil"}}},{"name":"Identifier","config":{"Table":""},"edges":[{"name":"book","type":"Book","unique":true,"required":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"type","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TYPE"}}},{"name":"value","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"VALUE"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["type","value"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"idn"}}},{"name":"Language","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"code","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["code"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"lng"}}},{"name":"Publisher","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"pub"}}},{"name":"Series","config":{"Table":""},"edges":[{"name":"books","type":"Book"}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"srs"}}},{"name":"Shelf","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","unique":true,"required":true,"immutable":true},{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"public","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"immutable":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"description","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1},{"Index":0,"MixedIn":true,"MixinIndex":2},{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"shf"}}},{"name":"Tag","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"tag"}}},{"name":"Task","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","unique":true,"immutable":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":1}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"type","type":{"Type":6,"Ident":"task_enums.TaskType","PkgPath":"lybbrio/internal/ent/schema/task_enums","PkgName":"task_enums","Nillable":false,"RType":{"Name":"TaskType","Ident":"task_enums.TaskType","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/task_enums","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Values":{"In":[],"Out":[{"Name":"","Ident":"[]string","Kind":23,"PkgPath":"","Methods":null}]}}}},"enums":[{"N":"noop","V":"noop"},{"N":"calibre_import","V":"calibre_import"}],"default":true,"default_value":"noop","default_kind":24,"immutable":true,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TYPE"}}},{"name":"status","type":{"Type":6,"Ident":"task_enums.Status","PkgPath":"lybbrio/internal/ent/schema/task_enums","PkgName":"task_enums","Nillable":false,"RType":{"Name":"Status","Ident":"task_enums.Status","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/task_enums","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Values":{"In":[],"Out":[{"Name":"","Ident":"[]string","Kind":23,"PkgPath":"","Methods":null}]}}}},"enums":[{"N":"pending","V":"pending"},{"N":"in_progress","V":"in_progress"},{"N":"success","V":"success"},{"N":"failure","V":"failure"}],"default":true,"default_value":"pending","default_kind":24,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"STATUS"}}},{"name":"progress","type":{"Type":20,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":0,"default_kind":14,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"comment":"Progress of the task. 0-1"},{"name":"message","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":3,"MixedIn":false,"MixinIndex":0},"comment":"Message of the task"},{"name":"error","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":4,"MixedIn":false,"MixinIndex":0},"comment":"Error message of the task"},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"immutable":true,"position":{"Index":5,"MixedIn":false,"MixinIndex":0},"comment":"The user who created this task. Empty for System Task"},{"name":"is_system_task","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":6,"MixedIn":false,"MixinIndex":0},"comment":"Whether this task is created by the system"}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":0},{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"tsk"}}},{"name":"User","config":{"Table":""},"edges":[{"name":"shelves","type":"Shelf","ref_name":"user","inverse":true},{"name":"user_permissions","type":"UserPermissions","unique":true,"required":true,"immutable":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"username","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"USERNAME"}}},{"name":"password_hash","type":{"Type":7,"Ident":"argon2id.Argon2IDHash","PkgPath":"lybbrio/internal/ent/schema/argon2id","PkgName":"argon2id","Nillable":false,"RType":{"Name":"Argon2IDHash","Ident":"argon2id.Argon2IDHash","Kind":25,"PkgPath":"lybbrio/internal/ent/schema/argon2id","Methods":{"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalText":{"In":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"Value","Ident":"driver.Value","Kind":20,"PkgPath":"database/sql/driver","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Verify":{"In":[{"Name":"","Ident":"[]uint8","Kind":23,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"sensitive":true},{"name":"email","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"fields":["username"]},{"fields":["password_hash"]}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"QueryField":{}},"KSUID":{"Prefix":"usr"}}},{"name":"UserPermissions","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","ref_name":"user_permissions","unique":true,"inverse":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"Admin","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}},{"name":"CanCreatePublic","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}},{"name":"CanEdit","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":3,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MutationInputs":[{"IsCreate":true},{}]},"KSUID":{"Prefix":"prm"}}}],"Features":["entql","privacy","schema/snapshot","sql/upsert","namedges"]}` +const Schema = `{"Schema":"lybbrio/internal/ent/schema","Package":"lybbrio/internal/ent","Schemas":[{"name":"Author","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"link","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"unique":true,"fields":["name"]},{"unique":true,"fields":["sort"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"atr"}}},{"name":"Book","config":{"Table":""},"edges":[{"name":"authors","type":"Author","ref_name":"books","inverse":true},{"name":"publisher","type":"Publisher","ref_name":"books","inverse":true},{"name":"series","type":"Series","ref_name":"books","inverse":true},{"name":"identifiers","type":"Identifier","ref_name":"book","inverse":true},{"name":"tags","type":"Tag","ref_name":"books","inverse":true},{"name":"language","type":"Language","ref_name":"books","inverse":true},{"name":"shelf","type":"Shelf","ref_name":"books","inverse":true},{"name":"files","type":"BookFile","ref_name":"book","inverse":true,"annotations":{"EntGQL":{"OrderField":"FILES_COUNT"}}},{"name":"covers","type":"BookCover","ref_name":"book","inverse":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"title","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TITLE"}}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"published_date","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"PUB_DATE"}}},{"name":"path","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":3,"MixedIn":false,"MixinIndex":0}},{"name":"isbn","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"optional":true,"position":{"Index":4,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"ISBN"}}},{"name":"description","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"optional":true,"position":{"Index":5,"MixedIn":false,"MixinIndex":0}},{"name":"series_index","type":{"Type":20,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":6,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["title"]},{"fields":["sort"]},{"fields":["published_date"]},{"fields":["isbn"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"bok"}}},{"name":"BookCover","config":{"Table":""},"edges":[{"name":"book","type":"Book","unique":true,"required":true,"immutable":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"path","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"unique":true,"immutable":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"size","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"immutable":true,"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"SIZE"}},"comment":"Size in bytes"},{"name":"width","type":{"Type":12,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"immutable":true,"validators":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"comment":"Width in pixels"},{"name":"height","type":{"Type":12,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"immutable":true,"validators":1,"position":{"Index":3,"MixedIn":false,"MixinIndex":0},"comment":"Height in pixels"},{"name":"url","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"immutable":true,"validators":1,"position":{"Index":4,"MixedIn":false,"MixinIndex":0},"comment":"URL to the image"},{"name":"contentType","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"immutable":true,"validators":1,"position":{"Index":5,"MixedIn":false,"MixinIndex":0},"comment":"MIME type"}],"hooks":[{"Index":0,"MixedIn":false,"MixinIndex":0}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1},{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"cvr"}}},{"name":"BookFile","config":{"Table":""},"edges":[{"name":"book","type":"Book","unique":true,"required":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"path","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"size":2147483647,"unique":true,"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}},{"name":"size","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"comment":"Size in bytes"},{"name":"format","type":{"Type":6,"Ident":"bookfile.Format","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"enums":[{"N":"EPUB","V":"EPUB"},{"N":"KEPUB","V":"KEPUB"}],"position":{"Index":3,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"QueryField":{}},"KSUID":{"Prefix":"fil"}}},{"name":"Identifier","config":{"Table":""},"edges":[{"name":"book","type":"Book","unique":true,"required":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"type","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TYPE"}}},{"name":"value","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"VALUE"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["type","value"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"idn"}}},{"name":"Language","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"code","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["code"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"lng"}}},{"name":"Publisher","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"pub"}}},{"name":"Series","config":{"Table":""},"edges":[{"name":"books","type":"Book"}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"sort","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"srs"}}},{"name":"Shelf","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","unique":true,"required":true,"immutable":true},{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"public","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"immutable":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":2}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":3}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}},{"name":"description","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":1},{"Index":0,"MixedIn":true,"MixinIndex":2},{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"shf"}}},{"name":"Tag","config":{"Table":""},"edges":[{"name":"books","type":"Book","annotations":{"EntGQL":{"OrderField":"BOOKS_COUNT","RelayConnection":true}}}],"fields":[{"name":"calibre_id","type":{"Type":13,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"optional":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"name","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"NAME"}}}],"indexes":[{"unique":true,"fields":["calibre_id"]},{"fields":["name"]}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"MutationInputs":[{"IsCreate":true},{}],"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"tag"}}},{"name":"Task","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","unique":true,"immutable":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":1}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":2}},{"name":"type","type":{"Type":6,"Ident":"task_enums.TaskType","PkgPath":"lybbrio/internal/ent/schema/task_enums","PkgName":"task_enums","Nillable":false,"RType":{"Name":"TaskType","Ident":"task_enums.TaskType","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/task_enums","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Values":{"In":[],"Out":[{"Name":"","Ident":"[]string","Kind":23,"PkgPath":"","Methods":null}]}}}},"enums":[{"N":"noop","V":"noop"},{"N":"calibre_import","V":"calibre_import"}],"default":true,"default_value":"noop","default_kind":24,"immutable":true,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"TYPE"}}},{"name":"status","type":{"Type":6,"Ident":"task_enums.Status","PkgPath":"lybbrio/internal/ent/schema/task_enums","PkgName":"task_enums","Nillable":false,"RType":{"Name":"Status","Ident":"task_enums.Status","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/task_enums","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Values":{"In":[],"Out":[{"Name":"","Ident":"[]string","Kind":23,"PkgPath":"","Methods":null}]}}}},"enums":[{"N":"pending","V":"pending"},{"N":"in_progress","V":"in_progress"},{"N":"success","V":"success"},{"N":"failure","V":"failure"}],"default":true,"default_value":"pending","default_kind":24,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"STATUS"}}},{"name":"progress","type":{"Type":20,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":0,"default_kind":14,"position":{"Index":2,"MixedIn":false,"MixinIndex":0},"comment":"Progress of the task. 0-1"},{"name":"message","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":3,"MixedIn":false,"MixinIndex":0},"comment":"Message of the task"},{"name":"error","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"optional":true,"position":{"Index":4,"MixedIn":false,"MixinIndex":0},"comment":"Error message of the task"},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"immutable":true,"position":{"Index":5,"MixedIn":false,"MixinIndex":0},"comment":"The user who created this task. Empty for System Task"},{"name":"is_system_task","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":6,"MixedIn":false,"MixinIndex":0},"comment":"Whether this task is created by the system"}],"policy":[{"Index":0,"MixedIn":true,"MixinIndex":0},{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MultiOrder":true,"QueryField":{},"RelayConnection":true},"KSUID":{"Prefix":"tsk"}}},{"name":"User","config":{"Table":""},"edges":[{"name":"shelves","type":"Shelf","ref_name":"user","inverse":true},{"name":"user_permissions","type":"UserPermissions","unique":true,"required":true,"immutable":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"username","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":0,"MixedIn":false,"MixinIndex":0},"annotations":{"EntGQL":{"OrderField":"USERNAME"}}},{"name":"password_hash","type":{"Type":7,"Ident":"argon2id.Argon2IDHash","PkgPath":"lybbrio/internal/ent/schema/argon2id","PkgName":"argon2id","Nillable":false,"RType":{"Name":"Argon2IDHash","Ident":"argon2id.Argon2IDHash","Kind":25,"PkgPath":"lybbrio/internal/ent/schema/argon2id","Methods":{"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalText":{"In":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"Value","Ident":"driver.Value","Kind":20,"PkgPath":"database/sql/driver","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Verify":{"In":[{"Name":"","Ident":"[]uint8","Kind":23,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"position":{"Index":1,"MixedIn":false,"MixinIndex":0},"sensitive":true},{"name":"email","type":{"Type":7,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"unique":true,"validators":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}}],"indexes":[{"fields":["username"]},{"fields":["password_hash"]}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"QueryField":{}},"KSUID":{"Prefix":"usr"}}},{"name":"UserPermissions","config":{"Table":""},"edges":[{"name":"user","type":"User","field":"user_id","ref_name":"user_permissions","unique":true,"inverse":true}],"fields":[{"name":"create_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"immutable":true,"position":{"Index":0,"MixedIn":true,"MixinIndex":0}},{"name":"update_time","type":{"Type":2,"Ident":"","PkgPath":"time","PkgName":"","Nillable":false,"RType":null},"default":true,"default_kind":19,"update_default":true,"position":{"Index":1,"MixedIn":true,"MixinIndex":0}},{"name":"id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"default":true,"default_kind":19,"position":{"Index":0,"MixedIn":true,"MixinIndex":1}},{"name":"user_id","type":{"Type":7,"Ident":"ksuid.ID","PkgPath":"lybbrio/internal/ent/schema/ksuid","PkgName":"ksuid","Nillable":false,"RType":{"Name":"ID","Ident":"ksuid.ID","Kind":24,"PkgPath":"lybbrio/internal/ent/schema/ksuid","Methods":{"MarshalGQL":{"In":[{"Name":"Writer","Ident":"io.Writer","Kind":20,"PkgPath":"io","Methods":null}],"Out":[]},"Scan":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"String":{"In":[],"Out":[{"Name":"string","Ident":"string","Kind":24,"PkgPath":"","Methods":null}]},"UnmarshalGQL":{"In":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null}],"Out":[{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]},"Value":{"In":[],"Out":[{"Name":"","Ident":"interface {}","Kind":20,"PkgPath":"","Methods":null},{"Name":"error","Ident":"error","Kind":20,"PkgPath":"","Methods":null}]}}}},"optional":true,"position":{"Index":0,"MixedIn":false,"MixinIndex":0}},{"name":"Admin","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":1,"MixedIn":false,"MixinIndex":0}},{"name":"CanCreatePublic","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":2,"MixedIn":false,"MixinIndex":0}},{"name":"CanEdit","type":{"Type":1,"Ident":"","PkgPath":"","PkgName":"","Nillable":false,"RType":null},"default":true,"default_value":false,"default_kind":1,"position":{"Index":3,"MixedIn":false,"MixinIndex":0}}],"policy":[{"Index":0,"MixedIn":false,"MixinIndex":0}],"annotations":{"EntGQL":{"MutationInputs":[{"IsCreate":true},{}]},"KSUID":{"Prefix":"prm"}}}],"Features":["entql","privacy","schema/snapshot","sql/upsert","namedges"]}` diff --git a/internal/ent/ksuid.go b/internal/ent/ksuid.go index 6f5c293b..a861bbec 100644 --- a/internal/ent/ksuid.go +++ b/internal/ent/ksuid.go @@ -7,6 +7,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -24,6 +25,7 @@ import ( var prefixMap = map[ksuid.ID]string{ "atr": author.Table, "bok": book.Table, + "cvr": bookcover.Table, "fil": bookfile.Table, "idn": identifier.Table, "lng": language.Table, diff --git a/internal/ent/migrate/schema.go b/internal/ent/migrate/schema.go index ef7b0281..6baeb56e 100644 --- a/internal/ent/migrate/schema.go +++ b/internal/ent/migrate/schema.go @@ -88,6 +88,33 @@ var ( }, }, } + // BookCoversColumns holds the columns for the "book_covers" table. + BookCoversColumns = []*schema.Column{ + {Name: "id", Type: field.TypeString}, + {Name: "create_time", Type: field.TypeTime}, + {Name: "update_time", Type: field.TypeTime}, + {Name: "path", Type: field.TypeString, Unique: true, Size: 2147483647}, + {Name: "size", Type: field.TypeInt64}, + {Name: "width", Type: field.TypeInt}, + {Name: "height", Type: field.TypeInt}, + {Name: "url", Type: field.TypeString}, + {Name: "content_type", Type: field.TypeString}, + {Name: "book_cover_book", Type: field.TypeString}, + } + // BookCoversTable holds the schema information for the "book_covers" table. + BookCoversTable = &schema.Table{ + Name: "book_covers", + Columns: BookCoversColumns, + PrimaryKey: []*schema.Column{BookCoversColumns[0]}, + ForeignKeys: []*schema.ForeignKey{ + { + Symbol: "book_covers_books_book", + Columns: []*schema.Column{BookCoversColumns[9]}, + RefColumns: []*schema.Column{BooksColumns[0]}, + OnDelete: schema.NoAction, + }, + }, + } // BookFilesColumns holds the columns for the "book_files" table. BookFilesColumns = []*schema.Column{ {Name: "id", Type: field.TypeString}, @@ -515,6 +542,7 @@ var ( Tables = []*schema.Table{ AuthorsTable, BooksTable, + BookCoversTable, BookFilesTable, IdentifiersTable, LanguagesTable, @@ -535,6 +563,7 @@ var ( ) func init() { + BookCoversTable.ForeignKeys[0].RefTable = BooksTable BookFilesTable.ForeignKeys[0].RefTable = BooksTable IdentifiersTable.ForeignKeys[0].RefTable = BooksTable ShelvesTable.ForeignKeys[0].RefTable = UsersTable diff --git a/internal/ent/mutation.go b/internal/ent/mutation.go index e3b2ad5d..25c72ada 100644 --- a/internal/ent/mutation.go +++ b/internal/ent/mutation.go @@ -8,6 +8,7 @@ import ( "fmt" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -40,6 +41,7 @@ const ( // Node types. TypeAuthor = "Author" TypeBook = "Book" + TypeBookCover = "BookCover" TypeBookFile = "BookFile" TypeIdentifier = "Identifier" TypeLanguage = "Language" @@ -868,6 +870,9 @@ type BookMutation struct { files map[ksuid.ID]struct{} removedfiles map[ksuid.ID]struct{} clearedfiles bool + covers map[ksuid.ID]struct{} + removedcovers map[ksuid.ID]struct{} + clearedcovers bool done bool oldValue func(context.Context) (*Book, error) predicates []predicate.Book @@ -1876,6 +1881,60 @@ func (m *BookMutation) ResetFiles() { m.removedfiles = nil } +// AddCoverIDs adds the "covers" edge to the BookCover entity by ids. +func (m *BookMutation) AddCoverIDs(ids ...ksuid.ID) { + if m.covers == nil { + m.covers = make(map[ksuid.ID]struct{}) + } + for i := range ids { + m.covers[ids[i]] = struct{}{} + } +} + +// ClearCovers clears the "covers" edge to the BookCover entity. +func (m *BookMutation) ClearCovers() { + m.clearedcovers = true +} + +// CoversCleared reports if the "covers" edge to the BookCover entity was cleared. +func (m *BookMutation) CoversCleared() bool { + return m.clearedcovers +} + +// RemoveCoverIDs removes the "covers" edge to the BookCover entity by IDs. +func (m *BookMutation) RemoveCoverIDs(ids ...ksuid.ID) { + if m.removedcovers == nil { + m.removedcovers = make(map[ksuid.ID]struct{}) + } + for i := range ids { + delete(m.covers, ids[i]) + m.removedcovers[ids[i]] = struct{}{} + } +} + +// RemovedCovers returns the removed IDs of the "covers" edge to the BookCover entity. +func (m *BookMutation) RemovedCoversIDs() (ids []ksuid.ID) { + for id := range m.removedcovers { + ids = append(ids, id) + } + return +} + +// CoversIDs returns the "covers" edge IDs in the mutation. +func (m *BookMutation) CoversIDs() (ids []ksuid.ID) { + for id := range m.covers { + ids = append(ids, id) + } + return +} + +// ResetCovers resets all changes to the "covers" edge. +func (m *BookMutation) ResetCovers() { + m.covers = nil + m.clearedcovers = false + m.removedcovers = nil +} + // Where appends a list predicates to the BookMutation builder. func (m *BookMutation) Where(ps ...predicate.Book) { m.predicates = append(m.predicates, ps...) @@ -2222,7 +2281,7 @@ func (m *BookMutation) ResetField(name string) error { // AddedEdges returns all edge names that were set/added in this mutation. func (m *BookMutation) AddedEdges() []string { - edges := make([]string, 0, 8) + edges := make([]string, 0, 9) if m.authors != nil { edges = append(edges, book.EdgeAuthors) } @@ -2247,6 +2306,9 @@ func (m *BookMutation) AddedEdges() []string { if m.files != nil { edges = append(edges, book.EdgeFiles) } + if m.covers != nil { + edges = append(edges, book.EdgeCovers) + } return edges } @@ -2302,13 +2364,19 @@ func (m *BookMutation) AddedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case book.EdgeCovers: + ids := make([]ent.Value, 0, len(m.covers)) + for id := range m.covers { + ids = append(ids, id) + } + return ids } return nil } // RemovedEdges returns all edge names that were removed in this mutation. func (m *BookMutation) RemovedEdges() []string { - edges := make([]string, 0, 8) + edges := make([]string, 0, 9) if m.removedauthors != nil { edges = append(edges, book.EdgeAuthors) } @@ -2333,6 +2401,9 @@ func (m *BookMutation) RemovedEdges() []string { if m.removedfiles != nil { edges = append(edges, book.EdgeFiles) } + if m.removedcovers != nil { + edges = append(edges, book.EdgeCovers) + } return edges } @@ -2388,13 +2459,19 @@ func (m *BookMutation) RemovedIDs(name string) []ent.Value { ids = append(ids, id) } return ids + case book.EdgeCovers: + ids := make([]ent.Value, 0, len(m.removedcovers)) + for id := range m.removedcovers { + ids = append(ids, id) + } + return ids } return nil } // ClearedEdges returns all edge names that were cleared in this mutation. func (m *BookMutation) ClearedEdges() []string { - edges := make([]string, 0, 8) + edges := make([]string, 0, 9) if m.clearedauthors { edges = append(edges, book.EdgeAuthors) } @@ -2419,6 +2496,9 @@ func (m *BookMutation) ClearedEdges() []string { if m.clearedfiles { edges = append(edges, book.EdgeFiles) } + if m.clearedcovers { + edges = append(edges, book.EdgeCovers) + } return edges } @@ -2442,6 +2522,8 @@ func (m *BookMutation) EdgeCleared(name string) bool { return m.clearedshelf case book.EdgeFiles: return m.clearedfiles + case book.EdgeCovers: + return m.clearedcovers } return false } @@ -2482,10 +2564,892 @@ func (m *BookMutation) ResetEdge(name string) error { case book.EdgeFiles: m.ResetFiles() return nil + case book.EdgeCovers: + m.ResetCovers() + return nil } return fmt.Errorf("unknown Book edge %s", name) } +// BookCoverMutation represents an operation that mutates the BookCover nodes in the graph. +type BookCoverMutation struct { + config + op Op + typ string + id *ksuid.ID + create_time *time.Time + update_time *time.Time + _path *string + size *int64 + addsize *int64 + width *int + addwidth *int + height *int + addheight *int + url *string + contentType *string + clearedFields map[string]struct{} + book *ksuid.ID + clearedbook bool + done bool + oldValue func(context.Context) (*BookCover, error) + predicates []predicate.BookCover +} + +var _ ent.Mutation = (*BookCoverMutation)(nil) + +// bookcoverOption allows management of the mutation configuration using functional options. +type bookcoverOption func(*BookCoverMutation) + +// newBookCoverMutation creates new mutation for the BookCover entity. +func newBookCoverMutation(c config, op Op, opts ...bookcoverOption) *BookCoverMutation { + m := &BookCoverMutation{ + config: c, + op: op, + typ: TypeBookCover, + clearedFields: make(map[string]struct{}), + } + for _, opt := range opts { + opt(m) + } + return m +} + +// withBookCoverID sets the ID field of the mutation. +func withBookCoverID(id ksuid.ID) bookcoverOption { + return func(m *BookCoverMutation) { + var ( + err error + once sync.Once + value *BookCover + ) + m.oldValue = func(ctx context.Context) (*BookCover, error) { + once.Do(func() { + if m.done { + err = errors.New("querying old values post mutation is not allowed") + } else { + value, err = m.Client().BookCover.Get(ctx, id) + } + }) + return value, err + } + m.id = &id + } +} + +// withBookCover sets the old BookCover of the mutation. +func withBookCover(node *BookCover) bookcoverOption { + return func(m *BookCoverMutation) { + m.oldValue = func(context.Context) (*BookCover, error) { + return node, nil + } + m.id = &node.ID + } +} + +// Client returns a new `ent.Client` from the mutation. If the mutation was +// executed in a transaction (ent.Tx), a transactional client is returned. +func (m BookCoverMutation) Client() *Client { + client := &Client{config: m.config} + client.init() + return client +} + +// Tx returns an `ent.Tx` for mutations that were executed in transactions; +// it returns an error otherwise. +func (m BookCoverMutation) Tx() (*Tx, error) { + if _, ok := m.driver.(*txDriver); !ok { + return nil, errors.New("ent: mutation is not running in a transaction") + } + tx := &Tx{config: m.config} + tx.init() + return tx, nil +} + +// SetID sets the value of the id field. Note that this +// operation is only accepted on creation of BookCover entities. +func (m *BookCoverMutation) SetID(id ksuid.ID) { + m.id = &id +} + +// ID returns the ID value in the mutation. Note that the ID is only available +// if it was provided to the builder or after it was returned from the database. +func (m *BookCoverMutation) ID() (id ksuid.ID, exists bool) { + if m.id == nil { + return + } + return *m.id, true +} + +// IDs queries the database and returns the entity ids that match the mutation's predicate. +// That means, if the mutation is applied within a transaction with an isolation level such +// as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated +// or updated by the mutation. +func (m *BookCoverMutation) IDs(ctx context.Context) ([]ksuid.ID, error) { + switch { + case m.op.Is(OpUpdateOne | OpDeleteOne): + id, exists := m.ID() + if exists { + return []ksuid.ID{id}, nil + } + fallthrough + case m.op.Is(OpUpdate | OpDelete): + return m.Client().BookCover.Query().Where(m.predicates...).IDs(ctx) + default: + return nil, fmt.Errorf("IDs is not allowed on %s operations", m.op) + } +} + +// SetCreateTime sets the "create_time" field. +func (m *BookCoverMutation) SetCreateTime(t time.Time) { + m.create_time = &t +} + +// CreateTime returns the value of the "create_time" field in the mutation. +func (m *BookCoverMutation) CreateTime() (r time.Time, exists bool) { + v := m.create_time + if v == nil { + return + } + return *v, true +} + +// OldCreateTime returns the old "create_time" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldCreateTime(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldCreateTime is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldCreateTime requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldCreateTime: %w", err) + } + return oldValue.CreateTime, nil +} + +// ResetCreateTime resets all changes to the "create_time" field. +func (m *BookCoverMutation) ResetCreateTime() { + m.create_time = nil +} + +// SetUpdateTime sets the "update_time" field. +func (m *BookCoverMutation) SetUpdateTime(t time.Time) { + m.update_time = &t +} + +// UpdateTime returns the value of the "update_time" field in the mutation. +func (m *BookCoverMutation) UpdateTime() (r time.Time, exists bool) { + v := m.update_time + if v == nil { + return + } + return *v, true +} + +// OldUpdateTime returns the old "update_time" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldUpdateTime(ctx context.Context) (v time.Time, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldUpdateTime is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldUpdateTime requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldUpdateTime: %w", err) + } + return oldValue.UpdateTime, nil +} + +// ResetUpdateTime resets all changes to the "update_time" field. +func (m *BookCoverMutation) ResetUpdateTime() { + m.update_time = nil +} + +// SetPath sets the "path" field. +func (m *BookCoverMutation) SetPath(s string) { + m._path = &s +} + +// Path returns the value of the "path" field in the mutation. +func (m *BookCoverMutation) Path() (r string, exists bool) { + v := m._path + if v == nil { + return + } + return *v, true +} + +// OldPath returns the old "path" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldPath(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldPath is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldPath requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldPath: %w", err) + } + return oldValue.Path, nil +} + +// ResetPath resets all changes to the "path" field. +func (m *BookCoverMutation) ResetPath() { + m._path = nil +} + +// SetSize sets the "size" field. +func (m *BookCoverMutation) SetSize(i int64) { + m.size = &i + m.addsize = nil +} + +// Size returns the value of the "size" field in the mutation. +func (m *BookCoverMutation) Size() (r int64, exists bool) { + v := m.size + if v == nil { + return + } + return *v, true +} + +// OldSize returns the old "size" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldSize(ctx context.Context) (v int64, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldSize is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldSize requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldSize: %w", err) + } + return oldValue.Size, nil +} + +// AddSize adds i to the "size" field. +func (m *BookCoverMutation) AddSize(i int64) { + if m.addsize != nil { + *m.addsize += i + } else { + m.addsize = &i + } +} + +// AddedSize returns the value that was added to the "size" field in this mutation. +func (m *BookCoverMutation) AddedSize() (r int64, exists bool) { + v := m.addsize + if v == nil { + return + } + return *v, true +} + +// ResetSize resets all changes to the "size" field. +func (m *BookCoverMutation) ResetSize() { + m.size = nil + m.addsize = nil +} + +// SetWidth sets the "width" field. +func (m *BookCoverMutation) SetWidth(i int) { + m.width = &i + m.addwidth = nil +} + +// Width returns the value of the "width" field in the mutation. +func (m *BookCoverMutation) Width() (r int, exists bool) { + v := m.width + if v == nil { + return + } + return *v, true +} + +// OldWidth returns the old "width" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldWidth(ctx context.Context) (v int, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldWidth is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldWidth requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldWidth: %w", err) + } + return oldValue.Width, nil +} + +// AddWidth adds i to the "width" field. +func (m *BookCoverMutation) AddWidth(i int) { + if m.addwidth != nil { + *m.addwidth += i + } else { + m.addwidth = &i + } +} + +// AddedWidth returns the value that was added to the "width" field in this mutation. +func (m *BookCoverMutation) AddedWidth() (r int, exists bool) { + v := m.addwidth + if v == nil { + return + } + return *v, true +} + +// ResetWidth resets all changes to the "width" field. +func (m *BookCoverMutation) ResetWidth() { + m.width = nil + m.addwidth = nil +} + +// SetHeight sets the "height" field. +func (m *BookCoverMutation) SetHeight(i int) { + m.height = &i + m.addheight = nil +} + +// Height returns the value of the "height" field in the mutation. +func (m *BookCoverMutation) Height() (r int, exists bool) { + v := m.height + if v == nil { + return + } + return *v, true +} + +// OldHeight returns the old "height" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldHeight(ctx context.Context) (v int, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldHeight is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldHeight requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldHeight: %w", err) + } + return oldValue.Height, nil +} + +// AddHeight adds i to the "height" field. +func (m *BookCoverMutation) AddHeight(i int) { + if m.addheight != nil { + *m.addheight += i + } else { + m.addheight = &i + } +} + +// AddedHeight returns the value that was added to the "height" field in this mutation. +func (m *BookCoverMutation) AddedHeight() (r int, exists bool) { + v := m.addheight + if v == nil { + return + } + return *v, true +} + +// ResetHeight resets all changes to the "height" field. +func (m *BookCoverMutation) ResetHeight() { + m.height = nil + m.addheight = nil +} + +// SetURL sets the "url" field. +func (m *BookCoverMutation) SetURL(s string) { + m.url = &s +} + +// URL returns the value of the "url" field in the mutation. +func (m *BookCoverMutation) URL() (r string, exists bool) { + v := m.url + if v == nil { + return + } + return *v, true +} + +// OldURL returns the old "url" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldURL(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldURL is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldURL requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldURL: %w", err) + } + return oldValue.URL, nil +} + +// ResetURL resets all changes to the "url" field. +func (m *BookCoverMutation) ResetURL() { + m.url = nil +} + +// SetContentType sets the "contentType" field. +func (m *BookCoverMutation) SetContentType(s string) { + m.contentType = &s +} + +// ContentType returns the value of the "contentType" field in the mutation. +func (m *BookCoverMutation) ContentType() (r string, exists bool) { + v := m.contentType + if v == nil { + return + } + return *v, true +} + +// OldContentType returns the old "contentType" field's value of the BookCover entity. +// If the BookCover object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *BookCoverMutation) OldContentType(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldContentType is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldContentType requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldContentType: %w", err) + } + return oldValue.ContentType, nil +} + +// ResetContentType resets all changes to the "contentType" field. +func (m *BookCoverMutation) ResetContentType() { + m.contentType = nil +} + +// SetBookID sets the "book" edge to the Book entity by id. +func (m *BookCoverMutation) SetBookID(id ksuid.ID) { + m.book = &id +} + +// ClearBook clears the "book" edge to the Book entity. +func (m *BookCoverMutation) ClearBook() { + m.clearedbook = true +} + +// BookCleared reports if the "book" edge to the Book entity was cleared. +func (m *BookCoverMutation) BookCleared() bool { + return m.clearedbook +} + +// BookID returns the "book" edge ID in the mutation. +func (m *BookCoverMutation) BookID() (id ksuid.ID, exists bool) { + if m.book != nil { + return *m.book, true + } + return +} + +// BookIDs returns the "book" edge IDs in the mutation. +// Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use +// BookID instead. It exists only for internal usage by the builders. +func (m *BookCoverMutation) BookIDs() (ids []ksuid.ID) { + if id := m.book; id != nil { + ids = append(ids, *id) + } + return +} + +// ResetBook resets all changes to the "book" edge. +func (m *BookCoverMutation) ResetBook() { + m.book = nil + m.clearedbook = false +} + +// Where appends a list predicates to the BookCoverMutation builder. +func (m *BookCoverMutation) Where(ps ...predicate.BookCover) { + m.predicates = append(m.predicates, ps...) +} + +// WhereP appends storage-level predicates to the BookCoverMutation builder. Using this method, +// users can use type-assertion to append predicates that do not depend on any generated package. +func (m *BookCoverMutation) WhereP(ps ...func(*sql.Selector)) { + p := make([]predicate.BookCover, len(ps)) + for i := range ps { + p[i] = ps[i] + } + m.Where(p...) +} + +// Op returns the operation name. +func (m *BookCoverMutation) Op() Op { + return m.op +} + +// SetOp allows setting the mutation operation. +func (m *BookCoverMutation) SetOp(op Op) { + m.op = op +} + +// Type returns the node type of this mutation (BookCover). +func (m *BookCoverMutation) Type() string { + return m.typ +} + +// Fields returns all fields that were changed during this mutation. Note that in +// order to get all numeric fields that were incremented/decremented, call +// AddedFields(). +func (m *BookCoverMutation) Fields() []string { + fields := make([]string, 0, 8) + if m.create_time != nil { + fields = append(fields, bookcover.FieldCreateTime) + } + if m.update_time != nil { + fields = append(fields, bookcover.FieldUpdateTime) + } + if m._path != nil { + fields = append(fields, bookcover.FieldPath) + } + if m.size != nil { + fields = append(fields, bookcover.FieldSize) + } + if m.width != nil { + fields = append(fields, bookcover.FieldWidth) + } + if m.height != nil { + fields = append(fields, bookcover.FieldHeight) + } + if m.url != nil { + fields = append(fields, bookcover.FieldURL) + } + if m.contentType != nil { + fields = append(fields, bookcover.FieldContentType) + } + return fields +} + +// Field returns the value of a field with the given name. The second boolean +// return value indicates that this field was not set, or was not defined in the +// schema. +func (m *BookCoverMutation) Field(name string) (ent.Value, bool) { + switch name { + case bookcover.FieldCreateTime: + return m.CreateTime() + case bookcover.FieldUpdateTime: + return m.UpdateTime() + case bookcover.FieldPath: + return m.Path() + case bookcover.FieldSize: + return m.Size() + case bookcover.FieldWidth: + return m.Width() + case bookcover.FieldHeight: + return m.Height() + case bookcover.FieldURL: + return m.URL() + case bookcover.FieldContentType: + return m.ContentType() + } + return nil, false +} + +// OldField returns the old value of the field from the database. An error is +// returned if the mutation operation is not UpdateOne, or the query to the +// database failed. +func (m *BookCoverMutation) OldField(ctx context.Context, name string) (ent.Value, error) { + switch name { + case bookcover.FieldCreateTime: + return m.OldCreateTime(ctx) + case bookcover.FieldUpdateTime: + return m.OldUpdateTime(ctx) + case bookcover.FieldPath: + return m.OldPath(ctx) + case bookcover.FieldSize: + return m.OldSize(ctx) + case bookcover.FieldWidth: + return m.OldWidth(ctx) + case bookcover.FieldHeight: + return m.OldHeight(ctx) + case bookcover.FieldURL: + return m.OldURL(ctx) + case bookcover.FieldContentType: + return m.OldContentType(ctx) + } + return nil, fmt.Errorf("unknown BookCover field %s", name) +} + +// SetField sets the value of a field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BookCoverMutation) SetField(name string, value ent.Value) error { + switch name { + case bookcover.FieldCreateTime: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetCreateTime(v) + return nil + case bookcover.FieldUpdateTime: + v, ok := value.(time.Time) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetUpdateTime(v) + return nil + case bookcover.FieldPath: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetPath(v) + return nil + case bookcover.FieldSize: + v, ok := value.(int64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetSize(v) + return nil + case bookcover.FieldWidth: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetWidth(v) + return nil + case bookcover.FieldHeight: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetHeight(v) + return nil + case bookcover.FieldURL: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetURL(v) + return nil + case bookcover.FieldContentType: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetContentType(v) + return nil + } + return fmt.Errorf("unknown BookCover field %s", name) +} + +// AddedFields returns all numeric fields that were incremented/decremented during +// this mutation. +func (m *BookCoverMutation) AddedFields() []string { + var fields []string + if m.addsize != nil { + fields = append(fields, bookcover.FieldSize) + } + if m.addwidth != nil { + fields = append(fields, bookcover.FieldWidth) + } + if m.addheight != nil { + fields = append(fields, bookcover.FieldHeight) + } + return fields +} + +// AddedField returns the numeric value that was incremented/decremented on a field +// with the given name. The second boolean return value indicates that this field +// was not set, or was not defined in the schema. +func (m *BookCoverMutation) AddedField(name string) (ent.Value, bool) { + switch name { + case bookcover.FieldSize: + return m.AddedSize() + case bookcover.FieldWidth: + return m.AddedWidth() + case bookcover.FieldHeight: + return m.AddedHeight() + } + return nil, false +} + +// AddField adds the value to the field with the given name. It returns an error if +// the field is not defined in the schema, or if the type mismatched the field +// type. +func (m *BookCoverMutation) AddField(name string, value ent.Value) error { + switch name { + case bookcover.FieldSize: + v, ok := value.(int64) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddSize(v) + return nil + case bookcover.FieldWidth: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddWidth(v) + return nil + case bookcover.FieldHeight: + v, ok := value.(int) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.AddHeight(v) + return nil + } + return fmt.Errorf("unknown BookCover numeric field %s", name) +} + +// ClearedFields returns all nullable fields that were cleared during this +// mutation. +func (m *BookCoverMutation) ClearedFields() []string { + return nil +} + +// FieldCleared returns a boolean indicating if a field with the given name was +// cleared in this mutation. +func (m *BookCoverMutation) FieldCleared(name string) bool { + _, ok := m.clearedFields[name] + return ok +} + +// ClearField clears the value of the field with the given name. It returns an +// error if the field is not defined in the schema. +func (m *BookCoverMutation) ClearField(name string) error { + return fmt.Errorf("unknown BookCover nullable field %s", name) +} + +// ResetField resets all changes in the mutation for the field with the given name. +// It returns an error if the field is not defined in the schema. +func (m *BookCoverMutation) ResetField(name string) error { + switch name { + case bookcover.FieldCreateTime: + m.ResetCreateTime() + return nil + case bookcover.FieldUpdateTime: + m.ResetUpdateTime() + return nil + case bookcover.FieldPath: + m.ResetPath() + return nil + case bookcover.FieldSize: + m.ResetSize() + return nil + case bookcover.FieldWidth: + m.ResetWidth() + return nil + case bookcover.FieldHeight: + m.ResetHeight() + return nil + case bookcover.FieldURL: + m.ResetURL() + return nil + case bookcover.FieldContentType: + m.ResetContentType() + return nil + } + return fmt.Errorf("unknown BookCover field %s", name) +} + +// AddedEdges returns all edge names that were set/added in this mutation. +func (m *BookCoverMutation) AddedEdges() []string { + edges := make([]string, 0, 1) + if m.book != nil { + edges = append(edges, bookcover.EdgeBook) + } + return edges +} + +// AddedIDs returns all IDs (to other nodes) that were added for the given edge +// name in this mutation. +func (m *BookCoverMutation) AddedIDs(name string) []ent.Value { + switch name { + case bookcover.EdgeBook: + if id := m.book; id != nil { + return []ent.Value{*id} + } + } + return nil +} + +// RemovedEdges returns all edge names that were removed in this mutation. +func (m *BookCoverMutation) RemovedEdges() []string { + edges := make([]string, 0, 1) + return edges +} + +// RemovedIDs returns all IDs (to other nodes) that were removed for the edge with +// the given name in this mutation. +func (m *BookCoverMutation) RemovedIDs(name string) []ent.Value { + return nil +} + +// ClearedEdges returns all edge names that were cleared in this mutation. +func (m *BookCoverMutation) ClearedEdges() []string { + edges := make([]string, 0, 1) + if m.clearedbook { + edges = append(edges, bookcover.EdgeBook) + } + return edges +} + +// EdgeCleared returns a boolean which indicates if the edge with the given name +// was cleared in this mutation. +func (m *BookCoverMutation) EdgeCleared(name string) bool { + switch name { + case bookcover.EdgeBook: + return m.clearedbook + } + return false +} + +// ClearEdge clears the value of the edge with the given name. It returns an error +// if that edge is not defined in the schema. +func (m *BookCoverMutation) ClearEdge(name string) error { + switch name { + case bookcover.EdgeBook: + m.ClearBook() + return nil + } + return fmt.Errorf("unknown BookCover unique edge %s", name) +} + +// ResetEdge resets all changes to the edge with the given name in this mutation. +// It returns an error if the edge is not defined in the schema. +func (m *BookCoverMutation) ResetEdge(name string) error { + switch name { + case bookcover.EdgeBook: + m.ResetBook() + return nil + } + return fmt.Errorf("unknown BookCover edge %s", name) +} + // BookFileMutation represents an operation that mutates the BookFile nodes in the graph. type BookFileMutation struct { config diff --git a/internal/ent/predicate/predicate.go b/internal/ent/predicate/predicate.go index c5abfb16..bf1a1289 100644 --- a/internal/ent/predicate/predicate.go +++ b/internal/ent/predicate/predicate.go @@ -12,6 +12,9 @@ type Author func(*sql.Selector) // Book is the predicate function for book builders. type Book func(*sql.Selector) +// BookCover is the predicate function for bookcover builders. +type BookCover func(*sql.Selector) + // BookFile is the predicate function for bookfile builders. type BookFile func(*sql.Selector) diff --git a/internal/ent/privacy/privacy.go b/internal/ent/privacy/privacy.go index bd510d8a..555a4684 100644 --- a/internal/ent/privacy/privacy.go +++ b/internal/ent/privacy/privacy.go @@ -158,6 +158,30 @@ func (f BookMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.BookMutation", m) } +// The BookCoverQueryRuleFunc type is an adapter to allow the use of ordinary +// functions as a query rule. +type BookCoverQueryRuleFunc func(context.Context, *ent.BookCoverQuery) error + +// EvalQuery return f(ctx, q). +func (f BookCoverQueryRuleFunc) EvalQuery(ctx context.Context, q ent.Query) error { + if q, ok := q.(*ent.BookCoverQuery); ok { + return f(ctx, q) + } + return Denyf("ent/privacy: unexpected query type %T, expect *ent.BookCoverQuery", q) +} + +// The BookCoverMutationRuleFunc type is an adapter to allow the use of ordinary +// functions as a mutation rule. +type BookCoverMutationRuleFunc func(context.Context, *ent.BookCoverMutation) error + +// EvalMutation calls f(ctx, m). +func (f BookCoverMutationRuleFunc) EvalMutation(ctx context.Context, m ent.Mutation) error { + if m, ok := m.(*ent.BookCoverMutation); ok { + return f(ctx, m) + } + return Denyf("ent/privacy: unexpected mutation type %T, expect *ent.BookCoverMutation", m) +} + // The BookFileQueryRuleFunc type is an adapter to allow the use of ordinary // functions as a query rule. type BookFileQueryRuleFunc func(context.Context, *ent.BookFileQuery) error @@ -437,6 +461,8 @@ func queryFilter(q ent.Query) (Filter, error) { return q.Filter(), nil case *ent.BookQuery: return q.Filter(), nil + case *ent.BookCoverQuery: + return q.Filter(), nil case *ent.BookFileQuery: return q.Filter(), nil case *ent.IdentifierQuery: @@ -468,6 +494,8 @@ func mutationFilter(m ent.Mutation) (Filter, error) { return m.Filter(), nil case *ent.BookMutation: return m.Filter(), nil + case *ent.BookCoverMutation: + return m.Filter(), nil case *ent.BookFileMutation: return m.Filter(), nil case *ent.IdentifierMutation: diff --git a/internal/ent/runtime/runtime.go b/internal/ent/runtime/runtime.go index 371ed9b1..7dbb3803 100644 --- a/internal/ent/runtime/runtime.go +++ b/internal/ent/runtime/runtime.go @@ -6,6 +6,7 @@ import ( "context" "lybbrio/internal/ent/author" "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" "lybbrio/internal/ent/bookfile" "lybbrio/internal/ent/identifier" "lybbrio/internal/ent/language" @@ -100,6 +101,63 @@ func init() { bookDescID := bookMixinFields3[0].Descriptor() // book.DefaultID holds the default value on creation for the id field. book.DefaultID = bookDescID.Default.(func() ksuid.ID) + bookcoverMixin := schema.BookCover{}.Mixin() + bookcover.Policy = privacy.NewPolicies(bookcoverMixin[1], schema.BookCover{}) + bookcover.Hooks[0] = func(next ent.Mutator) ent.Mutator { + return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) { + if err := bookcover.Policy.EvalMutation(ctx, m); err != nil { + return nil, err + } + return next.Mutate(ctx, m) + }) + } + bookcoverHooks := schema.BookCover{}.Hooks() + + bookcover.Hooks[1] = bookcoverHooks[0] + bookcoverMixinFields0 := bookcoverMixin[0].Fields() + _ = bookcoverMixinFields0 + bookcoverMixinFields2 := bookcoverMixin[2].Fields() + _ = bookcoverMixinFields2 + bookcoverFields := schema.BookCover{}.Fields() + _ = bookcoverFields + // bookcoverDescCreateTime is the schema descriptor for create_time field. + bookcoverDescCreateTime := bookcoverMixinFields0[0].Descriptor() + // bookcover.DefaultCreateTime holds the default value on creation for the create_time field. + bookcover.DefaultCreateTime = bookcoverDescCreateTime.Default.(func() time.Time) + // bookcoverDescUpdateTime is the schema descriptor for update_time field. + bookcoverDescUpdateTime := bookcoverMixinFields0[1].Descriptor() + // bookcover.DefaultUpdateTime holds the default value on creation for the update_time field. + bookcover.DefaultUpdateTime = bookcoverDescUpdateTime.Default.(func() time.Time) + // bookcover.UpdateDefaultUpdateTime holds the default value on update for the update_time field. + bookcover.UpdateDefaultUpdateTime = bookcoverDescUpdateTime.UpdateDefault.(func() time.Time) + // bookcoverDescPath is the schema descriptor for path field. + bookcoverDescPath := bookcoverFields[0].Descriptor() + // bookcover.PathValidator is a validator for the "path" field. It is called by the builders before save. + bookcover.PathValidator = bookcoverDescPath.Validators[0].(func(string) error) + // bookcoverDescSize is the schema descriptor for size field. + bookcoverDescSize := bookcoverFields[1].Descriptor() + // bookcover.SizeValidator is a validator for the "size" field. It is called by the builders before save. + bookcover.SizeValidator = bookcoverDescSize.Validators[0].(func(int64) error) + // bookcoverDescWidth is the schema descriptor for width field. + bookcoverDescWidth := bookcoverFields[2].Descriptor() + // bookcover.WidthValidator is a validator for the "width" field. It is called by the builders before save. + bookcover.WidthValidator = bookcoverDescWidth.Validators[0].(func(int) error) + // bookcoverDescHeight is the schema descriptor for height field. + bookcoverDescHeight := bookcoverFields[3].Descriptor() + // bookcover.HeightValidator is a validator for the "height" field. It is called by the builders before save. + bookcover.HeightValidator = bookcoverDescHeight.Validators[0].(func(int) error) + // bookcoverDescURL is the schema descriptor for url field. + bookcoverDescURL := bookcoverFields[4].Descriptor() + // bookcover.URLValidator is a validator for the "url" field. It is called by the builders before save. + bookcover.URLValidator = bookcoverDescURL.Validators[0].(func(string) error) + // bookcoverDescContentType is the schema descriptor for contentType field. + bookcoverDescContentType := bookcoverFields[5].Descriptor() + // bookcover.ContentTypeValidator is a validator for the "contentType" field. It is called by the builders before save. + bookcover.ContentTypeValidator = bookcoverDescContentType.Validators[0].(func(string) error) + // bookcoverDescID is the schema descriptor for id field. + bookcoverDescID := bookcoverMixinFields2[0].Descriptor() + // bookcover.DefaultID holds the default value on creation for the id field. + bookcover.DefaultID = bookcoverDescID.Default.(func() ksuid.ID) bookfileMixin := schema.BookFile{}.Mixin() bookfile.Policy = privacy.NewPolicies(bookfileMixin[1], schema.BookFile{}) bookfile.Hooks[0] = func(next ent.Mutator) ent.Mutator { diff --git a/internal/ent/schema/book.go b/internal/ent/schema/book.go index c462902e..9c6b7b2c 100644 --- a/internal/ent/schema/book.go +++ b/internal/ent/schema/book.go @@ -81,6 +81,8 @@ func (Book) Edges() []ent.Edge { Annotations( entgql.OrderField("FILES_COUNT"), ), + edge.From("covers", BookCover.Type). + Ref("book"), } } diff --git a/internal/ent/schema/bookcover.go b/internal/ent/schema/bookcover.go new file mode 100644 index 00000000..fb8197a7 --- /dev/null +++ b/internal/ent/schema/bookcover.go @@ -0,0 +1,128 @@ +package schema + +import ( + "context" + "fmt" + "lybbrio/internal/ent/hook" + "lybbrio/internal/ent/privacy" + "lybbrio/internal/ent/schema/ksuid" + "lybbrio/internal/rule" + "mime" + + "entgo.io/contrib/entgql" + "entgo.io/ent" + "entgo.io/ent/schema" + "entgo.io/ent/schema/edge" + "entgo.io/ent/schema/field" + "entgo.io/ent/schema/mixin" +) + +// BookCover holds the schema definition for the BookCover entity. +type BookCover struct { + ent.Schema +} + +func (BookCover) Annotations() []schema.Annotation { + return []schema.Annotation{ + entgql.QueryField(), + entgql.RelayConnection(), + } +} + +func (BookCover) Mixin() []ent.Mixin { + return []ent.Mixin{ + mixin.Time{}, + BaseMixin{}, + ksuid.MixinWithPrefix("cvr"), + } +} + +// Fields of the BookCover. +func (BookCover) Fields() []ent.Field { + return []ent.Field{ + field.Text("path"). + NotEmpty(). + Immutable(). + Unique(), + field.Int64("size"). + Positive(). + Comment("Size in bytes"). + Immutable(). + Annotations(entgql.OrderField("SIZE")), + field.Int("width"). + Positive(). + Immutable(). + Comment("Width in pixels"), + field.Int("height"). + Positive(). + Immutable(). + Comment("Height in pixels"), + field.String("url"). + NotEmpty(). + Immutable(). + Comment("URL to the image"), + field.String("contentType"). + NotEmpty(). + Immutable(). + Comment("MIME type"), + } +} + +// Edges of the BookCover. +func (BookCover) Edges() []ent.Edge { + return []ent.Edge{ + edge.To("book", Book.Type). + Unique(). + Immutable(). + Required(), + } +} + +func (BookCover) Policy() ent.Policy { + return privacy.Policy{ + Mutation: privacy.MutationPolicy{ + // Deny any operation in case there is no "viewer context". + rule.DenyIfNoViewer(), + rule.DenyIfAnonymousViewer(), + rule.AllowIfAdmin(), + privacy.AlwaysDenyRule(), + }, + } +} + +func (BookCover) Hooks() []ent.Hook { + return []ent.Hook{ + hook.On( + func(next ent.Mutator) ent.Mutator { + type CoverMutation interface { + Width() (int, bool) + Height() (int, bool) + ContentType() (string, bool) + BookID() (ksuid.ID, bool) + SetURL(string) + } + return ent.MutateFunc(func(ctx context.Context, m ent.Mutation) (ent.Value, error) { + mx, ok := m.(CoverMutation) + if !ok { + return nil, fmt.Errorf("unexpected mutation type") + } + width, wok := mx.Width() + height, hok := mx.Height() + contentType, cok := mx.ContentType() + bookID, bok := mx.BookID() + if !wok || !hok || !cok || !bok { + return nil, fmt.Errorf("missing required fields") + } + exts, err := mime.ExtensionsByType(contentType) + if err != nil { + return nil, fmt.Errorf("unknown content type") + } + ext := exts[len(exts)-1] + mx.SetURL(fmt.Sprintf("/image/%s/%d/%d/cover%s", bookID.String(), width, height, ext)) + return next.Mutate(ctx, m) + }) + }, + ent.OpCreate, + ), + } +} diff --git a/internal/ent/tx.go b/internal/ent/tx.go index ffca01ab..70efb422 100644 --- a/internal/ent/tx.go +++ b/internal/ent/tx.go @@ -16,6 +16,8 @@ type Tx struct { Author *AuthorClient // Book is the client for interacting with the Book builders. Book *BookClient + // BookCover is the client for interacting with the BookCover builders. + BookCover *BookCoverClient // BookFile is the client for interacting with the BookFile builders. BookFile *BookFileClient // Identifier is the client for interacting with the Identifier builders. @@ -169,6 +171,7 @@ func (tx *Tx) Client() *Client { func (tx *Tx) init() { tx.Author = NewAuthorClient(tx.config) tx.Book = NewBookClient(tx.config) + tx.BookCover = NewBookCoverClient(tx.config) tx.BookFile = NewBookFileClient(tx.config) tx.Identifier = NewIdentifierClient(tx.config) tx.Language = NewLanguageClient(tx.config) diff --git a/internal/graph/ent.graphql b/internal/graph/ent.graphql index eec98d5b..884c086f 100644 --- a/internal/graph/ent.graphql +++ b/internal/graph/ent.graphql @@ -9,49 +9,83 @@ type Author implements Node { sort: String! link: String books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type AuthorConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [AuthorEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type AuthorEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Author - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Author connections""" +""" +Ordering options for Author connections +""" input AuthorOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Authors.""" + """ + The field by which to order Authors. + """ field: AuthorOrderField! } -"""Properties by which Author connections can be ordered.""" +""" +Properties by which Author connections can be ordered. +""" enum AuthorOrderField { NAME BOOKS_COUNT @@ -64,7 +98,9 @@ input AuthorWhereInput { not: AuthorWhereInput and: [AuthorWhereInput!] or: [AuthorWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -73,7 +109,9 @@ input AuthorWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -82,7 +120,9 @@ input AuthorWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -91,7 +131,9 @@ input AuthorWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -102,7 +144,9 @@ input AuthorWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -116,7 +160,9 @@ input AuthorWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -130,7 +176,9 @@ input AuthorWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """link field predicates""" + """ + link field predicates + """ link: String linkNEQ: String linkIn: [String!] @@ -146,7 +194,9 @@ input AuthorWhereInput { linkNotNil: Boolean linkEqualFold: String linkContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -170,21 +220,240 @@ type Book implements Node { language: [Language!] shelf: [Shelf!] files: [BookFile!] + covers: [BookCover!] } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type BookConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [BookEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} +type BookCover implements Node { + id: ID! + createTime: Time! + updateTime: Time! + path: String! + """ + Size in bytes + """ + size: Int! + """ + Width in pixels + """ + width: Int! + """ + Height in pixels + """ + height: Int! + """ + URL to the image + """ + url: String! + """ + MIME type + """ + contenttype: String! @goField(name: "ContentType", forceResolver: false) + book: Book! +} +""" +A connection to a list of items. +""" +type BookCoverConnection { + """ + A list of edges. + """ + edges: [BookCoverEdge] + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" +type BookCoverEdge { + """ + The item at the end of the edge. + """ + node: BookCover + """ + A cursor for use in pagination. + """ + cursor: Cursor! +} +""" +Ordering options for BookCover connections +""" +input BookCoverOrder { + """ + The ordering direction. + """ + direction: OrderDirection! = ASC + """ + The field by which to order BookCovers. + """ + field: BookCoverOrderField! +} +""" +Properties by which BookCover connections can be ordered. +""" +enum BookCoverOrderField { + SIZE +} +""" +BookCoverWhereInput is used for filtering BookCover objects. +Input was generated by ent. +""" +input BookCoverWhereInput { + not: BookCoverWhereInput + and: [BookCoverWhereInput!] + or: [BookCoverWhereInput!] + """ + id field predicates + """ + id: ID + idNEQ: ID + idIn: [ID!] + idNotIn: [ID!] + idGT: ID + idGTE: ID + idLT: ID + idLTE: ID + """ + create_time field predicates + """ + createTime: Time + createTimeNEQ: Time + createTimeIn: [Time!] + createTimeNotIn: [Time!] + createTimeGT: Time + createTimeGTE: Time + createTimeLT: Time + createTimeLTE: Time + """ + update_time field predicates + """ + updateTime: Time + updateTimeNEQ: Time + updateTimeIn: [Time!] + updateTimeNotIn: [Time!] + updateTimeGT: Time + updateTimeGTE: Time + updateTimeLT: Time + updateTimeLTE: Time + """ + path field predicates + """ + path: String + pathNEQ: String + pathIn: [String!] + pathNotIn: [String!] + pathGT: String + pathGTE: String + pathLT: String + pathLTE: String + pathContains: String + pathHasPrefix: String + pathHasSuffix: String + pathEqualFold: String + pathContainsFold: String + """ + size field predicates + """ + size: Int + sizeNEQ: Int + sizeIn: [Int!] + sizeNotIn: [Int!] + sizeGT: Int + sizeGTE: Int + sizeLT: Int + sizeLTE: Int + """ + width field predicates + """ + width: Int + widthNEQ: Int + widthIn: [Int!] + widthNotIn: [Int!] + widthGT: Int + widthGTE: Int + widthLT: Int + widthLTE: Int + """ + height field predicates + """ + height: Int + heightNEQ: Int + heightIn: [Int!] + heightNotIn: [Int!] + heightGT: Int + heightGTE: Int + heightLT: Int + heightLTE: Int + """ + url field predicates + """ + url: String + urlNEQ: String + urlIn: [String!] + urlNotIn: [String!] + urlGT: String + urlGTE: String + urlLT: String + urlLTE: String + urlContains: String + urlHasPrefix: String + urlHasSuffix: String + urlEqualFold: String + urlContainsFold: String + """ + contentType field predicates + """ + contenttype: String + contenttypeNEQ: String + contenttypeIn: [String!] + contenttypeNotIn: [String!] + contenttypeGT: String + contenttypeGTE: String + contenttypeLT: String + contenttypeLTE: String + contenttypeContains: String + contenttypeHasPrefix: String + contenttypeHasSuffix: String + contenttypeEqualFold: String + contenttypeContainsFold: String + """ + book edge predicates + """ + hasBook: Boolean + hasBookWith: [BookWhereInput!] +} +""" +An edge in a connection. +""" type BookEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Book - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } type BookFile implements Node { @@ -193,12 +462,16 @@ type BookFile implements Node { updateTime: Time! name: String! path: String! - """Size in bytes""" + """ + Size in bytes + """ size: Int! format: BookFileFormat! book: Book! } -"""BookFileFormat is enum for the field format""" +""" +BookFileFormat is enum for the field format +""" enum BookFileFormat @goModel(model: "lybbrio/internal/ent/bookfile.Format") { EPUB KEPUB @@ -211,7 +484,9 @@ input BookFileWhereInput { not: BookFileWhereInput and: [BookFileWhereInput!] or: [BookFileWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -220,7 +495,9 @@ input BookFileWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -229,7 +506,9 @@ input BookFileWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -238,7 +517,9 @@ input BookFileWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -252,7 +533,9 @@ input BookFileWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """path field predicates""" + """ + path field predicates + """ path: String pathNEQ: String pathIn: [String!] @@ -266,7 +549,9 @@ input BookFileWhereInput { pathHasSuffix: String pathEqualFold: String pathContainsFold: String - """size field predicates""" + """ + size field predicates + """ size: Int sizeNEQ: Int sizeIn: [Int!] @@ -275,23 +560,35 @@ input BookFileWhereInput { sizeGTE: Int sizeLT: Int sizeLTE: Int - """format field predicates""" + """ + format field predicates + """ format: BookFileFormat formatNEQ: BookFileFormat formatIn: [BookFileFormat!] formatNotIn: [BookFileFormat!] - """book edge predicates""" + """ + book edge predicates + """ hasBook: Boolean hasBookWith: [BookWhereInput!] } -"""Ordering options for Book connections""" +""" +Ordering options for Book connections +""" input BookOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Books.""" + """ + The field by which to order Books. + """ field: BookOrderField! } -"""Properties by which Book connections can be ordered.""" +""" +Properties by which Book connections can be ordered. +""" enum BookOrderField { TITLE NAME @@ -307,7 +604,9 @@ input BookWhereInput { not: BookWhereInput and: [BookWhereInput!] or: [BookWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -316,7 +615,9 @@ input BookWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -325,7 +626,9 @@ input BookWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -334,7 +637,9 @@ input BookWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -345,7 +650,9 @@ input BookWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """title field predicates""" + """ + title field predicates + """ title: String titleNEQ: String titleIn: [String!] @@ -359,7 +666,9 @@ input BookWhereInput { titleHasSuffix: String titleEqualFold: String titleContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -373,7 +682,9 @@ input BookWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """published_date field predicates""" + """ + published_date field predicates + """ publishedDate: Time publishedDateNEQ: Time publishedDateIn: [Time!] @@ -384,7 +695,9 @@ input BookWhereInput { publishedDateLTE: Time publishedDateIsNil: Boolean publishedDateNotNil: Boolean - """path field predicates""" + """ + path field predicates + """ path: String pathNEQ: String pathIn: [String!] @@ -398,7 +711,9 @@ input BookWhereInput { pathHasSuffix: String pathEqualFold: String pathContainsFold: String - """isbn field predicates""" + """ + isbn field predicates + """ isbn: String isbnNEQ: String isbnIn: [String!] @@ -414,7 +729,9 @@ input BookWhereInput { isbnNotNil: Boolean isbnEqualFold: String isbnContainsFold: String - """description field predicates""" + """ + description field predicates + """ description: String descriptionNEQ: String descriptionIn: [String!] @@ -430,7 +747,9 @@ input BookWhereInput { descriptionNotNil: Boolean descriptionEqualFold: String descriptionContainsFold: String - """series_index field predicates""" + """ + series_index field predicates + """ seriesIndex: Float seriesIndexNEQ: Float seriesIndexIn: [Float!] @@ -441,30 +760,51 @@ input BookWhereInput { seriesIndexLTE: Float seriesIndexIsNil: Boolean seriesIndexNotNil: Boolean - """authors edge predicates""" + """ + authors edge predicates + """ hasAuthors: Boolean hasAuthorsWith: [AuthorWhereInput!] - """publisher edge predicates""" + """ + publisher edge predicates + """ hasPublisher: Boolean hasPublisherWith: [PublisherWhereInput!] - """series edge predicates""" + """ + series edge predicates + """ hasSeries: Boolean hasSeriesWith: [SeriesWhereInput!] - """identifiers edge predicates""" + """ + identifiers edge predicates + """ hasIdentifiers: Boolean hasIdentifiersWith: [IdentifierWhereInput!] - """tags edge predicates""" + """ + tags edge predicates + """ hasTags: Boolean hasTagsWith: [TagWhereInput!] - """language edge predicates""" + """ + language edge predicates + """ hasLanguage: Boolean hasLanguageWith: [LanguageWhereInput!] - """shelf edge predicates""" + """ + shelf edge predicates + """ hasShelf: Boolean hasShelfWith: [ShelfWhereInput!] - """files edge predicates""" + """ + files edge predicates + """ hasFiles: Boolean hasFilesWith: [BookFileWhereInput!] + """ + covers edge predicates + """ + hasCovers: Boolean + hasCoversWith: [BookCoverWhereInput!] } """ CreateAuthorInput is used for create Author object. @@ -502,6 +842,7 @@ input CreateBookInput { languageIDs: [ID!] shelfIDs: [ID!] fileIDs: [ID!] + coverIDs: [ID!] } """ CreateIdentifierInput is used for create Identifier object. @@ -584,30 +925,52 @@ type Identifier implements Node { value: String! book: Book! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type IdentifierConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [IdentifierEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type IdentifierEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Identifier - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Identifier connections""" +""" +Ordering options for Identifier connections +""" input IdentifierOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Identifiers.""" + """ + The field by which to order Identifiers. + """ field: IdentifierOrderField! } -"""Properties by which Identifier connections can be ordered.""" +""" +Properties by which Identifier connections can be ordered. +""" enum IdentifierOrderField { TYPE VALUE @@ -620,7 +983,9 @@ input IdentifierWhereInput { not: IdentifierWhereInput and: [IdentifierWhereInput!] or: [IdentifierWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -629,7 +994,9 @@ input IdentifierWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -638,7 +1005,9 @@ input IdentifierWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -647,7 +1016,9 @@ input IdentifierWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -658,7 +1029,9 @@ input IdentifierWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """type field predicates""" + """ + type field predicates + """ type: String typeNEQ: String typeIn: [String!] @@ -672,7 +1045,9 @@ input IdentifierWhereInput { typeHasSuffix: String typeEqualFold: String typeContainsFold: String - """value field predicates""" + """ + value field predicates + """ value: String valueNEQ: String valueIn: [String!] @@ -686,7 +1061,9 @@ input IdentifierWhereInput { valueHasSuffix: String valueEqualFold: String valueContainsFold: String - """book edge predicates""" + """ + book edge predicates + """ hasBook: Boolean hasBookWith: [BookWhereInput!] } @@ -697,49 +1074,83 @@ type Language implements Node { calibreID: Int code: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type LanguageConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [LanguageEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type LanguageEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Language - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Language connections""" +""" +Ordering options for Language connections +""" input LanguageOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Languages.""" + """ + The field by which to order Languages. + """ field: LanguageOrderField! } -"""Properties by which Language connections can be ordered.""" +""" +Properties by which Language connections can be ordered. +""" enum LanguageOrderField { BOOKS_COUNT } @@ -751,7 +1162,9 @@ input LanguageWhereInput { not: LanguageWhereInput and: [LanguageWhereInput!] or: [LanguageWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -760,7 +1173,9 @@ input LanguageWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -769,7 +1184,9 @@ input LanguageWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -778,7 +1195,9 @@ input LanguageWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -789,7 +1208,9 @@ input LanguageWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """code field predicates""" + """ + code field predicates + """ code: String codeNEQ: String codeIn: [String!] @@ -803,7 +1224,9 @@ input LanguageWhereInput { codeHasSuffix: String codeEqualFold: String codeContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -812,14 +1235,22 @@ An object with an ID. Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) """ interface Node @goModel(model: "lybbrio/internal/ent.Noder") { - """The id of the object.""" + """ + The id of the object. + """ id: ID! } -"""Possible directions in which to order a list of items when provided an `orderBy` argument.""" +""" +Possible directions in which to order a list of items when provided an `orderBy` argument. +""" enum OrderDirection { - """Specifies an ascending order for a given `orderBy` argument.""" + """ + Specifies an ascending order for a given `orderBy` argument. + """ ASC - """Specifies a descending order for a given `orderBy` argument.""" + """ + Specifies a descending order for a given `orderBy` argument. + """ DESC } """ @@ -827,13 +1258,21 @@ Information about pagination in a connection. https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ type PageInfo { - """When paginating forwards, are there more items?""" + """ + When paginating forwards, are there more items? + """ hasNextPage: Boolean! - """When paginating backwards, are there more items?""" + """ + When paginating backwards, are there more items? + """ hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" + """ + When paginating backwards, the cursor to continue. + """ startCursor: Cursor - """When paginating forwards, the cursor to continue.""" + """ + When paginating forwards, the cursor to continue. + """ endCursor: Cursor } type Publisher implements Node { @@ -843,49 +1282,83 @@ type Publisher implements Node { calibreID: Int name: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type PublisherConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [PublisherEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type PublisherEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Publisher - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Publisher connections""" +""" +Ordering options for Publisher connections +""" input PublisherOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Publishers.""" + """ + The field by which to order Publishers. + """ field: PublisherOrderField! } -"""Properties by which Publisher connections can be ordered.""" +""" +Properties by which Publisher connections can be ordered. +""" enum PublisherOrderField { NAME BOOKS_COUNT @@ -898,7 +1371,9 @@ input PublisherWhereInput { not: PublisherWhereInput and: [PublisherWhereInput!] or: [PublisherWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -907,7 +1382,9 @@ input PublisherWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -916,7 +1393,9 @@ input PublisherWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -925,7 +1404,9 @@ input PublisherWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -936,7 +1417,9 @@ input PublisherWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -950,191 +1433,340 @@ input PublisherWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } type Query { - """Fetches an object given its ID.""" + """ + Fetches an object given its ID. + """ node( - """ID of the object.""" + """ + ID of the object. + """ id: ID! ): Node - """Lookup nodes by a list of IDs.""" + """ + Lookup nodes by a list of IDs. + """ nodes( - """The list of node IDs.""" + """ + The list of node IDs. + """ ids: [ID!]! ): [Node]! authors( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Authors returned from the connection.""" + """ + Ordering options for Authors returned from the connection. + """ orderBy: [AuthorOrder!] - """Filtering options for Authors returned from the connection.""" + """ + Filtering options for Authors returned from the connection. + """ where: AuthorWhereInput ): AuthorConnection! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! + bookCovers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: Cursor + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: Cursor + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for BookCovers returned from the connection. + """ + orderBy: BookCoverOrder + + """ + Filtering options for BookCovers returned from the connection. + """ + where: BookCoverWhereInput + ): BookCoverConnection! bookFiles: [BookFile!]! identifiers( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Identifiers returned from the connection.""" + """ + Ordering options for Identifiers returned from the connection. + """ orderBy: [IdentifierOrder!] - """Filtering options for Identifiers returned from the connection.""" + """ + Filtering options for Identifiers returned from the connection. + """ where: IdentifierWhereInput ): IdentifierConnection! languages( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Languages returned from the connection.""" + """ + Ordering options for Languages returned from the connection. + """ orderBy: [LanguageOrder!] - """Filtering options for Languages returned from the connection.""" + """ + Filtering options for Languages returned from the connection. + """ where: LanguageWhereInput ): LanguageConnection! publishers( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Publishers returned from the connection.""" + """ + Ordering options for Publishers returned from the connection. + """ orderBy: [PublisherOrder!] - """Filtering options for Publishers returned from the connection.""" + """ + Filtering options for Publishers returned from the connection. + """ where: PublisherWhereInput ): PublisherConnection! seriesSlice( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for SeriesSlice returned from the connection.""" + """ + Ordering options for SeriesSlice returned from the connection. + """ orderBy: [SeriesOrder!] - """Filtering options for SeriesSlice returned from the connection.""" + """ + Filtering options for SeriesSlice returned from the connection. + """ where: SeriesWhereInput ): SeriesConnection! shelves( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Shelves returned from the connection.""" + """ + Ordering options for Shelves returned from the connection. + """ orderBy: [ShelfOrder!] - """Filtering options for Shelves returned from the connection.""" + """ + Filtering options for Shelves returned from the connection. + """ where: ShelfWhereInput ): ShelfConnection! tags( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Tags returned from the connection.""" + """ + Ordering options for Tags returned from the connection. + """ orderBy: [TagOrder!] - """Filtering options for Tags returned from the connection.""" + """ + Filtering options for Tags returned from the connection. + """ where: TagWhereInput ): TagConnection! tasks( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Tasks returned from the connection.""" + """ + Ordering options for Tasks returned from the connection. + """ orderBy: [TaskOrder!] - """Filtering options for Tasks returned from the connection.""" + """ + Filtering options for Tasks returned from the connection. + """ where: TaskWhereInput ): TaskConnection! users: [User!]! @@ -1148,30 +1780,52 @@ type Series implements Node { sort: String! books: [Book!] } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type SeriesConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [SeriesEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type SeriesEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Series - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Series connections""" +""" +Ordering options for Series connections +""" input SeriesOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order SeriesSlice.""" + """ + The field by which to order SeriesSlice. + """ field: SeriesOrderField! } -"""Properties by which Series connections can be ordered.""" +""" +Properties by which Series connections can be ordered. +""" enum SeriesOrderField { NAME } @@ -1183,7 +1837,9 @@ input SeriesWhereInput { not: SeriesWhereInput and: [SeriesWhereInput!] or: [SeriesWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1192,7 +1848,9 @@ input SeriesWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -1201,7 +1859,9 @@ input SeriesWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -1210,7 +1870,9 @@ input SeriesWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -1221,7 +1883,9 @@ input SeriesWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -1235,7 +1899,9 @@ input SeriesWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -1249,7 +1915,9 @@ input SeriesWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -1263,49 +1931,83 @@ type Shelf implements Node { description: String user: User! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type ShelfConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [ShelfEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type ShelfEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Shelf - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Shelf connections""" +""" +Ordering options for Shelf connections +""" input ShelfOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Shelves.""" + """ + The field by which to order Shelves. + """ field: ShelfOrderField! } -"""Properties by which Shelf connections can be ordered.""" +""" +Properties by which Shelf connections can be ordered. +""" enum ShelfOrderField { NAME BOOKS_COUNT @@ -1318,7 +2020,9 @@ input ShelfWhereInput { not: ShelfWhereInput and: [ShelfWhereInput!] or: [ShelfWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1327,7 +2031,9 @@ input ShelfWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -1336,7 +2042,9 @@ input ShelfWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -1345,10 +2053,14 @@ input ShelfWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """public field predicates""" + """ + public field predicates + """ public: Boolean publicNEQ: Boolean - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -1362,7 +2074,9 @@ input ShelfWhereInput { userIDHasSuffix: ID userIDEqualFold: ID userIDContainsFold: ID - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -1376,7 +2090,9 @@ input ShelfWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """description field predicates""" + """ + description field predicates + """ description: String descriptionNEQ: String descriptionIn: [String!] @@ -1392,10 +2108,14 @@ input ShelfWhereInput { descriptionNotNil: Boolean descriptionEqualFold: String descriptionContainsFold: String - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -1404,49 +2124,83 @@ type Tag implements Node { calibreID: Int name: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type TagConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [TagEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type TagEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Tag - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Tag connections""" +""" +Ordering options for Tag connections +""" input TagOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Tags.""" + """ + The field by which to order Tags. + """ field: TagOrderField! } -"""Properties by which Tag connections can be ordered.""" +""" +Properties by which Tag connections can be ordered. +""" enum TagOrderField { NAME BOOKS_COUNT @@ -1459,7 +2213,9 @@ input TagWhereInput { not: TagWhereInput and: [TagWhereInput!] or: [TagWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1468,7 +2224,9 @@ input TagWhereInput { idGTE: ID idLT: ID idLTE: ID - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -1479,7 +2237,9 @@ input TagWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -1493,7 +2253,9 @@ input TagWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -1503,54 +2265,90 @@ type Task implements Node { updateTime: Time! type: TaskTaskType! status: TaskStatus! - """Progress of the task. 0-1""" + """ + Progress of the task. 0-1 + """ progress: Float! - """Message of the task""" + """ + Message of the task + """ message: String - """Error message of the task""" + """ + Error message of the task + """ error: String - """The user who created this task. Empty for System Task""" + """ + The user who created this task. Empty for System Task + """ userID: ID - """Whether this task is created by the system""" + """ + Whether this task is created by the system + """ isSystemTask: Boolean! user: User } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type TaskConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [TaskEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type TaskEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Task - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Task connections""" +""" +Ordering options for Task connections +""" input TaskOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Tasks.""" + """ + The field by which to order Tasks. + """ field: TaskOrderField! } -"""Properties by which Task connections can be ordered.""" +""" +Properties by which Task connections can be ordered. +""" enum TaskOrderField { TYPE STATUS } -"""TaskStatus is enum for the field status""" +""" +TaskStatus is enum for the field status +""" enum TaskStatus @goModel(model: "lybbrio/internal/ent/schema/task_enums.Status") { pending in_progress success failure } -"""TaskTaskType is enum for the field type""" +""" +TaskTaskType is enum for the field type +""" enum TaskTaskType @goModel(model: "lybbrio/internal/ent/schema/task_enums.TaskType") { noop calibre_import @@ -1563,7 +2361,9 @@ input TaskWhereInput { not: TaskWhereInput and: [TaskWhereInput!] or: [TaskWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1572,7 +2372,9 @@ input TaskWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -1581,7 +2383,9 @@ input TaskWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -1590,17 +2394,23 @@ input TaskWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """type field predicates""" + """ + type field predicates + """ type: TaskTaskType typeNEQ: TaskTaskType typeIn: [TaskTaskType!] typeNotIn: [TaskTaskType!] - """status field predicates""" + """ + status field predicates + """ status: TaskStatus statusNEQ: TaskStatus statusIn: [TaskStatus!] statusNotIn: [TaskStatus!] - """progress field predicates""" + """ + progress field predicates + """ progress: Float progressNEQ: Float progressIn: [Float!] @@ -1609,7 +2419,9 @@ input TaskWhereInput { progressGTE: Float progressLT: Float progressLTE: Float - """message field predicates""" + """ + message field predicates + """ message: String messageNEQ: String messageIn: [String!] @@ -1625,7 +2437,9 @@ input TaskWhereInput { messageNotNil: Boolean messageEqualFold: String messageContainsFold: String - """error field predicates""" + """ + error field predicates + """ error: String errorNEQ: String errorIn: [String!] @@ -1641,7 +2455,9 @@ input TaskWhereInput { errorNotNil: Boolean errorEqualFold: String errorContainsFold: String - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -1657,14 +2473,20 @@ input TaskWhereInput { userIDNotNil: Boolean userIDEqualFold: ID userIDContainsFold: ID - """is_system_task field predicates""" + """ + is_system_task field predicates + """ isSystemTask: Boolean isSystemTaskNEQ: Boolean - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] } -"""The builtin Time type""" +""" +The builtin Time type +""" scalar Time """ UpdateAuthorInput is used for update Author object. @@ -1725,6 +2547,9 @@ input UpdateBookInput { addFileIDs: [ID!] removeFileIDs: [ID!] clearFiles: Boolean + addCoverIDs: [ID!] + removeCoverIDs: [ID!] + clearCovers: Boolean } """ UpdateIdentifierInput is used for update Identifier object. @@ -1825,14 +2650,22 @@ type User implements Node { shelves: [Shelf!] userPermissions: UserPermissions! } -"""Ordering options for User connections""" +""" +Ordering options for User connections +""" input UserOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Users.""" + """ + The field by which to order Users. + """ field: UserOrderField! } -"""Properties by which User connections can be ordered.""" +""" +Properties by which User connections can be ordered. +""" enum UserOrderField { USERNAME } @@ -1854,7 +2687,9 @@ input UserPermissionsWhereInput { not: UserPermissionsWhereInput and: [UserPermissionsWhereInput!] or: [UserPermissionsWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1863,7 +2698,9 @@ input UserPermissionsWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -1872,7 +2709,9 @@ input UserPermissionsWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -1881,7 +2720,9 @@ input UserPermissionsWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -1897,16 +2738,24 @@ input UserPermissionsWhereInput { userIDNotNil: Boolean userIDEqualFold: ID userIDContainsFold: ID - """Admin field predicates""" + """ + Admin field predicates + """ admin: Boolean adminNEQ: Boolean - """CanCreatePublic field predicates""" + """ + CanCreatePublic field predicates + """ cancreatepublic: Boolean cancreatepublicNEQ: Boolean - """CanEdit field predicates""" + """ + CanEdit field predicates + """ canedit: Boolean caneditNEQ: Boolean - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] } @@ -1918,7 +2767,9 @@ input UserWhereInput { not: UserWhereInput and: [UserWhereInput!] or: [UserWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -1927,7 +2778,9 @@ input UserWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -1936,7 +2789,9 @@ input UserWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -1945,7 +2800,9 @@ input UserWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """username field predicates""" + """ + username field predicates + """ username: String usernameNEQ: String usernameIn: [String!] @@ -1959,7 +2816,9 @@ input UserWhereInput { usernameHasSuffix: String usernameEqualFold: String usernameContainsFold: String - """email field predicates""" + """ + email field predicates + """ email: String emailNEQ: String emailIn: [String!] @@ -1973,10 +2832,14 @@ input UserWhereInput { emailHasSuffix: String emailEqualFold: String emailContainsFold: String - """shelves edge predicates""" + """ + shelves edge predicates + """ hasShelves: Boolean hasShelvesWith: [ShelfWhereInput!] - """user_permissions edge predicates""" + """ + user_permissions edge predicates + """ hasUserPermissions: Boolean hasUserPermissionsWith: [UserPermissionsWhereInput!] } diff --git a/internal/graph/ent.resolvers.go b/internal/graph/ent.resolvers.go index eac41455..c278a839 100644 --- a/internal/graph/ent.resolvers.go +++ b/internal/graph/ent.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.42 +// Code generated by github.com/99designs/gqlgen version v0.17.43 import ( "context" @@ -42,6 +42,15 @@ func (r *queryResolver) Books(ctx context.Context, after *entgql.Cursor[ksuid.ID ) } +// BookCovers is the resolver for the bookCovers field. +func (r *queryResolver) BookCovers(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy *ent.BookCoverOrder, where *ent.BookCoverWhereInput) (*ent.BookCoverConnection, error) { + return r.client.BookCover.Query(). + Paginate(ctx, after, first, before, last, + ent.WithBookCoverOrder(orderBy), + ent.WithBookCoverFilter(where.Filter), + ) +} + // BookFiles is the resolver for the bookFiles field. func (r *queryResolver) BookFiles(ctx context.Context) ([]*ent.BookFile, error) { panic(fmt.Errorf("not implemented: BookFiles - bookFiles")) diff --git a/internal/graph/generated/generated.go b/internal/graph/generated/generated.go index 88b19bb2..c938d976 100644 --- a/internal/graph/generated/generated.go +++ b/internal/graph/generated/generated.go @@ -77,6 +77,7 @@ type ComplexityRoot struct { Book struct { Authors func(childComplexity int) int CalibreID func(childComplexity int) int + Covers func(childComplexity int) int CreateTime func(childComplexity int) int Description func(childComplexity int) int Files func(childComplexity int) int @@ -102,6 +103,30 @@ type ComplexityRoot struct { TotalCount func(childComplexity int) int } + BookCover struct { + Book func(childComplexity int) int + ContentType func(childComplexity int) int + CreateTime func(childComplexity int) int + Height func(childComplexity int) int + ID func(childComplexity int) int + Path func(childComplexity int) int + Size func(childComplexity int) int + URL func(childComplexity int) int + UpdateTime func(childComplexity int) int + Width func(childComplexity int) int + } + + BookCoverConnection struct { + Edges func(childComplexity int) int + PageInfo func(childComplexity int) int + TotalCount func(childComplexity int) int + } + + BookCoverEdge struct { + Cursor func(childComplexity int) int + Node func(childComplexity int) int + } + BookEdge struct { Cursor func(childComplexity int) int Node func(childComplexity int) int @@ -210,6 +235,7 @@ type ComplexityRoot struct { Query struct { Authors func(childComplexity int, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.AuthorOrder, where *ent.AuthorWhereInput) int + BookCovers func(childComplexity int, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy *ent.BookCoverOrder, where *ent.BookCoverWhereInput) int BookFiles func(childComplexity int) int Books func(childComplexity int, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.BookOrder, where *ent.BookWhereInput) int Identifiers func(childComplexity int, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.IdentifierOrder, where *ent.IdentifierWhereInput) int @@ -360,6 +386,7 @@ type QueryResolver interface { Nodes(ctx context.Context, ids []ksuid.ID) ([]ent.Noder, error) Authors(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.AuthorOrder, where *ent.AuthorWhereInput) (*ent.AuthorConnection, error) Books(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.BookOrder, where *ent.BookWhereInput) (*ent.BookConnection, error) + BookCovers(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy *ent.BookCoverOrder, where *ent.BookCoverWhereInput) (*ent.BookCoverConnection, error) BookFiles(ctx context.Context) ([]*ent.BookFile, error) Identifiers(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.IdentifierOrder, where *ent.IdentifierWhereInput) (*ent.IdentifierConnection, error) Languages(ctx context.Context, after *entgql.Cursor[ksuid.ID], first *int, before *entgql.Cursor[ksuid.ID], last *int, orderBy []*ent.LanguageOrder, where *ent.LanguageWhereInput) (*ent.LanguageConnection, error) @@ -501,6 +528,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Book.CalibreID(childComplexity), true + case "Book.covers": + if e.complexity.Book.Covers == nil { + break + } + + return e.complexity.Book.Covers(childComplexity), true + case "Book.createTime": if e.complexity.Book.CreateTime == nil { break @@ -641,6 +675,111 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.BookConnection.TotalCount(childComplexity), true + case "BookCover.book": + if e.complexity.BookCover.Book == nil { + break + } + + return e.complexity.BookCover.Book(childComplexity), true + + case "BookCover.contenttype": + if e.complexity.BookCover.ContentType == nil { + break + } + + return e.complexity.BookCover.ContentType(childComplexity), true + + case "BookCover.createTime": + if e.complexity.BookCover.CreateTime == nil { + break + } + + return e.complexity.BookCover.CreateTime(childComplexity), true + + case "BookCover.height": + if e.complexity.BookCover.Height == nil { + break + } + + return e.complexity.BookCover.Height(childComplexity), true + + case "BookCover.id": + if e.complexity.BookCover.ID == nil { + break + } + + return e.complexity.BookCover.ID(childComplexity), true + + case "BookCover.path": + if e.complexity.BookCover.Path == nil { + break + } + + return e.complexity.BookCover.Path(childComplexity), true + + case "BookCover.size": + if e.complexity.BookCover.Size == nil { + break + } + + return e.complexity.BookCover.Size(childComplexity), true + + case "BookCover.url": + if e.complexity.BookCover.URL == nil { + break + } + + return e.complexity.BookCover.URL(childComplexity), true + + case "BookCover.updateTime": + if e.complexity.BookCover.UpdateTime == nil { + break + } + + return e.complexity.BookCover.UpdateTime(childComplexity), true + + case "BookCover.width": + if e.complexity.BookCover.Width == nil { + break + } + + return e.complexity.BookCover.Width(childComplexity), true + + case "BookCoverConnection.edges": + if e.complexity.BookCoverConnection.Edges == nil { + break + } + + return e.complexity.BookCoverConnection.Edges(childComplexity), true + + case "BookCoverConnection.pageInfo": + if e.complexity.BookCoverConnection.PageInfo == nil { + break + } + + return e.complexity.BookCoverConnection.PageInfo(childComplexity), true + + case "BookCoverConnection.totalCount": + if e.complexity.BookCoverConnection.TotalCount == nil { + break + } + + return e.complexity.BookCoverConnection.TotalCount(childComplexity), true + + case "BookCoverEdge.cursor": + if e.complexity.BookCoverEdge.Cursor == nil { + break + } + + return e.complexity.BookCoverEdge.Cursor(childComplexity), true + + case "BookCoverEdge.node": + if e.complexity.BookCoverEdge.Node == nil { + break + } + + return e.complexity.BookCoverEdge.Node(childComplexity), true + case "BookEdge.cursor": if e.complexity.BookEdge.Cursor == nil { break @@ -1227,6 +1366,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Authors(childComplexity, args["after"].(*entgql.Cursor[ksuid.ID]), args["first"].(*int), args["before"].(*entgql.Cursor[ksuid.ID]), args["last"].(*int), args["orderBy"].([]*ent.AuthorOrder), args["where"].(*ent.AuthorWhereInput)), true + case "Query.bookCovers": + if e.complexity.Query.BookCovers == nil { + break + } + + args, err := ec.field_Query_bookCovers_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Query.BookCovers(childComplexity, args["after"].(*entgql.Cursor[ksuid.ID]), args["first"].(*int), args["before"].(*entgql.Cursor[ksuid.ID]), args["last"].(*int), args["orderBy"].(*ent.BookCoverOrder), args["where"].(*ent.BookCoverWhereInput)), true + case "Query.bookFiles": if e.complexity.Query.BookFiles == nil { break @@ -1850,6 +2001,8 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { inputUnmarshalMap := graphql.BuildUnmarshalerMap( ec.unmarshalInputAuthorOrder, ec.unmarshalInputAuthorWhereInput, + ec.unmarshalInputBookCoverOrder, + ec.unmarshalInputBookCoverWhereInput, ec.unmarshalInputBookFileWhereInput, ec.unmarshalInputBookOrder, ec.unmarshalInputBookWhereInput, @@ -1999,49 +2152,83 @@ type Author implements Node { sort: String! link: String books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type AuthorConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [AuthorEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type AuthorEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Author - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Author connections""" +""" +Ordering options for Author connections +""" input AuthorOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Authors.""" + """ + The field by which to order Authors. + """ field: AuthorOrderField! } -"""Properties by which Author connections can be ordered.""" +""" +Properties by which Author connections can be ordered. +""" enum AuthorOrderField { NAME BOOKS_COUNT @@ -2054,7 +2241,9 @@ input AuthorWhereInput { not: AuthorWhereInput and: [AuthorWhereInput!] or: [AuthorWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2063,7 +2252,9 @@ input AuthorWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2072,7 +2263,9 @@ input AuthorWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2081,7 +2274,9 @@ input AuthorWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -2092,7 +2287,9 @@ input AuthorWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -2106,7 +2303,9 @@ input AuthorWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -2120,7 +2319,9 @@ input AuthorWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """link field predicates""" + """ + link field predicates + """ link: String linkNEQ: String linkIn: [String!] @@ -2136,7 +2337,9 @@ input AuthorWhereInput { linkNotNil: Boolean linkEqualFold: String linkContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -2160,21 +2363,240 @@ type Book implements Node { language: [Language!] shelf: [Shelf!] files: [BookFile!] + covers: [BookCover!] } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type BookConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [BookEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +type BookCover implements Node { + id: ID! + createTime: Time! + updateTime: Time! + path: String! + """ + Size in bytes + """ + size: Int! + """ + Width in pixels + """ + width: Int! + """ + Height in pixels + """ + height: Int! + """ + URL to the image + """ + url: String! + """ + MIME type + """ + contenttype: String! @goField(name: "ContentType", forceResolver: false) + book: Book! +} +""" +A connection to a list of items. +""" +type BookCoverConnection { + """ + A list of edges. + """ + edges: [BookCoverEdge] + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! + """ + Identifies the total count of items in the connection. + """ + totalCount: Int! +} +""" +An edge in a connection. +""" +type BookCoverEdge { + """ + The item at the end of the edge. + """ + node: BookCover + """ + A cursor for use in pagination. + """ + cursor: Cursor! +} +""" +Ordering options for BookCover connections +""" +input BookCoverOrder { + """ + The ordering direction. + """ + direction: OrderDirection! = ASC + """ + The field by which to order BookCovers. + """ + field: BookCoverOrderField! +} +""" +Properties by which BookCover connections can be ordered. +""" +enum BookCoverOrderField { + SIZE +} +""" +BookCoverWhereInput is used for filtering BookCover objects. +Input was generated by ent. +""" +input BookCoverWhereInput { + not: BookCoverWhereInput + and: [BookCoverWhereInput!] + or: [BookCoverWhereInput!] + """ + id field predicates + """ + id: ID + idNEQ: ID + idIn: [ID!] + idNotIn: [ID!] + idGT: ID + idGTE: ID + idLT: ID + idLTE: ID + """ + create_time field predicates + """ + createTime: Time + createTimeNEQ: Time + createTimeIn: [Time!] + createTimeNotIn: [Time!] + createTimeGT: Time + createTimeGTE: Time + createTimeLT: Time + createTimeLTE: Time + """ + update_time field predicates + """ + updateTime: Time + updateTimeNEQ: Time + updateTimeIn: [Time!] + updateTimeNotIn: [Time!] + updateTimeGT: Time + updateTimeGTE: Time + updateTimeLT: Time + updateTimeLTE: Time + """ + path field predicates + """ + path: String + pathNEQ: String + pathIn: [String!] + pathNotIn: [String!] + pathGT: String + pathGTE: String + pathLT: String + pathLTE: String + pathContains: String + pathHasPrefix: String + pathHasSuffix: String + pathEqualFold: String + pathContainsFold: String + """ + size field predicates + """ + size: Int + sizeNEQ: Int + sizeIn: [Int!] + sizeNotIn: [Int!] + sizeGT: Int + sizeGTE: Int + sizeLT: Int + sizeLTE: Int + """ + width field predicates + """ + width: Int + widthNEQ: Int + widthIn: [Int!] + widthNotIn: [Int!] + widthGT: Int + widthGTE: Int + widthLT: Int + widthLTE: Int + """ + height field predicates + """ + height: Int + heightNEQ: Int + heightIn: [Int!] + heightNotIn: [Int!] + heightGT: Int + heightGTE: Int + heightLT: Int + heightLTE: Int + """ + url field predicates + """ + url: String + urlNEQ: String + urlIn: [String!] + urlNotIn: [String!] + urlGT: String + urlGTE: String + urlLT: String + urlLTE: String + urlContains: String + urlHasPrefix: String + urlHasSuffix: String + urlEqualFold: String + urlContainsFold: String + """ + contentType field predicates + """ + contenttype: String + contenttypeNEQ: String + contenttypeIn: [String!] + contenttypeNotIn: [String!] + contenttypeGT: String + contenttypeGTE: String + contenttypeLT: String + contenttypeLTE: String + contenttypeContains: String + contenttypeHasPrefix: String + contenttypeHasSuffix: String + contenttypeEqualFold: String + contenttypeContainsFold: String + """ + book edge predicates + """ + hasBook: Boolean + hasBookWith: [BookWhereInput!] +} +""" +An edge in a connection. +""" type BookEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Book - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } type BookFile implements Node { @@ -2183,12 +2605,16 @@ type BookFile implements Node { updateTime: Time! name: String! path: String! - """Size in bytes""" + """ + Size in bytes + """ size: Int! format: BookFileFormat! book: Book! } -"""BookFileFormat is enum for the field format""" +""" +BookFileFormat is enum for the field format +""" enum BookFileFormat @goModel(model: "lybbrio/internal/ent/bookfile.Format") { EPUB KEPUB @@ -2201,7 +2627,9 @@ input BookFileWhereInput { not: BookFileWhereInput and: [BookFileWhereInput!] or: [BookFileWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2210,7 +2638,9 @@ input BookFileWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2219,7 +2649,9 @@ input BookFileWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2228,7 +2660,9 @@ input BookFileWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -2242,7 +2676,9 @@ input BookFileWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """path field predicates""" + """ + path field predicates + """ path: String pathNEQ: String pathIn: [String!] @@ -2256,7 +2692,9 @@ input BookFileWhereInput { pathHasSuffix: String pathEqualFold: String pathContainsFold: String - """size field predicates""" + """ + size field predicates + """ size: Int sizeNEQ: Int sizeIn: [Int!] @@ -2265,23 +2703,35 @@ input BookFileWhereInput { sizeGTE: Int sizeLT: Int sizeLTE: Int - """format field predicates""" + """ + format field predicates + """ format: BookFileFormat formatNEQ: BookFileFormat formatIn: [BookFileFormat!] formatNotIn: [BookFileFormat!] - """book edge predicates""" + """ + book edge predicates + """ hasBook: Boolean hasBookWith: [BookWhereInput!] } -"""Ordering options for Book connections""" +""" +Ordering options for Book connections +""" input BookOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Books.""" + """ + The field by which to order Books. + """ field: BookOrderField! } -"""Properties by which Book connections can be ordered.""" +""" +Properties by which Book connections can be ordered. +""" enum BookOrderField { TITLE NAME @@ -2297,7 +2747,9 @@ input BookWhereInput { not: BookWhereInput and: [BookWhereInput!] or: [BookWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2306,7 +2758,9 @@ input BookWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2315,7 +2769,9 @@ input BookWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2324,7 +2780,9 @@ input BookWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -2335,7 +2793,9 @@ input BookWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """title field predicates""" + """ + title field predicates + """ title: String titleNEQ: String titleIn: [String!] @@ -2349,7 +2809,9 @@ input BookWhereInput { titleHasSuffix: String titleEqualFold: String titleContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -2363,7 +2825,9 @@ input BookWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """published_date field predicates""" + """ + published_date field predicates + """ publishedDate: Time publishedDateNEQ: Time publishedDateIn: [Time!] @@ -2374,7 +2838,9 @@ input BookWhereInput { publishedDateLTE: Time publishedDateIsNil: Boolean publishedDateNotNil: Boolean - """path field predicates""" + """ + path field predicates + """ path: String pathNEQ: String pathIn: [String!] @@ -2388,7 +2854,9 @@ input BookWhereInput { pathHasSuffix: String pathEqualFold: String pathContainsFold: String - """isbn field predicates""" + """ + isbn field predicates + """ isbn: String isbnNEQ: String isbnIn: [String!] @@ -2404,7 +2872,9 @@ input BookWhereInput { isbnNotNil: Boolean isbnEqualFold: String isbnContainsFold: String - """description field predicates""" + """ + description field predicates + """ description: String descriptionNEQ: String descriptionIn: [String!] @@ -2420,7 +2890,9 @@ input BookWhereInput { descriptionNotNil: Boolean descriptionEqualFold: String descriptionContainsFold: String - """series_index field predicates""" + """ + series_index field predicates + """ seriesIndex: Float seriesIndexNEQ: Float seriesIndexIn: [Float!] @@ -2431,30 +2903,51 @@ input BookWhereInput { seriesIndexLTE: Float seriesIndexIsNil: Boolean seriesIndexNotNil: Boolean - """authors edge predicates""" + """ + authors edge predicates + """ hasAuthors: Boolean hasAuthorsWith: [AuthorWhereInput!] - """publisher edge predicates""" + """ + publisher edge predicates + """ hasPublisher: Boolean hasPublisherWith: [PublisherWhereInput!] - """series edge predicates""" + """ + series edge predicates + """ hasSeries: Boolean hasSeriesWith: [SeriesWhereInput!] - """identifiers edge predicates""" + """ + identifiers edge predicates + """ hasIdentifiers: Boolean hasIdentifiersWith: [IdentifierWhereInput!] - """tags edge predicates""" + """ + tags edge predicates + """ hasTags: Boolean hasTagsWith: [TagWhereInput!] - """language edge predicates""" + """ + language edge predicates + """ hasLanguage: Boolean hasLanguageWith: [LanguageWhereInput!] - """shelf edge predicates""" + """ + shelf edge predicates + """ hasShelf: Boolean hasShelfWith: [ShelfWhereInput!] - """files edge predicates""" + """ + files edge predicates + """ hasFiles: Boolean hasFilesWith: [BookFileWhereInput!] + """ + covers edge predicates + """ + hasCovers: Boolean + hasCoversWith: [BookCoverWhereInput!] } """ CreateAuthorInput is used for create Author object. @@ -2492,6 +2985,7 @@ input CreateBookInput { languageIDs: [ID!] shelfIDs: [ID!] fileIDs: [ID!] + coverIDs: [ID!] } """ CreateIdentifierInput is used for create Identifier object. @@ -2574,30 +3068,52 @@ type Identifier implements Node { value: String! book: Book! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type IdentifierConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [IdentifierEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type IdentifierEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Identifier - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Identifier connections""" +""" +Ordering options for Identifier connections +""" input IdentifierOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Identifiers.""" + """ + The field by which to order Identifiers. + """ field: IdentifierOrderField! } -"""Properties by which Identifier connections can be ordered.""" +""" +Properties by which Identifier connections can be ordered. +""" enum IdentifierOrderField { TYPE VALUE @@ -2610,7 +3126,9 @@ input IdentifierWhereInput { not: IdentifierWhereInput and: [IdentifierWhereInput!] or: [IdentifierWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2619,7 +3137,9 @@ input IdentifierWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2628,7 +3148,9 @@ input IdentifierWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2637,7 +3159,9 @@ input IdentifierWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -2648,7 +3172,9 @@ input IdentifierWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """type field predicates""" + """ + type field predicates + """ type: String typeNEQ: String typeIn: [String!] @@ -2662,7 +3188,9 @@ input IdentifierWhereInput { typeHasSuffix: String typeEqualFold: String typeContainsFold: String - """value field predicates""" + """ + value field predicates + """ value: String valueNEQ: String valueIn: [String!] @@ -2676,7 +3204,9 @@ input IdentifierWhereInput { valueHasSuffix: String valueEqualFold: String valueContainsFold: String - """book edge predicates""" + """ + book edge predicates + """ hasBook: Boolean hasBookWith: [BookWhereInput!] } @@ -2687,49 +3217,83 @@ type Language implements Node { calibreID: Int code: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type LanguageConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [LanguageEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type LanguageEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Language - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Language connections""" +""" +Ordering options for Language connections +""" input LanguageOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Languages.""" + """ + The field by which to order Languages. + """ field: LanguageOrderField! } -"""Properties by which Language connections can be ordered.""" +""" +Properties by which Language connections can be ordered. +""" enum LanguageOrderField { BOOKS_COUNT } @@ -2741,7 +3305,9 @@ input LanguageWhereInput { not: LanguageWhereInput and: [LanguageWhereInput!] or: [LanguageWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2750,7 +3316,9 @@ input LanguageWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2759,7 +3327,9 @@ input LanguageWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2768,7 +3338,9 @@ input LanguageWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -2779,7 +3351,9 @@ input LanguageWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """code field predicates""" + """ + code field predicates + """ code: String codeNEQ: String codeIn: [String!] @@ -2793,7 +3367,9 @@ input LanguageWhereInput { codeHasSuffix: String codeEqualFold: String codeContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -2802,14 +3378,22 @@ An object with an ID. Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm) """ interface Node @goModel(model: "lybbrio/internal/ent.Noder") { - """The id of the object.""" + """ + The id of the object. + """ id: ID! } -"""Possible directions in which to order a list of items when provided an ` + "`" + `orderBy` + "`" + ` argument.""" +""" +Possible directions in which to order a list of items when provided an ` + "`" + `orderBy` + "`" + ` argument. +""" enum OrderDirection { - """Specifies an ascending order for a given ` + "`" + `orderBy` + "`" + ` argument.""" + """ + Specifies an ascending order for a given ` + "`" + `orderBy` + "`" + ` argument. + """ ASC - """Specifies a descending order for a given ` + "`" + `orderBy` + "`" + ` argument.""" + """ + Specifies a descending order for a given ` + "`" + `orderBy` + "`" + ` argument. + """ DESC } """ @@ -2817,13 +3401,21 @@ Information about pagination in a connection. https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo """ type PageInfo { - """When paginating forwards, are there more items?""" + """ + When paginating forwards, are there more items? + """ hasNextPage: Boolean! - """When paginating backwards, are there more items?""" + """ + When paginating backwards, are there more items? + """ hasPreviousPage: Boolean! - """When paginating backwards, the cursor to continue.""" + """ + When paginating backwards, the cursor to continue. + """ startCursor: Cursor - """When paginating forwards, the cursor to continue.""" + """ + When paginating forwards, the cursor to continue. + """ endCursor: Cursor } type Publisher implements Node { @@ -2833,49 +3425,83 @@ type Publisher implements Node { calibreID: Int name: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type PublisherConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [PublisherEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type PublisherEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Publisher - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Publisher connections""" +""" +Ordering options for Publisher connections +""" input PublisherOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Publishers.""" + """ + The field by which to order Publishers. + """ field: PublisherOrderField! } -"""Properties by which Publisher connections can be ordered.""" +""" +Properties by which Publisher connections can be ordered. +""" enum PublisherOrderField { NAME BOOKS_COUNT @@ -2888,7 +3514,9 @@ input PublisherWhereInput { not: PublisherWhereInput and: [PublisherWhereInput!] or: [PublisherWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -2897,7 +3525,9 @@ input PublisherWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -2906,7 +3536,9 @@ input PublisherWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -2915,7 +3547,9 @@ input PublisherWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -2926,7 +3560,9 @@ input PublisherWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -2940,191 +3576,340 @@ input PublisherWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } type Query { - """Fetches an object given its ID.""" + """ + Fetches an object given its ID. + """ node( - """ID of the object.""" + """ + ID of the object. + """ id: ID! ): Node - """Lookup nodes by a list of IDs.""" + """ + Lookup nodes by a list of IDs. + """ nodes( - """The list of node IDs.""" + """ + The list of node IDs. + """ ids: [ID!]! ): [Node]! authors( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Authors returned from the connection.""" + """ + Ordering options for Authors returned from the connection. + """ orderBy: [AuthorOrder!] - """Filtering options for Authors returned from the connection.""" + """ + Filtering options for Authors returned from the connection. + """ where: AuthorWhereInput ): AuthorConnection! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! + bookCovers( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: Cursor + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: Cursor + + """ + Returns the last _n_ elements from the list. + """ + last: Int + + """ + Ordering options for BookCovers returned from the connection. + """ + orderBy: BookCoverOrder + + """ + Filtering options for BookCovers returned from the connection. + """ + where: BookCoverWhereInput + ): BookCoverConnection! bookFiles: [BookFile!]! identifiers( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Identifiers returned from the connection.""" + """ + Ordering options for Identifiers returned from the connection. + """ orderBy: [IdentifierOrder!] - """Filtering options for Identifiers returned from the connection.""" + """ + Filtering options for Identifiers returned from the connection. + """ where: IdentifierWhereInput ): IdentifierConnection! languages( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Languages returned from the connection.""" + """ + Ordering options for Languages returned from the connection. + """ orderBy: [LanguageOrder!] - """Filtering options for Languages returned from the connection.""" + """ + Filtering options for Languages returned from the connection. + """ where: LanguageWhereInput ): LanguageConnection! publishers( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Publishers returned from the connection.""" + """ + Ordering options for Publishers returned from the connection. + """ orderBy: [PublisherOrder!] - """Filtering options for Publishers returned from the connection.""" + """ + Filtering options for Publishers returned from the connection. + """ where: PublisherWhereInput ): PublisherConnection! seriesSlice( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for SeriesSlice returned from the connection.""" + """ + Ordering options for SeriesSlice returned from the connection. + """ orderBy: [SeriesOrder!] - """Filtering options for SeriesSlice returned from the connection.""" + """ + Filtering options for SeriesSlice returned from the connection. + """ where: SeriesWhereInput ): SeriesConnection! shelves( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Shelves returned from the connection.""" + """ + Ordering options for Shelves returned from the connection. + """ orderBy: [ShelfOrder!] - """Filtering options for Shelves returned from the connection.""" + """ + Filtering options for Shelves returned from the connection. + """ where: ShelfWhereInput ): ShelfConnection! tags( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Tags returned from the connection.""" + """ + Ordering options for Tags returned from the connection. + """ orderBy: [TagOrder!] - """Filtering options for Tags returned from the connection.""" + """ + Filtering options for Tags returned from the connection. + """ where: TagWhereInput ): TagConnection! tasks( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Tasks returned from the connection.""" + """ + Ordering options for Tasks returned from the connection. + """ orderBy: [TaskOrder!] - """Filtering options for Tasks returned from the connection.""" + """ + Filtering options for Tasks returned from the connection. + """ where: TaskWhereInput ): TaskConnection! users: [User!]! @@ -3138,30 +3923,52 @@ type Series implements Node { sort: String! books: [Book!] } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type SeriesConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [SeriesEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type SeriesEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Series - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Series connections""" +""" +Ordering options for Series connections +""" input SeriesOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order SeriesSlice.""" + """ + The field by which to order SeriesSlice. + """ field: SeriesOrderField! } -"""Properties by which Series connections can be ordered.""" +""" +Properties by which Series connections can be ordered. +""" enum SeriesOrderField { NAME } @@ -3173,7 +3980,9 @@ input SeriesWhereInput { not: SeriesWhereInput and: [SeriesWhereInput!] or: [SeriesWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3182,7 +3991,9 @@ input SeriesWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -3191,7 +4002,9 @@ input SeriesWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -3200,7 +4013,9 @@ input SeriesWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -3211,7 +4026,9 @@ input SeriesWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -3225,7 +4042,9 @@ input SeriesWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """sort field predicates""" + """ + sort field predicates + """ sort: String sortNEQ: String sortIn: [String!] @@ -3239,7 +4058,9 @@ input SeriesWhereInput { sortHasSuffix: String sortEqualFold: String sortContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -3253,49 +4074,83 @@ type Shelf implements Node { description: String user: User! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type ShelfConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [ShelfEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type ShelfEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Shelf - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Shelf connections""" +""" +Ordering options for Shelf connections +""" input ShelfOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Shelves.""" + """ + The field by which to order Shelves. + """ field: ShelfOrderField! } -"""Properties by which Shelf connections can be ordered.""" +""" +Properties by which Shelf connections can be ordered. +""" enum ShelfOrderField { NAME BOOKS_COUNT @@ -3308,7 +4163,9 @@ input ShelfWhereInput { not: ShelfWhereInput and: [ShelfWhereInput!] or: [ShelfWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3317,7 +4174,9 @@ input ShelfWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -3326,7 +4185,9 @@ input ShelfWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -3335,10 +4196,14 @@ input ShelfWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """public field predicates""" + """ + public field predicates + """ public: Boolean publicNEQ: Boolean - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -3352,7 +4217,9 @@ input ShelfWhereInput { userIDHasSuffix: ID userIDEqualFold: ID userIDContainsFold: ID - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -3366,7 +4233,9 @@ input ShelfWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """description field predicates""" + """ + description field predicates + """ description: String descriptionNEQ: String descriptionIn: [String!] @@ -3382,10 +4251,14 @@ input ShelfWhereInput { descriptionNotNil: Boolean descriptionEqualFold: String descriptionContainsFold: String - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -3394,49 +4267,83 @@ type Tag implements Node { calibreID: Int name: String! books( - """Returns the elements in the list that come after the specified cursor.""" + """ + Returns the elements in the list that come after the specified cursor. + """ after: Cursor - """Returns the first _n_ elements from the list.""" + """ + Returns the first _n_ elements from the list. + """ first: Int - """Returns the elements in the list that come before the specified cursor.""" + """ + Returns the elements in the list that come before the specified cursor. + """ before: Cursor - """Returns the last _n_ elements from the list.""" + """ + Returns the last _n_ elements from the list. + """ last: Int - """Ordering options for Books returned from the connection.""" + """ + Ordering options for Books returned from the connection. + """ orderBy: [BookOrder!] - """Filtering options for Books returned from the connection.""" + """ + Filtering options for Books returned from the connection. + """ where: BookWhereInput ): BookConnection! } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type TagConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [TagEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type TagEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Tag - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Tag connections""" +""" +Ordering options for Tag connections +""" input TagOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Tags.""" + """ + The field by which to order Tags. + """ field: TagOrderField! } -"""Properties by which Tag connections can be ordered.""" +""" +Properties by which Tag connections can be ordered. +""" enum TagOrderField { NAME BOOKS_COUNT @@ -3449,7 +4356,9 @@ input TagWhereInput { not: TagWhereInput and: [TagWhereInput!] or: [TagWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3458,7 +4367,9 @@ input TagWhereInput { idGTE: ID idLT: ID idLTE: ID - """calibre_id field predicates""" + """ + calibre_id field predicates + """ calibreID: Int calibreIDNEQ: Int calibreIDIn: [Int!] @@ -3469,7 +4380,9 @@ input TagWhereInput { calibreIDLTE: Int calibreIDIsNil: Boolean calibreIDNotNil: Boolean - """name field predicates""" + """ + name field predicates + """ name: String nameNEQ: String nameIn: [String!] @@ -3483,7 +4396,9 @@ input TagWhereInput { nameHasSuffix: String nameEqualFold: String nameContainsFold: String - """books edge predicates""" + """ + books edge predicates + """ hasBooks: Boolean hasBooksWith: [BookWhereInput!] } @@ -3493,54 +4408,90 @@ type Task implements Node { updateTime: Time! type: TaskTaskType! status: TaskStatus! - """Progress of the task. 0-1""" + """ + Progress of the task. 0-1 + """ progress: Float! - """Message of the task""" + """ + Message of the task + """ message: String - """Error message of the task""" + """ + Error message of the task + """ error: String - """The user who created this task. Empty for System Task""" + """ + The user who created this task. Empty for System Task + """ userID: ID - """Whether this task is created by the system""" + """ + Whether this task is created by the system + """ isSystemTask: Boolean! user: User } -"""A connection to a list of items.""" +""" +A connection to a list of items. +""" type TaskConnection { - """A list of edges.""" + """ + A list of edges. + """ edges: [TaskEdge] - """Information to aid in pagination.""" + """ + Information to aid in pagination. + """ pageInfo: PageInfo! - """Identifies the total count of items in the connection.""" + """ + Identifies the total count of items in the connection. + """ totalCount: Int! } -"""An edge in a connection.""" +""" +An edge in a connection. +""" type TaskEdge { - """The item at the end of the edge.""" + """ + The item at the end of the edge. + """ node: Task - """A cursor for use in pagination.""" + """ + A cursor for use in pagination. + """ cursor: Cursor! } -"""Ordering options for Task connections""" +""" +Ordering options for Task connections +""" input TaskOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Tasks.""" + """ + The field by which to order Tasks. + """ field: TaskOrderField! } -"""Properties by which Task connections can be ordered.""" +""" +Properties by which Task connections can be ordered. +""" enum TaskOrderField { TYPE STATUS } -"""TaskStatus is enum for the field status""" +""" +TaskStatus is enum for the field status +""" enum TaskStatus @goModel(model: "lybbrio/internal/ent/schema/task_enums.Status") { pending in_progress success failure } -"""TaskTaskType is enum for the field type""" +""" +TaskTaskType is enum for the field type +""" enum TaskTaskType @goModel(model: "lybbrio/internal/ent/schema/task_enums.TaskType") { noop calibre_import @@ -3553,7 +4504,9 @@ input TaskWhereInput { not: TaskWhereInput and: [TaskWhereInput!] or: [TaskWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3562,7 +4515,9 @@ input TaskWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -3571,7 +4526,9 @@ input TaskWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -3580,17 +4537,23 @@ input TaskWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """type field predicates""" + """ + type field predicates + """ type: TaskTaskType typeNEQ: TaskTaskType typeIn: [TaskTaskType!] typeNotIn: [TaskTaskType!] - """status field predicates""" + """ + status field predicates + """ status: TaskStatus statusNEQ: TaskStatus statusIn: [TaskStatus!] statusNotIn: [TaskStatus!] - """progress field predicates""" + """ + progress field predicates + """ progress: Float progressNEQ: Float progressIn: [Float!] @@ -3599,7 +4562,9 @@ input TaskWhereInput { progressGTE: Float progressLT: Float progressLTE: Float - """message field predicates""" + """ + message field predicates + """ message: String messageNEQ: String messageIn: [String!] @@ -3615,7 +4580,9 @@ input TaskWhereInput { messageNotNil: Boolean messageEqualFold: String messageContainsFold: String - """error field predicates""" + """ + error field predicates + """ error: String errorNEQ: String errorIn: [String!] @@ -3631,7 +4598,9 @@ input TaskWhereInput { errorNotNil: Boolean errorEqualFold: String errorContainsFold: String - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -3647,14 +4616,20 @@ input TaskWhereInput { userIDNotNil: Boolean userIDEqualFold: ID userIDContainsFold: ID - """is_system_task field predicates""" + """ + is_system_task field predicates + """ isSystemTask: Boolean isSystemTaskNEQ: Boolean - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] } -"""The builtin Time type""" +""" +The builtin Time type +""" scalar Time """ UpdateAuthorInput is used for update Author object. @@ -3715,6 +4690,9 @@ input UpdateBookInput { addFileIDs: [ID!] removeFileIDs: [ID!] clearFiles: Boolean + addCoverIDs: [ID!] + removeCoverIDs: [ID!] + clearCovers: Boolean } """ UpdateIdentifierInput is used for update Identifier object. @@ -3815,14 +4793,22 @@ type User implements Node { shelves: [Shelf!] userPermissions: UserPermissions! } -"""Ordering options for User connections""" +""" +Ordering options for User connections +""" input UserOrder { - """The ordering direction.""" + """ + The ordering direction. + """ direction: OrderDirection! = ASC - """The field by which to order Users.""" + """ + The field by which to order Users. + """ field: UserOrderField! } -"""Properties by which User connections can be ordered.""" +""" +Properties by which User connections can be ordered. +""" enum UserOrderField { USERNAME } @@ -3844,7 +4830,9 @@ input UserPermissionsWhereInput { not: UserPermissionsWhereInput and: [UserPermissionsWhereInput!] or: [UserPermissionsWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3853,7 +4841,9 @@ input UserPermissionsWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -3862,7 +4852,9 @@ input UserPermissionsWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -3871,7 +4863,9 @@ input UserPermissionsWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """user_id field predicates""" + """ + user_id field predicates + """ userID: ID userIDNEQ: ID userIDIn: [ID!] @@ -3887,16 +4881,24 @@ input UserPermissionsWhereInput { userIDNotNil: Boolean userIDEqualFold: ID userIDContainsFold: ID - """Admin field predicates""" + """ + Admin field predicates + """ admin: Boolean adminNEQ: Boolean - """CanCreatePublic field predicates""" + """ + CanCreatePublic field predicates + """ cancreatepublic: Boolean cancreatepublicNEQ: Boolean - """CanEdit field predicates""" + """ + CanEdit field predicates + """ canedit: Boolean caneditNEQ: Boolean - """user edge predicates""" + """ + user edge predicates + """ hasUser: Boolean hasUserWith: [UserWhereInput!] } @@ -3908,7 +4910,9 @@ input UserWhereInput { not: UserWhereInput and: [UserWhereInput!] or: [UserWhereInput!] - """id field predicates""" + """ + id field predicates + """ id: ID idNEQ: ID idIn: [ID!] @@ -3917,7 +4921,9 @@ input UserWhereInput { idGTE: ID idLT: ID idLTE: ID - """create_time field predicates""" + """ + create_time field predicates + """ createTime: Time createTimeNEQ: Time createTimeIn: [Time!] @@ -3926,7 +4932,9 @@ input UserWhereInput { createTimeGTE: Time createTimeLT: Time createTimeLTE: Time - """update_time field predicates""" + """ + update_time field predicates + """ updateTime: Time updateTimeNEQ: Time updateTimeIn: [Time!] @@ -3935,7 +4943,9 @@ input UserWhereInput { updateTimeGTE: Time updateTimeLT: Time updateTimeLTE: Time - """username field predicates""" + """ + username field predicates + """ username: String usernameNEQ: String usernameIn: [String!] @@ -3949,7 +4959,9 @@ input UserWhereInput { usernameHasSuffix: String usernameEqualFold: String usernameContainsFold: String - """email field predicates""" + """ + email field predicates + """ email: String emailNEQ: String emailIn: [String!] @@ -3963,10 +4975,14 @@ input UserWhereInput { emailHasSuffix: String emailEqualFold: String emailContainsFold: String - """shelves edge predicates""" + """ + shelves edge predicates + """ hasShelves: Boolean hasShelvesWith: [ShelfWhereInput!] - """user_permissions edge predicates""" + """ + user_permissions edge predicates + """ hasUserPermissions: Boolean hasUserPermissionsWith: [UserPermissionsWhereInput!] } @@ -4669,7 +5685,67 @@ func (ec *executionContext) field_Query_authors_args(ctx context.Context, rawArg return args, nil } -func (ec *executionContext) field_Query_books_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_Query_bookCovers_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *entgql.Cursor[ksuid.ID] + if tmp, ok := rawArgs["after"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("after")) + arg0, err = ec.unmarshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, tmp) + if err != nil { + return nil, err + } + } + args["after"] = arg0 + var arg1 *int + if tmp, ok := rawArgs["first"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("first")) + arg1, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["first"] = arg1 + var arg2 *entgql.Cursor[ksuid.ID] + if tmp, ok := rawArgs["before"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("before")) + arg2, err = ec.unmarshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, tmp) + if err != nil { + return nil, err + } + } + args["before"] = arg2 + var arg3 *int + if tmp, ok := rawArgs["last"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("last")) + arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp) + if err != nil { + return nil, err + } + } + args["last"] = arg3 + var arg4 *ent.BookCoverOrder + if tmp, ok := rawArgs["orderBy"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("orderBy")) + arg4, err = ec.unmarshalOBookCoverOrder2ᚖlybbrioᚋinternalᚋentᚐBookCoverOrder(ctx, tmp) + if err != nil { + return nil, err + } + } + args["orderBy"] = arg4 + var arg5 *ent.BookCoverWhereInput + if tmp, ok := rawArgs["where"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("where")) + arg5, err = ec.unmarshalOBookCoverWhereInput2ᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["where"] = arg5 + return args, nil +} + +func (ec *executionContext) field_Query_books_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} var arg0 *entgql.Cursor[ksuid.ID] @@ -6873,6 +7949,69 @@ func (ec *executionContext) fieldContext_Book_files(ctx context.Context, field g return fc, nil } +func (ec *executionContext) _Book_covers(ctx context.Context, field graphql.CollectedField, obj *ent.Book) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Book_covers(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Covers(ctx) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]*ent.BookCover) + fc.Result = res + return ec.marshalOBookCover2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Book_covers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Book", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "id": + return ec.fieldContext_BookCover_id(ctx, field) + case "createTime": + return ec.fieldContext_BookCover_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_BookCover_updateTime(ctx, field) + case "path": + return ec.fieldContext_BookCover_path(ctx, field) + case "size": + return ec.fieldContext_BookCover_size(ctx, field) + case "width": + return ec.fieldContext_BookCover_width(ctx, field) + case "height": + return ec.fieldContext_BookCover_height(ctx, field) + case "url": + return ec.fieldContext_BookCover_url(ctx, field) + case "contenttype": + return ec.fieldContext_BookCover_contenttype(ctx, field) + case "book": + return ec.fieldContext_BookCover_book(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookCover", field.Name) + }, + } + return fc, nil +} + func (ec *executionContext) _BookConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.BookConnection) (ret graphql.Marshaler) { fc, err := ec.fieldContext_BookConnection_edges(ctx, field) if err != nil { @@ -7018,8 +8157,8 @@ func (ec *executionContext) fieldContext_BookConnection_totalCount(ctx context.C return fc, nil } -func (ec *executionContext) _BookEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.BookEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookEdge_node(ctx, field) +func (ec *executionContext) _BookCover_id(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_id(ctx, field) if err != nil { return graphql.Null } @@ -7032,75 +8171,38 @@ func (ec *executionContext) _BookEdge_node(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Book) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookEdge", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Book_id(ctx, field) - case "createTime": - return ec.fieldContext_Book_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Book_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Book_calibreID(ctx, field) - case "title": - return ec.fieldContext_Book_title(ctx, field) - case "sort": - return ec.fieldContext_Book_sort(ctx, field) - case "publishedDate": - return ec.fieldContext_Book_publishedDate(ctx, field) - case "path": - return ec.fieldContext_Book_path(ctx, field) - case "isbn": - return ec.fieldContext_Book_isbn(ctx, field) - case "description": - return ec.fieldContext_Book_description(ctx, field) - case "seriesIndex": - return ec.fieldContext_Book_seriesIndex(ctx, field) - case "authors": - return ec.fieldContext_Book_authors(ctx, field) - case "publisher": - return ec.fieldContext_Book_publisher(ctx, field) - case "series": - return ec.fieldContext_Book_series(ctx, field) - case "identifiers": - return ec.fieldContext_Book_identifiers(ctx, field) - case "tags": - return ec.fieldContext_Book_tags(ctx, field) - case "language": - return ec.fieldContext_Book_language(ctx, field) - case "shelf": - return ec.fieldContext_Book_shelf(ctx, field) - case "files": - return ec.fieldContext_Book_files(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.BookEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookEdge_cursor(ctx, field) +func (ec *executionContext) _BookCover_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_createTime(ctx, field) if err != nil { return graphql.Null } @@ -7113,7 +8215,7 @@ func (ec *executionContext) _BookEdge_cursor(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -7125,26 +8227,26 @@ func (ec *executionContext) _BookEdge_cursor(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookEdge", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_id(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_id(ctx, field) +func (ec *executionContext) _BookCover_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -7157,7 +8259,7 @@ func (ec *executionContext) _BookFile_id(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -7169,26 +8271,26 @@ func (ec *executionContext) _BookFile_id(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_createTime(ctx, field) +func (ec *executionContext) _BookCover_path(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_path(ctx, field) if err != nil { return graphql.Null } @@ -7201,7 +8303,7 @@ func (ec *executionContext) _BookFile_createTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return obj.Path, nil }) if err != nil { ec.Error(ctx, err) @@ -7213,26 +8315,26 @@ func (ec *executionContext) _BookFile_createTime(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_updateTime(ctx, field) +func (ec *executionContext) _BookCover_size(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_size(ctx, field) if err != nil { return graphql.Null } @@ -7245,7 +8347,7 @@ func (ec *executionContext) _BookFile_updateTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return obj.Size, nil }) if err != nil { ec.Error(ctx, err) @@ -7257,26 +8359,26 @@ func (ec *executionContext) _BookFile_updateTime(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(int64) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_name(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_name(ctx, field) +func (ec *executionContext) _BookCover_width(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_width(ctx, field) if err != nil { return graphql.Null } @@ -7289,7 +8391,7 @@ func (ec *executionContext) _BookFile_name(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Width, nil }) if err != nil { ec.Error(ctx, err) @@ -7301,26 +8403,26 @@ func (ec *executionContext) _BookFile_name(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_width(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_path(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_path(ctx, field) +func (ec *executionContext) _BookCover_height(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_height(ctx, field) if err != nil { return graphql.Null } @@ -7333,7 +8435,7 @@ func (ec *executionContext) _BookFile_path(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Path, nil + return obj.Height, nil }) if err != nil { ec.Error(ctx, err) @@ -7345,26 +8447,26 @@ func (ec *executionContext) _BookFile_path(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_size(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_size(ctx, field) +func (ec *executionContext) _BookCover_url(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_url(ctx, field) if err != nil { return graphql.Null } @@ -7377,7 +8479,7 @@ func (ec *executionContext) _BookFile_size(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Size, nil + return obj.URL, nil }) if err != nil { ec.Error(ctx, err) @@ -7389,26 +8491,26 @@ func (ec *executionContext) _BookFile_size(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int64(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_format(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_format(ctx, field) +func (ec *executionContext) _BookCover_contenttype(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_contenttype(ctx, field) if err != nil { return graphql.Null } @@ -7421,7 +8523,7 @@ func (ec *executionContext) _BookFile_format(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Format, nil + return obj.ContentType, nil }) if err != nil { ec.Error(ctx, err) @@ -7433,26 +8535,26 @@ func (ec *executionContext) _BookFile_format(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(bookfile.Format) + res := resTmp.(string) fc.Result = res - return ec.marshalNBookFileFormat2lybbrioᚋinternalᚋentᚋbookfileᚐFormat(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_format(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_contenttype(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type BookFileFormat does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _BookFile_book(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_BookFile_book(ctx, field) +func (ec *executionContext) _BookCover_book(ctx context.Context, field graphql.CollectedField, obj *ent.BookCover) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCover_book(ctx, field) if err != nil { return graphql.Null } @@ -7482,9 +8584,9 @@ func (ec *executionContext) _BookFile_book(ctx context.Context, field graphql.Co return ec.marshalNBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_BookFile_book(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCover_book(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "BookFile", + Object: "BookCover", Field: field, IsMethod: true, IsResolver: false, @@ -7528,6 +8630,8 @@ func (ec *executionContext) fieldContext_BookFile_book(ctx context.Context, fiel return ec.fieldContext_Book_shelf(ctx, field) case "files": return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, @@ -7535,8 +8639,8 @@ func (ec *executionContext) fieldContext_BookFile_book(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Identifier_id(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_id(ctx, field) +func (ec *executionContext) _BookCoverConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.BookCoverConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCoverConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -7549,38 +8653,41 @@ func (ec *executionContext) _Identifier_id(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.([]*ent.BookCoverEdge) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalOBookCoverEdge2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCoverConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookCoverConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_BookCoverEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_BookCoverEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookCoverEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Identifier_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_createTime(ctx, field) +func (ec *executionContext) _BookCoverConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.BookCoverConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCoverConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -7593,7 +8700,7 @@ func (ec *executionContext) _Identifier_createTime(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -7605,26 +8712,36 @@ func (ec *executionContext) _Identifier_createTime(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCoverConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookCoverConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Identifier_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_updateTime(ctx, field) +func (ec *executionContext) _BookCoverConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.BookCoverConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCoverConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -7637,7 +8754,7 @@ func (ec *executionContext) _Identifier_updateTime(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -7649,55 +8766,14 @@ func (ec *executionContext) _Identifier_updateTime(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Identifier_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Identifier", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Identifier_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_calibreID(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.CalibreID, nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(int64) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCoverConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookCoverConnection", Field: field, IsMethod: false, IsResolver: false, @@ -7708,8 +8784,8 @@ func (ec *executionContext) fieldContext_Identifier_calibreID(ctx context.Contex return fc, nil } -func (ec *executionContext) _Identifier_type(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_type(ctx, field) +func (ec *executionContext) _BookCoverEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.BookCoverEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCoverEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -7722,38 +8798,57 @@ func (ec *executionContext) _Identifier_type(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.BookCover) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOBookCover2ᚖlybbrioᚋinternalᚋentᚐBookCover(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCoverEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookCoverEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_BookCover_id(ctx, field) + case "createTime": + return ec.fieldContext_BookCover_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_BookCover_updateTime(ctx, field) + case "path": + return ec.fieldContext_BookCover_path(ctx, field) + case "size": + return ec.fieldContext_BookCover_size(ctx, field) + case "width": + return ec.fieldContext_BookCover_width(ctx, field) + case "height": + return ec.fieldContext_BookCover_height(ctx, field) + case "url": + return ec.fieldContext_BookCover_url(ctx, field) + case "contenttype": + return ec.fieldContext_BookCover_contenttype(ctx, field) + case "book": + return ec.fieldContext_BookCover_book(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookCover", field.Name) }, } return fc, nil } -func (ec *executionContext) _Identifier_value(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_value(ctx, field) +func (ec *executionContext) _BookCoverEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.BookCoverEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookCoverEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -7766,7 +8861,7 @@ func (ec *executionContext) _Identifier_value(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Value, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -7778,26 +8873,26 @@ func (ec *executionContext) _Identifier_value(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookCoverEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookCoverEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Cursor does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Identifier_book(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Identifier_book(ctx, field) +func (ec *executionContext) _BookEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.BookEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -7810,28 +8905,25 @@ func (ec *executionContext) _Identifier_book(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Book(ctx) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } res := resTmp.(*ent.Book) fc.Result = res - return ec.marshalNBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) + return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Identifier_book(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Identifier", + Object: "BookEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { @@ -7873,6 +8965,8 @@ func (ec *executionContext) fieldContext_Identifier_book(ctx context.Context, fi return ec.fieldContext_Book_shelf(ctx, field) case "files": return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, @@ -7880,8 +8974,8 @@ func (ec *executionContext) fieldContext_Identifier_book(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _IdentifierConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IdentifierConnection_edges(ctx, field) +func (ec *executionContext) _BookEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.BookEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -7894,41 +8988,38 @@ func (ec *executionContext) _IdentifierConnection_edges(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.IdentifierEdge) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalOIdentifierEdge2ᚕᚖlybbrioᚋinternalᚋentᚐIdentifierEdge(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentifierConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IdentifierConnection", + Object: "BookEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_IdentifierEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_IdentifierEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type IdentifierEdge", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } return fc, nil } -func (ec *executionContext) _IdentifierConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IdentifierConnection_pageInfo(ctx, field) +func (ec *executionContext) _BookFile_id(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_id(ctx, field) if err != nil { return graphql.Null } @@ -7941,7 +9032,7 @@ func (ec *executionContext) _IdentifierConnection_pageInfo(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -7953,36 +9044,26 @@ func (ec *executionContext) _IdentifierConnection_pageInfo(ctx context.Context, } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentifierConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IdentifierConnection", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _IdentifierConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IdentifierConnection_totalCount(ctx, field) +func (ec *executionContext) _BookFile_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_createTime(ctx, field) if err != nil { return graphql.Null } @@ -7995,7 +9076,7 @@ func (ec *executionContext) _IdentifierConnection_totalCount(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -8007,26 +9088,26 @@ func (ec *executionContext) _IdentifierConnection_totalCount(ctx context.Context } return graphql.Null } - res := resTmp.(int) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentifierConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IdentifierConnection", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _IdentifierEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IdentifierEdge_node(ctx, field) +func (ec *executionContext) _BookFile_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -8039,51 +9120,38 @@ func (ec *executionContext) _IdentifierEdge_node(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Identifier) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentifierEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IdentifierEdge", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Identifier_id(ctx, field) - case "createTime": - return ec.fieldContext_Identifier_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Identifier_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Identifier_calibreID(ctx, field) - case "type": - return ec.fieldContext_Identifier_type(ctx, field) - case "value": - return ec.fieldContext_Identifier_value(ctx, field) - case "book": - return ec.fieldContext_Identifier_book(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _IdentifierEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_IdentifierEdge_cursor(ctx, field) +func (ec *executionContext) _BookFile_name(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_name(ctx, field) if err != nil { return graphql.Null } @@ -8096,7 +9164,7 @@ func (ec *executionContext) _IdentifierEdge_cursor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -8108,26 +9176,26 @@ func (ec *executionContext) _IdentifierEdge_cursor(ctx context.Context, field gr } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.(string) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_IdentifierEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "IdentifierEdge", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Language_id(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_id(ctx, field) +func (ec *executionContext) _BookFile_path(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_path(ctx, field) if err != nil { return graphql.Null } @@ -8140,7 +9208,7 @@ func (ec *executionContext) _Language_id(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Path, nil }) if err != nil { ec.Error(ctx, err) @@ -8152,26 +9220,26 @@ func (ec *executionContext) _Language_id(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(string) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Language_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_createTime(ctx, field) +func (ec *executionContext) _BookFile_size(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_size(ctx, field) if err != nil { return graphql.Null } @@ -8184,7 +9252,7 @@ func (ec *executionContext) _Language_createTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return obj.Size, nil }) if err != nil { ec.Error(ctx, err) @@ -8196,26 +9264,26 @@ func (ec *executionContext) _Language_createTime(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(int64) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_size(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Language_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_updateTime(ctx, field) +func (ec *executionContext) _BookFile_format(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_format(ctx, field) if err != nil { return graphql.Null } @@ -8228,7 +9296,7 @@ func (ec *executionContext) _Language_updateTime(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return obj.Format, nil }) if err != nil { ec.Error(ctx, err) @@ -8240,26 +9308,26 @@ func (ec *executionContext) _Language_updateTime(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(bookfile.Format) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNBookFileFormat2lybbrioᚋinternalᚋentᚋbookfileᚐFormat(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_format(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "BookFile", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type BookFileFormat does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Language_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_calibreID(ctx, field) +func (ec *executionContext) _BookFile_book(ctx context.Context, field graphql.CollectedField, obj *ent.BookFile) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_BookFile_book(ctx, field) if err != nil { return graphql.Null } @@ -8272,35 +9340,80 @@ func (ec *executionContext) _Language_calibreID(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CalibreID, nil + return obj.Book(ctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*ent.Book) fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) + return ec.marshalNBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_BookFile_book(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "BookFile", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Book_id(ctx, field) + case "createTime": + return ec.fieldContext_Book_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Book_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Book_calibreID(ctx, field) + case "title": + return ec.fieldContext_Book_title(ctx, field) + case "sort": + return ec.fieldContext_Book_sort(ctx, field) + case "publishedDate": + return ec.fieldContext_Book_publishedDate(ctx, field) + case "path": + return ec.fieldContext_Book_path(ctx, field) + case "isbn": + return ec.fieldContext_Book_isbn(ctx, field) + case "description": + return ec.fieldContext_Book_description(ctx, field) + case "seriesIndex": + return ec.fieldContext_Book_seriesIndex(ctx, field) + case "authors": + return ec.fieldContext_Book_authors(ctx, field) + case "publisher": + return ec.fieldContext_Book_publisher(ctx, field) + case "series": + return ec.fieldContext_Book_series(ctx, field) + case "identifiers": + return ec.fieldContext_Book_identifiers(ctx, field) + case "tags": + return ec.fieldContext_Book_tags(ctx, field) + case "language": + return ec.fieldContext_Book_language(ctx, field) + case "shelf": + return ec.fieldContext_Book_shelf(ctx, field) + case "files": + return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, } return fc, nil } -func (ec *executionContext) _Language_code(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_code(ctx, field) +func (ec *executionContext) _Identifier_id(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_id(ctx, field) if err != nil { return graphql.Null } @@ -8313,7 +9426,7 @@ func (ec *executionContext) _Language_code(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Code, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -8325,26 +9438,26 @@ func (ec *executionContext) _Language_code(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "Identifier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Language_books(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Language_books(ctx, field) +func (ec *executionContext) _Identifier_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_createTime(ctx, field) if err != nil { return graphql.Null } @@ -8357,7 +9470,7 @@ func (ec *executionContext) _Language_books(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -8369,45 +9482,26 @@ func (ec *executionContext) _Language_books(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(*ent.BookConnection) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Language_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Language", + Object: "Identifier", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_BookConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_BookConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_BookConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Language_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _LanguageConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LanguageConnection_edges(ctx, field) +func (ec *executionContext) _Identifier_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -8420,41 +9514,38 @@ func (ec *executionContext) _LanguageConnection_edges(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.LanguageEdge) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOLanguageEdge2ᚕᚖlybbrioᚋinternalᚋentᚐLanguageEdge(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LanguageConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LanguageConnection", + Object: "Identifier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_LanguageEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_LanguageEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LanguageEdge", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LanguageConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LanguageConnection_pageInfo(ctx, field) +func (ec *executionContext) _Identifier_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_calibreID(ctx, field) if err != nil { return graphql.Null } @@ -8467,48 +9558,35 @@ func (ec *executionContext) _LanguageConnection_pageInfo(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.CalibreID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(int64) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LanguageConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LanguageConnection", + Object: "Identifier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LanguageConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LanguageConnection_totalCount(ctx, field) +func (ec *executionContext) _Identifier_type(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_type(ctx, field) if err != nil { return graphql.Null } @@ -8521,7 +9599,7 @@ func (ec *executionContext) _LanguageConnection_totalCount(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -8533,26 +9611,26 @@ func (ec *executionContext) _LanguageConnection_totalCount(ctx context.Context, } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LanguageConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LanguageConnection", + Object: "Identifier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LanguageEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LanguageEdge_node(ctx, field) +func (ec *executionContext) _Identifier_value(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_value(ctx, field) if err != nil { return graphql.Null } @@ -8565,49 +9643,38 @@ func (ec *executionContext) _LanguageEdge_node(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Value, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Language) + res := resTmp.(string) fc.Result = res - return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_LanguageEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_value(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "LanguageEdge", + Object: "Identifier", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Language_id(ctx, field) - case "createTime": - return ec.fieldContext_Language_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Language_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Language_calibreID(ctx, field) - case "code": - return ec.fieldContext_Language_code(ctx, field) - case "books": - return ec.fieldContext_Language_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _LanguageEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_LanguageEdge_cursor(ctx, field) +func (ec *executionContext) _Identifier_book(ctx context.Context, field graphql.CollectedField, obj *ent.Identifier) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Identifier_book(ctx, field) if err != nil { return graphql.Null } @@ -8620,7 +9687,7 @@ func (ec *executionContext) _LanguageEdge_cursor(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Book(ctx) }) if err != nil { ec.Error(ctx, err) @@ -8632,58 +9699,17 @@ func (ec *executionContext) _LanguageEdge_cursor(ctx context.Context, field grap } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) - fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_LanguageEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "LanguageEdge", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") - }, - } - return fc, nil -} - -func (ec *executionContext) _Mutation_createBook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createBook(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateBook(rctx, fc.Args["input"].(ent.CreateBookInput)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } res := resTmp.(*ent.Book) fc.Result = res - return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) + return ec.marshalNBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Identifier_book(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Identifier", Field: field, IsMethod: true, - IsResolver: true, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": @@ -8724,26 +9750,17 @@ func (ec *executionContext) fieldContext_Mutation_createBook(ctx context.Context return ec.fieldContext_Book_shelf(ctx, field) case "files": return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createBook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateBook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateBook(ctx, field) +func (ec *executionContext) _IdentifierConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IdentifierConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -8756,7 +9773,7 @@ func (ec *executionContext) _Mutation_updateBook(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateBook(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateBookInput)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -8765,77 +9782,32 @@ func (ec *executionContext) _Mutation_updateBook(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Book) + res := resTmp.([]*ent.IdentifierEdge) fc.Result = res - return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) + return ec.marshalOIdentifierEdge2ᚕᚖlybbrioᚋinternalᚋentᚐIdentifierEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentifierConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "IdentifierConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Book_id(ctx, field) - case "createTime": - return ec.fieldContext_Book_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Book_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Book_calibreID(ctx, field) - case "title": - return ec.fieldContext_Book_title(ctx, field) - case "sort": - return ec.fieldContext_Book_sort(ctx, field) - case "publishedDate": - return ec.fieldContext_Book_publishedDate(ctx, field) - case "path": - return ec.fieldContext_Book_path(ctx, field) - case "isbn": - return ec.fieldContext_Book_isbn(ctx, field) - case "description": - return ec.fieldContext_Book_description(ctx, field) - case "seriesIndex": - return ec.fieldContext_Book_seriesIndex(ctx, field) - case "authors": - return ec.fieldContext_Book_authors(ctx, field) - case "publisher": - return ec.fieldContext_Book_publisher(ctx, field) - case "series": - return ec.fieldContext_Book_series(ctx, field) - case "identifiers": - return ec.fieldContext_Book_identifiers(ctx, field) - case "tags": - return ec.fieldContext_Book_tags(ctx, field) - case "language": - return ec.fieldContext_Book_language(ctx, field) - case "shelf": - return ec.fieldContext_Book_shelf(ctx, field) - case "files": - return ec.fieldContext_Book_files(ctx, field) + case "node": + return ec.fieldContext_IdentifierEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_IdentifierEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) + return nil, fmt.Errorf("no field named %q was found under type IdentifierEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateBook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createAuthor(ctx, field) +func (ec *executionContext) _IdentifierConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IdentifierConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -8848,64 +9820,48 @@ func (ec *executionContext) _Mutation_createAuthor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateAuthor(rctx, fc.Args["input"].(ent.CreateAuthorInput)) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Author) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalOAuthor2ᚖlybbrioᚋinternalᚋentᚐAuthor(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createAuthor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentifierConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "IdentifierConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Author_id(ctx, field) - case "createTime": - return ec.fieldContext_Author_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Author_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Author_calibreID(ctx, field) - case "name": - return ec.fieldContext_Author_name(ctx, field) - case "sort": - return ec.fieldContext_Author_sort(ctx, field) - case "link": - return ec.fieldContext_Author_link(ctx, field) - case "books": - return ec.fieldContext_Author_books(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Author", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateAuthor(ctx, field) +func (ec *executionContext) _IdentifierConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IdentifierConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -8918,64 +9874,38 @@ func (ec *executionContext) _Mutation_updateAuthor(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateAuthor(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateAuthorInput)) + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Author) + res := resTmp.(int) fc.Result = res - return ec.marshalOAuthor2ᚖlybbrioᚋinternalᚋentᚐAuthor(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateAuthor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentifierConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "IdentifierConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Author_id(ctx, field) - case "createTime": - return ec.fieldContext_Author_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Author_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Author_calibreID(ctx, field) - case "name": - return ec.fieldContext_Author_name(ctx, field) - case "sort": - return ec.fieldContext_Author_sort(ctx, field) - case "link": - return ec.fieldContext_Author_link(ctx, field) - case "books": - return ec.fieldContext_Author_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Author", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createShelf(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createShelf(ctx, field) +func (ec *executionContext) _IdentifierEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IdentifierEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -8988,7 +9918,7 @@ func (ec *executionContext) _Mutation_createShelf(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateShelf(rctx, fc.Args["input"].(lybbrio.CreateShelfInput)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -8997,57 +9927,42 @@ func (ec *executionContext) _Mutation_createShelf(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Shelf) + res := resTmp.(*ent.Identifier) fc.Result = res - return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) + return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createShelf(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentifierEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "IdentifierEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Shelf_id(ctx, field) + return ec.fieldContext_Identifier_id(ctx, field) case "createTime": - return ec.fieldContext_Shelf_createTime(ctx, field) + return ec.fieldContext_Identifier_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Shelf_updateTime(ctx, field) - case "public": - return ec.fieldContext_Shelf_public(ctx, field) - case "userID": - return ec.fieldContext_Shelf_userID(ctx, field) - case "name": - return ec.fieldContext_Shelf_name(ctx, field) - case "description": - return ec.fieldContext_Shelf_description(ctx, field) - case "user": - return ec.fieldContext_Shelf_user(ctx, field) - case "books": - return ec.fieldContext_Shelf_books(ctx, field) + return ec.fieldContext_Identifier_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Identifier_calibreID(ctx, field) + case "type": + return ec.fieldContext_Identifier_type(ctx, field) + case "value": + return ec.fieldContext_Identifier_value(ctx, field) + case "book": + return ec.fieldContext_Identifier_book(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createShelf_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateShelf(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateShelf(ctx, field) +func (ec *executionContext) _IdentifierEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.IdentifierEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_IdentifierEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -9060,66 +9975,38 @@ func (ec *executionContext) _Mutation_updateShelf(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateShelf(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateShelfInput)) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Shelf) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateShelf(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_IdentifierEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "IdentifierEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Shelf_id(ctx, field) - case "createTime": - return ec.fieldContext_Shelf_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Shelf_updateTime(ctx, field) - case "public": - return ec.fieldContext_Shelf_public(ctx, field) - case "userID": - return ec.fieldContext_Shelf_userID(ctx, field) - case "name": - return ec.fieldContext_Shelf_name(ctx, field) - case "description": - return ec.fieldContext_Shelf_description(ctx, field) - case "user": - return ec.fieldContext_Shelf_user(ctx, field) - case "books": - return ec.fieldContext_Shelf_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateShelf_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createTag(ctx, field) +func (ec *executionContext) _Language_id(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_id(ctx, field) if err != nil { return graphql.Null } @@ -9132,56 +10019,38 @@ func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateTag(rctx, fc.Args["input"].(ent.CreateTagInput)) + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Tag) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Tag_id(ctx, field) - case "calibreID": - return ec.fieldContext_Tag_calibreID(ctx, field) - case "name": - return ec.fieldContext_Tag_name(ctx, field) - case "books": - return ec.fieldContext_Tag_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createTag_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateTag(ctx, field) +func (ec *executionContext) _Language_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_createTime(ctx, field) if err != nil { return graphql.Null } @@ -9194,56 +10063,38 @@ func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateTag(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateTagInput)) + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Tag) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Tag_id(ctx, field) - case "calibreID": - return ec.fieldContext_Tag_calibreID(ctx, field) - case "name": - return ec.fieldContext_Tag_name(ctx, field) - case "books": - return ec.fieldContext_Tag_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateTag_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createPublisher(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createPublisher(ctx, field) +func (ec *executionContext) _Language_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -9256,60 +10107,38 @@ func (ec *executionContext) _Mutation_createPublisher(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreatePublisher(rctx, fc.Args["input"].(ent.CreatePublisherInput)) + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Publisher) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createPublisher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Publisher_id(ctx, field) - case "createTime": - return ec.fieldContext_Publisher_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Publisher_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Publisher_calibreID(ctx, field) - case "name": - return ec.fieldContext_Publisher_name(ctx, field) - case "books": - return ec.fieldContext_Publisher_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createPublisher_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updatePublisher(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updatePublisher(ctx, field) +func (ec *executionContext) _Language_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_calibreID(ctx, field) if err != nil { return graphql.Null } @@ -9322,7 +10151,7 @@ func (ec *executionContext) _Mutation_updatePublisher(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdatePublisher(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdatePublisherInput)) + return obj.CalibreID, nil }) if err != nil { ec.Error(ctx, err) @@ -9331,51 +10160,26 @@ func (ec *executionContext) _Mutation_updatePublisher(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Publisher) + res := resTmp.(int64) fc.Result = res - return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) + return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updatePublisher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Publisher_id(ctx, field) - case "createTime": - return ec.fieldContext_Publisher_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Publisher_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Publisher_calibreID(ctx, field) - case "name": - return ec.fieldContext_Publisher_name(ctx, field) - case "books": - return ec.fieldContext_Publisher_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updatePublisher_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createLanguage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createLanguage(ctx, field) +func (ec *executionContext) _Language_code(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_code(ctx, field) if err != nil { return graphql.Null } @@ -9388,60 +10192,38 @@ func (ec *executionContext) _Mutation_createLanguage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateLanguage(rctx, fc.Args["input"].(ent.CreateLanguageInput)) + return obj.Code, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Language) + res := resTmp.(string) fc.Result = res - return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createLanguage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_code(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Language_id(ctx, field) - case "createTime": - return ec.fieldContext_Language_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Language_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Language_calibreID(ctx, field) - case "code": - return ec.fieldContext_Language_code(ctx, field) - case "books": - return ec.fieldContext_Language_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createLanguage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateLanguage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateLanguage(ctx, field) +func (ec *executionContext) _Language_books(ctx context.Context, field graphql.CollectedField, obj *ent.Language) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Language_books(ctx, field) if err != nil { return graphql.Null } @@ -9454,42 +10236,39 @@ func (ec *executionContext) _Mutation_updateLanguage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateLanguage(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateLanguageInput)) + return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Language) + res := resTmp.(*ent.BookConnection) fc.Result = res - return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) + return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateLanguage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Language_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "Language", Field: field, IsMethod: true, - IsResolver: true, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Language_id(ctx, field) - case "createTime": - return ec.fieldContext_Language_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Language_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Language_calibreID(ctx, field) - case "code": - return ec.fieldContext_Language_code(ctx, field) - case "books": - return ec.fieldContext_Language_books(ctx, field) + case "edges": + return ec.fieldContext_BookConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_BookConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_BookConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) }, } defer func() { @@ -9499,15 +10278,15 @@ func (ec *executionContext) fieldContext_Mutation_updateLanguage(ctx context.Con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateLanguage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Language_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_createSeries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createSeries(ctx, field) +func (ec *executionContext) _LanguageConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LanguageConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -9520,7 +10299,7 @@ func (ec *executionContext) _Mutation_createSeries(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateSeries(rctx, fc.Args["input"].(ent.CreateSeriesInput)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) @@ -9529,53 +10308,32 @@ func (ec *executionContext) _Mutation_createSeries(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Series) + res := resTmp.([]*ent.LanguageEdge) fc.Result = res - return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) + return ec.marshalOLanguageEdge2ᚕᚖlybbrioᚋinternalᚋentᚐLanguageEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createSeries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LanguageConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "LanguageConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Series_id(ctx, field) - case "createTime": - return ec.fieldContext_Series_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Series_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Series_calibreID(ctx, field) - case "name": - return ec.fieldContext_Series_name(ctx, field) - case "sort": - return ec.fieldContext_Series_sort(ctx, field) - case "books": - return ec.fieldContext_Series_books(ctx, field) + case "node": + return ec.fieldContext_LanguageEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_LanguageEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LanguageEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createSeries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateSeries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateSeries(ctx, field) +func (ec *executionContext) _LanguageConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LanguageConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -9588,62 +10346,48 @@ func (ec *executionContext) _Mutation_updateSeries(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateSeries(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateSeriesInput)) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Series) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateSeries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LanguageConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "LanguageConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Series_id(ctx, field) - case "createTime": - return ec.fieldContext_Series_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Series_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Series_calibreID(ctx, field) - case "name": - return ec.fieldContext_Series_name(ctx, field) - case "sort": - return ec.fieldContext_Series_sort(ctx, field) - case "books": - return ec.fieldContext_Series_books(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateSeries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createIdentifier(ctx, field) +func (ec *executionContext) _LanguageConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LanguageConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -9656,62 +10400,38 @@ func (ec *executionContext) _Mutation_createIdentifier(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateIdentifier(rctx, fc.Args["input"].(ent.CreateIdentifierInput)) + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Identifier) + res := resTmp.(int) fc.Result = res - return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LanguageConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "LanguageConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Identifier_id(ctx, field) - case "createTime": - return ec.fieldContext_Identifier_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Identifier_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Identifier_calibreID(ctx, field) - case "type": - return ec.fieldContext_Identifier_type(ctx, field) - case "value": - return ec.fieldContext_Identifier_value(ctx, field) - case "book": - return ec.fieldContext_Identifier_book(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createIdentifier_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateIdentifier(ctx, field) +func (ec *executionContext) _LanguageEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LanguageEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -9724,7 +10444,7 @@ func (ec *executionContext) _Mutation_updateIdentifier(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateIdentifier(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateIdentifierInput)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -9733,53 +10453,40 @@ func (ec *executionContext) _Mutation_updateIdentifier(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Identifier) + res := resTmp.(*ent.Language) fc.Result = res - return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) + return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LanguageEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "LanguageEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Identifier_id(ctx, field) + return ec.fieldContext_Language_id(ctx, field) case "createTime": - return ec.fieldContext_Identifier_createTime(ctx, field) + return ec.fieldContext_Language_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Identifier_updateTime(ctx, field) + return ec.fieldContext_Language_updateTime(ctx, field) case "calibreID": - return ec.fieldContext_Identifier_calibreID(ctx, field) - case "type": - return ec.fieldContext_Identifier_type(ctx, field) - case "value": - return ec.fieldContext_Identifier_value(ctx, field) - case "book": - return ec.fieldContext_Identifier_book(ctx, field) + return ec.fieldContext_Language_calibreID(ctx, field) + case "code": + return ec.fieldContext_Language_code(ctx, field) + case "books": + return ec.fieldContext_Language_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateIdentifier_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createUser(ctx, field) +func (ec *executionContext) _LanguageEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.LanguageEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_LanguageEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -9792,62 +10499,38 @@ func (ec *executionContext) _Mutation_createUser(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateUser(rctx, fc.Args["input"].(lybbrio.CreateUserInput)) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_LanguageEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "LanguageEdge", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createTime": - return ec.fieldContext_User_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_updateUser(ctx, field) +func (ec *executionContext) _Mutation_createBook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createBook(ctx, field) if err != nil { return graphql.Null } @@ -9860,7 +10543,7 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(lybbrio.UpdateUserInput)) + return ec.resolvers.Mutation().CreateBook(rctx, fc.Args["input"].(ent.CreateBookInput)) }) if err != nil { ec.Error(ctx, err) @@ -9869,12 +10552,12 @@ func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(*ent.Book) fc.Result = res - return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -9883,21 +10566,47 @@ func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_User_id(ctx, field) + return ec.fieldContext_Book_id(ctx, field) case "createTime": - return ec.fieldContext_User_createTime(ctx, field) + return ec.fieldContext_Book_createTime(ctx, field) case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) + return ec.fieldContext_Book_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Book_calibreID(ctx, field) + case "title": + return ec.fieldContext_Book_title(ctx, field) + case "sort": + return ec.fieldContext_Book_sort(ctx, field) + case "publishedDate": + return ec.fieldContext_Book_publishedDate(ctx, field) + case "path": + return ec.fieldContext_Book_path(ctx, field) + case "isbn": + return ec.fieldContext_Book_isbn(ctx, field) + case "description": + return ec.fieldContext_Book_description(ctx, field) + case "seriesIndex": + return ec.fieldContext_Book_seriesIndex(ctx, field) + case "authors": + return ec.fieldContext_Book_authors(ctx, field) + case "publisher": + return ec.fieldContext_Book_publisher(ctx, field) + case "series": + return ec.fieldContext_Book_series(ctx, field) + case "identifiers": + return ec.fieldContext_Book_identifiers(ctx, field) + case "tags": + return ec.fieldContext_Book_tags(ctx, field) + case "language": + return ec.fieldContext_Book_language(ctx, field) + case "shelf": + return ec.fieldContext_Book_shelf(ctx, field) + case "files": + return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, } defer func() { @@ -9907,15 +10616,15 @@ func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_updateUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_createBook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_createTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_createTask(ctx, field) +func (ec *executionContext) _Mutation_updateBook(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateBook(ctx, field) if err != nil { return graphql.Null } @@ -9928,7 +10637,7 @@ func (ec *executionContext) _Mutation_createTask(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().CreateTask(rctx, fc.Args["input"].(lybbrio.CreateTaskInput)) + return ec.resolvers.Mutation().UpdateBook(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateBookInput)) }) if err != nil { ec.Error(ctx, err) @@ -9937,12 +10646,12 @@ func (ec *executionContext) _Mutation_createTask(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Task) + res := resTmp.(*ent.Book) fc.Result = res - return ec.marshalOTask2ᚖlybbrioᚋinternalᚋentᚐTask(ctx, field.Selections, res) + return ec.marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_createTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateBook(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ Object: "Mutation", Field: field, @@ -9951,29 +10660,47 @@ func (ec *executionContext) fieldContext_Mutation_createTask(ctx context.Context Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Task_id(ctx, field) + return ec.fieldContext_Book_id(ctx, field) case "createTime": - return ec.fieldContext_Task_createTime(ctx, field) + return ec.fieldContext_Book_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Task_updateTime(ctx, field) - case "type": - return ec.fieldContext_Task_type(ctx, field) - case "status": - return ec.fieldContext_Task_status(ctx, field) - case "progress": - return ec.fieldContext_Task_progress(ctx, field) - case "message": - return ec.fieldContext_Task_message(ctx, field) - case "error": - return ec.fieldContext_Task_error(ctx, field) - case "userID": - return ec.fieldContext_Task_userID(ctx, field) - case "isSystemTask": - return ec.fieldContext_Task_isSystemTask(ctx, field) - case "user": - return ec.fieldContext_Task_user(ctx, field) + return ec.fieldContext_Book_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Book_calibreID(ctx, field) + case "title": + return ec.fieldContext_Book_title(ctx, field) + case "sort": + return ec.fieldContext_Book_sort(ctx, field) + case "publishedDate": + return ec.fieldContext_Book_publishedDate(ctx, field) + case "path": + return ec.fieldContext_Book_path(ctx, field) + case "isbn": + return ec.fieldContext_Book_isbn(ctx, field) + case "description": + return ec.fieldContext_Book_description(ctx, field) + case "seriesIndex": + return ec.fieldContext_Book_seriesIndex(ctx, field) + case "authors": + return ec.fieldContext_Book_authors(ctx, field) + case "publisher": + return ec.fieldContext_Book_publisher(ctx, field) + case "series": + return ec.fieldContext_Book_series(ctx, field) + case "identifiers": + return ec.fieldContext_Book_identifiers(ctx, field) + case "tags": + return ec.fieldContext_Book_tags(ctx, field) + case "language": + return ec.fieldContext_Book_language(ctx, field) + case "shelf": + return ec.fieldContext_Book_shelf(ctx, field) + case "files": + return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Task", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, } defer func() { @@ -9983,15 +10710,15 @@ func (ec *executionContext) fieldContext_Mutation_createTask(ctx context.Context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_createTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_updateBook_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) +func (ec *executionContext) _Mutation_createAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createAuthor(ctx, field) if err != nil { return graphql.Null } @@ -10004,38 +10731,64 @@ func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasNextPage, nil + return ec.resolvers.Mutation().CreateAuthor(rctx, fc.Args["input"].(ent.CreateAuthorInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*ent.Author) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOAuthor2ᚖlybbrioᚋinternalᚋentᚐAuthor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createAuthor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Author_id(ctx, field) + case "createTime": + return ec.fieldContext_Author_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Author_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Author_calibreID(ctx, field) + case "name": + return ec.fieldContext_Author_name(ctx, field) + case "sort": + return ec.fieldContext_Author_sort(ctx, field) + case "link": + return ec.fieldContext_Author_link(ctx, field) + case "books": + return ec.fieldContext_Author_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Author", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) +func (ec *executionContext) _Mutation_updateAuthor(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateAuthor(ctx, field) if err != nil { return graphql.Null } @@ -10048,38 +10801,64 @@ func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasPreviousPage, nil + return ec.resolvers.Mutation().UpdateAuthor(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateAuthorInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*ent.Author) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOAuthor2ᚖlybbrioᚋinternalᚋentᚐAuthor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateAuthor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Author_id(ctx, field) + case "createTime": + return ec.fieldContext_Author_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Author_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Author_calibreID(ctx, field) + case "name": + return ec.fieldContext_Author_name(ctx, field) + case "sort": + return ec.fieldContext_Author_sort(ctx, field) + case "link": + return ec.fieldContext_Author_link(ctx, field) + case "books": + return ec.fieldContext_Author_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Author", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updateAuthor_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) +func (ec *executionContext) _Mutation_createShelf(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createShelf(ctx, field) if err != nil { return graphql.Null } @@ -10092,7 +10871,7 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.StartCursor, nil + return ec.resolvers.Mutation().CreateShelf(rctx, fc.Args["input"].(lybbrio.CreateShelfInput)) }) if err != nil { ec.Error(ctx, err) @@ -10101,26 +10880,57 @@ func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*entgql.Cursor[ksuid.ID]) + res := resTmp.(*ent.Shelf) fc.Result = res - return ec.marshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createShelf(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Shelf_id(ctx, field) + case "createTime": + return ec.fieldContext_Shelf_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Shelf_updateTime(ctx, field) + case "public": + return ec.fieldContext_Shelf_public(ctx, field) + case "userID": + return ec.fieldContext_Shelf_userID(ctx, field) + case "name": + return ec.fieldContext_Shelf_name(ctx, field) + case "description": + return ec.fieldContext_Shelf_description(ctx, field) + case "user": + return ec.fieldContext_Shelf_user(ctx, field) + case "books": + return ec.fieldContext_Shelf_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createShelf_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) +func (ec *executionContext) _Mutation_updateShelf(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateShelf(ctx, field) if err != nil { return graphql.Null } @@ -10133,7 +10943,7 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EndCursor, nil + return ec.resolvers.Mutation().UpdateShelf(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateShelfInput)) }) if err != nil { ec.Error(ctx, err) @@ -10142,26 +10952,57 @@ func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(*entgql.Cursor[ksuid.ID]) + res := resTmp.(*ent.Shelf) fc.Result = res - return ec.marshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateShelf(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PageInfo", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Shelf_id(ctx, field) + case "createTime": + return ec.fieldContext_Shelf_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Shelf_updateTime(ctx, field) + case "public": + return ec.fieldContext_Shelf_public(ctx, field) + case "userID": + return ec.fieldContext_Shelf_userID(ctx, field) + case "name": + return ec.fieldContext_Shelf_name(ctx, field) + case "description": + return ec.fieldContext_Shelf_description(ctx, field) + case "user": + return ec.fieldContext_Shelf_user(ctx, field) + case "books": + return ec.fieldContext_Shelf_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updateShelf_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_id(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_id(ctx, field) +func (ec *executionContext) _Mutation_createTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createTag(ctx, field) if err != nil { return graphql.Null } @@ -10174,38 +11015,56 @@ func (ec *executionContext) _Publisher_id(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return ec.resolvers.Mutation().CreateTag(rctx, fc.Args["input"].(ent.CreateTagInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Tag_id(ctx, field) + case "calibreID": + return ec.fieldContext_Tag_calibreID(ctx, field) + case "name": + return ec.fieldContext_Tag_name(ctx, field) + case "books": + return ec.fieldContext_Tag_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createTag_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_createTime(ctx, field) +func (ec *executionContext) _Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateTag(ctx, field) if err != nil { return graphql.Null } @@ -10218,38 +11077,56 @@ func (ec *executionContext) _Publisher_createTime(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return ec.resolvers.Mutation().UpdateTag(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateTagInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateTag(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Tag_id(ctx, field) + case "calibreID": + return ec.fieldContext_Tag_calibreID(ctx, field) + case "name": + return ec.fieldContext_Tag_name(ctx, field) + case "books": + return ec.fieldContext_Tag_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updateTag_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_updateTime(ctx, field) +func (ec *executionContext) _Mutation_createPublisher(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createPublisher(ctx, field) if err != nil { return graphql.Null } @@ -10262,38 +11139,60 @@ func (ec *executionContext) _Publisher_updateTime(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return ec.resolvers.Mutation().CreatePublisher(rctx, fc.Args["input"].(ent.CreatePublisherInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*ent.Publisher) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createPublisher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Publisher_id(ctx, field) + case "createTime": + return ec.fieldContext_Publisher_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Publisher_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Publisher_calibreID(ctx, field) + case "name": + return ec.fieldContext_Publisher_name(ctx, field) + case "books": + return ec.fieldContext_Publisher_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createPublisher_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_calibreID(ctx, field) +func (ec *executionContext) _Mutation_updatePublisher(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updatePublisher(ctx, field) if err != nil { return graphql.Null } @@ -10306,7 +11205,7 @@ func (ec *executionContext) _Publisher_calibreID(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CalibreID, nil + return ec.resolvers.Mutation().UpdatePublisher(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdatePublisherInput)) }) if err != nil { ec.Error(ctx, err) @@ -10315,26 +11214,51 @@ func (ec *executionContext) _Publisher_calibreID(ctx context.Context, field grap if resTmp == nil { return graphql.Null } - res := resTmp.(int64) + res := resTmp.(*ent.Publisher) fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) + return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updatePublisher(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Publisher_id(ctx, field) + case "createTime": + return ec.fieldContext_Publisher_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Publisher_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Publisher_calibreID(ctx, field) + case "name": + return ec.fieldContext_Publisher_name(ctx, field) + case "books": + return ec.fieldContext_Publisher_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updatePublisher_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_name(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_name(ctx, field) +func (ec *executionContext) _Mutation_createLanguage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createLanguage(ctx, field) if err != nil { return graphql.Null } @@ -10347,38 +11271,60 @@ func (ec *executionContext) _Publisher_name(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Mutation().CreateLanguage(rctx, fc.Args["input"].(ent.CreateLanguageInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.Language) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createLanguage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Language_id(ctx, field) + case "createTime": + return ec.fieldContext_Language_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Language_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Language_calibreID(ctx, field) + case "code": + return ec.fieldContext_Language_code(ctx, field) + case "books": + return ec.fieldContext_Language_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createLanguage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Publisher_books(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Publisher_books(ctx, field) +func (ec *executionContext) _Mutation_updateLanguage(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateLanguage(ctx, field) if err != nil { return graphql.Null } @@ -10391,39 +11337,42 @@ func (ec *executionContext) _Publisher_books(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) + return ec.resolvers.Mutation().UpdateLanguage(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateLanguageInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*ent.BookConnection) + res := resTmp.(*ent.Language) fc.Result = res - return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) + return ec.marshalOLanguage2ᚖlybbrioᚋinternalᚋentᚐLanguage(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Publisher_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateLanguage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Publisher", + Object: "Mutation", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_BookConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_BookConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_BookConnection_totalCount(ctx, field) + case "id": + return ec.fieldContext_Language_id(ctx, field) + case "createTime": + return ec.fieldContext_Language_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Language_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Language_calibreID(ctx, field) + case "code": + return ec.fieldContext_Language_code(ctx, field) + case "books": + return ec.fieldContext_Language_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Language", field.Name) }, } defer func() { @@ -10433,15 +11382,15 @@ func (ec *executionContext) fieldContext_Publisher_books(ctx context.Context, fi } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Publisher_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_updateLanguage_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _PublisherConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PublisherConnection_edges(ctx, field) +func (ec *executionContext) _Mutation_createSeries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createSeries(ctx, field) if err != nil { return graphql.Null } @@ -10454,7 +11403,7 @@ func (ec *executionContext) _PublisherConnection_edges(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Mutation().CreateSeries(rctx, fc.Args["input"].(ent.CreateSeriesInput)) }) if err != nil { ec.Error(ctx, err) @@ -10463,32 +11412,53 @@ func (ec *executionContext) _PublisherConnection_edges(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.([]*ent.PublisherEdge) + res := resTmp.(*ent.Series) fc.Result = res - return ec.marshalOPublisherEdge2ᚕᚖlybbrioᚋinternalᚋentᚐPublisherEdge(ctx, field.Selections, res) + return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PublisherConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createSeries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PublisherConnection", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_PublisherEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_PublisherEdge_cursor(ctx, field) + case "id": + return ec.fieldContext_Series_id(ctx, field) + case "createTime": + return ec.fieldContext_Series_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Series_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Series_calibreID(ctx, field) + case "name": + return ec.fieldContext_Series_name(ctx, field) + case "sort": + return ec.fieldContext_Series_sort(ctx, field) + case "books": + return ec.fieldContext_Series_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PublisherEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) }, } - return fc, nil -} - -func (ec *executionContext) _PublisherConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PublisherConnection_pageInfo(ctx, field) + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createSeries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_updateSeries(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateSeries(ctx, field) if err != nil { return graphql.Null } @@ -10501,48 +11471,62 @@ func (ec *executionContext) _PublisherConnection_pageInfo(ctx context.Context, f }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Mutation().UpdateSeries(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateSeriesInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(*ent.Series) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PublisherConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateSeries(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PublisherConnection", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "id": + return ec.fieldContext_Series_id(ctx, field) + case "createTime": + return ec.fieldContext_Series_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Series_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Series_calibreID(ctx, field) + case "name": + return ec.fieldContext_Series_name(ctx, field) + case "sort": + return ec.fieldContext_Series_sort(ctx, field) + case "books": + return ec.fieldContext_Series_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updateSeries_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PublisherConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PublisherConnection_totalCount(ctx, field) +func (ec *executionContext) _Mutation_createIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createIdentifier(ctx, field) if err != nil { return graphql.Null } @@ -10555,38 +11539,62 @@ func (ec *executionContext) _PublisherConnection_totalCount(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return ec.resolvers.Mutation().CreateIdentifier(rctx, fc.Args["input"].(ent.CreateIdentifierInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*ent.Identifier) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PublisherConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PublisherConnection", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Identifier_id(ctx, field) + case "createTime": + return ec.fieldContext_Identifier_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Identifier_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Identifier_calibreID(ctx, field) + case "type": + return ec.fieldContext_Identifier_type(ctx, field) + case "value": + return ec.fieldContext_Identifier_value(ctx, field) + case "book": + return ec.fieldContext_Identifier_book(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createIdentifier_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PublisherEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PublisherEdge_node(ctx, field) +func (ec *executionContext) _Mutation_updateIdentifier(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateIdentifier(ctx, field) if err != nil { return graphql.Null } @@ -10599,7 +11607,7 @@ func (ec *executionContext) _PublisherEdge_node(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Mutation().UpdateIdentifier(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(ent.UpdateIdentifierInput)) }) if err != nil { ec.Error(ctx, err) @@ -10608,40 +11616,53 @@ func (ec *executionContext) _PublisherEdge_node(ctx context.Context, field graph if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Publisher) + res := resTmp.(*ent.Identifier) fc.Result = res - return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) + return ec.marshalOIdentifier2ᚖlybbrioᚋinternalᚋentᚐIdentifier(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PublisherEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateIdentifier(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PublisherEdge", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Publisher_id(ctx, field) + return ec.fieldContext_Identifier_id(ctx, field) case "createTime": - return ec.fieldContext_Publisher_createTime(ctx, field) + return ec.fieldContext_Identifier_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Publisher_updateTime(ctx, field) + return ec.fieldContext_Identifier_updateTime(ctx, field) case "calibreID": - return ec.fieldContext_Publisher_calibreID(ctx, field) - case "name": - return ec.fieldContext_Publisher_name(ctx, field) - case "books": - return ec.fieldContext_Publisher_books(ctx, field) + return ec.fieldContext_Identifier_calibreID(ctx, field) + case "type": + return ec.fieldContext_Identifier_type(ctx, field) + case "value": + return ec.fieldContext_Identifier_value(ctx, field) + case "book": + return ec.fieldContext_Identifier_book(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Identifier", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_updateIdentifier_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _PublisherEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PublisherEdge_cursor(ctx, field) +func (ec *executionContext) _Mutation_createUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createUser(ctx, field) if err != nil { return graphql.Null } @@ -10654,38 +11675,62 @@ func (ec *executionContext) _PublisherEdge_cursor(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Mutation().CreateUser(rctx, fc.Args["input"].(lybbrio.CreateUserInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PublisherEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PublisherEdge", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_createUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_node(ctx, field) +func (ec *executionContext) _Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_updateUser(ctx, field) if err != nil { return graphql.Null } @@ -10698,7 +11743,7 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Node(rctx, fc.Args["id"].(ksuid.ID)) + return ec.resolvers.Mutation().UpdateUser(rctx, fc.Args["id"].(ksuid.ID), fc.Args["input"].(lybbrio.UpdateUserInput)) }) if err != nil { ec.Error(ctx, err) @@ -10707,19 +11752,35 @@ func (ec *executionContext) _Query_node(ctx context.Context, field graphql.Colle if resTmp == nil { return graphql.Null } - res := resTmp.(ent.Noder) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalONode2lybbrioᚋinternalᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_updateUser(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Mutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } defer func() { @@ -10729,15 +11790,15 @@ func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field g } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_node_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_updateUser_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_nodes(ctx, field) +func (ec *executionContext) _Mutation_createTask(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_createTask(ctx, field) if err != nil { return graphql.Null } @@ -10750,31 +11811,52 @@ func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Nodes(rctx, fc.Args["ids"].([]ksuid.ID)) + return ec.resolvers.Mutation().CreateTask(rctx, fc.Args["input"].(lybbrio.CreateTaskInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]ent.Noder) + res := resTmp.(*ent.Task) fc.Result = res - return ec.marshalNNode2ᚕlybbrioᚋinternalᚋentᚐNoder(ctx, field.Selections, res) + return ec.marshalOTask2ᚖlybbrioᚋinternalᚋentᚐTask(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_createTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Mutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") + switch field.Name { + case "id": + return ec.fieldContext_Task_id(ctx, field) + case "createTime": + return ec.fieldContext_Task_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Task_updateTime(ctx, field) + case "type": + return ec.fieldContext_Task_type(ctx, field) + case "status": + return ec.fieldContext_Task_status(ctx, field) + case "progress": + return ec.fieldContext_Task_progress(ctx, field) + case "message": + return ec.fieldContext_Task_message(ctx, field) + case "error": + return ec.fieldContext_Task_error(ctx, field) + case "userID": + return ec.fieldContext_Task_userID(ctx, field) + case "isSystemTask": + return ec.fieldContext_Task_isSystemTask(ctx, field) + case "user": + return ec.fieldContext_Task_user(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Task", field.Name) }, } defer func() { @@ -10784,15 +11866,15 @@ func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_nodes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Mutation_createTask_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_authors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_authors(ctx, field) +func (ec *executionContext) _PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasNextPage(ctx, field) if err != nil { return graphql.Null } @@ -10805,7 +11887,7 @@ func (ec *executionContext) _Query_authors(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Authors(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.AuthorOrder), fc.Args["where"].(*ent.AuthorWhereInput)) + return obj.HasNextPage, nil }) if err != nil { ec.Error(ctx, err) @@ -10817,45 +11899,26 @@ func (ec *executionContext) _Query_authors(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(*ent.AuthorConnection) + res := resTmp.(bool) fc.Result = res - return ec.marshalNAuthorConnection2ᚖlybbrioᚋinternalᚋentᚐAuthorConnection(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_authors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PageInfo", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_AuthorConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_AuthorConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_AuthorConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type AuthorConnection", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_authors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_books(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_books(ctx, field) +func (ec *executionContext) _PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) if err != nil { return graphql.Null } @@ -10868,7 +11931,7 @@ func (ec *executionContext) _Query_books(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Books(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) + return obj.HasPreviousPage, nil }) if err != nil { ec.Error(ctx, err) @@ -10880,45 +11943,26 @@ func (ec *executionContext) _Query_books(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(*ent.BookConnection) + res := resTmp.(bool) fc.Result = res - return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_hasPreviousPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PageInfo", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_BookConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_BookConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_BookConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_bookFiles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_bookFiles(ctx, field) +func (ec *executionContext) _PageInfo_startCursor(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_startCursor(ctx, field) if err != nil { return graphql.Null } @@ -10931,56 +11975,35 @@ func (ec *executionContext) _Query_bookFiles(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().BookFiles(rctx) + return obj.StartCursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]*ent.BookFile) + res := resTmp.(*entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalNBookFile2ᚕᚖlybbrioᚋinternalᚋentᚐBookFileᚄ(ctx, field.Selections, res) + return ec.marshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_bookFiles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_startCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PageInfo", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_BookFile_id(ctx, field) - case "createTime": - return ec.fieldContext_BookFile_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_BookFile_updateTime(ctx, field) - case "name": - return ec.fieldContext_BookFile_name(ctx, field) - case "path": - return ec.fieldContext_BookFile_path(ctx, field) - case "size": - return ec.fieldContext_BookFile_size(ctx, field) - case "format": - return ec.fieldContext_BookFile_format(ctx, field) - case "book": - return ec.fieldContext_BookFile_book(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BookFile", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_identifiers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_identifiers(ctx, field) +func (ec *executionContext) _PageInfo_endCursor(ctx context.Context, field graphql.CollectedField, obj *entgql.PageInfo[ksuid.ID]) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PageInfo_endCursor(ctx, field) if err != nil { return graphql.Null } @@ -10993,57 +12016,35 @@ func (ec *executionContext) _Query_identifiers(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Identifiers(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.IdentifierOrder), fc.Args["where"].(*ent.IdentifierWhereInput)) + return obj.EndCursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*ent.IdentifierConnection) + res := resTmp.(*entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalNIdentifierConnection2ᚖlybbrioᚋinternalᚋentᚐIdentifierConnection(ctx, field.Selections, res) + return ec.marshalOCursor2ᚖentgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_identifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PageInfo_endCursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PageInfo", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_IdentifierConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_IdentifierConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_IdentifierConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type IdentifierConnection", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_identifiers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_languages(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_languages(ctx, field) +func (ec *executionContext) _Publisher_id(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_id(ctx, field) if err != nil { return graphql.Null } @@ -11056,7 +12057,7 @@ func (ec *executionContext) _Query_languages(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Languages(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.LanguageOrder), fc.Args["where"].(*ent.LanguageWhereInput)) + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) @@ -11068,45 +12069,26 @@ func (ec *executionContext) _Query_languages(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(*ent.LanguageConnection) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalNLanguageConnection2ᚖlybbrioᚋinternalᚋentᚐLanguageConnection(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_languages(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Publisher_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Publisher", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_LanguageConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_LanguageConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_LanguageConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type LanguageConnection", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_languages_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_publishers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_publishers(ctx, field) +func (ec *executionContext) _Publisher_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_createTime(ctx, field) if err != nil { return graphql.Null } @@ -11119,7 +12101,7 @@ func (ec *executionContext) _Query_publishers(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Publishers(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.PublisherOrder), fc.Args["where"].(*ent.PublisherWhereInput)) + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -11131,45 +12113,26 @@ func (ec *executionContext) _Query_publishers(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(*ent.PublisherConnection) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNPublisherConnection2ᚖlybbrioᚋinternalᚋentᚐPublisherConnection(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_publishers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Publisher_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Publisher", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_PublisherConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_PublisherConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_PublisherConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PublisherConnection", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_publishers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_seriesSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_seriesSlice(ctx, field) +func (ec *executionContext) _Publisher_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -11182,7 +12145,7 @@ func (ec *executionContext) _Query_seriesSlice(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().SeriesSlice(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.SeriesOrder), fc.Args["where"].(*ent.SeriesWhereInput)) + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -11194,45 +12157,67 @@ func (ec *executionContext) _Query_seriesSlice(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*ent.SeriesConnection) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNSeriesConnection2ᚖlybbrioᚋinternalᚋentᚐSeriesConnection(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_seriesSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Publisher_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Publisher", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_SeriesConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_SeriesConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_SeriesConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type SeriesConnection", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } + return fc, nil +} + +func (ec *executionContext) _Publisher_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_calibreID(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_seriesSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.CalibreID, nil + }) + if err != nil { ec.Error(ctx, err) - return fc, err + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Publisher_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Publisher", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Query_shelves(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_shelves(ctx, field) +func (ec *executionContext) _Publisher_name(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_name(ctx, field) if err != nil { return graphql.Null } @@ -11245,7 +12230,7 @@ func (ec *executionContext) _Query_shelves(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Shelves(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.ShelfOrder), fc.Args["where"].(*ent.ShelfWhereInput)) + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -11257,45 +12242,26 @@ func (ec *executionContext) _Query_shelves(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(*ent.ShelfConnection) + res := resTmp.(string) fc.Result = res - return ec.marshalNShelfConnection2ᚖlybbrioᚋinternalᚋentᚐShelfConnection(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_shelves(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Publisher_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Publisher", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_ShelfConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_ShelfConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_ShelfConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ShelfConnection", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_shelves_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_tags(ctx, field) +func (ec *executionContext) _Publisher_books(ctx context.Context, field graphql.CollectedField, obj *ent.Publisher) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Publisher_books(ctx, field) if err != nil { return graphql.Null } @@ -11308,7 +12274,7 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Tags(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.TagOrder), fc.Args["where"].(*ent.TagWhereInput)) + return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -11320,27 +12286,27 @@ func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(*ent.TagConnection) + res := resTmp.(*ent.BookConnection) fc.Result = res - return ec.marshalNTagConnection2ᚖlybbrioᚋinternalᚋentᚐTagConnection(ctx, field.Selections, res) + return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Publisher_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Publisher", Field: field, IsMethod: true, - IsResolver: true, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "edges": - return ec.fieldContext_TagConnection_edges(ctx, field) + return ec.fieldContext_BookConnection_edges(ctx, field) case "pageInfo": - return ec.fieldContext_TagConnection_pageInfo(ctx, field) + return ec.fieldContext_BookConnection_pageInfo(ctx, field) case "totalCount": - return ec.fieldContext_TagConnection_totalCount(ctx, field) + return ec.fieldContext_BookConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TagConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) }, } defer func() { @@ -11350,15 +12316,15 @@ func (ec *executionContext) fieldContext_Query_tags(ctx context.Context, field g } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_tags_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_Publisher_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query_tasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_tasks(ctx, field) +func (ec *executionContext) _PublisherConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PublisherConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -11371,57 +12337,41 @@ func (ec *executionContext) _Query_tasks(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Tasks(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.TaskOrder), fc.Args["where"].(*ent.TaskWhereInput)) + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*ent.TaskConnection) + res := resTmp.([]*ent.PublisherEdge) fc.Result = res - return ec.marshalNTaskConnection2ᚖlybbrioᚋinternalᚋentᚐTaskConnection(ctx, field.Selections, res) + return ec.marshalOPublisherEdge2ᚕᚖlybbrioᚋinternalᚋentᚐPublisherEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PublisherConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PublisherConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "edges": - return ec.fieldContext_TaskConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_TaskConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_TaskConnection_totalCount(ctx, field) + case "node": + return ec.fieldContext_PublisherEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_PublisherEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TaskConnection", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PublisherEdge", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_tasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_users(ctx, field) +func (ec *executionContext) _PublisherConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PublisherConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -11434,7 +12384,7 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Users(rctx) + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -11446,42 +12396,36 @@ func (ec *executionContext) _Query_users(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.([]*ent.User) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalNUser2ᚕᚖlybbrioᚋinternalᚋentᚐUserᚄ(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_users(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PublisherConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PublisherConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createTime": - return ec.fieldContext_User_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_me(ctx, field) +func (ec *executionContext) _PublisherConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PublisherConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -11494,7 +12438,7 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Me(rctx) + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -11506,42 +12450,26 @@ func (ec *executionContext) _Query_me(ctx context.Context, field graphql.Collect } return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(int) fc.Result = res - return ec.marshalNUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_me(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PublisherConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PublisherConnection", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createTime": - return ec.fieldContext_User_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___type(ctx, field) +func (ec *executionContext) _PublisherEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PublisherEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -11554,7 +12482,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectType(fc.Args["name"].(string)) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -11563,59 +12491,40 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*ent.Publisher) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOPublisher2ᚖlybbrioᚋinternalᚋentᚐPublisher(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PublisherEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PublisherEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) + case "id": + return ec.fieldContext_Publisher_id(ctx, field) + case "createTime": + return ec.fieldContext_Publisher_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Publisher_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Publisher_calibreID(ctx, field) case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) + return ec.fieldContext_Publisher_name(ctx, field) + case "books": + return ec.fieldContext_Publisher_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Publisher", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___schema(ctx, field) +func (ec *executionContext) _PublisherEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.PublisherEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PublisherEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -11628,49 +12537,38 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectSchema() + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*introspection.Schema) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PublisherEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "PublisherEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "description": - return ec.fieldContext___Schema_description(ctx, field) - case "types": - return ec.fieldContext___Schema_types(ctx, field) - case "queryType": - return ec.fieldContext___Schema_queryType(ctx, field) - case "mutationType": - return ec.fieldContext___Schema_mutationType(ctx, field) - case "subscriptionType": - return ec.fieldContext___Schema_subscriptionType(ctx, field) - case "directives": - return ec.fieldContext___Schema_directives(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Series_id(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_id(ctx, field) +func (ec *executionContext) _Query_node(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_node(ctx, field) if err != nil { return graphql.Null } @@ -11683,38 +12581,46 @@ func (ec *executionContext) _Series_id(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return ec.resolvers.Query().Node(rctx, fc.Args["id"].(ksuid.ID)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(ent.Noder) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalONode2lybbrioᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_node_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Series_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_createTime(ctx, field) +func (ec *executionContext) _Query_nodes(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_nodes(ctx, field) if err != nil { return graphql.Null } @@ -11727,7 +12633,7 @@ func (ec *executionContext) _Series_createTime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return ec.resolvers.Query().Nodes(rctx, fc.Args["ids"].([]ksuid.ID)) }) if err != nil { ec.Error(ctx, err) @@ -11739,26 +12645,37 @@ func (ec *executionContext) _Series_createTime(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.([]ent.Noder) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNNode2ᚕlybbrioᚋinternalᚋentᚐNoder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("FieldContext.Child cannot be called on type INTERFACE") }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_nodes_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Series_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_updateTime(ctx, field) +func (ec *executionContext) _Query_authors(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_authors(ctx, field) if err != nil { return graphql.Null } @@ -11771,7 +12688,7 @@ func (ec *executionContext) _Series_updateTime(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return ec.resolvers.Query().Authors(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.AuthorOrder), fc.Args["where"].(*ent.AuthorWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -11783,67 +12700,45 @@ func (ec *executionContext) _Series_updateTime(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*ent.AuthorConnection) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNAuthorConnection2ᚖlybbrioᚋinternalᚋentᚐAuthorConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_authors(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_AuthorConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_AuthorConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_AuthorConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type AuthorConnection", field.Name) }, } - return fc, nil -} - -func (ec *executionContext) _Series_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_calibreID(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.CalibreID, nil - }) - if err != nil { + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_authors_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(int64) - fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_Series_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "Series", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") - }, + return fc, err } return fc, nil } -func (ec *executionContext) _Series_name(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_name(ctx, field) +func (ec *executionContext) _Query_books(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_books(ctx, field) if err != nil { return graphql.Null } @@ -11856,7 +12751,7 @@ func (ec *executionContext) _Series_name(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Query().Books(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -11868,26 +12763,45 @@ func (ec *executionContext) _Series_name(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.BookConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_BookConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_BookConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_BookConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Series_sort(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_sort(ctx, field) +func (ec *executionContext) _Query_bookCovers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_bookCovers(ctx, field) if err != nil { return graphql.Null } @@ -11900,7 +12814,7 @@ func (ec *executionContext) _Series_sort(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Sort, nil + return ec.resolvers.Query().BookCovers(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].(*ent.BookCoverOrder), fc.Args["where"].(*ent.BookCoverWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -11912,26 +12826,45 @@ func (ec *executionContext) _Series_sort(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.BookCoverConnection) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNBookCoverConnection2ᚖlybbrioᚋinternalᚋentᚐBookCoverConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_sort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_bookCovers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_BookCoverConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_BookCoverConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_BookCoverConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookCoverConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_bookCovers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Series_books(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Series_books(ctx, field) +func (ec *executionContext) _Query_bookFiles(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_bookFiles(ctx, field) if err != nil { return graphql.Null } @@ -11944,75 +12877,56 @@ func (ec *executionContext) _Series_books(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Books(ctx) + return ec.resolvers.Query().BookFiles(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.Book) + res := resTmp.([]*ent.BookFile) fc.Result = res - return ec.marshalOBook2ᚕᚖlybbrioᚋinternalᚋentᚐBookᚄ(ctx, field.Selections, res) + return ec.marshalNBookFile2ᚕᚖlybbrioᚋinternalᚋentᚐBookFileᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Series_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_bookFiles(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Series", + Object: "Query", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Book_id(ctx, field) + return ec.fieldContext_BookFile_id(ctx, field) case "createTime": - return ec.fieldContext_Book_createTime(ctx, field) + return ec.fieldContext_BookFile_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Book_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Book_calibreID(ctx, field) - case "title": - return ec.fieldContext_Book_title(ctx, field) - case "sort": - return ec.fieldContext_Book_sort(ctx, field) - case "publishedDate": - return ec.fieldContext_Book_publishedDate(ctx, field) + return ec.fieldContext_BookFile_updateTime(ctx, field) + case "name": + return ec.fieldContext_BookFile_name(ctx, field) case "path": - return ec.fieldContext_Book_path(ctx, field) - case "isbn": - return ec.fieldContext_Book_isbn(ctx, field) - case "description": - return ec.fieldContext_Book_description(ctx, field) - case "seriesIndex": - return ec.fieldContext_Book_seriesIndex(ctx, field) - case "authors": - return ec.fieldContext_Book_authors(ctx, field) - case "publisher": - return ec.fieldContext_Book_publisher(ctx, field) - case "series": - return ec.fieldContext_Book_series(ctx, field) - case "identifiers": - return ec.fieldContext_Book_identifiers(ctx, field) - case "tags": - return ec.fieldContext_Book_tags(ctx, field) - case "language": - return ec.fieldContext_Book_language(ctx, field) - case "shelf": - return ec.fieldContext_Book_shelf(ctx, field) - case "files": - return ec.fieldContext_Book_files(ctx, field) + return ec.fieldContext_BookFile_path(ctx, field) + case "size": + return ec.fieldContext_BookFile_size(ctx, field) + case "format": + return ec.fieldContext_BookFile_format(ctx, field) + case "book": + return ec.fieldContext_BookFile_book(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BookFile", field.Name) }, } return fc, nil } -func (ec *executionContext) _SeriesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SeriesConnection_edges(ctx, field) +func (ec *executionContext) _Query_identifiers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_identifiers(ctx, field) if err != nil { return graphql.Null } @@ -12025,41 +12939,57 @@ func (ec *executionContext) _SeriesConnection_edges(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return ec.resolvers.Query().Identifiers(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.IdentifierOrder), fc.Args["where"].(*ent.IdentifierWhereInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.SeriesEdge) + res := resTmp.(*ent.IdentifierConnection) fc.Result = res - return ec.marshalOSeriesEdge2ᚕᚖlybbrioᚋinternalᚋentᚐSeriesEdge(ctx, field.Selections, res) + return ec.marshalNIdentifierConnection2ᚖlybbrioᚋinternalᚋentᚐIdentifierConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SeriesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_identifiers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SeriesConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "node": - return ec.fieldContext_SeriesEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_SeriesEdge_cursor(ctx, field) + case "edges": + return ec.fieldContext_IdentifierConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_IdentifierConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_IdentifierConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type SeriesEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type IdentifierConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_identifiers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _SeriesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SeriesConnection_pageInfo(ctx, field) +func (ec *executionContext) _Query_languages(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_languages(ctx, field) if err != nil { return graphql.Null } @@ -12072,7 +13002,7 @@ func (ec *executionContext) _SeriesConnection_pageInfo(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return ec.resolvers.Query().Languages(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.LanguageOrder), fc.Args["where"].(*ent.LanguageWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -12084,36 +13014,45 @@ func (ec *executionContext) _SeriesConnection_pageInfo(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(*ent.LanguageConnection) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNLanguageConnection2ᚖlybbrioᚋinternalᚋentᚐLanguageConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SeriesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_languages(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SeriesConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) + case "edges": + return ec.fieldContext_LanguageConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_LanguageConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_LanguageConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, fmt.Errorf("no field named %q was found under type LanguageConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_languages_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _SeriesConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SeriesConnection_totalCount(ctx, field) +func (ec *executionContext) _Query_publishers(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_publishers(ctx, field) if err != nil { return graphql.Null } @@ -12126,7 +13065,7 @@ func (ec *executionContext) _SeriesConnection_totalCount(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return ec.resolvers.Query().Publishers(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.PublisherOrder), fc.Args["where"].(*ent.PublisherWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -12138,26 +13077,45 @@ func (ec *executionContext) _SeriesConnection_totalCount(ctx context.Context, fi } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*ent.PublisherConnection) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNPublisherConnection2ᚖlybbrioᚋinternalᚋentᚐPublisherConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SeriesConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_publishers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SeriesConnection", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_PublisherConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_PublisherConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_PublisherConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PublisherConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_publishers_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _SeriesEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SeriesEdge_node(ctx, field) +func (ec *executionContext) _Query_seriesSlice(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_seriesSlice(ctx, field) if err != nil { return graphql.Null } @@ -12170,51 +13128,57 @@ func (ec *executionContext) _SeriesEdge_node(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return ec.resolvers.Query().SeriesSlice(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.SeriesOrder), fc.Args["where"].(*ent.SeriesWhereInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Series) + res := resTmp.(*ent.SeriesConnection) fc.Result = res - return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) + return ec.marshalNSeriesConnection2ᚖlybbrioᚋinternalᚋentᚐSeriesConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SeriesEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_seriesSlice(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SeriesEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_Series_id(ctx, field) - case "createTime": - return ec.fieldContext_Series_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Series_updateTime(ctx, field) - case "calibreID": - return ec.fieldContext_Series_calibreID(ctx, field) - case "name": - return ec.fieldContext_Series_name(ctx, field) - case "sort": - return ec.fieldContext_Series_sort(ctx, field) - case "books": - return ec.fieldContext_Series_books(ctx, field) + case "edges": + return ec.fieldContext_SeriesConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_SeriesConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_SeriesConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) + return nil, fmt.Errorf("no field named %q was found under type SeriesConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_seriesSlice_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _SeriesEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_SeriesEdge_cursor(ctx, field) +func (ec *executionContext) _Query_shelves(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_shelves(ctx, field) if err != nil { return graphql.Null } @@ -12227,7 +13191,7 @@ func (ec *executionContext) _SeriesEdge_cursor(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return ec.resolvers.Query().Shelves(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.ShelfOrder), fc.Args["where"].(*ent.ShelfWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -12239,26 +13203,45 @@ func (ec *executionContext) _SeriesEdge_cursor(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.(*ent.ShelfConnection) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalNShelfConnection2ᚖlybbrioᚋinternalᚋentᚐShelfConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_SeriesEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_shelves(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "SeriesEdge", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_ShelfConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_ShelfConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_ShelfConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ShelfConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_shelves_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Shelf_id(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_id(ctx, field) +func (ec *executionContext) _Query_tags(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_tags(ctx, field) if err != nil { return graphql.Null } @@ -12271,7 +13254,7 @@ func (ec *executionContext) _Shelf_id(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return ec.resolvers.Query().Tags(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.TagOrder), fc.Args["where"].(*ent.TagWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -12283,26 +13266,45 @@ func (ec *executionContext) _Shelf_id(ctx context.Context, field graphql.Collect } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(*ent.TagConnection) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNTagConnection2ᚖlybbrioᚋinternalᚋentᚐTagConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_tags(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TagConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TagConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_TagConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TagConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_tags_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Shelf_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_createTime(ctx, field) +func (ec *executionContext) _Query_tasks(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_tasks(ctx, field) if err != nil { return graphql.Null } @@ -12315,7 +13317,7 @@ func (ec *executionContext) _Shelf_createTime(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return ec.resolvers.Query().Tasks(rctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.TaskOrder), fc.Args["where"].(*ent.TaskWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -12327,26 +13329,45 @@ func (ec *executionContext) _Shelf_createTime(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*ent.TaskConnection) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNTaskConnection2ᚖlybbrioᚋinternalᚋentᚐTaskConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_tasks(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_TaskConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_TaskConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_TaskConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TaskConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_tasks_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Shelf_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_updateTime(ctx, field) +func (ec *executionContext) _Query_users(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_users(ctx, field) if err != nil { return graphql.Null } @@ -12359,7 +13380,7 @@ func (ec *executionContext) _Shelf_updateTime(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return ec.resolvers.Query().Users(rctx) }) if err != nil { ec.Error(ctx, err) @@ -12371,26 +13392,42 @@ func (ec *executionContext) _Shelf_updateTime(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.([]*ent.User) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNUser2ᚕᚖlybbrioᚋinternalᚋentᚐUserᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_users(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } return fc, nil } -func (ec *executionContext) _Shelf_public(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_public(ctx, field) +func (ec *executionContext) _Query_me(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_me(ctx, field) if err != nil { return graphql.Null } @@ -12403,7 +13440,7 @@ func (ec *executionContext) _Shelf_public(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Public, nil + return ec.resolvers.Query().Me(rctx) }) if err != nil { ec.Error(ctx, err) @@ -12415,26 +13452,42 @@ func (ec *executionContext) _Shelf_public(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_public(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_me(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } return fc, nil } -func (ec *executionContext) _Shelf_userID(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_userID(ctx, field) +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) if err != nil { return graphql.Null } @@ -12447,38 +13500,68 @@ func (ec *executionContext) _Shelf_userID(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UserID, nil + return ec.introspectType(fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Shelf_name(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_name(ctx, field) +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) if err != nil { return graphql.Null } @@ -12491,38 +13574,49 @@ func (ec *executionContext) _Shelf_name(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.introspectSchema() }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*introspection.Schema) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Query", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) }, } return fc, nil } -func (ec *executionContext) _Shelf_description(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_description(ctx, field) +func (ec *executionContext) _Series_id(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_id(ctx, field) if err != nil { return graphql.Null } @@ -12535,35 +13629,38 @@ func (ec *executionContext) _Shelf_description(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Series", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Shelf_user(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_user(ctx, field) +func (ec *executionContext) _Series_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_createTime(ctx, field) if err != nil { return graphql.Null } @@ -12576,7 +13673,7 @@ func (ec *executionContext) _Shelf_user(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.User(ctx) + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -12588,42 +13685,26 @@ func (ec *executionContext) _Shelf_user(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Series", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createTime": - return ec.fieldContext_User_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Shelf_books(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Shelf_books(ctx, field) +func (ec *executionContext) _Series_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -12636,7 +13717,7 @@ func (ec *executionContext) _Shelf_books(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -12648,45 +13729,26 @@ func (ec *executionContext) _Shelf_books(ctx context.Context, field graphql.Coll } return graphql.Null } - res := resTmp.(*ent.BookConnection) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Shelf_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Shelf", + Object: "Series", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_BookConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_BookConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_BookConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Shelf_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _ShelfConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ShelfConnection_edges(ctx, field) +func (ec *executionContext) _Series_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_calibreID(ctx, field) if err != nil { return graphql.Null } @@ -12699,7 +13761,7 @@ func (ec *executionContext) _ShelfConnection_edges(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.CalibreID, nil }) if err != nil { ec.Error(ctx, err) @@ -12708,32 +13770,26 @@ func (ec *executionContext) _ShelfConnection_edges(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.([]*ent.ShelfEdge) + res := resTmp.(int64) fc.Result = res - return ec.marshalOShelfEdge2ᚕᚖlybbrioᚋinternalᚋentᚐShelfEdge(ctx, field.Selections, res) + return ec.marshalOInt2int64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ShelfConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ShelfConnection", + Object: "Series", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_ShelfEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_ShelfEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type ShelfEdge", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ShelfConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ShelfConnection_pageInfo(ctx, field) +func (ec *executionContext) _Series_name(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_name(ctx, field) if err != nil { return graphql.Null } @@ -12746,7 +13802,7 @@ func (ec *executionContext) _ShelfConnection_pageInfo(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -12758,36 +13814,26 @@ func (ec *executionContext) _ShelfConnection_pageInfo(ctx context.Context, field } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(string) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ShelfConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ShelfConnection", + Object: "Series", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ShelfConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ShelfConnection_totalCount(ctx, field) +func (ec *executionContext) _Series_sort(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_sort(ctx, field) if err != nil { return graphql.Null } @@ -12800,7 +13846,7 @@ func (ec *executionContext) _ShelfConnection_totalCount(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.Sort, nil }) if err != nil { ec.Error(ctx, err) @@ -12812,26 +13858,26 @@ func (ec *executionContext) _ShelfConnection_totalCount(ctx context.Context, fie } return graphql.Null } - res := resTmp.(int) + res := resTmp.(string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ShelfConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_sort(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ShelfConnection", + Object: "Series", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ShelfEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ShelfEdge_node(ctx, field) +func (ec *executionContext) _Series_books(ctx context.Context, field graphql.CollectedField, obj *ent.Series) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Series_books(ctx, field) if err != nil { return graphql.Null } @@ -12844,7 +13890,7 @@ func (ec *executionContext) _ShelfEdge_node(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Books(ctx) }) if err != nil { ec.Error(ctx, err) @@ -12853,46 +13899,68 @@ func (ec *executionContext) _ShelfEdge_node(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Shelf) + res := resTmp.([]*ent.Book) fc.Result = res - return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) + return ec.marshalOBook2ᚕᚖlybbrioᚋinternalᚋentᚐBookᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ShelfEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Series_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ShelfEdge", + Object: "Series", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Shelf_id(ctx, field) + return ec.fieldContext_Book_id(ctx, field) case "createTime": - return ec.fieldContext_Shelf_createTime(ctx, field) + return ec.fieldContext_Book_createTime(ctx, field) case "updateTime": - return ec.fieldContext_Shelf_updateTime(ctx, field) - case "public": - return ec.fieldContext_Shelf_public(ctx, field) - case "userID": - return ec.fieldContext_Shelf_userID(ctx, field) - case "name": - return ec.fieldContext_Shelf_name(ctx, field) + return ec.fieldContext_Book_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Book_calibreID(ctx, field) + case "title": + return ec.fieldContext_Book_title(ctx, field) + case "sort": + return ec.fieldContext_Book_sort(ctx, field) + case "publishedDate": + return ec.fieldContext_Book_publishedDate(ctx, field) + case "path": + return ec.fieldContext_Book_path(ctx, field) + case "isbn": + return ec.fieldContext_Book_isbn(ctx, field) case "description": - return ec.fieldContext_Shelf_description(ctx, field) - case "user": - return ec.fieldContext_Shelf_user(ctx, field) - case "books": - return ec.fieldContext_Shelf_books(ctx, field) + return ec.fieldContext_Book_description(ctx, field) + case "seriesIndex": + return ec.fieldContext_Book_seriesIndex(ctx, field) + case "authors": + return ec.fieldContext_Book_authors(ctx, field) + case "publisher": + return ec.fieldContext_Book_publisher(ctx, field) + case "series": + return ec.fieldContext_Book_series(ctx, field) + case "identifiers": + return ec.fieldContext_Book_identifiers(ctx, field) + case "tags": + return ec.fieldContext_Book_tags(ctx, field) + case "language": + return ec.fieldContext_Book_language(ctx, field) + case "shelf": + return ec.fieldContext_Book_shelf(ctx, field) + case "files": + return ec.fieldContext_Book_files(ctx, field) + case "covers": + return ec.fieldContext_Book_covers(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Book", field.Name) }, } return fc, nil } -func (ec *executionContext) _ShelfEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ShelfEdge_cursor(ctx, field) +func (ec *executionContext) _SeriesConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SeriesConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -12905,38 +13973,41 @@ func (ec *executionContext) _ShelfEdge_cursor(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.([]*ent.SeriesEdge) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalOSeriesEdge2ᚕᚖlybbrioᚋinternalᚋentᚐSeriesEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ShelfEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SeriesConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ShelfEdge", + Object: "SeriesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_SeriesEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_SeriesEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type SeriesEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Tag_id(ctx, field) +func (ec *executionContext) _SeriesConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SeriesConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -12949,7 +14020,7 @@ func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.Collected }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -12961,26 +14032,36 @@ func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.Collected } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Tag_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SeriesConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Tag", + Object: "SeriesConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Tag_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Tag_calibreID(ctx, field) +func (ec *executionContext) _SeriesConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SeriesConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -12993,23 +14074,26 @@ func (ec *executionContext) _Tag_calibreID(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CalibreID, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(int64) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2int64(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Tag_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SeriesConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Tag", + Object: "SeriesConnection", Field: field, IsMethod: false, IsResolver: false, @@ -13020,8 +14104,8 @@ func (ec *executionContext) fieldContext_Tag_calibreID(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Tag_name(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Tag_name(ctx, field) +func (ec *executionContext) _SeriesEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SeriesEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -13034,38 +14118,51 @@ func (ec *executionContext) _Tag_name(ctx context.Context, field graphql.Collect }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.Series) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOSeries2ᚖlybbrioᚋinternalᚋentᚐSeries(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Tag_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SeriesEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Tag", + Object: "SeriesEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Series_id(ctx, field) + case "createTime": + return ec.fieldContext_Series_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Series_updateTime(ctx, field) + case "calibreID": + return ec.fieldContext_Series_calibreID(ctx, field) + case "name": + return ec.fieldContext_Series_name(ctx, field) + case "sort": + return ec.fieldContext_Series_sort(ctx, field) + case "books": + return ec.fieldContext_Series_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Series", field.Name) }, } return fc, nil } -func (ec *executionContext) _Tag_books(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Tag_books(ctx, field) +func (ec *executionContext) _SeriesEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.SeriesEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_SeriesEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -13078,7 +14175,7 @@ func (ec *executionContext) _Tag_books(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -13090,45 +14187,26 @@ func (ec *executionContext) _Tag_books(ctx context.Context, field graphql.Collec } return graphql.Null } - res := resTmp.(*ent.BookConnection) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Tag_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_SeriesEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Tag", + Object: "SeriesEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "edges": - return ec.fieldContext_BookConnection_edges(ctx, field) - case "pageInfo": - return ec.fieldContext_BookConnection_pageInfo(ctx, field) - case "totalCount": - return ec.fieldContext_BookConnection_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) + return nil, errors.New("field of type Cursor does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Tag_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _TagConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TagConnection_edges(ctx, field) +func (ec *executionContext) _Shelf_id(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_id(ctx, field) if err != nil { return graphql.Null } @@ -13141,41 +14219,38 @@ func (ec *executionContext) _TagConnection_edges(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Edges, nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.TagEdge) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOTagEdge2ᚕᚖlybbrioᚋinternalᚋentᚐTagEdge(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TagConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TagConnection", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "node": - return ec.fieldContext_TagEdge_node(ctx, field) - case "cursor": - return ec.fieldContext_TagEdge_cursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TagEdge", field.Name) + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TagConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TagConnection_pageInfo(ctx, field) +func (ec *executionContext) _Shelf_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_createTime(ctx, field) if err != nil { return graphql.Null } @@ -13188,7 +14263,7 @@ func (ec *executionContext) _TagConnection_pageInfo(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageInfo, nil + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -13200,36 +14275,26 @@ func (ec *executionContext) _TagConnection_pageInfo(ctx context.Context, field g } return graphql.Null } - res := resTmp.(entgql.PageInfo[ksuid.ID]) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TagConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TagConnection", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PageInfo_hasNextPage(ctx, field) - case "hasPreviousPage": - return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) - case "startCursor": - return ec.fieldContext_PageInfo_startCursor(ctx, field) - case "endCursor": - return ec.fieldContext_PageInfo_endCursor(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TagConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TagConnection_totalCount(ctx, field) +func (ec *executionContext) _Shelf_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -13242,7 +14307,7 @@ func (ec *executionContext) _TagConnection_totalCount(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -13254,26 +14319,26 @@ func (ec *executionContext) _TagConnection_totalCount(ctx context.Context, field } return graphql.Null } - res := resTmp.(int) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TagConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TagConnection", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TagEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.TagEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TagEdge_node(ctx, field) +func (ec *executionContext) _Shelf_public(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_public(ctx, field) if err != nil { return graphql.Null } @@ -13286,45 +14351,38 @@ func (ec *executionContext) _TagEdge_node(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Node, nil + return obj.Public, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.Tag) + res := resTmp.(bool) fc.Result = res - return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TagEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_public(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TagEdge", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Tag_id(ctx, field) - case "calibreID": - return ec.fieldContext_Tag_calibreID(ctx, field) - case "name": - return ec.fieldContext_Tag_name(ctx, field) - case "books": - return ec.fieldContext_Tag_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _TagEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.TagEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TagEdge_cursor(ctx, field) +func (ec *executionContext) _Shelf_userID(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_userID(ctx, field) if err != nil { return graphql.Null } @@ -13337,7 +14395,7 @@ func (ec *executionContext) _TagEdge_cursor(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Cursor, nil + return obj.UserID, nil }) if err != nil { ec.Error(ctx, err) @@ -13349,26 +14407,26 @@ func (ec *executionContext) _TagEdge_cursor(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(entgql.Cursor[ksuid.ID]) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TagEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TagEdge", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Cursor does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Task_id(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_id(ctx, field) +func (ec *executionContext) _Shelf_name(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_name(ctx, field) if err != nil { return graphql.Null } @@ -13381,7 +14439,7 @@ func (ec *executionContext) _Task_id(ctx context.Context, field graphql.Collecte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -13393,26 +14451,26 @@ func (ec *executionContext) _Task_id(ctx context.Context, field graphql.Collecte } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(string) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Task_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_createTime(ctx, field) +func (ec *executionContext) _Shelf_description(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_description(ctx, field) if err != nil { return graphql.Null } @@ -13425,38 +14483,35 @@ func (ec *executionContext) _Task_createTime(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(string) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Shelf", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Task_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_updateTime(ctx, field) +func (ec *executionContext) _Shelf_user(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_user(ctx, field) if err != nil { return graphql.Null } @@ -13469,7 +14524,7 @@ func (ec *executionContext) _Task_updateTime(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return obj.User(ctx) }) if err != nil { ec.Error(ctx, err) @@ -13481,26 +14536,42 @@ func (ec *executionContext) _Task_updateTime(ctx context.Context, field graphql. } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Shelf", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } return fc, nil } -func (ec *executionContext) _Task_type(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_type(ctx, field) +func (ec *executionContext) _Shelf_books(ctx context.Context, field graphql.CollectedField, obj *ent.Shelf) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Shelf_books(ctx, field) if err != nil { return graphql.Null } @@ -13513,7 +14584,7 @@ func (ec *executionContext) _Task_type(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) }) if err != nil { ec.Error(ctx, err) @@ -13525,26 +14596,45 @@ func (ec *executionContext) _Task_type(ctx context.Context, field graphql.Collec } return graphql.Null } - res := resTmp.(task_enums.TaskType) + res := resTmp.(*ent.BookConnection) fc.Result = res - return ec.marshalNTaskTaskType2lybbrioᚋinternalᚋentᚋschemaᚋtask_enumsᚐTaskType(ctx, field.Selections, res) + return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Shelf_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Shelf", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TaskTaskType does not have child fields") + switch field.Name { + case "edges": + return ec.fieldContext_BookConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_BookConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_BookConnection_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Shelf_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Task_status(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_status(ctx, field) +func (ec *executionContext) _ShelfConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ShelfConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -13557,38 +14647,41 @@ func (ec *executionContext) _Task_status(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(task_enums.Status) + res := resTmp.([]*ent.ShelfEdge) fc.Result = res - return ec.marshalNTaskStatus2lybbrioᚋinternalᚋentᚋschemaᚋtask_enumsᚐStatus(ctx, field.Selections, res) + return ec.marshalOShelfEdge2ᚕᚖlybbrioᚋinternalᚋentᚐShelfEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ShelfConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "ShelfConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type TaskStatus does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_ShelfEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_ShelfEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ShelfEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _Task_progress(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_progress(ctx, field) +func (ec *executionContext) _ShelfConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ShelfConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -13601,7 +14694,7 @@ func (ec *executionContext) _Task_progress(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Progress, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -13613,26 +14706,36 @@ func (ec *executionContext) _Task_progress(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(float64) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalNFloat2float64(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_progress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ShelfConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "ShelfConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Float does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) }, } return fc, nil } -func (ec *executionContext) _Task_message(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_message(ctx, field) +func (ec *executionContext) _ShelfConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ShelfConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -13645,35 +14748,38 @@ func (ec *executionContext) _Task_message(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Message, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(string) + res := resTmp.(int) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ShelfConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "ShelfConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Task_error(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_error(ctx, field) +func (ec *executionContext) _ShelfEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ShelfEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -13686,7 +14792,7 @@ func (ec *executionContext) _Task_error(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Error, nil + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -13695,26 +14801,46 @@ func (ec *executionContext) _Task_error(ctx context.Context, field graphql.Colle if resTmp == nil { return graphql.Null } - res := resTmp.(string) + res := resTmp.(*ent.Shelf) fc.Result = res - return ec.marshalOString2string(ctx, field.Selections, res) + return ec.marshalOShelf2ᚖlybbrioᚋinternalᚋentᚐShelf(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ShelfEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "ShelfEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Shelf_id(ctx, field) + case "createTime": + return ec.fieldContext_Shelf_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Shelf_updateTime(ctx, field) + case "public": + return ec.fieldContext_Shelf_public(ctx, field) + case "userID": + return ec.fieldContext_Shelf_userID(ctx, field) + case "name": + return ec.fieldContext_Shelf_name(ctx, field) + case "description": + return ec.fieldContext_Shelf_description(ctx, field) + case "user": + return ec.fieldContext_Shelf_user(ctx, field) + case "books": + return ec.fieldContext_Shelf_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) }, } return fc, nil } -func (ec *executionContext) _Task_userID(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_userID(ctx, field) +func (ec *executionContext) _ShelfEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.ShelfEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ShelfEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -13727,23 +14853,70 @@ func (ec *executionContext) _Task_userID(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UserID, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - return graphql.Null - } + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(entgql.Cursor[ksuid.ID]) + fc.Result = res + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_ShelfEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "ShelfEdge", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Cursor does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Tag_id(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Tag_id(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.ID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Tag_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Tag", Field: field, IsMethod: false, IsResolver: false, @@ -13754,8 +14927,8 @@ func (ec *executionContext) fieldContext_Task_userID(ctx context.Context, field return fc, nil } -func (ec *executionContext) _Task_isSystemTask(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_isSystemTask(ctx, field) +func (ec *executionContext) _Tag_calibreID(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Tag_calibreID(ctx, field) if err != nil { return graphql.Null } @@ -13768,7 +14941,48 @@ func (ec *executionContext) _Task_isSystemTask(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsSystemTask, nil + return obj.CalibreID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(int64) + fc.Result = res + return ec.marshalOInt2int64(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Tag_calibreID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Tag", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Tag_name(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Tag_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -13780,26 +14994,26 @@ func (ec *executionContext) _Task_isSystemTask(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_isSystemTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Tag_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Tag", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Task_user(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Task_user(ctx, field) +func (ec *executionContext) _Tag_books(ctx context.Context, field graphql.CollectedField, obj *ent.Tag) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Tag_books(ctx, field) if err != nil { return graphql.Null } @@ -13812,51 +15026,57 @@ func (ec *executionContext) _Task_user(ctx context.Context, field graphql.Collec }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.User(ctx) + return obj.Books(ctx, fc.Args["after"].(*entgql.Cursor[ksuid.ID]), fc.Args["first"].(*int), fc.Args["before"].(*entgql.Cursor[ksuid.ID]), fc.Args["last"].(*int), fc.Args["orderBy"].([]*ent.BookOrder), fc.Args["where"].(*ent.BookWhereInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(*ent.BookConnection) fc.Result = res - return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalNBookConnection2ᚖlybbrioᚋinternalᚋentᚐBookConnection(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Task_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Tag_books(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Task", + Object: "Tag", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "id": - return ec.fieldContext_User_id(ctx, field) - case "createTime": - return ec.fieldContext_User_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) + case "edges": + return ec.fieldContext_BookConnection_edges(ctx, field) + case "pageInfo": + return ec.fieldContext_BookConnection_pageInfo(ctx, field) + case "totalCount": + return ec.fieldContext_BookConnection_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, fmt.Errorf("no field named %q was found under type BookConnection", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Tag_books_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _TaskConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TaskConnection_edges(ctx, field) +func (ec *executionContext) _TagConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TagConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -13878,32 +15098,32 @@ func (ec *executionContext) _TaskConnection_edges(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.([]*ent.TaskEdge) + res := resTmp.([]*ent.TagEdge) fc.Result = res - return ec.marshalOTaskEdge2ᚕᚖlybbrioᚋinternalᚋentᚐTaskEdge(ctx, field.Selections, res) + return ec.marshalOTagEdge2ᚕᚖlybbrioᚋinternalᚋentᚐTagEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TaskConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TagConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TaskConnection", + Object: "TagConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "node": - return ec.fieldContext_TaskEdge_node(ctx, field) + return ec.fieldContext_TagEdge_node(ctx, field) case "cursor": - return ec.fieldContext_TaskEdge_cursor(ctx, field) + return ec.fieldContext_TagEdge_cursor(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TaskEdge", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TagEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _TaskConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TaskConnection_pageInfo(ctx, field) +func (ec *executionContext) _TagConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TagConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -13933,9 +15153,9 @@ func (ec *executionContext) _TaskConnection_pageInfo(ctx context.Context, field return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TaskConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TagConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TaskConnection", + Object: "TagConnection", Field: field, IsMethod: false, IsResolver: false, @@ -13956,8 +15176,8 @@ func (ec *executionContext) fieldContext_TaskConnection_pageInfo(ctx context.Con return fc, nil } -func (ec *executionContext) _TaskConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TaskConnection_totalCount(ctx, field) +func (ec *executionContext) _TagConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.TagConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TagConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -13987,9 +15207,9 @@ func (ec *executionContext) _TaskConnection_totalCount(ctx context.Context, fiel return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TaskConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TagConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TaskConnection", + Object: "TagConnection", Field: field, IsMethod: false, IsResolver: false, @@ -14000,8 +15220,8 @@ func (ec *executionContext) fieldContext_TaskConnection_totalCount(ctx context.C return fc, nil } -func (ec *executionContext) _TaskEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.TaskEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TaskEdge_node(ctx, field) +func (ec *executionContext) _TagEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.TagEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TagEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -14023,50 +15243,36 @@ func (ec *executionContext) _TaskEdge_node(ctx context.Context, field graphql.Co if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.Task) + res := resTmp.(*ent.Tag) fc.Result = res - return ec.marshalOTask2ᚖlybbrioᚋinternalᚋentᚐTask(ctx, field.Selections, res) + return ec.marshalOTag2ᚖlybbrioᚋinternalᚋentᚐTag(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TaskEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TagEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TaskEdge", + Object: "TagEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_Task_id(ctx, field) - case "createTime": - return ec.fieldContext_Task_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Task_updateTime(ctx, field) - case "type": - return ec.fieldContext_Task_type(ctx, field) - case "status": - return ec.fieldContext_Task_status(ctx, field) - case "progress": - return ec.fieldContext_Task_progress(ctx, field) - case "message": - return ec.fieldContext_Task_message(ctx, field) - case "error": - return ec.fieldContext_Task_error(ctx, field) - case "userID": - return ec.fieldContext_Task_userID(ctx, field) - case "isSystemTask": - return ec.fieldContext_Task_isSystemTask(ctx, field) - case "user": - return ec.fieldContext_Task_user(ctx, field) + return ec.fieldContext_Tag_id(ctx, field) + case "calibreID": + return ec.fieldContext_Tag_calibreID(ctx, field) + case "name": + return ec.fieldContext_Tag_name(ctx, field) + case "books": + return ec.fieldContext_Tag_books(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Task", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Tag", field.Name) }, } return fc, nil } -func (ec *executionContext) _TaskEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.TaskEdge) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TaskEdge_cursor(ctx, field) +func (ec *executionContext) _TagEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.TagEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TagEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -14096,9 +15302,9 @@ func (ec *executionContext) _TaskEdge_cursor(ctx context.Context, field graphql. return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TaskEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TagEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TaskEdge", + Object: "TagEdge", Field: field, IsMethod: false, IsResolver: false, @@ -14109,8 +15315,8 @@ func (ec *executionContext) fieldContext_TaskEdge_cursor(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_id(ctx, field) +func (ec *executionContext) _Task_id(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_id(ctx, field) if err != nil { return graphql.Null } @@ -14140,9 +15346,9 @@ func (ec *executionContext) _User_id(ctx context.Context, field graphql.Collecte return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, @@ -14153,8 +15359,8 @@ func (ec *executionContext) fieldContext_User_id(ctx context.Context, field grap return fc, nil } -func (ec *executionContext) _User_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_createTime(ctx, field) +func (ec *executionContext) _Task_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_createTime(ctx, field) if err != nil { return graphql.Null } @@ -14184,9 +15390,9 @@ func (ec *executionContext) _User_createTime(ctx context.Context, field graphql. return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, @@ -14197,8 +15403,8 @@ func (ec *executionContext) fieldContext_User_createTime(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _User_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_updateTime(ctx, field) +func (ec *executionContext) _Task_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -14228,9 +15434,9 @@ func (ec *executionContext) _User_updateTime(ctx context.Context, field graphql. return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, @@ -14241,8 +15447,8 @@ func (ec *executionContext) fieldContext_User_updateTime(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_username(ctx, field) +func (ec *executionContext) _Task_type(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_type(ctx, field) if err != nil { return graphql.Null } @@ -14255,7 +15461,7 @@ func (ec *executionContext) _User_username(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Username, nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) @@ -14267,26 +15473,26 @@ func (ec *executionContext) _User_username(ctx context.Context, field graphql.Co } return graphql.Null } - res := resTmp.(string) + res := resTmp.(task_enums.TaskType) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTaskTaskType2lybbrioᚋinternalᚋentᚋschemaᚋtask_enumsᚐTaskType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_username(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type TaskTaskType does not have child fields") }, } return fc, nil } -func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_email(ctx, field) +func (ec *executionContext) _Task_status(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_status(ctx, field) if err != nil { return graphql.Null } @@ -14299,7 +15505,7 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Email, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -14311,26 +15517,26 @@ func (ec *executionContext) _User_email(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(string) + res := resTmp.(task_enums.Status) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTaskStatus2lybbrioᚋinternalᚋentᚋschemaᚋtask_enumsᚐStatus(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type TaskStatus does not have child fields") }, } return fc, nil } -func (ec *executionContext) _User_shelves(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_shelves(ctx, field) +func (ec *executionContext) _Task_progress(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_progress(ctx, field) if err != nil { return graphql.Null } @@ -14343,55 +15549,38 @@ func (ec *executionContext) _User_shelves(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Shelves(ctx) + return obj.Progress, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]*ent.Shelf) + res := resTmp.(float64) fc.Result = res - return ec.marshalOShelf2ᚕᚖlybbrioᚋinternalᚋentᚐShelfᚄ(ctx, field.Selections, res) + return ec.marshalNFloat2float64(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_shelves(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_progress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_Shelf_id(ctx, field) - case "createTime": - return ec.fieldContext_Shelf_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_Shelf_updateTime(ctx, field) - case "public": - return ec.fieldContext_Shelf_public(ctx, field) - case "userID": - return ec.fieldContext_Shelf_userID(ctx, field) - case "name": - return ec.fieldContext_Shelf_name(ctx, field) - case "description": - return ec.fieldContext_Shelf_description(ctx, field) - case "user": - return ec.fieldContext_Shelf_user(ctx, field) - case "books": - return ec.fieldContext_Shelf_books(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) + return nil, errors.New("field of type Float does not have child fields") }, } return fc, nil } -func (ec *executionContext) _User_userPermissions(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_User_userPermissions(ctx, field) +func (ec *executionContext) _Task_message(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_message(ctx, field) if err != nil { return graphql.Null } @@ -14404,56 +15593,35 @@ func (ec *executionContext) _User_userPermissions(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UserPermissions(ctx) + return obj.Message, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*ent.UserPermissions) + res := resTmp.(string) fc.Result = res - return ec.marshalNUserPermissions2ᚖlybbrioᚋinternalᚋentᚐUserPermissions(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_User_userPermissions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_message(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "User", + Object: "Task", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "id": - return ec.fieldContext_UserPermissions_id(ctx, field) - case "createTime": - return ec.fieldContext_UserPermissions_createTime(ctx, field) - case "updateTime": - return ec.fieldContext_UserPermissions_updateTime(ctx, field) - case "userID": - return ec.fieldContext_UserPermissions_userID(ctx, field) - case "admin": - return ec.fieldContext_UserPermissions_admin(ctx, field) - case "cancreatepublic": - return ec.fieldContext_UserPermissions_cancreatepublic(ctx, field) - case "canedit": - return ec.fieldContext_UserPermissions_canedit(ctx, field) - case "user": - return ec.fieldContext_UserPermissions_user(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type UserPermissions", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _UserPermissions_id(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_id(ctx, field) +func (ec *executionContext) _Task_error(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_error(ctx, field) if err != nil { return graphql.Null } @@ -14466,38 +15634,35 @@ func (ec *executionContext) _UserPermissions_id(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ID, nil + return obj.Error, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(string) fc.Result = res - return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalOString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_error(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _UserPermissions_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_createTime(ctx, field) +func (ec *executionContext) _Task_userID(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_userID(ctx, field) if err != nil { return graphql.Null } @@ -14510,38 +15675,35 @@ func (ec *executionContext) _UserPermissions_createTime(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CreateTime, nil + return obj.UserID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalOID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) _UserPermissions_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_updateTime(ctx, field) +func (ec *executionContext) _Task_isSystemTask(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_isSystemTask(ctx, field) if err != nil { return graphql.Null } @@ -14554,7 +15716,7 @@ func (ec *executionContext) _UserPermissions_updateTime(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTime, nil + return obj.IsSystemTask, nil }) if err != nil { ec.Error(ctx, err) @@ -14566,26 +15728,26 @@ func (ec *executionContext) _UserPermissions_updateTime(ctx context.Context, fie } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(bool) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_isSystemTask(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "Task", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) _UserPermissions_userID(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_userID(ctx, field) +func (ec *executionContext) _Task_user(ctx context.Context, field graphql.CollectedField, obj *ent.Task) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Task_user(ctx, field) if err != nil { return graphql.Null } @@ -14598,7 +15760,7 @@ func (ec *executionContext) _UserPermissions_userID(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UserID, nil + return obj.User(ctx) }) if err != nil { ec.Error(ctx, err) @@ -14607,26 +15769,42 @@ func (ec *executionContext) _UserPermissions_userID(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(ksuid.ID) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) + return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Task_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "Task", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type ID does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } return fc, nil } -func (ec *executionContext) _UserPermissions_admin(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_admin(ctx, field) +func (ec *executionContext) _TaskConnection_edges(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TaskConnection_edges(ctx, field) if err != nil { return graphql.Null } @@ -14639,38 +15817,41 @@ func (ec *executionContext) _UserPermissions_admin(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Admin, nil + return obj.Edges, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.([]*ent.TaskEdge) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOTaskEdge2ᚕᚖlybbrioᚋinternalᚋentᚐTaskEdge(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_admin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TaskConnection_edges(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "TaskConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "node": + return ec.fieldContext_TaskEdge_node(ctx, field) + case "cursor": + return ec.fieldContext_TaskEdge_cursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TaskEdge", field.Name) }, } return fc, nil } -func (ec *executionContext) _UserPermissions_cancreatepublic(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_cancreatepublic(ctx, field) +func (ec *executionContext) _TaskConnection_pageInfo(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TaskConnection_pageInfo(ctx, field) if err != nil { return graphql.Null } @@ -14683,7 +15864,7 @@ func (ec *executionContext) _UserPermissions_cancreatepublic(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CanCreatePublic, nil + return obj.PageInfo, nil }) if err != nil { ec.Error(ctx, err) @@ -14695,26 +15876,36 @@ func (ec *executionContext) _UserPermissions_cancreatepublic(ctx context.Context } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(entgql.PageInfo[ksuid.ID]) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNPageInfo2entgoᚗioᚋcontribᚋentgqlᚐPageInfo(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_cancreatepublic(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TaskConnection_pageInfo(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "TaskConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") - }, - } + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PageInfo_hasNextPage(ctx, field) + case "hasPreviousPage": + return ec.fieldContext_PageInfo_hasPreviousPage(ctx, field) + case "startCursor": + return ec.fieldContext_PageInfo_startCursor(ctx, field) + case "endCursor": + return ec.fieldContext_PageInfo_endCursor(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PageInfo", field.Name) + }, + } return fc, nil } -func (ec *executionContext) _UserPermissions_canedit(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_canedit(ctx, field) +func (ec *executionContext) _TaskConnection_totalCount(ctx context.Context, field graphql.CollectedField, obj *ent.TaskConnection) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TaskConnection_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -14727,7 +15918,7 @@ func (ec *executionContext) _UserPermissions_canedit(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.CanEdit, nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) @@ -14739,26 +15930,26 @@ func (ec *executionContext) _UserPermissions_canedit(ctx context.Context, field } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(int) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_canedit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TaskConnection_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "TaskConnection", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _UserPermissions_user(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_UserPermissions_user(ctx, field) +func (ec *executionContext) _TaskEdge_node(ctx context.Context, field graphql.CollectedField, obj *ent.TaskEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TaskEdge_node(ctx, field) if err != nil { return graphql.Null } @@ -14771,7 +15962,7 @@ func (ec *executionContext) _UserPermissions_user(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.User(ctx) + return obj.Node, nil }) if err != nil { ec.Error(ctx, err) @@ -14780,42 +15971,50 @@ func (ec *executionContext) _UserPermissions_user(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*ent.User) + res := resTmp.(*ent.Task) fc.Result = res - return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) + return ec.marshalOTask2ᚖlybbrioᚋinternalᚋentᚐTask(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_UserPermissions_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TaskEdge_node(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "UserPermissions", + Object: "TaskEdge", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "id": - return ec.fieldContext_User_id(ctx, field) + return ec.fieldContext_Task_id(ctx, field) case "createTime": - return ec.fieldContext_User_createTime(ctx, field) + return ec.fieldContext_Task_createTime(ctx, field) case "updateTime": - return ec.fieldContext_User_updateTime(ctx, field) - case "username": - return ec.fieldContext_User_username(ctx, field) - case "email": - return ec.fieldContext_User_email(ctx, field) - case "shelves": - return ec.fieldContext_User_shelves(ctx, field) - case "userPermissions": - return ec.fieldContext_User_userPermissions(ctx, field) + return ec.fieldContext_Task_updateTime(ctx, field) + case "type": + return ec.fieldContext_Task_type(ctx, field) + case "status": + return ec.fieldContext_Task_status(ctx, field) + case "progress": + return ec.fieldContext_Task_progress(ctx, field) + case "message": + return ec.fieldContext_Task_message(ctx, field) + case "error": + return ec.fieldContext_Task_error(ctx, field) + case "userID": + return ec.fieldContext_Task_userID(ctx, field) + case "isSystemTask": + return ec.fieldContext_Task_isSystemTask(ctx, field) + case "user": + return ec.fieldContext_Task_user(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type User", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Task", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_name(ctx, field) +func (ec *executionContext) _TaskEdge_cursor(ctx context.Context, field graphql.CollectedField, obj *ent.TaskEdge) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TaskEdge_cursor(ctx, field) if err != nil { return graphql.Null } @@ -14828,7 +16027,7 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Cursor, nil }) if err != nil { ec.Error(ctx, err) @@ -14840,26 +16039,26 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.(string) + res := resTmp.(entgql.Cursor[ksuid.ID]) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNCursor2entgoᚗioᚋcontribᚋentgqlᚐCursor(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TaskEdge_cursor(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "TaskEdge", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Cursor does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_description(ctx, field) +func (ec *executionContext) _User_id(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_id(ctx, field) if err != nil { return graphql.Null } @@ -14872,35 +16071,38 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "User", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_locations(ctx, field) +func (ec *executionContext) _User_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_createTime(ctx, field) if err != nil { return graphql.Null } @@ -14913,7 +16115,7 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Locations, nil + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -14925,26 +16127,26 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "User", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __DirectiveLocation does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_args(ctx, field) +func (ec *executionContext) _User_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -14957,7 +16159,7 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Args, nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -14969,36 +16171,26 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "User", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) +func (ec *executionContext) _User_username(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_username(ctx, field) if err != nil { return graphql.Null } @@ -15011,7 +16203,7 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsRepeatable, nil + return obj.Username, nil }) if err != nil { ec.Error(ctx, err) @@ -15023,26 +16215,26 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_username(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "User", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_name(ctx, field) +func (ec *executionContext) _User_email(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_email(ctx, field) if err != nil { return graphql.Null } @@ -15055,7 +16247,7 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Email, nil }) if err != nil { ec.Error(ctx, err) @@ -15072,9 +16264,9 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_email(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "User", Field: field, IsMethod: false, IsResolver: false, @@ -15085,8 +16277,8 @@ func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, f return fc, nil } -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_description(ctx, field) +func (ec *executionContext) _User_shelves(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_shelves(ctx, field) if err != nil { return graphql.Null } @@ -15099,7 +16291,7 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.Shelves(ctx) }) if err != nil { ec.Error(ctx, err) @@ -15108,26 +16300,46 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.([]*ent.Shelf) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOShelf2ᚕᚖlybbrioᚋinternalᚋentᚐShelfᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_shelves(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "User", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_Shelf_id(ctx, field) + case "createTime": + return ec.fieldContext_Shelf_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_Shelf_updateTime(ctx, field) + case "public": + return ec.fieldContext_Shelf_public(ctx, field) + case "userID": + return ec.fieldContext_Shelf_userID(ctx, field) + case "name": + return ec.fieldContext_Shelf_name(ctx, field) + case "description": + return ec.fieldContext_Shelf_description(ctx, field) + case "user": + return ec.fieldContext_Shelf_user(ctx, field) + case "books": + return ec.fieldContext_Shelf_books(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Shelf", field.Name) }, } return fc, nil } -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) +func (ec *executionContext) _User_userPermissions(ctx context.Context, field graphql.CollectedField, obj *ent.User) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_User_userPermissions(ctx, field) if err != nil { return graphql.Null } @@ -15140,7 +16352,7 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil + return obj.UserPermissions(ctx) }) if err != nil { ec.Error(ctx, err) @@ -15152,26 +16364,44 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*ent.UserPermissions) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalNUserPermissions2ᚖlybbrioᚋinternalᚋentᚐUserPermissions(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_User_userPermissions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "User", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_UserPermissions_id(ctx, field) + case "createTime": + return ec.fieldContext_UserPermissions_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_UserPermissions_updateTime(ctx, field) + case "userID": + return ec.fieldContext_UserPermissions_userID(ctx, field) + case "admin": + return ec.fieldContext_UserPermissions_admin(ctx, field) + case "cancreatepublic": + return ec.fieldContext_UserPermissions_cancreatepublic(ctx, field) + case "canedit": + return ec.fieldContext_UserPermissions_canedit(ctx, field) + case "user": + return ec.fieldContext_UserPermissions_user(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type UserPermissions", field.Name) }, } return fc, nil } -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) +func (ec *executionContext) _UserPermissions_id(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_id(ctx, field) if err != nil { return graphql.Null } @@ -15184,35 +16414,38 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil + return obj.ID, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(ksuid.ID) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_id(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "UserPermissions", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type ID does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_name(ctx, field) +func (ec *executionContext) _UserPermissions_createTime(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_createTime(ctx, field) if err != nil { return graphql.Null } @@ -15225,7 +16458,7 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.CreateTime, nil }) if err != nil { ec.Error(ctx, err) @@ -15237,26 +16470,26 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(string) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_createTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_description(ctx, field) +func (ec *executionContext) _UserPermissions_updateTime(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_updateTime(ctx, field) if err != nil { return graphql.Null } @@ -15269,35 +16502,38 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.UpdateTime, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_updateTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_args(ctx, field) +func (ec *executionContext) _UserPermissions_userID(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_userID(ctx, field) if err != nil { return graphql.Null } @@ -15310,7 +16546,48 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Args, nil + return obj.UserID, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(ksuid.ID) + fc.Result = res + return ec.marshalOID2lybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_UserPermissions_userID(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "UserPermissions", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type ID does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _UserPermissions_admin(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_admin(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Admin, nil }) if err != nil { ec.Error(ctx, err) @@ -15322,36 +16599,26 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(bool) fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_admin(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_type(ctx, field) +func (ec *executionContext) _UserPermissions_cancreatepublic(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_cancreatepublic(ctx, field) if err != nil { return graphql.Null } @@ -15364,7 +16631,7 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.CanCreatePublic, nil }) if err != nil { ec.Error(ctx, err) @@ -15376,48 +16643,26 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(bool) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_cancreatepublic(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) +func (ec *executionContext) _UserPermissions_canedit(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_canedit(ctx, field) if err != nil { return graphql.Null } @@ -15430,7 +16675,7 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil + return obj.CanEdit, nil }) if err != nil { ec.Error(ctx, err) @@ -15447,11 +16692,11 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_canedit(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type Boolean does not have child fields") @@ -15460,8 +16705,8 @@ func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Contex return fc, nil } -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) +func (ec *executionContext) _UserPermissions_user(ctx context.Context, field graphql.CollectedField, obj *ent.UserPermissions) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_UserPermissions_user(ctx, field) if err != nil { return graphql.Null } @@ -15474,7 +16719,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil + return obj.User(ctx) }) if err != nil { ec.Error(ctx, err) @@ -15483,26 +16728,42 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*ent.User) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOUser2ᚖlybbrioᚋinternalᚋentᚐUser(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_UserPermissions_user(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "UserPermissions", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "id": + return ec.fieldContext_User_id(ctx, field) + case "createTime": + return ec.fieldContext_User_createTime(ctx, field) + case "updateTime": + return ec.fieldContext_User_updateTime(ctx, field) + case "username": + return ec.fieldContext_User_username(ctx, field) + case "email": + return ec.fieldContext_User_email(ctx, field) + case "shelves": + return ec.fieldContext_User_shelves(ctx, field) + case "userPermissions": + return ec.fieldContext_User_userPermissions(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type User", field.Name) }, } return fc, nil } -func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_name(ctx, field) +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) if err != nil { return graphql.Null } @@ -15532,9 +16793,9 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "__Directive", Field: field, IsMethod: false, IsResolver: false, @@ -15545,8 +16806,8 @@ func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, return fc, nil } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_description(ctx, field) +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) if err != nil { return graphql.Null } @@ -15573,9 +16834,9 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "__Directive", Field: field, IsMethod: true, IsResolver: false, @@ -15586,8 +16847,8 @@ func (ec *executionContext) fieldContext___InputValue_description(ctx context.Co return fc, nil } -func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_type(ctx, field) +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) if err != nil { return graphql.Null } @@ -15600,7 +16861,7 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return obj.Locations, nil }) if err != nil { ec.Error(ctx, err) @@ -15612,48 +16873,26 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.([]string) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "__Directive", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type __DirectiveLocation does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) if err != nil { return graphql.Null } @@ -15666,35 +16905,48 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DefaultValue, nil + return obj.Args, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.([]introspection.InputValue) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "__Directive", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_description(ctx, field) +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) if err != nil { return graphql.Null } @@ -15707,35 +16959,38 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.IsRepeatable, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(bool) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__Directive", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_types(ctx, field) +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) if err != nil { return graphql.Null } @@ -15748,7 +17003,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Types(), nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -15760,48 +17015,26 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__EnumValue", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_queryType(ctx, field) +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) if err != nil { return graphql.Null } @@ -15814,60 +17047,35 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QueryType(), nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__EnumValue", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_mutationType(ctx, field) +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) if err != nil { return graphql.Null } @@ -15880,57 +17088,38 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MutationType(), nil + return obj.IsDeprecated(), nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(bool) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__EnumValue", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) if err != nil { return graphql.Null } @@ -15943,7 +17132,7 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SubscriptionType(), nil + return obj.DeprecationReason(), nil }) if err != nil { ec.Error(ctx, err) @@ -15952,48 +17141,26 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__EnumValue", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_directives(ctx, field) +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) if err != nil { return graphql.Null } @@ -16006,7 +17173,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Directives(), nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -16018,38 +17185,26 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap } return graphql.Null } - res := resTmp.([]introspection.Directive) + res := resTmp.(string) fc.Result = res - return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "__Field", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Directive_name(ctx, field) - case "description": - return ec.fieldContext___Directive_description(ctx, field) - case "locations": - return ec.fieldContext___Directive_locations(ctx, field) - case "args": - return ec.fieldContext___Directive_args(ctx, field) - case "isRepeatable": - return ec.fieldContext___Directive_isRepeatable(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_kind(ctx, field) +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) if err != nil { return graphql.Null } @@ -16062,38 +17217,35 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Kind(), nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalN__TypeKind2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__Field", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __TypeKind does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_name(ctx, field) +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) if err != nil { return graphql.Null } @@ -16106,35 +17258,48 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name(), nil + return obj.Args, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.([]introspection.InputValue) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__Field", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_description(ctx, field) +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) if err != nil { return graphql.Null } @@ -16147,35 +17312,60 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__Field", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_fields(ctx, field) +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) if err != nil { return graphql.Null } @@ -16188,60 +17378,38 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + return obj.IsDeprecated(), nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Field) + res := resTmp.(bool) fc.Result = res - return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__Field", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Field_name(ctx, field) - case "description": - return ec.fieldContext___Field_description(ctx, field) - case "args": - return ec.fieldContext___Field_args(ctx, field) - case "type": - return ec.fieldContext___Field_type(ctx, field) - case "isDeprecated": - return ec.fieldContext___Field_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___Field_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_interfaces(ctx, field) +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) if err != nil { return graphql.Null } @@ -16254,7 +17422,7 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Interfaces(), nil + return obj.DeprecationReason(), nil }) if err != nil { ec.Error(ctx, err) @@ -16263,48 +17431,26 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__Field", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) if err != nil { return graphql.Null } @@ -16317,57 +17463,38 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PossibleTypes(), nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__InputValue", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_enumValues(ctx, field) +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) if err != nil { return graphql.Null } @@ -16380,7 +17507,7 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + return obj.Description(), nil }) if err != nil { ec.Error(ctx, err) @@ -16389,47 +17516,26 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.([]introspection.EnumValue) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__InputValue", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___EnumValue_name(ctx, field) - case "description": - return ec.fieldContext___EnumValue_description(ctx, field) - case "isDeprecated": - return ec.fieldContext___EnumValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___EnumValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_inputFields(ctx, field) +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) if err != nil { return graphql.Null } @@ -16442,153 +17548,1613 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InputFields(), nil + return obj.Type, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(*introspection.Type) fc.Result = res - return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", Field: field, IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) case "name": - return ec.fieldContext___InputValue_name(ctx, field) + return ec.fieldContext___Type_name(ctx, field) case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SpecifiedByURL(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputAuthorOrder(ctx context.Context, obj interface{}) (ent.AuthorOrder, error) { + var it ent.AuthorOrder + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + if _, present := asMap["direction"]; !present { + asMap["direction"] = "ASC" + } + + fieldsInOrder := [...]string{"direction", "field"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "direction": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("direction")) + data, err := ec.unmarshalNOrderDirection2entgoᚗioᚋcontribᚋentgqlᚐOrderDirection(ctx, v) + if err != nil { + return it, err + } + it.Direction = data + case "field": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) + data, err := ec.unmarshalNAuthorOrderField2ᚖlybbrioᚋinternalᚋentᚐAuthorOrderField(ctx, v) + if err != nil { + return it, err + } + it.Field = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputAuthorWhereInput(ctx context.Context, obj interface{}) (ent.AuthorWhereInput, error) { + var it ent.AuthorWhereInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createTime", "createTimeNEQ", "createTimeIn", "createTimeNotIn", "createTimeGT", "createTimeGTE", "createTimeLT", "createTimeLTE", "updateTime", "updateTimeNEQ", "updateTimeIn", "updateTimeNotIn", "updateTimeGT", "updateTimeGTE", "updateTimeLT", "updateTimeLTE", "calibreID", "calibreIDNEQ", "calibreIDIn", "calibreIDNotIn", "calibreIDGT", "calibreIDGTE", "calibreIDLT", "calibreIDLTE", "calibreIDIsNil", "calibreIDNotNil", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameEqualFold", "nameContainsFold", "sort", "sortNEQ", "sortIn", "sortNotIn", "sortGT", "sortGTE", "sortLT", "sortLTE", "sortContains", "sortHasPrefix", "sortHasSuffix", "sortEqualFold", "sortContainsFold", "link", "linkNEQ", "linkIn", "linkNotIn", "linkGT", "linkGTE", "linkLT", "linkLTE", "linkContains", "linkHasPrefix", "linkHasSuffix", "linkIsNil", "linkNotNil", "linkEqualFold", "linkContainsFold", "hasBooks", "hasBooksWith"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "not": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) + data, err := ec.unmarshalOAuthorWhereInput2ᚖlybbrioᚋinternalᚋentᚐAuthorWhereInput(ctx, v) + if err != nil { + return it, err + } + it.Not = data + case "and": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) + data, err := ec.unmarshalOAuthorWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐAuthorWhereInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.And = data + case "or": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) + data, err := ec.unmarshalOAuthorWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐAuthorWhereInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.Or = data + case "id": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("id")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.ID = data + case "idNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNEQ")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.IDNEQ = data + case "idIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idIn")) + data, err := ec.unmarshalOID2ᚕlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐIDᚄ(ctx, v) + if err != nil { + return it, err + } + it.IDIn = data + case "idNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idNotIn")) + data, err := ec.unmarshalOID2ᚕlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐIDᚄ(ctx, v) + if err != nil { + return it, err + } + it.IDNotIn = data + case "idGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGT")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.IDGT = data + case "idGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idGTE")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.IDGTE = data + case "idLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLT")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.IDLT = data + case "idLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("idLTE")) + data, err := ec.unmarshalOID2ᚖlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐID(ctx, v) + if err != nil { + return it, err + } + it.IDLTE = data + case "createTime": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTime")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTime = data + case "createTimeNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeNEQ")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeNEQ = data + case "createTimeIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeIn = data + case "createTimeNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeNotIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeNotIn = data + case "createTimeGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeGT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeGT = data + case "createTimeGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeGTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeGTE = data + case "createTimeLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeLT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeLT = data + case "createTimeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeLTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeLTE = data + case "updateTime": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTime")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTime = data + case "updateTimeNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNEQ")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeNEQ = data + case "updateTimeIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeIn = data + case "updateTimeNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNotIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeNotIn = data + case "updateTimeGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeGT = data + case "updateTimeGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeGTE = data + case "updateTimeLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeLT = data + case "updateTimeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeLTE = data + case "calibreID": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreID")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreID = data + case "calibreIDNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNEQ")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDNEQ = data + case "calibreIDIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDIn")) + data, err := ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDIn = data + case "calibreIDNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNotIn")) + data, err := ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDNotIn = data + case "calibreIDGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDGT")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDGT = data + case "calibreIDGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDGTE")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDGTE = data + case "calibreIDLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDLT")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDLT = data + case "calibreIDLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDLTE")) + data, err := ec.unmarshalOInt2ᚖint64(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDLTE = data + case "calibreIDIsNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDIsNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDIsNil = data + case "calibreIDNotNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNotNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.CalibreIDNotNil = data + case "name": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "nameNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameNEQ = data + case "nameIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.NameIn = data + case "nameNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.NameNotIn = data + case "nameGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameGT = data + case "nameGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameGTE = data + case "nameLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameLT = data + case "nameLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameLTE = data + case "nameContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContains")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameContains = data + case "nameHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameHasPrefix = data + case "nameHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameHasSuffix = data + case "nameEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameEqualFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameEqualFold = data + case "nameContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContainsFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.NameContainsFold = data + case "sort": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sort")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Sort = data + case "sortNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortNEQ = data + case "sortIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.SortIn = data + case "sortNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.SortNotIn = data + case "sortGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortGT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortGT = data + case "sortGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortGTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortGTE = data + case "sortLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortLT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortLT = data + case "sortLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortLTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortLTE = data + case "sortContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortContains")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortContains = data + case "sortHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortHasPrefix = data + case "sortHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortHasSuffix = data + case "sortEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortEqualFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortEqualFold = data + case "sortContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortContainsFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortContainsFold = data + case "link": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("link")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Link = data + case "linkNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkNEQ = data + case "linkIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.LinkIn = data + case "linkNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.LinkNotIn = data + case "linkGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkGT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkGT = data + case "linkGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkGTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkGTE = data + case "linkLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkLT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkLT = data + case "linkLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkLTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkLTE = data + case "linkContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkContains")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkContains = data + case "linkHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_ofType(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*introspection.Type) - fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) + it.LinkHasPrefix = data + case "linkHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) - }, - } - return fc, nil -} - -func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + it.LinkHasSuffix = data + case "linkIsNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkIsNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.LinkIsNil = data + case "linkNotNil": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNotNil")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.LinkNotNil = data + case "linkEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkEqualFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkEqualFold = data + case "linkContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkContainsFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LinkContainsFold = data + case "hasBooks": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBooks")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.HasBooks = data + case "hasBooksWith": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBooksWith")) + data, err := ec.unmarshalOBookWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookWhereInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.HasBooksWith = data } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.SpecifiedByURL(), nil - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null } - if resTmp == nil { - return graphql.Null - } - res := resTmp.(*string) - fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) -} -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "__Type", - Field: field, - IsMethod: true, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") - }, - } - return fc, nil + return it, nil } -// endregion **************************** field.gotpl ***************************** - -// region **************************** input.gotpl ***************************** - -func (ec *executionContext) unmarshalInputAuthorOrder(ctx context.Context, obj interface{}) (ent.AuthorOrder, error) { - var it ent.AuthorOrder +func (ec *executionContext) unmarshalInputBookCoverOrder(ctx context.Context, obj interface{}) (ent.BookCoverOrder, error) { + var it ent.BookCoverOrder asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v @@ -16614,7 +19180,7 @@ func (ec *executionContext) unmarshalInputAuthorOrder(ctx context.Context, obj i it.Direction = data case "field": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNAuthorOrderField2ᚖlybbrioᚋinternalᚋentᚐAuthorOrderField(ctx, v) + data, err := ec.unmarshalNBookCoverOrderField2ᚖlybbrioᚋinternalᚋentᚐBookCoverOrderField(ctx, v) if err != nil { return it, err } @@ -16625,14 +19191,14 @@ func (ec *executionContext) unmarshalInputAuthorOrder(ctx context.Context, obj i return it, nil } -func (ec *executionContext) unmarshalInputAuthorWhereInput(ctx context.Context, obj interface{}) (ent.AuthorWhereInput, error) { - var it ent.AuthorWhereInput +func (ec *executionContext) unmarshalInputBookCoverWhereInput(ctx context.Context, obj interface{}) (ent.BookCoverWhereInput, error) { + var it ent.BookCoverWhereInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createTime", "createTimeNEQ", "createTimeIn", "createTimeNotIn", "createTimeGT", "createTimeGTE", "createTimeLT", "createTimeLTE", "updateTime", "updateTimeNEQ", "updateTimeIn", "updateTimeNotIn", "updateTimeGT", "updateTimeGTE", "updateTimeLT", "updateTimeLTE", "calibreID", "calibreIDNEQ", "calibreIDIn", "calibreIDNotIn", "calibreIDGT", "calibreIDGTE", "calibreIDLT", "calibreIDLTE", "calibreIDIsNil", "calibreIDNotNil", "name", "nameNEQ", "nameIn", "nameNotIn", "nameGT", "nameGTE", "nameLT", "nameLTE", "nameContains", "nameHasPrefix", "nameHasSuffix", "nameEqualFold", "nameContainsFold", "sort", "sortNEQ", "sortIn", "sortNotIn", "sortGT", "sortGTE", "sortLT", "sortLTE", "sortContains", "sortHasPrefix", "sortHasSuffix", "sortEqualFold", "sortContainsFold", "link", "linkNEQ", "linkIn", "linkNotIn", "linkGT", "linkGTE", "linkLT", "linkLTE", "linkContains", "linkHasPrefix", "linkHasSuffix", "linkIsNil", "linkNotNil", "linkEqualFold", "linkContainsFold", "hasBooks", "hasBooksWith"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createTime", "createTimeNEQ", "createTimeIn", "createTimeNotIn", "createTimeGT", "createTimeGTE", "createTimeLT", "createTimeLTE", "updateTime", "updateTimeNEQ", "updateTimeIn", "updateTimeNotIn", "updateTimeGT", "updateTimeGTE", "updateTimeLT", "updateTimeLTE", "path", "pathNEQ", "pathIn", "pathNotIn", "pathGT", "pathGTE", "pathLT", "pathLTE", "pathContains", "pathHasPrefix", "pathHasSuffix", "pathEqualFold", "pathContainsFold", "size", "sizeNEQ", "sizeIn", "sizeNotIn", "sizeGT", "sizeGTE", "sizeLT", "sizeLTE", "width", "widthNEQ", "widthIn", "widthNotIn", "widthGT", "widthGTE", "widthLT", "widthLTE", "height", "heightNEQ", "heightIn", "heightNotIn", "heightGT", "heightGTE", "heightLT", "heightLTE", "url", "urlNEQ", "urlIn", "urlNotIn", "urlGT", "urlGTE", "urlLT", "urlLTE", "urlContains", "urlHasPrefix", "urlHasSuffix", "urlEqualFold", "urlContainsFold", "contenttype", "contenttypeNEQ", "contenttypeIn", "contenttypeNotIn", "contenttypeGT", "contenttypeGTE", "contenttypeLT", "contenttypeLTE", "contenttypeContains", "contenttypeHasPrefix", "contenttypeHasSuffix", "contenttypeEqualFold", "contenttypeContainsFold", "hasBook", "hasBookWith"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -16641,21 +19207,21 @@ func (ec *executionContext) unmarshalInputAuthorWhereInput(ctx context.Context, switch k { case "not": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("not")) - data, err := ec.unmarshalOAuthorWhereInput2ᚖlybbrioᚋinternalᚋentᚐAuthorWhereInput(ctx, v) + data, err := ec.unmarshalOBookCoverWhereInput2ᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInput(ctx, v) if err != nil { return it, err } it.Not = data case "and": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("and")) - data, err := ec.unmarshalOAuthorWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐAuthorWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBookCoverWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInputᚄ(ctx, v) if err != nil { return it, err } it.And = data case "or": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("or")) - data, err := ec.unmarshalOAuthorWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐAuthorWhereInputᚄ(ctx, v) + data, err := ec.unmarshalOBookCoverWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInputᚄ(ctx, v) if err != nil { return it, err } @@ -16764,441 +19330,525 @@ func (ec *executionContext) unmarshalInputAuthorWhereInput(ctx context.Context, if err != nil { return it, err } - it.CreateTimeLT = data - case "createTimeLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeLTE")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.CreateTimeLT = data + case "createTimeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("createTimeLTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.CreateTimeLTE = data + case "updateTime": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTime")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTime = data + case "updateTimeNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNEQ")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeNEQ = data + case "updateTimeIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeIn = data + case "updateTimeNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNotIn")) + data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeNotIn = data + case "updateTimeGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeGT = data + case "updateTimeGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeGTE = data + case "updateTimeLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLT")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeLT = data + case "updateTimeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLTE")) + data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + if err != nil { + return it, err + } + it.UpdateTimeLTE = data + case "path": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Path = data + case "pathNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.PathNEQ = data + case "pathIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.PathIn = data + case "pathNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } - it.CreateTimeLTE = data - case "updateTime": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTime")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathNotIn = data + case "pathGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathGT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTime = data - case "updateTimeNEQ": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNEQ")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathGT = data + case "pathGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathGTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeNEQ = data - case "updateTimeIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeIn")) - data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + it.PathGTE = data + case "pathLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathLT")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeIn = data - case "updateTimeNotIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeNotIn")) - data, err := ec.unmarshalOTime2ᚕtimeᚐTimeᚄ(ctx, v) + it.PathLT = data + case "pathLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathLTE")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeNotIn = data - case "updateTimeGT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGT")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathLTE = data + case "pathContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathContains")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeGT = data - case "updateTimeGTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeGTE")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathContains = data + case "pathHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeGTE = data - case "updateTimeLT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLT")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathHasPrefix = data + case "pathHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeLT = data - case "updateTimeLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("updateTimeLTE")) - data, err := ec.unmarshalOTime2ᚖtimeᚐTime(ctx, v) + it.PathHasSuffix = data + case "pathEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathEqualFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.UpdateTimeLTE = data - case "calibreID": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreID")) + it.PathEqualFold = data + case "pathContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pathContainsFold")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.PathContainsFold = data + case "size": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("size")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreID = data - case "calibreIDNEQ": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNEQ")) + it.Size = data + case "sizeNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeNEQ")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreIDNEQ = data - case "calibreIDIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDIn")) + it.SizeNEQ = data + case "sizeIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeIn")) data, err := ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) if err != nil { return it, err } - it.CalibreIDIn = data - case "calibreIDNotIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNotIn")) + it.SizeIn = data + case "sizeNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeNotIn")) data, err := ec.unmarshalOInt2ᚕint64ᚄ(ctx, v) if err != nil { return it, err } - it.CalibreIDNotIn = data - case "calibreIDGT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDGT")) + it.SizeNotIn = data + case "sizeGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeGT")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreIDGT = data - case "calibreIDGTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDGTE")) + it.SizeGT = data + case "sizeGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeGTE")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreIDGTE = data - case "calibreIDLT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDLT")) + it.SizeGTE = data + case "sizeLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeLT")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreIDLT = data - case "calibreIDLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDLTE")) + it.SizeLT = data + case "sizeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sizeLTE")) data, err := ec.unmarshalOInt2ᚖint64(ctx, v) if err != nil { return it, err } - it.CalibreIDLTE = data - case "calibreIDIsNil": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDIsNil")) - data, err := ec.unmarshalOBoolean2bool(ctx, v) + it.SizeLTE = data + case "width": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("width")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.CalibreIDIsNil = data - case "calibreIDNotNil": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("calibreIDNotNil")) - data, err := ec.unmarshalOBoolean2bool(ctx, v) + it.Width = data + case "widthNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthNEQ")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.CalibreIDNotNil = data - case "name": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.WidthNEQ = data + case "widthIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthIn")) + data, err := ec.unmarshalOInt2ᚕintᚄ(ctx, v) if err != nil { return it, err } - it.Name = data - case "nameNEQ": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNEQ")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.WidthIn = data + case "widthNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthNotIn")) + data, err := ec.unmarshalOInt2ᚕintᚄ(ctx, v) if err != nil { return it, err } - it.NameNEQ = data - case "nameIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameIn")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + it.WidthNotIn = data + case "widthGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthGT")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameIn = data - case "nameNotIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameNotIn")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + it.WidthGT = data + case "widthGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthGTE")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameNotIn = data - case "nameGT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGT")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.WidthGTE = data + case "widthLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthLT")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameGT = data - case "nameGTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameGTE")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.WidthLT = data + case "widthLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("widthLTE")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameGTE = data - case "nameLT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLT")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.WidthLTE = data + case "height": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("height")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameLT = data - case "nameLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameLTE")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.Height = data + case "heightNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightNEQ")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameLTE = data - case "nameContains": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContains")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightNEQ = data + case "heightIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightIn")) + data, err := ec.unmarshalOInt2ᚕintᚄ(ctx, v) if err != nil { return it, err } - it.NameContains = data - case "nameHasPrefix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasPrefix")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightIn = data + case "heightNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightNotIn")) + data, err := ec.unmarshalOInt2ᚕintᚄ(ctx, v) if err != nil { return it, err } - it.NameHasPrefix = data - case "nameHasSuffix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameHasSuffix")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightNotIn = data + case "heightGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightGT")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameHasSuffix = data - case "nameEqualFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameEqualFold")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightGT = data + case "heightGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightGTE")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameEqualFold = data - case "nameContainsFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nameContainsFold")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightGTE = data + case "heightLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightLT")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.NameContainsFold = data - case "sort": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sort")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.HeightLT = data + case "heightLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("heightLTE")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.Sort = data - case "sortNEQ": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortNEQ")) + it.HeightLTE = data + case "url": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortNEQ = data - case "sortIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortIn")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + it.URL = data + case "urlNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlNEQ")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortIn = data - case "sortNotIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortNotIn")) + it.URLNEQ = data + case "urlIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlIn")) data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } - it.SortNotIn = data - case "sortGT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortGT")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.SortGT = data - case "sortGTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortGTE")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + it.URLIn = data + case "urlNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } - it.SortGTE = data - case "sortLT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortLT")) + it.URLNotIn = data + case "urlGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlGT")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortLT = data - case "sortLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortLTE")) + it.URLGT = data + case "urlGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlGTE")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortLTE = data - case "sortContains": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortContains")) + it.URLGTE = data + case "urlLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlLT")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortContains = data - case "sortHasPrefix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortHasPrefix")) + it.URLLT = data + case "urlLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlLTE")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortHasPrefix = data - case "sortHasSuffix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortHasSuffix")) + it.URLLTE = data + case "urlContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlContains")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortHasSuffix = data - case "sortEqualFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortEqualFold")) + it.URLContains = data + case "urlHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlHasPrefix")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortEqualFold = data - case "sortContainsFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortContainsFold")) + it.URLHasPrefix = data + case "urlHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlHasSuffix")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.SortContainsFold = data - case "link": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("link")) + it.URLHasSuffix = data + case "urlEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlEqualFold")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Link = data - case "linkNEQ": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNEQ")) + it.URLEqualFold = data + case "urlContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("urlContainsFold")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkNEQ = data - case "linkIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkIn")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.LinkIn = data - case "linkNotIn": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNotIn")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err - } - it.LinkNotIn = data - case "linkGT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkGT")) + it.URLContainsFold = data + case "contenttype": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttype")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkGT = data - case "linkGTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkGTE")) + it.ContentType = data + case "contenttypeNEQ": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeNEQ")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkGTE = data - case "linkLT": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkLT")) + it.ContentTypeNEQ = data + case "contenttypeIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.ContentTypeIn = data + case "contenttypeNotIn": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeNotIn")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.ContentTypeNotIn = data + case "contenttypeGT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeGT")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkLT = data - case "linkLTE": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkLTE")) + it.ContentTypeGT = data + case "contenttypeGTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeGTE")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkLTE = data - case "linkContains": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkContains")) + it.ContentTypeGTE = data + case "contenttypeLT": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeLT")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkContains = data - case "linkHasPrefix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkHasPrefix")) + it.ContentTypeLT = data + case "contenttypeLTE": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeLTE")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkHasPrefix = data - case "linkHasSuffix": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkHasSuffix")) + it.ContentTypeLTE = data + case "contenttypeContains": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeContains")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkHasSuffix = data - case "linkIsNil": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkIsNil")) - data, err := ec.unmarshalOBoolean2bool(ctx, v) + it.ContentTypeContains = data + case "contenttypeHasPrefix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeHasPrefix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkIsNil = data - case "linkNotNil": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkNotNil")) - data, err := ec.unmarshalOBoolean2bool(ctx, v) + it.ContentTypeHasPrefix = data + case "contenttypeHasSuffix": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeHasSuffix")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkNotNil = data - case "linkEqualFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkEqualFold")) + it.ContentTypeHasSuffix = data + case "contenttypeEqualFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeEqualFold")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkEqualFold = data - case "linkContainsFold": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("linkContainsFold")) + it.ContentTypeEqualFold = data + case "contenttypeContainsFold": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contenttypeContainsFold")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LinkContainsFold = data - case "hasBooks": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBooks")) + it.ContentTypeContainsFold = data + case "hasBook": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBook")) data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) if err != nil { return it, err } - it.HasBooks = data - case "hasBooksWith": - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBooksWith")) + it.HasBook = data + case "hasBookWith": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasBookWith")) data, err := ec.unmarshalOBookWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookWhereInputᚄ(ctx, v) if err != nil { return it, err } - it.HasBooksWith = data + it.HasBookWith = data } } @@ -17739,7 +20389,7 @@ func (ec *executionContext) unmarshalInputBookWhereInput(ctx context.Context, ob asMap[k] = v } - fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createTime", "createTimeNEQ", "createTimeIn", "createTimeNotIn", "createTimeGT", "createTimeGTE", "createTimeLT", "createTimeLTE", "updateTime", "updateTimeNEQ", "updateTimeIn", "updateTimeNotIn", "updateTimeGT", "updateTimeGTE", "updateTimeLT", "updateTimeLTE", "calibreID", "calibreIDNEQ", "calibreIDIn", "calibreIDNotIn", "calibreIDGT", "calibreIDGTE", "calibreIDLT", "calibreIDLTE", "calibreIDIsNil", "calibreIDNotNil", "title", "titleNEQ", "titleIn", "titleNotIn", "titleGT", "titleGTE", "titleLT", "titleLTE", "titleContains", "titleHasPrefix", "titleHasSuffix", "titleEqualFold", "titleContainsFold", "sort", "sortNEQ", "sortIn", "sortNotIn", "sortGT", "sortGTE", "sortLT", "sortLTE", "sortContains", "sortHasPrefix", "sortHasSuffix", "sortEqualFold", "sortContainsFold", "publishedDate", "publishedDateNEQ", "publishedDateIn", "publishedDateNotIn", "publishedDateGT", "publishedDateGTE", "publishedDateLT", "publishedDateLTE", "publishedDateIsNil", "publishedDateNotNil", "path", "pathNEQ", "pathIn", "pathNotIn", "pathGT", "pathGTE", "pathLT", "pathLTE", "pathContains", "pathHasPrefix", "pathHasSuffix", "pathEqualFold", "pathContainsFold", "isbn", "isbnNEQ", "isbnIn", "isbnNotIn", "isbnGT", "isbnGTE", "isbnLT", "isbnLTE", "isbnContains", "isbnHasPrefix", "isbnHasSuffix", "isbnIsNil", "isbnNotNil", "isbnEqualFold", "isbnContainsFold", "description", "descriptionNEQ", "descriptionIn", "descriptionNotIn", "descriptionGT", "descriptionGTE", "descriptionLT", "descriptionLTE", "descriptionContains", "descriptionHasPrefix", "descriptionHasSuffix", "descriptionIsNil", "descriptionNotNil", "descriptionEqualFold", "descriptionContainsFold", "seriesIndex", "seriesIndexNEQ", "seriesIndexIn", "seriesIndexNotIn", "seriesIndexGT", "seriesIndexGTE", "seriesIndexLT", "seriesIndexLTE", "seriesIndexIsNil", "seriesIndexNotNil", "hasAuthors", "hasAuthorsWith", "hasPublisher", "hasPublisherWith", "hasSeries", "hasSeriesWith", "hasIdentifiers", "hasIdentifiersWith", "hasTags", "hasTagsWith", "hasLanguage", "hasLanguageWith", "hasShelf", "hasShelfWith", "hasFiles", "hasFilesWith"} + fieldsInOrder := [...]string{"not", "and", "or", "id", "idNEQ", "idIn", "idNotIn", "idGT", "idGTE", "idLT", "idLTE", "createTime", "createTimeNEQ", "createTimeIn", "createTimeNotIn", "createTimeGT", "createTimeGTE", "createTimeLT", "createTimeLTE", "updateTime", "updateTimeNEQ", "updateTimeIn", "updateTimeNotIn", "updateTimeGT", "updateTimeGTE", "updateTimeLT", "updateTimeLTE", "calibreID", "calibreIDNEQ", "calibreIDIn", "calibreIDNotIn", "calibreIDGT", "calibreIDGTE", "calibreIDLT", "calibreIDLTE", "calibreIDIsNil", "calibreIDNotNil", "title", "titleNEQ", "titleIn", "titleNotIn", "titleGT", "titleGTE", "titleLT", "titleLTE", "titleContains", "titleHasPrefix", "titleHasSuffix", "titleEqualFold", "titleContainsFold", "sort", "sortNEQ", "sortIn", "sortNotIn", "sortGT", "sortGTE", "sortLT", "sortLTE", "sortContains", "sortHasPrefix", "sortHasSuffix", "sortEqualFold", "sortContainsFold", "publishedDate", "publishedDateNEQ", "publishedDateIn", "publishedDateNotIn", "publishedDateGT", "publishedDateGTE", "publishedDateLT", "publishedDateLTE", "publishedDateIsNil", "publishedDateNotNil", "path", "pathNEQ", "pathIn", "pathNotIn", "pathGT", "pathGTE", "pathLT", "pathLTE", "pathContains", "pathHasPrefix", "pathHasSuffix", "pathEqualFold", "pathContainsFold", "isbn", "isbnNEQ", "isbnIn", "isbnNotIn", "isbnGT", "isbnGTE", "isbnLT", "isbnLTE", "isbnContains", "isbnHasPrefix", "isbnHasSuffix", "isbnIsNil", "isbnNotNil", "isbnEqualFold", "isbnContainsFold", "description", "descriptionNEQ", "descriptionIn", "descriptionNotIn", "descriptionGT", "descriptionGTE", "descriptionLT", "descriptionLTE", "descriptionContains", "descriptionHasPrefix", "descriptionHasSuffix", "descriptionIsNil", "descriptionNotNil", "descriptionEqualFold", "descriptionContainsFold", "seriesIndex", "seriesIndexNEQ", "seriesIndexIn", "seriesIndexNotIn", "seriesIndexGT", "seriesIndexGTE", "seriesIndexLT", "seriesIndexLTE", "seriesIndexIsNil", "seriesIndexNotNil", "hasAuthors", "hasAuthorsWith", "hasPublisher", "hasPublisherWith", "hasSeries", "hasSeriesWith", "hasIdentifiers", "hasIdentifiersWith", "hasTags", "hasTagsWith", "hasLanguage", "hasLanguageWith", "hasShelf", "hasShelfWith", "hasFiles", "hasFilesWith", "hasCovers", "hasCoversWith"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -18740,6 +21390,20 @@ func (ec *executionContext) unmarshalInputBookWhereInput(ctx context.Context, ob return it, err } it.HasFilesWith = data + case "hasCovers": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasCovers")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.HasCovers = data + case "hasCoversWith": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("hasCoversWith")) + data, err := ec.unmarshalOBookCoverWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInputᚄ(ctx, v) + if err != nil { + return it, err + } + it.HasCoversWith = data } } @@ -18822,7 +21486,7 @@ func (ec *executionContext) unmarshalInputCreateBookInput(ctx context.Context, o asMap[k] = v } - fieldsInOrder := [...]string{"createTime", "updateTime", "calibreID", "title", "sort", "publishedDate", "path", "isbn", "description", "seriesIndex", "authorIDs", "publisherIDs", "seriesIDs", "identifierIDs", "tagIDs", "languageIDs", "shelfIDs", "fileIDs"} + fieldsInOrder := [...]string{"createTime", "updateTime", "calibreID", "title", "sort", "publishedDate", "path", "isbn", "description", "seriesIndex", "authorIDs", "publisherIDs", "seriesIDs", "identifierIDs", "tagIDs", "languageIDs", "shelfIDs", "fileIDs", "coverIDs"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -18955,6 +21619,13 @@ func (ec *executionContext) unmarshalInputCreateBookInput(ctx context.Context, o return it, err } it.FileIDs = data + case "coverIDs": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("coverIDs")) + data, err := ec.unmarshalOID2ᚕlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐIDᚄ(ctx, v) + if err != nil { + return it, err + } + it.CoverIDs = data } } @@ -22976,7 +25647,7 @@ func (ec *executionContext) unmarshalInputUpdateBookInput(ctx context.Context, o asMap[k] = v } - fieldsInOrder := [...]string{"updateTime", "calibreID", "clearCalibreID", "title", "sort", "publishedDate", "clearPublishedDate", "path", "isbn", "clearIsbn", "description", "clearDescription", "seriesIndex", "clearSeriesIndex", "addAuthorIDs", "removeAuthorIDs", "clearAuthors", "addPublisherIDs", "removePublisherIDs", "clearPublisher", "addSeriesIDs", "removeSeriesIDs", "clearSeries", "addIdentifierIDs", "removeIdentifierIDs", "clearIdentifiers", "addTagIDs", "removeTagIDs", "clearTags", "addLanguageIDs", "removeLanguageIDs", "clearLanguage", "addShelfIDs", "removeShelfIDs", "clearShelf", "addFileIDs", "removeFileIDs", "clearFiles"} + fieldsInOrder := [...]string{"updateTime", "calibreID", "clearCalibreID", "title", "sort", "publishedDate", "clearPublishedDate", "path", "isbn", "clearIsbn", "description", "clearDescription", "seriesIndex", "clearSeriesIndex", "addAuthorIDs", "removeAuthorIDs", "clearAuthors", "addPublisherIDs", "removePublisherIDs", "clearPublisher", "addSeriesIDs", "removeSeriesIDs", "clearSeries", "addIdentifierIDs", "removeIdentifierIDs", "clearIdentifiers", "addTagIDs", "removeTagIDs", "clearTags", "addLanguageIDs", "removeLanguageIDs", "clearLanguage", "addShelfIDs", "removeShelfIDs", "clearShelf", "addFileIDs", "removeFileIDs", "clearFiles", "addCoverIDs", "removeCoverIDs", "clearCovers"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -23249,6 +25920,27 @@ func (ec *executionContext) unmarshalInputUpdateBookInput(ctx context.Context, o return it, err } it.ClearFiles = data + case "addCoverIDs": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("addCoverIDs")) + data, err := ec.unmarshalOID2ᚕlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐIDᚄ(ctx, v) + if err != nil { + return it, err + } + it.AddCoverIDs = data + case "removeCoverIDs": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("removeCoverIDs")) + data, err := ec.unmarshalOID2ᚕlybbrioᚋinternalᚋentᚋschemaᚋksuidᚐIDᚄ(ctx, v) + if err != nil { + return it, err + } + it.RemoveCoverIDs = data + case "clearCovers": + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("clearCovers")) + data, err := ec.unmarshalOBoolean2bool(ctx, v) + if err != nil { + return it, err + } + it.ClearCovers = data } } @@ -24617,6 +27309,11 @@ func (ec *executionContext) _Node(ctx context.Context, sel ast.SelectionSet, obj return graphql.Null } return ec._Book(ctx, sel, obj) + case *ent.BookCover: + if obj == nil { + return graphql.Null + } + return ec._BookCover(ctx, sel, obj) case *ent.BookFile: if obj == nil { return graphql.Null @@ -25153,7 +27850,201 @@ func (ec *executionContext) _Book(ctx context.Context, sel ast.SelectionSet, obj ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Book_files(ctx, field, obj) + res = ec._Book_files(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "covers": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Book_covers(ctx, field, obj) + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var bookConnectionImplementors = []string{"BookConnection"} + +func (ec *executionContext) _BookConnection(ctx context.Context, sel ast.SelectionSet, obj *ent.BookConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bookConnectionImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BookConnection") + case "edges": + out.Values[i] = ec._BookConnection_edges(ctx, field, obj) + case "pageInfo": + out.Values[i] = ec._BookConnection_pageInfo(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "totalCount": + out.Values[i] = ec._BookConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var bookCoverImplementors = []string{"BookCover", "Node"} + +func (ec *executionContext) _BookCover(ctx context.Context, sel ast.SelectionSet, obj *ent.BookCover) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bookCoverImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BookCover") + case "id": + out.Values[i] = ec._BookCover_id(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "createTime": + out.Values[i] = ec._BookCover_createTime(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTime": + out.Values[i] = ec._BookCover_updateTime(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "path": + out.Values[i] = ec._BookCover_path(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "size": + out.Values[i] = ec._BookCover_size(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "width": + out.Values[i] = ec._BookCover_width(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "height": + out.Values[i] = ec._BookCover_height(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "url": + out.Values[i] = ec._BookCover_url(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "contenttype": + out.Values[i] = ec._BookCover_contenttype(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "book": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._BookCover_book(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } @@ -25200,26 +28091,67 @@ func (ec *executionContext) _Book(ctx context.Context, sel ast.SelectionSet, obj return out } -var bookConnectionImplementors = []string{"BookConnection"} +var bookCoverConnectionImplementors = []string{"BookCoverConnection"} -func (ec *executionContext) _BookConnection(ctx context.Context, sel ast.SelectionSet, obj *ent.BookConnection) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, bookConnectionImplementors) +func (ec *executionContext) _BookCoverConnection(ctx context.Context, sel ast.SelectionSet, obj *ent.BookCoverConnection) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bookCoverConnectionImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("BookConnection") + out.Values[i] = graphql.MarshalString("BookCoverConnection") case "edges": - out.Values[i] = ec._BookConnection_edges(ctx, field, obj) + out.Values[i] = ec._BookCoverConnection_edges(ctx, field, obj) case "pageInfo": - out.Values[i] = ec._BookConnection_pageInfo(ctx, field, obj) + out.Values[i] = ec._BookCoverConnection_pageInfo(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "totalCount": - out.Values[i] = ec._BookConnection_totalCount(ctx, field, obj) + out.Values[i] = ec._BookCoverConnection_totalCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var bookCoverEdgeImplementors = []string{"BookCoverEdge"} + +func (ec *executionContext) _BookCoverEdge(ctx context.Context, sel ast.SelectionSet, obj *ent.BookCoverEdge) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, bookCoverEdgeImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("BookCoverEdge") + case "node": + out.Values[i] = ec._BookCoverEdge_node(ctx, field, obj) + case "cursor": + out.Values[i] = ec._BookCoverEdge_cursor(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } @@ -26203,6 +29135,28 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "bookCovers": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_bookCovers(ctx, field) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) case "bookFiles": field := field @@ -27852,6 +30806,51 @@ func (ec *executionContext) marshalNBookConnection2ᚖlybbrioᚋinternalᚋent return ec._BookConnection(ctx, sel, v) } +func (ec *executionContext) marshalNBookCover2ᚖlybbrioᚋinternalᚋentᚐBookCover(ctx context.Context, sel ast.SelectionSet, v *ent.BookCover) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._BookCover(ctx, sel, v) +} + +func (ec *executionContext) marshalNBookCoverConnection2lybbrioᚋinternalᚋentᚐBookCoverConnection(ctx context.Context, sel ast.SelectionSet, v ent.BookCoverConnection) graphql.Marshaler { + return ec._BookCoverConnection(ctx, sel, &v) +} + +func (ec *executionContext) marshalNBookCoverConnection2ᚖlybbrioᚋinternalᚋentᚐBookCoverConnection(ctx context.Context, sel ast.SelectionSet, v *ent.BookCoverConnection) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._BookCoverConnection(ctx, sel, v) +} + +func (ec *executionContext) unmarshalNBookCoverOrderField2ᚖlybbrioᚋinternalᚋentᚐBookCoverOrderField(ctx context.Context, v interface{}) (*ent.BookCoverOrderField, error) { + var res = new(ent.BookCoverOrderField) + err := res.UnmarshalGQL(v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNBookCoverOrderField2ᚖlybbrioᚋinternalᚋentᚐBookCoverOrderField(ctx context.Context, sel ast.SelectionSet, v *ent.BookCoverOrderField) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return v +} + +func (ec *executionContext) unmarshalNBookCoverWhereInput2ᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInput(ctx context.Context, v interface{}) (*ent.BookCoverWhereInput, error) { + res, err := ec.unmarshalInputBookCoverWhereInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalNBookFile2ᚕᚖlybbrioᚋinternalᚋentᚐBookFileᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.BookFile) graphql.Marshaler { ret := make(graphql.Array, len(v)) var wg sync.WaitGroup @@ -29152,6 +32151,144 @@ func (ec *executionContext) marshalOBook2ᚖlybbrioᚋinternalᚋentᚐBook(ctx return ec._Book(ctx, sel, v) } +func (ec *executionContext) marshalOBookCover2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverᚄ(ctx context.Context, sel ast.SelectionSet, v []*ent.BookCover) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalNBookCover2ᚖlybbrioᚋinternalᚋentᚐBookCover(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + +func (ec *executionContext) marshalOBookCover2ᚖlybbrioᚋinternalᚋentᚐBookCover(ctx context.Context, sel ast.SelectionSet, v *ent.BookCover) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._BookCover(ctx, sel, v) +} + +func (ec *executionContext) marshalOBookCoverEdge2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverEdge(ctx context.Context, sel ast.SelectionSet, v []*ent.BookCoverEdge) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + var wg sync.WaitGroup + isLen1 := len(v) == 1 + if !isLen1 { + wg.Add(len(v)) + } + for i := range v { + i := i + fc := &graphql.FieldContext{ + Index: &i, + Result: &v[i], + } + ctx := graphql.WithFieldContext(ctx, fc) + f := func(i int) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = nil + } + }() + if !isLen1 { + defer wg.Done() + } + ret[i] = ec.marshalOBookCoverEdge2ᚖlybbrioᚋinternalᚋentᚐBookCoverEdge(ctx, sel, v[i]) + } + if isLen1 { + f(i) + } else { + go f(i) + } + + } + wg.Wait() + + return ret +} + +func (ec *executionContext) marshalOBookCoverEdge2ᚖlybbrioᚋinternalᚋentᚐBookCoverEdge(ctx context.Context, sel ast.SelectionSet, v *ent.BookCoverEdge) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._BookCoverEdge(ctx, sel, v) +} + +func (ec *executionContext) unmarshalOBookCoverOrder2ᚖlybbrioᚋinternalᚋentᚐBookCoverOrder(ctx context.Context, v interface{}) (*ent.BookCoverOrder, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputBookCoverOrder(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOBookCoverWhereInput2ᚕᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInputᚄ(ctx context.Context, v interface{}) ([]*ent.BookCoverWhereInput, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*ent.BookCoverWhereInput, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNBookCoverWhereInput2ᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInput(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOBookCoverWhereInput2ᚖlybbrioᚋinternalᚋentᚐBookCoverWhereInput(ctx context.Context, v interface{}) (*ent.BookCoverWhereInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputBookCoverWhereInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalOBookEdge2ᚕᚖlybbrioᚋinternalᚋentᚐBookEdge(ctx context.Context, sel ast.SelectionSet, v []*ent.BookEdge) graphql.Marshaler { if v == nil { return graphql.Null @@ -29774,6 +32911,44 @@ func (ec *executionContext) marshalOInt2ᚕint64ᚄ(ctx context.Context, sel ast return ret } +func (ec *executionContext) unmarshalOInt2ᚕintᚄ(ctx context.Context, v interface{}) ([]int, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]int, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNInt2int(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) marshalOInt2ᚕintᚄ(ctx context.Context, sel ast.SelectionSet, v []int) graphql.Marshaler { + if v == nil { + return graphql.Null + } + ret := make(graphql.Array, len(v)) + for i := range v { + ret[i] = ec.marshalNInt2int(ctx, sel, v[i]) + } + + for _, e := range ret { + if e == graphql.Null { + return graphql.Null + } + } + + return ret +} + func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { if v == nil { return nil, nil diff --git a/internal/graph/me.resolvers.go b/internal/graph/me.resolvers.go index fb2d827e..ee7912e4 100644 --- a/internal/graph/me.resolvers.go +++ b/internal/graph/me.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.42 +// Code generated by github.com/99designs/gqlgen version v0.17.43 import ( "context" diff --git a/internal/graph/mutation.resolvers.go b/internal/graph/mutation.resolvers.go index 32272b0b..b5cb014f 100644 --- a/internal/graph/mutation.resolvers.go +++ b/internal/graph/mutation.resolvers.go @@ -2,7 +2,7 @@ package graph // This file will be automatically regenerated based on the schema, any resolver implementations // will be copied through when generating and any unknown code will be moved to the end. -// Code generated by github.com/99designs/gqlgen version v0.17.42 +// Code generated by github.com/99designs/gqlgen version v0.17.43 import ( "context" diff --git a/internal/handler/image.go b/internal/handler/image.go new file mode 100644 index 00000000..8184639e --- /dev/null +++ b/internal/handler/image.go @@ -0,0 +1,96 @@ +package handler + +import ( + "lybbrio/internal/ent" + "lybbrio/internal/ent/book" + "lybbrio/internal/ent/bookcover" + "lybbrio/internal/ent/schema/ksuid" + "mime" + "net/http" + "os" + "path/filepath" + "strconv" + "strings" + + "entgo.io/ent/dialect/sql" + "github.com/go-chi/chi/v5" + "github.com/rs/zerolog/log" +) + +func ImageRoutes(client *ent.Client) http.Handler { + r := chi.NewRouter() + r.Get("/{bookID}/{width}/{height}/{fileName}", CoverImage(client)) + return r +} + +func CoverImage(client *ent.Client) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + ctx := r.Context() + log := log.Ctx(ctx) + fileName := chi.URLParam(r, "fileName") + bookID := chi.URLParam(r, "bookID") + widthStr := chi.URLParam(r, "width") + heightStr := chi.URLParam(r, "height") + if bookID == "" || fileName == "" || widthStr == "" || heightStr == "" { + statusCodeResponse(w, r, http.StatusBadRequest) + return + } + width, err := strconv.Atoi(widthStr) + if err != nil { + log.Debug().Err(err).Msg("Failed to parse width") + statusCodeResponse(w, r, http.StatusBadRequest) + return + } + height, err := strconv.Atoi(heightStr) + if err != nil { + log.Debug().Err(err).Msg("Failed to parse height") + statusCodeResponse(w, r, http.StatusBadRequest) + return + } + ext := filepath.Ext(fileName) + if strings.TrimSuffix(fileName, ext) != "cover" { + log.Debug(). + Str("ext", ext). + Str("requestedFileName", fileName). + Msg("Invalid file name") + statusCodeResponse(w, r, http.StatusBadRequest) + return + } + contentType := mime.TypeByExtension(ext) + if contentType == "" { + log.Debug(). + Str("ext", ext). + Str("requestedFileName", fileName). + Msg("Unknown content type") + statusCodeResponse(w, r, http.StatusBadRequest) + return + } + cover, err := client.BookCover.Query(). + Where( + bookcover.And( + bookcover.HasBookWith(book.ID(ksuid.ID(bookID))), + bookcover.WidthLTE(width), + bookcover.HeightLTE(height), + bookcover.ContentType(contentType), + ), + ). + Order(bookcover.BySize(sql.OrderAsc())). + First(ctx) + if err != nil { + if ent.IsNotFound(err) { + statusCodeResponse(w, r, http.StatusNotFound) + return + } + log.Error().Err(err).Msg("Failed to query book cover") + statusCodeResponse(w, r, http.StatusInternalServerError) + } + rr, err := os.Open(cover.Path) + if err != nil { + log.Error().Err(err).Msg("Failed to open file") + statusCodeResponse(w, r, http.StatusInternalServerError) + return + } + defer rr.Close() + http.ServeContent(w, r, fileName, cover.UpdateTime, rr) + } +} diff --git a/internal/handler/web.go b/internal/handler/web.go index e5a7a197..f622e516 100644 --- a/internal/handler/web.go +++ b/internal/handler/web.go @@ -11,8 +11,6 @@ import ( "github.com/go-chi/chi/v5" ) -const VITE_DEV = "http://localhost:5173" - func WebRoutes(isDev bool, proxyPath string, assetFolder string) http.Handler { r := chi.NewRouter() if isDev { @@ -29,12 +27,7 @@ func FrontendProxy(proxyPath string) http.HandlerFunc { // Should be unreachable panic(err) } - proxy := httputil.ReverseProxy{Director: func(r *http.Request) { - r.URL.Scheme = remote.Scheme - r.URL.Host = remote.Host - r.URL.Path = remote.Path + r.URL.Path - r.Host = remote.Host - }} + proxy := httputil.NewSingleHostReverseProxy(remote) return func(w http.ResponseWriter, r *http.Request) { proxy.ServeHTTP(w, r) } diff --git a/internal/image/image.go b/internal/image/image.go new file mode 100644 index 00000000..53aca569 --- /dev/null +++ b/internal/image/image.go @@ -0,0 +1,64 @@ +package image + +import ( + "bytes" + "errors" + img "image" + _ "image/gif" + _ "image/jpeg" + _ "image/png" + "io" + "net/http" + "os" +) + +var ( + ErrFileNotFound = errors.New("file not found") + ErrUnknownImageType = errors.New("unknown image type") + ErrorReadingFileHeader = errors.New("error reading file header") +) + +type ImageFile struct { + Size int64 + Width int + Height int + ContentType string +} + +func ProcessFile(filePath string) (ImageFile, error) { + ret := ImageFile{} + fi, err := os.Stat(filePath) + if err != nil { + return ImageFile{}, ErrFileNotFound + } + ret.Size = fi.Size() + + r, err := os.Open(filePath) + if err != nil { + // shouldn't be reachable, stat will fail if the file doesn't exist. + return ImageFile{}, ErrFileNotFound + } + defer r.Close() + + im, _, err := img.DecodeConfig(r) + if err != nil { + return ImageFile{}, ErrUnknownImageType + } + + ret.Width = im.Width + ret.Height = im.Height + + if _, err := r.Seek(0, 0); err != nil { + return ImageFile{}, ErrorReadingFileHeader + } + // Limit the reader to the first 512 bytes to read the file header. + lr := io.LimitReader(r, 512) + b := bytes.NewBuffer(nil) + _, err = io.Copy(b, lr) + if err != nil { + return ImageFile{}, ErrorReadingFileHeader + } + ret.ContentType = http.DetectContentType(b.Bytes()) + + return ret, nil +} diff --git a/internal/image/image_test.go b/internal/image/image_test.go new file mode 100644 index 00000000..496e3aa1 --- /dev/null +++ b/internal/image/image_test.go @@ -0,0 +1,87 @@ +package image + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestProcessFile(t *testing.T) { + tests := []struct { + name string + file string + want ImageFile + wantErr bool + }{ + { + name: "test1.jpg", + file: "test_fixtures/test1.jpg", + want: ImageFile{ + Size: 665, + Width: 35, + Height: 35, + ContentType: "image/jpeg", + }, + wantErr: false, + }, + { + name: "test2.png", + file: "test_fixtures/test2.png", + want: ImageFile{ + Size: 181, + Width: 49, + Height: 43, + ContentType: "image/png", + }, + wantErr: false, + }, + { + name: "test3.gif", + file: "test_fixtures/test3.gif", + want: ImageFile{ + Size: 1201, + Width: 26, + Height: 66, + ContentType: "image/gif", + }, + wantErr: false, + }, + { + name: "test4.jpeg", + file: "test_fixtures/test4.jpeg", + want: ImageFile{ + Size: 634, + Width: 8, + Height: 9, + ContentType: "image/jpeg", + }, + wantErr: false, + }, + { + "broken.jpg", + "test_fixtures/broken.jpg", + ImageFile{}, + true, + }, + { + "doesnt_exist", + "test_fixtures/doesnt_exist", + ImageFile{}, + true, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + require := require.New(t) + got, err := ProcessFile(tt.file) + if tt.wantErr { + require.Error(err) + } else { + require.NoError(err) + } + require.EqualValues(tt.want, got) + }) + } +} diff --git a/internal/image/test_fixtures/broken.jpg b/internal/image/test_fixtures/broken.jpg new file mode 100644 index 00000000..e69de29b diff --git a/internal/image/test_fixtures/test1.jpg b/internal/image/test_fixtures/test1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..785cad17f66c24b8fa5112b0142556789833be11 GIT binary patch literal 665 zcmex=TVf!H8JK-xjNfQW~KodcwTH1PibgCGZkGJ`TRqY?v? zAS1IN6#zP)nVAXbSXLGmpz2znJOhg$ ztB|6hBb#twBD+$dh*9Ijg&fLG8xM*GUHqV8oK)1r$t5N(At|M*rmmr>WnyY(ZeeNV z?BeR??&0Yb91<+v*#~fzWVs- z^OvvRzW@073*;|G24;x2;66k1mmttzOu#r`VF&q(k*OSrnFU!`6%E;h90S=C3x$=8 z8aYIqCNA7~kW<+>=!0ld(M2vX6_bamA3v_BUA;L%vr#efh0zX<>?sm;v* literal 0 HcmV?d00001 diff --git a/internal/image/test_fixtures/test2.png b/internal/image/test_fixtures/test2.png new file mode 100644 index 0000000000000000000000000000000000000000..d9d893df11dadc1d2f318322913c55ebf51de1c5 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^hCr;%!3HERUQBohq!^2X+?^QKos)S9a~60+7Beu2se&-0XOPMVprDthi(^QJ^V{=|ybKCF42C{ujMugIPP((0 lsp{R#zp{;&Ek^(V literal 0 HcmV?d00001 diff --git a/internal/image/test_fixtures/test3.gif b/internal/image/test_fixtures/test3.gif new file mode 100644 index 0000000000000000000000000000000000000000..b681dd523ded4d0fdc7fad05ef9f4e44fe6c73aa GIT binary patch literal 1201 zcmXYwduY&A6vw~9La|)>$A-FQn%ZMmNIG+K3@t}2H)6KhZ8je@nrCx{X_)y)x{TN& z(lVQJOf8$(y5Lr!YebsV@==Gf@JjTuGDRb!hYy74^jmfRx!il;p6~g5zxS@H%IRf| zV^M+2_-_%wfB*^@9N-9!;RH_M3?A?V&+r1T@P+^cLSO_zPy|B+A|W!OAS$9E0f~?p zNstuDvbSLbW0=4cmK{JK0uzLwS&baX5jiF&XdEOvy4G+1SKjhA=df#SZL<9kUa5%Fft>J+Wu@ z!d}@M2XG(`%t1IP2jd8i#F04)N9Aaoz==39C*h==j16qW#%#i-Y#D-#I0;xF0?mks zgE$h$;zXQ^Gw~2l;#s_iSMeqR5=a6|5D6;5BtjxdWQihCC7L8iB1tSsB&j45gBXdi zn24!ZMn5x~6s!=1W@e~^I#S2#M4hTL^-xdhS-q%N^`-$DNCRsS4XVL3LL+HpjiOOC znkHx>O{_^YsU}l{8mY0GsHvI_1|f4JLz3yridhsK%#k@ZC+5_gnTL5Y&*sIvnl}ru zKo;17SWpXQ5f;fJTNI0G(Ja9dSz=3KNi7XF%Yv4s_i=XY{AuSdq>|k zsd7Wkw8}e=-ZOb%{fP3)ZL{gd>fDKC3;W-A^VF=4n{GdpQ~gKRq4ts)ug#a@bDwUh zC_j@^^;Te{7~-~IikW8L+i4KG}K{Pny0OO||b ze&pUsLwj0#XBJNH+da3p<-Wh`8b-C;zj<8q$0Md}Y^vG$;?Ax6KcT4~Y+rkH=82-x zmIr&}WYHtft>`^?pnb@aNqbiJwZ7k6@YIgN)xYvPH(c4h@5rUorw0y?xpmz93%8u@ z?`d4QZ$bUu^V^ylOD`^%aiMuvU*5zGhu3}H`eo0W{Y6{0*RL7qZ0~yhy(b^rb?WJ_ zA8qYjRd@N%?sYRRbv|&-xsq3xc6A=VcloA^n;Vu*Ta-UO{Ib42zx6eg2=qHxvb#Gm~bwd9RpI0;R@VY%4 ehkn<#?1$3A%HqC`g;ifYex`8KoS*YYqWm8n=Q{cT literal 0 HcmV?d00001 diff --git a/internal/image/test_fixtures/test4.jpeg b/internal/image/test_fixtures/test4.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f83ced99904320060db1a843919f61cd09f1e8d2 GIT binary patch literal 634 zcmex=TVf!H8JK-xjNfQW~KodcwTH1PibgCGY3Cj$pFqY?v? zAS1IN6#zP)nVAXbSXLGmpz2znJOhg$ ztB|6hBb#twBD+$dh*9Ijg&fLG8xM*GUHqV8oK)1r$t5N(At|M*rmmr>WnyY(ZeeNV z?BeR??&0Yb91<+v*#~fzWVs- z^OvvRzW@073*;|G24;x2;66k1mmttzOu#r`VF&q(k*OSrnFU!`6%E;h90S=C3x$=8 z8aYIqCNA7~kW<+>=!0ld(M2vX6_bamA3#+ZS69Aqg!>9lN literal 0 HcmV?d00001