From fe39589552d0dff229a4ad3a5cbb2f6c0a3e4079 Mon Sep 17 00:00:00 2001 From: Cailyn Sinclair Date: Fri, 20 Mar 2026 20:45:29 -0700 Subject: [PATCH 1/4] Upgrade TypeScript and add quality checks --- .github/workflows/quality.yml | 30 +++++++++++++++ package.json | 7 ++-- packages/admin/package.json | 7 ++-- packages/admin/src/Layout/Footer.tsx | 4 +- packages/notifapi/package.json | 3 +- .../notifapi/routes/v0/external/notify.ts | 14 +++---- packages/notifapi/server.ts | 2 +- packages/projector/package.json | 10 ++--- .../resolvers/mutations/ActivityMutations.ts | 16 +++++--- packages/server/package.json | 16 ++++---- packages/webapp/package.json | 9 ++--- packages/webapp/vite.config.ts | 15 ++++++++ packages/www/package.json | 13 +++---- packages/www/vite.config.ts | 13 +++++++ tools/vite/manualChunks.ts | 21 +++++++++++ yarn.lock | 37 ++++++++----------- 16 files changed, 145 insertions(+), 72 deletions(-) create mode 100644 .github/workflows/quality.yml create mode 100644 tools/vite/manualChunks.ts diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml new file mode 100644 index 0000000..d5cdae9 --- /dev/null +++ b/.github/workflows/quality.yml @@ -0,0 +1,30 @@ +name: Quality + +on: + pull_request: + push: + branches: + - main + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Lint + run: yarn lint + + - name: Typecheck + run: yarn typecheck diff --git a/package.json b/package.json index 5895a1e..38c587d 100644 --- a/package.json +++ b/package.json @@ -4,17 +4,18 @@ "workspaces": [ "packages/*" ], - "dependencies": { - "lerna": "^6.0.1" - }, "devDependencies": { "husky": "^8.0.1", + "lerna": "^6.0.1", "prettier": "^2.7.1" }, "scripts": { "prepare": "husky install", "bootstrap": "lerna bootstrap", "postinstall": "lerna bootstrap", + "lint": "yarn workspace api lint && yarn workspace notifapi lint", + "typecheck": "yarn workspace admin typecheck && yarn workspace projector typecheck && yarn workspace webapp typecheck && yarn workspace www typecheck && yarn workspace api typecheck && yarn workspace notifapi typecheck", + "validate": "yarn lint && yarn typecheck", "build": "lerna run build", "build:www": "lerna run build --scope www", "build:webapp": "lerna run build --scope webapp", diff --git a/packages/admin/package.json b/packages/admin/package.json index 7367d43..33f571b 100644 --- a/packages/admin/package.json +++ b/packages/admin/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "vite", + "typecheck": "tsc --noEmit", "build": "tsc && vite build", "preview": "vite preview" }, @@ -12,7 +13,6 @@ "@apollo/client": "^3.14.1", "@notifycomp/frontend-common": "0.0.1", "@tanstack/react-query": "^4.43.0", - "@types/react-modal": "^3.13.1", "@wca/helpers": "^1.1.7", "classnames": "^2.3.2", "graphql": "^16.13.1", @@ -25,12 +25,13 @@ }, "devDependencies": { "@types/react": "^18.3.28", - "@types/react-dom": "^18.0.9", + "@types/react-dom": "^18.3.7", + "@types/react-modal": "^3.13.1", "@vitejs/plugin-react": "^3.1.0", "autoprefixer": "^10.4.27", "postcss": "^8.5.8", "tailwindcss": "^3.4.19", - "typescript": "^4.9.3", + "typescript": "^5.9.3", "vite": "^4.0.0" } } diff --git a/packages/admin/src/Layout/Footer.tsx b/packages/admin/src/Layout/Footer.tsx index 16c4ff7..efeef81 100644 --- a/packages/admin/src/Layout/Footer.tsx +++ b/packages/admin/src/Layout/Footer.tsx @@ -26,7 +26,7 @@ function APISection({ name, url }: { name: string; url: string }) { }, []); useEffect(() => { - let timeout: NodeJS.Timeout; + let timeout: NodeJS.Timeout | undefined; async function retry() { try { @@ -45,7 +45,7 @@ function APISection({ name, url }: { name: string; url: string }) { lastPinged: new Date(), }); } - setTimeout(retry, interval.current); + timeout = setTimeout(retry, interval.current); } retry(); diff --git a/packages/notifapi/package.json b/packages/notifapi/package.json index 3463891..761081c 100644 --- a/packages/notifapi/package.json +++ b/packages/notifapi/package.json @@ -9,6 +9,7 @@ "prestart": "yarn prisma:generate && yarn prisma:migrate", "start": "ts-node index.ts", "lint": "eslint ./", + "typecheck": "tsc --noEmit -p tsconfig.json", "test": "echo \"Error: no test specified\" && exit 1", "prisma:migrate": "prisma migrate deploy", "prisma:migrate:dev": "prisma migrate dev", @@ -33,7 +34,7 @@ "prisma": "^4.8.1", "ts-node": "^10.9.1", "twilio": "^3.84.1", - "typescript": "^4.9.4", + "typescript": "^5.9.3", "winston": "^3.8.2" }, "devDependencies": { diff --git a/packages/notifapi/routes/v0/external/notify.ts b/packages/notifapi/routes/v0/external/notify.ts index dc83c6d..6ac1632 100644 --- a/packages/notifapi/routes/v0/external/notify.ts +++ b/packages/notifapi/routes/v0/external/notify.ts @@ -219,12 +219,12 @@ router.post( const includeRoomName = rooms.length > 1; const activityNotifications = notifications.filter( - (n) => n.type === 'activity' - ) as ActivityNotification[]; + (n): n is ActivityNotification => n.type === 'activity' + ); const competitorNotifications = notifications.filter( - (n) => n.type === 'competitor' - ) as CompetitorNotification[]; + (n): n is CompetitorNotification => n.type === 'competitor' + ); // short lived memory cache of activity data const activityData = new Map(); @@ -253,11 +253,7 @@ router.post( ); const wcaUserIdsForSearch = uniqueDefinedSet( - ( - notifications.filter( - (n) => n.type === 'competitor' - ) as CompetitorNotification[] - ).map((n) => n.wcaUserId) + competitorNotifications.map((n) => n.wcaUserId) ); const userCompetitionSubscriptions = diff --git a/packages/notifapi/server.ts b/packages/notifapi/server.ts index cb6d52d..a58a002 100644 --- a/packages/notifapi/server.ts +++ b/packages/notifapi/server.ts @@ -88,7 +88,7 @@ export async function init() { app.set('trust proxy', 1); // trust first proxy app.use(cookieParser(SECRET)); - app.use(session(sessionOptions)); + app.use(session(sessionOptions) as unknown as express.RequestHandler); app.use('/v0/internal', internal); diff --git a/packages/projector/package.json b/packages/projector/package.json index 6672868..3b8f0d3 100644 --- a/packages/projector/package.json +++ b/packages/projector/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "vite", + "typecheck": "tsc --noEmit", "build": "tsc && vite build", "preview": "vite preview" }, @@ -12,22 +13,21 @@ "@apollo/client": "^3.14.1", "@notifycomp/frontend-common": "^0.0.1", "@tanstack/react-query": "^4.43.0", - "@types/date-fns": "^2.6.0", "@wca/helpers": "^1.1.7", - "autoprefixer": "^10.4.27", "date-fns": "^2.29.3", "graphql": "^16.13.1", "graphql-ws": "^5.11.2", - "postcss": "^8.5.8", "react": "^18.2.0", "react-dom": "^18.2.0", "tailwindcss": "^3.4.19" }, "devDependencies": { "@types/react": "^18.3.28", - "@types/react-dom": "^18.0.9", + "@types/react-dom": "^18.3.7", "@vitejs/plugin-react": "^3.1.0", - "typescript": "^4.9.3", + "autoprefixer": "^10.4.27", + "postcss": "^8.5.8", + "typescript": "^5.9.3", "vite": "^4.0.0" } } diff --git a/packages/server/graphql/resolvers/mutations/ActivityMutations.ts b/packages/server/graphql/resolvers/mutations/ActivityMutations.ts index 49d8d38..e1a6ee4 100644 --- a/packages/server/graphql/resolvers/mutations/ActivityMutations.ts +++ b/packages/server/graphql/resolvers/mutations/ActivityMutations.ts @@ -57,9 +57,11 @@ export const startActivity: MutationResolvers['startActivity'] = res.filter((r) => r.status === 'fulfilled').length, 'webhooks' ); - ( - res.filter((r) => r.status === 'rejected') as PromiseRejectedResult[] - ).forEach((r) => { + res + .filter( + (r): r is PromiseRejectedResult => r.status === 'rejected' + ) + .forEach((r) => { console.log(competitionId, 'WEBHOOK REJECTED', r.reason); }); }); @@ -93,9 +95,11 @@ export const startActivities: MutationResolvers['startActivities'] = res.filter((r) => r.status === 'fulfilled').length, 'webhooks' ); - ( - res.filter((r) => r.status === 'rejected') as PromiseRejectedResult[] - ).forEach((r) => { + res + .filter( + (r): r is PromiseRejectedResult => r.status === 'rejected' + ) + .forEach((r) => { console.log(competitionId, 'WEBHOOK REJECTED', r.reason); }); }); diff --git a/packages/server/package.json b/packages/server/package.json index 4099e13..72e16d5 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -9,6 +9,7 @@ "prestart": "yarn prisma:generate && yarn prisma:migrate", "start": "yarn prisma:migrate && ts-node index.ts", "lint": "eslint ./", + "typecheck": "tsc --noEmit -p tsconfig.json", "prisma:migrate": "prisma migrate deploy", "prisma:migrate:dev": "prisma migrate dev", "prisma:generate": "prisma generate", @@ -28,7 +29,7 @@ "@types/graphql": "^14.5.0", "@types/jsonwebtoken": "^8.5.9", "@types/morgan": "^1.9.3", - "@types/node": "^18.11.3", + "@types/node": "^18.19.130", "@types/node-schedule": "^2.1.7", "@types/ws": "^8.5.3", "@wca/helpers": "^1.1.7", @@ -46,9 +47,9 @@ "morgan": "^1.10.1", "node-fetch": "2", "node-schedule": "^2.1.1", - "prisma": "^4.6.1", + "prisma": "^4.8.1", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.9.3", "ws": "^8.19.0" }, "devDependencies": { @@ -56,16 +57,15 @@ "@graphql-codegen/introspection": "2.2.1", "@graphql-codegen/typescript": "2.7.5", "@graphql-codegen/typescript-resolvers": "2.7.5", - "@typescript-eslint/eslint-plugin": "^5.40.1", - "@typescript-eslint/parser": "^5.40.1", - "concurrently": "^7.5.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "concurrently": "^7.6.0", "eslint": "^8.25.0", "eslint-config-prettier": "^8.5.0", "eslint-config-standard-with-typescript": "^23.0.0", "eslint-plugin-import": "^2.25.2", "eslint-plugin-n": "^15.0.0", "eslint-plugin-promise": "^6.0.0", - "nodemon": "^2.0.20", - "typescript": "*" + "nodemon": "^2.0.20" } } diff --git a/packages/webapp/package.json b/packages/webapp/package.json index fc3bdfd..714a80f 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -5,6 +5,7 @@ "type": "module", "scripts": { "dev": "vite --host", + "typecheck": "tsc --noEmit", "build": "tsc && vite build", "preview": "vite preview" }, @@ -16,9 +17,6 @@ "@mui/material": "^5.14.18", "@notifycomp/frontend-common": "0.0.1", "@tanstack/react-query": "^4.43.0", - "@types/date-fns": "^2.6.0", - "@types/pluralize": "^0.0.29", - "@types/react-flag-icon-css": "^1.0.5", "@wca/helpers": "^1.1.7", "date-fns": "^2.29.3", "graphql": "^16.13.1", @@ -34,9 +32,10 @@ "devDependencies": { "@types/pluralize": "^0.0.29", "@types/react": "^18.3.28", - "@types/react-dom": "^18.0.9", + "@types/react-dom": "^18.3.7", + "@types/react-flag-icon-css": "^1.0.5", "@vitejs/plugin-react": "^3.1.0", - "typescript": "^4.9.3", + "typescript": "^5.9.3", "vite": "^4.0.0", "vite-plugin-pwa": "^0.17.2" } diff --git a/packages/webapp/vite.config.ts b/packages/webapp/vite.config.ts index b035fc8..939bbd1 100644 --- a/packages/webapp/vite.config.ts +++ b/packages/webapp/vite.config.ts @@ -1,9 +1,24 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import { VitePWA } from 'vite-plugin-pwa'; +import { createManualChunks } from '../../tools/vite/manualChunks'; // https://vitejs.dev/config/ export default defineConfig({ + build: { + rollupOptions: { + output: { + manualChunks: createManualChunks({ + react: ['react', 'react-dom', 'react-router', 'react-router-dom'], + query: ['@tanstack'], + apollo: ['@apollo', 'graphql', 'graphql-ws'], + mui: ['@mui', '@emotion', 'notistack', 'material-ui-confirm'], + utils: ['date-fns', 'pluralize'], + flags: ['react-flag-icon-css'], + }), + }, + }, + }, plugins: [react(), VitePWA({ registerType: 'autoUpdate', devOptions: { enabled: true diff --git a/packages/www/package.json b/packages/www/package.json index a97a81f..00ddd1f 100644 --- a/packages/www/package.json +++ b/packages/www/package.json @@ -4,24 +4,23 @@ "type": "module", "scripts": { "dev": "vite", + "typecheck": "tsc --noEmit", "build": "tsc && vite build", "preview": "vite preview", "test": "jest" }, "dependencies": { "@apollo/client": "^3.14.1", - "@quixo3/prisma-session-store": "^3.1.19", "@notifycomp/frontend-common": "0.0.1", + "@quixo3/prisma-session-store": "^3.1.19", "@tanstack/react-query": "^4.43.0", "@wca/helpers": "^1.1.7", "apollo-link-scalars": "^4.0.1", - "babel-jest": "^29.3.1", "bulma": "^0.9.4", "bulma-list": "^1.2.0", "graphql": "^16.13.1", "graphql-scalars": "^1.25.0", "graphql-ws": "^5.11.2", - "jest": "^29.3.1", "notistack": "^2.0.8", "react": "^18.2.0", "react-bulma-components": "^4.1.0", @@ -30,8 +29,7 @@ "react-phone-number-input": "^3.4.16", "react-router-dom": "^6.30.3", "react-spinners": "^0.13.7", - "styled-components": "^5.3.6", - "ts-jest": "^29.0.5" + "styled-components": "^5.3.6" }, "devDependencies": { "@babel/core": "^7.29.0", @@ -44,7 +42,7 @@ "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.2.5", "@types/react": "^18.3.28", - "@types/react-dom": "^18.0.9", + "@types/react-dom": "^18.3.7", "@types/styled-components": "^5.1.26", "@vitejs/plugin-react": "^3.1.0", "autoprefixer": "^10.4.27", @@ -60,7 +58,8 @@ "postcss": "^8.5.8", "react-test-renderer": "^18.2.0", "tailwindcss": "^3.4.19", - "typescript": "^4.9.3", + "ts-jest": "^29.0.5", + "typescript": "^5.9.3", "vite": "^4.0.0" }, "jest": { diff --git a/packages/www/vite.config.ts b/packages/www/vite.config.ts index 627a319..e0afb66 100644 --- a/packages/www/vite.config.ts +++ b/packages/www/vite.config.ts @@ -1,7 +1,20 @@ import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; +import { createManualChunks } from '../../tools/vite/manualChunks'; // https://vitejs.dev/config/ export default defineConfig({ + build: { + rollupOptions: { + output: { + manualChunks: createManualChunks({ + react: ['react', 'react-dom', 'react-router', 'react-router-dom'], + query: ['@tanstack'], + apollo: ['@apollo', 'graphql', 'graphql-ws', 'apollo-link-scalars'], + ui: ['notistack', 'styled-components', 'react-bulma-components', 'react-phone-number-input', 'react-spinners'], + }), + }, + }, + }, plugins: [react()], }); diff --git a/tools/vite/manualChunks.ts b/tools/vite/manualChunks.ts new file mode 100644 index 0000000..0940382 --- /dev/null +++ b/tools/vite/manualChunks.ts @@ -0,0 +1,21 @@ +type ChunkGroup = Record; + +function includesPackage(id: string, packageName: string): boolean { + return id.includes(`/node_modules/${packageName}/`) || id.includes(`\\node_modules\\${packageName}\\`); +} + +export function createManualChunks(groups: ChunkGroup) { + return function manualChunks(id: string): string | undefined { + if (!id.includes('node_modules')) { + return undefined; + } + + for (const [chunkName, packageNames] of Object.entries(groups)) { + if (packageNames.some((packageName) => includesPackage(id, packageName))) { + return chunkName; + } + } + + return 'vendor'; + }; +} diff --git a/yarn.lock b/yarn.lock index b1123ab..630e9ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4082,13 +4082,6 @@ resolved "https://registry.yarnpkg.com/@types/cors/-/cors-2.8.12.tgz#6b2c510a7ad7039e98e7b8d3d6598f4359e5c080" integrity sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw== -"@types/date-fns@^2.6.0": - version "2.6.3" - resolved "https://registry.yarnpkg.com/@types/date-fns/-/date-fns-2.6.3.tgz#70c8a9563fb8cd353eaae14265b365b6bbd46a20" - integrity sha512-Ke1lw2Ni1t/wMUoLtKFmSNCLozcTBd6vmMqFP4hRzXn6qzkNt97bPAX0x5Y/c15DP43kKvwW1ycStD5+43jVQA== - dependencies: - date-fns "*" - "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -4317,10 +4310,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^18.11.3": - version "18.19.100" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.100.tgz#7f3aefbb6911099ab7e0902a1f373b1a4d2c1947" - integrity sha512-ojmMP8SZBKprc3qGrGk8Ujpo80AXkrP7G2tOT4VWr5jlr5DHjsJF+emXJz+Wm0glmy4Js62oKMdZZ6B9Y+tEcA== +"@types/node@^18.19.130": + version "18.19.130" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.130.tgz#da4c6324793a79defb7a62cba3947ec5add00d59" + integrity sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg== dependencies: undici-types "~5.26.4" @@ -4354,7 +4347,7 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== -"@types/react-dom@^18.0.0", "@types/react-dom@^18.0.9": +"@types/react-dom@^18.0.0", "@types/react-dom@^18.3.7": version "18.3.7" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.7.tgz#b89ddf2cd83b4feafcc4e2ea41afdfb95a0d194f" integrity sha512-MEe3UeoENYVFXzoXEWsvcpg6ZvlrFNlOQ7EOsvhI3CfAXwzPfO8Qwuxd40nepsYKqyyVQnTdEfv68q91yLcKrQ== @@ -4481,7 +4474,7 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== -"@typescript-eslint/eslint-plugin@^5.40.1": +"@typescript-eslint/eslint-plugin@^5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== @@ -4497,7 +4490,7 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.40.1": +"@typescript-eslint/parser@^5.0.0", "@typescript-eslint/parser@^5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== @@ -6084,7 +6077,7 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" -concurrently@^7.5.0, concurrently@^7.6.0: +concurrently@^7.6.0: version "7.6.0" resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.6.0.tgz#531a6f5f30cf616f355a4afb8f8fcb2bba65a49a" integrity sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw== @@ -6491,11 +6484,6 @@ dataloader@^2.2.2: resolved "https://registry.yarnpkg.com/dataloader/-/dataloader-2.2.3.tgz#42d10b4913515f5b37c6acedcb4960d6ae1b1517" integrity sha512-y2krtASINtPFS1rSDjacrFgn1dcUuoREVabwlOGOe4SdxenREqwjwjElAdwvbGM7kgZz9a3KVicWR7vcz8rnzA== -date-fns@*: - version "4.1.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-4.1.0.tgz#64b3d83fff5aa80438f5b1a633c2e83b8a1c2d14" - integrity sha512-Ukq0owbQXxa/U3EGtsdVBkR1w7KOQ5gIBqdH2hkvknzZPYvBxb/aa6E8L7tmjFtkwZBu3UXBbjIgPo/Ez4xaNg== - date-fns@^2.29.1, date-fns@^2.29.3: version "2.30.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" @@ -11632,7 +11620,7 @@ pretty-format@^29.0.0, pretty-format@^29.7.0: ansi-styles "^5.0.0" react-is "^18.0.0" -prisma@^4.6.1, prisma@^4.8.1: +prisma@^4.8.1: version "4.16.2" resolved "https://registry.yarnpkg.com/prisma/-/prisma-4.16.2.tgz#469e0a0991c6ae5bcde289401726bb012253339e" integrity sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g== @@ -13749,11 +13737,16 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -"typescript@^3 || ^4", typescript@^4.8.4, typescript@^4.9.3, typescript@^4.9.4: +"typescript@^3 || ^4": version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5.9.3: + version "5.9.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f" + integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw== + ua-parser-js@^1.0.35: version "1.0.40" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.40.tgz#ac6aff4fd8ea3e794a6aa743ec9c2fc29e75b675" From 35d380b53d86acb19d4a414f4f18932b5d89cc46 Mon Sep 17 00:00:00 2001 From: Cailyn Sinclair Date: Sat, 21 Mar 2026 10:50:00 -0700 Subject: [PATCH 2/4] Standardize repo on Node 20 --- .github/workflows/quality.yml | 5 +++++ .node-version | 1 + package.json | 3 +++ packages/admin/package.json | 3 +++ packages/notifapi/package.json | 3 +++ packages/projector/package.json | 3 +++ packages/server/package.json | 3 +++ packages/webapp/package.json | 3 +++ packages/www/package.json | 3 +++ 9 files changed, 27 insertions(+) create mode 100644 .node-version diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index d5cdae9..49c3ce4 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -23,6 +23,11 @@ jobs: - name: Install dependencies run: yarn install --frozen-lockfile + - name: Generate Prisma clients + run: | + yarn workspace api prisma:generate + yarn workspace notifapi prisma:generate + - name: Lint run: yarn lint diff --git a/.node-version b/.node-version new file mode 100644 index 0000000..5bd6811 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20.19.0 diff --git a/package.json b/package.json index 38c587d..c009a2f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "notifycomp", "private": true, + "engines": { + "node": ">=20 <21" + }, "workspaces": [ "packages/*" ], diff --git a/packages/admin/package.json b/packages/admin/package.json index 33f571b..cad5b81 100644 --- a/packages/admin/package.json +++ b/packages/admin/package.json @@ -3,6 +3,9 @@ "private": true, "version": "0.0.0", "type": "module", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "vite", "typecheck": "tsc --noEmit", diff --git a/packages/notifapi/package.json b/packages/notifapi/package.json index 761081c..103fd15 100644 --- a/packages/notifapi/package.json +++ b/packages/notifapi/package.json @@ -4,6 +4,9 @@ "main": "index.js", "license": "MIT", "description": "Notification backend for notify comp infra", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "concurrently \"yarn prisma:generate:watch\" \"NODE_ENV=development nodemon index.ts\"", "prestart": "yarn prisma:generate && yarn prisma:migrate", diff --git a/packages/projector/package.json b/packages/projector/package.json index 3b8f0d3..09b507f 100644 --- a/packages/projector/package.json +++ b/packages/projector/package.json @@ -3,6 +3,9 @@ "private": true, "version": "0.0.0", "type": "module", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "vite", "typecheck": "tsc --noEmit", diff --git a/packages/server/package.json b/packages/server/package.json index 72e16d5..7833385 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -4,6 +4,9 @@ "main": "index.ts", "license": "MIT", "description": "Core api for notify comp infra", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "concurrently \"yarn prisma:generate:watch\" \"yarn graphql:generate:watch\" \"NODE_ENV=development nodemon index.ts\"", "prestart": "yarn prisma:generate && yarn prisma:migrate", diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 714a80f..dea2d2e 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -3,6 +3,9 @@ "private": true, "version": "0.0.0", "type": "module", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "vite --host", "typecheck": "tsc --noEmit", diff --git a/packages/www/package.json b/packages/www/package.json index 00ddd1f..4f600a3 100644 --- a/packages/www/package.json +++ b/packages/www/package.json @@ -2,6 +2,9 @@ "name": "www", "version": "0.0.0", "type": "module", + "engines": { + "node": ">=20 <21" + }, "scripts": { "dev": "vite", "typecheck": "tsc --noEmit", From 84b8ff4dad0b4da580cb3d2ad9c8896ea8f07ee2 Mon Sep 17 00:00:00 2001 From: Cailyn Sinclair Date: Mon, 11 May 2026 15:26:44 -0700 Subject: [PATCH 3/4] Clean up CompetitionGroups push notifications --- .gitignore | 7 +- README.md | 23 ++++++ package.json | 2 +- packages/notifapi/package.json | 2 +- packages/notifapi/server.ts | 8 +- .../notifapi/test/assignmentSnapshots.test.js | 58 +++++++++++++ .../test/competitionGroupsToken.test.js | 81 +++++++++++++++++++ packages/server/.env.development | 6 -- packages/webapp/.env.development | 2 - 9 files changed, 172 insertions(+), 17 deletions(-) create mode 100644 packages/notifapi/test/assignmentSnapshots.test.js create mode 100644 packages/notifapi/test/competitionGroupsToken.test.js delete mode 100644 packages/server/.env.development delete mode 100644 packages/webapp/.env.development diff --git a/.gitignore b/.gitignore index d3772f3..1f21084 100644 --- a/.gitignore +++ b/.gitignore @@ -68,9 +68,10 @@ typings/ # Yarn Integrity file .yarn-integrity -# dotenv environment variables file -.env.test -.env.production +# dotenv environment variables files +.env +.env.* +!.env.example # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/README.md b/README.md index a763755..38d7159 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,29 @@ This is the service that handles text notifications to individual people. Users This service is pinged from the core server to send the notifications. +It also exposes the CompetitionGroups push-notification bridge under `/v0/external/push`. +That integration lets competitiongroups.com register browser Push API subscriptions +and lets notifapi poll WCIF assignment changes for those watched users. + +Required push-notification environment variables: + +- `VAPID_PUBLIC_KEY`: public VAPID key returned to competitiongroups.com. +- `VAPID_PRIVATE_KEY`: private VAPID key used to send browser push messages. +- `COMPETITION_GROUPS_JWT_SECRET`: shared HS256 secret used to authenticate + CompetitionGroups subscription requests. + +Optional push-notification environment variables: + +- `ASSIGNMENT_PUSH_ENABLED`: set to `true` on the single notifapi instance that + should poll WCIF and send assignment-change pushes. +- `ASSIGNMENT_POLL_INTERVAL_MS`: poll interval in milliseconds. Defaults to + `300000`. +- `VAPID_SUBJECT`: VAPID contact subject. Defaults to + `mailto:notifications@example.com`. +- `COMPETITION_GROUPS_JWT_ISSUER`: expected `iss` claim when configured. +- `COMPETITION_GROUPS_JWT_AUDIENCE`: expected `aud` claim when configured. +- `COMPETITION_GROUPS_ORIGIN`: origin used when building notification click URLs. + ### `packages/www` This is the main frontend that users interact with to sign up for notifications. This site is very simple and just helps with competition discovery, authenticating user's phone numbers, and gives users a way to sign up for competitors as well as additional activities. diff --git a/package.json b/package.json index c009a2f..c3b31c5 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "dev:projector": "lerna run dev --scope projector", "dev:admin": "lerna run dev --scope admin", "start:api": "lerna run start --scope api", - "start:notifapi": "notifapi--scope api" + "start:notifapi": "lerna run start --scope notifapi" }, "packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72" } diff --git a/packages/notifapi/package.json b/packages/notifapi/package.json index 967092e..ff407c6 100644 --- a/packages/notifapi/package.json +++ b/packages/notifapi/package.json @@ -13,7 +13,7 @@ "start": "ts-node index.ts", "lint": "eslint ./", "typecheck": "tsc --noEmit -p tsconfig.json", - "test": "echo \"Error: no test specified\" && exit 1", + "test": "node --test -r ts-node/register test", "prisma:migrate": "prisma migrate deploy", "prisma:migrate:dev": "prisma migrate dev", "prisma:generate": "prisma generate", diff --git a/packages/notifapi/server.ts b/packages/notifapi/server.ts index 9b7d025..b89c3eb 100644 --- a/packages/notifapi/server.ts +++ b/packages/notifapi/server.ts @@ -71,8 +71,6 @@ export async function init() { } ); - app.use('/v0/external', external); - logger.info( `Allowing the following origins: ${ process.env.CORS_ORIGINS?.split(',')?.join(', ') ?? 'none' @@ -80,13 +78,15 @@ export async function init() { ); app.use( cors({ - allowedHeaders: 'Content-Type', + allowedHeaders: ['Authorization', 'Content-Type'], origin: process.env.CORS_ORIGINS?.split(','), - preflightContinue: true, + preflightContinue: false, credentials: true, }) ); + app.use('/v0/external', external); + app.set('trust proxy', 1); // trust first proxy app.use(cookieParser(SECRET)); diff --git a/packages/notifapi/test/assignmentSnapshots.test.js b/packages/notifapi/test/assignmentSnapshots.test.js new file mode 100644 index 0000000..fde5dc6 --- /dev/null +++ b/packages/notifapi/test/assignmentSnapshots.test.js @@ -0,0 +1,58 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const assert = require('node:assert/strict'); +const test = require('node:test'); + +const { + createAssignmentSnapshot, + hashAssignments, +} = require('../lib/assignmentSnapshots'); + +test('hashAssignments is stable when assignment object keys are reordered', () => { + const first = [ + { + activityId: 123, + assignmentCode: 'competitor', + stationNumber: 4, + }, + ]; + const second = [ + { + stationNumber: 4, + assignmentCode: 'competitor', + activityId: 123, + }, + ]; + + assert.equal(hashAssignments(first), hashAssignments(second)); +}); + +test('createAssignmentSnapshot returns the watched user assignment hash', () => { + const wcif = { + id: 'ExampleOpen2026', + persons: [ + { + wcaUserId: 12, + assignments: [{ activityId: 1, assignmentCode: 'staff-judge' }], + }, + { + wcaUserId: 34, + assignments: [{ activityId: 2, assignmentCode: 'competitor' }], + }, + ], + }; + + assert.deepEqual(createAssignmentSnapshot(wcif, 34), { + competitionId: 'ExampleOpen2026', + wcaUserId: 34, + assignmentsHash: hashAssignments([ + { activityId: 2, assignmentCode: 'competitor' }, + ]), + }); +}); + +test('createAssignmentSnapshot returns null when the watched user is absent', () => { + assert.equal( + createAssignmentSnapshot({ id: 'ExampleOpen2026', persons: [] }, 34), + null + ); +}); diff --git a/packages/notifapi/test/competitionGroupsToken.test.js b/packages/notifapi/test/competitionGroupsToken.test.js new file mode 100644 index 0000000..a9aa365 --- /dev/null +++ b/packages/notifapi/test/competitionGroupsToken.test.js @@ -0,0 +1,81 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +const assert = require('node:assert/strict'); +const { createHmac } = require('node:crypto'); +const test = require('node:test'); + +const { + verifyCompetitionGroupsToken, +} = require('../lib/competitionGroupsToken'); + +const originalEnv = { ...process.env }; + +const base64UrlJson = (value) => + Buffer.from(JSON.stringify(value)).toString('base64url'); + +const createToken = (payload, secret = 'test-secret') => { + const encodedHeader = base64UrlJson({ alg: 'HS256', typ: 'JWT' }); + const encodedPayload = base64UrlJson(payload); + const signature = createHmac('sha256', secret) + .update(`${encodedHeader}.${encodedPayload}`) + .digest('base64url'); + + return `${encodedHeader}.${encodedPayload}.${signature}`; +}; + +test.afterEach(() => { + process.env = { ...originalEnv }; +}); + +test('verifyCompetitionGroupsToken returns valid claims', () => { + process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; + process.env.COMPETITION_GROUPS_JWT_ISSUER = 'competitiongroups.com'; + process.env.COMPETITION_GROUPS_JWT_AUDIENCE = 'notifycomp'; + + const exp = Math.floor(Date.now() / 1000) + 60; + const token = createToken({ + sub: 'competitiongroups:user:123', + iss: 'competitiongroups.com', + aud: ['notifycomp'], + exp, + wcaUserIds: [123, 456], + }); + + assert.deepEqual(verifyCompetitionGroupsToken(token), { + sub: 'competitiongroups:user:123', + iss: 'competitiongroups.com', + aud: ['notifycomp'], + exp, + wcaUserIds: [123, 456], + }); +}); + +test('verifyCompetitionGroupsToken rejects invalid signatures', () => { + process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; + const token = createToken( + { + sub: 'competitiongroups:user:123', + wcaUserIds: [123], + }, + 'wrong-secret' + ); + + assert.throws( + () => verifyCompetitionGroupsToken(token), + /Invalid token signature/ + ); +}); + +test('verifyCompetitionGroupsToken rejects unauthorized audiences', () => { + process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; + process.env.COMPETITION_GROUPS_JWT_AUDIENCE = 'notifycomp'; + const token = createToken({ + sub: 'competitiongroups:user:123', + aud: 'other-service', + wcaUserIds: [123], + }); + + assert.throws( + () => verifyCompetitionGroupsToken(token), + /Invalid token audience/ + ); +}); diff --git a/packages/server/.env.development b/packages/server/.env.development deleted file mode 100644 index 6fbc37a..0000000 --- a/packages/server/.env.development +++ /dev/null @@ -1,6 +0,0 @@ -DATABASE_URL=postgresql://username:password@localhost:5432/live_competition_group_tracker - -WCA_ORIGIN=https://staging.worldcubeassociation.org -CLIENT_ID=example-application-id -CLIENT_SECRET=example-secret -REDIRECT_URI=http://localhost:8080/auth/wca/callback diff --git a/packages/webapp/.env.development b/packages/webapp/.env.development deleted file mode 100644 index 7008602..0000000 --- a/packages/webapp/.env.development +++ /dev/null @@ -1,2 +0,0 @@ -VITE_API_ORIGIN=http://10.0.0.110:8080 -VITE_WCA_API_ORIGIN=https://staging.worldcubeassociation.org From 02b276af2a0f525fcc7e3613ccd4f0f49c871cda Mon Sep 17 00:00:00 2001 From: Cailyn Sinclair Date: Mon, 11 May 2026 15:50:12 -0700 Subject: [PATCH 4/4] Move CompetitionGroups push notifications to server --- README.md | 46 +- packages/notifapi/package.json | 4 +- .../prisma/generated/client/index-browser.js | 73 - .../prisma/generated/client/index.d.ts | 9133 +++-------------- .../notifapi/prisma/generated/client/index.js | 75 +- .../prisma/generated/client/schema.prisma | 70 - packages/notifapi/prisma/schema.prisma | 70 - packages/notifapi/routes/v0/external/index.ts | 2 - packages/notifapi/server.ts | 2 - .../notifapi/test/assignmentSnapshots.test.js | 58 - .../test/competitionGroupsToken.test.js | 81 - .../controllers/pushSubscriptions.ts | 0 .../lib/assignmentSnapshots.ts | 0 .../lib/competitionGroupsToken.ts | 2 +- .../middlewares/competitionGroupsAuth.ts | 0 packages/server/package.json | 2 + .../migration.sql | 0 packages/server/prisma/schema.prisma | 70 + .../routes/v0/external/push.ts | 0 packages/server/server.ts | 4 + .../services/assignmentNotificationWorker.ts | 5 +- .../{notifapi => server}/services/wcif.ts | 0 .../{notifapi => server}/services/webPush.ts | 3 +- packages/server/types/express.d.ts | 1 + 24 files changed, 1751 insertions(+), 7950 deletions(-) delete mode 100644 packages/notifapi/test/assignmentSnapshots.test.js delete mode 100644 packages/notifapi/test/competitionGroupsToken.test.js rename packages/{notifapi => server}/controllers/pushSubscriptions.ts (100%) rename packages/{notifapi => server}/lib/assignmentSnapshots.ts (100%) rename packages/{notifapi => server}/lib/competitionGroupsToken.ts (97%) rename packages/{notifapi => server}/middlewares/competitionGroupsAuth.ts (100%) rename packages/{notifapi/prisma/migrations/20260511190000_assignment_push_notifications => server/prisma/migrations/20260511224500_assignment_push_notifications}/migration.sql (100%) rename packages/{notifapi => server}/routes/v0/external/push.ts (100%) rename packages/{notifapi => server}/services/assignmentNotificationWorker.ts (97%) rename packages/{notifapi => server}/services/wcif.ts (100%) rename packages/{notifapi => server}/services/webPush.ts (96%) diff --git a/README.md b/README.md index 38d7159..0923c1c 100644 --- a/README.md +++ b/README.md @@ -15,27 +15,11 @@ A spec for the webhooks will be well communicated once finalized so that anyone - [Database schema](./packages/server/prisma/schema.prisma) - [Graphql schema](./packages/server/graphql/schema) -The question should be asked: How does the server know who is in what group? The main answer to this is through the [WCIF](https://github.com/thewca/wcif/blob/master/specification.md). But the other question is does this data get saved? -**An argument for saving the data in databases**: potentially faster, could cache, only retreive the data you need. -**Arguments for not saving it**: If changes are made, removes the need to reimport a competition. - -Now, a "webhook" application could manage this problem on it's own. We can send as little as just the competitionId and the activityId to a webhook application, and it should be able to look up in it's own cache or retreive the WCIF to determine who is in the group. This offloads resources from the main server onto all of the consumer ones. For ones I prebuild, this could be just fine if they all reuse the same database tables. A webhook application would likely already need a database to keep track of wca users and their communication channel identifiers. -Alternatively: The main server can cache this information and have a standarized method to communicate the competitionId, list of people and their assignments to the webhook server and the webhook server wouldn't need to lookup much more. The webhook server can also be a consumer of the graphql api to ask for a specific subset of information of the competition when needed thus avoiding consuming too much of the WCA website's resources. -I leave this problem still unsolved. - -### `packages/webapp` - -This is the main app that competition owners will interact with. This is a material-UI app that talks directly to the main server (packages/server) - -### `packages/notifapi` - -This is the service that handles text notifications to individual people. Users sign up via a frontend and it saves the data here. - -This service is pinged from the core server to send the notifications. - -It also exposes the CompetitionGroups push-notification bridge under `/v0/external/push`. -That integration lets competitiongroups.com register browser Push API subscriptions -and lets notifapi poll WCIF assignment changes for those watched users. +This service also exposes the CompetitionGroups push-notification bridge under +`/v0/external/push`. In production this is routed through +`https://api.notifycomp.com/api/v0/external/push`. That integration lets +competitiongroups.com register browser Push API subscriptions and lets the +server poll WCIF assignment changes for those watched users. Required push-notification environment variables: @@ -46,7 +30,7 @@ Required push-notification environment variables: Optional push-notification environment variables: -- `ASSIGNMENT_PUSH_ENABLED`: set to `true` on the single notifapi instance that +- `ASSIGNMENT_PUSH_ENABLED`: set to `true` on the single backend instance that should poll WCIF and send assignment-change pushes. - `ASSIGNMENT_POLL_INTERVAL_MS`: poll interval in milliseconds. Defaults to `300000`. @@ -56,6 +40,24 @@ Optional push-notification environment variables: - `COMPETITION_GROUPS_JWT_AUDIENCE`: expected `aud` claim when configured. - `COMPETITION_GROUPS_ORIGIN`: origin used when building notification click URLs. +The question should be asked: How does the server know who is in what group? The main answer to this is through the [WCIF](https://github.com/thewca/wcif/blob/master/specification.md). But the other question is does this data get saved? +**An argument for saving the data in databases**: potentially faster, could cache, only retreive the data you need. +**Arguments for not saving it**: If changes are made, removes the need to reimport a competition. + +Now, a "webhook" application could manage this problem on it's own. We can send as little as just the competitionId and the activityId to a webhook application, and it should be able to look up in it's own cache or retreive the WCIF to determine who is in the group. This offloads resources from the main server onto all of the consumer ones. For ones I prebuild, this could be just fine if they all reuse the same database tables. A webhook application would likely already need a database to keep track of wca users and their communication channel identifiers. +Alternatively: The main server can cache this information and have a standarized method to communicate the competitionId, list of people and their assignments to the webhook server and the webhook server wouldn't need to lookup much more. The webhook server can also be a consumer of the graphql api to ask for a specific subset of information of the competition when needed thus avoiding consuming too much of the WCA website's resources. +I leave this problem still unsolved. + +### `packages/webapp` + +This is the main app that competition owners will interact with. This is a material-UI app that talks directly to the main server (packages/server) + +### `packages/notifapi` + +This is the service that handles text notifications to individual people. Users sign up via a frontend and it saves the data here. + +This service is pinged from the core server to send the notifications. + ### `packages/www` This is the main frontend that users interact with to sign up for notifications. This site is very simple and just helps with competition discovery, authenticating user's phone numbers, and gives users a way to sign up for competitors as well as additional activities. diff --git a/packages/notifapi/package.json b/packages/notifapi/package.json index ff407c6..103fd15 100644 --- a/packages/notifapi/package.json +++ b/packages/notifapi/package.json @@ -13,7 +13,7 @@ "start": "ts-node index.ts", "lint": "eslint ./", "typecheck": "tsc --noEmit -p tsconfig.json", - "test": "node --test -r ts-node/register test", + "test": "echo \"Error: no test specified\" && exit 1", "prisma:migrate": "prisma migrate deploy", "prisma:migrate:dev": "prisma migrate dev", "prisma:generate": "prisma generate", @@ -23,7 +23,6 @@ "@notifycomp/frontend-common": "^0.0.1", "@types/cookie-parser": "^1.4.3", "@types/express-session": "^1.17.5", - "@types/web-push": "^3.6.4", "@wca/helpers": "^1.1.7", "body-parser": "^1.20.4", "cookie-parser": "^1.4.6", @@ -39,7 +38,6 @@ "ts-node": "^10.9.1", "twilio": "^3.84.1", "typescript": "^5.9.3", - "web-push": "^3.6.7", "winston": "^3.8.2" }, "devDependencies": { diff --git a/packages/notifapi/prisma/generated/client/index-browser.js b/packages/notifapi/prisma/generated/client/index-browser.js index 978c807..e0b86f9 100644 --- a/packages/notifapi/prisma/generated/client/index-browser.js +++ b/packages/notifapi/prisma/generated/client/index-browser.js @@ -119,48 +119,6 @@ exports.Prisma.UserScalarFieldEnum = { phoneNumber: 'phoneNumber' }; -exports.Prisma.PushSubscriptionScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - endpoint: 'endpoint', - p256dh: 'p256dh', - auth: 'auth', - source: 'source', - externalSubject: 'externalSubject', - disabledAt: 'disabledAt' -}; - -exports.Prisma.AssignmentWatchScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId' -}; - -exports.Prisma.AssignmentSnapshotScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - assignmentsHash: 'assignmentsHash' -}; - -exports.Prisma.PushDeliveryScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - dedupeKey: 'dedupeKey', - status: 'status', - error: 'error' -}; - exports.Prisma.SessionScalarFieldEnum = { id: 'id', sid: 'sid', @@ -200,37 +158,10 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.NullableJsonNullValueInput = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull -}; - exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' }; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - -exports.Prisma.JsonNullValueFilter = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull, - AnyNull: Prisma.AnyNull -}; -exports.PushSubscriptionSource = { - competitiongroups: 'competitiongroups' -}; - -exports.PushDeliveryStatus = { - pending: 'pending', - sent: 'sent', - failed: 'failed', - skipped: 'skipped' -}; - exports.CompetitionSubscriptionType = { activity: 'activity', competitor: 'competitor' @@ -239,10 +170,6 @@ exports.CompetitionSubscriptionType = { exports.Prisma.ModelName = { AuditLog: 'AuditLog', User: 'User', - PushSubscription: 'PushSubscription', - AssignmentWatch: 'AssignmentWatch', - AssignmentSnapshot: 'AssignmentSnapshot', - PushDelivery: 'PushDelivery', Session: 'Session', CompetitionSubscription: 'CompetitionSubscription', CompetitorSubscription: 'CompetitorSubscription', diff --git a/packages/notifapi/prisma/generated/client/index.d.ts b/packages/notifapi/prisma/generated/client/index.d.ts index d6ce70b..dc1db27 100644 --- a/packages/notifapi/prisma/generated/client/index.d.ts +++ b/packages/notifapi/prisma/generated/client/index.d.ts @@ -30,7 +30,7 @@ export type AuditLogPayload export type UserPayload = { @@ -49,98 +49,9 @@ export type UserPayload -export type PushSubscriptionPayload = { - name: "PushSubscription" - objects: { - watches: AssignmentWatchPayload[] - deliveries: PushDeliveryPayload[] - } - scalars: $Extensions.GetResult<{ - id: number - createdAt: Date - updatedAt: Date - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt: Date | null - }, ExtArgs["result"]["pushSubscription"]> - composites: {} -} - -/** - * Model PushSubscription - * - */ -export type PushSubscription = runtime.Types.DefaultSelection -export type AssignmentWatchPayload = { - name: "AssignmentWatch" - objects: { - pushSubscription: PushSubscriptionPayload - } - scalars: $Extensions.GetResult<{ - id: number - createdAt: Date - updatedAt: Date - pushSubscriptionId: number - competitionId: string - wcaUserId: number - }, ExtArgs["result"]["assignmentWatch"]> - composites: {} -} - -/** - * Model AssignmentWatch - * - */ -export type AssignmentWatch = runtime.Types.DefaultSelection -export type AssignmentSnapshotPayload = { - name: "AssignmentSnapshot" - objects: {} - scalars: $Extensions.GetResult<{ - id: number - createdAt: Date - updatedAt: Date - competitionId: string - wcaUserId: number - assignmentsHash: string - }, ExtArgs["result"]["assignmentSnapshot"]> - composites: {} -} - -/** - * Model AssignmentSnapshot - * - */ -export type AssignmentSnapshot = runtime.Types.DefaultSelection -export type PushDeliveryPayload = { - name: "PushDelivery" - objects: { - pushSubscription: PushSubscriptionPayload - } - scalars: $Extensions.GetResult<{ - id: number - createdAt: Date - updatedAt: Date - pushSubscriptionId: number - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error: Prisma.JsonValue | null - }, ExtArgs["result"]["pushDelivery"]> - composites: {} -} - -/** - * Model PushDelivery - * - */ -export type PushDelivery = runtime.Types.DefaultSelection export type SessionPayload = { name: "Session" objects: {} @@ -155,7 +66,7 @@ export type SessionPayload export type CompetitionSubscriptionPayload = { @@ -177,7 +88,7 @@ export type CompetitionSubscriptionPayload export type CompetitorSubscriptionPayload = { @@ -199,7 +110,7 @@ export type CompetitorSubscriptionPayload export type CompetitionSidPayload = { @@ -216,7 +127,7 @@ export type CompetitionSidPayload @@ -224,23 +135,6 @@ export type CompetitionSid = runtime.Types.DefaultSelection(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; @@ -326,7 +220,7 @@ export class PrismaClient< * ``` * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') * ``` - * + * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; @@ -337,7 +231,7 @@ export class PrismaClient< * ``` * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` * ``` - * + * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; @@ -349,7 +243,7 @@ export class PrismaClient< * ``` * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') * ``` - * + * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; @@ -364,7 +258,7 @@ export class PrismaClient< * prisma.user.create({ data: { name: 'Alice' } }), * ]) * ``` - * + * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): Promise> @@ -394,46 +288,6 @@ export class PrismaClient< */ get user(): Prisma.UserDelegate; - /** - * `prisma.pushSubscription`: Exposes CRUD operations for the **PushSubscription** model. - * Example usage: - * ```ts - * // Fetch zero or more PushSubscriptions - * const pushSubscriptions = await prisma.pushSubscription.findMany() - * ``` - */ - get pushSubscription(): Prisma.PushSubscriptionDelegate; - - /** - * `prisma.assignmentWatch`: Exposes CRUD operations for the **AssignmentWatch** model. - * Example usage: - * ```ts - * // Fetch zero or more AssignmentWatches - * const assignmentWatches = await prisma.assignmentWatch.findMany() - * ``` - */ - get assignmentWatch(): Prisma.AssignmentWatchDelegate; - - /** - * `prisma.assignmentSnapshot`: Exposes CRUD operations for the **AssignmentSnapshot** model. - * Example usage: - * ```ts - * // Fetch zero or more AssignmentSnapshots - * const assignmentSnapshots = await prisma.assignmentSnapshot.findMany() - * ``` - */ - get assignmentSnapshot(): Prisma.AssignmentSnapshotDelegate; - - /** - * `prisma.pushDelivery`: Exposes CRUD operations for the **PushDelivery** model. - * Example usage: - * ```ts - * // Fetch zero or more PushDeliveries - * const pushDeliveries = await prisma.pushDelivery.findMany() - * ``` - */ - get pushDelivery(): Prisma.PushDeliveryDelegate; - /** * `prisma.session`: Exposes CRUD operations for the **Session** model. * Example usage: @@ -512,7 +366,7 @@ export namespace Prisma { export type DecimalJsLike = runtime.DecimalJsLike /** - * Metrics + * Metrics */ export type Metrics = runtime.Metrics export type Metric = runtime.Metric @@ -537,7 +391,7 @@ export namespace Prisma { client: string } - export const prismaVersion: PrismaVersion + export const prismaVersion: PrismaVersion /** * Utility Types @@ -546,7 +400,7 @@ export namespace Prisma { /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON object. - * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. + * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. */ export type JsonObject = {[Key in string]?: JsonValue} @@ -591,15 +445,15 @@ export namespace Prisma { /** * Types of the values used to represent different kinds of `null` values when working with JSON fields. - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ namespace NullTypes { /** * Type of `Prisma.DbNull`. - * + * * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class DbNull { @@ -609,9 +463,9 @@ export namespace Prisma { /** * Type of `Prisma.JsonNull`. - * + * * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class JsonNull { @@ -621,9 +475,9 @@ export namespace Prisma { /** * Type of `Prisma.AnyNull`. - * + * * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class AnyNull { @@ -634,21 +488,21 @@ export namespace Prisma { /** * Helper for filtering JSON entries that have `null` on the database (empty on the db) - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const DbNull: NullTypes.DbNull /** * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const JsonNull: NullTypes.JsonNull /** * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` - * + * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const AnyNull: NullTypes.AnyNull @@ -958,10 +812,6 @@ export namespace Prisma { export const ModelName: { AuditLog: 'AuditLog', User: 'User', - PushSubscription: 'PushSubscription', - AssignmentWatch: 'AssignmentWatch', - AssignmentSnapshot: 'AssignmentSnapshot', - PushDelivery: 'PushDelivery', Session: 'Session', CompetitionSubscription: 'CompetitionSubscription', CompetitorSubscription: 'CompetitorSubscription', @@ -982,7 +832,7 @@ export namespace Prisma { export type TypeMap = { meta: { - modelProps: 'auditLog' | 'user' | 'pushSubscription' | 'assignmentWatch' | 'assignmentSnapshot' | 'pushDelivery' | 'session' | 'competitionSubscription' | 'competitorSubscription' | 'competitionSid' + modelProps: 'auditLog' | 'user' | 'session' | 'competitionSubscription' | 'competitorSubscription' | 'competitionSid' txIsolationLevel: Prisma.TransactionIsolationLevel }, model: { @@ -1116,266 +966,6 @@ export namespace Prisma { } } } - PushSubscription: { - payload: PushSubscriptionPayload - operations: { - findUnique: { - args: Prisma.PushSubscriptionFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PushSubscriptionFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.PushSubscriptionFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PushSubscriptionFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.PushSubscriptionFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.PushSubscriptionCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.PushSubscriptionCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.PushSubscriptionDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.PushSubscriptionUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PushSubscriptionDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.PushSubscriptionUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.PushSubscriptionUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.PushSubscriptionAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.PushSubscriptionGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.PushSubscriptionCountArgs, - result: $Utils.Optional | number - } - } - } - AssignmentWatch: { - payload: AssignmentWatchPayload - operations: { - findUnique: { - args: Prisma.AssignmentWatchFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AssignmentWatchFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AssignmentWatchFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AssignmentWatchFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AssignmentWatchFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AssignmentWatchCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AssignmentWatchCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.AssignmentWatchDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AssignmentWatchUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AssignmentWatchDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.AssignmentWatchUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.AssignmentWatchUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AssignmentWatchAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.AssignmentWatchGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.AssignmentWatchCountArgs, - result: $Utils.Optional | number - } - } - } - AssignmentSnapshot: { - payload: AssignmentSnapshotPayload - operations: { - findUnique: { - args: Prisma.AssignmentSnapshotFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.AssignmentSnapshotFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.AssignmentSnapshotFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.AssignmentSnapshotFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.AssignmentSnapshotFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.AssignmentSnapshotCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.AssignmentSnapshotCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.AssignmentSnapshotDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.AssignmentSnapshotUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.AssignmentSnapshotDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.AssignmentSnapshotUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.AssignmentSnapshotUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.AssignmentSnapshotAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.AssignmentSnapshotGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.AssignmentSnapshotCountArgs, - result: $Utils.Optional | number - } - } - } - PushDelivery: { - payload: PushDeliveryPayload - operations: { - findUnique: { - args: Prisma.PushDeliveryFindUniqueArgs, - result: $Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PushDeliveryFindUniqueOrThrowArgs, - result: $Utils.PayloadToResult - } - findFirst: { - args: Prisma.PushDeliveryFindFirstArgs, - result: $Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PushDeliveryFindFirstOrThrowArgs, - result: $Utils.PayloadToResult - } - findMany: { - args: Prisma.PushDeliveryFindManyArgs, - result: $Utils.PayloadToResult[] - } - create: { - args: Prisma.PushDeliveryCreateArgs, - result: $Utils.PayloadToResult - } - createMany: { - args: Prisma.PushDeliveryCreateManyArgs, - result: Prisma.BatchPayload - } - delete: { - args: Prisma.PushDeliveryDeleteArgs, - result: $Utils.PayloadToResult - } - update: { - args: Prisma.PushDeliveryUpdateArgs, - result: $Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PushDeliveryDeleteManyArgs, - result: Prisma.BatchPayload - } - updateMany: { - args: Prisma.PushDeliveryUpdateManyArgs, - result: Prisma.BatchPayload - } - upsert: { - args: Prisma.PushDeliveryUpsertArgs, - result: $Utils.PayloadToResult - } - aggregate: { - args: Prisma.PushDeliveryAggregateArgs, - result: $Utils.Optional - } - groupBy: { - args: Prisma.PushDeliveryGroupByArgs, - result: $Utils.Optional[] - } - count: { - args: Prisma.PushDeliveryCountArgs, - result: $Utils.Optional | number - } - } - } Session: { payload: SessionPayload operations: { @@ -1664,7 +1254,7 @@ export namespace Prisma { export type DefaultPrismaClient = PrismaClient export type RejectOnNotFound = boolean | ((error: Error) => Error) export type RejectPerModel = { [P in ModelName]?: RejectOnNotFound } - export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound } + export type RejectPerOperation = { [P in "findUnique" | "findFirst"]?: RejectPerModel | RejectOnNotFound } type IsReject = T extends true ? True : T extends (err: Error) => Error ? True : False export type HasReject< GlobalRejectSettings extends Prisma.PrismaClientOptions['rejectOnNotFound'], @@ -1688,7 +1278,7 @@ export namespace Prisma { export interface PrismaClientOptions { /** - * Configure findUnique/findFirst to throw an error if the query returns null. + * Configure findUnique/findFirst to throw an error if the query returns null. * @deprecated since 4.0.0. Use `findUniqueOrThrow`/`findFirstOrThrow` methods instead. * @example * ``` @@ -1716,7 +1306,7 @@ export namespace Prisma { * ``` * // Defaults to stdout * log: ['query', 'info', 'warn', 'error'] - * + * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, @@ -1868,56 +1458,11 @@ export namespace Prisma { /** - * Count Type PushSubscriptionCountOutputType + * Models */ - - export type PushSubscriptionCountOutputType = { - watches: number - deliveries: number - } - - export type PushSubscriptionCountOutputTypeSelect = { - watches?: boolean | PushSubscriptionCountOutputTypeCountWatchesArgs - deliveries?: boolean | PushSubscriptionCountOutputTypeCountDeliveriesArgs - } - - // Custom InputTypes - /** - * PushSubscriptionCountOutputType without action - */ - export type PushSubscriptionCountOutputTypeArgs = { - /** - * Select specific fields to fetch from the PushSubscriptionCountOutputType - */ - select?: PushSubscriptionCountOutputTypeSelect | null - } - - - /** - * PushSubscriptionCountOutputType without action - */ - export type PushSubscriptionCountOutputTypeCountWatchesArgs = { - where?: AssignmentWatchWhereInput - } - - - /** - * PushSubscriptionCountOutputType without action - */ - export type PushSubscriptionCountOutputTypeCountDeliveriesArgs = { - where?: PushDeliveryWhereInput - } - - - - /** - * Models - */ - - /** - * Model AuditLog + * Model AuditLog */ @@ -2013,55 +1558,55 @@ export namespace Prisma { where?: AuditLogWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of AuditLogs to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ cursor?: AuditLogWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` AuditLogs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` AuditLogs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Count returned AuditLogs **/ _count?: true | AuditLogCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to average **/ _avg?: AuditLogAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to sum **/ _sum?: AuditLogSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ _min?: AuditLogMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ _max?: AuditLogMaxAggregateInputType @@ -2147,7 +1692,7 @@ export namespace Prisma { type AuditLogGetPayload = $Types.GetResult - type AuditLogCountArgs = + type AuditLogCountArgs = Omit & { select?: AuditLogCountAggregateInputType | true } @@ -2170,7 +1715,7 @@ export namespace Prisma { ): HasReject extends True ? Prisma__AuditLogClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AuditLogClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one AuditLog that matches the filter or throw an error with `error.code='P2025'` + * Find one AuditLog that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {AuditLogFindUniqueOrThrowArgs} args - Arguments to find a AuditLog * @example @@ -2228,13 +1773,13 @@ export namespace Prisma { * @example * // Get all AuditLogs * const auditLogs = await prisma.auditLog.findMany() - * + * * // Get first 10 AuditLogs * const auditLogs = await prisma.auditLog.findMany({ take: 10 }) - * + * * // Only select the `id` * const auditLogWithIdOnly = await prisma.auditLog.findMany({ select: { id: true } }) - * + * **/ findMany>( args?: SelectSubset> @@ -2250,7 +1795,7 @@ export namespace Prisma { * // ... data to create a AuditLog * } * }) - * + * **/ create>( args: SelectSubset> @@ -2266,7 +1811,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ createMany>( args?: SelectSubset> @@ -2282,7 +1827,7 @@ export namespace Prisma { * // ... filter to delete one AuditLog * } * }) - * + * **/ delete>( args: SelectSubset> @@ -2301,7 +1846,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ update>( args: SelectSubset> @@ -2317,7 +1862,7 @@ export namespace Prisma { * // ... provide filter here * } * }) - * + * **/ deleteMany>( args?: SelectSubset> @@ -2338,7 +1883,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ updateMany>( args: SelectSubset> @@ -2430,7 +1975,7 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< T extends AuditLogGroupByArgs, @@ -2571,7 +2116,7 @@ export namespace Prisma { */ rejectOnNotFound?: RejectOnNotFound } - + /** * AuditLog findUniqueOrThrow @@ -2610,31 +2155,31 @@ export namespace Prisma { where?: AuditLogWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of AuditLogs to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for searching for AuditLogs. */ cursor?: AuditLogWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` AuditLogs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` AuditLogs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * + * * Filter by unique combinations of AuditLogs. */ distinct?: Enumerable @@ -2650,7 +2195,7 @@ export namespace Prisma { */ rejectOnNotFound?: RejectOnNotFound } - + /** * AuditLog findFirstOrThrow @@ -2670,31 +2215,31 @@ export namespace Prisma { where?: AuditLogWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of AuditLogs to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for searching for AuditLogs. */ cursor?: AuditLogWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` AuditLogs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` AuditLogs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * + * * Filter by unique combinations of AuditLogs. */ distinct?: Enumerable @@ -2719,25 +2264,25 @@ export namespace Prisma { where?: AuditLogWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of AuditLogs to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for listing AuditLogs. */ cursor?: AuditLogWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` AuditLogs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` AuditLogs. */ skip?: number @@ -2956,55 +2501,55 @@ export namespace Prisma { where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of Users to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Count returned Users **/ _count?: true | UserCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to average **/ _avg?: UserAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to sum **/ _sum?: UserSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ _min?: UserMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ _max?: UserMaxAggregateInputType @@ -3084,7 +2629,7 @@ export namespace Prisma { type UserGetPayload = $Types.GetResult - type UserCountArgs = + type UserCountArgs = Omit & { select?: UserCountAggregateInputType | true } @@ -3107,7 +2652,7 @@ export namespace Prisma { ): HasReject extends True ? Prisma__UserClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` + * Find one User that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User * @example @@ -3165,13 +2710,13 @@ export namespace Prisma { * @example * // Get all Users * const users = await prisma.user.findMany() - * + * * // Get first 10 Users * const users = await prisma.user.findMany({ take: 10 }) - * + * * // Only select the `id` * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) - * + * **/ findMany>( args?: SelectSubset> @@ -3187,7 +2732,7 @@ export namespace Prisma { * // ... data to create a User * } * }) - * + * **/ create>( args: SelectSubset> @@ -3203,7 +2748,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ createMany>( args?: SelectSubset> @@ -3219,7 +2764,7 @@ export namespace Prisma { * // ... filter to delete one User * } * }) - * + * **/ delete>( args: SelectSubset> @@ -3238,7 +2783,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ update>( args: SelectSubset> @@ -3254,7 +2799,7 @@ export namespace Prisma { * // ... provide filter here * } * }) - * + * **/ deleteMany>( args?: SelectSubset> @@ -3275,7 +2820,7 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ updateMany>( args: SelectSubset> @@ -3367,7 +2912,7 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< T extends UserGroupByArgs, @@ -3512,7 +3057,7 @@ export namespace Prisma { */ rejectOnNotFound?: RejectOnNotFound } - + /** * User findUniqueOrThrow @@ -3551,31 +3096,31 @@ export namespace Prisma { where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of Users to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for searching for Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * + * * Filter by unique combinations of Users. */ distinct?: Enumerable @@ -3591,7 +3136,7 @@ export namespace Prisma { */ rejectOnNotFound?: RejectOnNotFound } - + /** * User findFirstOrThrow @@ -3611,31 +3156,31 @@ export namespace Prisma { where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of Users to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for searching for Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` Users. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * + * * Filter by unique combinations of Users. */ distinct?: Enumerable @@ -3660,25 +3205,25 @@ export namespace Prisma { where?: UserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * + * * Determine the order of Users to fetch. */ orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the position for listing Users. */ cursor?: UserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Take `±n` Users from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * + * * Skip the first `n` Users. */ skip?: number @@ -3892,410 +3437,322 @@ export namespace Prisma { /** - * Model PushSubscription + * Model Session */ - export type AggregatePushSubscription = { - _count: PushSubscriptionCountAggregateOutputType | null - _avg: PushSubscriptionAvgAggregateOutputType | null - _sum: PushSubscriptionSumAggregateOutputType | null - _min: PushSubscriptionMinAggregateOutputType | null - _max: PushSubscriptionMaxAggregateOutputType | null - } - - export type PushSubscriptionAvgAggregateOutputType = { - id: number | null - } - - export type PushSubscriptionSumAggregateOutputType = { - id: number | null + export type AggregateSession = { + _count: SessionCountAggregateOutputType | null + _min: SessionMinAggregateOutputType | null + _max: SessionMaxAggregateOutputType | null } - export type PushSubscriptionMinAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - endpoint: string | null - p256dh: string | null - auth: string | null - source: PushSubscriptionSource | null - externalSubject: string | null - disabledAt: Date | null + export type SessionMinAggregateOutputType = { + id: string | null + sid: string | null + data: string | null + expiresAt: Date | null } - export type PushSubscriptionMaxAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - endpoint: string | null - p256dh: string | null - auth: string | null - source: PushSubscriptionSource | null - externalSubject: string | null - disabledAt: Date | null + export type SessionMaxAggregateOutputType = { + id: string | null + sid: string | null + data: string | null + expiresAt: Date | null } - export type PushSubscriptionCountAggregateOutputType = { + export type SessionCountAggregateOutputType = { id: number - createdAt: number - updatedAt: number - endpoint: number - p256dh: number - auth: number - source: number - externalSubject: number - disabledAt: number + sid: number + data: number + expiresAt: number _all: number } - export type PushSubscriptionAvgAggregateInputType = { - id?: true - } - - export type PushSubscriptionSumAggregateInputType = { - id?: true - } - - export type PushSubscriptionMinAggregateInputType = { + export type SessionMinAggregateInputType = { id?: true - createdAt?: true - updatedAt?: true - endpoint?: true - p256dh?: true - auth?: true - source?: true - externalSubject?: true - disabledAt?: true + sid?: true + data?: true + expiresAt?: true } - export type PushSubscriptionMaxAggregateInputType = { + export type SessionMaxAggregateInputType = { id?: true - createdAt?: true - updatedAt?: true - endpoint?: true - p256dh?: true - auth?: true - source?: true - externalSubject?: true - disabledAt?: true + sid?: true + data?: true + expiresAt?: true } - export type PushSubscriptionCountAggregateInputType = { + export type SessionCountAggregateInputType = { id?: true - createdAt?: true - updatedAt?: true - endpoint?: true - p256dh?: true - auth?: true - source?: true - externalSubject?: true - disabledAt?: true + sid?: true + data?: true + expiresAt?: true _all?: true } - export type PushSubscriptionAggregateArgs = { + export type SessionAggregateArgs = { /** - * Filter which PushSubscription to aggregate. + * Filter which Session to aggregate. */ - where?: PushSubscriptionWhereInput + where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushSubscriptions to fetch. + * + * Determine the order of Sessions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ - cursor?: PushSubscriptionWhereUniqueInput + cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushSubscriptions from the position of the cursor. + * + * Take `±n` Sessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushSubscriptions. + * + * Skip the first `n` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PushSubscriptions - **/ - _count?: true | PushSubscriptionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PushSubscriptionAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum + * + * Count returned Sessions **/ - _sum?: PushSubscriptionSumAggregateInputType + _count?: true | SessionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ - _min?: PushSubscriptionMinAggregateInputType + _min?: SessionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ - _max?: PushSubscriptionMaxAggregateInputType + _max?: SessionMaxAggregateInputType } - export type GetPushSubscriptionAggregateType = { - [P in keyof T & keyof AggregatePushSubscription]: P extends '_count' | 'count' + export type GetSessionAggregateType = { + [P in keyof T & keyof AggregateSession]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type PushSubscriptionGroupByArgs = { - where?: PushSubscriptionWhereInput - orderBy?: Enumerable - by: PushSubscriptionScalarFieldEnum[] - having?: PushSubscriptionScalarWhereWithAggregatesInput + export type SessionGroupByArgs = { + where?: SessionWhereInput + orderBy?: Enumerable + by: SessionScalarFieldEnum[] + having?: SessionScalarWhereWithAggregatesInput take?: number skip?: number - _count?: PushSubscriptionCountAggregateInputType | true - _avg?: PushSubscriptionAvgAggregateInputType - _sum?: PushSubscriptionSumAggregateInputType - _min?: PushSubscriptionMinAggregateInputType - _max?: PushSubscriptionMaxAggregateInputType + _count?: SessionCountAggregateInputType | true + _min?: SessionMinAggregateInputType + _max?: SessionMaxAggregateInputType } - export type PushSubscriptionGroupByOutputType = { - id: number - createdAt: Date - updatedAt: Date - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt: Date | null - _count: PushSubscriptionCountAggregateOutputType | null - _avg: PushSubscriptionAvgAggregateOutputType | null - _sum: PushSubscriptionSumAggregateOutputType | null - _min: PushSubscriptionMinAggregateOutputType | null - _max: PushSubscriptionMaxAggregateOutputType | null - } - - type GetPushSubscriptionGroupByPayload = Prisma.PrismaPromise< + export type SessionGroupByOutputType = { + id: string + sid: string + data: string + expiresAt: Date + _count: SessionCountAggregateOutputType | null + _min: SessionMinAggregateOutputType | null + _max: SessionMaxAggregateOutputType | null + } + + type GetSessionGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof PushSubscriptionGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type PushSubscriptionSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - updatedAt?: boolean - endpoint?: boolean - p256dh?: boolean - auth?: boolean - source?: boolean - externalSubject?: boolean - disabledAt?: boolean - watches?: boolean | PushSubscription$watchesArgs - deliveries?: boolean | PushSubscription$deliveriesArgs - _count?: boolean | PushSubscriptionCountOutputTypeArgs - }, ExtArgs["result"]["pushSubscription"]> - - export type PushSubscriptionSelectScalar = { + export type SessionSelect = $Extensions.GetSelect<{ id?: boolean - createdAt?: boolean - updatedAt?: boolean - endpoint?: boolean - p256dh?: boolean - auth?: boolean - source?: boolean - externalSubject?: boolean - disabledAt?: boolean - } + sid?: boolean + data?: boolean + expiresAt?: boolean + }, ExtArgs["result"]["session"]> - export type PushSubscriptionInclude = { - watches?: boolean | PushSubscription$watchesArgs - deliveries?: boolean | PushSubscription$deliveriesArgs - _count?: boolean | PushSubscriptionCountOutputTypeArgs + export type SessionSelectScalar = { + id?: boolean + sid?: boolean + data?: boolean + expiresAt?: boolean } - type PushSubscriptionGetPayload = $Types.GetResult + type SessionGetPayload = $Types.GetResult - type PushSubscriptionCountArgs = - Omit & { - select?: PushSubscriptionCountAggregateInputType | true + type SessionCountArgs = + Omit & { + select?: SessionCountAggregateInputType | true } - export interface PushSubscriptionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PushSubscription'], meta: { name: 'PushSubscription' } } + export interface SessionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Session'], meta: { name: 'Session' } } /** - * Find zero or one PushSubscription that matches the filter. - * @param {PushSubscriptionFindUniqueArgs} args - Arguments to find a PushSubscription + * Find zero or one Session that matches the filter. + * @param {SessionFindUniqueArgs} args - Arguments to find a Session * @example - * // Get one PushSubscription - * const pushSubscription = await prisma.pushSubscription.findUnique({ + * // Get one Session + * const session = await prisma.session.findUnique({ * where: { * // ... provide filter here * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__SessionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__SessionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one PushSubscription that matches the filter or throw an error with `error.code='P2025'` + * Find one Session that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {PushSubscriptionFindUniqueOrThrowArgs} args - Arguments to find a PushSubscription + * @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session * @example - * // Get one PushSubscription - * const pushSubscription = await prisma.pushSubscription.findUniqueOrThrow({ + * // Get one Session + * const session = await prisma.session.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first PushSubscription that matches the filter. + * Find the first Session that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionFindFirstArgs} args - Arguments to find a PushSubscription + * @param {SessionFindFirstArgs} args - Arguments to find a Session * @example - * // Get one PushSubscription - * const pushSubscription = await prisma.pushSubscription.findFirst({ + * // Get one Session + * const session = await prisma.session.findFirst({ * where: { * // ... provide filter here * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__SessionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__SessionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** - * Find the first PushSubscription that matches the filter or + * Find the first Session that matches the filter or * throw `NotFoundError` if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionFindFirstOrThrowArgs} args - Arguments to find a PushSubscription + * @param {SessionFindFirstOrThrowArgs} args - Arguments to find a Session * @example - * // Get one PushSubscription - * const pushSubscription = await prisma.pushSubscription.findFirstOrThrow({ + * // Get one Session + * const session = await prisma.session.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more PushSubscriptions that matches the filter. + * Find zero or more Sessions that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {SessionFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all PushSubscriptions - * const pushSubscriptions = await prisma.pushSubscription.findMany() - * - * // Get first 10 PushSubscriptions - * const pushSubscriptions = await prisma.pushSubscription.findMany({ take: 10 }) - * + * // Get all Sessions + * const sessions = await prisma.session.findMany() + * + * // Get first 10 Sessions + * const sessions = await prisma.session.findMany({ take: 10 }) + * * // Only select the `id` - * const pushSubscriptionWithIdOnly = await prisma.pushSubscription.findMany({ select: { id: true } }) - * + * const sessionWithIdOnly = await prisma.session.findMany({ select: { id: true } }) + * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a PushSubscription. - * @param {PushSubscriptionCreateArgs} args - Arguments to create a PushSubscription. + * Create a Session. + * @param {SessionCreateArgs} args - Arguments to create a Session. * @example - * // Create one PushSubscription - * const PushSubscription = await prisma.pushSubscription.create({ + * // Create one Session + * const Session = await prisma.session.create({ * data: { - * // ... data to create a PushSubscription + * // ... data to create a Session * } * }) - * + * **/ - create>( - args: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many PushSubscriptions. - * @param {PushSubscriptionCreateManyArgs} args - Arguments to create many PushSubscriptions. + * Create many Sessions. + * @param {SessionCreateManyArgs} args - Arguments to create many Sessions. * @example - * // Create many PushSubscriptions - * const pushSubscription = await prisma.pushSubscription.createMany({ + * // Create many Sessions + * const session = await prisma.session.createMany({ * data: { * // ... provide data here * } * }) - * + * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a PushSubscription. - * @param {PushSubscriptionDeleteArgs} args - Arguments to delete one PushSubscription. + * Delete a Session. + * @param {SessionDeleteArgs} args - Arguments to delete one Session. * @example - * // Delete one PushSubscription - * const PushSubscription = await prisma.pushSubscription.delete({ + * // Delete one Session + * const Session = await prisma.session.delete({ * where: { - * // ... filter to delete one PushSubscription + * // ... filter to delete one Session * } * }) - * + * **/ - delete>( - args: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one PushSubscription. - * @param {PushSubscriptionUpdateArgs} args - Arguments to update one PushSubscription. + * Update one Session. + * @param {SessionUpdateArgs} args - Arguments to update one Session. * @example - * // Update one PushSubscription - * const pushSubscription = await prisma.pushSubscription.update({ + * // Update one Session + * const session = await prisma.session.update({ * where: { * // ... provide filter here * }, @@ -4303,36 +3760,36 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - update>( - args: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more PushSubscriptions. - * @param {PushSubscriptionDeleteManyArgs} args - Arguments to filter PushSubscriptions to delete. + * Delete zero or more Sessions. + * @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete. * @example - * // Delete a few PushSubscriptions - * const { count } = await prisma.pushSubscription.deleteMany({ + * // Delete a few Sessions + * const { count } = await prisma.session.deleteMany({ * where: { * // ... provide filter here * } * }) - * + * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more PushSubscriptions. + * Update zero or more Sessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionUpdateManyArgs} args - Arguments to update one or more rows. + * @param {SessionUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many PushSubscriptions - * const pushSubscription = await prisma.pushSubscription.updateMany({ + * // Update many Sessions + * const session = await prisma.session.updateMany({ * where: { * // ... provide filter here * }, @@ -4340,61 +3797,61 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one PushSubscription. - * @param {PushSubscriptionUpsertArgs} args - Arguments to update or create a PushSubscription. + * Create or update one Session. + * @param {SessionUpsertArgs} args - Arguments to update or create a Session. * @example - * // Update or create a PushSubscription - * const pushSubscription = await prisma.pushSubscription.upsert({ + * // Update or create a Session + * const session = await prisma.session.upsert({ * create: { - * // ... data to create a PushSubscription + * // ... data to create a Session * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the PushSubscription we want to update + * // ... the filter for the Session we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__SessionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of PushSubscriptions. + * Count the number of Sessions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionCountArgs} args - Arguments to filter PushSubscriptions to count. + * @param {SessionCountArgs} args - Arguments to filter Sessions to count. * @example - * // Count the number of PushSubscriptions - * const count = await prisma.pushSubscription.count({ + * // Count the number of Sessions + * const count = await prisma.session.count({ * where: { - * // ... the filter for the PushSubscriptions we want to count + * // ... the filter for the Sessions we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a PushSubscription. + * Allows you to perform aggregations operations on a Session. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {SessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -4414,13 +3871,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by PushSubscription. + * Group by Session. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushSubscriptionGroupByArgs} args - Group by arguments. + * @param {SessionGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -4432,17 +3889,17 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< - T extends PushSubscriptionGroupByArgs, + T extends SessionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: PushSubscriptionGroupByArgs['orderBy'] } - : { orderBy?: PushSubscriptionGroupByArgs['orderBy'] }, + ? { orderBy: SessionGroupByArgs['orderBy'] } + : { orderBy?: SessionGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -4491,17 +3948,17 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPushSubscriptionGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSessionGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for PushSubscription. + * The delegate class that acts as a "Promise-like" for Session. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PushSubscriptionClient implements Prisma.PrismaPromise { + export class Prisma__SessionClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -4516,9 +3973,6 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - watches = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; - - deliveries = {}>(args?: Subset>): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>| Null>; private get _document(); /** @@ -4548,773 +4002,696 @@ export namespace Prisma { // Custom InputTypes /** - * PushSubscription base type for findUnique actions + * Session base type for findUnique actions */ - export type PushSubscriptionFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionFindUniqueArgsBase = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * Filter, which PushSubscription to fetch. + * Filter, which Session to fetch. */ - where: PushSubscriptionWhereUniqueInput + where: SessionWhereUniqueInput } /** - * PushSubscription findUnique + * Session findUnique */ - export interface PushSubscriptionFindUniqueArgs extends PushSubscriptionFindUniqueArgsBase { + export interface SessionFindUniqueArgs extends SessionFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * PushSubscription findUniqueOrThrow + * Session findUniqueOrThrow */ - export type PushSubscriptionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionFindUniqueOrThrowArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * Filter, which PushSubscription to fetch. + * Filter, which Session to fetch. */ - where: PushSubscriptionWhereUniqueInput + where: SessionWhereUniqueInput } /** - * PushSubscription base type for findFirst actions + * Session base type for findFirst actions */ - export type PushSubscriptionFindFirstArgsBase = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionFindFirstArgsBase = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * Filter, which PushSubscription to fetch. + * Filter, which Session to fetch. */ - where?: PushSubscriptionWhereInput + where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushSubscriptions to fetch. + * + * Determine the order of Sessions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PushSubscriptions. + * + * Sets the position for searching for Sessions. */ - cursor?: PushSubscriptionWhereUniqueInput + cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushSubscriptions from the position of the cursor. + * + * Take `±n` Sessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushSubscriptions. + * + * Skip the first `n` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PushSubscriptions. + * + * Filter by unique combinations of Sessions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * PushSubscription findFirst + * Session findFirst */ - export interface PushSubscriptionFindFirstArgs extends PushSubscriptionFindFirstArgsBase { + export interface SessionFindFirstArgs extends SessionFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * PushSubscription findFirstOrThrow + * Session findFirstOrThrow */ - export type PushSubscriptionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionFindFirstOrThrowArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * Filter, which PushSubscription to fetch. + * Filter, which Session to fetch. */ - where?: PushSubscriptionWhereInput + where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushSubscriptions to fetch. + * + * Determine the order of Sessions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PushSubscriptions. + * + * Sets the position for searching for Sessions. */ - cursor?: PushSubscriptionWhereUniqueInput + cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushSubscriptions from the position of the cursor. + * + * Take `±n` Sessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushSubscriptions. + * + * Skip the first `n` Sessions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PushSubscriptions. + * + * Filter by unique combinations of Sessions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * PushSubscription findMany + * Session findMany */ - export type PushSubscriptionFindManyArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionFindManyArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * Filter, which PushSubscriptions to fetch. + * Filter, which Sessions to fetch. */ - where?: PushSubscriptionWhereInput + where?: SessionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushSubscriptions to fetch. + * + * Determine the order of Sessions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PushSubscriptions. + * + * Sets the position for listing Sessions. */ - cursor?: PushSubscriptionWhereUniqueInput + cursor?: SessionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushSubscriptions from the position of the cursor. + * + * Take `±n` Sessions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushSubscriptions. + * + * Skip the first `n` Sessions. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * PushSubscription create + * Session create */ - export type PushSubscriptionCreateArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionCreateArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null /** - * The data needed to create a PushSubscription. + * The data needed to create a Session. */ - data: XOR + data: XOR } /** - * PushSubscription createMany + * Session createMany */ - export type PushSubscriptionCreateManyArgs = { + export type SessionCreateManyArgs = { /** - * The data used to create many PushSubscriptions. + * The data used to create many Sessions. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * PushSubscription update + * Session update */ - export type PushSubscriptionUpdateArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PushSubscriptionInclude | null - /** - * The data needed to update a PushSubscription. - */ - data: XOR + export type SessionUpdateArgs = { /** - * Choose, which PushSubscription to update. + * Select specific fields to fetch from the Session */ - where: PushSubscriptionWhereUniqueInput - } - - - /** - * PushSubscription updateMany - */ - export type PushSubscriptionUpdateManyArgs = { + select?: SessionSelect | null /** - * The data used to update PushSubscriptions. + * The data needed to update a Session. */ - data: XOR + data: XOR /** - * Filter which PushSubscriptions to update + * Choose, which Session to update. */ - where?: PushSubscriptionWhereInput + where: SessionWhereUniqueInput } /** - * PushSubscription upsert + * Session updateMany */ - export type PushSubscriptionUpsertArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: PushSubscriptionInclude | null - /** - * The filter to search for the PushSubscription to update in case it exists. - */ - where: PushSubscriptionWhereUniqueInput + export type SessionUpdateManyArgs = { /** - * In case the PushSubscription found by the `where` argument doesn't exist, create a new PushSubscription with this data. + * The data used to update Sessions. */ - create: XOR + data: XOR /** - * In case the PushSubscription was found with the provided `where` argument, update it with this data. + * Filter which Sessions to update */ - update: XOR + where?: SessionWhereInput } /** - * PushSubscription delete + * Session upsert */ - export type PushSubscriptionDeleteArgs = { + export type SessionUpsertArgs = { /** - * Select specific fields to fetch from the PushSubscription + * Select specific fields to fetch from the Session */ - select?: PushSubscriptionSelect | null + select?: SessionSelect | null /** - * Choose, which related nodes to fetch as well. + * The filter to search for the Session to update in case it exists. */ - include?: PushSubscriptionInclude | null + where: SessionWhereUniqueInput /** - * Filter which PushSubscription to delete. + * In case the Session found by the `where` argument doesn't exist, create a new Session with this data. */ - where: PushSubscriptionWhereUniqueInput - } - - - /** - * PushSubscription deleteMany - */ - export type PushSubscriptionDeleteManyArgs = { + create: XOR /** - * Filter which PushSubscriptions to delete + * In case the Session was found with the provided `where` argument, update it with this data. */ - where?: PushSubscriptionWhereInput + update: XOR } /** - * PushSubscription.watches + * Session delete */ - export type PushSubscription$watchesArgs = { + export type SessionDeleteArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the Session */ - select?: AssignmentWatchSelect | null + select?: SessionSelect | null /** - * Choose, which related nodes to fetch as well. + * Filter which Session to delete. */ - include?: AssignmentWatchInclude | null - where?: AssignmentWatchWhereInput - orderBy?: Enumerable - cursor?: AssignmentWatchWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable + where: SessionWhereUniqueInput } /** - * PushSubscription.deliveries + * Session deleteMany */ - export type PushSubscription$deliveriesArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type SessionDeleteManyArgs = { /** - * Choose, which related nodes to fetch as well. + * Filter which Sessions to delete */ - include?: PushDeliveryInclude | null - where?: PushDeliveryWhereInput - orderBy?: Enumerable - cursor?: PushDeliveryWhereUniqueInput - take?: number - skip?: number - distinct?: Enumerable + where?: SessionWhereInput } /** - * PushSubscription without action + * Session without action */ - export type PushSubscriptionArgs = { - /** - * Select specific fields to fetch from the PushSubscription - */ - select?: PushSubscriptionSelect | null + export type SessionArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the Session */ - include?: PushSubscriptionInclude | null + select?: SessionSelect | null } /** - * Model AssignmentWatch + * Model CompetitionSubscription */ - export type AggregateAssignmentWatch = { - _count: AssignmentWatchCountAggregateOutputType | null - _avg: AssignmentWatchAvgAggregateOutputType | null - _sum: AssignmentWatchSumAggregateOutputType | null - _min: AssignmentWatchMinAggregateOutputType | null - _max: AssignmentWatchMaxAggregateOutputType | null + export type AggregateCompetitionSubscription = { + _count: CompetitionSubscriptionCountAggregateOutputType | null + _avg: CompetitionSubscriptionAvgAggregateOutputType | null + _sum: CompetitionSubscriptionSumAggregateOutputType | null + _min: CompetitionSubscriptionMinAggregateOutputType | null + _max: CompetitionSubscriptionMaxAggregateOutputType | null } - export type AssignmentWatchAvgAggregateOutputType = { + export type CompetitionSubscriptionAvgAggregateOutputType = { id: number | null - pushSubscriptionId: number | null - wcaUserId: number | null + userId: number | null } - export type AssignmentWatchSumAggregateOutputType = { + export type CompetitionSubscriptionSumAggregateOutputType = { id: number | null - pushSubscriptionId: number | null - wcaUserId: number | null + userId: number | null } - export type AssignmentWatchMinAggregateOutputType = { + export type CompetitionSubscriptionMinAggregateOutputType = { id: number | null createdAt: Date | null updatedAt: Date | null - pushSubscriptionId: number | null + userId: number | null competitionId: string | null - wcaUserId: number | null + type: CompetitionSubscriptionType | null + value: string | null } - export type AssignmentWatchMaxAggregateOutputType = { + export type CompetitionSubscriptionMaxAggregateOutputType = { id: number | null createdAt: Date | null updatedAt: Date | null - pushSubscriptionId: number | null + userId: number | null competitionId: string | null - wcaUserId: number | null + type: CompetitionSubscriptionType | null + value: string | null } - export type AssignmentWatchCountAggregateOutputType = { + export type CompetitionSubscriptionCountAggregateOutputType = { id: number createdAt: number updatedAt: number - pushSubscriptionId: number + userId: number competitionId: number - wcaUserId: number + type: number + value: number _all: number } - export type AssignmentWatchAvgAggregateInputType = { + export type CompetitionSubscriptionAvgAggregateInputType = { id?: true - pushSubscriptionId?: true - wcaUserId?: true + userId?: true } - export type AssignmentWatchSumAggregateInputType = { + export type CompetitionSubscriptionSumAggregateInputType = { id?: true - pushSubscriptionId?: true - wcaUserId?: true + userId?: true } - export type AssignmentWatchMinAggregateInputType = { + export type CompetitionSubscriptionMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true - pushSubscriptionId?: true + userId?: true competitionId?: true - wcaUserId?: true + type?: true + value?: true } - export type AssignmentWatchMaxAggregateInputType = { + export type CompetitionSubscriptionMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true - pushSubscriptionId?: true + userId?: true competitionId?: true - wcaUserId?: true + type?: true + value?: true } - export type AssignmentWatchCountAggregateInputType = { + export type CompetitionSubscriptionCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true - pushSubscriptionId?: true + userId?: true competitionId?: true - wcaUserId?: true + type?: true + value?: true _all?: true } - export type AssignmentWatchAggregateArgs = { + export type CompetitionSubscriptionAggregateArgs = { /** - * Filter which AssignmentWatch to aggregate. + * Filter which CompetitionSubscription to aggregate. */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentWatches to fetch. + * + * Determine the order of CompetitionSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ - cursor?: AssignmentWatchWhereUniqueInput + cursor?: CompetitionSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentWatches from the position of the cursor. + * + * Take `±n` CompetitionSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentWatches. + * + * Skip the first `n` CompetitionSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AssignmentWatches + * + * Count returned CompetitionSubscriptions **/ - _count?: true | AssignmentWatchCountAggregateInputType + _count?: true | CompetitionSubscriptionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to average **/ - _avg?: AssignmentWatchAvgAggregateInputType + _avg?: CompetitionSubscriptionAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to sum **/ - _sum?: AssignmentWatchSumAggregateInputType + _sum?: CompetitionSubscriptionSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ - _min?: AssignmentWatchMinAggregateInputType + _min?: CompetitionSubscriptionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ - _max?: AssignmentWatchMaxAggregateInputType + _max?: CompetitionSubscriptionMaxAggregateInputType } - export type GetAssignmentWatchAggregateType = { - [P in keyof T & keyof AggregateAssignmentWatch]: P extends '_count' | 'count' + export type GetCompetitionSubscriptionAggregateType = { + [P in keyof T & keyof AggregateCompetitionSubscription]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type AssignmentWatchGroupByArgs = { - where?: AssignmentWatchWhereInput - orderBy?: Enumerable - by: AssignmentWatchScalarFieldEnum[] - having?: AssignmentWatchScalarWhereWithAggregatesInput + export type CompetitionSubscriptionGroupByArgs = { + where?: CompetitionSubscriptionWhereInput + orderBy?: Enumerable + by: CompetitionSubscriptionScalarFieldEnum[] + having?: CompetitionSubscriptionScalarWhereWithAggregatesInput take?: number skip?: number - _count?: AssignmentWatchCountAggregateInputType | true - _avg?: AssignmentWatchAvgAggregateInputType - _sum?: AssignmentWatchSumAggregateInputType - _min?: AssignmentWatchMinAggregateInputType - _max?: AssignmentWatchMaxAggregateInputType + _count?: CompetitionSubscriptionCountAggregateInputType | true + _avg?: CompetitionSubscriptionAvgAggregateInputType + _sum?: CompetitionSubscriptionSumAggregateInputType + _min?: CompetitionSubscriptionMinAggregateInputType + _max?: CompetitionSubscriptionMaxAggregateInputType } - export type AssignmentWatchGroupByOutputType = { + export type CompetitionSubscriptionGroupByOutputType = { id: number createdAt: Date updatedAt: Date - pushSubscriptionId: number + userId: number competitionId: string - wcaUserId: number - _count: AssignmentWatchCountAggregateOutputType | null - _avg: AssignmentWatchAvgAggregateOutputType | null - _sum: AssignmentWatchSumAggregateOutputType | null - _min: AssignmentWatchMinAggregateOutputType | null - _max: AssignmentWatchMaxAggregateOutputType | null + type: CompetitionSubscriptionType + value: string + _count: CompetitionSubscriptionCountAggregateOutputType | null + _avg: CompetitionSubscriptionAvgAggregateOutputType | null + _sum: CompetitionSubscriptionSumAggregateOutputType | null + _min: CompetitionSubscriptionMinAggregateOutputType | null + _max: CompetitionSubscriptionMaxAggregateOutputType | null } - type GetAssignmentWatchGroupByPayload = Prisma.PrismaPromise< + type GetCompetitionSubscriptionGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof AssignmentWatchGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof CompetitionSubscriptionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type AssignmentWatchSelect = $Extensions.GetSelect<{ + export type CompetitionSubscriptionSelect = $Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean - pushSubscriptionId?: boolean + userId?: boolean competitionId?: boolean - wcaUserId?: boolean - pushSubscription?: boolean | PushSubscriptionArgs - }, ExtArgs["result"]["assignmentWatch"]> + type?: boolean + value?: boolean + user?: boolean | UserArgs + }, ExtArgs["result"]["competitionSubscription"]> - export type AssignmentWatchSelectScalar = { + export type CompetitionSubscriptionSelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean - pushSubscriptionId?: boolean + userId?: boolean competitionId?: boolean - wcaUserId?: boolean + type?: boolean + value?: boolean } - export type AssignmentWatchInclude = { - pushSubscription?: boolean | PushSubscriptionArgs + export type CompetitionSubscriptionInclude = { + user?: boolean | UserArgs } - type AssignmentWatchGetPayload = $Types.GetResult + type CompetitionSubscriptionGetPayload = $Types.GetResult - type AssignmentWatchCountArgs = - Omit & { - select?: AssignmentWatchCountAggregateInputType | true + type CompetitionSubscriptionCountArgs = + Omit & { + select?: CompetitionSubscriptionCountAggregateInputType | true } - export interface AssignmentWatchDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['AssignmentWatch'], meta: { name: 'AssignmentWatch' } } + export interface CompetitionSubscriptionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CompetitionSubscription'], meta: { name: 'CompetitionSubscription' } } /** - * Find zero or one AssignmentWatch that matches the filter. - * @param {AssignmentWatchFindUniqueArgs} args - Arguments to find a AssignmentWatch + * Find zero or one CompetitionSubscription that matches the filter. + * @param {CompetitionSubscriptionFindUniqueArgs} args - Arguments to find a CompetitionSubscription * @example - * // Get one AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.findUnique({ + * // Get one CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.findUnique({ * where: { * // ... provide filter here * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one AssignmentWatch that matches the filter or throw an error with `error.code='P2025'` + * Find one CompetitionSubscription that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {AssignmentWatchFindUniqueOrThrowArgs} args - Arguments to find a AssignmentWatch + * @param {CompetitionSubscriptionFindUniqueOrThrowArgs} args - Arguments to find a CompetitionSubscription * @example - * // Get one AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.findUniqueOrThrow({ + * // Get one CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first AssignmentWatch that matches the filter. + * Find the first CompetitionSubscription that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchFindFirstArgs} args - Arguments to find a AssignmentWatch + * @param {CompetitionSubscriptionFindFirstArgs} args - Arguments to find a CompetitionSubscription * @example - * // Get one AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.findFirst({ + * // Get one CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.findFirst({ * where: { * // ... provide filter here * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** - * Find the first AssignmentWatch that matches the filter or + * Find the first CompetitionSubscription that matches the filter or * throw `NotFoundError` if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchFindFirstOrThrowArgs} args - Arguments to find a AssignmentWatch + * @param {CompetitionSubscriptionFindFirstOrThrowArgs} args - Arguments to find a CompetitionSubscription * @example - * // Get one AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.findFirstOrThrow({ + * // Get one CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more AssignmentWatches that matches the filter. + * Find zero or more CompetitionSubscriptions that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {CompetitionSubscriptionFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all AssignmentWatches - * const assignmentWatches = await prisma.assignmentWatch.findMany() - * - * // Get first 10 AssignmentWatches - * const assignmentWatches = await prisma.assignmentWatch.findMany({ take: 10 }) - * + * // Get all CompetitionSubscriptions + * const competitionSubscriptions = await prisma.competitionSubscription.findMany() + * + * // Get first 10 CompetitionSubscriptions + * const competitionSubscriptions = await prisma.competitionSubscription.findMany({ take: 10 }) + * * // Only select the `id` - * const assignmentWatchWithIdOnly = await prisma.assignmentWatch.findMany({ select: { id: true } }) - * + * const competitionSubscriptionWithIdOnly = await prisma.competitionSubscription.findMany({ select: { id: true } }) + * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a AssignmentWatch. - * @param {AssignmentWatchCreateArgs} args - Arguments to create a AssignmentWatch. + * Create a CompetitionSubscription. + * @param {CompetitionSubscriptionCreateArgs} args - Arguments to create a CompetitionSubscription. * @example - * // Create one AssignmentWatch - * const AssignmentWatch = await prisma.assignmentWatch.create({ + * // Create one CompetitionSubscription + * const CompetitionSubscription = await prisma.competitionSubscription.create({ * data: { - * // ... data to create a AssignmentWatch + * // ... data to create a CompetitionSubscription * } * }) - * + * **/ - create>( - args: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many AssignmentWatches. - * @param {AssignmentWatchCreateManyArgs} args - Arguments to create many AssignmentWatches. + * Create many CompetitionSubscriptions. + * @param {CompetitionSubscriptionCreateManyArgs} args - Arguments to create many CompetitionSubscriptions. * @example - * // Create many AssignmentWatches - * const assignmentWatch = await prisma.assignmentWatch.createMany({ + * // Create many CompetitionSubscriptions + * const competitionSubscription = await prisma.competitionSubscription.createMany({ * data: { * // ... provide data here * } * }) - * + * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a AssignmentWatch. - * @param {AssignmentWatchDeleteArgs} args - Arguments to delete one AssignmentWatch. + * Delete a CompetitionSubscription. + * @param {CompetitionSubscriptionDeleteArgs} args - Arguments to delete one CompetitionSubscription. * @example - * // Delete one AssignmentWatch - * const AssignmentWatch = await prisma.assignmentWatch.delete({ + * // Delete one CompetitionSubscription + * const CompetitionSubscription = await prisma.competitionSubscription.delete({ * where: { - * // ... filter to delete one AssignmentWatch + * // ... filter to delete one CompetitionSubscription * } * }) - * + * **/ - delete>( - args: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one AssignmentWatch. - * @param {AssignmentWatchUpdateArgs} args - Arguments to update one AssignmentWatch. + * Update one CompetitionSubscription. + * @param {CompetitionSubscriptionUpdateArgs} args - Arguments to update one CompetitionSubscription. * @example - * // Update one AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.update({ + * // Update one CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.update({ * where: { * // ... provide filter here * }, @@ -5322,36 +4699,36 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - update>( - args: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more AssignmentWatches. - * @param {AssignmentWatchDeleteManyArgs} args - Arguments to filter AssignmentWatches to delete. + * Delete zero or more CompetitionSubscriptions. + * @param {CompetitionSubscriptionDeleteManyArgs} args - Arguments to filter CompetitionSubscriptions to delete. * @example - * // Delete a few AssignmentWatches - * const { count } = await prisma.assignmentWatch.deleteMany({ + * // Delete a few CompetitionSubscriptions + * const { count } = await prisma.competitionSubscription.deleteMany({ * where: { * // ... provide filter here * } * }) - * + * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more AssignmentWatches. + * Update zero or more CompetitionSubscriptions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchUpdateManyArgs} args - Arguments to update one or more rows. + * @param {CompetitionSubscriptionUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many AssignmentWatches - * const assignmentWatch = await prisma.assignmentWatch.updateMany({ + * // Update many CompetitionSubscriptions + * const competitionSubscription = await prisma.competitionSubscription.updateMany({ * where: { * // ... provide filter here * }, @@ -5359,61 +4736,61 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one AssignmentWatch. - * @param {AssignmentWatchUpsertArgs} args - Arguments to update or create a AssignmentWatch. + * Create or update one CompetitionSubscription. + * @param {CompetitionSubscriptionUpsertArgs} args - Arguments to update or create a CompetitionSubscription. * @example - * // Update or create a AssignmentWatch - * const assignmentWatch = await prisma.assignmentWatch.upsert({ + * // Update or create a CompetitionSubscription + * const competitionSubscription = await prisma.competitionSubscription.upsert({ * create: { - * // ... data to create a AssignmentWatch + * // ... data to create a CompetitionSubscription * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the AssignmentWatch we want to update + * // ... the filter for the CompetitionSubscription we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__AssignmentWatchClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of AssignmentWatches. + * Count the number of CompetitionSubscriptions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchCountArgs} args - Arguments to filter AssignmentWatches to count. + * @param {CompetitionSubscriptionCountArgs} args - Arguments to filter CompetitionSubscriptions to count. * @example - * // Count the number of AssignmentWatches - * const count = await prisma.assignmentWatch.count({ + * // Count the number of CompetitionSubscriptions + * const count = await prisma.competitionSubscription.count({ * where: { - * // ... the filter for the AssignmentWatches we want to count + * // ... the filter for the CompetitionSubscriptions we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a AssignmentWatch. + * Allows you to perform aggregations operations on a CompetitionSubscription. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {CompetitionSubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -5433,13 +4810,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by AssignmentWatch. + * Group by CompetitionSubscription. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentWatchGroupByArgs} args - Group by arguments. + * @param {CompetitionSubscriptionGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -5451,17 +4828,17 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< - T extends AssignmentWatchGroupByArgs, + T extends CompetitionSubscriptionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AssignmentWatchGroupByArgs['orderBy'] } - : { orderBy?: AssignmentWatchGroupByArgs['orderBy'] }, + ? { orderBy: CompetitionSubscriptionGroupByArgs['orderBy'] } + : { orderBy?: CompetitionSubscriptionGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -5510,17 +4887,17 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAssignmentWatchGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitionSubscriptionGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for AssignmentWatch. + * The delegate class that acts as a "Promise-like" for CompetitionSubscription. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AssignmentWatchClient implements Prisma.PrismaPromise { + export class Prisma__CompetitionSubscriptionClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -5535,7 +4912,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - pushSubscription = {}>(args?: Subset>): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; + user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -5565,722 +4942,740 @@ export namespace Prisma { // Custom InputTypes /** - * AssignmentWatch base type for findUnique actions + * CompetitionSubscription base type for findUnique actions */ - export type AssignmentWatchFindUniqueArgsBase = { + export type CompetitionSubscriptionFindUniqueArgsBase = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter, which AssignmentWatch to fetch. + * Filter, which CompetitionSubscription to fetch. */ - where: AssignmentWatchWhereUniqueInput + where: CompetitionSubscriptionWhereUniqueInput } /** - * AssignmentWatch findUnique + * CompetitionSubscription findUnique */ - export interface AssignmentWatchFindUniqueArgs extends AssignmentWatchFindUniqueArgsBase { + export interface CompetitionSubscriptionFindUniqueArgs extends CompetitionSubscriptionFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * AssignmentWatch findUniqueOrThrow + * CompetitionSubscription findUniqueOrThrow */ - export type AssignmentWatchFindUniqueOrThrowArgs = { + export type CompetitionSubscriptionFindUniqueOrThrowArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter, which AssignmentWatch to fetch. + * Filter, which CompetitionSubscription to fetch. */ - where: AssignmentWatchWhereUniqueInput + where: CompetitionSubscriptionWhereUniqueInput } /** - * AssignmentWatch base type for findFirst actions + * CompetitionSubscription base type for findFirst actions */ - export type AssignmentWatchFindFirstArgsBase = { + export type CompetitionSubscriptionFindFirstArgsBase = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter, which AssignmentWatch to fetch. + * Filter, which CompetitionSubscription to fetch. */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentWatches to fetch. + * + * Determine the order of CompetitionSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AssignmentWatches. + * + * Sets the position for searching for CompetitionSubscriptions. */ - cursor?: AssignmentWatchWhereUniqueInput + cursor?: CompetitionSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentWatches from the position of the cursor. + * + * Take `±n` CompetitionSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentWatches. + * + * Skip the first `n` CompetitionSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AssignmentWatches. + * + * Filter by unique combinations of CompetitionSubscriptions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentWatch findFirst + * CompetitionSubscription findFirst */ - export interface AssignmentWatchFindFirstArgs extends AssignmentWatchFindFirstArgsBase { + export interface CompetitionSubscriptionFindFirstArgs extends CompetitionSubscriptionFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * AssignmentWatch findFirstOrThrow + * CompetitionSubscription findFirstOrThrow */ - export type AssignmentWatchFindFirstOrThrowArgs = { + export type CompetitionSubscriptionFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter, which AssignmentWatch to fetch. + * Filter, which CompetitionSubscription to fetch. */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentWatches to fetch. + * + * Determine the order of CompetitionSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AssignmentWatches. + * + * Sets the position for searching for CompetitionSubscriptions. */ - cursor?: AssignmentWatchWhereUniqueInput + cursor?: CompetitionSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentWatches from the position of the cursor. + * + * Take `±n` CompetitionSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentWatches. + * + * Skip the first `n` CompetitionSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AssignmentWatches. + * + * Filter by unique combinations of CompetitionSubscriptions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentWatch findMany + * CompetitionSubscription findMany */ - export type AssignmentWatchFindManyArgs = { + export type CompetitionSubscriptionFindManyArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter, which AssignmentWatches to fetch. + * Filter, which CompetitionSubscriptions to fetch. */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentWatches to fetch. + * + * Determine the order of CompetitionSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AssignmentWatches. + * + * Sets the position for listing CompetitionSubscriptions. */ - cursor?: AssignmentWatchWhereUniqueInput + cursor?: CompetitionSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentWatches from the position of the cursor. + * + * Take `±n` CompetitionSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentWatches. + * + * Skip the first `n` CompetitionSubscriptions. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentWatch create + * CompetitionSubscription create */ - export type AssignmentWatchCreateArgs = { + export type CompetitionSubscriptionCreateArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * The data needed to create a AssignmentWatch. + * The data needed to create a CompetitionSubscription. */ - data: XOR + data: XOR } /** - * AssignmentWatch createMany + * CompetitionSubscription createMany */ - export type AssignmentWatchCreateManyArgs = { + export type CompetitionSubscriptionCreateManyArgs = { /** - * The data used to create many AssignmentWatches. + * The data used to create many CompetitionSubscriptions. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * AssignmentWatch update + * CompetitionSubscription update */ - export type AssignmentWatchUpdateArgs = { + export type CompetitionSubscriptionUpdateArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * The data needed to update a AssignmentWatch. + * The data needed to update a CompetitionSubscription. */ - data: XOR + data: XOR /** - * Choose, which AssignmentWatch to update. + * Choose, which CompetitionSubscription to update. */ - where: AssignmentWatchWhereUniqueInput + where: CompetitionSubscriptionWhereUniqueInput } /** - * AssignmentWatch updateMany + * CompetitionSubscription updateMany */ - export type AssignmentWatchUpdateManyArgs = { + export type CompetitionSubscriptionUpdateManyArgs = { /** - * The data used to update AssignmentWatches. + * The data used to update CompetitionSubscriptions. */ - data: XOR + data: XOR /** - * Filter which AssignmentWatches to update + * Filter which CompetitionSubscriptions to update */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput } /** - * AssignmentWatch upsert + * CompetitionSubscription upsert */ - export type AssignmentWatchUpsertArgs = { + export type CompetitionSubscriptionUpsertArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * The filter to search for the AssignmentWatch to update in case it exists. + * The filter to search for the CompetitionSubscription to update in case it exists. */ - where: AssignmentWatchWhereUniqueInput + where: CompetitionSubscriptionWhereUniqueInput /** - * In case the AssignmentWatch found by the `where` argument doesn't exist, create a new AssignmentWatch with this data. + * In case the CompetitionSubscription found by the `where` argument doesn't exist, create a new CompetitionSubscription with this data. */ - create: XOR + create: XOR /** - * In case the AssignmentWatch was found with the provided `where` argument, update it with this data. + * In case the CompetitionSubscription was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * AssignmentWatch delete + * CompetitionSubscription delete */ - export type AssignmentWatchDeleteArgs = { + export type CompetitionSubscriptionDeleteArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null /** - * Filter which AssignmentWatch to delete. + * Filter which CompetitionSubscription to delete. */ - where: AssignmentWatchWhereUniqueInput + where: CompetitionSubscriptionWhereUniqueInput } /** - * AssignmentWatch deleteMany + * CompetitionSubscription deleteMany */ - export type AssignmentWatchDeleteManyArgs = { + export type CompetitionSubscriptionDeleteManyArgs = { /** - * Filter which AssignmentWatches to delete + * Filter which CompetitionSubscriptions to delete */ - where?: AssignmentWatchWhereInput + where?: CompetitionSubscriptionWhereInput } /** - * AssignmentWatch without action + * CompetitionSubscription without action */ - export type AssignmentWatchArgs = { + export type CompetitionSubscriptionArgs = { /** - * Select specific fields to fetch from the AssignmentWatch + * Select specific fields to fetch from the CompetitionSubscription */ - select?: AssignmentWatchSelect | null + select?: CompetitionSubscriptionSelect | null /** * Choose, which related nodes to fetch as well. */ - include?: AssignmentWatchInclude | null + include?: CompetitionSubscriptionInclude | null } /** - * Model AssignmentSnapshot + * Model CompetitorSubscription */ - export type AggregateAssignmentSnapshot = { - _count: AssignmentSnapshotCountAggregateOutputType | null - _avg: AssignmentSnapshotAvgAggregateOutputType | null - _sum: AssignmentSnapshotSumAggregateOutputType | null - _min: AssignmentSnapshotMinAggregateOutputType | null - _max: AssignmentSnapshotMaxAggregateOutputType | null + export type AggregateCompetitorSubscription = { + _count: CompetitorSubscriptionCountAggregateOutputType | null + _avg: CompetitorSubscriptionAvgAggregateOutputType | null + _sum: CompetitorSubscriptionSumAggregateOutputType | null + _min: CompetitorSubscriptionMinAggregateOutputType | null + _max: CompetitorSubscriptionMaxAggregateOutputType | null } - export type AssignmentSnapshotAvgAggregateOutputType = { + export type CompetitorSubscriptionAvgAggregateOutputType = { id: number | null + userId: number | null wcaUserId: number | null } - export type AssignmentSnapshotSumAggregateOutputType = { + export type CompetitorSubscriptionSumAggregateOutputType = { id: number | null + userId: number | null wcaUserId: number | null } - export type AssignmentSnapshotMinAggregateOutputType = { + export type CompetitorSubscriptionMinAggregateOutputType = { id: number | null createdAt: Date | null updatedAt: Date | null - competitionId: string | null + userId: number | null wcaUserId: number | null - assignmentsHash: string | null + verified: boolean | null + code: string | null } - export type AssignmentSnapshotMaxAggregateOutputType = { + export type CompetitorSubscriptionMaxAggregateOutputType = { id: number | null createdAt: Date | null updatedAt: Date | null - competitionId: string | null + userId: number | null wcaUserId: number | null - assignmentsHash: string | null + verified: boolean | null + code: string | null } - export type AssignmentSnapshotCountAggregateOutputType = { + export type CompetitorSubscriptionCountAggregateOutputType = { id: number createdAt: number updatedAt: number - competitionId: number + userId: number wcaUserId: number - assignmentsHash: number + verified: number + code: number _all: number } - export type AssignmentSnapshotAvgAggregateInputType = { + export type CompetitorSubscriptionAvgAggregateInputType = { id?: true + userId?: true wcaUserId?: true } - export type AssignmentSnapshotSumAggregateInputType = { + export type CompetitorSubscriptionSumAggregateInputType = { id?: true + userId?: true wcaUserId?: true } - export type AssignmentSnapshotMinAggregateInputType = { + export type CompetitorSubscriptionMinAggregateInputType = { id?: true createdAt?: true updatedAt?: true - competitionId?: true + userId?: true wcaUserId?: true - assignmentsHash?: true + verified?: true + code?: true } - export type AssignmentSnapshotMaxAggregateInputType = { + export type CompetitorSubscriptionMaxAggregateInputType = { id?: true createdAt?: true updatedAt?: true - competitionId?: true + userId?: true wcaUserId?: true - assignmentsHash?: true + verified?: true + code?: true } - export type AssignmentSnapshotCountAggregateInputType = { + export type CompetitorSubscriptionCountAggregateInputType = { id?: true createdAt?: true updatedAt?: true - competitionId?: true + userId?: true wcaUserId?: true - assignmentsHash?: true + verified?: true + code?: true _all?: true } - export type AssignmentSnapshotAggregateArgs = { + export type CompetitorSubscriptionAggregateArgs = { /** - * Filter which AssignmentSnapshot to aggregate. + * Filter which CompetitorSubscription to aggregate. */ - where?: AssignmentSnapshotWhereInput + where?: CompetitorSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentSnapshots to fetch. + * + * Determine the order of CompetitorSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ - cursor?: AssignmentSnapshotWhereUniqueInput + cursor?: CompetitorSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentSnapshots from the position of the cursor. + * + * Take `±n` CompetitorSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentSnapshots. + * + * Skip the first `n` CompetitorSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned AssignmentSnapshots + * + * Count returned CompetitorSubscriptions **/ - _count?: true | AssignmentSnapshotCountAggregateInputType + _count?: true | CompetitorSubscriptionCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to average **/ - _avg?: AssignmentSnapshotAvgAggregateInputType + _avg?: CompetitorSubscriptionAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to sum **/ - _sum?: AssignmentSnapshotSumAggregateInputType + _sum?: CompetitorSubscriptionSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ - _min?: AssignmentSnapshotMinAggregateInputType + _min?: CompetitorSubscriptionMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ - _max?: AssignmentSnapshotMaxAggregateInputType + _max?: CompetitorSubscriptionMaxAggregateInputType } - export type GetAssignmentSnapshotAggregateType = { - [P in keyof T & keyof AggregateAssignmentSnapshot]: P extends '_count' | 'count' + export type GetCompetitorSubscriptionAggregateType = { + [P in keyof T & keyof AggregateCompetitorSubscription]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type AssignmentSnapshotGroupByArgs = { - where?: AssignmentSnapshotWhereInput - orderBy?: Enumerable - by: AssignmentSnapshotScalarFieldEnum[] - having?: AssignmentSnapshotScalarWhereWithAggregatesInput + export type CompetitorSubscriptionGroupByArgs = { + where?: CompetitorSubscriptionWhereInput + orderBy?: Enumerable + by: CompetitorSubscriptionScalarFieldEnum[] + having?: CompetitorSubscriptionScalarWhereWithAggregatesInput take?: number skip?: number - _count?: AssignmentSnapshotCountAggregateInputType | true - _avg?: AssignmentSnapshotAvgAggregateInputType - _sum?: AssignmentSnapshotSumAggregateInputType - _min?: AssignmentSnapshotMinAggregateInputType - _max?: AssignmentSnapshotMaxAggregateInputType + _count?: CompetitorSubscriptionCountAggregateInputType | true + _avg?: CompetitorSubscriptionAvgAggregateInputType + _sum?: CompetitorSubscriptionSumAggregateInputType + _min?: CompetitorSubscriptionMinAggregateInputType + _max?: CompetitorSubscriptionMaxAggregateInputType } - export type AssignmentSnapshotGroupByOutputType = { + export type CompetitorSubscriptionGroupByOutputType = { id: number createdAt: Date updatedAt: Date - competitionId: string + userId: number wcaUserId: number - assignmentsHash: string - _count: AssignmentSnapshotCountAggregateOutputType | null - _avg: AssignmentSnapshotAvgAggregateOutputType | null - _sum: AssignmentSnapshotSumAggregateOutputType | null - _min: AssignmentSnapshotMinAggregateOutputType | null - _max: AssignmentSnapshotMaxAggregateOutputType | null + verified: boolean + code: string + _count: CompetitorSubscriptionCountAggregateOutputType | null + _avg: CompetitorSubscriptionAvgAggregateOutputType | null + _sum: CompetitorSubscriptionSumAggregateOutputType | null + _min: CompetitorSubscriptionMinAggregateOutputType | null + _max: CompetitorSubscriptionMaxAggregateOutputType | null } - type GetAssignmentSnapshotGroupByPayload = Prisma.PrismaPromise< + type GetCompetitorSubscriptionGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof AssignmentSnapshotGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof CompetitorSubscriptionGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type AssignmentSnapshotSelect = $Extensions.GetSelect<{ + export type CompetitorSubscriptionSelect = $Extensions.GetSelect<{ id?: boolean createdAt?: boolean updatedAt?: boolean - competitionId?: boolean + userId?: boolean wcaUserId?: boolean - assignmentsHash?: boolean - }, ExtArgs["result"]["assignmentSnapshot"]> + verified?: boolean + code?: boolean + user?: boolean | UserArgs + }, ExtArgs["result"]["competitorSubscription"]> - export type AssignmentSnapshotSelectScalar = { + export type CompetitorSubscriptionSelectScalar = { id?: boolean createdAt?: boolean updatedAt?: boolean - competitionId?: boolean + userId?: boolean wcaUserId?: boolean - assignmentsHash?: boolean + verified?: boolean + code?: boolean + } + + export type CompetitorSubscriptionInclude = { + user?: boolean | UserArgs } - type AssignmentSnapshotGetPayload = $Types.GetResult + type CompetitorSubscriptionGetPayload = $Types.GetResult - type AssignmentSnapshotCountArgs = - Omit & { - select?: AssignmentSnapshotCountAggregateInputType | true + type CompetitorSubscriptionCountArgs = + Omit & { + select?: CompetitorSubscriptionCountAggregateInputType | true } - export interface AssignmentSnapshotDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['AssignmentSnapshot'], meta: { name: 'AssignmentSnapshot' } } + export interface CompetitorSubscriptionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CompetitorSubscription'], meta: { name: 'CompetitorSubscription' } } /** - * Find zero or one AssignmentSnapshot that matches the filter. - * @param {AssignmentSnapshotFindUniqueArgs} args - Arguments to find a AssignmentSnapshot + * Find zero or one CompetitorSubscription that matches the filter. + * @param {CompetitorSubscriptionFindUniqueArgs} args - Arguments to find a CompetitorSubscription * @example - * // Get one AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.findUnique({ + * // Get one CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.findUnique({ * where: { * // ... provide filter here * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one AssignmentSnapshot that matches the filter or throw an error with `error.code='P2025'` + * Find one CompetitorSubscription that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {AssignmentSnapshotFindUniqueOrThrowArgs} args - Arguments to find a AssignmentSnapshot + * @param {CompetitorSubscriptionFindUniqueOrThrowArgs} args - Arguments to find a CompetitorSubscription * @example - * // Get one AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.findUniqueOrThrow({ + * // Get one CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first AssignmentSnapshot that matches the filter. + * Find the first CompetitorSubscription that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotFindFirstArgs} args - Arguments to find a AssignmentSnapshot + * @param {CompetitorSubscriptionFindFirstArgs} args - Arguments to find a CompetitorSubscription * @example - * // Get one AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.findFirst({ + * // Get one CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.findFirst({ * where: { * // ... provide filter here * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** - * Find the first AssignmentSnapshot that matches the filter or + * Find the first CompetitorSubscription that matches the filter or * throw `NotFoundError` if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotFindFirstOrThrowArgs} args - Arguments to find a AssignmentSnapshot + * @param {CompetitorSubscriptionFindFirstOrThrowArgs} args - Arguments to find a CompetitorSubscription * @example - * // Get one AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.findFirstOrThrow({ + * // Get one CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more AssignmentSnapshots that matches the filter. + * Find zero or more CompetitorSubscriptions that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {CompetitorSubscriptionFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all AssignmentSnapshots - * const assignmentSnapshots = await prisma.assignmentSnapshot.findMany() - * - * // Get first 10 AssignmentSnapshots - * const assignmentSnapshots = await prisma.assignmentSnapshot.findMany({ take: 10 }) - * + * // Get all CompetitorSubscriptions + * const competitorSubscriptions = await prisma.competitorSubscription.findMany() + * + * // Get first 10 CompetitorSubscriptions + * const competitorSubscriptions = await prisma.competitorSubscription.findMany({ take: 10 }) + * * // Only select the `id` - * const assignmentSnapshotWithIdOnly = await prisma.assignmentSnapshot.findMany({ select: { id: true } }) - * + * const competitorSubscriptionWithIdOnly = await prisma.competitorSubscription.findMany({ select: { id: true } }) + * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a AssignmentSnapshot. - * @param {AssignmentSnapshotCreateArgs} args - Arguments to create a AssignmentSnapshot. + * Create a CompetitorSubscription. + * @param {CompetitorSubscriptionCreateArgs} args - Arguments to create a CompetitorSubscription. * @example - * // Create one AssignmentSnapshot - * const AssignmentSnapshot = await prisma.assignmentSnapshot.create({ + * // Create one CompetitorSubscription + * const CompetitorSubscription = await prisma.competitorSubscription.create({ * data: { - * // ... data to create a AssignmentSnapshot + * // ... data to create a CompetitorSubscription * } * }) - * + * **/ - create>( - args: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many AssignmentSnapshots. - * @param {AssignmentSnapshotCreateManyArgs} args - Arguments to create many AssignmentSnapshots. + * Create many CompetitorSubscriptions. + * @param {CompetitorSubscriptionCreateManyArgs} args - Arguments to create many CompetitorSubscriptions. * @example - * // Create many AssignmentSnapshots - * const assignmentSnapshot = await prisma.assignmentSnapshot.createMany({ + * // Create many CompetitorSubscriptions + * const competitorSubscription = await prisma.competitorSubscription.createMany({ * data: { * // ... provide data here * } * }) - * + * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a AssignmentSnapshot. - * @param {AssignmentSnapshotDeleteArgs} args - Arguments to delete one AssignmentSnapshot. + * Delete a CompetitorSubscription. + * @param {CompetitorSubscriptionDeleteArgs} args - Arguments to delete one CompetitorSubscription. * @example - * // Delete one AssignmentSnapshot - * const AssignmentSnapshot = await prisma.assignmentSnapshot.delete({ + * // Delete one CompetitorSubscription + * const CompetitorSubscription = await prisma.competitorSubscription.delete({ * where: { - * // ... filter to delete one AssignmentSnapshot + * // ... filter to delete one CompetitorSubscription * } * }) - * + * **/ - delete>( - args: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one AssignmentSnapshot. - * @param {AssignmentSnapshotUpdateArgs} args - Arguments to update one AssignmentSnapshot. + * Update one CompetitorSubscription. + * @param {CompetitorSubscriptionUpdateArgs} args - Arguments to update one CompetitorSubscription. * @example - * // Update one AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.update({ + * // Update one CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.update({ * where: { * // ... provide filter here * }, @@ -6288,36 +5683,36 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - update>( - args: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more AssignmentSnapshots. - * @param {AssignmentSnapshotDeleteManyArgs} args - Arguments to filter AssignmentSnapshots to delete. + * Delete zero or more CompetitorSubscriptions. + * @param {CompetitorSubscriptionDeleteManyArgs} args - Arguments to filter CompetitorSubscriptions to delete. * @example - * // Delete a few AssignmentSnapshots - * const { count } = await prisma.assignmentSnapshot.deleteMany({ + * // Delete a few CompetitorSubscriptions + * const { count } = await prisma.competitorSubscription.deleteMany({ * where: { * // ... provide filter here * } * }) - * + * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more AssignmentSnapshots. + * Update zero or more CompetitorSubscriptions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotUpdateManyArgs} args - Arguments to update one or more rows. + * @param {CompetitorSubscriptionUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many AssignmentSnapshots - * const assignmentSnapshot = await prisma.assignmentSnapshot.updateMany({ + * // Update many CompetitorSubscriptions + * const competitorSubscription = await prisma.competitorSubscription.updateMany({ * where: { * // ... provide filter here * }, @@ -6325,61 +5720,61 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one AssignmentSnapshot. - * @param {AssignmentSnapshotUpsertArgs} args - Arguments to update or create a AssignmentSnapshot. + * Create or update one CompetitorSubscription. + * @param {CompetitorSubscriptionUpsertArgs} args - Arguments to update or create a CompetitorSubscription. * @example - * // Update or create a AssignmentSnapshot - * const assignmentSnapshot = await prisma.assignmentSnapshot.upsert({ + * // Update or create a CompetitorSubscription + * const competitorSubscription = await prisma.competitorSubscription.upsert({ * create: { - * // ... data to create a AssignmentSnapshot + * // ... data to create a CompetitorSubscription * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the AssignmentSnapshot we want to update + * // ... the filter for the CompetitorSubscription we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__AssignmentSnapshotClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of AssignmentSnapshots. + * Count the number of CompetitorSubscriptions. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotCountArgs} args - Arguments to filter AssignmentSnapshots to count. + * @param {CompetitorSubscriptionCountArgs} args - Arguments to filter CompetitorSubscriptions to count. * @example - * // Count the number of AssignmentSnapshots - * const count = await prisma.assignmentSnapshot.count({ + * // Count the number of CompetitorSubscriptions + * const count = await prisma.competitorSubscription.count({ * where: { - * // ... the filter for the AssignmentSnapshots we want to count + * // ... the filter for the CompetitorSubscriptions we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a AssignmentSnapshot. + * Allows you to perform aggregations operations on a CompetitorSubscription. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {CompetitorSubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -6399,13 +5794,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by AssignmentSnapshot. + * Group by CompetitorSubscription. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {AssignmentSnapshotGroupByArgs} args - Group by arguments. + * @param {CompetitorSubscriptionGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -6417,17 +5812,17 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< - T extends AssignmentSnapshotGroupByArgs, + T extends CompetitorSubscriptionGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: AssignmentSnapshotGroupByArgs['orderBy'] } - : { orderBy?: AssignmentSnapshotGroupByArgs['orderBy'] }, + ? { orderBy: CompetitorSubscriptionGroupByArgs['orderBy'] } + : { orderBy?: CompetitorSubscriptionGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -6476,17 +5871,17 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAssignmentSnapshotGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitorSubscriptionGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for AssignmentSnapshot. + * The delegate class that acts as a "Promise-like" for CompetitorSubscription. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__AssignmentSnapshotClient implements Prisma.PrismaPromise { + export class Prisma__CompetitorSubscriptionClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -6501,6 +5896,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); + user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -6530,714 +5926,666 @@ export namespace Prisma { // Custom InputTypes /** - * AssignmentSnapshot base type for findUnique actions + * CompetitorSubscription base type for findUnique actions */ - export type AssignmentSnapshotFindUniqueArgsBase = { + export type CompetitorSubscriptionFindUniqueArgsBase = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * Filter, which AssignmentSnapshot to fetch. + * Filter, which CompetitorSubscription to fetch. */ - where: AssignmentSnapshotWhereUniqueInput + where: CompetitorSubscriptionWhereUniqueInput } /** - * AssignmentSnapshot findUnique + * CompetitorSubscription findUnique */ - export interface AssignmentSnapshotFindUniqueArgs extends AssignmentSnapshotFindUniqueArgsBase { + export interface CompetitorSubscriptionFindUniqueArgs extends CompetitorSubscriptionFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * AssignmentSnapshot findUniqueOrThrow + * CompetitorSubscription findUniqueOrThrow */ - export type AssignmentSnapshotFindUniqueOrThrowArgs = { + export type CompetitorSubscriptionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * Filter, which AssignmentSnapshot to fetch. + * Filter, which CompetitorSubscription to fetch. */ - where: AssignmentSnapshotWhereUniqueInput + where: CompetitorSubscriptionWhereUniqueInput } /** - * AssignmentSnapshot base type for findFirst actions + * CompetitorSubscription base type for findFirst actions */ - export type AssignmentSnapshotFindFirstArgsBase = { + export type CompetitorSubscriptionFindFirstArgsBase = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * Filter, which AssignmentSnapshot to fetch. + * Filter, which CompetitorSubscription to fetch. */ - where?: AssignmentSnapshotWhereInput + where?: CompetitorSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentSnapshots to fetch. + * + * Determine the order of CompetitorSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AssignmentSnapshots. + * + * Sets the position for searching for CompetitorSubscriptions. */ - cursor?: AssignmentSnapshotWhereUniqueInput + cursor?: CompetitorSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentSnapshots from the position of the cursor. + * + * Take `±n` CompetitorSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentSnapshots. + * + * Skip the first `n` CompetitorSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AssignmentSnapshots. + * + * Filter by unique combinations of CompetitorSubscriptions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentSnapshot findFirst + * CompetitorSubscription findFirst */ - export interface AssignmentSnapshotFindFirstArgs extends AssignmentSnapshotFindFirstArgsBase { + export interface CompetitorSubscriptionFindFirstArgs extends CompetitorSubscriptionFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * AssignmentSnapshot findFirstOrThrow + * CompetitorSubscription findFirstOrThrow */ - export type AssignmentSnapshotFindFirstOrThrowArgs = { + export type CompetitorSubscriptionFindFirstOrThrowArgs = { /** - * Select specific fields to fetch from the AssignmentSnapshot + * Select specific fields to fetch from the CompetitorSubscription */ - select?: AssignmentSnapshotSelect | null + select?: CompetitorSubscriptionSelect | null /** - * Filter, which AssignmentSnapshot to fetch. + * Choose, which related nodes to fetch as well. */ - where?: AssignmentSnapshotWhereInput + include?: CompetitorSubscriptionInclude | null /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentSnapshots to fetch. + * Filter, which CompetitorSubscription to fetch. */ - orderBy?: Enumerable + where?: CompetitorSubscriptionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CompetitorSubscriptions to fetch. + */ + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for AssignmentSnapshots. + * + * Sets the position for searching for CompetitorSubscriptions. */ - cursor?: AssignmentSnapshotWhereUniqueInput + cursor?: CompetitorSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentSnapshots from the position of the cursor. + * + * Take `±n` CompetitorSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentSnapshots. + * + * Skip the first `n` CompetitorSubscriptions. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of AssignmentSnapshots. + * + * Filter by unique combinations of CompetitorSubscriptions. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentSnapshot findMany + * CompetitorSubscription findMany */ - export type AssignmentSnapshotFindManyArgs = { + export type CompetitorSubscriptionFindManyArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * Filter, which AssignmentSnapshots to fetch. + * Filter, which CompetitorSubscriptions to fetch. */ - where?: AssignmentSnapshotWhereInput + where?: CompetitorSubscriptionWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of AssignmentSnapshots to fetch. + * + * Determine the order of CompetitorSubscriptions to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing AssignmentSnapshots. + * + * Sets the position for listing CompetitorSubscriptions. */ - cursor?: AssignmentSnapshotWhereUniqueInput + cursor?: CompetitorSubscriptionWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` AssignmentSnapshots from the position of the cursor. + * + * Take `±n` CompetitorSubscriptions from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` AssignmentSnapshots. + * + * Skip the first `n` CompetitorSubscriptions. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * AssignmentSnapshot create + * CompetitorSubscription create */ - export type AssignmentSnapshotCreateArgs = { + export type CompetitorSubscriptionCreateArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * The data needed to create a AssignmentSnapshot. + * The data needed to create a CompetitorSubscription. */ - data: XOR + data: XOR } /** - * AssignmentSnapshot createMany + * CompetitorSubscription createMany */ - export type AssignmentSnapshotCreateManyArgs = { + export type CompetitorSubscriptionCreateManyArgs = { /** - * The data used to create many AssignmentSnapshots. + * The data used to create many CompetitorSubscriptions. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * AssignmentSnapshot update + * CompetitorSubscription update */ - export type AssignmentSnapshotUpdateArgs = { + export type CompetitorSubscriptionUpdateArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * The data needed to update a AssignmentSnapshot. + * The data needed to update a CompetitorSubscription. */ - data: XOR + data: XOR /** - * Choose, which AssignmentSnapshot to update. + * Choose, which CompetitorSubscription to update. */ - where: AssignmentSnapshotWhereUniqueInput + where: CompetitorSubscriptionWhereUniqueInput } /** - * AssignmentSnapshot updateMany + * CompetitorSubscription updateMany */ - export type AssignmentSnapshotUpdateManyArgs = { + export type CompetitorSubscriptionUpdateManyArgs = { /** - * The data used to update AssignmentSnapshots. + * The data used to update CompetitorSubscriptions. */ - data: XOR + data: XOR /** - * Filter which AssignmentSnapshots to update + * Filter which CompetitorSubscriptions to update */ - where?: AssignmentSnapshotWhereInput + where?: CompetitorSubscriptionWhereInput } /** - * AssignmentSnapshot upsert + * CompetitorSubscription upsert */ - export type AssignmentSnapshotUpsertArgs = { + export type CompetitorSubscriptionUpsertArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * The filter to search for the AssignmentSnapshot to update in case it exists. + * The filter to search for the CompetitorSubscription to update in case it exists. */ - where: AssignmentSnapshotWhereUniqueInput + where: CompetitorSubscriptionWhereUniqueInput /** - * In case the AssignmentSnapshot found by the `where` argument doesn't exist, create a new AssignmentSnapshot with this data. + * In case the CompetitorSubscription found by the `where` argument doesn't exist, create a new CompetitorSubscription with this data. */ - create: XOR + create: XOR /** - * In case the AssignmentSnapshot was found with the provided `where` argument, update it with this data. + * In case the CompetitorSubscription was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * AssignmentSnapshot delete + * CompetitorSubscription delete */ - export type AssignmentSnapshotDeleteArgs = { + export type CompetitorSubscriptionDeleteArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null /** - * Filter which AssignmentSnapshot to delete. + * Filter which CompetitorSubscription to delete. */ - where: AssignmentSnapshotWhereUniqueInput + where: CompetitorSubscriptionWhereUniqueInput } /** - * AssignmentSnapshot deleteMany + * CompetitorSubscription deleteMany */ - export type AssignmentSnapshotDeleteManyArgs = { + export type CompetitorSubscriptionDeleteManyArgs = { /** - * Filter which AssignmentSnapshots to delete + * Filter which CompetitorSubscriptions to delete */ - where?: AssignmentSnapshotWhereInput + where?: CompetitorSubscriptionWhereInput } /** - * AssignmentSnapshot without action + * CompetitorSubscription without action */ - export type AssignmentSnapshotArgs = { + export type CompetitorSubscriptionArgs = { + /** + * Select specific fields to fetch from the CompetitorSubscription + */ + select?: CompetitorSubscriptionSelect | null /** - * Select specific fields to fetch from the AssignmentSnapshot + * Choose, which related nodes to fetch as well. */ - select?: AssignmentSnapshotSelect | null + include?: CompetitorSubscriptionInclude | null } /** - * Model PushDelivery + * Model CompetitionSid */ - export type AggregatePushDelivery = { - _count: PushDeliveryCountAggregateOutputType | null - _avg: PushDeliveryAvgAggregateOutputType | null - _sum: PushDeliverySumAggregateOutputType | null - _min: PushDeliveryMinAggregateOutputType | null - _max: PushDeliveryMaxAggregateOutputType | null - } - - export type PushDeliveryAvgAggregateOutputType = { - id: number | null - pushSubscriptionId: number | null - wcaUserId: number | null - } - - export type PushDeliverySumAggregateOutputType = { - id: number | null - pushSubscriptionId: number | null - wcaUserId: number | null + export type AggregateCompetitionSid = { + _count: CompetitionSidCountAggregateOutputType | null + _min: CompetitionSidMinAggregateOutputType | null + _max: CompetitionSidMaxAggregateOutputType | null } - export type PushDeliveryMinAggregateOutputType = { - id: number | null + export type CompetitionSidMinAggregateOutputType = { createdAt: Date | null updatedAt: Date | null - pushSubscriptionId: number | null competitionId: string | null - wcaUserId: number | null - dedupeKey: string | null - status: PushDeliveryStatus | null + sid: string | null } - export type PushDeliveryMaxAggregateOutputType = { - id: number | null + export type CompetitionSidMaxAggregateOutputType = { createdAt: Date | null updatedAt: Date | null - pushSubscriptionId: number | null competitionId: string | null - wcaUserId: number | null - dedupeKey: string | null - status: PushDeliveryStatus | null + sid: string | null } - export type PushDeliveryCountAggregateOutputType = { - id: number + export type CompetitionSidCountAggregateOutputType = { createdAt: number updatedAt: number - pushSubscriptionId: number competitionId: number - wcaUserId: number - dedupeKey: number - status: number - error: number + sid: number _all: number } - export type PushDeliveryAvgAggregateInputType = { - id?: true - pushSubscriptionId?: true - wcaUserId?: true - } - - export type PushDeliverySumAggregateInputType = { - id?: true - pushSubscriptionId?: true - wcaUserId?: true - } - - export type PushDeliveryMinAggregateInputType = { - id?: true + export type CompetitionSidMinAggregateInputType = { createdAt?: true updatedAt?: true - pushSubscriptionId?: true competitionId?: true - wcaUserId?: true - dedupeKey?: true - status?: true + sid?: true } - export type PushDeliveryMaxAggregateInputType = { - id?: true + export type CompetitionSidMaxAggregateInputType = { createdAt?: true updatedAt?: true - pushSubscriptionId?: true competitionId?: true - wcaUserId?: true - dedupeKey?: true - status?: true + sid?: true } - export type PushDeliveryCountAggregateInputType = { - id?: true + export type CompetitionSidCountAggregateInputType = { createdAt?: true updatedAt?: true - pushSubscriptionId?: true competitionId?: true - wcaUserId?: true - dedupeKey?: true - status?: true - error?: true + sid?: true _all?: true } - export type PushDeliveryAggregateArgs = { + export type CompetitionSidAggregateArgs = { /** - * Filter which PushDelivery to aggregate. + * Filter which CompetitionSid to aggregate. */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushDeliveries to fetch. + * + * Determine the order of CompetitionSids to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * + * * Sets the start position */ - cursor?: PushDeliveryWhereUniqueInput + cursor?: CompetitionSidWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushDeliveries from the position of the cursor. + * + * Take `±n` CompetitionSids from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushDeliveries. + * + * Skip the first `n` CompetitionSids. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PushDeliveries - **/ - _count?: true | PushDeliveryCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PushDeliveryAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum + * + * Count returned CompetitionSids **/ - _sum?: PushDeliverySumAggregateInputType + _count?: true | CompetitionSidCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the minimum value **/ - _min?: PushDeliveryMinAggregateInputType + _min?: CompetitionSidMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * + * * Select which fields to find the maximum value **/ - _max?: PushDeliveryMaxAggregateInputType + _max?: CompetitionSidMaxAggregateInputType } - export type GetPushDeliveryAggregateType = { - [P in keyof T & keyof AggregatePushDelivery]: P extends '_count' | 'count' + export type GetCompetitionSidAggregateType = { + [P in keyof T & keyof AggregateCompetitionSid]: P extends '_count' | 'count' ? T[P] extends true ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } - export type PushDeliveryGroupByArgs = { - where?: PushDeliveryWhereInput - orderBy?: Enumerable - by: PushDeliveryScalarFieldEnum[] - having?: PushDeliveryScalarWhereWithAggregatesInput + export type CompetitionSidGroupByArgs = { + where?: CompetitionSidWhereInput + orderBy?: Enumerable + by: CompetitionSidScalarFieldEnum[] + having?: CompetitionSidScalarWhereWithAggregatesInput take?: number skip?: number - _count?: PushDeliveryCountAggregateInputType | true - _avg?: PushDeliveryAvgAggregateInputType - _sum?: PushDeliverySumAggregateInputType - _min?: PushDeliveryMinAggregateInputType - _max?: PushDeliveryMaxAggregateInputType + _count?: CompetitionSidCountAggregateInputType | true + _min?: CompetitionSidMinAggregateInputType + _max?: CompetitionSidMaxAggregateInputType } - export type PushDeliveryGroupByOutputType = { - id: number + export type CompetitionSidGroupByOutputType = { createdAt: Date updatedAt: Date - pushSubscriptionId: number competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error: JsonValue | null - _count: PushDeliveryCountAggregateOutputType | null - _avg: PushDeliveryAvgAggregateOutputType | null - _sum: PushDeliverySumAggregateOutputType | null - _min: PushDeliveryMinAggregateOutputType | null - _max: PushDeliveryMaxAggregateOutputType | null + sid: string + _count: CompetitionSidCountAggregateOutputType | null + _min: CompetitionSidMinAggregateOutputType | null + _max: CompetitionSidMaxAggregateOutputType | null } - type GetPushDeliveryGroupByPayload = Prisma.PrismaPromise< + type GetCompetitionSidGroupByPayload = Prisma.PrismaPromise< Array< - PickArray & + PickArray & { - [P in ((keyof T) & (keyof PushDeliveryGroupByOutputType))]: P extends '_count' + [P in ((keyof T) & (keyof CompetitionSidGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number - : GetScalarType - : GetScalarType + : GetScalarType + : GetScalarType } > > - export type PushDeliverySelect = $Extensions.GetSelect<{ - id?: boolean + export type CompetitionSidSelect = $Extensions.GetSelect<{ createdAt?: boolean updatedAt?: boolean - pushSubscriptionId?: boolean competitionId?: boolean - wcaUserId?: boolean - dedupeKey?: boolean - status?: boolean - error?: boolean - pushSubscription?: boolean | PushSubscriptionArgs - }, ExtArgs["result"]["pushDelivery"]> + sid?: boolean + }, ExtArgs["result"]["competitionSid"]> - export type PushDeliverySelectScalar = { - id?: boolean + export type CompetitionSidSelectScalar = { createdAt?: boolean updatedAt?: boolean - pushSubscriptionId?: boolean competitionId?: boolean - wcaUserId?: boolean - dedupeKey?: boolean - status?: boolean - error?: boolean - } - - export type PushDeliveryInclude = { - pushSubscription?: boolean | PushSubscriptionArgs + sid?: boolean } - type PushDeliveryGetPayload = $Types.GetResult + type CompetitionSidGetPayload = $Types.GetResult - type PushDeliveryCountArgs = - Omit & { - select?: PushDeliveryCountAggregateInputType | true + type CompetitionSidCountArgs = + Omit & { + select?: CompetitionSidCountAggregateInputType | true } - export interface PushDeliveryDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PushDelivery'], meta: { name: 'PushDelivery' } } + export interface CompetitionSidDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CompetitionSid'], meta: { name: 'CompetitionSid' } } /** - * Find zero or one PushDelivery that matches the filter. - * @param {PushDeliveryFindUniqueArgs} args - Arguments to find a PushDelivery + * Find zero or one CompetitionSid that matches the filter. + * @param {CompetitionSidFindUniqueArgs} args - Arguments to find a CompetitionSid * @example - * // Get one PushDelivery - * const pushDelivery = await prisma.pushDelivery.findUnique({ + * // Get one CompetitionSid + * const competitionSid = await prisma.competitionSid.findUnique({ * where: { * // ... provide filter here * } * }) **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__PushDeliveryClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__PushDeliveryClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> + findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args: SelectSubset> + ): HasReject extends True ? Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> /** - * Find one PushDelivery that matches the filter or throw an error with `error.code='P2025'` + * Find one CompetitionSid that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. - * @param {PushDeliveryFindUniqueOrThrowArgs} args - Arguments to find a PushDelivery + * @param {CompetitionSidFindUniqueOrThrowArgs} args - Arguments to find a CompetitionSid * @example - * // Get one PushDelivery - * const pushDelivery = await prisma.pushDelivery.findUniqueOrThrow({ + * // Get one CompetitionSid + * const competitionSid = await prisma.competitionSid.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> + findUniqueOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> /** - * Find the first PushDelivery that matches the filter. + * Find the first CompetitionSid that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryFindFirstArgs} args - Arguments to find a PushDelivery + * @param {CompetitionSidFindFirstArgs} args - Arguments to find a CompetitionSid * @example - * // Get one PushDelivery - * const pushDelivery = await prisma.pushDelivery.findFirst({ + * // Get one CompetitionSid + * const competitionSid = await prisma.competitionSid.findFirst({ * where: { * // ... provide filter here * } * }) **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__PushDeliveryClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__PushDeliveryClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> + findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( + args?: SelectSubset> + ): HasReject extends True ? Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> /** - * Find the first PushDelivery that matches the filter or + * Find the first CompetitionSid that matches the filter or * throw `NotFoundError` if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryFindFirstOrThrowArgs} args - Arguments to find a PushDelivery + * @param {CompetitionSidFindFirstOrThrowArgs} args - Arguments to find a CompetitionSid * @example - * // Get one PushDelivery - * const pushDelivery = await prisma.pushDelivery.findFirstOrThrow({ + * // Get one CompetitionSid + * const competitionSid = await prisma.competitionSid.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> + findFirstOrThrow>( + args?: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> /** - * Find zero or more PushDeliveries that matches the filter. + * Find zero or more CompetitionSids that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryFindManyArgs=} args - Arguments to filter and select certain fields only. + * @param {CompetitionSidFindManyArgs=} args - Arguments to filter and select certain fields only. * @example - * // Get all PushDeliveries - * const pushDeliveries = await prisma.pushDelivery.findMany() - * - * // Get first 10 PushDeliveries - * const pushDeliveries = await prisma.pushDelivery.findMany({ take: 10 }) - * - * // Only select the `id` - * const pushDeliveryWithIdOnly = await prisma.pushDelivery.findMany({ select: { id: true } }) - * + * // Get all CompetitionSids + * const competitionSids = await prisma.competitionSid.findMany() + * + * // Get first 10 CompetitionSids + * const competitionSids = await prisma.competitionSid.findMany({ take: 10 }) + * + * // Only select the `createdAt` + * const competitionSidWithCreatedAtOnly = await prisma.competitionSid.findMany({ select: { createdAt: true } }) + * **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> + findMany>( + args?: SelectSubset> + ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> /** - * Create a PushDelivery. - * @param {PushDeliveryCreateArgs} args - Arguments to create a PushDelivery. + * Create a CompetitionSid. + * @param {CompetitionSidCreateArgs} args - Arguments to create a CompetitionSid. * @example - * // Create one PushDelivery - * const PushDelivery = await prisma.pushDelivery.create({ + * // Create one CompetitionSid + * const CompetitionSid = await prisma.competitionSid.create({ * data: { - * // ... data to create a PushDelivery + * // ... data to create a CompetitionSid * } * }) - * + * **/ - create>( - args: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> + create>( + args: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> /** - * Create many PushDeliveries. - * @param {PushDeliveryCreateManyArgs} args - Arguments to create many PushDeliveries. + * Create many CompetitionSids. + * @param {CompetitionSidCreateManyArgs} args - Arguments to create many CompetitionSids. * @example - * // Create many PushDeliveries - * const pushDelivery = await prisma.pushDelivery.createMany({ + * // Create many CompetitionSids + * const competitionSid = await prisma.competitionSid.createMany({ * data: { * // ... provide data here * } * }) - * + * **/ - createMany>( - args?: SelectSubset> + createMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Delete a PushDelivery. - * @param {PushDeliveryDeleteArgs} args - Arguments to delete one PushDelivery. + * Delete a CompetitionSid. + * @param {CompetitionSidDeleteArgs} args - Arguments to delete one CompetitionSid. * @example - * // Delete one PushDelivery - * const PushDelivery = await prisma.pushDelivery.delete({ + * // Delete one CompetitionSid + * const CompetitionSid = await prisma.competitionSid.delete({ * where: { - * // ... filter to delete one PushDelivery + * // ... filter to delete one CompetitionSid * } * }) - * + * **/ - delete>( - args: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> + delete>( + args: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> /** - * Update one PushDelivery. - * @param {PushDeliveryUpdateArgs} args - Arguments to update one PushDelivery. + * Update one CompetitionSid. + * @param {CompetitionSidUpdateArgs} args - Arguments to update one CompetitionSid. * @example - * // Update one PushDelivery - * const pushDelivery = await prisma.pushDelivery.update({ + * // Update one CompetitionSid + * const competitionSid = await prisma.competitionSid.update({ * where: { * // ... provide filter here * }, @@ -7245,36 +6593,36 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - update>( - args: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> + update>( + args: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> /** - * Delete zero or more PushDeliveries. - * @param {PushDeliveryDeleteManyArgs} args - Arguments to filter PushDeliveries to delete. + * Delete zero or more CompetitionSids. + * @param {CompetitionSidDeleteManyArgs} args - Arguments to filter CompetitionSids to delete. * @example - * // Delete a few PushDeliveries - * const { count } = await prisma.pushDelivery.deleteMany({ + * // Delete a few CompetitionSids + * const { count } = await prisma.competitionSid.deleteMany({ * where: { * // ... provide filter here * } * }) - * + * **/ - deleteMany>( - args?: SelectSubset> + deleteMany>( + args?: SelectSubset> ): Prisma.PrismaPromise /** - * Update zero or more PushDeliveries. + * Update zero or more CompetitionSids. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryUpdateManyArgs} args - Arguments to update one or more rows. + * @param {CompetitionSidUpdateManyArgs} args - Arguments to update one or more rows. * @example - * // Update many PushDeliveries - * const pushDelivery = await prisma.pushDelivery.updateMany({ + * // Update many CompetitionSids + * const competitionSid = await prisma.competitionSid.updateMany({ * where: { * // ... provide filter here * }, @@ -7282,61 +6630,61 @@ export namespace Prisma { * // ... provide data here * } * }) - * + * **/ - updateMany>( - args: SelectSubset> + updateMany>( + args: SelectSubset> ): Prisma.PrismaPromise /** - * Create or update one PushDelivery. - * @param {PushDeliveryUpsertArgs} args - Arguments to update or create a PushDelivery. + * Create or update one CompetitionSid. + * @param {CompetitionSidUpsertArgs} args - Arguments to update or create a CompetitionSid. * @example - * // Update or create a PushDelivery - * const pushDelivery = await prisma.pushDelivery.upsert({ + * // Update or create a CompetitionSid + * const competitionSid = await prisma.competitionSid.upsert({ * create: { - * // ... data to create a PushDelivery + * // ... data to create a CompetitionSid * }, * update: { * // ... in case it already exists, update * }, * where: { - * // ... the filter for the PushDelivery we want to update + * // ... the filter for the CompetitionSid we want to update * } * }) **/ - upsert>( - args: SelectSubset> - ): Prisma__PushDeliveryClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> + upsert>( + args: SelectSubset> + ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> /** - * Count the number of PushDeliveries. + * Count the number of CompetitionSids. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryCountArgs} args - Arguments to filter PushDeliveries to count. + * @param {CompetitionSidCountArgs} args - Arguments to filter CompetitionSids to count. * @example - * // Count the number of PushDeliveries - * const count = await prisma.pushDelivery.count({ + * // Count the number of CompetitionSids + * const count = await prisma.competitionSid.count({ * where: { - * // ... the filter for the PushDeliveries we want to count + * // ... the filter for the CompetitionSids we want to count * } * }) **/ - count( - args?: Subset, + count( + args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number - : GetScalarType + : GetScalarType : number > /** - * Allows you to perform aggregations operations on a PushDelivery. + * Allows you to perform aggregations operations on a CompetitionSid. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @param {CompetitionSidAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io @@ -7356,13 +6704,13 @@ export namespace Prisma { * take: 10, * }) **/ - aggregate(args: Subset): Prisma.PrismaPromise> + aggregate(args: Subset): Prisma.PrismaPromise> /** - * Group by PushDelivery. + * Group by CompetitionSid. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined - * @param {PushDeliveryGroupByArgs} args - Group by arguments. + * @param {CompetitionSidGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ @@ -7374,17 +6722,17 @@ export namespace Prisma { * _all: true * }, * }) - * + * **/ groupBy< - T extends PushDeliveryGroupByArgs, + T extends CompetitionSidGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake - ? { orderBy: PushDeliveryGroupByArgs['orderBy'] } - : { orderBy?: PushDeliveryGroupByArgs['orderBy'] }, + ? { orderBy: CompetitionSidGroupByArgs['orderBy'] } + : { orderBy?: CompetitionSidGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends TupleToUnion, ByValid extends Has, @@ -7433,17 +6781,17 @@ export namespace Prisma { ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetPushDeliveryGroupByPayload : Prisma.PrismaPromise + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitionSidGroupByPayload : Prisma.PrismaPromise } /** - * The delegate class that acts as a "Promise-like" for PushDelivery. + * The delegate class that acts as a "Promise-like" for CompetitionSid. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ - export class Prisma__PushDeliveryClient implements Prisma.PrismaPromise { + export class Prisma__CompetitionSidClient implements Prisma.PrismaPromise { private readonly _dmmf; private readonly _queryType; private readonly _rootField; @@ -7458,7 +6806,6 @@ export namespace Prisma { readonly [Symbol.toStringTag]: 'PrismaPromise'; constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - pushSubscription = {}>(args?: Subset>): Prisma__PushSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; private get _document(); /** @@ -7488,4137 +6835,341 @@ export namespace Prisma { // Custom InputTypes /** - * PushDelivery base type for findUnique actions + * CompetitionSid base type for findUnique actions */ - export type PushDeliveryFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidFindUniqueArgsBase = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter, which PushDelivery to fetch. + * Filter, which CompetitionSid to fetch. */ - where: PushDeliveryWhereUniqueInput + where: CompetitionSidWhereUniqueInput } /** - * PushDelivery findUnique + * CompetitionSid findUnique */ - export interface PushDeliveryFindUniqueArgs extends PushDeliveryFindUniqueArgsBase { + export interface CompetitionSidFindUniqueArgs extends CompetitionSidFindUniqueArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * PushDelivery findUniqueOrThrow + * CompetitionSid findUniqueOrThrow */ - export type PushDeliveryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidFindUniqueOrThrowArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter, which PushDelivery to fetch. + * Filter, which CompetitionSid to fetch. */ - where: PushDeliveryWhereUniqueInput + where: CompetitionSidWhereUniqueInput } /** - * PushDelivery base type for findFirst actions + * CompetitionSid base type for findFirst actions */ - export type PushDeliveryFindFirstArgsBase = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidFindFirstArgsBase = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter, which PushDelivery to fetch. + * Filter, which CompetitionSid to fetch. */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushDeliveries to fetch. + * + * Determine the order of CompetitionSids to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PushDeliveries. + * + * Sets the position for searching for CompetitionSids. */ - cursor?: PushDeliveryWhereUniqueInput + cursor?: CompetitionSidWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushDeliveries from the position of the cursor. + * + * Take `±n` CompetitionSids from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushDeliveries. + * + * Skip the first `n` CompetitionSids. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PushDeliveries. + * + * Filter by unique combinations of CompetitionSids. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * PushDelivery findFirst + * CompetitionSid findFirst */ - export interface PushDeliveryFindFirstArgs extends PushDeliveryFindFirstArgsBase { + export interface CompetitionSidFindFirstArgs extends CompetitionSidFindFirstArgsBase { /** * Throw an Error if query returns no results * @deprecated since 4.0.0: use `findFirstOrThrow` method instead */ rejectOnNotFound?: RejectOnNotFound } - + /** - * PushDelivery findFirstOrThrow + * CompetitionSid findFirstOrThrow */ - export type PushDeliveryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidFindFirstOrThrowArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter, which PushDelivery to fetch. + * Filter, which CompetitionSid to fetch. */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushDeliveries to fetch. + * + * Determine the order of CompetitionSids to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PushDeliveries. + * + * Sets the position for searching for CompetitionSids. */ - cursor?: PushDeliveryWhereUniqueInput + cursor?: CompetitionSidWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushDeliveries from the position of the cursor. + * + * Take `±n` CompetitionSids from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushDeliveries. + * + * Skip the first `n` CompetitionSids. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PushDeliveries. + * + * Filter by unique combinations of CompetitionSids. */ - distinct?: Enumerable + distinct?: Enumerable } /** - * PushDelivery findMany + * CompetitionSid findMany */ - export type PushDeliveryFindManyArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidFindManyArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter, which PushDeliveries to fetch. + * Filter, which CompetitionSids to fetch. */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PushDeliveries to fetch. + * + * Determine the order of CompetitionSids to fetch. */ - orderBy?: Enumerable + orderBy?: Enumerable /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PushDeliveries. + * + * Sets the position for listing CompetitionSids. */ - cursor?: PushDeliveryWhereUniqueInput + cursor?: CompetitionSidWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PushDeliveries from the position of the cursor. + * + * Take `±n` CompetitionSids from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PushDeliveries. + * + * Skip the first `n` CompetitionSids. */ skip?: number - distinct?: Enumerable + distinct?: Enumerable } /** - * PushDelivery create + * CompetitionSid create */ - export type PushDeliveryCreateArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidCreateArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * The data needed to create a PushDelivery. + * The data needed to create a CompetitionSid. */ - data: XOR + data: XOR } /** - * PushDelivery createMany + * CompetitionSid createMany */ - export type PushDeliveryCreateManyArgs = { + export type CompetitionSidCreateManyArgs = { /** - * The data used to create many PushDeliveries. + * The data used to create many CompetitionSids. */ - data: Enumerable + data: Enumerable skipDuplicates?: boolean } /** - * PushDelivery update + * CompetitionSid update */ - export type PushDeliveryUpdateArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidUpdateArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * The data needed to update a PushDelivery. + * The data needed to update a CompetitionSid. */ - data: XOR + data: XOR /** - * Choose, which PushDelivery to update. + * Choose, which CompetitionSid to update. */ - where: PushDeliveryWhereUniqueInput + where: CompetitionSidWhereUniqueInput } /** - * PushDelivery updateMany + * CompetitionSid updateMany */ - export type PushDeliveryUpdateManyArgs = { + export type CompetitionSidUpdateManyArgs = { /** - * The data used to update PushDeliveries. + * The data used to update CompetitionSids. */ - data: XOR + data: XOR /** - * Filter which PushDeliveries to update + * Filter which CompetitionSids to update */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput } /** - * PushDelivery upsert + * CompetitionSid upsert */ - export type PushDeliveryUpsertArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidUpsertArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * The filter to search for the PushDelivery to update in case it exists. + * The filter to search for the CompetitionSid to update in case it exists. */ - where: PushDeliveryWhereUniqueInput + where: CompetitionSidWhereUniqueInput /** - * In case the PushDelivery found by the `where` argument doesn't exist, create a new PushDelivery with this data. + * In case the CompetitionSid found by the `where` argument doesn't exist, create a new CompetitionSid with this data. */ - create: XOR + create: XOR /** - * In case the PushDelivery was found with the provided `where` argument, update it with this data. + * In case the CompetitionSid was found with the provided `where` argument, update it with this data. */ - update: XOR + update: XOR } /** - * PushDelivery delete + * CompetitionSid delete */ - export type PushDeliveryDeleteArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidDeleteArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null /** - * Filter which PushDelivery to delete. + * Filter which CompetitionSid to delete. */ - where: PushDeliveryWhereUniqueInput + where: CompetitionSidWhereUniqueInput } /** - * PushDelivery deleteMany + * CompetitionSid deleteMany */ - export type PushDeliveryDeleteManyArgs = { + export type CompetitionSidDeleteManyArgs = { /** - * Filter which PushDeliveries to delete + * Filter which CompetitionSids to delete */ - where?: PushDeliveryWhereInput + where?: CompetitionSidWhereInput } /** - * PushDelivery without action + * CompetitionSid without action */ - export type PushDeliveryArgs = { - /** - * Select specific fields to fetch from the PushDelivery - */ - select?: PushDeliverySelect | null + export type CompetitionSidArgs = { /** - * Choose, which related nodes to fetch as well. + * Select specific fields to fetch from the CompetitionSid */ - include?: PushDeliveryInclude | null + select?: CompetitionSidSelect | null } /** - * Model Session + * Enums */ + export const TransactionIsolationLevel: { + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' + }; - export type AggregateSession = { - _count: SessionCountAggregateOutputType | null - _min: SessionMinAggregateOutputType | null - _max: SessionMaxAggregateOutputType | null - } + export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - export type SessionMinAggregateOutputType = { - id: string | null - sid: string | null - data: string | null - expiresAt: Date | null - } - export type SessionMaxAggregateOutputType = { - id: string | null - sid: string | null - data: string | null - expiresAt: Date | null - } + export const AuditLogScalarFieldEnum: { + id: 'id', + action: 'action', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + userId: 'userId', + competitionId: 'competitionId' + }; - export type SessionCountAggregateOutputType = { - id: number - sid: number - data: number - expiresAt: number - _all: number - } + export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum] - export type SessionMinAggregateInputType = { - id?: true - sid?: true - data?: true - expiresAt?: true - } + export const UserScalarFieldEnum: { + id: 'id', + phoneNumber: 'phoneNumber' + }; - export type SessionMaxAggregateInputType = { - id?: true - sid?: true - data?: true - expiresAt?: true - } - - export type SessionCountAggregateInputType = { - id?: true - sid?: true - data?: true - expiresAt?: true - _all?: true - } - - export type SessionAggregateArgs = { - /** - * Filter which Session to aggregate. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Sessions - **/ - _count?: true | SessionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SessionMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SessionMaxAggregateInputType - } - - export type GetSessionAggregateType = { - [P in keyof T & keyof AggregateSession]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type SessionGroupByArgs = { - where?: SessionWhereInput - orderBy?: Enumerable - by: SessionScalarFieldEnum[] - having?: SessionScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SessionCountAggregateInputType | true - _min?: SessionMinAggregateInputType - _max?: SessionMaxAggregateInputType - } - - - export type SessionGroupByOutputType = { - id: string - sid: string - data: string - expiresAt: Date - _count: SessionCountAggregateOutputType | null - _min: SessionMinAggregateOutputType | null - _max: SessionMaxAggregateOutputType | null - } - - type GetSessionGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof SessionGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type SessionSelect = $Extensions.GetSelect<{ - id?: boolean - sid?: boolean - data?: boolean - expiresAt?: boolean - }, ExtArgs["result"]["session"]> - - export type SessionSelectScalar = { - id?: boolean - sid?: boolean - data?: boolean - expiresAt?: boolean - } - - - type SessionGetPayload = $Types.GetResult - - type SessionCountArgs = - Omit & { - select?: SessionCountAggregateInputType | true - } - - export interface SessionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Session'], meta: { name: 'Session' } } - /** - * Find zero or one Session that matches the filter. - * @param {SessionFindUniqueArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__SessionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__SessionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one Session that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SessionFindUniqueOrThrowArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first Session that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindFirstArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__SessionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__SessionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first Session that matches the filter or - * throw `NotFoundError` if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindFirstOrThrowArgs} args - Arguments to find a Session - * @example - * // Get one Session - * const session = await prisma.session.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more Sessions that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all Sessions - * const sessions = await prisma.session.findMany() - * - * // Get first 10 Sessions - * const sessions = await prisma.session.findMany({ take: 10 }) - * - * // Only select the `id` - * const sessionWithIdOnly = await prisma.session.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a Session. - * @param {SessionCreateArgs} args - Arguments to create a Session. - * @example - * // Create one Session - * const Session = await prisma.session.create({ - * data: { - * // ... data to create a Session - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many Sessions. - * @param {SessionCreateManyArgs} args - Arguments to create many Sessions. - * @example - * // Create many Sessions - * const session = await prisma.session.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a Session. - * @param {SessionDeleteArgs} args - Arguments to delete one Session. - * @example - * // Delete one Session - * const Session = await prisma.session.delete({ - * where: { - * // ... filter to delete one Session - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one Session. - * @param {SessionUpdateArgs} args - Arguments to update one Session. - * @example - * // Update one Session - * const session = await prisma.session.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more Sessions. - * @param {SessionDeleteManyArgs} args - Arguments to filter Sessions to delete. - * @example - * // Delete a few Sessions - * const { count } = await prisma.session.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more Sessions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Sessions - * const session = await prisma.session.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one Session. - * @param {SessionUpsertArgs} args - Arguments to update or create a Session. - * @example - * // Update or create a Session - * const session = await prisma.session.upsert({ - * create: { - * // ... data to create a Session - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Session we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__SessionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of Sessions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionCountArgs} args - Arguments to filter Sessions to count. - * @example - * // Count the number of Sessions - * const count = await prisma.session.count({ - * where: { - * // ... the filter for the Sessions we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Session. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by Session. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SessionGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SessionGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: SessionGroupByArgs['orderBy'] } - : { orderBy?: SessionGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSessionGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for Session. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__SessionClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - - - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } - - - - // Custom InputTypes - - /** - * Session base type for findUnique actions - */ - export type SessionFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter, which Session to fetch. - */ - where: SessionWhereUniqueInput - } - - /** - * Session findUnique - */ - export interface SessionFindUniqueArgs extends SessionFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Session findUniqueOrThrow - */ - export type SessionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter, which Session to fetch. - */ - where: SessionWhereUniqueInput - } - - - /** - * Session base type for findFirst actions - */ - export type SessionFindFirstArgsBase = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter, which Session to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Sessions. - */ - distinct?: Enumerable - } - - /** - * Session findFirst - */ - export interface SessionFindFirstArgs extends SessionFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * Session findFirstOrThrow - */ - export type SessionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter, which Session to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Sessions. - */ - distinct?: Enumerable - } - - - /** - * Session findMany - */ - export type SessionFindManyArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter, which Sessions to fetch. - */ - where?: SessionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Sessions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Sessions. - */ - cursor?: SessionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Sessions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Sessions. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * Session create - */ - export type SessionCreateArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * The data needed to create a Session. - */ - data: XOR - } - - - /** - * Session createMany - */ - export type SessionCreateManyArgs = { - /** - * The data used to create many Sessions. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * Session update - */ - export type SessionUpdateArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * The data needed to update a Session. - */ - data: XOR - /** - * Choose, which Session to update. - */ - where: SessionWhereUniqueInput - } - - - /** - * Session updateMany - */ - export type SessionUpdateManyArgs = { - /** - * The data used to update Sessions. - */ - data: XOR - /** - * Filter which Sessions to update - */ - where?: SessionWhereInput - } - - - /** - * Session upsert - */ - export type SessionUpsertArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * The filter to search for the Session to update in case it exists. - */ - where: SessionWhereUniqueInput - /** - * In case the Session found by the `where` argument doesn't exist, create a new Session with this data. - */ - create: XOR - /** - * In case the Session was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * Session delete - */ - export type SessionDeleteArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - /** - * Filter which Session to delete. - */ - where: SessionWhereUniqueInput - } - - - /** - * Session deleteMany - */ - export type SessionDeleteManyArgs = { - /** - * Filter which Sessions to delete - */ - where?: SessionWhereInput - } - - - /** - * Session without action - */ - export type SessionArgs = { - /** - * Select specific fields to fetch from the Session - */ - select?: SessionSelect | null - } - - - - /** - * Model CompetitionSubscription - */ - - - export type AggregateCompetitionSubscription = { - _count: CompetitionSubscriptionCountAggregateOutputType | null - _avg: CompetitionSubscriptionAvgAggregateOutputType | null - _sum: CompetitionSubscriptionSumAggregateOutputType | null - _min: CompetitionSubscriptionMinAggregateOutputType | null - _max: CompetitionSubscriptionMaxAggregateOutputType | null - } - - export type CompetitionSubscriptionAvgAggregateOutputType = { - id: number | null - userId: number | null - } - - export type CompetitionSubscriptionSumAggregateOutputType = { - id: number | null - userId: number | null - } - - export type CompetitionSubscriptionMinAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - userId: number | null - competitionId: string | null - type: CompetitionSubscriptionType | null - value: string | null - } - - export type CompetitionSubscriptionMaxAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - userId: number | null - competitionId: string | null - type: CompetitionSubscriptionType | null - value: string | null - } - - export type CompetitionSubscriptionCountAggregateOutputType = { - id: number - createdAt: number - updatedAt: number - userId: number - competitionId: number - type: number - value: number - _all: number - } - - - export type CompetitionSubscriptionAvgAggregateInputType = { - id?: true - userId?: true - } - - export type CompetitionSubscriptionSumAggregateInputType = { - id?: true - userId?: true - } - - export type CompetitionSubscriptionMinAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - competitionId?: true - type?: true - value?: true - } - - export type CompetitionSubscriptionMaxAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - competitionId?: true - type?: true - value?: true - } - - export type CompetitionSubscriptionCountAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - competitionId?: true - type?: true - value?: true - _all?: true - } - - export type CompetitionSubscriptionAggregateArgs = { - /** - * Filter which CompetitionSubscription to aggregate. - */ - where?: CompetitionSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CompetitionSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CompetitionSubscriptions - **/ - _count?: true | CompetitionSubscriptionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CompetitionSubscriptionAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CompetitionSubscriptionSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CompetitionSubscriptionMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CompetitionSubscriptionMaxAggregateInputType - } - - export type GetCompetitionSubscriptionAggregateType = { - [P in keyof T & keyof AggregateCompetitionSubscription]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CompetitionSubscriptionGroupByArgs = { - where?: CompetitionSubscriptionWhereInput - orderBy?: Enumerable - by: CompetitionSubscriptionScalarFieldEnum[] - having?: CompetitionSubscriptionScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CompetitionSubscriptionCountAggregateInputType | true - _avg?: CompetitionSubscriptionAvgAggregateInputType - _sum?: CompetitionSubscriptionSumAggregateInputType - _min?: CompetitionSubscriptionMinAggregateInputType - _max?: CompetitionSubscriptionMaxAggregateInputType - } - - - export type CompetitionSubscriptionGroupByOutputType = { - id: number - createdAt: Date - updatedAt: Date - userId: number - competitionId: string - type: CompetitionSubscriptionType - value: string - _count: CompetitionSubscriptionCountAggregateOutputType | null - _avg: CompetitionSubscriptionAvgAggregateOutputType | null - _sum: CompetitionSubscriptionSumAggregateOutputType | null - _min: CompetitionSubscriptionMinAggregateOutputType | null - _max: CompetitionSubscriptionMaxAggregateOutputType | null - } - - type GetCompetitionSubscriptionGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof CompetitionSubscriptionGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CompetitionSubscriptionSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - updatedAt?: boolean - userId?: boolean - competitionId?: boolean - type?: boolean - value?: boolean - user?: boolean | UserArgs - }, ExtArgs["result"]["competitionSubscription"]> - - export type CompetitionSubscriptionSelectScalar = { - id?: boolean - createdAt?: boolean - updatedAt?: boolean - userId?: boolean - competitionId?: boolean - type?: boolean - value?: boolean - } - - export type CompetitionSubscriptionInclude = { - user?: boolean | UserArgs - } - - - type CompetitionSubscriptionGetPayload = $Types.GetResult - - type CompetitionSubscriptionCountArgs = - Omit & { - select?: CompetitionSubscriptionCountAggregateInputType | true - } - - export interface CompetitionSubscriptionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CompetitionSubscription'], meta: { name: 'CompetitionSubscription' } } - /** - * Find zero or one CompetitionSubscription that matches the filter. - * @param {CompetitionSubscriptionFindUniqueArgs} args - Arguments to find a CompetitionSubscription - * @example - * // Get one CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one CompetitionSubscription that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CompetitionSubscriptionFindUniqueOrThrowArgs} args - Arguments to find a CompetitionSubscription - * @example - * // Get one CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first CompetitionSubscription that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionFindFirstArgs} args - Arguments to find a CompetitionSubscription - * @example - * // Get one CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first CompetitionSubscription that matches the filter or - * throw `NotFoundError` if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionFindFirstOrThrowArgs} args - Arguments to find a CompetitionSubscription - * @example - * // Get one CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more CompetitionSubscriptions that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all CompetitionSubscriptions - * const competitionSubscriptions = await prisma.competitionSubscription.findMany() - * - * // Get first 10 CompetitionSubscriptions - * const competitionSubscriptions = await prisma.competitionSubscription.findMany({ take: 10 }) - * - * // Only select the `id` - * const competitionSubscriptionWithIdOnly = await prisma.competitionSubscription.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a CompetitionSubscription. - * @param {CompetitionSubscriptionCreateArgs} args - Arguments to create a CompetitionSubscription. - * @example - * // Create one CompetitionSubscription - * const CompetitionSubscription = await prisma.competitionSubscription.create({ - * data: { - * // ... data to create a CompetitionSubscription - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many CompetitionSubscriptions. - * @param {CompetitionSubscriptionCreateManyArgs} args - Arguments to create many CompetitionSubscriptions. - * @example - * // Create many CompetitionSubscriptions - * const competitionSubscription = await prisma.competitionSubscription.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a CompetitionSubscription. - * @param {CompetitionSubscriptionDeleteArgs} args - Arguments to delete one CompetitionSubscription. - * @example - * // Delete one CompetitionSubscription - * const CompetitionSubscription = await prisma.competitionSubscription.delete({ - * where: { - * // ... filter to delete one CompetitionSubscription - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one CompetitionSubscription. - * @param {CompetitionSubscriptionUpdateArgs} args - Arguments to update one CompetitionSubscription. - * @example - * // Update one CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more CompetitionSubscriptions. - * @param {CompetitionSubscriptionDeleteManyArgs} args - Arguments to filter CompetitionSubscriptions to delete. - * @example - * // Delete a few CompetitionSubscriptions - * const { count } = await prisma.competitionSubscription.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more CompetitionSubscriptions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CompetitionSubscriptions - * const competitionSubscription = await prisma.competitionSubscription.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one CompetitionSubscription. - * @param {CompetitionSubscriptionUpsertArgs} args - Arguments to update or create a CompetitionSubscription. - * @example - * // Update or create a CompetitionSubscription - * const competitionSubscription = await prisma.competitionSubscription.upsert({ - * create: { - * // ... data to create a CompetitionSubscription - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CompetitionSubscription we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CompetitionSubscriptionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of CompetitionSubscriptions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionCountArgs} args - Arguments to filter CompetitionSubscriptions to count. - * @example - * // Count the number of CompetitionSubscriptions - * const count = await prisma.competitionSubscription.count({ - * where: { - * // ... the filter for the CompetitionSubscriptions we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CompetitionSubscription. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CompetitionSubscription. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSubscriptionGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CompetitionSubscriptionGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CompetitionSubscriptionGroupByArgs['orderBy'] } - : { orderBy?: CompetitionSubscriptionGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitionSubscriptionGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for CompetitionSubscription. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__CompetitionSubscriptionClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - - user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } - - - - // Custom InputTypes - - /** - * CompetitionSubscription base type for findUnique actions - */ - export type CompetitionSubscriptionFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter, which CompetitionSubscription to fetch. - */ - where: CompetitionSubscriptionWhereUniqueInput - } - - /** - * CompetitionSubscription findUnique - */ - export interface CompetitionSubscriptionFindUniqueArgs extends CompetitionSubscriptionFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitionSubscription findUniqueOrThrow - */ - export type CompetitionSubscriptionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter, which CompetitionSubscription to fetch. - */ - where: CompetitionSubscriptionWhereUniqueInput - } - - - /** - * CompetitionSubscription base type for findFirst actions - */ - export type CompetitionSubscriptionFindFirstArgsBase = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter, which CompetitionSubscription to fetch. - */ - where?: CompetitionSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitionSubscriptions. - */ - cursor?: CompetitionSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitionSubscriptions. - */ - distinct?: Enumerable - } - - /** - * CompetitionSubscription findFirst - */ - export interface CompetitionSubscriptionFindFirstArgs extends CompetitionSubscriptionFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitionSubscription findFirstOrThrow - */ - export type CompetitionSubscriptionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter, which CompetitionSubscription to fetch. - */ - where?: CompetitionSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitionSubscriptions. - */ - cursor?: CompetitionSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitionSubscriptions. - */ - distinct?: Enumerable - } - - - /** - * CompetitionSubscription findMany - */ - export type CompetitionSubscriptionFindManyArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter, which CompetitionSubscriptions to fetch. - */ - where?: CompetitionSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CompetitionSubscriptions. - */ - cursor?: CompetitionSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSubscriptions. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * CompetitionSubscription create - */ - export type CompetitionSubscriptionCreateArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * The data needed to create a CompetitionSubscription. - */ - data: XOR - } - - - /** - * CompetitionSubscription createMany - */ - export type CompetitionSubscriptionCreateManyArgs = { - /** - * The data used to create many CompetitionSubscriptions. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * CompetitionSubscription update - */ - export type CompetitionSubscriptionUpdateArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * The data needed to update a CompetitionSubscription. - */ - data: XOR - /** - * Choose, which CompetitionSubscription to update. - */ - where: CompetitionSubscriptionWhereUniqueInput - } - - - /** - * CompetitionSubscription updateMany - */ - export type CompetitionSubscriptionUpdateManyArgs = { - /** - * The data used to update CompetitionSubscriptions. - */ - data: XOR - /** - * Filter which CompetitionSubscriptions to update - */ - where?: CompetitionSubscriptionWhereInput - } - - - /** - * CompetitionSubscription upsert - */ - export type CompetitionSubscriptionUpsertArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * The filter to search for the CompetitionSubscription to update in case it exists. - */ - where: CompetitionSubscriptionWhereUniqueInput - /** - * In case the CompetitionSubscription found by the `where` argument doesn't exist, create a new CompetitionSubscription with this data. - */ - create: XOR - /** - * In case the CompetitionSubscription was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * CompetitionSubscription delete - */ - export type CompetitionSubscriptionDeleteArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - /** - * Filter which CompetitionSubscription to delete. - */ - where: CompetitionSubscriptionWhereUniqueInput - } - - - /** - * CompetitionSubscription deleteMany - */ - export type CompetitionSubscriptionDeleteManyArgs = { - /** - * Filter which CompetitionSubscriptions to delete - */ - where?: CompetitionSubscriptionWhereInput - } - - - /** - * CompetitionSubscription without action - */ - export type CompetitionSubscriptionArgs = { - /** - * Select specific fields to fetch from the CompetitionSubscription - */ - select?: CompetitionSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitionSubscriptionInclude | null - } - - - - /** - * Model CompetitorSubscription - */ - - - export type AggregateCompetitorSubscription = { - _count: CompetitorSubscriptionCountAggregateOutputType | null - _avg: CompetitorSubscriptionAvgAggregateOutputType | null - _sum: CompetitorSubscriptionSumAggregateOutputType | null - _min: CompetitorSubscriptionMinAggregateOutputType | null - _max: CompetitorSubscriptionMaxAggregateOutputType | null - } - - export type CompetitorSubscriptionAvgAggregateOutputType = { - id: number | null - userId: number | null - wcaUserId: number | null - } - - export type CompetitorSubscriptionSumAggregateOutputType = { - id: number | null - userId: number | null - wcaUserId: number | null - } - - export type CompetitorSubscriptionMinAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - userId: number | null - wcaUserId: number | null - verified: boolean | null - code: string | null - } - - export type CompetitorSubscriptionMaxAggregateOutputType = { - id: number | null - createdAt: Date | null - updatedAt: Date | null - userId: number | null - wcaUserId: number | null - verified: boolean | null - code: string | null - } - - export type CompetitorSubscriptionCountAggregateOutputType = { - id: number - createdAt: number - updatedAt: number - userId: number - wcaUserId: number - verified: number - code: number - _all: number - } - - - export type CompetitorSubscriptionAvgAggregateInputType = { - id?: true - userId?: true - wcaUserId?: true - } - - export type CompetitorSubscriptionSumAggregateInputType = { - id?: true - userId?: true - wcaUserId?: true - } - - export type CompetitorSubscriptionMinAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - wcaUserId?: true - verified?: true - code?: true - } - - export type CompetitorSubscriptionMaxAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - wcaUserId?: true - verified?: true - code?: true - } - - export type CompetitorSubscriptionCountAggregateInputType = { - id?: true - createdAt?: true - updatedAt?: true - userId?: true - wcaUserId?: true - verified?: true - code?: true - _all?: true - } - - export type CompetitorSubscriptionAggregateArgs = { - /** - * Filter which CompetitorSubscription to aggregate. - */ - where?: CompetitorSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitorSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CompetitorSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitorSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitorSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CompetitorSubscriptions - **/ - _count?: true | CompetitorSubscriptionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: CompetitorSubscriptionAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: CompetitorSubscriptionSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CompetitorSubscriptionMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CompetitorSubscriptionMaxAggregateInputType - } - - export type GetCompetitorSubscriptionAggregateType = { - [P in keyof T & keyof AggregateCompetitorSubscription]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CompetitorSubscriptionGroupByArgs = { - where?: CompetitorSubscriptionWhereInput - orderBy?: Enumerable - by: CompetitorSubscriptionScalarFieldEnum[] - having?: CompetitorSubscriptionScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CompetitorSubscriptionCountAggregateInputType | true - _avg?: CompetitorSubscriptionAvgAggregateInputType - _sum?: CompetitorSubscriptionSumAggregateInputType - _min?: CompetitorSubscriptionMinAggregateInputType - _max?: CompetitorSubscriptionMaxAggregateInputType - } - - - export type CompetitorSubscriptionGroupByOutputType = { - id: number - createdAt: Date - updatedAt: Date - userId: number - wcaUserId: number - verified: boolean - code: string - _count: CompetitorSubscriptionCountAggregateOutputType | null - _avg: CompetitorSubscriptionAvgAggregateOutputType | null - _sum: CompetitorSubscriptionSumAggregateOutputType | null - _min: CompetitorSubscriptionMinAggregateOutputType | null - _max: CompetitorSubscriptionMaxAggregateOutputType | null - } - - type GetCompetitorSubscriptionGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof CompetitorSubscriptionGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CompetitorSubscriptionSelect = $Extensions.GetSelect<{ - id?: boolean - createdAt?: boolean - updatedAt?: boolean - userId?: boolean - wcaUserId?: boolean - verified?: boolean - code?: boolean - user?: boolean | UserArgs - }, ExtArgs["result"]["competitorSubscription"]> - - export type CompetitorSubscriptionSelectScalar = { - id?: boolean - createdAt?: boolean - updatedAt?: boolean - userId?: boolean - wcaUserId?: boolean - verified?: boolean - code?: boolean - } - - export type CompetitorSubscriptionInclude = { - user?: boolean | UserArgs - } - - - type CompetitorSubscriptionGetPayload = $Types.GetResult - - type CompetitorSubscriptionCountArgs = - Omit & { - select?: CompetitorSubscriptionCountAggregateInputType | true - } - - export interface CompetitorSubscriptionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CompetitorSubscription'], meta: { name: 'CompetitorSubscription' } } - /** - * Find zero or one CompetitorSubscription that matches the filter. - * @param {CompetitorSubscriptionFindUniqueArgs} args - Arguments to find a CompetitorSubscription - * @example - * // Get one CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one CompetitorSubscription that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CompetitorSubscriptionFindUniqueOrThrowArgs} args - Arguments to find a CompetitorSubscription - * @example - * // Get one CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first CompetitorSubscription that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionFindFirstArgs} args - Arguments to find a CompetitorSubscription - * @example - * // Get one CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first CompetitorSubscription that matches the filter or - * throw `NotFoundError` if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionFindFirstOrThrowArgs} args - Arguments to find a CompetitorSubscription - * @example - * // Get one CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more CompetitorSubscriptions that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all CompetitorSubscriptions - * const competitorSubscriptions = await prisma.competitorSubscription.findMany() - * - * // Get first 10 CompetitorSubscriptions - * const competitorSubscriptions = await prisma.competitorSubscription.findMany({ take: 10 }) - * - * // Only select the `id` - * const competitorSubscriptionWithIdOnly = await prisma.competitorSubscription.findMany({ select: { id: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a CompetitorSubscription. - * @param {CompetitorSubscriptionCreateArgs} args - Arguments to create a CompetitorSubscription. - * @example - * // Create one CompetitorSubscription - * const CompetitorSubscription = await prisma.competitorSubscription.create({ - * data: { - * // ... data to create a CompetitorSubscription - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many CompetitorSubscriptions. - * @param {CompetitorSubscriptionCreateManyArgs} args - Arguments to create many CompetitorSubscriptions. - * @example - * // Create many CompetitorSubscriptions - * const competitorSubscription = await prisma.competitorSubscription.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a CompetitorSubscription. - * @param {CompetitorSubscriptionDeleteArgs} args - Arguments to delete one CompetitorSubscription. - * @example - * // Delete one CompetitorSubscription - * const CompetitorSubscription = await prisma.competitorSubscription.delete({ - * where: { - * // ... filter to delete one CompetitorSubscription - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one CompetitorSubscription. - * @param {CompetitorSubscriptionUpdateArgs} args - Arguments to update one CompetitorSubscription. - * @example - * // Update one CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more CompetitorSubscriptions. - * @param {CompetitorSubscriptionDeleteManyArgs} args - Arguments to filter CompetitorSubscriptions to delete. - * @example - * // Delete a few CompetitorSubscriptions - * const { count } = await prisma.competitorSubscription.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more CompetitorSubscriptions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CompetitorSubscriptions - * const competitorSubscription = await prisma.competitorSubscription.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one CompetitorSubscription. - * @param {CompetitorSubscriptionUpsertArgs} args - Arguments to update or create a CompetitorSubscription. - * @example - * // Update or create a CompetitorSubscription - * const competitorSubscription = await prisma.competitorSubscription.upsert({ - * create: { - * // ... data to create a CompetitorSubscription - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CompetitorSubscription we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CompetitorSubscriptionClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of CompetitorSubscriptions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionCountArgs} args - Arguments to filter CompetitorSubscriptions to count. - * @example - * // Count the number of CompetitorSubscriptions - * const count = await prisma.competitorSubscription.count({ - * where: { - * // ... the filter for the CompetitorSubscriptions we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CompetitorSubscription. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CompetitorSubscription. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitorSubscriptionGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CompetitorSubscriptionGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CompetitorSubscriptionGroupByArgs['orderBy'] } - : { orderBy?: CompetitorSubscriptionGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitorSubscriptionGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for CompetitorSubscription. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__CompetitorSubscriptionClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - - user = {}>(args?: Subset>): Prisma__UserClient<$Types.GetResult, T, 'findUnique', never> | Null, never, ExtArgs>; - - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } - - - - // Custom InputTypes - - /** - * CompetitorSubscription base type for findUnique actions - */ - export type CompetitorSubscriptionFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter, which CompetitorSubscription to fetch. - */ - where: CompetitorSubscriptionWhereUniqueInput - } - - /** - * CompetitorSubscription findUnique - */ - export interface CompetitorSubscriptionFindUniqueArgs extends CompetitorSubscriptionFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitorSubscription findUniqueOrThrow - */ - export type CompetitorSubscriptionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter, which CompetitorSubscription to fetch. - */ - where: CompetitorSubscriptionWhereUniqueInput - } - - - /** - * CompetitorSubscription base type for findFirst actions - */ - export type CompetitorSubscriptionFindFirstArgsBase = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter, which CompetitorSubscription to fetch. - */ - where?: CompetitorSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitorSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitorSubscriptions. - */ - cursor?: CompetitorSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitorSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitorSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitorSubscriptions. - */ - distinct?: Enumerable - } - - /** - * CompetitorSubscription findFirst - */ - export interface CompetitorSubscriptionFindFirstArgs extends CompetitorSubscriptionFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitorSubscription findFirstOrThrow - */ - export type CompetitorSubscriptionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter, which CompetitorSubscription to fetch. - */ - where?: CompetitorSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitorSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitorSubscriptions. - */ - cursor?: CompetitorSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitorSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitorSubscriptions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitorSubscriptions. - */ - distinct?: Enumerable - } - - - /** - * CompetitorSubscription findMany - */ - export type CompetitorSubscriptionFindManyArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter, which CompetitorSubscriptions to fetch. - */ - where?: CompetitorSubscriptionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitorSubscriptions to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CompetitorSubscriptions. - */ - cursor?: CompetitorSubscriptionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitorSubscriptions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitorSubscriptions. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * CompetitorSubscription create - */ - export type CompetitorSubscriptionCreateArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * The data needed to create a CompetitorSubscription. - */ - data: XOR - } - - - /** - * CompetitorSubscription createMany - */ - export type CompetitorSubscriptionCreateManyArgs = { - /** - * The data used to create many CompetitorSubscriptions. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * CompetitorSubscription update - */ - export type CompetitorSubscriptionUpdateArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * The data needed to update a CompetitorSubscription. - */ - data: XOR - /** - * Choose, which CompetitorSubscription to update. - */ - where: CompetitorSubscriptionWhereUniqueInput - } - - - /** - * CompetitorSubscription updateMany - */ - export type CompetitorSubscriptionUpdateManyArgs = { - /** - * The data used to update CompetitorSubscriptions. - */ - data: XOR - /** - * Filter which CompetitorSubscriptions to update - */ - where?: CompetitorSubscriptionWhereInput - } - - - /** - * CompetitorSubscription upsert - */ - export type CompetitorSubscriptionUpsertArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * The filter to search for the CompetitorSubscription to update in case it exists. - */ - where: CompetitorSubscriptionWhereUniqueInput - /** - * In case the CompetitorSubscription found by the `where` argument doesn't exist, create a new CompetitorSubscription with this data. - */ - create: XOR - /** - * In case the CompetitorSubscription was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * CompetitorSubscription delete - */ - export type CompetitorSubscriptionDeleteArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - /** - * Filter which CompetitorSubscription to delete. - */ - where: CompetitorSubscriptionWhereUniqueInput - } - - - /** - * CompetitorSubscription deleteMany - */ - export type CompetitorSubscriptionDeleteManyArgs = { - /** - * Filter which CompetitorSubscriptions to delete - */ - where?: CompetitorSubscriptionWhereInput - } - - - /** - * CompetitorSubscription without action - */ - export type CompetitorSubscriptionArgs = { - /** - * Select specific fields to fetch from the CompetitorSubscription - */ - select?: CompetitorSubscriptionSelect | null - /** - * Choose, which related nodes to fetch as well. - */ - include?: CompetitorSubscriptionInclude | null - } - - - - /** - * Model CompetitionSid - */ - - - export type AggregateCompetitionSid = { - _count: CompetitionSidCountAggregateOutputType | null - _min: CompetitionSidMinAggregateOutputType | null - _max: CompetitionSidMaxAggregateOutputType | null - } - - export type CompetitionSidMinAggregateOutputType = { - createdAt: Date | null - updatedAt: Date | null - competitionId: string | null - sid: string | null - } - - export type CompetitionSidMaxAggregateOutputType = { - createdAt: Date | null - updatedAt: Date | null - competitionId: string | null - sid: string | null - } - - export type CompetitionSidCountAggregateOutputType = { - createdAt: number - updatedAt: number - competitionId: number - sid: number - _all: number - } - - - export type CompetitionSidMinAggregateInputType = { - createdAt?: true - updatedAt?: true - competitionId?: true - sid?: true - } - - export type CompetitionSidMaxAggregateInputType = { - createdAt?: true - updatedAt?: true - competitionId?: true - sid?: true - } - - export type CompetitionSidCountAggregateInputType = { - createdAt?: true - updatedAt?: true - competitionId?: true - sid?: true - _all?: true - } - - export type CompetitionSidAggregateArgs = { - /** - * Filter which CompetitionSid to aggregate. - */ - where?: CompetitionSidWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSids to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: CompetitionSidWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSids from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSids. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned CompetitionSids - **/ - _count?: true | CompetitionSidCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: CompetitionSidMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: CompetitionSidMaxAggregateInputType - } - - export type GetCompetitionSidAggregateType = { - [P in keyof T & keyof AggregateCompetitionSid]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : GetScalarType - : GetScalarType - } - - - - - export type CompetitionSidGroupByArgs = { - where?: CompetitionSidWhereInput - orderBy?: Enumerable - by: CompetitionSidScalarFieldEnum[] - having?: CompetitionSidScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: CompetitionSidCountAggregateInputType | true - _min?: CompetitionSidMinAggregateInputType - _max?: CompetitionSidMaxAggregateInputType - } - - - export type CompetitionSidGroupByOutputType = { - createdAt: Date - updatedAt: Date - competitionId: string - sid: string - _count: CompetitionSidCountAggregateOutputType | null - _min: CompetitionSidMinAggregateOutputType | null - _max: CompetitionSidMaxAggregateOutputType | null - } - - type GetCompetitionSidGroupByPayload = Prisma.PrismaPromise< - Array< - PickArray & - { - [P in ((keyof T) & (keyof CompetitionSidGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : GetScalarType - : GetScalarType - } - > - > - - - export type CompetitionSidSelect = $Extensions.GetSelect<{ - createdAt?: boolean - updatedAt?: boolean - competitionId?: boolean - sid?: boolean - }, ExtArgs["result"]["competitionSid"]> - - export type CompetitionSidSelectScalar = { - createdAt?: boolean - updatedAt?: boolean - competitionId?: boolean - sid?: boolean - } - - - type CompetitionSidGetPayload = $Types.GetResult - - type CompetitionSidCountArgs = - Omit & { - select?: CompetitionSidCountAggregateInputType | true - } - - export interface CompetitionSidDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['CompetitionSid'], meta: { name: 'CompetitionSid' } } - /** - * Find zero or one CompetitionSid that matches the filter. - * @param {CompetitionSidFindUniqueArgs} args - Arguments to find a CompetitionSid - * @example - * // Get one CompetitionSid - * const competitionSid = await prisma.competitionSid.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUnique, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args: SelectSubset> - ): HasReject extends True ? Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUnique', never>, never, ExtArgs> : Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUnique', never> | null, null, ExtArgs> - - /** - * Find one CompetitionSid that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {CompetitionSidFindUniqueOrThrowArgs} args - Arguments to find a CompetitionSid - * @example - * // Get one CompetitionSid - * const competitionSid = await prisma.competitionSid.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findUniqueOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'findUniqueOrThrow', never>, never, ExtArgs> - - /** - * Find the first CompetitionSid that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidFindFirstArgs} args - Arguments to find a CompetitionSid - * @example - * // Get one CompetitionSid - * const competitionSid = await prisma.competitionSid.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirst, LocalRejectSettings = T["rejectOnNotFound"] extends RejectOnNotFound ? T['rejectOnNotFound'] : undefined>( - args?: SelectSubset> - ): HasReject extends True ? Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirst', never>, never, ExtArgs> : Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirst', never> | null, null, ExtArgs> - - /** - * Find the first CompetitionSid that matches the filter or - * throw `NotFoundError` if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidFindFirstOrThrowArgs} args - Arguments to find a CompetitionSid - * @example - * // Get one CompetitionSid - * const competitionSid = await prisma.competitionSid.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - **/ - findFirstOrThrow>( - args?: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'findFirstOrThrow', never>, never, ExtArgs> - - /** - * Find zero or more CompetitionSids that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidFindManyArgs=} args - Arguments to filter and select certain fields only. - * @example - * // Get all CompetitionSids - * const competitionSids = await prisma.competitionSid.findMany() - * - * // Get first 10 CompetitionSids - * const competitionSids = await prisma.competitionSid.findMany({ take: 10 }) - * - * // Only select the `createdAt` - * const competitionSidWithCreatedAtOnly = await prisma.competitionSid.findMany({ select: { createdAt: true } }) - * - **/ - findMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise<$Types.GetResult, T, 'findMany', never>> - - /** - * Create a CompetitionSid. - * @param {CompetitionSidCreateArgs} args - Arguments to create a CompetitionSid. - * @example - * // Create one CompetitionSid - * const CompetitionSid = await prisma.competitionSid.create({ - * data: { - * // ... data to create a CompetitionSid - * } - * }) - * - **/ - create>( - args: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'create', never>, never, ExtArgs> - - /** - * Create many CompetitionSids. - * @param {CompetitionSidCreateManyArgs} args - Arguments to create many CompetitionSids. - * @example - * // Create many CompetitionSids - * const competitionSid = await prisma.competitionSid.createMany({ - * data: { - * // ... provide data here - * } - * }) - * - **/ - createMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Delete a CompetitionSid. - * @param {CompetitionSidDeleteArgs} args - Arguments to delete one CompetitionSid. - * @example - * // Delete one CompetitionSid - * const CompetitionSid = await prisma.competitionSid.delete({ - * where: { - * // ... filter to delete one CompetitionSid - * } - * }) - * - **/ - delete>( - args: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'delete', never>, never, ExtArgs> - - /** - * Update one CompetitionSid. - * @param {CompetitionSidUpdateArgs} args - Arguments to update one CompetitionSid. - * @example - * // Update one CompetitionSid - * const competitionSid = await prisma.competitionSid.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - update>( - args: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'update', never>, never, ExtArgs> - - /** - * Delete zero or more CompetitionSids. - * @param {CompetitionSidDeleteManyArgs} args - Arguments to filter CompetitionSids to delete. - * @example - * // Delete a few CompetitionSids - * const { count } = await prisma.competitionSid.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - **/ - deleteMany>( - args?: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Update zero or more CompetitionSids. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many CompetitionSids - * const competitionSid = await prisma.competitionSid.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - **/ - updateMany>( - args: SelectSubset> - ): Prisma.PrismaPromise - - /** - * Create or update one CompetitionSid. - * @param {CompetitionSidUpsertArgs} args - Arguments to update or create a CompetitionSid. - * @example - * // Update or create a CompetitionSid - * const competitionSid = await prisma.competitionSid.upsert({ - * create: { - * // ... data to create a CompetitionSid - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the CompetitionSid we want to update - * } - * }) - **/ - upsert>( - args: SelectSubset> - ): Prisma__CompetitionSidClient<$Types.GetResult, T, 'upsert', never>, never, ExtArgs> - - /** - * Count the number of CompetitionSids. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidCountArgs} args - Arguments to filter CompetitionSids to count. - * @example - * // Count the number of CompetitionSids - * const count = await prisma.competitionSid.count({ - * where: { - * // ... the filter for the CompetitionSids we want to count - * } - * }) - **/ - count( - args?: Subset, - ): Prisma.PrismaPromise< - T extends $Utils.Record<'select', any> - ? T['select'] extends true - ? number - : GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a CompetitionSid. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Subset): Prisma.PrismaPromise> - - /** - * Group by CompetitionSid. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {CompetitionSidGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends CompetitionSidGroupByArgs, - HasSelectOrTake extends Or< - Extends<'skip', Keys>, - Extends<'take', Keys> - >, - OrderByArg extends True extends HasSelectOrTake - ? { orderBy: CompetitionSidGroupByArgs['orderBy'] } - : { orderBy?: CompetitionSidGroupByArgs['orderBy'] }, - OrderFields extends ExcludeUnderscoreKeys>>, - ByFields extends TupleToUnion, - ByValid extends Has, - HavingFields extends GetHavingFields, - HavingValid extends Has, - ByEmpty extends T['by'] extends never[] ? True : False, - InputErrors extends ByEmpty extends True - ? `Error: "by" must not be empty.` - : HavingValid extends False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Keys - ? 'orderBy' extends Keys - ? ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCompetitionSidGroupByPayload : Prisma.PrismaPromise - - } - - /** - * The delegate class that acts as a "Promise-like" for CompetitionSid. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ - export class Prisma__CompetitionSidClient implements Prisma.PrismaPromise { - private readonly _dmmf; - private readonly _queryType; - private readonly _rootField; - private readonly _clientMethod; - private readonly _args; - private readonly _dataPath; - private readonly _errorFormat; - private readonly _measurePerformance?; - private _isList; - private _callsite; - private _requestPromise?; - readonly [Symbol.toStringTag]: 'PrismaPromise'; - constructor(_dmmf: runtime.DMMFClass, _queryType: 'query' | 'mutation', _rootField: string, _clientMethod: string, _args: any, _dataPath: string[], _errorFormat: ErrorFormat, _measurePerformance?: boolean | undefined, _isList?: boolean); - - - private get _document(); - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): Promise; - } - - - - // Custom InputTypes - - /** - * CompetitionSid base type for findUnique actions - */ - export type CompetitionSidFindUniqueArgsBase = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter, which CompetitionSid to fetch. - */ - where: CompetitionSidWhereUniqueInput - } - - /** - * CompetitionSid findUnique - */ - export interface CompetitionSidFindUniqueArgs extends CompetitionSidFindUniqueArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findUniqueOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitionSid findUniqueOrThrow - */ - export type CompetitionSidFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter, which CompetitionSid to fetch. - */ - where: CompetitionSidWhereUniqueInput - } - - - /** - * CompetitionSid base type for findFirst actions - */ - export type CompetitionSidFindFirstArgsBase = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter, which CompetitionSid to fetch. - */ - where?: CompetitionSidWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSids to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitionSids. - */ - cursor?: CompetitionSidWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSids from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSids. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitionSids. - */ - distinct?: Enumerable - } - - /** - * CompetitionSid findFirst - */ - export interface CompetitionSidFindFirstArgs extends CompetitionSidFindFirstArgsBase { - /** - * Throw an Error if query returns no results - * @deprecated since 4.0.0: use `findFirstOrThrow` method instead - */ - rejectOnNotFound?: RejectOnNotFound - } - - - /** - * CompetitionSid findFirstOrThrow - */ - export type CompetitionSidFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter, which CompetitionSid to fetch. - */ - where?: CompetitionSidWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSids to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for CompetitionSids. - */ - cursor?: CompetitionSidWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSids from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSids. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of CompetitionSids. - */ - distinct?: Enumerable - } - - - /** - * CompetitionSid findMany - */ - export type CompetitionSidFindManyArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter, which CompetitionSids to fetch. - */ - where?: CompetitionSidWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of CompetitionSids to fetch. - */ - orderBy?: Enumerable - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing CompetitionSids. - */ - cursor?: CompetitionSidWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` CompetitionSids from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` CompetitionSids. - */ - skip?: number - distinct?: Enumerable - } - - - /** - * CompetitionSid create - */ - export type CompetitionSidCreateArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * The data needed to create a CompetitionSid. - */ - data: XOR - } - - - /** - * CompetitionSid createMany - */ - export type CompetitionSidCreateManyArgs = { - /** - * The data used to create many CompetitionSids. - */ - data: Enumerable - skipDuplicates?: boolean - } - - - /** - * CompetitionSid update - */ - export type CompetitionSidUpdateArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * The data needed to update a CompetitionSid. - */ - data: XOR - /** - * Choose, which CompetitionSid to update. - */ - where: CompetitionSidWhereUniqueInput - } - - - /** - * CompetitionSid updateMany - */ - export type CompetitionSidUpdateManyArgs = { - /** - * The data used to update CompetitionSids. - */ - data: XOR - /** - * Filter which CompetitionSids to update - */ - where?: CompetitionSidWhereInput - } - - - /** - * CompetitionSid upsert - */ - export type CompetitionSidUpsertArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * The filter to search for the CompetitionSid to update in case it exists. - */ - where: CompetitionSidWhereUniqueInput - /** - * In case the CompetitionSid found by the `where` argument doesn't exist, create a new CompetitionSid with this data. - */ - create: XOR - /** - * In case the CompetitionSid was found with the provided `where` argument, update it with this data. - */ - update: XOR - } - - - /** - * CompetitionSid delete - */ - export type CompetitionSidDeleteArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - /** - * Filter which CompetitionSid to delete. - */ - where: CompetitionSidWhereUniqueInput - } - - - /** - * CompetitionSid deleteMany - */ - export type CompetitionSidDeleteManyArgs = { - /** - * Filter which CompetitionSids to delete - */ - where?: CompetitionSidWhereInput - } - - - /** - * CompetitionSid without action - */ - export type CompetitionSidArgs = { - /** - * Select specific fields to fetch from the CompetitionSid - */ - select?: CompetitionSidSelect | null - } - - - - /** - * Enums - */ - - export const TransactionIsolationLevel: { - ReadUncommitted: 'ReadUncommitted', - ReadCommitted: 'ReadCommitted', - RepeatableRead: 'RepeatableRead', - Serializable: 'Serializable' - }; - - export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] - - - export const AuditLogScalarFieldEnum: { - id: 'id', - action: 'action', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - userId: 'userId', - competitionId: 'competitionId' - }; - - export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum] - - - export const UserScalarFieldEnum: { - id: 'id', - phoneNumber: 'phoneNumber' - }; - - export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - - - export const PushSubscriptionScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - endpoint: 'endpoint', - p256dh: 'p256dh', - auth: 'auth', - source: 'source', - externalSubject: 'externalSubject', - disabledAt: 'disabledAt' - }; - - export type PushSubscriptionScalarFieldEnum = (typeof PushSubscriptionScalarFieldEnum)[keyof typeof PushSubscriptionScalarFieldEnum] - - - export const AssignmentWatchScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId' - }; - - export type AssignmentWatchScalarFieldEnum = (typeof AssignmentWatchScalarFieldEnum)[keyof typeof AssignmentWatchScalarFieldEnum] - - - export const AssignmentSnapshotScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - assignmentsHash: 'assignmentsHash' - }; - - export type AssignmentSnapshotScalarFieldEnum = (typeof AssignmentSnapshotScalarFieldEnum)[keyof typeof AssignmentSnapshotScalarFieldEnum] - - - export const PushDeliveryScalarFieldEnum: { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - dedupeKey: 'dedupeKey', - status: 'status', - error: 'error' - }; - - export type PushDeliveryScalarFieldEnum = (typeof PushDeliveryScalarFieldEnum)[keyof typeof PushDeliveryScalarFieldEnum] + export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] export const SessionScalarFieldEnum: { @@ -11675,14 +7226,6 @@ export namespace Prisma { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] - export const NullableJsonNullValueInput: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull - }; - - export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] - - export const QueryMode: { default: 'default', insensitive: 'insensitive' @@ -11691,23 +7234,6 @@ export namespace Prisma { export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - export const NullsOrder: { - first: 'first', - last: 'last' - }; - - export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] - - - export const JsonNullValueFilter: { - DbNull: typeof DbNull, - JsonNull: typeof JsonNull, - AnyNull: typeof AnyNull - }; - - export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] - - /** * Deep Input Types */ @@ -11740,312 +7266,72 @@ export namespace Prisma { id?: number } - export type AuditLogOrderByWithAggregationInput = { - id?: SortOrder - action?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - userId?: SortOrder - competitionId?: SortOrder - _count?: AuditLogCountOrderByAggregateInput - _avg?: AuditLogAvgOrderByAggregateInput - _max?: AuditLogMaxOrderByAggregateInput - _min?: AuditLogMinOrderByAggregateInput - _sum?: AuditLogSumOrderByAggregateInput - } - - export type AuditLogScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - action?: StringWithAggregatesFilter | string - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - userId?: IntWithAggregatesFilter | number - competitionId?: StringWithAggregatesFilter | string - } - - export type UserWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - phoneNumber?: StringFilter | string - AuditLog?: AuditLogListRelationFilter - CompetitionSubscription?: CompetitionSubscriptionListRelationFilter - CompetitorSubscription?: CompetitorSubscriptionListRelationFilter - } - - export type UserOrderByWithRelationInput = { - id?: SortOrder - phoneNumber?: SortOrder - AuditLog?: AuditLogOrderByRelationAggregateInput - CompetitionSubscription?: CompetitionSubscriptionOrderByRelationAggregateInput - CompetitorSubscription?: CompetitorSubscriptionOrderByRelationAggregateInput - } - - export type UserWhereUniqueInput = { - id?: number - phoneNumber?: string - } - - export type UserOrderByWithAggregationInput = { - id?: SortOrder - phoneNumber?: SortOrder - _count?: UserCountOrderByAggregateInput - _avg?: UserAvgOrderByAggregateInput - _max?: UserMaxOrderByAggregateInput - _min?: UserMinOrderByAggregateInput - _sum?: UserSumOrderByAggregateInput - } - - export type UserScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - phoneNumber?: StringWithAggregatesFilter | string - } - - export type PushSubscriptionWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - endpoint?: StringFilter | string - p256dh?: StringFilter | string - auth?: StringFilter | string - source?: EnumPushSubscriptionSourceFilter | PushSubscriptionSource - externalSubject?: StringFilter | string - disabledAt?: DateTimeNullableFilter | Date | string | null - watches?: AssignmentWatchListRelationFilter - deliveries?: PushDeliveryListRelationFilter - } - - export type PushSubscriptionOrderByWithRelationInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - endpoint?: SortOrder - p256dh?: SortOrder - auth?: SortOrder - source?: SortOrder - externalSubject?: SortOrder - disabledAt?: SortOrderInput | SortOrder - watches?: AssignmentWatchOrderByRelationAggregateInput - deliveries?: PushDeliveryOrderByRelationAggregateInput - } - - export type PushSubscriptionWhereUniqueInput = { - id?: number - endpoint?: string - } - - export type PushSubscriptionOrderByWithAggregationInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - endpoint?: SortOrder - p256dh?: SortOrder - auth?: SortOrder - source?: SortOrder - externalSubject?: SortOrder - disabledAt?: SortOrderInput | SortOrder - _count?: PushSubscriptionCountOrderByAggregateInput - _avg?: PushSubscriptionAvgOrderByAggregateInput - _max?: PushSubscriptionMaxOrderByAggregateInput - _min?: PushSubscriptionMinOrderByAggregateInput - _sum?: PushSubscriptionSumOrderByAggregateInput - } - - export type PushSubscriptionScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - endpoint?: StringWithAggregatesFilter | string - p256dh?: StringWithAggregatesFilter | string - auth?: StringWithAggregatesFilter | string - source?: EnumPushSubscriptionSourceWithAggregatesFilter | PushSubscriptionSource - externalSubject?: StringWithAggregatesFilter | string - disabledAt?: DateTimeNullableWithAggregatesFilter | Date | string | null - } - - export type AssignmentWatchWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - pushSubscriptionId?: IntFilter | number - competitionId?: StringFilter | string - wcaUserId?: IntFilter | number - pushSubscription?: XOR - } - - export type AssignmentWatchOrderByWithRelationInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - pushSubscription?: PushSubscriptionOrderByWithRelationInput - } - - export type AssignmentWatchWhereUniqueInput = { - id?: number - pushSubscriptionId_competitionId_wcaUserId?: AssignmentWatchPushSubscriptionIdCompetitionIdWcaUserIdCompoundUniqueInput - } - - export type AssignmentWatchOrderByWithAggregationInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - _count?: AssignmentWatchCountOrderByAggregateInput - _avg?: AssignmentWatchAvgOrderByAggregateInput - _max?: AssignmentWatchMaxOrderByAggregateInput - _min?: AssignmentWatchMinOrderByAggregateInput - _sum?: AssignmentWatchSumOrderByAggregateInput - } - - export type AssignmentWatchScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntWithAggregatesFilter | number - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - pushSubscriptionId?: IntWithAggregatesFilter | number - competitionId?: StringWithAggregatesFilter | string - wcaUserId?: IntWithAggregatesFilter | number - } - - export type AssignmentSnapshotWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - competitionId?: StringFilter | string - wcaUserId?: IntFilter | number - assignmentsHash?: StringFilter | string - } - - export type AssignmentSnapshotOrderByWithRelationInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - assignmentsHash?: SortOrder - } - - export type AssignmentSnapshotWhereUniqueInput = { - id?: number - competitionId_wcaUserId?: AssignmentSnapshotCompetitionIdWcaUserIdCompoundUniqueInput - } - - export type AssignmentSnapshotOrderByWithAggregationInput = { + export type AuditLogOrderByWithAggregationInput = { id?: SortOrder + action?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder + userId?: SortOrder competitionId?: SortOrder - wcaUserId?: SortOrder - assignmentsHash?: SortOrder - _count?: AssignmentSnapshotCountOrderByAggregateInput - _avg?: AssignmentSnapshotAvgOrderByAggregateInput - _max?: AssignmentSnapshotMaxOrderByAggregateInput - _min?: AssignmentSnapshotMinOrderByAggregateInput - _sum?: AssignmentSnapshotSumOrderByAggregateInput - } - - export type AssignmentSnapshotScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable + _count?: AuditLogCountOrderByAggregateInput + _avg?: AuditLogAvgOrderByAggregateInput + _max?: AuditLogMaxOrderByAggregateInput + _min?: AuditLogMinOrderByAggregateInput + _sum?: AuditLogSumOrderByAggregateInput + } + + export type AuditLogScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable id?: IntWithAggregatesFilter | number + action?: StringWithAggregatesFilter | string createdAt?: DateTimeWithAggregatesFilter | Date | string updatedAt?: DateTimeWithAggregatesFilter | Date | string + userId?: IntWithAggregatesFilter | number competitionId?: StringWithAggregatesFilter | string - wcaUserId?: IntWithAggregatesFilter | number - assignmentsHash?: StringWithAggregatesFilter | string } - export type PushDeliveryWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable + export type UserWhereInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - pushSubscriptionId?: IntFilter | number - competitionId?: StringFilter | string - wcaUserId?: IntFilter | number - dedupeKey?: StringFilter | string - status?: EnumPushDeliveryStatusFilter | PushDeliveryStatus - error?: JsonNullableFilter - pushSubscription?: XOR + phoneNumber?: StringFilter | string + AuditLog?: AuditLogListRelationFilter + CompetitionSubscription?: CompetitionSubscriptionListRelationFilter + CompetitorSubscription?: CompetitorSubscriptionListRelationFilter } - export type PushDeliveryOrderByWithRelationInput = { + export type UserOrderByWithRelationInput = { id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - dedupeKey?: SortOrder - status?: SortOrder - error?: SortOrderInput | SortOrder - pushSubscription?: PushSubscriptionOrderByWithRelationInput + phoneNumber?: SortOrder + AuditLog?: AuditLogOrderByRelationAggregateInput + CompetitionSubscription?: CompetitionSubscriptionOrderByRelationAggregateInput + CompetitorSubscription?: CompetitorSubscriptionOrderByRelationAggregateInput } - export type PushDeliveryWhereUniqueInput = { + export type UserWhereUniqueInput = { id?: number - pushSubscriptionId_dedupeKey?: PushDeliveryPushSubscriptionIdDedupeKeyCompoundUniqueInput + phoneNumber?: string } - export type PushDeliveryOrderByWithAggregationInput = { + export type UserOrderByWithAggregationInput = { id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - dedupeKey?: SortOrder - status?: SortOrder - error?: SortOrderInput | SortOrder - _count?: PushDeliveryCountOrderByAggregateInput - _avg?: PushDeliveryAvgOrderByAggregateInput - _max?: PushDeliveryMaxOrderByAggregateInput - _min?: PushDeliveryMinOrderByAggregateInput - _sum?: PushDeliverySumOrderByAggregateInput - } - - export type PushDeliveryScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable + phoneNumber?: SortOrder + _count?: UserCountOrderByAggregateInput + _avg?: UserAvgOrderByAggregateInput + _max?: UserMaxOrderByAggregateInput + _min?: UserMinOrderByAggregateInput + _sum?: UserSumOrderByAggregateInput + } + + export type UserScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable id?: IntWithAggregatesFilter | number - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - pushSubscriptionId?: IntWithAggregatesFilter | number - competitionId?: StringWithAggregatesFilter | string - wcaUserId?: IntWithAggregatesFilter | number - dedupeKey?: StringWithAggregatesFilter | string - status?: EnumPushDeliveryStatusWithAggregatesFilter | PushDeliveryStatus - error?: JsonNullableWithAggregatesFilter + phoneNumber?: StringWithAggregatesFilter | string } export type SessionWhereInput = { @@ -12226,416 +7512,128 @@ export namespace Prisma { export type CompetitionSidWhereUniqueInput = { competitionId?: string } - - export type CompetitionSidOrderByWithAggregationInput = { - createdAt?: SortOrder - updatedAt?: SortOrder - competitionId?: SortOrder - sid?: SortOrder - _count?: CompetitionSidCountOrderByAggregateInput - _max?: CompetitionSidMaxOrderByAggregateInput - _min?: CompetitionSidMinOrderByAggregateInput - } - - export type CompetitionSidScalarWhereWithAggregatesInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - createdAt?: DateTimeWithAggregatesFilter | Date | string - updatedAt?: DateTimeWithAggregatesFilter | Date | string - competitionId?: StringWithAggregatesFilter | string - sid?: StringWithAggregatesFilter | string - } - - export type AuditLogCreateInput = { - action: string - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - user: UserCreateNestedOneWithoutAuditLogInput - } - - export type AuditLogUncheckedCreateInput = { - id?: number - action: string - createdAt?: Date | string - updatedAt?: Date | string - userId: number - competitionId: string - } - - export type AuditLogUpdateInput = { - action?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - user?: UserUpdateOneRequiredWithoutAuditLogNestedInput - } - - export type AuditLogUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - action?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - userId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - } - - export type AuditLogCreateManyInput = { - id?: number - action: string - createdAt?: Date | string - updatedAt?: Date | string - userId: number - competitionId: string - } - - export type AuditLogUpdateManyMutationInput = { - action?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - } - - export type AuditLogUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - action?: StringFieldUpdateOperationsInput | string - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - userId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - } - - export type UserCreateInput = { - phoneNumber: string - AuditLog?: AuditLogCreateNestedManyWithoutUserInput - CompetitionSubscription?: CompetitionSubscriptionCreateNestedManyWithoutUserInput - CompetitorSubscription?: CompetitorSubscriptionCreateNestedManyWithoutUserInput - } - - export type UserUncheckedCreateInput = { - id?: number - phoneNumber: string - AuditLog?: AuditLogUncheckedCreateNestedManyWithoutUserInput - CompetitionSubscription?: CompetitionSubscriptionUncheckedCreateNestedManyWithoutUserInput - CompetitorSubscription?: CompetitorSubscriptionUncheckedCreateNestedManyWithoutUserInput - } - - export type UserUpdateInput = { - phoneNumber?: StringFieldUpdateOperationsInput | string - AuditLog?: AuditLogUpdateManyWithoutUserNestedInput - CompetitionSubscription?: CompetitionSubscriptionUpdateManyWithoutUserNestedInput - CompetitorSubscription?: CompetitorSubscriptionUpdateManyWithoutUserNestedInput - } - - export type UserUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - phoneNumber?: StringFieldUpdateOperationsInput | string - AuditLog?: AuditLogUncheckedUpdateManyWithoutUserNestedInput - CompetitionSubscription?: CompetitionSubscriptionUncheckedUpdateManyWithoutUserNestedInput - CompetitorSubscription?: CompetitorSubscriptionUncheckedUpdateManyWithoutUserNestedInput - } - - export type UserCreateManyInput = { - id?: number - phoneNumber: string - } - - export type UserUpdateManyMutationInput = { - phoneNumber?: StringFieldUpdateOperationsInput | string - } - - export type UserUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - phoneNumber?: StringFieldUpdateOperationsInput | string - } - - export type PushSubscriptionCreateInput = { - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - watches?: AssignmentWatchCreateNestedManyWithoutPushSubscriptionInput - deliveries?: PushDeliveryCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionUncheckedCreateInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - watches?: AssignmentWatchUncheckedCreateNestedManyWithoutPushSubscriptionInput - deliveries?: PushDeliveryUncheckedCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionUpdateInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - watches?: AssignmentWatchUpdateManyWithoutPushSubscriptionNestedInput - deliveries?: PushDeliveryUpdateManyWithoutPushSubscriptionNestedInput - } - - export type PushSubscriptionUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - watches?: AssignmentWatchUncheckedUpdateManyWithoutPushSubscriptionNestedInput - deliveries?: PushDeliveryUncheckedUpdateManyWithoutPushSubscriptionNestedInput - } - - export type PushSubscriptionCreateManyInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - } - - export type PushSubscriptionUpdateManyMutationInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type PushSubscriptionUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - } - - export type AssignmentWatchCreateInput = { - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - pushSubscription: PushSubscriptionCreateNestedOneWithoutWatchesInput - } - - export type AssignmentWatchUncheckedCreateInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - pushSubscriptionId: number - competitionId: string - wcaUserId: number - } - - export type AssignmentWatchUpdateInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - pushSubscription?: PushSubscriptionUpdateOneRequiredWithoutWatchesNestedInput - } - - export type AssignmentWatchUncheckedUpdateInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - pushSubscriptionId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - } - - export type AssignmentWatchCreateManyInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - pushSubscriptionId: number - competitionId: string - wcaUserId: number - } - - export type AssignmentWatchUpdateManyMutationInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number + + export type CompetitionSidOrderByWithAggregationInput = { + createdAt?: SortOrder + updatedAt?: SortOrder + competitionId?: SortOrder + sid?: SortOrder + _count?: CompetitionSidCountOrderByAggregateInput + _max?: CompetitionSidMaxOrderByAggregateInput + _min?: CompetitionSidMinOrderByAggregateInput } - export type AssignmentWatchUncheckedUpdateManyInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - pushSubscriptionId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number + export type CompetitionSidScalarWhereWithAggregatesInput = { + AND?: Enumerable + OR?: Enumerable + NOT?: Enumerable + createdAt?: DateTimeWithAggregatesFilter | Date | string + updatedAt?: DateTimeWithAggregatesFilter | Date | string + competitionId?: StringWithAggregatesFilter | string + sid?: StringWithAggregatesFilter | string } - export type AssignmentSnapshotCreateInput = { + export type AuditLogCreateInput = { + action: string createdAt?: Date | string updatedAt?: Date | string competitionId: string - wcaUserId: number - assignmentsHash: string + user: UserCreateNestedOneWithoutAuditLogInput } - export type AssignmentSnapshotUncheckedCreateInput = { + export type AuditLogUncheckedCreateInput = { id?: number + action: string createdAt?: Date | string updatedAt?: Date | string + userId: number competitionId: string - wcaUserId: number - assignmentsHash: string } - export type AssignmentSnapshotUpdateInput = { + export type AuditLogUpdateInput = { + action?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - assignmentsHash?: StringFieldUpdateOperationsInput | string + user?: UserUpdateOneRequiredWithoutAuditLogNestedInput } - export type AssignmentSnapshotUncheckedUpdateInput = { + export type AuditLogUncheckedUpdateInput = { id?: IntFieldUpdateOperationsInput | number + action?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userId?: IntFieldUpdateOperationsInput | number competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - assignmentsHash?: StringFieldUpdateOperationsInput | string } - export type AssignmentSnapshotCreateManyInput = { + export type AuditLogCreateManyInput = { id?: number + action: string createdAt?: Date | string updatedAt?: Date | string + userId: number competitionId: string - wcaUserId: number - assignmentsHash: string } - export type AssignmentSnapshotUpdateManyMutationInput = { + export type AuditLogUpdateManyMutationInput = { + action?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - assignmentsHash?: StringFieldUpdateOperationsInput | string } - export type AssignmentSnapshotUncheckedUpdateManyInput = { + export type AuditLogUncheckedUpdateManyInput = { id?: IntFieldUpdateOperationsInput | number + action?: StringFieldUpdateOperationsInput | string createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + userId?: IntFieldUpdateOperationsInput | number competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - assignmentsHash?: StringFieldUpdateOperationsInput | string } - export type PushDeliveryCreateInput = { - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - pushSubscription: PushSubscriptionCreateNestedOneWithoutDeliveriesInput + export type UserCreateInput = { + phoneNumber: string + AuditLog?: AuditLogCreateNestedManyWithoutUserInput + CompetitionSubscription?: CompetitionSubscriptionCreateNestedManyWithoutUserInput + CompetitorSubscription?: CompetitorSubscriptionCreateNestedManyWithoutUserInput } - export type PushDeliveryUncheckedCreateInput = { + export type UserUncheckedCreateInput = { id?: number - createdAt?: Date | string - updatedAt?: Date | string - pushSubscriptionId: number - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue + phoneNumber: string + AuditLog?: AuditLogUncheckedCreateNestedManyWithoutUserInput + CompetitionSubscription?: CompetitionSubscriptionUncheckedCreateNestedManyWithoutUserInput + CompetitorSubscription?: CompetitorSubscriptionUncheckedCreateNestedManyWithoutUserInput } - export type PushDeliveryUpdateInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - pushSubscription?: PushSubscriptionUpdateOneRequiredWithoutDeliveriesNestedInput + export type UserUpdateInput = { + phoneNumber?: StringFieldUpdateOperationsInput | string + AuditLog?: AuditLogUpdateManyWithoutUserNestedInput + CompetitionSubscription?: CompetitionSubscriptionUpdateManyWithoutUserNestedInput + CompetitorSubscription?: CompetitorSubscriptionUpdateManyWithoutUserNestedInput } - export type PushDeliveryUncheckedUpdateInput = { + export type UserUncheckedUpdateInput = { id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - pushSubscriptionId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue + phoneNumber?: StringFieldUpdateOperationsInput | string + AuditLog?: AuditLogUncheckedUpdateManyWithoutUserNestedInput + CompetitionSubscription?: CompetitionSubscriptionUncheckedUpdateManyWithoutUserNestedInput + CompetitorSubscription?: CompetitorSubscriptionUncheckedUpdateManyWithoutUserNestedInput } - export type PushDeliveryCreateManyInput = { + export type UserCreateManyInput = { id?: number - createdAt?: Date | string - updatedAt?: Date | string - pushSubscriptionId: number - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue + phoneNumber: string } - export type PushDeliveryUpdateManyMutationInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue + export type UserUpdateManyMutationInput = { + phoneNumber?: StringFieldUpdateOperationsInput | string } - export type PushDeliveryUncheckedUpdateManyInput = { + export type UserUncheckedUpdateManyInput = { id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - pushSubscriptionId?: IntFieldUpdateOperationsInput | number - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue + phoneNumber?: StringFieldUpdateOperationsInput | string } export type SessionCreateInput = { @@ -13007,363 +8005,45 @@ export namespace Prisma { none?: CompetitionSubscriptionWhereInput } - export type CompetitorSubscriptionListRelationFilter = { - every?: CompetitorSubscriptionWhereInput - some?: CompetitorSubscriptionWhereInput - none?: CompetitorSubscriptionWhereInput - } - - export type AuditLogOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CompetitionSubscriptionOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type CompetitorSubscriptionOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type UserCountOrderByAggregateInput = { - id?: SortOrder - phoneNumber?: SortOrder - } - - export type UserAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type UserMaxOrderByAggregateInput = { - id?: SortOrder - phoneNumber?: SortOrder - } - - export type UserMinOrderByAggregateInput = { - id?: SortOrder - phoneNumber?: SortOrder - } - - export type UserSumOrderByAggregateInput = { - id?: SortOrder - } - - export type EnumPushSubscriptionSourceFilter = { - equals?: PushSubscriptionSource - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushSubscriptionSourceFilter | PushSubscriptionSource - } - - export type DateTimeNullableFilter = { - equals?: Date | string | null - in?: Enumerable | Enumerable | Date | string | null - notIn?: Enumerable | Enumerable | Date | string | null - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeNullableFilter | Date | string | null - } - - export type AssignmentWatchListRelationFilter = { - every?: AssignmentWatchWhereInput - some?: AssignmentWatchWhereInput - none?: AssignmentWatchWhereInput - } - - export type PushDeliveryListRelationFilter = { - every?: PushDeliveryWhereInput - some?: PushDeliveryWhereInput - none?: PushDeliveryWhereInput - } - - export type SortOrderInput = { - sort: SortOrder - nulls?: NullsOrder - } - - export type AssignmentWatchOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type PushDeliveryOrderByRelationAggregateInput = { - _count?: SortOrder - } - - export type PushSubscriptionCountOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - endpoint?: SortOrder - p256dh?: SortOrder - auth?: SortOrder - source?: SortOrder - externalSubject?: SortOrder - disabledAt?: SortOrder - } - - export type PushSubscriptionAvgOrderByAggregateInput = { - id?: SortOrder - } - - export type PushSubscriptionMaxOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - endpoint?: SortOrder - p256dh?: SortOrder - auth?: SortOrder - source?: SortOrder - externalSubject?: SortOrder - disabledAt?: SortOrder - } - - export type PushSubscriptionMinOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - endpoint?: SortOrder - p256dh?: SortOrder - auth?: SortOrder - source?: SortOrder - externalSubject?: SortOrder - disabledAt?: SortOrder - } - - export type PushSubscriptionSumOrderByAggregateInput = { - id?: SortOrder - } - - export type EnumPushSubscriptionSourceWithAggregatesFilter = { - equals?: PushSubscriptionSource - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushSubscriptionSourceWithAggregatesFilter | PushSubscriptionSource - _count?: NestedIntFilter - _min?: NestedEnumPushSubscriptionSourceFilter - _max?: NestedEnumPushSubscriptionSourceFilter - } - - export type DateTimeNullableWithAggregatesFilter = { - equals?: Date | string | null - in?: Enumerable | Enumerable | Date | string | null - notIn?: Enumerable | Enumerable | Date | string | null - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeNullableWithAggregatesFilter | Date | string | null - _count?: NestedIntNullableFilter - _min?: NestedDateTimeNullableFilter - _max?: NestedDateTimeNullableFilter - } - - export type PushSubscriptionRelationFilter = { - is?: PushSubscriptionWhereInput | null - isNot?: PushSubscriptionWhereInput | null - } - - export type AssignmentWatchPushSubscriptionIdCompetitionIdWcaUserIdCompoundUniqueInput = { - pushSubscriptionId: number - competitionId: string - wcaUserId: number - } - - export type AssignmentWatchCountOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentWatchAvgOrderByAggregateInput = { - id?: SortOrder - pushSubscriptionId?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentWatchMaxOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentWatchMinOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentWatchSumOrderByAggregateInput = { - id?: SortOrder - pushSubscriptionId?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentSnapshotCompetitionIdWcaUserIdCompoundUniqueInput = { - competitionId: string - wcaUserId: number - } - - export type AssignmentSnapshotCountOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - assignmentsHash?: SortOrder - } - - export type AssignmentSnapshotAvgOrderByAggregateInput = { - id?: SortOrder - wcaUserId?: SortOrder - } - - export type AssignmentSnapshotMaxOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - assignmentsHash?: SortOrder - } - - export type AssignmentSnapshotMinOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - assignmentsHash?: SortOrder + export type CompetitorSubscriptionListRelationFilter = { + every?: CompetitorSubscriptionWhereInput + some?: CompetitorSubscriptionWhereInput + none?: CompetitorSubscriptionWhereInput } - export type AssignmentSnapshotSumOrderByAggregateInput = { - id?: SortOrder - wcaUserId?: SortOrder + export type AuditLogOrderByRelationAggregateInput = { + _count?: SortOrder } - export type EnumPushDeliveryStatusFilter = { - equals?: PushDeliveryStatus - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushDeliveryStatusFilter | PushDeliveryStatus + export type CompetitionSubscriptionOrderByRelationAggregateInput = { + _count?: SortOrder } - export type JsonNullableFilter = - | PatchUndefined< - Either, Exclude, 'path'>>, - Required - > - | OptionalFlat, 'path'>> - - export type JsonNullableFilterBase = { - equals?: InputJsonValue | JsonNullValueFilter - path?: string[] - string_contains?: string - string_starts_with?: string - string_ends_with?: string - array_contains?: InputJsonValue | null - array_starts_with?: InputJsonValue | null - array_ends_with?: InputJsonValue | null - lt?: InputJsonValue - lte?: InputJsonValue - gt?: InputJsonValue - gte?: InputJsonValue - not?: InputJsonValue | JsonNullValueFilter - } - - export type PushDeliveryPushSubscriptionIdDedupeKeyCompoundUniqueInput = { - pushSubscriptionId: number - dedupeKey: string - } - - export type PushDeliveryCountOrderByAggregateInput = { - id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - dedupeKey?: SortOrder - status?: SortOrder - error?: SortOrder + + export type CompetitorSubscriptionOrderByRelationAggregateInput = { + _count?: SortOrder } - export type PushDeliveryAvgOrderByAggregateInput = { + export type UserCountOrderByAggregateInput = { id?: SortOrder - pushSubscriptionId?: SortOrder - wcaUserId?: SortOrder + phoneNumber?: SortOrder } - export type PushDeliveryMaxOrderByAggregateInput = { + export type UserAvgOrderByAggregateInput = { id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - dedupeKey?: SortOrder - status?: SortOrder } - export type PushDeliveryMinOrderByAggregateInput = { + export type UserMaxOrderByAggregateInput = { id?: SortOrder - createdAt?: SortOrder - updatedAt?: SortOrder - pushSubscriptionId?: SortOrder - competitionId?: SortOrder - wcaUserId?: SortOrder - dedupeKey?: SortOrder - status?: SortOrder + phoneNumber?: SortOrder } - export type PushDeliverySumOrderByAggregateInput = { + export type UserMinOrderByAggregateInput = { id?: SortOrder - pushSubscriptionId?: SortOrder - wcaUserId?: SortOrder + phoneNumber?: SortOrder } - export type EnumPushDeliveryStatusWithAggregatesFilter = { - equals?: PushDeliveryStatus - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushDeliveryStatusWithAggregatesFilter | PushDeliveryStatus - _count?: NestedIntFilter - _min?: NestedEnumPushDeliveryStatusFilter - _max?: NestedEnumPushDeliveryStatusFilter - } - export type JsonNullableWithAggregatesFilter = - | PatchUndefined< - Either, Exclude, 'path'>>, - Required - > - | OptionalFlat, 'path'>> - - export type JsonNullableWithAggregatesFilterBase = { - equals?: InputJsonValue | JsonNullValueFilter - path?: string[] - string_contains?: string - string_starts_with?: string - string_ends_with?: string - array_contains?: InputJsonValue | null - array_starts_with?: InputJsonValue | null - array_ends_with?: InputJsonValue | null - lt?: InputJsonValue - lte?: InputJsonValue - gt?: InputJsonValue - gte?: InputJsonValue - not?: InputJsonValue | JsonNullValueFilter - _count?: NestedIntNullableFilter - _min?: NestedJsonNullableFilter - _max?: NestedJsonNullableFilter + export type UserSumOrderByAggregateInput = { + id?: SortOrder } export type SessionCountOrderByAggregateInput = { @@ -13688,130 +8368,6 @@ export namespace Prisma { deleteMany?: Enumerable } - export type AssignmentWatchCreateNestedManyWithoutPushSubscriptionInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: AssignmentWatchCreateManyPushSubscriptionInputEnvelope - connect?: Enumerable - } - - export type PushDeliveryCreateNestedManyWithoutPushSubscriptionInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: PushDeliveryCreateManyPushSubscriptionInputEnvelope - connect?: Enumerable - } - - export type AssignmentWatchUncheckedCreateNestedManyWithoutPushSubscriptionInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: AssignmentWatchCreateManyPushSubscriptionInputEnvelope - connect?: Enumerable - } - - export type PushDeliveryUncheckedCreateNestedManyWithoutPushSubscriptionInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - createMany?: PushDeliveryCreateManyPushSubscriptionInputEnvelope - connect?: Enumerable - } - - export type EnumPushSubscriptionSourceFieldUpdateOperationsInput = { - set?: PushSubscriptionSource - } - - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null - } - - export type AssignmentWatchUpdateManyWithoutPushSubscriptionNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: AssignmentWatchCreateManyPushSubscriptionInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type PushDeliveryUpdateManyWithoutPushSubscriptionNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: PushDeliveryCreateManyPushSubscriptionInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type AssignmentWatchUncheckedUpdateManyWithoutPushSubscriptionNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: AssignmentWatchCreateManyPushSubscriptionInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type PushDeliveryUncheckedUpdateManyWithoutPushSubscriptionNestedInput = { - create?: XOR, Enumerable> - connectOrCreate?: Enumerable - upsert?: Enumerable - createMany?: PushDeliveryCreateManyPushSubscriptionInputEnvelope - set?: Enumerable - disconnect?: Enumerable - delete?: Enumerable - connect?: Enumerable - update?: Enumerable - updateMany?: Enumerable - deleteMany?: Enumerable - } - - export type PushSubscriptionCreateNestedOneWithoutWatchesInput = { - create?: XOR - connectOrCreate?: PushSubscriptionCreateOrConnectWithoutWatchesInput - connect?: PushSubscriptionWhereUniqueInput - } - - export type PushSubscriptionUpdateOneRequiredWithoutWatchesNestedInput = { - create?: XOR - connectOrCreate?: PushSubscriptionCreateOrConnectWithoutWatchesInput - upsert?: PushSubscriptionUpsertWithoutWatchesInput - connect?: PushSubscriptionWhereUniqueInput - update?: XOR - } - - export type PushSubscriptionCreateNestedOneWithoutDeliveriesInput = { - create?: XOR - connectOrCreate?: PushSubscriptionCreateOrConnectWithoutDeliveriesInput - connect?: PushSubscriptionWhereUniqueInput - } - - export type EnumPushDeliveryStatusFieldUpdateOperationsInput = { - set?: PushDeliveryStatus - } - - export type PushSubscriptionUpdateOneRequiredWithoutDeliveriesNestedInput = { - create?: XOR - connectOrCreate?: PushSubscriptionCreateOrConnectWithoutDeliveriesInput - upsert?: PushSubscriptionUpsertWithoutDeliveriesInput - connect?: PushSubscriptionWhereUniqueInput - update?: XOR - } - export type UserCreateNestedOneWithoutCompetitionSubscriptionInput = { create?: XOR connectOrCreate?: UserCreateOrConnectWithoutCompetitionSubscriptionInput @@ -13942,98 +8498,6 @@ export namespace Prisma { _max?: NestedDateTimeFilter } - export type NestedEnumPushSubscriptionSourceFilter = { - equals?: PushSubscriptionSource - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushSubscriptionSourceFilter | PushSubscriptionSource - } - - export type NestedDateTimeNullableFilter = { - equals?: Date | string | null - in?: Enumerable | Enumerable | Date | string | null - notIn?: Enumerable | Enumerable | Date | string | null - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeNullableFilter | Date | string | null - } - - export type NestedEnumPushSubscriptionSourceWithAggregatesFilter = { - equals?: PushSubscriptionSource - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushSubscriptionSourceWithAggregatesFilter | PushSubscriptionSource - _count?: NestedIntFilter - _min?: NestedEnumPushSubscriptionSourceFilter - _max?: NestedEnumPushSubscriptionSourceFilter - } - - export type NestedDateTimeNullableWithAggregatesFilter = { - equals?: Date | string | null - in?: Enumerable | Enumerable | Date | string | null - notIn?: Enumerable | Enumerable | Date | string | null - lt?: Date | string - lte?: Date | string - gt?: Date | string - gte?: Date | string - not?: NestedDateTimeNullableWithAggregatesFilter | Date | string | null - _count?: NestedIntNullableFilter - _min?: NestedDateTimeNullableFilter - _max?: NestedDateTimeNullableFilter - } - - export type NestedIntNullableFilter = { - equals?: number | null - in?: Enumerable | number | null - notIn?: Enumerable | number | null - lt?: number - lte?: number - gt?: number - gte?: number - not?: NestedIntNullableFilter | number | null - } - - export type NestedEnumPushDeliveryStatusFilter = { - equals?: PushDeliveryStatus - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushDeliveryStatusFilter | PushDeliveryStatus - } - - export type NestedEnumPushDeliveryStatusWithAggregatesFilter = { - equals?: PushDeliveryStatus - in?: Enumerable - notIn?: Enumerable - not?: NestedEnumPushDeliveryStatusWithAggregatesFilter | PushDeliveryStatus - _count?: NestedIntFilter - _min?: NestedEnumPushDeliveryStatusFilter - _max?: NestedEnumPushDeliveryStatusFilter - } - export type NestedJsonNullableFilter = - | PatchUndefined< - Either, Exclude, 'path'>>, - Required - > - | OptionalFlat, 'path'>> - - export type NestedJsonNullableFilterBase = { - equals?: InputJsonValue | JsonNullValueFilter - path?: string[] - string_contains?: string - string_starts_with?: string - string_ends_with?: string - array_contains?: InputJsonValue | null - array_starts_with?: InputJsonValue | null - array_ends_with?: InputJsonValue | null - lt?: InputJsonValue - lte?: InputJsonValue - gt?: InputJsonValue - gte?: InputJsonValue - not?: InputJsonValue | JsonNullValueFilter - } - export type NestedEnumCompetitionSubscriptionTypeFilter = { equals?: CompetitionSubscriptionType in?: Enumerable @@ -14265,241 +8729,6 @@ export namespace Prisma { code?: StringFilter | string } - export type AssignmentWatchCreateWithoutPushSubscriptionInput = { - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - } - - export type AssignmentWatchUncheckedCreateWithoutPushSubscriptionInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - } - - export type AssignmentWatchCreateOrConnectWithoutPushSubscriptionInput = { - where: AssignmentWatchWhereUniqueInput - create: XOR - } - - export type AssignmentWatchCreateManyPushSubscriptionInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type PushDeliveryCreateWithoutPushSubscriptionInput = { - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - - export type PushDeliveryUncheckedCreateWithoutPushSubscriptionInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - - export type PushDeliveryCreateOrConnectWithoutPushSubscriptionInput = { - where: PushDeliveryWhereUniqueInput - create: XOR - } - - export type PushDeliveryCreateManyPushSubscriptionInputEnvelope = { - data: Enumerable - skipDuplicates?: boolean - } - - export type AssignmentWatchUpsertWithWhereUniqueWithoutPushSubscriptionInput = { - where: AssignmentWatchWhereUniqueInput - update: XOR - create: XOR - } - - export type AssignmentWatchUpdateWithWhereUniqueWithoutPushSubscriptionInput = { - where: AssignmentWatchWhereUniqueInput - data: XOR - } - - export type AssignmentWatchUpdateManyWithWhereWithoutPushSubscriptionInput = { - where: AssignmentWatchScalarWhereInput - data: XOR - } - - export type AssignmentWatchScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - pushSubscriptionId?: IntFilter | number - competitionId?: StringFilter | string - wcaUserId?: IntFilter | number - } - - export type PushDeliveryUpsertWithWhereUniqueWithoutPushSubscriptionInput = { - where: PushDeliveryWhereUniqueInput - update: XOR - create: XOR - } - - export type PushDeliveryUpdateWithWhereUniqueWithoutPushSubscriptionInput = { - where: PushDeliveryWhereUniqueInput - data: XOR - } - - export type PushDeliveryUpdateManyWithWhereWithoutPushSubscriptionInput = { - where: PushDeliveryScalarWhereInput - data: XOR - } - - export type PushDeliveryScalarWhereInput = { - AND?: Enumerable - OR?: Enumerable - NOT?: Enumerable - id?: IntFilter | number - createdAt?: DateTimeFilter | Date | string - updatedAt?: DateTimeFilter | Date | string - pushSubscriptionId?: IntFilter | number - competitionId?: StringFilter | string - wcaUserId?: IntFilter | number - dedupeKey?: StringFilter | string - status?: EnumPushDeliveryStatusFilter | PushDeliveryStatus - error?: JsonNullableFilter - } - - export type PushSubscriptionCreateWithoutWatchesInput = { - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - deliveries?: PushDeliveryCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionUncheckedCreateWithoutWatchesInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - deliveries?: PushDeliveryUncheckedCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionCreateOrConnectWithoutWatchesInput = { - where: PushSubscriptionWhereUniqueInput - create: XOR - } - - export type PushSubscriptionUpsertWithoutWatchesInput = { - update: XOR - create: XOR - } - - export type PushSubscriptionUpdateWithoutWatchesInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - deliveries?: PushDeliveryUpdateManyWithoutPushSubscriptionNestedInput - } - - export type PushSubscriptionUncheckedUpdateWithoutWatchesInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - deliveries?: PushDeliveryUncheckedUpdateManyWithoutPushSubscriptionNestedInput - } - - export type PushSubscriptionCreateWithoutDeliveriesInput = { - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - watches?: AssignmentWatchCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionUncheckedCreateWithoutDeliveriesInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - endpoint: string - p256dh: string - auth: string - source: PushSubscriptionSource - externalSubject: string - disabledAt?: Date | string | null - watches?: AssignmentWatchUncheckedCreateNestedManyWithoutPushSubscriptionInput - } - - export type PushSubscriptionCreateOrConnectWithoutDeliveriesInput = { - where: PushSubscriptionWhereUniqueInput - create: XOR - } - - export type PushSubscriptionUpsertWithoutDeliveriesInput = { - update: XOR - create: XOR - } - - export type PushSubscriptionUpdateWithoutDeliveriesInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - watches?: AssignmentWatchUpdateManyWithoutPushSubscriptionNestedInput - } - - export type PushSubscriptionUncheckedUpdateWithoutDeliveriesInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - endpoint?: StringFieldUpdateOperationsInput | string - p256dh?: StringFieldUpdateOperationsInput | string - auth?: StringFieldUpdateOperationsInput | string - source?: EnumPushSubscriptionSourceFieldUpdateOperationsInput | PushSubscriptionSource - externalSubject?: StringFieldUpdateOperationsInput | string - disabledAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null - watches?: AssignmentWatchUncheckedUpdateManyWithoutPushSubscriptionNestedInput - } - export type UserCreateWithoutCompetitionSubscriptionInput = { phoneNumber: string AuditLog?: AuditLogCreateNestedManyWithoutUserInput @@ -14673,80 +8902,6 @@ export namespace Prisma { code?: StringFieldUpdateOperationsInput | string } - export type AssignmentWatchCreateManyPushSubscriptionInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - } - - export type PushDeliveryCreateManyPushSubscriptionInput = { - id?: number - createdAt?: Date | string - updatedAt?: Date | string - competitionId: string - wcaUserId: number - dedupeKey: string - status: PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - - export type AssignmentWatchUpdateWithoutPushSubscriptionInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - } - - export type AssignmentWatchUncheckedUpdateWithoutPushSubscriptionInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - } - - export type AssignmentWatchUncheckedUpdateManyWithoutWatchesInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - } - - export type PushDeliveryUpdateWithoutPushSubscriptionInput = { - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - - export type PushDeliveryUncheckedUpdateWithoutPushSubscriptionInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - - export type PushDeliveryUncheckedUpdateManyWithoutDeliveriesInput = { - id?: IntFieldUpdateOperationsInput | number - createdAt?: DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string - competitionId?: StringFieldUpdateOperationsInput | string - wcaUserId?: IntFieldUpdateOperationsInput | number - dedupeKey?: StringFieldUpdateOperationsInput | string - status?: EnumPushDeliveryStatusFieldUpdateOperationsInput | PushDeliveryStatus - error?: NullableJsonNullValueInput | InputJsonValue - } - /** diff --git a/packages/notifapi/prisma/generated/client/index.js b/packages/notifapi/prisma/generated/client/index.js index 200013d..3a3ff18 100644 --- a/packages/notifapi/prisma/generated/client/index.js +++ b/packages/notifapi/prisma/generated/client/index.js @@ -102,48 +102,6 @@ exports.Prisma.UserScalarFieldEnum = { phoneNumber: 'phoneNumber' }; -exports.Prisma.PushSubscriptionScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - endpoint: 'endpoint', - p256dh: 'p256dh', - auth: 'auth', - source: 'source', - externalSubject: 'externalSubject', - disabledAt: 'disabledAt' -}; - -exports.Prisma.AssignmentWatchScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId' -}; - -exports.Prisma.AssignmentSnapshotScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - assignmentsHash: 'assignmentsHash' -}; - -exports.Prisma.PushDeliveryScalarFieldEnum = { - id: 'id', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - pushSubscriptionId: 'pushSubscriptionId', - competitionId: 'competitionId', - wcaUserId: 'wcaUserId', - dedupeKey: 'dedupeKey', - status: 'status', - error: 'error' -}; - exports.Prisma.SessionScalarFieldEnum = { id: 'id', sid: 'sid', @@ -183,37 +141,10 @@ exports.Prisma.SortOrder = { desc: 'desc' }; -exports.Prisma.NullableJsonNullValueInput = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull -}; - exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' }; - -exports.Prisma.NullsOrder = { - first: 'first', - last: 'last' -}; - -exports.Prisma.JsonNullValueFilter = { - DbNull: Prisma.DbNull, - JsonNull: Prisma.JsonNull, - AnyNull: Prisma.AnyNull -}; -exports.PushSubscriptionSource = { - competitiongroups: 'competitiongroups' -}; - -exports.PushDeliveryStatus = { - pending: 'pending', - sent: 'sent', - failed: 'failed', - skipped: 'skipped' -}; - exports.CompetitionSubscriptionType = { activity: 'activity', competitor: 'competitor' @@ -222,10 +153,6 @@ exports.CompetitionSubscriptionType = { exports.Prisma.ModelName = { AuditLog: 'AuditLog', User: 'User', - PushSubscription: 'PushSubscription', - AssignmentWatch: 'AssignmentWatch', - AssignmentSnapshot: 'AssignmentSnapshot', - PushDelivery: 'PushDelivery', Session: 'Session', CompetitionSubscription: 'CompetitionSubscription', CompetitorSubscription: 'CompetitorSubscription', @@ -280,7 +207,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"AuditLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AuditLogToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phoneNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"AuditLog\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AuditLog\",\"relationName\":\"AuditLogToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"CompetitionSubscription\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitionSubscription\",\"relationName\":\"CompetitionSubscriptionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"CompetitorSubscription\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitorSubscription\",\"relationName\":\"CompetitorSubscriptionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PushSubscription\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"endpoint\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"p256dh\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"auth\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PushSubscriptionSource\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalSubject\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"disabledAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"watches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AssignmentWatch\",\"relationName\":\"AssignmentWatchToPushSubscription\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PushDelivery\",\"relationName\":\"PushDeliveryToPushSubscription\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AssignmentWatch\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"pushSubscriptionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wcaUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pushSubscription\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PushSubscription\",\"relationName\":\"AssignmentWatchToPushSubscription\",\"relationFromFields\":[\"pushSubscriptionId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"pushSubscriptionId\",\"competitionId\",\"wcaUserId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"pushSubscriptionId\",\"competitionId\",\"wcaUserId\"]}],\"isGenerated\":false},\"AssignmentSnapshot\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wcaUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"assignmentsHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"competitionId\",\"wcaUserId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"competitionId\",\"wcaUserId\"]}],\"isGenerated\":false},\"PushDelivery\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"pushSubscriptionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wcaUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dedupeKey\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PushDeliveryStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"error\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pushSubscription\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PushSubscription\",\"relationName\":\"PushDeliveryToPushSubscription\",\"relationFromFields\":[\"pushSubscriptionId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"pushSubscriptionId\",\"dedupeKey\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"pushSubscriptionId\",\"dedupeKey\"]}],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CompetitionSubscription\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitionSubscriptionType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"CompetitionSubscriptionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"competitionId\",\"type\",\"value\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"competitionId\",\"type\",\"value\"]}],\"isGenerated\":false},\"CompetitorSubscription\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wcaUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"CompetitorSubscriptionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"wcaUserId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"wcaUserId\"]}],\"isGenerated\":false},\"CompetitionSid\":{\"dbName\":null,\"fields\":[{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"CompetitionSubscriptionType\":{\"values\":[{\"name\":\"activity\",\"dbName\":null},{\"name\":\"competitor\",\"dbName\":null}],\"dbName\":null},\"PushSubscriptionSource\":{\"values\":[{\"name\":\"competitiongroups\",\"dbName\":null}],\"dbName\":null},\"PushDeliveryStatus\":{\"values\":[{\"name\":\"pending\",\"dbName\":null},{\"name\":\"sent\",\"dbName\":null},{\"name\":\"failed\",\"dbName\":null},{\"name\":\"skipped\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"AuditLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"AuditLogToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"User\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phoneNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"AuditLog\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AuditLog\",\"relationName\":\"AuditLogToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"CompetitionSubscription\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitionSubscription\",\"relationName\":\"CompetitionSubscriptionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"CompetitorSubscription\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitorSubscription\",\"relationName\":\"CompetitorSubscriptionToUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Session\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CompetitionSubscription\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CompetitionSubscriptionType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"CompetitionSubscriptionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"competitionId\",\"type\",\"value\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"competitionId\",\"type\",\"value\"]}],\"isGenerated\":false},\"CompetitorSubscription\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wcaUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verified\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"User\",\"relationName\":\"CompetitorSubscriptionToUser\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"userId\",\"wcaUserId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"userId\",\"wcaUserId\"]}],\"isGenerated\":false},\"CompetitionSid\":{\"dbName\":null,\"fields\":[{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"competitionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"CompetitionSubscriptionType\":{\"values\":[{\"name\":\"activity\",\"dbName\":null},{\"name\":\"competitor\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) diff --git a/packages/notifapi/prisma/generated/client/schema.prisma b/packages/notifapi/prisma/generated/client/schema.prisma index efb4c74..2693bce 100644 --- a/packages/notifapi/prisma/generated/client/schema.prisma +++ b/packages/notifapi/prisma/generated/client/schema.prisma @@ -32,65 +32,6 @@ model User { CompetitorSubscription CompetitorSubscription[] } -model PushSubscription { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - endpoint String @unique - p256dh String - auth String - source PushSubscriptionSource - externalSubject String - disabledAt DateTime? - - watches AssignmentWatch[] - deliveries PushDelivery[] - - @@index([source, externalSubject]) -} - -model AssignmentWatch { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - pushSubscriptionId Int - competitionId String - wcaUserId Int - - pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) - - @@unique([pushSubscriptionId, competitionId, wcaUserId]) - @@index([competitionId, wcaUserId]) -} - -model AssignmentSnapshot { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - competitionId String - wcaUserId Int - assignmentsHash String - - @@unique([competitionId, wcaUserId]) -} - -model PushDelivery { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - pushSubscriptionId Int - competitionId String - wcaUserId Int - dedupeKey String - status PushDeliveryStatus - error Json? - - pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) - - @@unique([pushSubscriptionId, dedupeKey]) - @@index([competitionId, wcaUserId]) -} - model Session { id String @id sid String @unique @@ -118,17 +59,6 @@ enum CompetitionSubscriptionType { competitor } -enum PushSubscriptionSource { - competitiongroups -} - -enum PushDeliveryStatus { - pending - sent - failed - skipped -} - model CompetitorSubscription { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) diff --git a/packages/notifapi/prisma/schema.prisma b/packages/notifapi/prisma/schema.prisma index efb4c74..2693bce 100644 --- a/packages/notifapi/prisma/schema.prisma +++ b/packages/notifapi/prisma/schema.prisma @@ -32,65 +32,6 @@ model User { CompetitorSubscription CompetitorSubscription[] } -model PushSubscription { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - endpoint String @unique - p256dh String - auth String - source PushSubscriptionSource - externalSubject String - disabledAt DateTime? - - watches AssignmentWatch[] - deliveries PushDelivery[] - - @@index([source, externalSubject]) -} - -model AssignmentWatch { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - pushSubscriptionId Int - competitionId String - wcaUserId Int - - pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) - - @@unique([pushSubscriptionId, competitionId, wcaUserId]) - @@index([competitionId, wcaUserId]) -} - -model AssignmentSnapshot { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - competitionId String - wcaUserId Int - assignmentsHash String - - @@unique([competitionId, wcaUserId]) -} - -model PushDelivery { - id Int @id @default(autoincrement()) - createdAt DateTime @default(now()) - updatedAt DateTime @updatedAt - pushSubscriptionId Int - competitionId String - wcaUserId Int - dedupeKey String - status PushDeliveryStatus - error Json? - - pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) - - @@unique([pushSubscriptionId, dedupeKey]) - @@index([competitionId, wcaUserId]) -} - model Session { id String @id sid String @unique @@ -118,17 +59,6 @@ enum CompetitionSubscriptionType { competitor } -enum PushSubscriptionSource { - competitiongroups -} - -enum PushDeliveryStatus { - pending - sent - failed - skipped -} - model CompetitorSubscription { id Int @id @default(autoincrement()) createdAt DateTime @default(now()) diff --git a/packages/notifapi/routes/v0/external/index.ts b/packages/notifapi/routes/v0/external/index.ts index 1e195ae..673abee 100644 --- a/packages/notifapi/routes/v0/external/index.ts +++ b/packages/notifapi/routes/v0/external/index.ts @@ -2,7 +2,6 @@ import { Router } from 'express'; import cors from 'cors'; import notifyRouter from './notify'; import admin from './admin'; -import pushRouter from './push'; import prisma from '../../../db'; const router = Router(); @@ -14,7 +13,6 @@ router.use( ); router.use('/admin', admin); -router.use('/push', pushRouter); router.use( '/competitions/:competitionId/subscribedUsersCount', diff --git a/packages/notifapi/server.ts b/packages/notifapi/server.ts index b89c3eb..8e827cf 100644 --- a/packages/notifapi/server.ts +++ b/packages/notifapi/server.ts @@ -27,7 +27,6 @@ import { PrismaSessionStore } from '@quixo3/prisma-session-store'; import { internal, external } from './routes/v0'; import logger from './lib/logger'; import morganMiddleware from './middlewares/morgan.middleware'; -import { startAssignmentNotificationWorker } from './services/assignmentNotificationWorker'; const SECRET = process.env.SESSION_SECRET ?? 'compnotifySecret'; @@ -52,7 +51,6 @@ const sessionOptions: SessionOptions & { export async function init() { const app = express(); - startAssignmentNotificationWorker(); app.use(json()); app.use(morganMiddleware); diff --git a/packages/notifapi/test/assignmentSnapshots.test.js b/packages/notifapi/test/assignmentSnapshots.test.js deleted file mode 100644 index fde5dc6..0000000 --- a/packages/notifapi/test/assignmentSnapshots.test.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const assert = require('node:assert/strict'); -const test = require('node:test'); - -const { - createAssignmentSnapshot, - hashAssignments, -} = require('../lib/assignmentSnapshots'); - -test('hashAssignments is stable when assignment object keys are reordered', () => { - const first = [ - { - activityId: 123, - assignmentCode: 'competitor', - stationNumber: 4, - }, - ]; - const second = [ - { - stationNumber: 4, - assignmentCode: 'competitor', - activityId: 123, - }, - ]; - - assert.equal(hashAssignments(first), hashAssignments(second)); -}); - -test('createAssignmentSnapshot returns the watched user assignment hash', () => { - const wcif = { - id: 'ExampleOpen2026', - persons: [ - { - wcaUserId: 12, - assignments: [{ activityId: 1, assignmentCode: 'staff-judge' }], - }, - { - wcaUserId: 34, - assignments: [{ activityId: 2, assignmentCode: 'competitor' }], - }, - ], - }; - - assert.deepEqual(createAssignmentSnapshot(wcif, 34), { - competitionId: 'ExampleOpen2026', - wcaUserId: 34, - assignmentsHash: hashAssignments([ - { activityId: 2, assignmentCode: 'competitor' }, - ]), - }); -}); - -test('createAssignmentSnapshot returns null when the watched user is absent', () => { - assert.equal( - createAssignmentSnapshot({ id: 'ExampleOpen2026', persons: [] }, 34), - null - ); -}); diff --git a/packages/notifapi/test/competitionGroupsToken.test.js b/packages/notifapi/test/competitionGroupsToken.test.js deleted file mode 100644 index a9aa365..0000000 --- a/packages/notifapi/test/competitionGroupsToken.test.js +++ /dev/null @@ -1,81 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -const assert = require('node:assert/strict'); -const { createHmac } = require('node:crypto'); -const test = require('node:test'); - -const { - verifyCompetitionGroupsToken, -} = require('../lib/competitionGroupsToken'); - -const originalEnv = { ...process.env }; - -const base64UrlJson = (value) => - Buffer.from(JSON.stringify(value)).toString('base64url'); - -const createToken = (payload, secret = 'test-secret') => { - const encodedHeader = base64UrlJson({ alg: 'HS256', typ: 'JWT' }); - const encodedPayload = base64UrlJson(payload); - const signature = createHmac('sha256', secret) - .update(`${encodedHeader}.${encodedPayload}`) - .digest('base64url'); - - return `${encodedHeader}.${encodedPayload}.${signature}`; -}; - -test.afterEach(() => { - process.env = { ...originalEnv }; -}); - -test('verifyCompetitionGroupsToken returns valid claims', () => { - process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; - process.env.COMPETITION_GROUPS_JWT_ISSUER = 'competitiongroups.com'; - process.env.COMPETITION_GROUPS_JWT_AUDIENCE = 'notifycomp'; - - const exp = Math.floor(Date.now() / 1000) + 60; - const token = createToken({ - sub: 'competitiongroups:user:123', - iss: 'competitiongroups.com', - aud: ['notifycomp'], - exp, - wcaUserIds: [123, 456], - }); - - assert.deepEqual(verifyCompetitionGroupsToken(token), { - sub: 'competitiongroups:user:123', - iss: 'competitiongroups.com', - aud: ['notifycomp'], - exp, - wcaUserIds: [123, 456], - }); -}); - -test('verifyCompetitionGroupsToken rejects invalid signatures', () => { - process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; - const token = createToken( - { - sub: 'competitiongroups:user:123', - wcaUserIds: [123], - }, - 'wrong-secret' - ); - - assert.throws( - () => verifyCompetitionGroupsToken(token), - /Invalid token signature/ - ); -}); - -test('verifyCompetitionGroupsToken rejects unauthorized audiences', () => { - process.env.COMPETITION_GROUPS_JWT_SECRET = 'test-secret'; - process.env.COMPETITION_GROUPS_JWT_AUDIENCE = 'notifycomp'; - const token = createToken({ - sub: 'competitiongroups:user:123', - aud: 'other-service', - wcaUserIds: [123], - }); - - assert.throws( - () => verifyCompetitionGroupsToken(token), - /Invalid token audience/ - ); -}); diff --git a/packages/notifapi/controllers/pushSubscriptions.ts b/packages/server/controllers/pushSubscriptions.ts similarity index 100% rename from packages/notifapi/controllers/pushSubscriptions.ts rename to packages/server/controllers/pushSubscriptions.ts diff --git a/packages/notifapi/lib/assignmentSnapshots.ts b/packages/server/lib/assignmentSnapshots.ts similarity index 100% rename from packages/notifapi/lib/assignmentSnapshots.ts rename to packages/server/lib/assignmentSnapshots.ts diff --git a/packages/notifapi/lib/competitionGroupsToken.ts b/packages/server/lib/competitionGroupsToken.ts similarity index 97% rename from packages/notifapi/lib/competitionGroupsToken.ts rename to packages/server/lib/competitionGroupsToken.ts index aa4075b..0cecc0d 100644 --- a/packages/notifapi/lib/competitionGroupsToken.ts +++ b/packages/server/lib/competitionGroupsToken.ts @@ -43,7 +43,7 @@ export const verifyCompetitionGroupsToken = ( } const [encodedHeader, encodedPayload, signature] = parts; - const header = parseJsonPart<{ alg?: string; typ?: string }>(encodedHeader); + const header = parseJsonPart<{ alg?: string }>(encodedHeader); if (header.alg !== 'HS256') { throw new Error('Unsupported token algorithm'); } diff --git a/packages/notifapi/middlewares/competitionGroupsAuth.ts b/packages/server/middlewares/competitionGroupsAuth.ts similarity index 100% rename from packages/notifapi/middlewares/competitionGroupsAuth.ts rename to packages/server/middlewares/competitionGroupsAuth.ts diff --git a/packages/server/package.json b/packages/server/package.json index 7833385..5b2226c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -34,6 +34,7 @@ "@types/morgan": "^1.9.3", "@types/node": "^18.19.130", "@types/node-schedule": "^2.1.7", + "@types/web-push": "^3.6.4", "@types/ws": "^8.5.3", "@wca/helpers": "^1.1.7", "apollo-server-express": "^3.10.3", @@ -53,6 +54,7 @@ "prisma": "^4.8.1", "ts-node": "^10.9.1", "typescript": "^5.9.3", + "web-push": "^3.6.7", "ws": "^8.19.0" }, "devDependencies": { diff --git a/packages/notifapi/prisma/migrations/20260511190000_assignment_push_notifications/migration.sql b/packages/server/prisma/migrations/20260511224500_assignment_push_notifications/migration.sql similarity index 100% rename from packages/notifapi/prisma/migrations/20260511190000_assignment_push_notifications/migration.sql rename to packages/server/prisma/migrations/20260511224500_assignment_push_notifications/migration.sql diff --git a/packages/server/prisma/schema.prisma b/packages/server/prisma/schema.prisma index a220c12..b00f8ce 100644 --- a/packages/server/prisma/schema.prisma +++ b/packages/server/prisma/schema.prisma @@ -73,6 +73,76 @@ model Webhook { @@unique([competitionId, url]) } +model PushSubscription { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + endpoint String @unique + p256dh String + auth String + source PushSubscriptionSource + externalSubject String + disabledAt DateTime? + + watches AssignmentWatch[] + deliveries PushDelivery[] + + @@index([source, externalSubject]) +} + +model AssignmentWatch { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + pushSubscriptionId Int + competitionId String + wcaUserId Int + + pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) + + @@unique([pushSubscriptionId, competitionId, wcaUserId]) + @@index([competitionId, wcaUserId]) +} + +model AssignmentSnapshot { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + competitionId String + wcaUserId Int + assignmentsHash String + + @@unique([competitionId, wcaUserId]) +} + +model PushDelivery { + id Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + pushSubscriptionId Int + competitionId String + wcaUserId Int + dedupeKey String + status PushDeliveryStatus + error Json? + + pushSubscription PushSubscription @relation(fields: [pushSubscriptionId], references: [id], onDelete: Cascade) + + @@unique([pushSubscriptionId, dedupeKey]) + @@index([competitionId, wcaUserId]) +} + +enum PushSubscriptionSource { + competitiongroups +} + +enum PushDeliveryStatus { + pending + sent + failed + skipped +} + enum Status { NOT_STARTED IN_PROGRESS diff --git a/packages/notifapi/routes/v0/external/push.ts b/packages/server/routes/v0/external/push.ts similarity index 100% rename from packages/notifapi/routes/v0/external/push.ts rename to packages/server/routes/v0/external/push.ts diff --git a/packages/server/server.ts b/packages/server/server.ts index 0aa90f5..a7aa26d 100644 --- a/packages/server/server.ts +++ b/packages/server/server.ts @@ -34,6 +34,8 @@ import { authMiddlewareVerify } from './auth/AuthMiddleware'; import { WCA_ORIGIN } from './env'; import { initScheduler } from './scheduler'; import { pubsub } from './graphql/pubsub'; +import pushRouter from './routes/v0/external/push'; +import { startAssignmentNotificationWorker } from './services/assignmentNotificationWorker'; export interface AppContext { user?: User; @@ -46,6 +48,7 @@ export async function init() { await initScheduler(); const app = express(); + startAssignmentNotificationWorker(); app.use(cors()); app.use(json()); @@ -61,6 +64,7 @@ export async function init() { }); app.use('/auth', AuthRouter); + app.use('/v0/external/push', pushRouter); const httpServer = http.createServer(app); diff --git a/packages/notifapi/services/assignmentNotificationWorker.ts b/packages/server/services/assignmentNotificationWorker.ts similarity index 97% rename from packages/notifapi/services/assignmentNotificationWorker.ts rename to packages/server/services/assignmentNotificationWorker.ts index 1791d2f..799d972 100644 --- a/packages/notifapi/services/assignmentNotificationWorker.ts +++ b/packages/server/services/assignmentNotificationWorker.ts @@ -1,6 +1,5 @@ import prisma from '../db'; import { createAssignmentSnapshot } from '../lib/assignmentSnapshots'; -import logger from '../lib/logger'; import { PushDeliveryStatus, PushSubscription, @@ -196,7 +195,7 @@ export const runAssignmentNotificationPoll = async () => { export const startAssignmentNotificationWorker = () => { if (process.env.ASSIGNMENT_PUSH_ENABLED !== 'true') { - logger.info('Assignment push worker disabled'); + console.info('Assignment push worker disabled'); return; } @@ -212,7 +211,7 @@ export const startAssignmentNotificationWorker = () => { try { await runAssignmentNotificationPoll(); } catch (e) { - logger.error(e); + console.error(e); } finally { running = false; } diff --git a/packages/notifapi/services/wcif.ts b/packages/server/services/wcif.ts similarity index 100% rename from packages/notifapi/services/wcif.ts rename to packages/server/services/wcif.ts diff --git a/packages/notifapi/services/webPush.ts b/packages/server/services/webPush.ts similarity index 96% rename from packages/notifapi/services/webPush.ts rename to packages/server/services/webPush.ts index d5f0239..642c7dc 100644 --- a/packages/notifapi/services/webPush.ts +++ b/packages/server/services/webPush.ts @@ -1,6 +1,5 @@ import webPush from 'web-push'; import prisma from '../db'; -import logger from '../lib/logger'; import { PushSubscription } from '../prisma/generated/client'; export interface AssignmentPushPayload { @@ -63,7 +62,7 @@ export const sendAssignmentPush = async ( }); } - logger.error(e); + console.error(e); return { success: false, diff --git a/packages/server/types/express.d.ts b/packages/server/types/express.d.ts index f9227be..887efe5 100644 --- a/packages/server/types/express.d.ts +++ b/packages/server/types/express.d.ts @@ -1,5 +1,6 @@ declare namespace Express { export interface Request { user?: User; + competitionGroups?: import('../lib/competitionGroupsToken').CompetitionGroupsClaims; } }