commit a332e856585241855b66c0662319b820a1c6fefa Author: Kairo Date: Fri Jun 26 20:42:38 2026 -0400 bppapsdf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aad2dcb --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.env +node_modules +dist \ No newline at end of file diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..7b95b4f --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,9 @@ +export const apps = [ + { + name: "poem-bot", + script: "dist/index.cjs", + interpreter: "node", + instances: 1, + watch: false, + }, +]; diff --git a/eslint.config.ts b/eslint.config.ts new file mode 100644 index 0000000..f4c0716 --- /dev/null +++ b/eslint.config.ts @@ -0,0 +1,30 @@ +import js from "@eslint/js"; +import globals from "globals"; +import tseslint from "typescript-eslint"; +import { defineConfig, globalIgnores } from "eslint/config"; + +export default defineConfig(globalIgnores(["dist/*"]), [ + { + files: ["**/*.{js,mjs,cjs,ts,mts,cts}"], + plugins: { js }, + extends: ["js/recommended"], + ignores: ["/dist/*"], + rules: { + "require-await": "error", + "@typescript-eslint/no-unused-vars": [ + "error", + { + args: "all", + argsIgnorePattern: "^_", + caughtErrors: "all", + caughtErrorsIgnorePattern: "^_", + destructuredArrayIgnorePattern: "^_", + varsIgnorePattern: "^_", + ignoreRestSiblings: true, + }, + ], + }, + languageOptions: { globals: globals.browser }, + }, + tseslint.configs.recommended, +]); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b95cd88 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,6126 @@ +{ + "name": "jolb-poem-bot", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "jolb-poem-bot", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@grammyjs/conversations": "^2.1.1", + "@grammyjs/menu": "^1.3.1", + "@prisma/adapter-better-sqlite3": "^7.4.1", + "@prisma/client": "^7.4.1", + "crypto-hash": "^4.0.1", + "dotenv": "^17.3.1", + "grammy": "^1.40.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^25.3.0", + "eslint": "^10.0.0", + "globals": "^17.3.0", + "jiti": "^2.6.1", + "pm2": "^6.0.14", + "prisma": "^7.4.1", + "ts-node": "^10.9.2", + "ts-node-dev": "^2.0.0", + "tsconfig-paths": "^4.2.0", + "tsup": "^8.5.1", + "typescript": "^5.9.3", + "typescript-eslint": "^8.56.0" + } + }, + "node_modules/@chevrotain/cst-dts-gen": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/cst-dts-gen/-/cst-dts-gen-10.5.0.tgz", + "integrity": "sha512-lhmC/FyqQ2o7pGK4Om+hzuDrm9rhFYIJ/AXoQBeongmn870Xeb0L6oGEiuR8nohFNL5sMaQEJWCxr1oIVIVXrw==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "lodash": "4.17.21" + } + }, + "node_modules/@chevrotain/gast": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/gast/-/gast-10.5.0.tgz", + "integrity": "sha512-pXdMJ9XeDAbgOWKuD1Fldz4ieCs6+nLNmyVhe2gZVqoO7v8HXuHYs5OV2EzUtbuai37TlOAQHrTDvxMnvMJz3A==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/types": "10.5.0", + "lodash": "4.17.21" + } + }, + "node_modules/@chevrotain/types": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-10.5.0.tgz", + "integrity": "sha512-f1MAia0x/pAVPWH/T73BJVyO2XU5tI4/iE7cnxb7tqdNTNhQI3Uq3XkqcoteTmD4t1aM0LbHCJOhgIDn07kl2A==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@chevrotain/utils": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", + "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@electric-sql/pglite": { + "version": "0.3.15", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite/-/pglite-0.3.15.tgz", + "integrity": "sha512-Cj++n1Mekf9ETfdc16TlDi+cDDQF0W7EcbyRHYOAeZdsAe8M/FJg18itDTSwyHfar2WIezawM9o0EKaRGVKygQ==", + "devOptional": true, + "license": "Apache-2.0", + "peer": true + }, + "node_modules/@electric-sql/pglite-socket": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-socket/-/pglite-socket-0.0.20.tgz", + "integrity": "sha512-J5nLGsicnD9wJHnno9r+DGxfcZWh+YJMCe0q/aCgtG6XOm9Z7fKeite8IZSNXgZeGltSigM9U/vAWZQWdgcSFg==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "pglite-server": "dist/scripts/server.js" + }, + "peerDependencies": { + "@electric-sql/pglite": "0.3.15" + } + }, + "node_modules/@electric-sql/pglite-tools": { + "version": "0.2.20", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-tools/-/pglite-tools-0.2.20.tgz", + "integrity": "sha512-BK50ZnYa3IG7ztXhtgYf0Q7zijV32Iw1cYS8C+ThdQlwx12V5VZ9KRJ42y82Hyb4PkTxZQklVQA9JHyUlex33A==", + "devOptional": true, + "license": "Apache-2.0", + "peerDependencies": { + "@electric-sql/pglite": "0.3.15" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.1.tgz", + "integrity": "sha512-uVSdg/V4dfQmTjJzR0szNczjOH/J+FyUMMjYtr07xFRXR7EDf9i1qdxrD0VusZH9knj1/ecxzCQQxyic5NzAiA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.1", + "debug": "^4.3.1", + "minimatch": "^10.1.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz", + "integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz", + "integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.1.tgz", + "integrity": "sha512-P9cq2dpr+LU8j3qbLygLcSZrl2/ds/pUpfnHNNuk5HW7mnngHs+6WSq5C9mO3rqRX8A1poxqLTC9cu0KOyJlBg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.0.tgz", + "integrity": "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@grammyjs/conversations": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@grammyjs/conversations/-/conversations-2.1.1.tgz", + "integrity": "sha512-hoxqwSkaXDeU7mzXulpk3A4Cmd6UZO3HU4aPoITX5ekSHK7ZcUEmMl7RhKKkqw3z6zVbbAShQreJoVV5/dDSLA==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14.13.1" + }, + "peerDependencies": { + "grammy": "^1.20.1" + } + }, + "node_modules/@grammyjs/menu": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@grammyjs/menu/-/menu-1.3.1.tgz", + "integrity": "sha512-HJslY/n76T1Ar5qDDhNtjLs+PpcrlB9aGsXu3CJHLt147DC3K3lpiRvRW/Xh9/x9hqYVw7KKbnvsQXVgzoU81Q==", + "license": "MIT", + "engines": { + "node": ">=12.20.0 || >=14.13.1" + }, + "peerDependencies": { + "grammy": "^1.31.0" + } + }, + "node_modules/@grammyjs/types": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.24.0.tgz", + "integrity": "sha512-qQIEs4lN5WqUdr4aT8MeU6UFpMbGYAvcvYSW1A4OO1PABGJQHz/KLON6qvpf+5RxaNDQBxiY2k2otIhg/AG7RQ==", + "license": "MIT" + }, + "node_modules/@hono/node-server": { + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@mrleebo/prisma-ast": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@mrleebo/prisma-ast/-/prisma-ast-0.13.1.tgz", + "integrity": "sha512-XyroGQXcHrZdvmrGJvsA9KNeOOgGMg1Vg9OlheUsBOSKznLMDl+YChxbkboRHvtFYJEMRYmlV3uoo/njCw05iw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chevrotain": "^10.5.0", + "lilconfig": "^2.1.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@pm2/agent": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@pm2/agent/-/agent-2.1.1.tgz", + "integrity": "sha512-0V9ckHWd/HSC8BgAbZSoq8KXUG81X97nSkAxmhKDhmF8vanyaoc1YXwc2KVkbWz82Rg4gjd2n9qiT3i7bdvGrQ==", + "dev": true, + "license": "AGPL-3.0", + "dependencies": { + "async": "~3.2.0", + "chalk": "~3.0.0", + "dayjs": "~1.8.24", + "debug": "~4.3.1", + "eventemitter2": "~5.0.1", + "fast-json-patch": "^3.1.0", + "fclone": "~1.0.11", + "pm2-axon": "~4.0.1", + "pm2-axon-rpc": "~0.7.0", + "proxy-agent": "~6.4.0", + "semver": "~7.5.0", + "ws": "~7.5.10" + } + }, + "node_modules/@pm2/agent/node_modules/dayjs": { + "version": "1.8.36", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.8.36.tgz", + "integrity": "sha512-3VmRXEtw7RZKAf+4Tv1Ym9AGeo8r8+CjDi26x+7SYQil1UqtqdaokhzoEJohqlzt0m5kacJSDhJQkG/LWhpRBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@pm2/agent/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/agent/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pm2/agent/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pm2/blessed": { + "version": "0.1.81", + "resolved": "https://registry.npmjs.org/@pm2/blessed/-/blessed-0.1.81.tgz", + "integrity": "sha512-ZcNHqQjMuNRcQ7Z1zJbFIQZO/BDKV3KbiTckWdfbUaYhj7uNmUwb+FbdDWSCkvxNr9dBJQwvV17o6QBkAvgO0g==", + "dev": true, + "license": "MIT", + "bin": { + "blessed": "bin/tput.js" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/@pm2/io": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@pm2/io/-/io-6.1.0.tgz", + "integrity": "sha512-IxHuYURa3+FQ6BKePlgChZkqABUKFYH6Bwbw7V/pWU1pP6iR1sCI26l7P9ThUEB385ruZn/tZS3CXDUF5IA1NQ==", + "dev": true, + "license": "Apache-2", + "dependencies": { + "async": "~2.6.1", + "debug": "~4.3.1", + "eventemitter2": "^6.3.1", + "require-in-the-middle": "^5.0.0", + "semver": "~7.5.4", + "shimmer": "^1.2.0", + "signal-exit": "^3.0.3", + "tslib": "1.9.3" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@pm2/io/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/@pm2/io/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/io/node_modules/eventemitter2": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", + "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@pm2/io/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pm2/io/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@pm2/js-api": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@pm2/js-api/-/js-api-0.8.0.tgz", + "integrity": "sha512-nmWzrA/BQZik3VBz+npRcNIu01kdBhWL0mxKmP1ciF/gTcujPTQqt027N9fc1pK9ERM8RipFhymw7RcmCyOEYA==", + "dev": true, + "license": "Apache-2", + "dependencies": { + "async": "^2.6.3", + "debug": "~4.3.1", + "eventemitter2": "^6.3.1", + "extrareqp2": "^1.0.0", + "ws": "^7.0.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/@pm2/js-api/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/@pm2/js-api/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@pm2/js-api/node_modules/eventemitter2": { + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", + "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@pm2/pm2-version-check": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@pm2/pm2-version-check/-/pm2-version-check-1.0.4.tgz", + "integrity": "sha512-SXsM27SGH3yTWKc2fKR4SYNxsmnvuBQ9dd6QHtEWmiZ/VqaOYPAIlS8+vMcn27YLtAEBGvNRSh3TPNvtjZgfqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.1" + } + }, + "node_modules/@prisma/adapter-better-sqlite3": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/adapter-better-sqlite3/-/adapter-better-sqlite3-7.4.1.tgz", + "integrity": "sha512-qYcbk5gSfKfedVzEJHFTpIr7kybEmoJ+eRE1/wzdcZozDyHlEfnqKbhx+IEPcG5n7qSj4Zvx+G1uT0VXs9nF/w==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/driver-adapter-utils": "7.4.1", + "better-sqlite3": "^12.6.0" + } + }, + "node_modules/@prisma/client": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-7.4.1.tgz", + "integrity": "sha512-pgIll2W1NVdof37xLeyySW+yfQ4rI+ERGCRwnO3BjVOx42GpYq6jhTyuALK8VKirvJJIvImgfGDA2qwhYVvMuA==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/client-runtime-utils": "7.4.1" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24.0" + }, + "peerDependencies": { + "prisma": "*", + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/@prisma/client-runtime-utils": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/client-runtime-utils/-/client-runtime-utils-7.4.1.tgz", + "integrity": "sha512-8fy74OMYC7mt9cJ2MncIDk1awPRgmtXVvwTN2FlW4JVhbck8Dgt0wTkhPG85myfj4ZeP2stjF9Sdg12n5HrpQg==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/config": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-7.4.1.tgz", + "integrity": "sha512-vteSXm8N46bo3FW9MhPGVHAj+KRgrR6TWtlSk6GqToCKjTnOexXdPZyiDyEsfVW38YhqEmVl6w/6iHN8uYVJcw==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "c12": "3.1.0", + "deepmerge-ts": "7.1.5", + "effect": "3.18.4", + "empathic": "2.0.0" + } + }, + "node_modules/@prisma/debug": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.4.1.tgz", + "integrity": "sha512-qEtzO8oLouRv18JDQUC3G3Gnv+fGVscHZm/x1DBB/WT+kOvPDQLM2woX6IGgWnSMYYlrxjuALshT7G/blvY0bQ==", + "license": "Apache-2.0" + }, + "node_modules/@prisma/dev": { + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/@prisma/dev/-/dev-0.20.0.tgz", + "integrity": "sha512-ovlBYwWor0OzG+yH4J3Ot+AneD818BttLA+Ii7wjbcLHUrnC4tbUPVGyNd3c/+71KETPKZfjhkTSpdS15dmXNQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "@electric-sql/pglite": "0.3.15", + "@electric-sql/pglite-socket": "0.0.20", + "@electric-sql/pglite-tools": "0.2.20", + "@hono/node-server": "1.19.9", + "@mrleebo/prisma-ast": "0.13.1", + "@prisma/get-platform": "7.2.0", + "@prisma/query-plan-executor": "7.2.0", + "foreground-child": "3.3.1", + "get-port-please": "3.2.0", + "hono": "4.11.4", + "http-status-codes": "2.3.0", + "pathe": "2.0.3", + "proper-lockfile": "4.1.2", + "remeda": "2.33.4", + "std-env": "3.10.0", + "valibot": "1.2.0", + "zeptomatch": "2.1.0" + } + }, + "node_modules/@prisma/driver-adapter-utils": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/driver-adapter-utils/-/driver-adapter-utils-7.4.1.tgz", + "integrity": "sha512-gEZOC2tnlHaZNbHUdbK8YvQphq2tKq/Ovu1YixJ/hPSutDAvNzC3R+xUeBuJ4AJp236eELMzwxb7rgo3UbRkTg==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.4.1" + } + }, + "node_modules/@prisma/engines": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-7.4.1.tgz", + "integrity": "sha512-BZEBdHvNJx5PzIG37EI/Zi5UUI5hGWjkYsQmKa7OIK6evAvebOTwutjS/VRI6cA6grmA52eLZR+oekGRMqkKxQ==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.4.1", + "@prisma/engines-version": "7.5.0-4.55ae170b1ced7fc6ed07a15f110549408c501bb3", + "@prisma/fetch-engine": "7.4.1", + "@prisma/get-platform": "7.4.1" + } + }, + "node_modules/@prisma/engines-version": { + "version": "7.5.0-4.55ae170b1ced7fc6ed07a15f110549408c501bb3", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-7.5.0-4.55ae170b1ced7fc6ed07a15f110549408c501bb3.tgz", + "integrity": "sha512-fUxVd1TjOW8K4XsZ8dAm88sDW5Ry7AxWDfsYEWwScS6Fjo3caKC6hgNumUfsmsy0Il9LjDn5X0PpVXNt3iwayw==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/engines/node_modules/@prisma/get-platform": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.4.1.tgz", + "integrity": "sha512-kN4tmkQzlgm/KtE+jTNSYjsDxxe/5i6GApPI32BN9T0tlgsgSBtDJbjGBICttkAIjsh73dXf8raPKxO/2n2UUg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.4.1" + } + }, + "node_modules/@prisma/fetch-engine": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-7.4.1.tgz", + "integrity": "sha512-Z9kbuxX2bvEsyeS3LZEiEnxG0lVtZbpYgaAnPj69N+A9f2De8Lta0EoFtld9zhfERVPIQWhSWUc8himky3qYdA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.4.1", + "@prisma/engines-version": "7.5.0-4.55ae170b1ced7fc6ed07a15f110549408c501bb3", + "@prisma/get-platform": "7.4.1" + } + }, + "node_modules/@prisma/fetch-engine/node_modules/@prisma/get-platform": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.4.1.tgz", + "integrity": "sha512-kN4tmkQzlgm/KtE+jTNSYjsDxxe/5i6GApPI32BN9T0tlgsgSBtDJbjGBICttkAIjsh73dXf8raPKxO/2n2UUg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.4.1" + } + }, + "node_modules/@prisma/get-platform": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.2.0.tgz", + "integrity": "sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.2.0" + } + }, + "node_modules/@prisma/get-platform/node_modules/@prisma/debug": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.2.0.tgz", + "integrity": "sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/query-plan-executor": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/query-plan-executor/-/query-plan-executor-7.2.0.tgz", + "integrity": "sha512-EOZmNzcV8uJ0mae3DhTsiHgoNCuu1J9mULQpGCh62zN3PxPTd+qI9tJvk5jOst8WHKQNwJWR3b39t0XvfBB0WQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/studio-core": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/@prisma/studio-core/-/studio-core-0.13.1.tgz", + "integrity": "sha512-agdqaPEePRHcQ7CexEfkX1RvSH9uWDb6pXrZnhCRykhDFAV0/0P3d07WtfiY8hZWb7oRU4v+NkT4cGFHkQJIPg==", + "devOptional": true, + "license": "Apache-2.0", + "peerDependencies": { + "@types/react": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.57.1.tgz", + "integrity": "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.57.1.tgz", + "integrity": "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.57.1.tgz", + "integrity": "sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.57.1.tgz", + "integrity": "sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.57.1.tgz", + "integrity": "sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.57.1.tgz", + "integrity": "sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.57.1.tgz", + "integrity": "sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.57.1.tgz", + "integrity": "sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.57.1.tgz", + "integrity": "sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.57.1.tgz", + "integrity": "sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.57.1.tgz", + "integrity": "sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.57.1.tgz", + "integrity": "sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.57.1.tgz", + "integrity": "sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.57.1.tgz", + "integrity": "sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.57.1.tgz", + "integrity": "sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.57.1.tgz", + "integrity": "sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.57.1.tgz", + "integrity": "sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.57.1.tgz", + "integrity": "sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.57.1.tgz", + "integrity": "sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.57.1.tgz", + "integrity": "sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.57.1.tgz", + "integrity": "sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.57.1.tgz", + "integrity": "sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.57.1.tgz", + "integrity": "sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.57.1.tgz", + "integrity": "sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.57.1.tgz", + "integrity": "sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", + "integrity": "sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.0.tgz", + "integrity": "sha512-4K3bqJpXpqfg2XKGK9bpDTc6xO/xoUP/RBWS7AtRMug6zZFaRekiLzjVtAoZMquxoAbzBvy5nxQ7veS5eYzf8A==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.14", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz", + "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==", + "devOptional": true, + "license": "MIT", + "peer": true, + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/strip-json-comments": { + "version": "0.0.30", + "resolved": "https://registry.npmjs.org/@types/strip-json-comments/-/strip-json-comments-0.0.30.tgz", + "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.0.tgz", + "integrity": "sha512-lRyPDLzNCuae71A3t9NEINBiTn7swyOhvUj3MyUOxb8x6g6vPEFoOU+ZRmGMusNC3X3YMhqMIX7i8ShqhT74Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.56.0", + "@typescript-eslint/type-utils": "8.56.0", + "@typescript-eslint/utils": "8.56.0", + "@typescript-eslint/visitor-keys": "8.56.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.56.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.0.tgz", + "integrity": "sha512-IgSWvLobTDOjnaxAfDTIHaECbkNlAlKv2j5SjpB2v7QHKv1FIfjwMy8FsDbVfDX/KjmCmYICcw7uGaXLhtsLNg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.56.0", + "@typescript-eslint/types": "8.56.0", + "@typescript-eslint/typescript-estree": "8.56.0", + "@typescript-eslint/visitor-keys": "8.56.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.0.tgz", + "integrity": "sha512-M3rnyL1vIQOMeWxTWIW096/TtVP+8W3p/XnaFflhmcFp+U4zlxUxWj4XwNs6HbDeTtN4yun0GNTTDBw/SvufKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.56.0", + "@typescript-eslint/types": "^8.56.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.0.tgz", + "integrity": "sha512-7UiO/XwMHquH+ZzfVCfUNkIXlp/yQjjnlYUyYz7pfvlK3/EyyN6BK+emDmGNyQLBtLGaYrTAI6KOw8tFucWL2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.0", + "@typescript-eslint/visitor-keys": "8.56.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.0.tgz", + "integrity": "sha512-bSJoIIt4o3lKXD3xmDh9chZcjCz5Lk8xS7Rxn+6l5/pKrDpkCwtQNQQwZ2qRPk7TkUYhrq3WPIHXOXlbXP0itg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.0.tgz", + "integrity": "sha512-qX2L3HWOU2nuDs6GzglBeuFXviDODreS58tLY/BALPC7iu3Fa+J7EOTwnX9PdNBxUI7Uh0ntP0YWGnxCkXzmfA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.0", + "@typescript-eslint/typescript-estree": "8.56.0", + "@typescript-eslint/utils": "8.56.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.0.tgz", + "integrity": "sha512-DBsLPs3GsWhX5HylbP9HNG15U0bnwut55Lx12bHB9MpXxQ+R5GC8MwQe+N1UFXxAeQDvEsEDY6ZYwX03K7Z6HQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.0.tgz", + "integrity": "sha512-ex1nTUMWrseMltXUHmR2GAQ4d+WjkZCT4f+4bVsps8QEdh0vlBsaCokKTPlnqBFqqGaxilDNJG7b8dolW2m43Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.56.0", + "@typescript-eslint/tsconfig-utils": "8.56.0", + "@typescript-eslint/types": "8.56.0", + "@typescript-eslint/visitor-keys": "8.56.0", + "debug": "^4.4.3", + "minimatch": "^9.0.5", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.0.tgz", + "integrity": "sha512-RZ3Qsmi2nFGsS+n+kjLAYDPVlrzf7UhTffrDIKr+h2yzAlYP/y5ZulU0yeDEPItos2Ph46JAL5P/On3pe7kDIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.56.0", + "@typescript-eslint/types": "8.56.0", + "@typescript-eslint/typescript-estree": "8.56.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.0.tgz", + "integrity": "sha512-q+SL+b+05Ud6LbEE35qe4A99P+htKTKVbyiNEe45eCbJFyh/HVK9QXwlrbz+Q4L8SOW4roxSVwXYj4DMBT7Ieg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/amp": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/amp/-/amp-0.3.1.tgz", + "integrity": "sha512-OwIuC4yZaRogHKiuU5WlMR5Xk/jAcpPtawWL05Gj8Lvm2F6mwoJt4O/bHI+DHwG79vWd+8OFYM4/BzYqyRd3qw==", + "dev": true, + "license": "MIT" + }, + "node_modules/amp-message": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/amp-message/-/amp-message-0.1.2.tgz", + "integrity": "sha512-JqutcFwoU1+jhv7ArgW38bqrE+LQdcRv4NxNw0mp0JHQyB6tXesWRjtYKlDgHRY2o3JE5UTaBGUK8kSWUdxWUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "amp": "0.3.1" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ansis": { + "version": "4.0.0-node10", + "resolved": "https://registry.npmjs.org/ansis/-/ansis-4.0.0-node10.tgz", + "integrity": "sha512-BRrU0Bo1X9dFGw6KgGz6hWrqQuOlVEDOzkb0QSLZY9sXHqA7pNj7yHPVJRz7y/rj4EOJ3d/D5uxH+ee9leYgsg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true, + "license": "MIT" + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ast-types/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/balanced-match": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.3.tgz", + "integrity": "sha512-1pHv8LX9CpKut1Zp4EXey7Z8OfH11ONNH6Dhi2WDUt31VVZFXZzKwXcysBgqSumFCmR+0dqjMK5v5JiFHzi0+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.1.0.tgz", + "integrity": "sha512-RkaJzeJKDbaDWTIPiJwubyljaEPwpVWkm9Rt5h9Nd6h7tEXTJ3VB4qxdZBioV7JO5yLUaOKwz7vDOzlncUsegw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/better-sqlite3": { + "version": "12.6.2", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.6.2.tgz", + "integrity": "sha512-8VYKM3MjCa9WcaSAI3hzwhmyHVlH8tiGFwf0RlTsZPWJ1I5MkzjiudCo4KC4DxOaL/53A5B1sI/IbldNFDbsKA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": "20.x || 22.x || 23.x || 24.x || 25.x" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bodec": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/bodec/-/bodec-0.1.0.tgz", + "integrity": "sha512-Ylo+MAo5BDUq1KA3f3R/MFhh+g8cnHmo8bz3YPGhI1znrMaf77ol1sfvYJzsw3nTE+Y2GryfDxBaR+AqpAkEHQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz", + "integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/c12": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", + "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "chokidar": "^4.0.3", + "confbox": "^0.2.2", + "defu": "^6.1.4", + "dotenv": "^16.6.1", + "exsolve": "^1.0.7", + "giget": "^2.0.0", + "jiti": "^2.4.2", + "ohash": "^2.0.11", + "pathe": "^2.0.3", + "perfect-debounce": "^1.0.0", + "pkg-types": "^2.2.0", + "rc9": "^2.1.2" + }, + "peerDependencies": { + "magicast": "^0.3.5" + }, + "peerDependenciesMeta": { + "magicast": { + "optional": true + } + } + }, + "node_modules/c12/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/c12/node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "devOptional": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/c12/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/charm": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/charm/-/charm-0.1.2.tgz", + "integrity": "sha512-syedaZ9cPe7r3hoQA9twWYKu5AIyCswN5+szkmPBe9ccdLrj4bYaCnLVPTLd2kgVRc7+zoX4tyPgRnFKCj5YjQ==", + "dev": true, + "license": "MIT/X11" + }, + "node_modules/chevrotain": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-10.5.0.tgz", + "integrity": "sha512-Pkv5rBY3+CsHOYfV5g/Vs5JY9WTHHDEKOlohI2XeygaZhUeqhAlldZ8Hz9cRmxu709bvS08YzxHdTPHhffc13A==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@chevrotain/cst-dts-gen": "10.5.0", + "@chevrotain/gast": "10.5.0", + "@chevrotain/types": "10.5.0", + "@chevrotain/utils": "10.5.0", + "lodash": "4.17.21", + "regexp-to-ast": "0.5.0" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/citty": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", + "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "consola": "^3.2.3" + } + }, + "node_modules/cli-tableau": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cli-tableau/-/cli-tableau-2.0.1.tgz", + "integrity": "sha512-he+WTicka9cl0Fg/y+YyxcN6/bfQ/1O3QmgxRXDhABKqLzvoOSM4fMzp39uMyLBulAFuywD2N7UaoQE7WaADxQ==", + "dev": true, + "dependencies": { + "chalk": "3.0.0" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/confbox": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz", + "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/croner": { + "version": "4.1.97", + "resolved": "https://registry.npmjs.org/croner/-/croner-4.1.97.tgz", + "integrity": "sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-hash": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-4.0.1.tgz", + "integrity": "sha512-4u4yl+8C+75Xedf1uMA0J/TTYAqJ54XdyBc1RV3UjCkU2wQjFMsB5ScjRDh3oo21zAwSprcVEDolaGDT8z5G6g==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/culvert": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/culvert/-/culvert-0.1.2.tgz", + "integrity": "sha512-yi1x3EAWKjQTreYWeSd98431AV+IEE0qoDyOoaHJ7KJ21gv6HtBXHVLX74opVSGqcR8/AbjJBHAHpcOy2bj5Gg==", + "dev": true, + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/dayjs": { + "version": "1.11.15", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.15.tgz", + "integrity": "sha512-MC+DfnSWiM9APs7fpiurHGCoeIx0Gdl6QZBy+5lu8MbYKN5FZEXqOgrundfibdfhGZ15o9hzmZ2xJjZnbvgKXQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge-ts": { + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", + "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "devOptional": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/defu": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.4.tgz", + "integrity": "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", + "devOptional": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/destr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", + "integrity": "sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/diff": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dotenv": { + "version": "17.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.3.1.tgz", + "integrity": "sha512-IO8C/dzEb6O3F9/twg6ZLXz164a2fhTnEWb95H23Dm4OuN+92NmEAlTrupP9VW6Jm3sO26tQlqyvyi4CsnY9GA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dynamic-dedupe": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", + "integrity": "sha512-ssuANeD+z97meYOqd50e04Ze5qp4bPqo8cCkI4TRjZkzAUgIDTrXV1R8QCdINpiI+hw14+rYazvTRdQrz0/rFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + } + }, + "node_modules/effect": { + "version": "3.18.4", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.18.4.tgz", + "integrity": "sha512-b1LXQJLe9D11wfnOKAk3PKxuqYshQ0Heez+y5pnkd3jLj1yx9QhM72zZ9uUrOQyNvrs2GZZd/3maL0ZV18YuDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, + "node_modules/empathic": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz", + "integrity": "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "peer": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/eslint": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.0.tgz", + "integrity": "sha512-O0piBKY36YSJhlFSG8p9VUdPV/SxxS4FYDWVpr/9GJuMaepzwlf4J8I4ov1b+ySQfDTPhc3DtLaxcT1fN0yqCg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.0", + "@eslint/config-helpers": "^0.5.2", + "@eslint/core": "^1.1.0", + "@eslint/plugin-kit": "^0.6.0", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.12.4", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.0", + "eslint-visitor-keys": "^5.0.0", + "espree": "^11.1.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.1.1", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.0.tgz", + "integrity": "sha512-CkWE42hOJsNj9FJRaoMX9waUFYhqY4jmyLFdAdzZr6VaCg3ynLYx4WnOdkaIifGfH4gsUcBTn4OZbHXkpLD0FQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.0.tgz", + "integrity": "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.0.tgz", + "integrity": "sha512-WFWYhO1fV4iYkqOOvq8FbqIhr2pYfoDY0kCotMkDeNtGpiGGkZ1iov2u8ydjtgM8yF8rzK7oaTbw2NAzbAbehw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/eventemitter2": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-5.0.1.tgz", + "integrity": "sha512-5EM1GHXycJBS6mauYAbVKT1cVs7POKWb2NXD4Vyt8dDqeZa7LaDK1/sjtL+Zb0lzTpSNil4596Dyu97hz37QLg==", + "dev": true, + "license": "MIT" + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/exsolve": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz", + "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/extrareqp2": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/extrareqp2/-/extrareqp2-1.0.0.tgz", + "integrity": "sha512-Gum0g1QYb6wpPJCVypWP3bbIuaibcFiJcpuPM10YSXp/tzqi84x9PJageob+eN4xVRIOto4wjSGNLyMD54D2xA==", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.14.0" + } + }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fclone": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/fclone/-/fclone-1.0.11.tgz", + "integrity": "sha512-GDqVQezKzRABdeqflsgMr7ktzgF9CyS+p2oe0jJqUY6izSSbhPIQJDpoU4PtGcD7VPM9xh/dVrTu6z1nwgmEGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "node_modules/get-port-please": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.2.0.tgz", + "integrity": "sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/get-uri": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.2", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/giget": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", + "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.1.6", + "consola": "^3.4.0", + "defu": "^6.1.4", + "node-fetch-native": "^1.6.6", + "nypm": "^0.6.0", + "pathe": "^2.0.3" + }, + "bin": { + "giget": "dist/cli.mjs" + } + }, + "node_modules/git-node-fs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/git-node-fs/-/git-node-fs-1.0.0.tgz", + "integrity": "sha512-bLQypt14llVXBg0S0u8q8HmU7g9p3ysH+NvVlae5vILuUvs759665HvmR5+wb04KjHyjFcDRxdYb4kyNnluMUQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/git-sha1": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/git-sha1/-/git-sha1-0.1.2.tgz", + "integrity": "sha512-2e/nZezdVlyCopOCYHeW0onkbZg7xP1Ad6pndPy1rCygeRykefUS6r7oA5cJRGEFvseiaz5a/qUHFVX1dd6Isg==", + "dev": true, + "license": "MIT" + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "17.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.3.0.tgz", + "integrity": "sha512-yMqGUQVVCkD4tqjOJf3TnrvaaHDMYp4VlUSObbkIiuCPe/ofdMBFIAcBbCSRFWOnos6qRiTVStDwqPLUclaxIw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/grammex": { + "version": "3.1.12", + "resolved": "https://registry.npmjs.org/grammex/-/grammex-3.1.12.tgz", + "integrity": "sha512-6ufJOsSA7LcQehIJNCO7HIBykfM7DXQual0Ny780/DEcJIpBlHRvcqEBWGPYd7hrXL2GJ3oJI1MIhaXjWmLQOQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/grammy": { + "version": "1.40.0", + "resolved": "https://registry.npmjs.org/grammy/-/grammy-1.40.0.tgz", + "integrity": "sha512-ssuE7fc1AwqlUxHr931OCVW3fU+oFDjHZGgvIedPKXfTdjXvzP19xifvVGCnPtYVUig1Kz+gwxe4A9M5WdkT4Q==", + "license": "MIT", + "peer": true, + "dependencies": { + "@grammyjs/types": "3.24.0", + "abort-controller": "^3.0.0", + "debug": "^4.4.3", + "node-fetch": "^2.7.0" + }, + "engines": { + "node": "^12.20.0 || >=14.13.1" + } + }, + "node_modules/graphmatch": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/graphmatch/-/graphmatch-1.1.1.tgz", + "integrity": "sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.11.4", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.4.tgz", + "integrity": "sha512-U7tt8JsyrxSRKspfhtLET79pU8K+tInj5QZXs1jSugO1Vq5dFj3kmZsRldo29mTBfcjDRVRXrEZ6LS63Cog9ZA==", + "devOptional": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/http-status-codes": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "node_modules/ip-address": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", + "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "devOptional": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/js-git": { + "version": "0.7.8", + "resolved": "https://registry.npmjs.org/js-git/-/js-git-0.7.8.tgz", + "integrity": "sha512-+E5ZH/HeRnoc/LW0AmAyhU+mNcWBzAKE+30+IDMLSLbbK+Tdt02AdkOKq9u15rlJsDEGFqtgckc8ZM59LhhiUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "bodec": "^0.1.0", + "culvert": "^0.1.2", + "git-sha1": "^0.1.2", + "pako": "^0.2.5" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC", + "optional": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", + "integrity": "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/lru.min": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.4.tgz", + "integrity": "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==", + "devOptional": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true, + "license": "ISC" + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.2.tgz", + "integrity": "sha512-+G4CpNBxa5MprY+04MbgOw1v7So6n5JY166pFi9KfYwT78fxScCeSNQSNzp6dpPSW2rONOps6Ocam1wFhCgoVw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, + "node_modules/mlly": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz", + "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "pathe": "^2.0.3", + "pkg-types": "^1.3.1", + "ufo": "^1.6.1" + } + }, + "node_modules/mlly/node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mlly/node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, + "node_modules/module-details-from-path": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/module-details-from-path/-/module-details-from-path-1.0.4.tgz", + "integrity": "sha512-EGWKgxALGMgzvxYF1UyGTy0HXX/2vHLkw6+NvDKW2jypWbHpjQuj4UMcqQWXHERJhVGKikolT06G3bcKe4fi7w==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true, + "license": "ISC" + }, + "node_modules/mysql2": { + "version": "3.15.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz", + "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.0", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "node_modules/mysql2/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "lru.min": "^1.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/needle": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/node-abi": { + "version": "3.87.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.87.0.tgz", + "integrity": "sha512-+CGM1L1CgmtheLcBuleyYOn7NWPVu0s0EJH2C4puxgEZb9h8QpR9G2dBfZJOAUhi7VQxuBPMd0hiISWcTyiYyQ==", + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch-native": { + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", + "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nypm": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.5.tgz", + "integrity": "sha512-K6AJy1GMVyfyMXRVB88700BJqNUkByijGJM8kEHpLdcAt+vSQAVfkWWHYzuRXHSY6xA2sNc5RjTj0p9rE2izVQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "citty": "^0.2.0", + "pathe": "^2.0.3", + "tinyexec": "^1.0.2" + }, + "bin": { + "nypm": "dist/cli.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/nypm/node_modules/citty": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.1.tgz", + "integrity": "sha512-kEV95lFBhQgtogAPlQfJJ0WGVSokvLr/UEoFPiKKOXF7pl98HfUVUD0ejsuTCld/9xH9vogSywZ5KqHzXrZpqg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ohash": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.11.tgz", + "integrity": "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pac-proxy-agent": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz", + "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.6", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.5" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", + "dev": true, + "license": "MIT", + "dependencies": { + "degenerator": "^5.0.0", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pako": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", + "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidusage": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-3.0.2.tgz", + "integrity": "sha512-g0VU+y08pKw5M8EZ2rIGiEBaB8wrQMjYGFfW2QVIfyT8V+fq8YFLkvlz4bz5ljvFDJYNFCWT3PWqcRr2FKO81w==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.0.tgz", + "integrity": "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.2.2", + "exsolve": "^1.0.7", + "pathe": "^2.0.3" + } + }, + "node_modules/pm2": { + "version": "6.0.14", + "resolved": "https://registry.npmjs.org/pm2/-/pm2-6.0.14.tgz", + "integrity": "sha512-wX1FiFkzuT2H/UUEA8QNXDAA9MMHDsK/3UHj6Dkd5U7kxyigKDA5gyDw78ycTQZAuGCLWyUX5FiXEuVQWafukA==", + "dev": true, + "license": "AGPL-3.0", + "dependencies": { + "@pm2/agent": "~2.1.1", + "@pm2/blessed": "0.1.81", + "@pm2/io": "~6.1.0", + "@pm2/js-api": "~0.8.0", + "@pm2/pm2-version-check": "^1.0.4", + "ansis": "4.0.0-node10", + "async": "3.2.6", + "chokidar": "3.6.0", + "cli-tableau": "2.0.1", + "commander": "2.15.1", + "croner": "4.1.97", + "dayjs": "1.11.15", + "debug": "4.4.3", + "enquirer": "2.3.6", + "eventemitter2": "5.0.1", + "fclone": "1.0.11", + "js-yaml": "4.1.1", + "mkdirp": "1.0.4", + "needle": "2.4.0", + "pidusage": "3.0.2", + "pm2-axon": "~4.0.1", + "pm2-axon-rpc": "~0.7.1", + "pm2-deploy": "~1.0.2", + "pm2-multimeter": "^0.1.2", + "promptly": "2.2.0", + "semver": "7.7.2", + "source-map-support": "0.5.21", + "sprintf-js": "1.1.2", + "vizion": "~2.2.1" + }, + "bin": { + "pm2": "bin/pm2", + "pm2-dev": "bin/pm2-dev", + "pm2-docker": "bin/pm2-docker", + "pm2-runtime": "bin/pm2-runtime" + }, + "engines": { + "node": ">=16.0.0" + }, + "optionalDependencies": { + "pm2-sysmonit": "^1.2.8" + } + }, + "node_modules/pm2-axon": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pm2-axon/-/pm2-axon-4.0.1.tgz", + "integrity": "sha512-kES/PeSLS8orT8dR5jMlNl+Yu4Ty3nbvZRmaAtROuVm9nYYGiaoXqqKQqQYzWQzMYWUKHMQTvBlirjE5GIIxqg==", + "dev": true, + "license": "MIT", + "dependencies": { + "amp": "~0.3.1", + "amp-message": "~0.1.1", + "debug": "^4.3.1", + "escape-string-regexp": "^4.0.0" + }, + "engines": { + "node": ">=5" + } + }, + "node_modules/pm2-axon-rpc": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/pm2-axon-rpc/-/pm2-axon-rpc-0.7.1.tgz", + "integrity": "sha512-FbLvW60w+vEyvMjP/xom2UPhUN/2bVpdtLfKJeYM3gwzYhoTEEChCOICfFzxkxuoEleOlnpjie+n1nue91bDQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.1" + }, + "engines": { + "node": ">=5" + } + }, + "node_modules/pm2-deploy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pm2-deploy/-/pm2-deploy-1.0.2.tgz", + "integrity": "sha512-YJx6RXKrVrWaphEYf++EdOOx9EH18vM8RSZN/P1Y+NokTKqYAca/ejXwVLyiEpNju4HPZEk3Y2uZouwMqUlcgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-series": "^1.1.8", + "tv4": "^1.3.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pm2-multimeter": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/pm2-multimeter/-/pm2-multimeter-0.1.2.tgz", + "integrity": "sha512-S+wT6XfyKfd7SJIBqRgOctGxaBzUOmVQzTAS+cg04TsEUObJVreha7lvCfX8zzGVr871XwCSnHUU7DQQ5xEsfA==", + "dev": true, + "license": "MIT/X11", + "dependencies": { + "charm": "~0.1.1" + } + }, + "node_modules/pm2-sysmonit": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/pm2-sysmonit/-/pm2-sysmonit-1.2.8.tgz", + "integrity": "sha512-ACOhlONEXdCTVwKieBIQLSi2tQZ8eKinhcr9JpZSUAL8Qy0ajIgRtsLxG/lwPOW3JEKqPyw/UaHmTWhUzpP4kA==", + "dev": true, + "license": "Apache", + "optional": true, + "dependencies": { + "async": "^3.2.0", + "debug": "^4.3.1", + "pidusage": "^2.0.21", + "systeminformation": "^5.7", + "tx2": "~1.0.4" + } + }, + "node_modules/pm2-sysmonit/node_modules/pidusage": { + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/pidusage/-/pidusage-2.0.21.tgz", + "integrity": "sha512-cv3xAQos+pugVX+BfXpHsbyz/dLzX+lr44zNMsYiGxUw+kV5sgQCIcLd1z+0vq+KyC7dJ+/ts2PsfgWfSC3WXA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-load-config/node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/postgres": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.7.tgz", + "integrity": "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==", + "devOptional": true, + "license": "Unlicense", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prisma": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-7.4.1.tgz", + "integrity": "sha512-gDKOXwnPiMdB+uYMhMeN8jj4K7Cu3Q2wB/wUsITOoOk446HtVb8T9BZxFJ1Zop6alc89k6PMNdR2FZCpbXp/jw==", + "devOptional": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@prisma/config": "7.4.1", + "@prisma/dev": "0.20.0", + "@prisma/engines": "7.4.1", + "@prisma/studio-core": "0.13.1", + "mysql2": "3.15.3", + "postgres": "3.4.7" + }, + "bin": { + "prisma": "build/index.js" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24.0" + }, + "peerDependencies": { + "better-sqlite3": ">=9.0.0", + "typescript": ">=5.4.0" + }, + "peerDependenciesMeta": { + "better-sqlite3": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/promptly": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/promptly/-/promptly-2.2.0.tgz", + "integrity": "sha512-aC9j+BZsRSSzEsXBNBwDnAxujdx19HycZoKgRgzWnS8eOHg1asuf9heuLprfbe739zY3IdUQx+Egv6Jn135WHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "read": "^1.0.4" + } + }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proxy-agent": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", + "lru-cache": "^7.14.1", + "pac-proxy-agent": "^7.0.1", + "proxy-from-env": "^1.1.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, + "license": "MIT" + }, + "node_modules/pump": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", + "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "devOptional": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc9": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", + "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "defu": "^6.1.4", + "destr": "^2.0.3" + } + }, + "node_modules/react": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.4.tgz", + "integrity": "sha512-9nfp2hYpCwOjAN+8TZFGhtWEwgvWHXqESH8qT89AT/lWklpLON22Lc8pEtnpsZz7VmawabSU0gCjnj8aC0euHQ==", + "devOptional": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.4", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.4.tgz", + "integrity": "sha512-AXJdLo8kgMbimY95O2aKQqsz2iWi9jMgKJhRBAxECE4IFxfcazB2LmzloIoibJI3C12IlY20+KFaLv+71bUJeQ==", + "devOptional": true, + "license": "MIT", + "peer": true, + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.4" + } + }, + "node_modules/read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "mute-stream": "~0.0.4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/regexp-to-ast": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", + "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/remeda": { + "version": "2.33.4", + "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.33.4.tgz", + "integrity": "sha512-ygHswjlc/opg2VrtiYvUOPLjxjtdKvjGz1/plDhkG66hjNjFr1xmfrs2ClNFo/E6TyUFiwYNh53bKV26oBoMGQ==", + "devOptional": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/remeda" + } + }, + "node_modules/require-in-the-middle": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-5.2.0.tgz", + "integrity": "sha512-efCx3b+0Z69/LGJmm9Yvi4cqEdxnoGnxYxGxBghkkTTFeXRtTCmmhO0AnAfHz59k957uTSuy8WaHqOs8wbYUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.1.1", + "module-details-from-path": "^1.0.3", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rollup": { + "version": "4.57.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.57.1.tgz", + "integrity": "sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.57.1", + "@rollup/rollup-android-arm64": "4.57.1", + "@rollup/rollup-darwin-arm64": "4.57.1", + "@rollup/rollup-darwin-x64": "4.57.1", + "@rollup/rollup-freebsd-arm64": "4.57.1", + "@rollup/rollup-freebsd-x64": "4.57.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.57.1", + "@rollup/rollup-linux-arm-musleabihf": "4.57.1", + "@rollup/rollup-linux-arm64-gnu": "4.57.1", + "@rollup/rollup-linux-arm64-musl": "4.57.1", + "@rollup/rollup-linux-loong64-gnu": "4.57.1", + "@rollup/rollup-linux-loong64-musl": "4.57.1", + "@rollup/rollup-linux-ppc64-gnu": "4.57.1", + "@rollup/rollup-linux-ppc64-musl": "4.57.1", + "@rollup/rollup-linux-riscv64-gnu": "4.57.1", + "@rollup/rollup-linux-riscv64-musl": "4.57.1", + "@rollup/rollup-linux-s390x-gnu": "4.57.1", + "@rollup/rollup-linux-x64-gnu": "4.57.1", + "@rollup/rollup-linux-x64-musl": "4.57.1", + "@rollup/rollup-openbsd-x64": "4.57.1", + "@rollup/rollup-openharmony-arm64": "4.57.1", + "@rollup/rollup-win32-arm64-msvc": "4.57.1", + "@rollup/rollup-win32-ia32-msvc": "4.57.1", + "@rollup/rollup-win32-x64-gnu": "4.57.1", + "@rollup/rollup-win32-x64-msvc": "4.57.1", + "fsevents": "~2.3.2" + } + }, + "node_modules/run-series": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz", + "integrity": "sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.4.tgz", + "integrity": "sha512-1n3r/tGXO6b6VXMdFT54SHzT9ytu9yr7TaELowdYpMqY/Ao7EnlQGmAQ1+RatX7Tkkdm6hONI2owqNx2aZj5Sw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==", + "devOptional": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/shimmer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "devOptional": true, + "license": "ISC" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.0.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sucrase": { + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.1.tgz", + "integrity": "sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "tinyglobby": "^0.2.11", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/sucrase/node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/systeminformation": { + "version": "5.31.1", + "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.1.tgz", + "integrity": "sha512-6pRwxoGeV/roJYpsfcP6tN9mep6pPeCtXbUOCdVa0nme05Brwcwdge/fVNhIZn2wuUitAKZm4IYa7QjnRIa9zA==", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin", + "linux", + "win32", + "freebsd", + "openbsd", + "netbsd", + "sunos", + "android" + ], + "bin": { + "systeminformation": "lib/cli.js" + }, + "engines": { + "node": ">=8.0.0" + }, + "funding": { + "type": "Buy me a coffee", + "url": "https://www.buymeacoffee.com/systeminfo" + } + }, + "node_modules/tar-fs": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node-dev": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ts-node-dev/-/ts-node-dev-2.0.0.tgz", + "integrity": "sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.1", + "dynamic-dedupe": "^0.3.0", + "minimist": "^1.2.6", + "mkdirp": "^1.0.4", + "resolve": "^1.0.0", + "rimraf": "^2.6.1", + "source-map-support": "^0.5.12", + "tree-kill": "^1.2.2", + "ts-node": "^10.4.0", + "tsconfig": "^7.0.0" + }, + "bin": { + "ts-node-dev": "lib/bin.js", + "tsnd": "lib/bin.js" + }, + "engines": { + "node": ">=0.8.0" + }, + "peerDependencies": { + "node-notifier": "*", + "typescript": "*" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/tsconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz", + "integrity": "sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/strip-bom": "^3.0.0", + "@types/strip-json-comments": "0.0.30", + "strip-bom": "^3.0.0", + "strip-json-comments": "^2.0.0" + } + }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tsup": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/tsup/-/tsup-8.5.1.tgz", + "integrity": "sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.27.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "^0.7.6", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/tsup/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/tsup/node_modules/source-map": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 12" + } + }, + "node_modules/tsup/node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tv4": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", + "integrity": "sha512-afizzfpJgvPr+eDkREK4MxJ/+r8nEEHcmitwgnPUqpaP+FpwQyadnxNoSACbgc/b1LsZYtODGoPiFxQrgJgjvw==", + "dev": true, + "license": [ + { + "type": "Public Domain", + "url": "http://geraintluff.github.io/tv4/LICENSE.txt" + }, + { + "type": "MIT", + "url": "http://jsonary.com/LICENSE.txt" + } + ], + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/tx2": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tx2/-/tx2-1.0.5.tgz", + "integrity": "sha512-sJ24w0y03Md/bxzK4FU8J8JveYYUbSs2FViLJ2D/8bytSiyPRbuE3DyL/9UKYXTZlV3yXq0L8GLlhobTnekCVg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "json-stringify-safe": "^5.0.1" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "devOptional": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.0.tgz", + "integrity": "sha512-c7toRLrotJ9oixgdW7liukZpsnq5CZ7PuKztubGYlNppuTqhIoWfhgHo/7EU0v06gS2l/x0i2NEFK1qMIf0rIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.56.0", + "@typescript-eslint/parser": "8.56.0", + "@typescript-eslint/typescript-estree": "8.56.0", + "@typescript-eslint/utils": "8.56.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/ufo": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.3.tgz", + "integrity": "sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true, + "license": "MIT" + }, + "node_modules/valibot": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-1.2.0.tgz", + "integrity": "sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/vizion": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vizion/-/vizion-2.2.1.tgz", + "integrity": "sha512-sfAcO2yeSU0CSPFI/DmZp3FsFE9T+8913nv1xWBOyzODv13fwkn6Vl7HqxGpkr9F608M+8SuFId3s+BlZqfXww==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^2.6.3", + "git-node-fs": "^1.0.0", + "ini": "^1.3.5", + "js-git": "^0.7.8" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/vizion/node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash": "^4.17.14" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zeptomatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/zeptomatch/-/zeptomatch-2.1.0.tgz", + "integrity": "sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "grammex": "^3.1.11", + "graphmatch": "^1.1.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..1d40292 --- /dev/null +++ b/package.json @@ -0,0 +1,40 @@ +{ + "name": "jolb-poem-bot", + "version": "1.0.0", + "type": "module", + "description": "", + "main": "index.js", + "scripts": { + "dev": "tsup src/server/index.ts --watch --onSuccess \"node dist/index.cjs\"", + "lint": "eslint", + "build": "tsup src/server/index.ts --minify --clean", + "start": "pm2 start ecosystem.config.js", + "check:circles": "npx madge --circular src/" + }, + "author": "", + "license": "ISC", + "dependencies": { + "@grammyjs/conversations": "^2.1.1", + "@grammyjs/menu": "^1.3.1", + "@prisma/adapter-better-sqlite3": "^7.4.1", + "@prisma/client": "^7.4.1", + "crypto-hash": "^4.0.1", + "dotenv": "^17.3.1", + "grammy": "^1.40.0" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/node": "^25.3.0", + "eslint": "^10.0.0", + "globals": "^17.3.0", + "jiti": "^2.6.1", + "pm2": "^6.0.14", + "prisma": "^7.4.1", + "ts-node": "^10.9.2", + "ts-node-dev": "^2.0.0", + "tsconfig-paths": "^4.2.0", + "tsup": "^8.5.1", + "typescript": "^5.9.3", + "typescript-eslint": "^8.56.0" + } +} diff --git a/prisma.config.ts b/prisma.config.ts new file mode 100644 index 0000000..04c0dc7 --- /dev/null +++ b/prisma.config.ts @@ -0,0 +1,9 @@ +import 'dotenv/config'; +import { defineConfig, env } from 'prisma/config'; + +export default defineConfig({ + schema: './prisma/schema.prisma', + datasource: { + url: env('DATABASE_URL'), + }, +}); \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..e644c4a --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,62 @@ +datasource db { + provider = "postgresql" +} + +generator client { + provider = "prisma-client" + output = "../src/generated/prisma" +} + +enum PlayerState { + IN_ARCHIVES + LOBBY + POST_GAME + SETTING_UP_GAME + SPECTATING + START + TRYING_LEAVE + TYPING + VIEWING_ARCHIVED_POEM + WAITING_AFTER_WRITING + WAITING_TO_WRITE + WRITING +} + +model Player { + playerId String @id + createdAt DateTime @default(now()) + currentGame Game? @relation("playersInGame", fields: [currentGameId], references: [gameId]) + currentGameId Int? + state PlayerState @default(LOBBY) + previousState PlayerState @default(LOBBY) + userName String + games Game[] +} + +model Game { + gameId Int @id @default(autoincrement()) + config GameConfig? @relation(fields: [gameConfigId], references: [configId]) + createdAt DateTime @default(now()) + joinCode String + poem Poem? + poemId Int? + gameConfigId Int? + hostPlayer Player @relation(fields: [hostPlayerId], references: [playerId]) + hostPlayerId String + inProgress Boolean @default(false) + players Player[] @relation("playersInGame") +} + +model GameConfig { + configId Int @id @default(autoincrement()) + games Game[] +} + +model Poem { + poemId Int @id @default(autoincrement()) + createdAt DateTime @default(now()) + game Game @relation(fields: [gameId], references: [gameId]) + gameId Int @unique + finished Boolean @default(false) + lines Json +} diff --git a/src/classes/game/game.ts b/src/classes/game/game.ts new file mode 100644 index 0000000..3d2c50d --- /dev/null +++ b/src/classes/game/game.ts @@ -0,0 +1,351 @@ +import { HAS_JOINED, HAS_LEFT, HOST_LEFT, HOST_RESTARTED } from "const"; +import { getPlayerOrThrow, getPlayers, leaveGame } from "data"; +import { setPlayerState } from "player-state"; +import { + Context, + GameOptions, + GameOverrides, + GameProps, + PlayerState, +} from "types"; +import { generateGameId } from "./generate-game-id"; +import { Player } from "../player"; +import { Poem } from "../poem"; +import { forPlayers, randomStarDecorator } from "utils"; +import { messagePlayer } from "messaging"; +import { AllStateFn, OthersStateFn, AllFn, OthersFn } from "./types"; + +export const forAllOtherPlayers = async ({ + callback, + fromPlayerId, + players, +}: { + fromPlayerId: number; + callback: (player: Player) => Promise; + players: Player[]; +}) => { + const otherPlayers = players.filter((player) => player.id !== fromPlayerId); + await forPlayers(otherPlayers, callback); +}; + +export const gameDefaults: Partial = { + inProgress: false, +}; + +// TODO decompose this into smaller bits +export class Game { + currentWriterId?: number; + destroy: () => void; + options: GameOptions; + hostId?: number; + id: string; + inProgress: boolean; + poem: Poem; + playerIds: number[]; + + constructor(overrides: GameOverrides) { + const { + currentWriterId, + destroy, + hostId, + id, + inProgress, + options, + poemProps, + playerIds, + } = { + ...gameDefaults, + ...overrides, + }; + this.currentWriterId = currentWriterId; + this.destroy = destroy ? () => destroy(this.id) : () => null; + this.hostId = hostId; + this.id = id ?? generateGameId(); + this.inProgress = !!inProgress; + this.options = { ...(options || {}) }; + this.playerIds = playerIds ?? []; + this.poem = new Poem({ gameId: this.id, ...(poemProps ?? {}) }); + /* Object.values(helperFns).forEach( + (fn) => (this[fn.name as keyof Helpers] = fn), + ); */ + } + + advanceTurnOrder = async (ctx: Context, previousPlayerId?: number) => { + const nextPlayer = this.getActivePlayer(); + const gameDone = !nextPlayer; + if (gameDone) { + await this.finish(ctx); + return; + } + if (previousPlayerId && this.hasPlayer(previousPlayerId)) { + await setPlayerState( + previousPlayerId, + ctx, + PlayerState.WAITING_AFTER_WRITING, + ); + } + + const { id: nextPlayerId } = nextPlayer; + // messages to the previous and next player are already handled by state changes + await forPlayers(this.getPlayers(), async (player) => { + if (player.id === nextPlayerId) { + await setPlayerState(nextPlayerId, ctx, PlayerState.WRITING); + } else if (![previousPlayerId].includes(player.id)) { + player.refreshMessage(ctx); + } + }); + }; + + removePlayer = async (player: Player, ctx: Context) => { + if (player.id === this.hostId) { + await this.removeHost(ctx); + return; + } + if (!this.getHost()) { + return; + } + this.removePlayerId(player.id); + + await this.messageAllOtherPlayers({ + ctx, + customMessage: HAS_LEFT(player.userName), + fromPlayerId: player.id, + players: this.getPlayers(), + state: null, + }); + if (this.poem.completed) return; + const playerWasActive = + this.inProgress && + !this.getPlayers().find((p) => p.state === PlayerState.WRITING); + if (playerWasActive) { + await this.advanceTurnOrder(ctx, player.id); + } else { + await this.refreshPlayerMessages({ ctx, players: this.getPlayers() }); + } + }; + + removeHost = async (ctx: Context) => { + await this.messageAllOtherPlayers({ + ctx, + customMessage: HOST_LEFT, + fromPlayerId: this.hostId!, + players: this.getPlayers(), + state: PlayerState.START, + }); + this.removePlayerId(this.hostId); + + const nonHostPlayers = this.getPlayers().filter( + (player) => player.id !== this.hostId, + ); + await forPlayers( + nonHostPlayers, + async (player) => await leaveGame(ctx, this, player), + ); + this.destroy(); + }; + + startGame = async (ctx: Context) => { + await this.messageAllOtherPlayers({ + ctx, + customMessage: "The host has started the game.", + fromPlayerId: this.hostId!, + players: this.getPlayers(), + state: null, + }); + this.inProgress = true; + this.shufflePlayers(); + const firstPlayer = this.getPlayers()[0]; + await this.transitionAllOtherPlayers({ + ctx, + fromPlayerId: firstPlayer.id, + players: this.getPlayers(), + state: PlayerState.WAITING_TO_WRITE, + }); + await setPlayerState(firstPlayer.id, ctx, PlayerState.WRITING); + }; + + addPlayer = async (playerId: number, ctx: Context) => { + const player = getPlayerOrThrow(playerId); + this.playerIds.push(playerId); + if (this.playerIds.length === 1) { + this.hostId = playerId; + } else { + await this.messageAllOtherPlayers({ + ctx, + customMessage: HAS_JOINED(player.userName), + fromPlayerId: playerId, + players: this.getPlayers(), + state: null, + }); + await this.refreshOtherPlayerMessages({ + ctx, + players: this.getPlayers(), + fromPlayerId: playerId, + }); + } + }; + + finish = async (ctx: Context) => { + this.poem.complete(); + await this.transitionPlayers({ + ctx, + players: this.getPlayers(), + state: PlayerState.POST_GAME, + }); + + await forPlayers(this.getPlayers(), (player) => + this.poem.sendToPlayer(player.id, ctx), + ); + }; + + previousLine = () => { + return this.poem.previousLine(); + }; + + prunePlayerIds = () => { + const players = this.getPlayers(); + for (const player of players) { + if (player.gameId !== this.id) { + this.removePlayerId(player.id); + } + } + }; + + getActivePlayer = (): Player | undefined => { + const eligiblePlayers = this.getEligiblePlayers(); + return eligiblePlayers[0]; + }; + + getEligiblePlayers = () => { + return this.getPlayers().filter((player) => player.canWrite()); + }; + + getHost = (): Player | undefined => { + return this.getPlayers().find((player) => player.isHost()); + }; + + getPlayers = () => { + return getPlayers(this.playerIds); + }; + + hasPlayer = (playerId?: number) => { + return playerId && this.playerIds.includes(playerId); + }; + + removePlayerId = (idToRemove?: number) => { + if (!idToRemove) return; + const idIndex = this.playerIds.findIndex((id) => id === idToRemove); + this.playerIds.splice(idIndex, 1); + }; + + setOptions = (newOptions: GameOptions) => { + this.options = { ...this.options, ...newOptions }; + }; + + private shufflePlayers = () => { + this.playerIds.sort(() => Math.random() - 0.5); + }; + + addLine = async (ctx: Context, line: string, author: Player) => { + this.poem.addLine(line, author.userName); + await messagePlayer( + author.id, + author.state, + ctx, + `Your line has been added! ${randomStarDecorator()}`, + ); + await this.advanceTurnOrder(ctx, author.id); + }; + + restart = async (ctx: Context) => { + this.poem = new Poem({ gameId: this.id }); + this.inProgress = false; + await this.messageAllOtherPlayers({ + ctx, + customMessage: HOST_RESTARTED, + fromPlayerId: this.hostId!, + players: this.getPlayers(), + state: null, + }); + await this.transitionPlayers({ + players: this.getPlayers(), + state: PlayerState.LOBBY, + ctx, + }); + }; + + forAllOtherPlayers = async ({ + callback, + fromPlayerId, + players, + }: { + fromPlayerId: number; + callback: (player: Player) => Promise; + players: Player[]; + }) => { + const otherPlayers = players.filter((player) => player.id !== fromPlayerId); + await forPlayers(otherPlayers, callback); + }; + + messagePlayers: AllStateFn = async ({ + ctx, + customMessage = "", + players, + state, + }) => { + await forPlayers(players, (player) => + messagePlayer(player.id, state || player.state, ctx, customMessage), + ); + }; + + messageAllOtherPlayers: OthersStateFn = async ({ + ctx, + customMessage = "", + fromPlayerId, + players, + state = null, + }) => { + await forAllOtherPlayers({ + players, + fromPlayerId, + callback: (player) => + messagePlayer(player.id, state || player.state, ctx, customMessage), + }); + }; + + transitionPlayers: AllStateFn = async ({ ctx, players, state }) => { + await forPlayers(players, (player) => + setPlayerState(player.id, ctx, state ?? player.state), + ); + }; + + transitionAllOtherPlayers: OthersStateFn = async ({ + ctx, + fromPlayerId, + players, + state, + }) => { + await forAllOtherPlayers({ + fromPlayerId, + players, + callback: (player) => + setPlayerState(player.id, ctx, state ?? player.state), + }); + }; + + refreshPlayerMessages: AllFn = async ({ ctx, players }) => { + await forPlayers(players, (player) => player.refreshMessage(ctx)); + }; + + refreshOtherPlayerMessages: OthersFn = async ({ + ctx, + players, + fromPlayerId, + }) => { + await forAllOtherPlayers({ + callback: (player) => player.refreshMessage(ctx), + fromPlayerId, + players, + }); + }; +} diff --git a/src/classes/game/generate-game-id.ts b/src/classes/game/generate-game-id.ts new file mode 100644 index 0000000..aa98869 --- /dev/null +++ b/src/classes/game/generate-game-id.ts @@ -0,0 +1,14 @@ +import { getGames } from "data"; +import { randomString } from "utils"; + +export const generateGameId = () => { + const games = getGames(); + const maxAttempts = 10; + let gameId = ""; + for (let i = 0; i < maxAttempts; i++) { + gameId = randomString(); + if (!games[gameId]) break; + } + + return gameId; +}; diff --git a/src/classes/game/helpers.ts b/src/classes/game/helpers.ts new file mode 100644 index 0000000..564d8cb --- /dev/null +++ b/src/classes/game/helpers.ts @@ -0,0 +1,83 @@ +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { forPlayers } from "utils"; +import { Player } from "../player"; +import { AllFn, AllStateFn, OthersFn, OthersStateFn } from "./types"; + +export const forAllOtherPlayers = async ({ + callback, + fromPlayerId, + players, +}: { + fromPlayerId: number; + callback: (player: Player) => Promise; + players: Player[]; +}) => { + const otherPlayers = players.filter((player) => player.id !== fromPlayerId); + await forPlayers(otherPlayers, callback); +}; + +export const messagePlayers: AllStateFn = async ({ + ctx, + customMessage = "", + players, + state, +}) => { + await forPlayers(players, (player) => + messagePlayer(player.id, state || player.state, ctx, customMessage), + ); +}; + +export const messageAllOtherPlayers: OthersStateFn = async ({ + ctx, + customMessage = "", + fromPlayerId, + players, + state = null, +}) => { + await forAllOtherPlayers({ + players, + fromPlayerId, + callback: (player) => + messagePlayer(player.id, state || player.state, ctx, customMessage), + }); +}; + +export const transitionPlayers: AllStateFn = async ({ + ctx, + players, + state, +}) => { + await forPlayers(players, (player) => + setPlayerState(player.id, ctx, state ?? player.state), + ); +}; + +export const transitionAllOtherPlayers: OthersStateFn = async ({ + ctx, + fromPlayerId, + players, + state, +}) => { + await forAllOtherPlayers({ + fromPlayerId, + players, + callback: (player) => setPlayerState(player.id, ctx, state ?? player.state), + }); +}; + +export const refreshPlayerMessages: AllFn = async ({ ctx, players }) => { + await forPlayers(players, (player) => player.refreshMessage(ctx)); +}; + +export const refreshOtherPlayerMessages: OthersFn = async ({ + ctx, + players, + fromPlayerId, +}) => { + await forAllOtherPlayers({ + callback: (player) => player.refreshMessage(ctx), + fromPlayerId, + players, + }); +}; diff --git a/src/classes/game/index.ts b/src/classes/game/index.ts new file mode 100644 index 0000000..ba810e6 --- /dev/null +++ b/src/classes/game/index.ts @@ -0,0 +1 @@ +export { Game } from "./game"; diff --git a/src/classes/game/types.ts b/src/classes/game/types.ts new file mode 100644 index 0000000..7995fab --- /dev/null +++ b/src/classes/game/types.ts @@ -0,0 +1,23 @@ +import { Context, PlayerState } from "types"; +import { Player } from "../player"; + +type BasicArgs = { ctx: Context; players: Player[] }; +type BasicFromArgs = { ctx: Context; fromPlayerId: number; players: Player[] }; + +type StateArgs = BasicArgs & { + customMessage?: string; + noMessage?: boolean; + state: PlayerState | null; +}; +type StateFromArgs = BasicArgs & { + customMessage?: string; + fromPlayerId: number; + noMessage?: boolean; + state: PlayerState | null; +}; + +export type AllFn = (args: BasicArgs) => Promise; +export type OthersFn = (args: BasicFromArgs) => Promise; + +export type AllStateFn = (args: StateArgs) => Promise; +export type OthersStateFn = (args: StateFromArgs) => Promise; diff --git a/src/classes/global/index.ts b/src/classes/global/index.ts new file mode 100644 index 0000000..9c8ee37 --- /dev/null +++ b/src/classes/global/index.ts @@ -0,0 +1,97 @@ +import { + ArchivedPoems, + Context, + GameOverrides, + Games, + GlobalProps, + PlayerOverrides, + Players, +} from "types"; +import { Game } from "../game"; +import { Player } from "../player"; +import { Poem } from "classes/poem"; + +export class Global { + activePlayers: Players; + games: Games; + archivedPoems: ArchivedPoems; + + constructor(overrides?: Partial) { + const { activePlayers, games, archivedPoems } = overrides ?? {}; + this.activePlayers = activePlayers ?? {}; + this.games = games ?? {}; + this.archivedPoems = archivedPoems ?? {}; + } + + addGame = (overrides: GameOverrides = {}) => { + const newGame = new Game({ ...overrides, destroy: this.deleteGame }); + this.games[newGame.id] = newGame; + return newGame; + }; + + addPlayer = (overrides: PlayerOverrides) => { + const newPlayer = new Player({ ...overrides, destroy: this.deletePlayer }); + this.activePlayers[newPlayer.id] = newPlayer; + return newPlayer; + }; + + deleteGame = (id: string = "") => { + delete this.games[id]; + }; + + deletePlayer = (id: number) => { + delete this.activePlayers[id]; + }; + + getGame = (id: string = ""): Game | undefined => { + return this.games[id]; + }; + + getGames = () => { + return this.games; + }; + + getPlayer = (id: number): Player | undefined => { + return this.activePlayers[id]; + }; + + getPlayers = (ids: number[]) => { + return ids.map((id) => this.activePlayers[id]).filter((player) => !!player); + }; + + joinGame = async ( + ctx: Context, + game: Game, + player: Player, + newGame?: boolean, + ) => { + if (player.gameId === game.id) { + throw new Error("You are already in this game."); + } + await game.addPlayer(player.id, ctx); + await player.joinGame(ctx, game.id, newGame); + }; + + leaveGame = async (ctx: Context, game: Game, player: Player) => { + await player.leaveGame(ctx); + await game.removePlayer(player, ctx); + }; + + addArchivedPoem = (poem: Poem) => { + this.archivedPoems[poem.id] = poem; + }; + + getArchivedPoem = (id: string = ""): Poem | undefined => { + return this.archivedPoems[id]; + }; + + getArchivedPoems = () => { + return this.archivedPoems; + }; + + clearMemory = () => { + this.activePlayers = []; + this.games = {}; + this.archivedPoems = {}; + }; +} diff --git a/src/classes/index.ts b/src/classes/index.ts new file mode 100644 index 0000000..3d98751 --- /dev/null +++ b/src/classes/index.ts @@ -0,0 +1,4 @@ +export { Game } from "./game"; +export { Global } from "./global"; +export { Player } from "./player"; +export { Poem } from "./poem"; diff --git a/src/classes/player/index.ts b/src/classes/player/index.ts new file mode 100644 index 0000000..81e7a1a --- /dev/null +++ b/src/classes/player/index.ts @@ -0,0 +1 @@ +export { Player } from "./player"; diff --git a/src/classes/player/player.ts b/src/classes/player/player.ts new file mode 100644 index 0000000..bc76429 --- /dev/null +++ b/src/classes/player/player.ts @@ -0,0 +1,80 @@ +import { getGame, getGameOrThrow } from "data"; +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { Context, PlayerOverrides, PlayerProps, PlayerState } from "types"; + +export const playerDefaults: Partial = { + gameId: "", + state: PlayerState.START, +}; + +export class Player { + destroy: (id: number) => void; + gameId?: string; + id: number; + previousState: PlayerState = PlayerState.START; + state: PlayerState; + userName: string; + + constructor(overrides: PlayerOverrides) { + const { destroy, gameId, id, state, userName } = { + ...playerDefaults, + ...overrides, + }; + this.destroy = destroy ?? (() => null); + this.id = id; + this.userName = userName; + this.state = state ?? PlayerState.START; + this.gameId = gameId; + } + + canWrite = () => { + return [PlayerState.WAITING_TO_WRITE].includes(this.state); + }; + + /* destroy=()=>{ + TODO: run this on player disconnect, advance turn order if needed etc + } */ + + getGame = () => { + return getGame(this.gameId); + }; + + isHost = () => { + const game = this.getGame(); + return this.id === game?.hostId; + }; + + isInGame = () => { + return !!this.gameId && this.state !== PlayerState.SETTING_UP_GAME; + }; + + joinGame = async (ctx: Context, gameId: string, newGame?: boolean) => { + const game = getGameOrThrow(gameId); + this.gameId = gameId; + let newState: PlayerState; + if (newGame) { + newState = PlayerState.SETTING_UP_GAME; + } else { + newState = game.inProgress ? PlayerState.SPECTATING : PlayerState.LOBBY; + } + await setPlayerState(this.id, ctx, newState); + }; + + leaveGame = async (ctx: Context) => { + this.gameId = undefined; + await setPlayerState(this.id, ctx, PlayerState.START); + }; + + refreshMessage = async (ctx: Context) => { + await messagePlayer(this.id, this.state, ctx); + }; + + setGameId = (id: string) => { + this.gameId = id; + }; + + setPreviousState = (state: PlayerState) => { + this.previousState = state; + }; +} diff --git a/src/classes/poem/generate-poem-id.ts b/src/classes/poem/generate-poem-id.ts new file mode 100644 index 0000000..b7eed9e --- /dev/null +++ b/src/classes/poem/generate-poem-id.ts @@ -0,0 +1,14 @@ +import { getArchivedPoems } from "data"; + +export const generatePoemId = () => { + const archivedPoems = getArchivedPoems(); + const maxAttempts = 10; + let id = 0; + for (let i = 0; i < maxAttempts; i++) { + // random 4-digit number + id = Math.floor(Math.random() * 9000) + 1000; + if (!archivedPoems[id]) break; + } + + return id; +}; diff --git a/src/classes/poem/index.ts b/src/classes/poem/index.ts new file mode 100644 index 0000000..cea1b8c --- /dev/null +++ b/src/classes/poem/index.ts @@ -0,0 +1 @@ +export { Poem } from "./poem"; diff --git a/src/classes/poem/poem.ts b/src/classes/poem/poem.ts new file mode 100644 index 0000000..ca7f058 --- /dev/null +++ b/src/classes/poem/poem.ts @@ -0,0 +1,79 @@ +import { InlineKeyboard } from "grammy"; +import { RETRIEVE_FROM_ARCHIVE } from "const"; +import { addArchivedPoem, getPlayerOrThrow } from "data"; +import { sanitizeHtml } from "messaging"; +import { CallbackWithData, Context, Line, PoemOverrides } from "types"; +import { encodeCallbackData } from "utils"; +import { generatePoemId } from "./generate-poem-id"; +export { Player } from "../player"; + +export class Poem { + completed?: boolean; + gameId: string; + id: number; + lines: Line[]; + messageId?: number; + + constructor(overrides: PoemOverrides) { + const { gameId, id, lines } = { + ...overrides, + }; + this.gameId = gameId; + this.id = id ?? generatePoemId(); + this.lines = lines ?? []; + } + + addLine = (text: string, author: string) => { + this.lines.push({ + author, + date: new Date().toLocaleString(), + text: text.trim(), + }); + }; + + compile = (includeMeta?: boolean) => { + let compiledPoem = this.lines + .map((line) => { + if (includeMeta) { + const { author, date } = line; + const metaPrefix = `${author} (${date}):`; + return `${metaPrefix}\n${line.text}`; + } + return line.text; + }) + .join("\n"); + compiledPoem += `\n\n${RETRIEVE_FROM_ARCHIVE(this.id)}`; + return sanitizeHtml(compiledPoem); + }; + + complete = () => { + this.completed = true; + addArchivedPoem(this); + }; + + previousLine = () => { + const lineCount = this.lines.length; + if (!lineCount) return ""; + return this.lines[lineCount - 1].text; + }; + + // TODO convert to markdown, but Telegram's markdown is weird + sendToPlayer = async (playerId: number, ctx: Context) => { + const player = getPlayerOrThrow(playerId); + const chatId = ctx.chatId; + if (!player || !chatId) return; + const compiledPoem = this.compile(); + const keyboard = new InlineKeyboard().text( + "Show Metadata", + encodeCallbackData(CallbackWithData.SHOW_POEM_META, { id: this.id }), + ); + await ctx.api.sendMessage(player.id, compiledPoem, { + parse_mode: "HTML", + reply_markup: keyboard, + }); + }; + + setMessageId = (id: number) => { + this.messageId = id; + }; +} diff --git a/src/const/index.ts b/src/const/index.ts new file mode 100644 index 0000000..30552af --- /dev/null +++ b/src/const/index.ts @@ -0,0 +1,3 @@ +export { inspoRepo } from "./inspo-repo"; +export * from "./maps"; +export * from "./strings"; diff --git a/src/const/inspo-repo.ts b/src/const/inspo-repo.ts new file mode 100644 index 0000000..7da5e20 --- /dev/null +++ b/src/const/inspo-repo.ts @@ -0,0 +1,192 @@ +const makeQuote = (quote: string, author: string, work?: string) => { + return `${quote}\n\n- ${author}, "${work}"`; +}; +// todo, move this to db + +/* const quantumPoemLines = [ + "In the ancient glade\n", + "Across old bark\n", + "The quiet shade\n", + `It's always dark\n'`, +]; + +const getQuantumPoem = () => + makeQuote( + quantumPoemLines[Math.floor(Math.random() * quantumPoemLines.length)], + "Gabbo" + ); */ + +const reMonarching = makeQuote( + `Butterflies overwinter +in the milkweed +along storm drains.`, + "Christian Gullette", + "Re-Monarching", +); + +const winterRainDeepens = makeQuote( + `Winter rain deepens +lichened letters on the grave +and my old sadness`, + "Roka", +); + +const bermanSnow = makeQuote( + `When it's snowing, the outdoors seem like a room.\n +Today I traded hellos with my neighbor. +Our voices hung close in the new acoustics. +A room with the walls blasted to shreds and falling.`, + "David Berman", + "Snow", +); + +const stillLife = makeQuote( + `He still found breath, and yet +It was an obscure knack.`, + "Thom Gunn", + "Still Life", +); + +const landlady = makeQuote( + `and when I dream images +of daring escapes through the snow +I find myself walking +always over a vast face +which is the land- +lady's, and wake up shouting.`, + "Margaret Atwood", + "The Landlady", +); + +const suicideNote = makeQuote( + `The calm, +Cool face of the river +Asked me for a kiss.`, + "Langston Hughes", + "Suicide Note", +); + +const capybaraHotsprings1 = makeQuote( + `There exists nothing human that can scratch even the lowest sky`, + "Yaxkin Melchy Ramos", + "The Capybara Hot Springs", +); + +const howl1 = makeQuote( + `angelheaded hipsters burning for the ancient heavenly connection to the starry dynamo in the machinery of night`, + "Allen Ginsberg", + "Howl", +); + +const eggTooth = makeQuote( + `Ears are the eyes on the sides of your head. +Memory lives here, between these apostrophes. +As if to predict music, the ear contains a drum.`, + "Benjamin Garcia", + "Egg Tooth", +); + +const keepingThingsWhole = makeQuote( + `In a field +I am the absence +of field.`, + "Mark Strand", + "Keeping Things Whole", +); + +const somberBull = makeQuote( + `I welcome terror, that somber bull, +I fight for your name held in his jaws.`, + "Andrea Cote", + "Somber Bull", +); + +const theRoom = makeQuote( + `The house turns slowly round its one closed room.`, + "Kevin Hart", + "The Room", +); + +const illWin = makeQuote( + `I'll win the way +I always do +by being gone +when they come.`, + "Robert Creely", + `I'll Win`, +); + +const kingfishers1 = makeQuote( + `As kingfishers catch fire, dragonflies draw flame`, + "Gerard Manley Hopkins", + "As Kingfishers Catch Fire", +); + +const frenchNovel = makeQuote( + `With boots we trekked through slush for a bottle of red wine\ +we weren't allowed to buy, our shirts unbuttoned +under our winter coats.`, + "Richie Hofmann", + "French Novel", +); + +const iHaveSlept = makeQuote( + `[...]on an amber throne of cockroach casings, on a carpet of needles from a cemetery pine[...]`, + "Diane Seuss", + "I have slept in many places, for years on mattresses that entered", +); + +const toMakeAPrarie = makeQuote( + `To make a prairie it takes a clover and one bee, +One clover, and a bee. +And revery. +The revery alone will do, +If bees are few.`, + "Emily Dickinson", + "To make a prairie", +); + +const blackbird1 = makeQuote( + `I was of three minds, +Like a tree +In which there are three blackbirds.`, + "Wallace Stevens", + "Thirteen Ways of Looking at a Blackbird", +); + +const emergency1 = makeQuote( + `Hasn't the goal all along been +to make an unforgettable sound?`, + "Dobby Gibson", + "This Is a Test of the Federal Emergency Management Agency Wireless Warning System", +); + +const stationOfMetro = makeQuote( + `The apparition of these faces in the crowd; +Petals on a wet, black bough.`, + "Ezra Pound", + "In a Station of the Metro", +); + +export const inspoRepo = [ + reMonarching, + winterRainDeepens, + bermanSnow, + stillLife, + landlady, + suicideNote, + capybaraHotsprings1, + howl1, + eggTooth, + keepingThingsWhole, + somberBull, + theRoom, + illWin, + kingfishers1, + frenchNovel, + iHaveSlept, + toMakeAPrarie, + blackbird1, + emergency1, + stationOfMetro, +]; diff --git a/src/const/maps/callback-handler-map.ts b/src/const/maps/callback-handler-map.ts new file mode 100644 index 0000000..14b29d8 --- /dev/null +++ b/src/const/maps/callback-handler-map.ts @@ -0,0 +1,48 @@ +import { + beginGameHandler, + createGameHandler, + deleteGameDescriptionHandler, + enterGameOptionConversation, + getArchivedPoemHandler, + leaveGameHandler, + restartAppHandler, + restartGameHandler, + returnToPreviousStateHandler, + setUpGameHandler, + tryJoinGameHandler, + tryLeaveGameHandler, +} from "handlers"; +import { + BasicCallback, + Callback, + Context, + GameConfigCallback, + GameOption, + HandlerMap, +} from "types"; + +const gameOptionConversationFn = + (gameOption: GameOption) => async (ctx: Context) => { + await enterGameOptionConversation(ctx, gameOption); + }; + +export const callbackHandlerMap: HandlerMap = { + [BasicCallback.BEGIN_GAME]: beginGameHandler, + [BasicCallback.CREATE_GAME]: createGameHandler, + [BasicCallback.EXIT_ARCHIVE]: restartAppHandler, + [BasicCallback.LEAVE_GAME]: leaveGameHandler, + [BasicCallback.RESTART_APP]: restartAppHandler, + [BasicCallback.RESTART_GAME]: restartGameHandler, + [BasicCallback.RETURN_TO_PREVIOUS_STATE]: returnToPreviousStateHandler, + [BasicCallback.SET_UP_GAME]: setUpGameHandler, + [BasicCallback.TRY_JOIN]: tryJoinGameHandler, + [BasicCallback.TRY_LEAVE]: tryLeaveGameHandler, + [BasicCallback.VIEW_ARCHIVED_POEMS]: getArchivedPoemHandler, + [GameConfigCallback.ADD_DESCRIPTION]: gameOptionConversationFn( + GameOption.DESCRIPTION, + ), + [GameConfigCallback.EDIT_DESCRIPTION]: gameOptionConversationFn( + GameOption.DESCRIPTION, + ), + [GameConfigCallback.REMOVE_DESCRIPTION]: deleteGameDescriptionHandler, +}; diff --git a/src/const/maps/callback-with-data-handler-map.ts b/src/const/maps/callback-with-data-handler-map.ts new file mode 100644 index 0000000..08b9f27 --- /dev/null +++ b/src/const/maps/callback-with-data-handler-map.ts @@ -0,0 +1,7 @@ +import { hidePoemMetaHandler, showPoemMetaHandler } from "handlers"; +import { CallbackWithData, HandlerMap } from "types"; + +export const callbackWithDataHandlerMap: HandlerMap = { + [CallbackWithData.HIDE_POEM_META]: hidePoemMetaHandler, + [CallbackWithData.SHOW_POEM_META]: showPoemMetaHandler, +}; diff --git a/src/const/maps/command-handler-map.ts b/src/const/maps/command-handler-map.ts new file mode 100644 index 0000000..224c69a --- /dev/null +++ b/src/const/maps/command-handler-map.ts @@ -0,0 +1,8 @@ +import { inspoHandler, startHandler } from "handlers"; +import { Command, HandlerMap } from "types"; + +export const commandHandlerMap: HandlerMap = { + [Command.START]: startHandler, + [Command.RESTART]: startHandler, + [Command.INSPO]: inspoHandler, +}; diff --git a/src/const/maps/conversation-handler-map.ts b/src/const/maps/conversation-handler-map.ts new file mode 100644 index 0000000..71c1227 --- /dev/null +++ b/src/const/maps/conversation-handler-map.ts @@ -0,0 +1,14 @@ +import { + archivedPoemConversation, + gameDescriptionConversation, + gameIdConversation, +} from "handlers"; +import { ConversationState, ConversationFn } from "types"; + +export const conversationHandlerMap: { + [key in ConversationState]: ConversationFn; +} = { + [ConversationState.GET_ARCHIVED_POEM]: archivedPoemConversation, + [ConversationState.GET_GAME_DESCRIPTION]: gameDescriptionConversation, + [ConversationState.GET_GAME_ID]: gameIdConversation, +}; diff --git a/src/const/maps/game-option-conversation-map.ts b/src/const/maps/game-option-conversation-map.ts new file mode 100644 index 0000000..b6d66d9 --- /dev/null +++ b/src/const/maps/game-option-conversation-map.ts @@ -0,0 +1,5 @@ +import { ConversationState, GameOption } from "types"; + +export const gameOptionConversationMap = { + [GameOption.DESCRIPTION]: ConversationState.GET_GAME_DESCRIPTION, +}; diff --git a/src/const/maps/index.ts b/src/const/maps/index.ts new file mode 100644 index 0000000..8fffb0f --- /dev/null +++ b/src/const/maps/index.ts @@ -0,0 +1,8 @@ +export { callbackHandlerMap } from "./callback-handler-map"; +export { callbackWithDataHandlerMap } from "./callback-with-data-handler-map"; +export { commandHandlerMap } from "./command-handler-map"; +export { conversationHandlerMap } from "./conversation-handler-map"; +export { gameOptionConversationMap } from "./game-option-conversation-map"; +export { replyHandlerMap } from "./reply-handler-map"; +export { stateKeyboardButtonMap } from "./state-keyboard-button-map"; +export { stateMessageMap } from "./state-message-map"; diff --git a/src/const/maps/reply-handler-map.ts b/src/const/maps/reply-handler-map.ts new file mode 100644 index 0000000..7d20c03 --- /dev/null +++ b/src/const/maps/reply-handler-map.ts @@ -0,0 +1,8 @@ +import { writingReplyHandler } from "handlers"; +import { archiveSearchHandler } from "handlers/replies/archive-search"; +import { PlayerState, ReplyHandlerFn } from "types"; + +export const replyHandlerMap: { [key in PlayerState]?: ReplyHandlerFn } = { + [PlayerState.IN_ARCHIVES]: archiveSearchHandler, + [PlayerState.WRITING]: writingReplyHandler, +}; diff --git a/src/const/maps/state-keyboard-button-map.ts b/src/const/maps/state-keyboard-button-map.ts new file mode 100644 index 0000000..e43eaf4 --- /dev/null +++ b/src/const/maps/state-keyboard-button-map.ts @@ -0,0 +1,23 @@ +import { PlayerState } from "generated/prisma/enums"; +import { PlayerModel } from "generated/prisma/models"; +import { Callback, ConversationState, MessagingState } from "types"; + +export const stateCommandsMap: { + [key in MessagingState]: ((player: PlayerModel) => Callback[]) | null; +} = { + [PlayerState.IN_ARCHIVES]: (_player) => [], + [PlayerState.LOBBY]: (_player) => [], + [PlayerState.POST_GAME]: (_player) => [], + [PlayerState.WRITING]: (_player) => [], + [PlayerState.SETTING_UP_GAME]: (_player) => [], + [PlayerState.SPECTATING]: (_player) => [], + [PlayerState.START]: (_player) => [], + [PlayerState.TRYING_LEAVE]: (_player) => [], + [PlayerState.TYPING]: (_player) => [], + [PlayerState.VIEWING_ARCHIVED_POEM]: (_player) => [], + [PlayerState.WAITING_AFTER_WRITING]: (_player) => [], + [PlayerState.WAITING_TO_WRITE]: (_player) => [], + [ConversationState.GET_ARCHIVED_POEM]: (_player) => [], + [ConversationState.GET_GAME_DESCRIPTION]: (_player) => [], + [ConversationState.GET_GAME_ID]: (_player) => [], +}; diff --git a/src/const/maps/state-message-map.ts b/src/const/maps/state-message-map.ts new file mode 100644 index 0000000..c0015ab --- /dev/null +++ b/src/const/maps/state-message-map.ts @@ -0,0 +1,120 @@ +import { Player } from "classes"; +import { BOT_NAME, LOBBY_MESSAGE } from "const/strings"; +import { getGameOrThrow } from "data"; +import { + ConversationState, + GameOption, + MessagingState, + PlayerState, +} from "types"; +import { randomStarDecorator } from "utils"; + +export const stateMessageMap: { + [key in MessagingState]: ((player: Player) => string) | null; +} = { + // player state messages + [PlayerState.IN_ARCHIVES]: (player) => { + // on first search + if (player.previousState === PlayerState.START) { + // TODO use force reply or refactor conversation to make this easier + return `Welcome to the archives! Poems completed in games are stored here with 4-digit ids. Reply to this message (tap and press "Reply") with a poem id to re-read it.`; + } + // on subsequent actions + return `Enter another poem id to search, or click the "Exit Archive" button to return to the start page.`; + }, + [PlayerState.LOBBY]: (player) => { + const game = getGameOrThrow(player.gameId); + const players = game.getPlayers(); + const isHost = player.isHost(); + + return LOBBY_MESSAGE(players, game, isHost); + }, + [PlayerState.POST_GAME]: (_player) => { + return `Poem finished! Here's what you all came up with:`; + }, + [PlayerState.WRITING]: (player) => { + const game = getGameOrThrow(player.gameId); + const firstPlayer = !game.poem.lines.length; + const lastPlayer = !game.getEligiblePlayers().length; + const previousLine = game.previousLine(); + // TODO use force reply or refactor conversation to make this easier + let message = `It's your turn to add to the poem! ${randomStarDecorator()}\n\nReply to this message (tap and press "Reply") to add the next line.\n\n`; + if (previousLine) { + message += `Previous line: ${previousLine}\n\n`; + } + if (firstPlayer && lastPlayer) { + message += "You're writing the only line, I guess!!\n\n"; + } else { + if (firstPlayer) message += `You're writing the first line!\n\n`; + if (lastPlayer) message += `You're writing the last line!\n\n`; + } + return message; + }, + [PlayerState.SETTING_UP_GAME]: (player) => { + const game = getGameOrThrow(player.gameId); + const description = game?.options[GameOption.DESCRIPTION]; + return `Use the buttons below to configure your game. (More configuration options TBD). Press "Create Game" when ready.${ + description ? `\n\nGame Description: ${description}` : "" + }`; + }, + [PlayerState.SPECTATING]: (player) => { + const game = getGameOrThrow(player.gameId); + let message = + "This game is in progress, so you are spectating until the current round is over. "; + if (game.poem.completed) { + message += + "Players are viewing a completed poem and waiting for the host to return to the lobby."; + } else { + const eligiblePlayersRemaining = game.getEligiblePlayers().length + 1; + const oneRemaining = eligiblePlayersRemaining === 1; + message += `There ${ + oneRemaining ? "is" : "are" + } ${eligiblePlayersRemaining} more player${oneRemaining ? "" : "s"} to go.`; + } + return message; + }, + [PlayerState.START]: (_player) => + `Welcome to ${BOT_NAME}!\n\nThe game is simple: work with your friends to write a poem one line at a time. However, each person only gets to see the line written by the person before them, leading to chaos and streams-of-consciousness.\n\nNOTE: This bot is a work-in-progress, with further game modes and quality-of-life features planned for future development. For comments, questions, or to report a bug, please message ${process.env.MY_USERNAME}. (Last updated: 1-18-2026)\n\nHit one of the buttons below to get started.`, + [PlayerState.TRYING_LEAVE]: (player) => { + return `Are you sure you want to leave the game?${player.isHost() ? " Since you are the host, this will end the game for all players." : ""}`; + }, + [PlayerState.TYPING]: null, + [PlayerState.VIEWING_ARCHIVED_POEM]: (_player) => { + return "viewing archived poem state"; + }, + [PlayerState.WAITING_AFTER_WRITING]: (player) => { + const game = getGameOrThrow(player.gameId); + const totalEligible = game.getEligiblePlayers().length; + const eligiblePlayersRemaining = totalEligible || 1; + const oneRemaining = eligiblePlayersRemaining === 1; + return `There ${ + oneRemaining ? "is" : "are" + } ${eligiblePlayersRemaining} more player${oneRemaining ? "" : "s"} to go.`; + }, + [PlayerState.WAITING_TO_WRITE]: (player) => { + const game = getGameOrThrow(player.gameId); + const eligiblePlayers = game.getEligiblePlayers(); + const oneRemaining = eligiblePlayers.length === 1; + const playerPosition = + eligiblePlayers.findIndex( + (eligiblePlayer) => eligiblePlayer.id === player.id, + ) + 1; + const playerIsNext = playerPosition === 1; + const nextUpAlert = playerIsNext ? `Your turn is next!` : ""; + const queueStatus = `There ${ + oneRemaining ? "is" : "are" + } now ${playerPosition} player${oneRemaining ? "" : "s"} ahead of you.`; + return `Waiting to write. ${nextUpAlert || queueStatus}`; + }, + // conversation state messages + [ConversationState.GET_GAME_DESCRIPTION]: (player) => { + const game = getGameOrThrow(player.gameId); + const description = game?.options[GameOption.DESCRIPTION]; + return `Add a description for your game (a writing prompt, a greeting, or anything else).${ + description ? `\n\nCurrent Description: ${description}` : "" + }`; + }, + [ConversationState.GET_ARCHIVED_POEM]: (_player) => + "Enter the id of the poem to check out.", + [ConversationState.GET_GAME_ID]: () => "Enter a 4-character game ID.", +}; diff --git a/src/const/strings.ts b/src/const/strings.ts new file mode 100644 index 0000000..171f0e8 --- /dev/null +++ b/src/const/strings.ts @@ -0,0 +1,65 @@ +import { Game, Player } from "classes"; +import { GameOption } from "types"; + +export const MY_USERNAME = `${process.env.MY_USERNAME}`; +export const PLS_REPORT = `Please let ${MY_USERNAME} know.`; +export const BOT_NAME = "JOLB"; +export const BOT_RUNNING = `${BOT_NAME} is now running.`; +export const FALLBACK_USERNAME = "User"; +export const GAME_NOT_FOUND = "Game not found."; +export const GAME_NOT_FOUND_WITH_ID = (id: string) => + `Game not found with id ${id}.`; +export const HAS_JOINED = (name: string) => `${name} has joined the game.`; +export const HAS_LEFT = (name: string) => `${name} has left the game.`; +export const HIDE_SHOW_METADATA = (show?: boolean) => + `${show ? "Hide" : "Show"} Metadata`; +export const HOST_LEFT = + "The host has left the game. Returning to start screen..."; +export const HOST_RESTARTED = `The host has restarted the game.`; +export const MISSING_BUTTON_LABEL = "Missing button label."; +export const NO_BOTS_PLS = "No bots pls."; +export const ONLY_HOST_CAN_START = "Only the host can start the game."; +export const PLAYER_NOT_FOUND = "Player not found."; +export const POEM_NOT_FOUND = "Poem not found."; +export const POEM_NOT_FOUND_WITH_ID = (id: number) => + `Poem not found with id ${id}.`; +export const USER_NOT_FOUND = "User not found."; +export const RETRIEVE_FROM_ARCHIVE = (id: number) => `(Poem ID: ${id})`; +export const UNKNOWN_ERROR = "An unknown error occurred."; +export const VALIDATION_POEM_ID_IS_NUMBER = "Poem id must be a number."; +export const WELCOME_TO_ARCHIVES = "Welcome to the archives!"; + +// player state messages +export const LOBBY_MESSAGE = ( + players: Player[], + game: Game, + isHost: boolean +) => { + const description = game.options[GameOption.DESCRIPTION]; + let message = `Welcome to the game!\n\n`; + if (description) { + message += `Description: ${description ? `${description}\n\n` : ""}`; + } + message += `Players in lobby:\n\n${players + .map((player) => { + return `- ${player.userName}${ + player.id === game.hostId ? " (host)" : "" + }`; + }) + .join("\n")}\n\n`; + if (!isHost) { + message += "Waiting for host to start game.\n\n"; + } + message += `Invite others with game code ${game?.id}.`; + return message; +}; +export const POST_GAME_MESSAGE = ``; +export const READY_TO_WRITE_MESSAGE = ``; +export const SETTING_UP_GAME_MESSAGE = ``; +export const SPECTATING_MESSAGE = ``; +export const START_MESSAGE = ``; +export const TRYING_LEAVE_MESSAGE = ``; +export const TYPING_MESSAGE = ``; +export const VIEWING_ARCHIVED_POEM_MESSAGE = ``; +export const WAITING_AFTER_WRITING_MESSAGE = ``; +export const WAITING_TO_WRITE_MESSAGE = ``; diff --git a/src/data/crud/create.ts b/src/data/crud/create.ts new file mode 100644 index 0000000..fe1141b --- /dev/null +++ b/src/data/crud/create.ts @@ -0,0 +1,57 @@ +import { GameModel, PlayerModel, PoemModel } from "generated/prisma/models"; +import { prisma } from "../../lib/prisma"; +import { ObjName } from "./types"; + +export async function create( + objName: ObjName, + data: InputType, +) { + try { + let newObj; + switch (objName) { + case "game": + if (Array.isArray(data)) { + newObj = await prisma.game.createMany({ + data: data as GameModel[], + }); + } else { + newObj = await prisma.game.create({ + data: data as GameModel, + include: { + players: true, + }, + }); + } + break; + case "player": + if (Array.isArray(data)) { + newObj = await prisma.player.createMany({ + data: data as PlayerModel[], + }); + } else { + newObj = await prisma.player.create({ + data: data as PlayerModel, + }); + } + break; + case "poem": + if (Array.isArray(data)) { + newObj = await prisma.poem.createMany({ + data: (data as PoemModel[]).map((d) => ({ + ...d, + lines: d.lines!, + })), + }); + } else { + newObj = await prisma.poem.create({ + data: { ...(data as PoemModel), lines: (data as PoemModel).lines! }, + }); + } + break; + } + return newObj as OutputType; + } catch (e) { + console.error(e); + process.exit(1); + } +} diff --git a/src/data/crud/delete.ts b/src/data/crud/delete.ts new file mode 100644 index 0000000..3ac274a --- /dev/null +++ b/src/data/crud/delete.ts @@ -0,0 +1,53 @@ +import { prisma } from "../../lib/prisma"; +import { IdSearchKey, ObjName } from "./types"; + +export async function del(objName: ObjName, id: IdSearchKey) { + try { + switch (objName) { + case "game": + if (Array.isArray(id)) { + await prisma.game.deleteMany({ + where: { gameId: { in: id as number[] } }, + }); + } else if (id === "all") { + await prisma.game.deleteMany({}); + } else { + await prisma.game.delete({ + where: { gameId: id as number }, + }); + } + break; + case "player": + if (Array.isArray(id)) { + await prisma.player.deleteMany({ + where: { playerId: { in: id as string[] } }, + }); + } else if (id === "all") { + await prisma.player.deleteMany({}); + } else { + await prisma.player.delete({ + where: { playerId: id as string }, + }); + } + break; + case "poem": + if (Array.isArray(id)) { + await prisma.poem.deleteMany({ + where: { poemId: { in: id as number[] } }, + }); + } else if (id === "all") { + await prisma.poem.deleteMany({}); + } else { + await prisma.poem.delete({ + where: { poemId: id as number }, + }); + } + break; + } + await prisma.$disconnect(); + } catch (e) { + console.error(e); + await prisma.$disconnect(); + process.exit(1); + } +} diff --git a/src/data/crud/get.ts b/src/data/crud/get.ts new file mode 100644 index 0000000..b62ac07 --- /dev/null +++ b/src/data/crud/get.ts @@ -0,0 +1,54 @@ +import { prisma } from "lib/prisma"; +import { IdSearchKey, Model } from "./types"; + +export async function get( + objName: string, + id: IdSearchKey, +) { + try { + let obj; + switch (objName) { + case "game": + if (Array.isArray(id)) { + obj = await prisma.game.findMany({ + where: { gameId: { in: id as number[] } }, + }); + } else if (id === "all") { + obj = await prisma.game.findMany(); + } else { + obj = await prisma.game.findUnique({ + where: { gameId: id as number }, + }); + } + break; + case "player": + if (Array.isArray(id)) { + obj = await prisma.player.findMany({ + where: { playerId: { in: id as string[] } }, + }); + } else if (id === "all") { + obj = await prisma.player.findMany(); + } else { + obj = await prisma.player.findUnique({ + where: { playerId: id as string }, + }); + } + break; + case "poem": + if (Array.isArray(id)) { + obj = await prisma.poem.findMany({ + where: { poemId: { in: id as number[] } }, + }); + } else { + obj = await prisma.poem.findUnique({ + where: { poemId: id as number }, + }); + } + break; + } + return obj as T; + } catch (e) { + console.error(e); + process.exit(1); + } +} diff --git a/src/data/crud/index.ts b/src/data/crud/index.ts new file mode 100644 index 0000000..7d61150 --- /dev/null +++ b/src/data/crud/index.ts @@ -0,0 +1,4 @@ +export { create } from "./create"; +export { del } from "./delete"; +export { get } from "./get"; +export { update } from "./update"; diff --git a/src/data/crud/types.ts b/src/data/crud/types.ts new file mode 100644 index 0000000..cce8099 --- /dev/null +++ b/src/data/crud/types.ts @@ -0,0 +1,11 @@ +import { GameModel, PlayerModel, PoemModel } from "generated/prisma/models"; + +export type ObjName = "game" | "player" | "poem"; +export type Model = GameModel | PlayerModel | PoemModel; + +export type PartialGame = Partial; +export type PartialPlayer = Partial; +export type PartialPoem = Partial; +export type PartialModel = PartialGame | PartialPlayer | PartialPoem; + +export type IdSearchKey = number | string | string[] | number[] | "all"; diff --git a/src/data/crud/update.ts b/src/data/crud/update.ts new file mode 100644 index 0000000..d44c37a --- /dev/null +++ b/src/data/crud/update.ts @@ -0,0 +1,73 @@ +import { prisma } from "../../lib/prisma"; +import { + PartialGame, + PartialPlayer, + PartialPoem, + ObjName, + IdSearchKey, +} from "./types"; + +export async function update( + objName: ObjName, + data: InputType, + id: IdSearchKey, +) { + try { + let updatedObj; + switch (objName) { + case "game": + if (Array.isArray(id)) { + updatedObj = await prisma.game.updateManyAndReturn({ + where: { gameId: { in: id as number[] } }, + data: data as PartialGame, + }); + } else { + updatedObj = await prisma.game.update({ + where: { gameId: id as number }, + data: data as PartialGame, + include: { + players: true, + poem: true, + }, + }); + } + break; + case "player": + if (Array.isArray(id)) { + updatedObj = await prisma.player.updateManyAndReturn({ + where: { playerId: { in: id as string[] } }, + data: data as PartialPlayer, + }); + } else { + updatedObj = await prisma.player.update({ + where: { playerId: id as string }, + data: data as PartialPlayer, + }); + } + break; + case "poem": + if (Array.isArray(id)) { + updatedObj = await prisma.poem.updateManyAndReturn({ + where: { poemId: { in: id as number[] } }, + data: { + ...(data as PartialPoem), + lines: (data as PartialPoem).lines!, + }, + }); + } else { + updatedObj = await prisma.poem.update({ + where: { poemId: id as number }, + data: { + ...(data as PartialPoem), + lines: (data as PartialPoem).lines!, + }, + }); + break; + } + } + return updatedObj as OutputType; + } catch (e) { + console.error(e); + process.exit(1); + } +} diff --git a/src/data/helpers/game.ts b/src/data/helpers/game.ts new file mode 100644 index 0000000..d5b8fd8 --- /dev/null +++ b/src/data/helpers/game.ts @@ -0,0 +1,31 @@ +import { GameModel } from "generated/prisma/models"; +import { PartialGame } from "data/crud/types"; +import { create, del, get, update } from "../crud"; + +export const createGame = async (data: PartialGame) => { + return await create("game", data); +}; + +export const deleteGame = async (id: number) => { + return await del("game", id); +}; + +export const getGame = async (id: number) => { + return await get("game", id); +}; + +export const updateGame = async (id: number, data: PartialGame) => { + return await update("game", data, id); +}; + +export const deleteGames = async (ids: number[]) => { + return await del("game", ids); +}; + +export const getGames = async (ids: number[] | "all") => { + return await get("game", ids); +}; + +export const updateGames = async (ids: number[], data: PartialGame) => { + return await update("game", data, ids); +}; diff --git a/src/data/helpers/index.ts b/src/data/helpers/index.ts new file mode 100644 index 0000000..b253e75 --- /dev/null +++ b/src/data/helpers/index.ts @@ -0,0 +1,3 @@ +export * from "./game"; +export * from "./player"; +export * from "./poem"; diff --git a/src/data/helpers/player.ts b/src/data/helpers/player.ts new file mode 100644 index 0000000..f7c80f9 --- /dev/null +++ b/src/data/helpers/player.ts @@ -0,0 +1,103 @@ +import { Prisma } from "generated/prisma/client"; +import { PlayerState } from "generated/prisma/enums"; +import { PlayerModel } from "generated/prisma/models"; +import { PartialPlayer } from "data/crud/types"; +import { prisma } from "lib/prisma"; +import { Context } from "types"; +import { getUserInfo } from "utils"; +import { create, del, get, update } from "../crud"; + +export const createPlayer = async (ctx: Context) => { + const { playerId, userName } = await getUserInfo(ctx); + return await create("player", { + userName, + playerId, + }); +}; + +export const createPlayers = async (data: PartialPlayer[]) => { + return await create("player", data); +}; + +export const deletePlayer = async (id: number) => { + return await del("player", id); +}; + +export const deletePlayers = async (ids: number[]) => { + return await del("player", ids); +}; + +export const getPlayer = async ( + findBy: string | Context, + ifNotFound?: "throw" | "create", +) => { + const playerId = + typeof findBy === "string" ? findBy : getUserInfo(findBy).playerId; + const player = await get("player", playerId); + if (ifNotFound && !player) { + if (ifNotFound === "throw") { + throw new Error(`Player with id ${playerId} not found`); + } + return await createPlayer(ifNotFound); + } + return player; +}; + +export const getPlayers = async (ids: string[]) => { + return await get("player", ids); +}; + +export const updatePlayer = async (id: number, data: Partial) => { + return await update, PlayerModel>("player", data, id); +}; + +export const updatePlayers = async ( + ids: number[], + data: Partial, +) => { + return await update, PlayerModel[]>("player", data, ids); +}; + +export const updatePlayerState = async (id: number, newState: PlayerState) => { + await prisma.$executeRaw` + UPDATE "Player" + SET "previousState" = "state", + "state" = ${newState} + WHERE "id" IS ${id}); +`; +}; + +export const updatePlayerStates = async ( + ids: number[], + newState: PlayerState, +) => { + await prisma.$executeRaw` + UPDATE "Player" + SET "previousState" = "state", + "state" = ${newState} + WHERE "id" IN (${Prisma.join(ids)}); +`; +}; + +export const updatePlayerGame = async (id: number, currentGameId: number) => { + return await update( + "player", + { currentGameId }, + id, + ); +}; + +export const updatePlayerGames = async ( + ids: number[], + currentGameId: number, +) => { + return await update( + "player", + { currentGameId }, + ids, + ); +}; + +export const updatePlayerUsername = async (id: number, userName: string) => { + return await update("player", { userName }, id); +}; diff --git a/src/data/helpers/poem.ts b/src/data/helpers/poem.ts new file mode 100644 index 0000000..1fcb127 --- /dev/null +++ b/src/data/helpers/poem.ts @@ -0,0 +1,35 @@ +import { PoemModel } from "generated/prisma/models"; +import { create, del, get, update } from "../crud"; +import { PartialPoem } from "data/crud/types"; + +export const createPoem = async (data: PartialPoem) => { + return await create("poem", data); +}; + +export const deletePoem = async (id: number) => { + return await del("poem", id); +}; + +export const getPoem = async (id: number) => { + return await get("poem", id); +}; + +export const updatePoem = async (id: number, data: PartialPoem) => { + return await update("poem", data, id); +}; + +export const createPoems = async (data: PartialPoem[]) => { + return await create("poem", data); +}; + +export const deletePoems = async (ids: number[]) => { + return await del("poem", ids); +}; + +export const getPoems = async (ids: number[]) => { + return await get("poem", ids); +}; + +export const updatePoems = async (ids: number[], data: PartialPoem) => { + return await update("poem", data, ids); +}; diff --git a/src/data/index.ts b/src/data/index.ts new file mode 100644 index 0000000..2dc8539 --- /dev/null +++ b/src/data/index.ts @@ -0,0 +1,3 @@ +export * from "./crud"; +export * from "./helpers"; +export * from "./validation"; diff --git a/src/data/validation/game.ts b/src/data/validation/game.ts new file mode 100644 index 0000000..871d2cf --- /dev/null +++ b/src/data/validation/game.ts @@ -0,0 +1,3 @@ +export const validateGame = () => { + return true; +}; diff --git a/src/data/validation/index.ts b/src/data/validation/index.ts new file mode 100644 index 0000000..fd4d470 --- /dev/null +++ b/src/data/validation/index.ts @@ -0,0 +1,3 @@ +export { validateGame } from "./game"; +export { validatePlayer } from "./player"; +export { validatePoem } from "./poem"; diff --git a/src/data/validation/player.ts b/src/data/validation/player.ts new file mode 100644 index 0000000..2047da7 --- /dev/null +++ b/src/data/validation/player.ts @@ -0,0 +1,3 @@ +export const validatePlayer = () => { + return true; +}; diff --git a/src/data/validation/poem.ts b/src/data/validation/poem.ts new file mode 100644 index 0000000..d258953 --- /dev/null +++ b/src/data/validation/poem.ts @@ -0,0 +1,3 @@ +export const validatePoem = () => { + return true; +}; diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts new file mode 100644 index 0000000..3906187 --- /dev/null +++ b/src/generated/prisma/browser.ts @@ -0,0 +1,39 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟢 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser' +export { Prisma } +export * as $Enums from './enums' +export * from './enums'; +/** + * Model Player + * + */ +export type Player = Prisma.PlayerModel +/** + * Model Game + * + */ +export type Game = Prisma.GameModel +/** + * Model GameConfig + * + */ +export type GameConfig = Prisma.GameConfigModel +/** + * Model Poem + * + */ +export type Poem = Prisma.PoemModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts new file mode 100644 index 0000000..e2544cd --- /dev/null +++ b/src/generated/prisma/client.ts @@ -0,0 +1,59 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟢 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' + +import * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import * as $Class from "./internal/class" +import * as Prisma from "./internal/prismaNamespace" + +export * as $Enums from './enums' +export * from "./enums" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Players + * const players = await prisma.player.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient = $Class.PrismaClient +export { Prisma } + +/** + * Model Player + * + */ +export type Player = Prisma.PlayerModel +/** + * Model Game + * + */ +export type Game = Prisma.GameModel +/** + * Model GameConfig + * + */ +export type GameConfig = Prisma.GameConfigModel +/** + * Model Poem + * + */ +export type Poem = Prisma.PoemModel diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..8afbbc1 --- /dev/null +++ b/src/generated/prisma/commonInputTypes.ts @@ -0,0 +1,401 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟢 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import type * as Prisma from "./internal/prismaNamespace" + + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type EnumPlayerStateFilter<$PrismaModel = never> = { + equals?: $Enums.PlayerState | Prisma.EnumPlayerStateFieldRefInput<$PrismaModel> + in?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + notIn?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + not?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> | $Enums.PlayerState +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + mode?: Prisma.QueryMode + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedIntNullableFilter<$PrismaModel> +} + +export type EnumPlayerStateWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PlayerState | Prisma.EnumPlayerStateFieldRefInput<$PrismaModel> + in?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + notIn?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + not?: Prisma.NestedEnumPlayerStateWithAggregatesFilter<$PrismaModel> | $Enums.PlayerState + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> + _max?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> +} + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type JsonFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + +export type JsonWithAggregatesFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type JsonWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedJsonFilter<$PrismaModel> + _max?: Prisma.NestedJsonFilter<$PrismaModel> +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedEnumPlayerStateFilter<$PrismaModel = never> = { + equals?: $Enums.PlayerState | Prisma.EnumPlayerStateFieldRefInput<$PrismaModel> + in?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + notIn?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + not?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> | $Enums.PlayerState +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + notIn?: string[] | Prisma.ListStringFieldRefInput<$PrismaModel> + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + notIn?: Date[] | string[] | Prisma.ListDateTimeFieldRefInput<$PrismaModel> + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedIntNullableFilter<$PrismaModel> +} + +export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> | null + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> | null + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null +} + +export type NestedEnumPlayerStateWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.PlayerState | Prisma.EnumPlayerStateFieldRefInput<$PrismaModel> + in?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + notIn?: $Enums.PlayerState[] | Prisma.ListEnumPlayerStateFieldRefInput<$PrismaModel> + not?: Prisma.NestedEnumPlayerStateWithAggregatesFilter<$PrismaModel> | $Enums.PlayerState + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> + _max?: Prisma.NestedEnumPlayerStateFilter<$PrismaModel> +} + +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListIntFieldRefInput<$PrismaModel> + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + notIn?: number[] | Prisma.ListFloatFieldRefInput<$PrismaModel> + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type NestedJsonFilter<$PrismaModel = never> = +| Prisma.PatchUndefined< + Prisma.Either>, Exclude>, 'path'>>, + Required> + > +| Prisma.OptionalFlat>, 'path'>> + +export type NestedJsonFilterBase<$PrismaModel = never> = { + equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter + path?: string[] + mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> + string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> + array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null + lt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + lte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gt?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + gte?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> + not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter +} + + diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts new file mode 100644 index 0000000..addb648 --- /dev/null +++ b/src/generated/prisma/enums.ts @@ -0,0 +1,27 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟢 You can import this file directly. +*/ + +export const PlayerState = { + IN_ARCHIVES: 'IN_ARCHIVES', + LOBBY: 'LOBBY', + POST_GAME: 'POST_GAME', + SETTING_UP_GAME: 'SETTING_UP_GAME', + SPECTATING: 'SPECTATING', + START: 'START', + TRYING_LEAVE: 'TRYING_LEAVE', + TYPING: 'TYPING', + VIEWING_ARCHIVED_POEM: 'VIEWING_ARCHIVED_POEM', + WAITING_AFTER_WRITING: 'WAITING_AFTER_WRITING', + WAITING_TO_WRITE: 'WAITING_TO_WRITE', + WRITING: 'WRITING' +} as const + +export type PlayerState = (typeof PlayerState)[keyof typeof PlayerState] diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts new file mode 100644 index 0000000..82a3a06 --- /dev/null +++ b/src/generated/prisma/internal/class.ts @@ -0,0 +1,230 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "./prismaNamespace" + + +const config: runtime.GetPrismaClientConfig = { + "previewFeatures": [], + "clientVersion": "7.4.1", + "engineVersion": "55ae170b1ced7fc6ed07a15f110549408c501bb3", + "activeProvider": "postgresql", + "inlineSchema": "datasource db {\n provider = \"postgresql\"\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n}\n\nenum PlayerState {\n IN_ARCHIVES\n LOBBY\n POST_GAME\n SETTING_UP_GAME\n SPECTATING\n START\n TRYING_LEAVE\n TYPING\n VIEWING_ARCHIVED_POEM\n WAITING_AFTER_WRITING\n WAITING_TO_WRITE\n WRITING\n}\n\nmodel Player {\n playerId String @id\n createdAt DateTime @default(now())\n currentGame Game? @relation(\"playersInGame\", fields: [currentGameId], references: [gameId])\n currentGameId Int?\n state PlayerState @default(LOBBY)\n previousState PlayerState @default(LOBBY)\n userName String\n games Game[]\n}\n\nmodel Game {\n gameId Int @id @default(autoincrement())\n config GameConfig? @relation(fields: [gameConfigId], references: [configId])\n createdAt DateTime @default(now())\n joinCode String\n poem Poem?\n poemId Int?\n gameConfigId Int?\n hostPlayer Player @relation(fields: [hostPlayerId], references: [playerId])\n hostPlayerId String\n inProgress Boolean @default(false)\n players Player[] @relation(\"playersInGame\")\n}\n\nmodel GameConfig {\n configId Int @id @default(autoincrement())\n games Game[]\n}\n\nmodel Poem {\n poemId Int @id @default(autoincrement())\n createdAt DateTime @default(now())\n game Game @relation(fields: [gameId], references: [gameId])\n gameId Int @unique\n finished Boolean @default(false)\n lines Json\n}\n", + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + }, + "parameterizationSchema": { + "strings": [], + "graph": "" + } +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"Player\":{\"fields\":[{\"name\":\"playerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"currentGame\",\"kind\":\"object\",\"type\":\"Game\",\"relationName\":\"playersInGame\"},{\"name\":\"currentGameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"state\",\"kind\":\"enum\",\"type\":\"PlayerState\"},{\"name\":\"previousState\",\"kind\":\"enum\",\"type\":\"PlayerState\"},{\"name\":\"userName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"Game\",\"relationName\":\"GameToPlayer\"}],\"dbName\":null},\"Game\":{\"fields\":[{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"config\",\"kind\":\"object\",\"type\":\"GameConfig\",\"relationName\":\"GameToGameConfig\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"joinCode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"poem\",\"kind\":\"object\",\"type\":\"Poem\",\"relationName\":\"GameToPoem\"},{\"name\":\"poemId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"gameConfigId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"hostPlayer\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"GameToPlayer\"},{\"name\":\"hostPlayerId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"inProgress\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"players\",\"kind\":\"object\",\"type\":\"Player\",\"relationName\":\"playersInGame\"}],\"dbName\":null},\"GameConfig\":{\"fields\":[{\"name\":\"configId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"games\",\"kind\":\"object\",\"type\":\"Game\",\"relationName\":\"GameToGameConfig\"}],\"dbName\":null},\"Poem\":{\"fields\":[{\"name\":\"poemId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"game\",\"kind\":\"object\",\"type\":\"Game\",\"relationName\":\"GameToPoem\"},{\"name\":\"gameId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"finished\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"lines\",\"kind\":\"scalar\",\"type\":\"Json\"}],\"dbName\":null}},\"enums\":{},\"types\":{}}") +config.parameterizationSchema = { + strings: JSON.parse("[\"where\",\"orderBy\",\"cursor\",\"games\",\"_count\",\"config\",\"game\",\"poem\",\"hostPlayer\",\"players\",\"currentGame\",\"Player.findUnique\",\"Player.findUniqueOrThrow\",\"Player.findFirst\",\"Player.findFirstOrThrow\",\"Player.findMany\",\"data\",\"Player.createOne\",\"Player.createMany\",\"Player.createManyAndReturn\",\"Player.updateOne\",\"Player.updateMany\",\"Player.updateManyAndReturn\",\"create\",\"update\",\"Player.upsertOne\",\"Player.deleteOne\",\"Player.deleteMany\",\"having\",\"_avg\",\"_sum\",\"_min\",\"_max\",\"Player.groupBy\",\"Player.aggregate\",\"Game.findUnique\",\"Game.findUniqueOrThrow\",\"Game.findFirst\",\"Game.findFirstOrThrow\",\"Game.findMany\",\"Game.createOne\",\"Game.createMany\",\"Game.createManyAndReturn\",\"Game.updateOne\",\"Game.updateMany\",\"Game.updateManyAndReturn\",\"Game.upsertOne\",\"Game.deleteOne\",\"Game.deleteMany\",\"Game.groupBy\",\"Game.aggregate\",\"GameConfig.findUnique\",\"GameConfig.findUniqueOrThrow\",\"GameConfig.findFirst\",\"GameConfig.findFirstOrThrow\",\"GameConfig.findMany\",\"GameConfig.createOne\",\"GameConfig.createMany\",\"GameConfig.createManyAndReturn\",\"GameConfig.updateOne\",\"GameConfig.updateMany\",\"GameConfig.updateManyAndReturn\",\"GameConfig.upsertOne\",\"GameConfig.deleteOne\",\"GameConfig.deleteMany\",\"GameConfig.groupBy\",\"GameConfig.aggregate\",\"Poem.findUnique\",\"Poem.findUniqueOrThrow\",\"Poem.findFirst\",\"Poem.findFirstOrThrow\",\"Poem.findMany\",\"Poem.createOne\",\"Poem.createMany\",\"Poem.createManyAndReturn\",\"Poem.updateOne\",\"Poem.updateMany\",\"Poem.updateManyAndReturn\",\"Poem.upsertOne\",\"Poem.deleteOne\",\"Poem.deleteMany\",\"Poem.groupBy\",\"Poem.aggregate\",\"AND\",\"OR\",\"NOT\",\"poemId\",\"createdAt\",\"gameId\",\"finished\",\"lines\",\"equals\",\"string_contains\",\"string_starts_with\",\"string_ends_with\",\"array_starts_with\",\"array_ends_with\",\"array_contains\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"in\",\"notIn\",\"configId\",\"every\",\"some\",\"none\",\"joinCode\",\"gameConfigId\",\"hostPlayerId\",\"inProgress\",\"contains\",\"startsWith\",\"endsWith\",\"playerId\",\"currentGameId\",\"PlayerState\",\"state\",\"previousState\",\"userName\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "iwIsQAsDAACGAQAgCgAAlwEAIFMAAJMBADBUAAANABBVAACTAQAwV0AAgAEAIXQBAAAAAXUCAJUBACF3AACWAXcieAAAlgF3InkBAJQBACEBAAAAAQAgDgUAAJoBACAHAACbAQAgCAAAnAEAIAkAAJ0BACBTAACZAQAwVAAAAwAQVQAAmQEAMFYCAJUBACFXQACAAQAhWAIAmAEAIW0BAJQBACFuAgCVAQAhbwEAlAEAIXAgAIEBACEBAAAAAwAgBQMAAIYBACBTAACFAQAwVAAABQAQVQAAhQEAMGkCAJgBACEBAAAABQAgBgUAAPEBACAHAADyAQAgCAAA8wEAIAkAAPQBACBWAADkAQAgbgAA5AEAIA4FAACaAQAgBwAAmwEAIAgAAJwBACAJAACdAQAgUwAAmQEAMFQAAAMAEFUAAJkBADBWAgCVAQAhV0AAgAEAIVgCAAAAAW0BAJQBACFuAgCVAQAhbwEAlAEAIXAgAIEBACEDAAAAAwAgAQAABwAwAgAACAAgAQAAAAMAIAkGAACDAQAgUwAAfwAwVAAACwAQVQAAfwAwVgIAmAEAIVdAAIABACFYAgCYAQAhWSAAgQEAIVoAAIIBACABAAAACwAgCwMAAIYBACAKAACXAQAgUwAAkwEAMFQAAA0AEFUAAJMBADBXQACAAQAhdAEAlAEAIXUCAJUBACF3AACWAXcieAAAlgF3InkBAJQBACEDAwAA4wEAIAoAAKgBACB1AADkAQAgAwAAAA0AIAEAAA4AMAIAAAEAIAEAAAANACADAAAAAwAgAQAABwAwAgAACAAgAQAAAAMAIAEAAAABACADAAAADQAgAQAADgAwAgAAAQAgAwAAAA0AIAEAAA4AMAIAAAEAIAMAAAANACABAAAOADACAAABACAIAwAA3AEAIAoAAPABACBXQAAAAAF0AQAAAAF1AgAAAAF3AAAAdwJ4AAAAdwJ5AQAAAAEBEAAAFwAgBldAAAAAAXQBAAAAAXUCAAAAAXcAAAB3AngAAAB3AnkBAAAAAQEQAAAZADABEAAAGQAwAQAAAAMAIAgDAADLAQAgCgAA7wEAIFdAAKMBACF0AQC5AQAhdQIAugEAIXcAAMkBdyJ4AADJAXcieQEAuQEAIQIAAAABACAQAAAdACAGV0AAowEAIXQBALkBACF1AgC6AQAhdwAAyQF3IngAAMkBdyJ5AQC5AQAhAgAAAA0AIBAAAB8AIAIAAAANACAQAAAfACABAAAAAwAgAwAAAAEAIBcAABcAIBgAAB0AIAEAAAABACABAAAADQAgBgQAAOoBACAdAADrAQAgHgAA7gEAIB8AAO0BACAgAADsAQAgdQAA5AEAIAlTAACPAQAwVAAAJwAQVQAAjwEAMFdAAHQAIXQBAIgBACF1AgCJAQAhdwAAkAF3IngAAJABdyJ5AQCIAQAhAwAAAA0AIAEAACYAMBwAACcAIAMAAAANACABAAAOADACAAABACABAAAACAAgAQAAAAgAIAMAAAADACABAAAHADACAAAIACADAAAAAwAgAQAABwAwAgAACAAgAwAAAAMAIAEAAAcAMAIAAAgAIAsFAADWAQAgBwAA1wEAIAgAAOEBACAJAADYAQAgVgIAAAABV0AAAAABWAIAAAABbQEAAAABbgIAAAABbwEAAAABcCAAAAABARAAAC8AIAdWAgAAAAFXQAAAAAFYAgAAAAFtAQAAAAFuAgAAAAFvAQAAAAFwIAAAAAEBEAAAMQAwARAAADEAMAEAAAAFACALBQAA1AEAIAcAALwBACAIAAC9AQAgCQAAvgEAIFYCALoBACFXQACjAQAhWAIApQEAIW0BALkBACFuAgC6AQAhbwEAuQEAIXAgAKQBACECAAAACAAgEAAANQAgB1YCALoBACFXQACjAQAhWAIApQEAIW0BALkBACFuAgC6AQAhbwEAuQEAIXAgAKQBACECAAAAAwAgEAAANwAgAgAAAAMAIBAAADcAIAEAAAAFACADAAAACAAgFwAALwAgGAAANQAgAQAAAAgAIAEAAAADACAHBAAA5QEAIB0AAOYBACAeAADpAQAgHwAA6AEAICAAAOcBACBWAADkAQAgbgAA5AEAIApTAACHAQAwVAAAPwAQVQAAhwEAMFYCAIkBACFXQAB0ACFYAgBzACFtAQCIAQAhbgIAiQEAIW8BAIgBACFwIAB1ACEDAAAAAwAgAQAAPgAwHAAAPwAgAwAAAAMAIAEAAAcAMAIAAAgAIAUDAACGAQAgUwAAhQEAMFQAAAUAEFUAAIUBADBpAgAAAAEBAAAAQgAgAQAAAEIAIAEDAADjAQAgAwAAAAUAIAEAAEUAMAIAAEIAIAMAAAAFACABAABFADACAABCACADAAAABQAgAQAARQAwAgAAQgAgAgMAAOIBACBpAgAAAAEBEAAASQAgAWkCAAAAAQEQAABLADABEAAASwAwAgMAAK4BACBpAgClAQAhAgAAAEIAIBAAAE4AIAFpAgClAQAhAgAAAAUAIBAAAFAAIAIAAAAFACAQAABQACADAAAAQgAgFwAASQAgGAAATgAgAQAAAEIAIAEAAAAFACAFBAAAqQEAIB0AAKoBACAeAACtAQAgHwAArAEAICAAAKsBACAEUwAAhAEAMFQAAFcAEFUAAIQBADBpAgBzACEDAAAABQAgAQAAVgAwHAAAVwAgAwAAAAUAIAEAAEUAMAIAAEIAIAkGAACDAQAgUwAAfwAwVAAACwAQVQAAfwAwVgIAAAABV0AAgAEAIVgCAAAAAVkgAIEBACFaAACCAQAgAQAAAFoAIAEAAABaACABBgAAqAEAIAMAAAALACABAABdADACAABaACADAAAACwAgAQAAXQAwAgAAWgAgAwAAAAsAIAEAAF0AMAIAAFoAIAYGAACnAQAgVgIAAAABV0AAAAABWAIAAAABWSAAAAABWoAAAAABARAAAGEAIAVWAgAAAAFXQAAAAAFYAgAAAAFZIAAAAAFagAAAAAEBEAAAYwAwARAAAGMAMAYGAACmAQAgVgIApQEAIVdAAKMBACFYAgClAQAhWSAApAEAIVqAAAAAAQIAAABaACAQAABmACAFVgIApQEAIVdAAKMBACFYAgClAQAhWSAApAEAIVqAAAAAAQIAAAALACAQAABoACACAAAACwAgEAAAaAAgAwAAAFoAIBcAAGEAIBgAAGYAIAEAAABaACABAAAACwAgBQQAAJ4BACAdAACfAQAgHgAAogEAIB8AAKEBACAgAACgAQAgCFMAAHIAMFQAAG8AEFUAAHIAMFYCAHMAIVdAAHQAIVgCAHMAIVkgAHUAIVoAAHYAIAMAAAALACABAABuADAcAABvACADAAAACwAgAQAAXQAwAgAAWgAgCFMAAHIAMFQAAG8AEFUAAHIAMFYCAHMAIVdAAHQAIVgCAHMAIVkgAHUAIVoAAHYAIA0EAAB3ACAdAAB-ACAeAAB3ACAfAAB3ACAgAAB3ACBbAgAAAAFiAgAAAAFjAgAAAAFkAgAAAAFlAgAAAAFmAgB9ACFnAgAAAARoAgAAAAQLBAAAdwAgHwAAfAAgIAAAfAAgW0AAAAABYkAAAAABY0AAAAABZEAAAAABZUAAAAABZkAAewAhZ0AAAAAEaEAAAAAEBQQAAHcAIB8AAHoAICAAAHoAIFsgAAAAAWYgAHkAIQ8EAAB3ACAfAAB4ACAgAAB4ACBbgAAAAAFcAQAAAAFdAQAAAAFeAQAAAAFfgAAAAAFggAAAAAFhgAAAAAFigAAAAAFjgAAAAAFkgAAAAAFlgAAAAAFmgAAAAAEIWwIAAAABYgIAAAABYwIAAAABZAIAAAABZQIAAAABZgIAdwAhZwIAAAAEaAIAAAAEDFuAAAAAAVwBAAAAAV0BAAAAAV4BAAAAAV-AAAAAAWCAAAAAAWGAAAAAAWKAAAAAAWOAAAAAAWSAAAAAAWWAAAAAAWaAAAAAAQUEAAB3ACAfAAB6ACAgAAB6ACBbIAAAAAFmIAB5ACECWyAAAAABZiAAegAhCwQAAHcAIB8AAHwAICAAAHwAIFtAAAAAAWJAAAAAAWNAAAAAAWRAAAAAAWVAAAAAAWZAAHsAIWdAAAAABGhAAAAABAhbQAAAAAFiQAAAAAFjQAAAAAFkQAAAAAFlQAAAAAFmQAB8ACFnQAAAAARoQAAAAAQNBAAAdwAgHQAAfgAgHgAAdwAgHwAAdwAgIAAAdwAgWwIAAAABYgIAAAABYwIAAAABZAIAAAABZQIAAAABZgIAfQAhZwIAAAAEaAIAAAAECFsIAAAAAWIIAAAAAWMIAAAAAWQIAAAAAWUIAAAAAWYIAH4AIWcIAAAABGgIAAAABAkGAACDAQAgUwAAfwAwVAAACwAQVQAAfwAwVgIAmAEAIVdAAIABACFYAgCYAQAhWSAAgQEAIVoAAIIBACAIW0AAAAABYkAAAAABY0AAAAABZEAAAAABZUAAAAABZkAAfAAhZ0AAAAAEaEAAAAAEAlsgAAAAAWYgAHoAIQxbgAAAAAFcAQAAAAFdAQAAAAFeAQAAAAFfgAAAAAFggAAAAAFhgAAAAAFigAAAAAFjgAAAAAFkgAAAAAFlgAAAAAFmgAAAAAEQBQAAmgEAIAcAAJsBACAIAACcAQAgCQAAnQEAIFMAAJkBADBUAAADABBVAACZAQAwVgIAlQEAIVdAAIABACFYAgCYAQAhbQEAlAEAIW4CAJUBACFvAQCUAQAhcCAAgQEAIXoAAAMAIHsAAAMAIARTAACEAQAwVAAAVwAQVQAAhAEAMGkCAHMAIQUDAACGAQAgUwAAhQEAMFQAAAUAEFUAAIUBADBpAgCYAQAhA2oAAAMAIGsAAAMAIGwAAAMAIApTAACHAQAwVAAAPwAQVQAAhwEAMFYCAIkBACFXQAB0ACFYAgBzACFtAQCIAQAhbgIAiQEAIW8BAIgBACFwIAB1ACEOBAAAdwAgHwAAjgEAICAAAI4BACBbAQAAAAFiAQAAAAFjAQAAAAFkAQAAAAFlAQAAAAFmAQCNAQAhZwEAAAAEaAEAAAAEcQEAAAABcgEAAAABcwEAAAABDQQAAIsBACAdAACMAQAgHgAAiwEAIB8AAIsBACAgAACLAQAgWwIAAAABYgIAAAABYwIAAAABZAIAAAABZQIAAAABZgIAigEAIWcCAAAABWgCAAAABQ0EAACLAQAgHQAAjAEAIB4AAIsBACAfAACLAQAgIAAAiwEAIFsCAAAAAWICAAAAAWMCAAAAAWQCAAAAAWUCAAAAAWYCAIoBACFnAgAAAAVoAgAAAAUIWwIAAAABYgIAAAABYwIAAAABZAIAAAABZQIAAAABZgIAiwEAIWcCAAAABWgCAAAABQhbCAAAAAFiCAAAAAFjCAAAAAFkCAAAAAFlCAAAAAFmCACMAQAhZwgAAAAFaAgAAAAFDgQAAHcAIB8AAI4BACAgAACOAQAgWwEAAAABYgEAAAABYwEAAAABZAEAAAABZQEAAAABZgEAjQEAIWcBAAAABGgBAAAABHEBAAAAAXIBAAAAAXMBAAAAAQtbAQAAAAFiAQAAAAFjAQAAAAFkAQAAAAFlAQAAAAFmAQCOAQAhZwEAAAAEaAEAAAAEcQEAAAABcgEAAAABcwEAAAABCVMAAI8BADBUAAAnABBVAACPAQAwV0AAdAAhdAEAiAEAIXUCAIkBACF3AACQAXcieAAAkAF3InkBAIgBACEHBAAAdwAgHwAAkgEAICAAAJIBACBbAAAAdwJmAACRAXciZwAAAHcIaAAAAHcIBwQAAHcAIB8AAJIBACAgAACSAQAgWwAAAHcCZgAAkQF3ImcAAAB3CGgAAAB3CARbAAAAdwJmAACSAXciZwAAAHcIaAAAAHcICwMAAIYBACAKAACXAQAgUwAAkwEAMFQAAA0AEFUAAJMBADBXQACAAQAhdAEAlAEAIXUCAJUBACF3AACWAXcieAAAlgF3InkBAJQBACELWwEAAAABYgEAAAABYwEAAAABZAEAAAABZQEAAAABZgEAjgEAIWcBAAAABGgBAAAABHEBAAAAAXIBAAAAAXMBAAAAAQhbAgAAAAFiAgAAAAFjAgAAAAFkAgAAAAFlAgAAAAFmAgCLAQAhZwIAAAAFaAIAAAAFBFsAAAB3AmYAAJIBdyJnAAAAdwhoAAAAdwgQBQAAmgEAIAcAAJsBACAIAACcAQAgCQAAnQEAIFMAAJkBADBUAAADABBVAACZAQAwVgIAlQEAIVdAAIABACFYAgCYAQAhbQEAlAEAIW4CAJUBACFvAQCUAQAhcCAAgQEAIXoAAAMAIHsAAAMAIAhbAgAAAAFiAgAAAAFjAgAAAAFkAgAAAAFlAgAAAAFmAgB3ACFnAgAAAARoAgAAAAQOBQAAmgEAIAcAAJsBACAIAACcAQAgCQAAnQEAIFMAAJkBADBUAAADABBVAACZAQAwVgIAlQEAIVdAAIABACFYAgCYAQAhbQEAlAEAIW4CAJUBACFvAQCUAQAhcCAAgQEAIQcDAACGAQAgUwAAhQEAMFQAAAUAEFUAAIUBADBpAgCYAQAhegAABQAgewAABQAgCwYAAIMBACBTAAB_ADBUAAALABBVAAB_ADBWAgCYAQAhV0AAgAEAIVgCAJgBACFZIACBAQAhWgAAggEAIHoAAAsAIHsAAAsAIA0DAACGAQAgCgAAlwEAIFMAAJMBADBUAAANABBVAACTAQAwV0AAgAEAIXQBAJQBACF1AgCVAQAhdwAAlgF3IngAAJYBdyJ5AQCUAQAhegAADQAgewAADQAgA2oAAA0AIGsAAA0AIGwAAA0AIAAAAAAAAX9AAAAAAQF_IAAAAAEFfwIAAAABhQECAAAAAYYBAgAAAAGHAQIAAAABiAECAAAAAQUXAACHAgAgGAAAigIAIHwAAIgCACB9AACJAgAgggEAAAgAIAMXAACHAgAgfAAAiAIAIIIBAAAIACAGBQAA8QEAIAcAAPIBACAIAADzAQAgCQAA9AEAIFYAAOQBACBuAADkAQAgAAAAAAALFwAArwEAMBgAALQBADB8AACwAQAwfQAAsQEAMH4AALIBACB_AACzAQAwgAEAALMBADCBAQAAswEAMIIBAACzAQAwgwEAALUBADCEAQAAtgEAMAkHAADXAQAgCAAA4QEAIAkAANgBACBWAgAAAAFXQAAAAAFYAgAAAAFtAQAAAAFvAQAAAAFwIAAAAAECAAAACAAgFwAA4AEAIAMAAAAIACAXAADgAQAgGAAAuwEAIAEQAACGAgAwDgUAAJoBACAHAACbAQAgCAAAnAEAIAkAAJ0BACBTAACZAQAwVAAAAwAQVQAAmQEAMFYCAJUBACFXQACAAQAhWAIAAAABbQEAlAEAIW4CAJUBACFvAQCUAQAhcCAAgQEAIQIAAAAIACAQAAC7AQAgAgAAALcBACAQAAC4AQAgClMAALYBADBUAAC3AQAQVQAAtgEAMFYCAJUBACFXQACAAQAhWAIAmAEAIW0BAJQBACFuAgCVAQAhbwEAlAEAIXAgAIEBACEKUwAAtgEAMFQAALcBABBVAAC2AQAwVgIAlQEAIVdAAIABACFYAgCYAQAhbQEAlAEAIW4CAJUBACFvAQCUAQAhcCAAgQEAIQZWAgC6AQAhV0AAowEAIVgCAKUBACFtAQC5AQAhbwEAuQEAIXAgAKQBACEBfwEAAAABBX8CAAAAAYUBAgAAAAGGAQIAAAABhwECAAAAAYgBAgAAAAEJBwAAvAEAIAgAAL0BACAJAAC-AQAgVgIAugEAIVdAAKMBACFYAgClAQAhbQEAuQEAIW8BALkBACFwIACkAQAhBxcAANkBACAYAADeAQAgfAAA2gEAIH0AAN0BACCAAQAACwAggQEAAAsAIIIBAABaACAFFwAA-gEAIBgAAIQCACB8AAD7AQAgfQAAgwIAIIIBAAABACALFwAAvwEAMBgAAMQBADB8AADAAQAwfQAAwQEAMH4AAMIBACB_AADDAQAwgAEAAMMBADCBAQAAwwEAMIIBAADDAQAwgwEAAMUBADCEAQAAxgEAMAYDAADcAQAgV0AAAAABdAEAAAABdwAAAHcCeAAAAHcCeQEAAAABAgAAAAEAIBcAANsBACADAAAAAQAgFwAA2wEAIBgAAMoBACABEAAAggIAMAsDAACGAQAgCgAAlwEAIFMAAJMBADBUAAANABBVAACTAQAwV0AAgAEAIXQBAAAAAXUCAJUBACF3AACWAXcieAAAlgF3InkBAJQBACECAAAAAQAgEAAAygEAIAIAAADHAQAgEAAAyAEAIAlTAADGAQAwVAAAxwEAEFUAAMYBADBXQACAAQAhdAEAlAEAIXUCAJUBACF3AACWAXcieAAAlgF3InkBAJQBACEJUwAAxgEAMFQAAMcBABBVAADGAQAwV0AAgAEAIXQBAJQBACF1AgCVAQAhdwAAlgF3IngAAJYBdyJ5AQCUAQAhBVdAAKMBACF0AQC5AQAhdwAAyQF3IngAAMkBdyJ5AQC5AQAhAX8AAAB3AgYDAADLAQAgV0AAowEAIXQBALkBACF3AADJAXcieAAAyQF3InkBALkBACELFwAAzAEAMBgAANABADB8AADNAQAwfQAAzgEAMH4AAM8BACB_AACzAQAwgAEAALMBADCBAQAAswEAMIIBAACzAQAwgwEAANEBADCEAQAAtgEAMAkFAADWAQAgBwAA1wEAIAkAANgBACBWAgAAAAFXQAAAAAFYAgAAAAFtAQAAAAFuAgAAAAFwIAAAAAECAAAACAAgFwAA1QEAIAMAAAAIACAXAADVAQAgGAAA0wEAIAEQAACBAgAwAgAAAAgAIBAAANMBACACAAAAtwEAIBAAANIBACAGVgIAugEAIVdAAKMBACFYAgClAQAhbQEAuQEAIW4CALoBACFwIACkAQAhCQUAANQBACAHAAC8AQAgCQAAvgEAIFYCALoBACFXQACjAQAhWAIApQEAIW0BALkBACFuAgC6AQAhcCAApAEAIQcXAAD8AQAgGAAA_wEAIHwAAP0BACB9AAD-AQAggAEAAAUAIIEBAAAFACCCAQAAQgAgCQUAANYBACAHAADXAQAgCQAA2AEAIFYCAAAAAVdAAAAAAVgCAAAAAW0BAAAAAW4CAAAAAXAgAAAAAQMXAAD8AQAgfAAA_QEAIIIBAABCACADFwAA2QEAIHwAANoBACCCAQAAWgAgBBcAAL8BADB8AADAAQAwfgAAwgEAIIIBAADDAQAwBFYCAAAAAVdAAAAAAVkgAAAAAVqAAAAAAQIAAABaACAXAADZAQAgBgMAANwBACBXQAAAAAF0AQAAAAF3AAAAdwJ4AAAAdwJ5AQAAAAEEFwAAzAEAMHwAAM0BADB-AADPAQAgggEAALMBADADAAAACwAgFwAA2QEAIBgAAN8BACAGAAAACwAgEAAA3wEAIFYCAKUBACFXQACjAQAhWSAApAEAIVqAAAAAAQRWAgClAQAhV0AAowEAIVkgAKQBACFagAAAAAEJBwAA1wEAIAgAAOEBACAJAADYAQAgVgIAAAABV0AAAAABWAIAAAABbQEAAAABbwEAAAABcCAAAAABAxcAAPoBACB8AAD7AQAgggEAAAEAIAQXAACvAQAwfAAAsAEAMH4AALIBACCCAQAAswEAMAAAAAAAAAAAAAAAAAcXAAD1AQAgGAAA-AEAIHwAAPYBACB9AAD3AQAggAEAAAMAIIEBAAADACCCAQAACAAgAxcAAPUBACB8AAD2AQAgggEAAAgAIAEDAADjAQAgAQYAAKgBACADAwAA4wEAIAoAAKgBACB1AADkAQAgAAoFAADWAQAgBwAA1wEAIAgAAOEBACBWAgAAAAFXQAAAAAFYAgAAAAFtAQAAAAFuAgAAAAFvAQAAAAFwIAAAAAECAAAACAAgFwAA9QEAIAMAAAADACAXAAD1AQAgGAAA-QEAIAwAAAADACAFAADUAQAgBwAAvAEAIAgAAL0BACAQAAD5AQAgVgIAugEAIVdAAKMBACFYAgClAQAhbQEAuQEAIW4CALoBACFvAQC5AQAhcCAApAEAIQoFAADUAQAgBwAAvAEAIAgAAL0BACBWAgC6AQAhV0AAowEAIVgCAKUBACFtAQC5AQAhbgIAugEAIW8BALkBACFwIACkAQAhBwoAAPABACBXQAAAAAF0AQAAAAF1AgAAAAF3AAAAdwJ4AAAAdwJ5AQAAAAECAAAAAQAgFwAA-gEAIAFpAgAAAAECAAAAQgAgFwAA_AEAIAMAAAAFACAXAAD8AQAgGAAAgAIAIAMAAAAFACAQAACAAgAgaQIApQEAIQFpAgClAQAhBlYCAAAAAVdAAAAAAVgCAAAAAW0BAAAAAW4CAAAAAXAgAAAAAQVXQAAAAAF0AQAAAAF3AAAAdwJ4AAAAdwJ5AQAAAAEDAAAADQAgFwAA-gEAIBgAAIUCACAJAAAADQAgCgAA7wEAIBAAAIUCACBXQACjAQAhdAEAuQEAIXUCALoBACF3AADJAXcieAAAyQF3InkBALkBACEHCgAA7wEAIFdAAKMBACF0AQC5AQAhdQIAugEAIXcAAMkBdyJ4AADJAXcieQEAuQEAIQZWAgAAAAFXQAAAAAFYAgAAAAFtAQAAAAFvAQAAAAFwIAAAAAEKBQAA1gEAIAgAAOEBACAJAADYAQAgVgIAAAABV0AAAAABWAIAAAABbQEAAAABbgIAAAABbwEAAAABcCAAAAABAgAAAAgAIBcAAIcCACADAAAAAwAgFwAAhwIAIBgAAIsCACAMAAAAAwAgBQAA1AEAIAgAAL0BACAJAAC-AQAgEAAAiwIAIFYCALoBACFXQACjAQAhWAIApQEAIW0BALkBACFuAgC6AQAhbwEAuQEAIXAgAKQBACEKBQAA1AEAIAgAAL0BACAJAAC-AQAgVgIAugEAIVdAAKMBACFYAgClAQAhbQEAuQEAIW4CALoBACFvAQC5AQAhcCAApAEAIQMDEQIEAAcKBAIFBAAGBQYDBwwFCAABCQ8BAgMJAgQABAEDCgABBgACAQkQAAEDEgAAAQocAgEKIgIFBAAMHQANHgAOHwAPIAAQAAAAAAAFBAAMHQANHgAOHwAPIAAQAgU0AwgAAQIFOgMIAAEFBAAVHQAWHgAXHwAYIAAZAAAAAAAFBAAVHQAWHgAXHwAYIAAZAAAFBAAeHQAfHgAgHwAhIAAiAAAAAAAFBAAeHQAfHgAgHwAhIAAiAQYAAgEGAAIFBAAnHQAoHgApHwAqIAArAAAAAAAFBAAnHQAoHgApHwAqIAArCwIBDBMBDRQBDhUBDxYBERgBEhoIExsJFB4BFSAIFiEKGSMBGiQBGyUIISgLIikRIyoCJCsCJSwCJi0CJy4CKDACKTIIKjMSKzYCLDgILTkTLjsCLzwCMD0IMUAUMkEaM0MDNEQDNUYDNkcDN0gDOEoDOUwIOk0bO08DPFEIPVIcPlMDP1QDQFUIQVgdQlkjQ1sFRFwFRV4FRl8FR2AFSGIFSWQISmUkS2cFTGkITWolTmsFT2wFUG0IUXAmUnEs" +} + +async function decodeBase64AsWasm(wasmBase64: string): Promise { + const { Buffer } = await import('node:buffer') + const wasmArray = Buffer.from(wasmBase64, 'base64') + return new WebAssembly.Module(wasmArray) +} + +config.compilerWasm = { + getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.js"), + + getQueryCompilerWasmModule: async () => { + const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.postgresql.wasm-base64.js") + return await decodeBase64AsWasm(wasm) + }, + + importName: "./query_compiler_fast_bg.js" +} + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Players + * const players = await prisma.player.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options: Prisma.Subset ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Players + * const players = await prisma.player.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined, + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.Utils.JsPromise; + +/** + * Executes a prepared raw query and returns the number of affected rows. + * @example + * ``` + * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Executes a raw query and returns the number of affected rows. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a prepared raw query and returns the `SELECT` data. + * @example + * ``` + * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; + + /** + * Performs a raw query and returns the `SELECT` data. + * Susceptible to SQL injections, see documentation. + * @example + * ``` + * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') + * ``` + * + * Read more in our [docs](https://pris.ly/d/raw-queries). + */ + $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; + + + /** + * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. + * @example + * ``` + * const [george, bob, alice] = await prisma.$transaction([ + * prisma.user.create({ data: { name: 'George' } }), + * prisma.user.create({ data: { name: 'Bob' } }), + * prisma.user.create({ data: { name: 'Alice' } }), + * ]) + * ``` + * + * Read more in our [docs](https://www.prisma.io/docs/orm/prisma-client/queries/transactions). + */ + $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.player`: Exposes CRUD operations for the **Player** model. + * Example usage: + * ```ts + * // Fetch zero or more Players + * const players = await prisma.player.findMany() + * ``` + */ + get player(): Prisma.PlayerDelegate; + + /** + * `prisma.game`: Exposes CRUD operations for the **Game** model. + * Example usage: + * ```ts + * // Fetch zero or more Games + * const games = await prisma.game.findMany() + * ``` + */ + get game(): Prisma.GameDelegate; + + /** + * `prisma.gameConfig`: Exposes CRUD operations for the **GameConfig** model. + * Example usage: + * ```ts + * // Fetch zero or more GameConfigs + * const gameConfigs = await prisma.gameConfig.findMany() + * ``` + */ + get gameConfig(): Prisma.GameConfigDelegate; + + /** + * `prisma.poem`: Exposes CRUD operations for the **Poem** model. + * Example usage: + * ```ts + * // Fetch zero or more Poems + * const poems = await prisma.poem.findMany() + * ``` + */ + get poem(): Prisma.PoemDelegate; +} + +export function getPrismaClientClass(): PrismaClientConstructor { + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts new file mode 100644 index 0000000..96cd02a --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,1085 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "../models" +import { type PrismaClient } from "./class" + +export type * from '../models' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 7.4.1 + * Query Engine version: 55ae170b1ced7fc6ed07a15f110549408c501bb3 + */ +export const prismaVersion: PrismaVersion = { + client: "7.4.1", + engine: "55ae170b1ced7fc6ed07a15f110549408c501bb3" +} + +/** + * Utility Types + */ + +export type Bytes = runtime.Bytes +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * From T, pick a set of properties whose keys are in the union K + */ +type Prisma__Pick = { + [P in K]: T[P]; +}; + +export type Enumerable = T | Array; + +/** + * Subset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection + */ +export type Subset = { + [key in keyof T]: key extends keyof U ? T[key] : never; +}; + +/** + * SelectSubset + * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. + * Additionally, it validates, if both select and include are present. If the case, it errors. + */ +export type SelectSubset = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + (T extends SelectAndInclude + ? 'Please either choose `select` or `include`.' + : T extends SelectAndOmit + ? 'Please either choose `select` or `omit`.' + : {}) + +/** + * Subset + Intersection + * @desc From `T` pick properties that exist in `U` and intersect `K` + */ +export type SubsetIntersection = { + [key in keyof T]: key extends keyof U ? T[key] : never +} & + K + +type Without = { [P in Exclude]?: never }; + +/** + * XOR is needed to have a real mutually exclusive union type + * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types + */ +export type XOR = + T extends object ? + U extends object ? + (Without & U) | (Without & T) + : U : T + + +/** + * Is T a Record? + */ +type IsObject = T extends Array +? False +: T extends Date +? False +: T extends Uint8Array +? False +: T extends BigInt +? False +: T extends object +? True +: False + + +/** + * If it's T[], return T + */ +export type UnEnumerate = T extends Array ? U : T + +/** + * From ts-toolbelt + */ + +type __Either = Omit & + { + // Merge all but K + [P in K]: Prisma__Pick // With K possibilities + }[K] + +type EitherStrict = Strict<__Either> + +type EitherLoose = ComputeRaw<__Either> + +type _Either< + O extends object, + K extends Key, + strict extends Boolean +> = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export type PatchUndefined = { + [K in keyof O]: O[K] extends undefined ? At : O[K] +} & {} + +/** Helper Types for "Merge" **/ +export type IntersectOf = ( + U extends unknown ? (k: U) => void : never +) extends (k: infer I) => void + ? I + : never + +export type Overwrite = { + [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; +} & {}; + +type _Merge = IntersectOf; +}>>; + +type Key = string | number | symbol; +type AtStrict = O[K & keyof O]; +type AtLoose = O extends unknown ? AtStrict : never; +export type At = { + 1: AtStrict; + 0: AtLoose; +}[strict]; + +export type ComputeRaw = A extends Function ? A : { + [K in keyof A]: A[K]; +} & {}; + +export type OptionalFlat = { + [K in keyof O]?: O[K]; +} & {}; + +type _Record = { + [P in K]: T; +}; + +// cause typescript not to expand types and preserve names +type NoExpand = T extends unknown ? T : never; + +// this type assumes the passed object is entirely optional +export type AtLeast = NoExpand< + O extends unknown + ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) + | {[P in keyof O as P extends K ? P : never]-?: O[P]} & O + : never>; + +type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; + +export type Strict = ComputeRaw<_Strict>; +/** End Helper Types for "Merge" **/ + +export type Merge = ComputeRaw<_Merge>>; + +export type Boolean = True | False + +export type True = 1 + +export type False = 0 + +export type Not = { + 0: 1 + 1: 0 +}[B] + +export type Extends = [A1] extends [never] + ? 0 // anything `never` is false + : A1 extends A2 + ? 1 + : 0 + +export type Has = Not< + Extends, U1> +> + +export type Or = { + 0: { + 0: 0 + 1: 1 + } + 1: { + 0: 1 + 1: 1 + } +}[B1][B2] + +export type Keys = U extends unknown ? keyof U : never + +export type GetScalarType = O extends object ? { + [P in keyof T]: P extends keyof O + ? O[P] + : never +} : never + +type FieldPaths< + T, + U = Omit +> = IsObject extends True ? U : T + +export type GetHavingFields = { + [K in keyof T]: Or< + Or, Extends<'AND', K>>, + Extends<'NOT', K> + > extends True + ? // infer is only needed to not hit TS limit + // based on the brilliant idea of Pierre-Antoine Mills + // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 + T[K] extends infer TK + ? GetHavingFields extends object ? Merge> : never> + : never + : {} extends FieldPaths + ? never + : K +}[keyof T] + +/** + * Convert tuple to union + */ +type _TupleToUnion = T extends (infer E)[] ? E : never +type TupleToUnion = _TupleToUnion +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + Player: 'Player', + Game: 'Game', + GameConfig: 'GameConfig', + Poem: 'Poem' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "player" | "game" | "gameConfig" | "poem" + txIsolationLevel: TransactionIsolationLevel + } + model: { + Player: { + payload: Prisma.$PlayerPayload + fields: Prisma.PlayerFieldRefs + operations: { + findUnique: { + args: Prisma.PlayerFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PlayerFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.PlayerFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PlayerFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.PlayerFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.PlayerCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.PlayerCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PlayerCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.PlayerDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.PlayerUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PlayerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PlayerUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PlayerUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PlayerUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.PlayerAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.PlayerGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.PlayerCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Game: { + payload: Prisma.$GamePayload + fields: Prisma.GameFieldRefs + operations: { + findUnique: { + args: Prisma.GameFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GameFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.GameFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GameFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.GameFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.GameCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.GameCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GameCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.GameDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.GameUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GameDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GameUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GameUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GameUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.GameAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.GameGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.GameCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + GameConfig: { + payload: Prisma.$GameConfigPayload + fields: Prisma.GameConfigFieldRefs + operations: { + findUnique: { + args: Prisma.GameConfigFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GameConfigFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.GameConfigFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GameConfigFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.GameConfigFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.GameConfigCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.GameConfigCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GameConfigCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.GameConfigDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.GameConfigUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GameConfigDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GameConfigUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GameConfigUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GameConfigUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.GameConfigAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.GameConfigGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.GameConfigCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Poem: { + payload: Prisma.$PoemPayload + fields: Prisma.PoemFieldRefs + operations: { + findUnique: { + args: Prisma.PoemFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PoemFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.PoemFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PoemFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.PoemFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.PoemCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.PoemCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PoemCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.PoemDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.PoemUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PoemDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PoemUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PoemUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PoemUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.PoemAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.PoemGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.PoemCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const PlayerScalarFieldEnum = { + playerId: 'playerId', + createdAt: 'createdAt', + currentGameId: 'currentGameId', + state: 'state', + previousState: 'previousState', + userName: 'userName' +} as const + +export type PlayerScalarFieldEnum = (typeof PlayerScalarFieldEnum)[keyof typeof PlayerScalarFieldEnum] + + +export const GameScalarFieldEnum = { + gameId: 'gameId', + createdAt: 'createdAt', + joinCode: 'joinCode', + poemId: 'poemId', + gameConfigId: 'gameConfigId', + hostPlayerId: 'hostPlayerId', + inProgress: 'inProgress' +} as const + +export type GameScalarFieldEnum = (typeof GameScalarFieldEnum)[keyof typeof GameScalarFieldEnum] + + +export const GameConfigScalarFieldEnum = { + configId: 'configId' +} as const + +export type GameConfigScalarFieldEnum = (typeof GameConfigScalarFieldEnum)[keyof typeof GameConfigScalarFieldEnum] + + +export const PoemScalarFieldEnum = { + poemId: 'poemId', + createdAt: 'createdAt', + gameId: 'gameId', + finished: 'finished', + lines: 'lines' +} as const + +export type PoemScalarFieldEnum = (typeof PoemScalarFieldEnum)[keyof typeof PoemScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const JsonNullValueInput = { + JsonNull: JsonNull +} as const + +export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + +export const JsonNullValueFilter = { + DbNull: DbNull, + JsonNull: JsonNull, + AnyNull: AnyNull +} as const + +export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + + + +/** + * Field references + */ + + +/** + * Reference to a field of type 'String' + */ +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + +/** + * Reference to a field of type 'String[]' + */ +export type ListStringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String[]'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'DateTime[]' + */ +export type ListDateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime[]'> + + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'Int[]' + */ +export type ListIntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int[]'> + + + +/** + * Reference to a field of type 'PlayerState' + */ +export type EnumPlayerStateFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PlayerState'> + + + +/** + * Reference to a field of type 'PlayerState[]' + */ +export type ListEnumPlayerStateFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PlayerState[]'> + + + +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + +/** + * Reference to a field of type 'Json' + */ +export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> + + + +/** + * Reference to a field of type 'QueryMode' + */ +export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + + +/** + * Reference to a field of type 'Float[]' + */ +export type ListFloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float[]'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +export type PrismaClientOptions = ({ + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never +} | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never +}) & { + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://pris.ly/d/logging). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig + /** + * SQL commenter plugins that add metadata to SQL queries as comments. + * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * comments: [ + * traceContext(), + * queryInsights(), + * ], + * }) + * ``` + */ + comments?: runtime.SqlCommenterPlugin[] +} +export type GlobalOmitConfig = { + player?: Prisma.PlayerOmit + game?: Prisma.GameOmit + gameConfig?: Prisma.GameConfigOmit + poem?: Prisma.PoemOmit +} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type CheckIsLogLevel = T extends LogLevel ? T : never; + +export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T +>; + +export type GetEvents = T extends Array + ? GetLogType + : never; + +export type QueryEvent = { + timestamp: Date + query: string + params: string + duration: number + target: string +} + +export type LogEvent = { + timestamp: Date + message: string + target: string +} +/* End Types for Logging */ + + +export type PrismaAction = + | 'findUnique' + | 'findUniqueOrThrow' + | 'findMany' + | 'findFirst' + | 'findFirstOrThrow' + | 'create' + | 'createMany' + | 'createManyAndReturn' + | 'update' + | 'updateMany' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..291e1e8 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,157 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models' +export type * from './prismaNamespace' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +export const ModelName = { + Player: 'Player', + Game: 'Game', + GameConfig: 'GameConfig', + Poem: 'Poem' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + ReadUncommitted: 'ReadUncommitted', + ReadCommitted: 'ReadCommitted', + RepeatableRead: 'RepeatableRead', + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const PlayerScalarFieldEnum = { + playerId: 'playerId', + createdAt: 'createdAt', + currentGameId: 'currentGameId', + state: 'state', + previousState: 'previousState', + userName: 'userName' +} as const + +export type PlayerScalarFieldEnum = (typeof PlayerScalarFieldEnum)[keyof typeof PlayerScalarFieldEnum] + + +export const GameScalarFieldEnum = { + gameId: 'gameId', + createdAt: 'createdAt', + joinCode: 'joinCode', + poemId: 'poemId', + gameConfigId: 'gameConfigId', + hostPlayerId: 'hostPlayerId', + inProgress: 'inProgress' +} as const + +export type GameScalarFieldEnum = (typeof GameScalarFieldEnum)[keyof typeof GameScalarFieldEnum] + + +export const GameConfigScalarFieldEnum = { + configId: 'configId' +} as const + +export type GameConfigScalarFieldEnum = (typeof GameConfigScalarFieldEnum)[keyof typeof GameConfigScalarFieldEnum] + + +export const PoemScalarFieldEnum = { + poemId: 'poemId', + createdAt: 'createdAt', + gameId: 'gameId', + finished: 'finished', + lines: 'lines' +} as const + +export type PoemScalarFieldEnum = (typeof PoemScalarFieldEnum)[keyof typeof PoemScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const JsonNullValueInput = { + JsonNull: JsonNull +} as const + +export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + + +export const QueryMode = { + default: 'default', + insensitive: 'insensitive' +} as const + +export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + +export const JsonNullValueFilter = { + DbNull: DbNull, + JsonNull: JsonNull, + AnyNull: AnyNull +} as const + +export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] + diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts new file mode 100644 index 0000000..110c239 --- /dev/null +++ b/src/generated/prisma/models.ts @@ -0,0 +1,15 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟢 You can import this file directly. + */ +export type * from './models/Player' +export type * from './models/Game' +export type * from './models/GameConfig' +export type * from './models/Poem' +export type * from './commonInputTypes' \ No newline at end of file diff --git a/src/generated/prisma/models/Game.ts b/src/generated/prisma/models/Game.ts new file mode 100644 index 0000000..23a7a8c --- /dev/null +++ b/src/generated/prisma/models/Game.ts @@ -0,0 +1,1890 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Game` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Game + * + */ +export type GameModel = runtime.Types.Result.DefaultSelection + +export type AggregateGame = { + _count: GameCountAggregateOutputType | null + _avg: GameAvgAggregateOutputType | null + _sum: GameSumAggregateOutputType | null + _min: GameMinAggregateOutputType | null + _max: GameMaxAggregateOutputType | null +} + +export type GameAvgAggregateOutputType = { + gameId: number | null + poemId: number | null + gameConfigId: number | null +} + +export type GameSumAggregateOutputType = { + gameId: number | null + poemId: number | null + gameConfigId: number | null +} + +export type GameMinAggregateOutputType = { + gameId: number | null + createdAt: Date | null + joinCode: string | null + poemId: number | null + gameConfigId: number | null + hostPlayerId: string | null + inProgress: boolean | null +} + +export type GameMaxAggregateOutputType = { + gameId: number | null + createdAt: Date | null + joinCode: string | null + poemId: number | null + gameConfigId: number | null + hostPlayerId: string | null + inProgress: boolean | null +} + +export type GameCountAggregateOutputType = { + gameId: number + createdAt: number + joinCode: number + poemId: number + gameConfigId: number + hostPlayerId: number + inProgress: number + _all: number +} + + +export type GameAvgAggregateInputType = { + gameId?: true + poemId?: true + gameConfigId?: true +} + +export type GameSumAggregateInputType = { + gameId?: true + poemId?: true + gameConfigId?: true +} + +export type GameMinAggregateInputType = { + gameId?: true + createdAt?: true + joinCode?: true + poemId?: true + gameConfigId?: true + hostPlayerId?: true + inProgress?: true +} + +export type GameMaxAggregateInputType = { + gameId?: true + createdAt?: true + joinCode?: true + poemId?: true + gameConfigId?: true + hostPlayerId?: true + inProgress?: true +} + +export type GameCountAggregateInputType = { + gameId?: true + createdAt?: true + joinCode?: true + poemId?: true + gameConfigId?: true + hostPlayerId?: true + inProgress?: true + _all?: true +} + +export type GameAggregateArgs = { + /** + * Filter which Game to aggregate. + */ + where?: Prisma.GameWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Games to fetch. + */ + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GameWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Games 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` Games. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Games + **/ + _count?: true | GameCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GameAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GameSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GameMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GameMaxAggregateInputType +} + +export type GetGameAggregateType = { + [P in keyof T & keyof AggregateGame]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type GameGroupByArgs = { + where?: Prisma.GameWhereInput + orderBy?: Prisma.GameOrderByWithAggregationInput | Prisma.GameOrderByWithAggregationInput[] + by: Prisma.GameScalarFieldEnum[] | Prisma.GameScalarFieldEnum + having?: Prisma.GameScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GameCountAggregateInputType | true + _avg?: GameAvgAggregateInputType + _sum?: GameSumAggregateInputType + _min?: GameMinAggregateInputType + _max?: GameMaxAggregateInputType +} + +export type GameGroupByOutputType = { + gameId: number + createdAt: Date + joinCode: string + poemId: number | null + gameConfigId: number | null + hostPlayerId: string + inProgress: boolean + _count: GameCountAggregateOutputType | null + _avg: GameAvgAggregateOutputType | null + _sum: GameSumAggregateOutputType | null + _min: GameMinAggregateOutputType | null + _max: GameMaxAggregateOutputType | null +} + +type GetGameGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof GameGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type GameWhereInput = { + AND?: Prisma.GameWhereInput | Prisma.GameWhereInput[] + OR?: Prisma.GameWhereInput[] + NOT?: Prisma.GameWhereInput | Prisma.GameWhereInput[] + gameId?: Prisma.IntFilter<"Game"> | number + createdAt?: Prisma.DateTimeFilter<"Game"> | Date | string + joinCode?: Prisma.StringFilter<"Game"> | string + poemId?: Prisma.IntNullableFilter<"Game"> | number | null + gameConfigId?: Prisma.IntNullableFilter<"Game"> | number | null + hostPlayerId?: Prisma.StringFilter<"Game"> | string + inProgress?: Prisma.BoolFilter<"Game"> | boolean + config?: Prisma.XOR | null + poem?: Prisma.XOR | null + hostPlayer?: Prisma.XOR + players?: Prisma.PlayerListRelationFilter +} + +export type GameOrderByWithRelationInput = { + gameId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + joinCode?: Prisma.SortOrder + poemId?: Prisma.SortOrderInput | Prisma.SortOrder + gameConfigId?: Prisma.SortOrderInput | Prisma.SortOrder + hostPlayerId?: Prisma.SortOrder + inProgress?: Prisma.SortOrder + config?: Prisma.GameConfigOrderByWithRelationInput + poem?: Prisma.PoemOrderByWithRelationInput + hostPlayer?: Prisma.PlayerOrderByWithRelationInput + players?: Prisma.PlayerOrderByRelationAggregateInput +} + +export type GameWhereUniqueInput = Prisma.AtLeast<{ + gameId?: number + AND?: Prisma.GameWhereInput | Prisma.GameWhereInput[] + OR?: Prisma.GameWhereInput[] + NOT?: Prisma.GameWhereInput | Prisma.GameWhereInput[] + createdAt?: Prisma.DateTimeFilter<"Game"> | Date | string + joinCode?: Prisma.StringFilter<"Game"> | string + poemId?: Prisma.IntNullableFilter<"Game"> | number | null + gameConfigId?: Prisma.IntNullableFilter<"Game"> | number | null + hostPlayerId?: Prisma.StringFilter<"Game"> | string + inProgress?: Prisma.BoolFilter<"Game"> | boolean + config?: Prisma.XOR | null + poem?: Prisma.XOR | null + hostPlayer?: Prisma.XOR + players?: Prisma.PlayerListRelationFilter +}, "gameId"> + +export type GameOrderByWithAggregationInput = { + gameId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + joinCode?: Prisma.SortOrder + poemId?: Prisma.SortOrderInput | Prisma.SortOrder + gameConfigId?: Prisma.SortOrderInput | Prisma.SortOrder + hostPlayerId?: Prisma.SortOrder + inProgress?: Prisma.SortOrder + _count?: Prisma.GameCountOrderByAggregateInput + _avg?: Prisma.GameAvgOrderByAggregateInput + _max?: Prisma.GameMaxOrderByAggregateInput + _min?: Prisma.GameMinOrderByAggregateInput + _sum?: Prisma.GameSumOrderByAggregateInput +} + +export type GameScalarWhereWithAggregatesInput = { + AND?: Prisma.GameScalarWhereWithAggregatesInput | Prisma.GameScalarWhereWithAggregatesInput[] + OR?: Prisma.GameScalarWhereWithAggregatesInput[] + NOT?: Prisma.GameScalarWhereWithAggregatesInput | Prisma.GameScalarWhereWithAggregatesInput[] + gameId?: Prisma.IntWithAggregatesFilter<"Game"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Game"> | Date | string + joinCode?: Prisma.StringWithAggregatesFilter<"Game"> | string + poemId?: Prisma.IntNullableWithAggregatesFilter<"Game"> | number | null + gameConfigId?: Prisma.IntNullableWithAggregatesFilter<"Game"> | number | null + hostPlayerId?: Prisma.StringWithAggregatesFilter<"Game"> | string + inProgress?: Prisma.BoolWithAggregatesFilter<"Game"> | boolean +} + +export type GameCreateInput = { + createdAt?: Date | string + joinCode: string + poemId?: number | null + inProgress?: boolean + config?: Prisma.GameConfigCreateNestedOneWithoutGamesInput + poem?: Prisma.PoemCreateNestedOneWithoutGameInput + hostPlayer: Prisma.PlayerCreateNestedOneWithoutGamesInput + players?: Prisma.PlayerCreateNestedManyWithoutCurrentGameInput +} + +export type GameUncheckedCreateInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + hostPlayerId: string + inProgress?: boolean + poem?: Prisma.PoemUncheckedCreateNestedOneWithoutGameInput + players?: Prisma.PlayerUncheckedCreateNestedManyWithoutCurrentGameInput +} + +export type GameUpdateInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + config?: Prisma.GameConfigUpdateOneWithoutGamesNestedInput + poem?: Prisma.PoemUpdateOneWithoutGameNestedInput + hostPlayer?: Prisma.PlayerUpdateOneRequiredWithoutGamesNestedInput + players?: Prisma.PlayerUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + poem?: Prisma.PoemUncheckedUpdateOneWithoutGameNestedInput + players?: Prisma.PlayerUncheckedUpdateManyWithoutCurrentGameNestedInput +} + +export type GameCreateManyInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + hostPlayerId: string + inProgress?: boolean +} + +export type GameUpdateManyMutationInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + +export type GameUncheckedUpdateManyInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + +export type GameNullableScalarRelationFilter = { + is?: Prisma.GameWhereInput | null + isNot?: Prisma.GameWhereInput | null +} + +export type GameListRelationFilter = { + every?: Prisma.GameWhereInput + some?: Prisma.GameWhereInput + none?: Prisma.GameWhereInput +} + +export type GameOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type GameCountOrderByAggregateInput = { + gameId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + joinCode?: Prisma.SortOrder + poemId?: Prisma.SortOrder + gameConfigId?: Prisma.SortOrder + hostPlayerId?: Prisma.SortOrder + inProgress?: Prisma.SortOrder +} + +export type GameAvgOrderByAggregateInput = { + gameId?: Prisma.SortOrder + poemId?: Prisma.SortOrder + gameConfigId?: Prisma.SortOrder +} + +export type GameMaxOrderByAggregateInput = { + gameId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + joinCode?: Prisma.SortOrder + poemId?: Prisma.SortOrder + gameConfigId?: Prisma.SortOrder + hostPlayerId?: Prisma.SortOrder + inProgress?: Prisma.SortOrder +} + +export type GameMinOrderByAggregateInput = { + gameId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + joinCode?: Prisma.SortOrder + poemId?: Prisma.SortOrder + gameConfigId?: Prisma.SortOrder + hostPlayerId?: Prisma.SortOrder + inProgress?: Prisma.SortOrder +} + +export type GameSumOrderByAggregateInput = { + gameId?: Prisma.SortOrder + poemId?: Prisma.SortOrder + gameConfigId?: Prisma.SortOrder +} + +export type GameScalarRelationFilter = { + is?: Prisma.GameWhereInput + isNot?: Prisma.GameWhereInput +} + +export type GameCreateNestedOneWithoutPlayersInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameCreateOrConnectWithoutPlayersInput + connect?: Prisma.GameWhereUniqueInput +} + +export type GameCreateNestedManyWithoutHostPlayerInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutHostPlayerInput[] | Prisma.GameUncheckedCreateWithoutHostPlayerInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutHostPlayerInput | Prisma.GameCreateOrConnectWithoutHostPlayerInput[] + createMany?: Prisma.GameCreateManyHostPlayerInputEnvelope + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] +} + +export type GameUncheckedCreateNestedManyWithoutHostPlayerInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutHostPlayerInput[] | Prisma.GameUncheckedCreateWithoutHostPlayerInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutHostPlayerInput | Prisma.GameCreateOrConnectWithoutHostPlayerInput[] + createMany?: Prisma.GameCreateManyHostPlayerInputEnvelope + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] +} + +export type GameUpdateOneWithoutPlayersNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameCreateOrConnectWithoutPlayersInput + upsert?: Prisma.GameUpsertWithoutPlayersInput + disconnect?: Prisma.GameWhereInput | boolean + delete?: Prisma.GameWhereInput | boolean + connect?: Prisma.GameWhereUniqueInput + update?: Prisma.XOR, Prisma.GameUncheckedUpdateWithoutPlayersInput> +} + +export type GameUpdateManyWithoutHostPlayerNestedInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutHostPlayerInput[] | Prisma.GameUncheckedCreateWithoutHostPlayerInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutHostPlayerInput | Prisma.GameCreateOrConnectWithoutHostPlayerInput[] + upsert?: Prisma.GameUpsertWithWhereUniqueWithoutHostPlayerInput | Prisma.GameUpsertWithWhereUniqueWithoutHostPlayerInput[] + createMany?: Prisma.GameCreateManyHostPlayerInputEnvelope + set?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + disconnect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + delete?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + update?: Prisma.GameUpdateWithWhereUniqueWithoutHostPlayerInput | Prisma.GameUpdateWithWhereUniqueWithoutHostPlayerInput[] + updateMany?: Prisma.GameUpdateManyWithWhereWithoutHostPlayerInput | Prisma.GameUpdateManyWithWhereWithoutHostPlayerInput[] + deleteMany?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] +} + +export type GameUncheckedUpdateManyWithoutHostPlayerNestedInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutHostPlayerInput[] | Prisma.GameUncheckedCreateWithoutHostPlayerInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutHostPlayerInput | Prisma.GameCreateOrConnectWithoutHostPlayerInput[] + upsert?: Prisma.GameUpsertWithWhereUniqueWithoutHostPlayerInput | Prisma.GameUpsertWithWhereUniqueWithoutHostPlayerInput[] + createMany?: Prisma.GameCreateManyHostPlayerInputEnvelope + set?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + disconnect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + delete?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + update?: Prisma.GameUpdateWithWhereUniqueWithoutHostPlayerInput | Prisma.GameUpdateWithWhereUniqueWithoutHostPlayerInput[] + updateMany?: Prisma.GameUpdateManyWithWhereWithoutHostPlayerInput | Prisma.GameUpdateManyWithWhereWithoutHostPlayerInput[] + deleteMany?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] +} + +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type GameCreateNestedManyWithoutConfigInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutConfigInput[] | Prisma.GameUncheckedCreateWithoutConfigInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutConfigInput | Prisma.GameCreateOrConnectWithoutConfigInput[] + createMany?: Prisma.GameCreateManyConfigInputEnvelope + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] +} + +export type GameUncheckedCreateNestedManyWithoutConfigInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutConfigInput[] | Prisma.GameUncheckedCreateWithoutConfigInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutConfigInput | Prisma.GameCreateOrConnectWithoutConfigInput[] + createMany?: Prisma.GameCreateManyConfigInputEnvelope + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] +} + +export type GameUpdateManyWithoutConfigNestedInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutConfigInput[] | Prisma.GameUncheckedCreateWithoutConfigInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutConfigInput | Prisma.GameCreateOrConnectWithoutConfigInput[] + upsert?: Prisma.GameUpsertWithWhereUniqueWithoutConfigInput | Prisma.GameUpsertWithWhereUniqueWithoutConfigInput[] + createMany?: Prisma.GameCreateManyConfigInputEnvelope + set?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + disconnect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + delete?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + update?: Prisma.GameUpdateWithWhereUniqueWithoutConfigInput | Prisma.GameUpdateWithWhereUniqueWithoutConfigInput[] + updateMany?: Prisma.GameUpdateManyWithWhereWithoutConfigInput | Prisma.GameUpdateManyWithWhereWithoutConfigInput[] + deleteMany?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] +} + +export type GameUncheckedUpdateManyWithoutConfigNestedInput = { + create?: Prisma.XOR | Prisma.GameCreateWithoutConfigInput[] | Prisma.GameUncheckedCreateWithoutConfigInput[] + connectOrCreate?: Prisma.GameCreateOrConnectWithoutConfigInput | Prisma.GameCreateOrConnectWithoutConfigInput[] + upsert?: Prisma.GameUpsertWithWhereUniqueWithoutConfigInput | Prisma.GameUpsertWithWhereUniqueWithoutConfigInput[] + createMany?: Prisma.GameCreateManyConfigInputEnvelope + set?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + disconnect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + delete?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + connect?: Prisma.GameWhereUniqueInput | Prisma.GameWhereUniqueInput[] + update?: Prisma.GameUpdateWithWhereUniqueWithoutConfigInput | Prisma.GameUpdateWithWhereUniqueWithoutConfigInput[] + updateMany?: Prisma.GameUpdateManyWithWhereWithoutConfigInput | Prisma.GameUpdateManyWithWhereWithoutConfigInput[] + deleteMany?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] +} + +export type GameCreateNestedOneWithoutPoemInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameCreateOrConnectWithoutPoemInput + connect?: Prisma.GameWhereUniqueInput +} + +export type GameUpdateOneRequiredWithoutPoemNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameCreateOrConnectWithoutPoemInput + upsert?: Prisma.GameUpsertWithoutPoemInput + connect?: Prisma.GameWhereUniqueInput + update?: Prisma.XOR, Prisma.GameUncheckedUpdateWithoutPoemInput> +} + +export type GameCreateWithoutPlayersInput = { + createdAt?: Date | string + joinCode: string + poemId?: number | null + inProgress?: boolean + config?: Prisma.GameConfigCreateNestedOneWithoutGamesInput + poem?: Prisma.PoemCreateNestedOneWithoutGameInput + hostPlayer: Prisma.PlayerCreateNestedOneWithoutGamesInput +} + +export type GameUncheckedCreateWithoutPlayersInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + hostPlayerId: string + inProgress?: boolean + poem?: Prisma.PoemUncheckedCreateNestedOneWithoutGameInput +} + +export type GameCreateOrConnectWithoutPlayersInput = { + where: Prisma.GameWhereUniqueInput + create: Prisma.XOR +} + +export type GameCreateWithoutHostPlayerInput = { + createdAt?: Date | string + joinCode: string + poemId?: number | null + inProgress?: boolean + config?: Prisma.GameConfigCreateNestedOneWithoutGamesInput + poem?: Prisma.PoemCreateNestedOneWithoutGameInput + players?: Prisma.PlayerCreateNestedManyWithoutCurrentGameInput +} + +export type GameUncheckedCreateWithoutHostPlayerInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + inProgress?: boolean + poem?: Prisma.PoemUncheckedCreateNestedOneWithoutGameInput + players?: Prisma.PlayerUncheckedCreateNestedManyWithoutCurrentGameInput +} + +export type GameCreateOrConnectWithoutHostPlayerInput = { + where: Prisma.GameWhereUniqueInput + create: Prisma.XOR +} + +export type GameCreateManyHostPlayerInputEnvelope = { + data: Prisma.GameCreateManyHostPlayerInput | Prisma.GameCreateManyHostPlayerInput[] + skipDuplicates?: boolean +} + +export type GameUpsertWithoutPlayersInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.GameWhereInput +} + +export type GameUpdateToOneWithWhereWithoutPlayersInput = { + where?: Prisma.GameWhereInput + data: Prisma.XOR +} + +export type GameUpdateWithoutPlayersInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + config?: Prisma.GameConfigUpdateOneWithoutGamesNestedInput + poem?: Prisma.PoemUpdateOneWithoutGameNestedInput + hostPlayer?: Prisma.PlayerUpdateOneRequiredWithoutGamesNestedInput +} + +export type GameUncheckedUpdateWithoutPlayersInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + poem?: Prisma.PoemUncheckedUpdateOneWithoutGameNestedInput +} + +export type GameUpsertWithWhereUniqueWithoutHostPlayerInput = { + where: Prisma.GameWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type GameUpdateWithWhereUniqueWithoutHostPlayerInput = { + where: Prisma.GameWhereUniqueInput + data: Prisma.XOR +} + +export type GameUpdateManyWithWhereWithoutHostPlayerInput = { + where: Prisma.GameScalarWhereInput + data: Prisma.XOR +} + +export type GameScalarWhereInput = { + AND?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] + OR?: Prisma.GameScalarWhereInput[] + NOT?: Prisma.GameScalarWhereInput | Prisma.GameScalarWhereInput[] + gameId?: Prisma.IntFilter<"Game"> | number + createdAt?: Prisma.DateTimeFilter<"Game"> | Date | string + joinCode?: Prisma.StringFilter<"Game"> | string + poemId?: Prisma.IntNullableFilter<"Game"> | number | null + gameConfigId?: Prisma.IntNullableFilter<"Game"> | number | null + hostPlayerId?: Prisma.StringFilter<"Game"> | string + inProgress?: Prisma.BoolFilter<"Game"> | boolean +} + +export type GameCreateWithoutConfigInput = { + createdAt?: Date | string + joinCode: string + poemId?: number | null + inProgress?: boolean + poem?: Prisma.PoemCreateNestedOneWithoutGameInput + hostPlayer: Prisma.PlayerCreateNestedOneWithoutGamesInput + players?: Prisma.PlayerCreateNestedManyWithoutCurrentGameInput +} + +export type GameUncheckedCreateWithoutConfigInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + hostPlayerId: string + inProgress?: boolean + poem?: Prisma.PoemUncheckedCreateNestedOneWithoutGameInput + players?: Prisma.PlayerUncheckedCreateNestedManyWithoutCurrentGameInput +} + +export type GameCreateOrConnectWithoutConfigInput = { + where: Prisma.GameWhereUniqueInput + create: Prisma.XOR +} + +export type GameCreateManyConfigInputEnvelope = { + data: Prisma.GameCreateManyConfigInput | Prisma.GameCreateManyConfigInput[] + skipDuplicates?: boolean +} + +export type GameUpsertWithWhereUniqueWithoutConfigInput = { + where: Prisma.GameWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type GameUpdateWithWhereUniqueWithoutConfigInput = { + where: Prisma.GameWhereUniqueInput + data: Prisma.XOR +} + +export type GameUpdateManyWithWhereWithoutConfigInput = { + where: Prisma.GameScalarWhereInput + data: Prisma.XOR +} + +export type GameCreateWithoutPoemInput = { + createdAt?: Date | string + joinCode: string + poemId?: number | null + inProgress?: boolean + config?: Prisma.GameConfigCreateNestedOneWithoutGamesInput + hostPlayer: Prisma.PlayerCreateNestedOneWithoutGamesInput + players?: Prisma.PlayerCreateNestedManyWithoutCurrentGameInput +} + +export type GameUncheckedCreateWithoutPoemInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + hostPlayerId: string + inProgress?: boolean + players?: Prisma.PlayerUncheckedCreateNestedManyWithoutCurrentGameInput +} + +export type GameCreateOrConnectWithoutPoemInput = { + where: Prisma.GameWhereUniqueInput + create: Prisma.XOR +} + +export type GameUpsertWithoutPoemInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.GameWhereInput +} + +export type GameUpdateToOneWithWhereWithoutPoemInput = { + where?: Prisma.GameWhereInput + data: Prisma.XOR +} + +export type GameUpdateWithoutPoemInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + config?: Prisma.GameConfigUpdateOneWithoutGamesNestedInput + hostPlayer?: Prisma.PlayerUpdateOneRequiredWithoutGamesNestedInput + players?: Prisma.PlayerUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateWithoutPoemInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + players?: Prisma.PlayerUncheckedUpdateManyWithoutCurrentGameNestedInput +} + +export type GameCreateManyHostPlayerInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + gameConfigId?: number | null + inProgress?: boolean +} + +export type GameUpdateWithoutHostPlayerInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + config?: Prisma.GameConfigUpdateOneWithoutGamesNestedInput + poem?: Prisma.PoemUpdateOneWithoutGameNestedInput + players?: Prisma.PlayerUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateWithoutHostPlayerInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + poem?: Prisma.PoemUncheckedUpdateOneWithoutGameNestedInput + players?: Prisma.PlayerUncheckedUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateManyWithoutHostPlayerInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + gameConfigId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + +export type GameCreateManyConfigInput = { + gameId?: number + createdAt?: Date | string + joinCode: string + poemId?: number | null + hostPlayerId: string + inProgress?: boolean +} + +export type GameUpdateWithoutConfigInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + poem?: Prisma.PoemUpdateOneWithoutGameNestedInput + hostPlayer?: Prisma.PlayerUpdateOneRequiredWithoutGamesNestedInput + players?: Prisma.PlayerUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateWithoutConfigInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean + poem?: Prisma.PoemUncheckedUpdateOneWithoutGameNestedInput + players?: Prisma.PlayerUncheckedUpdateManyWithoutCurrentGameNestedInput +} + +export type GameUncheckedUpdateManyWithoutConfigInput = { + gameId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + joinCode?: Prisma.StringFieldUpdateOperationsInput | string + poemId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + hostPlayerId?: Prisma.StringFieldUpdateOperationsInput | string + inProgress?: Prisma.BoolFieldUpdateOperationsInput | boolean +} + + +/** + * Count Type GameCountOutputType + */ + +export type GameCountOutputType = { + players: number +} + +export type GameCountOutputTypeSelect = { + players?: boolean | GameCountOutputTypeCountPlayersArgs +} + +/** + * GameCountOutputType without action + */ +export type GameCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the GameCountOutputType + */ + select?: Prisma.GameCountOutputTypeSelect | null +} + +/** + * GameCountOutputType without action + */ +export type GameCountOutputTypeCountPlayersArgs = { + where?: Prisma.PlayerWhereInput +} + + +export type GameSelect = runtime.Types.Extensions.GetSelect<{ + gameId?: boolean + createdAt?: boolean + joinCode?: boolean + poemId?: boolean + gameConfigId?: boolean + hostPlayerId?: boolean + inProgress?: boolean + config?: boolean | Prisma.Game$configArgs + poem?: boolean | Prisma.Game$poemArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs + players?: boolean | Prisma.Game$playersArgs + _count?: boolean | Prisma.GameCountOutputTypeDefaultArgs +}, ExtArgs["result"]["game"]> + +export type GameSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + gameId?: boolean + createdAt?: boolean + joinCode?: boolean + poemId?: boolean + gameConfigId?: boolean + hostPlayerId?: boolean + inProgress?: boolean + config?: boolean | Prisma.Game$configArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs +}, ExtArgs["result"]["game"]> + +export type GameSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + gameId?: boolean + createdAt?: boolean + joinCode?: boolean + poemId?: boolean + gameConfigId?: boolean + hostPlayerId?: boolean + inProgress?: boolean + config?: boolean | Prisma.Game$configArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs +}, ExtArgs["result"]["game"]> + +export type GameSelectScalar = { + gameId?: boolean + createdAt?: boolean + joinCode?: boolean + poemId?: boolean + gameConfigId?: boolean + hostPlayerId?: boolean + inProgress?: boolean +} + +export type GameOmit = runtime.Types.Extensions.GetOmit<"gameId" | "createdAt" | "joinCode" | "poemId" | "gameConfigId" | "hostPlayerId" | "inProgress", ExtArgs["result"]["game"]> +export type GameInclude = { + config?: boolean | Prisma.Game$configArgs + poem?: boolean | Prisma.Game$poemArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs + players?: boolean | Prisma.Game$playersArgs + _count?: boolean | Prisma.GameCountOutputTypeDefaultArgs +} +export type GameIncludeCreateManyAndReturn = { + config?: boolean | Prisma.Game$configArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs +} +export type GameIncludeUpdateManyAndReturn = { + config?: boolean | Prisma.Game$configArgs + hostPlayer?: boolean | Prisma.PlayerDefaultArgs +} + +export type $GamePayload = { + name: "Game" + objects: { + config: Prisma.$GameConfigPayload | null + poem: Prisma.$PoemPayload | null + hostPlayer: Prisma.$PlayerPayload + players: Prisma.$PlayerPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + gameId: number + createdAt: Date + joinCode: string + poemId: number | null + gameConfigId: number | null + hostPlayerId: string + inProgress: boolean + }, ExtArgs["result"]["game"]> + composites: {} +} + +export type GameGetPayload = runtime.Types.Result.GetResult + +export type GameCountArgs = + Omit & { + select?: GameCountAggregateInputType | true + } + +export interface GameDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Game'], meta: { name: 'Game' } } + /** + * Find zero or one Game that matches the filter. + * @param {GameFindUniqueArgs} args - Arguments to find a Game + * @example + * // Get one Game + * const game = await prisma.game.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Game that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GameFindUniqueOrThrowArgs} args - Arguments to find a Game + * @example + * // Get one Game + * const game = await prisma.game.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Game 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 {GameFindFirstArgs} args - Arguments to find a Game + * @example + * // Get one Game + * const game = await prisma.game.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Game that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code 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 {GameFindFirstOrThrowArgs} args - Arguments to find a Game + * @example + * // Get one Game + * const game = await prisma.game.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Games 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 {GameFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Games + * const games = await prisma.game.findMany() + * + * // Get first 10 Games + * const games = await prisma.game.findMany({ take: 10 }) + * + * // Only select the `gameId` + * const gameWithGameIdOnly = await prisma.game.findMany({ select: { gameId: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Game. + * @param {GameCreateArgs} args - Arguments to create a Game. + * @example + * // Create one Game + * const Game = await prisma.game.create({ + * data: { + * // ... data to create a Game + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Games. + * @param {GameCreateManyArgs} args - Arguments to create many Games. + * @example + * // Create many Games + * const game = await prisma.game.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Games and returns the data saved in the database. + * @param {GameCreateManyAndReturnArgs} args - Arguments to create many Games. + * @example + * // Create many Games + * const game = await prisma.game.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Games and only return the `gameId` + * const gameWithGameIdOnly = await prisma.game.createManyAndReturn({ + * select: { gameId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Game. + * @param {GameDeleteArgs} args - Arguments to delete one Game. + * @example + * // Delete one Game + * const Game = await prisma.game.delete({ + * where: { + * // ... filter to delete one Game + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Game. + * @param {GameUpdateArgs} args - Arguments to update one Game. + * @example + * // Update one Game + * const game = await prisma.game.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Games. + * @param {GameDeleteManyArgs} args - Arguments to filter Games to delete. + * @example + * // Delete a few Games + * const { count } = await prisma.game.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Games. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Games + * const game = await prisma.game.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Games and returns the data updated in the database. + * @param {GameUpdateManyAndReturnArgs} args - Arguments to update many Games. + * @example + * // Update many Games + * const game = await prisma.game.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Games and only return the `gameId` + * const gameWithGameIdOnly = await prisma.game.updateManyAndReturn({ + * select: { gameId: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Game. + * @param {GameUpsertArgs} args - Arguments to update or create a Game. + * @example + * // Update or create a Game + * const game = await prisma.game.upsert({ + * create: { + * // ... data to create a Game + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Game we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__GameClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Games. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameCountArgs} args - Arguments to filter Games to count. + * @example + * // Count the number of Games + * const count = await prisma.game.count({ + * where: { + * // ... the filter for the Games we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Game. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Game. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameGroupByArgs} 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 GameGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GameGroupByArgs['orderBy'] } + : { orderBy?: GameGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGameGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Game model + */ +readonly fields: GameFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Game. + * 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 interface Prisma__GameClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + config = {}>(args?: Prisma.Subset>): Prisma.Prisma__GameConfigClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + poem = {}>(args?: Prisma.Subset>): Prisma.Prisma__PoemClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + hostPlayer = {}>(args?: Prisma.Subset>): Prisma.Prisma__PlayerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + players = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Game model + */ +export interface GameFieldRefs { + readonly gameId: Prisma.FieldRef<"Game", 'Int'> + readonly createdAt: Prisma.FieldRef<"Game", 'DateTime'> + readonly joinCode: Prisma.FieldRef<"Game", 'String'> + readonly poemId: Prisma.FieldRef<"Game", 'Int'> + readonly gameConfigId: Prisma.FieldRef<"Game", 'Int'> + readonly hostPlayerId: Prisma.FieldRef<"Game", 'String'> + readonly inProgress: Prisma.FieldRef<"Game", 'Boolean'> +} + + +// Custom InputTypes +/** + * Game findUnique + */ +export type GameFindUniqueArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter, which Game to fetch. + */ + where: Prisma.GameWhereUniqueInput +} + +/** + * Game findUniqueOrThrow + */ +export type GameFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter, which Game to fetch. + */ + where: Prisma.GameWhereUniqueInput +} + +/** + * Game findFirst + */ +export type GameFindFirstArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter, which Game to fetch. + */ + where?: Prisma.GameWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Games to fetch. + */ + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Games. + */ + cursor?: Prisma.GameWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Games 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` Games. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Games. + */ + distinct?: Prisma.GameScalarFieldEnum | Prisma.GameScalarFieldEnum[] +} + +/** + * Game findFirstOrThrow + */ +export type GameFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter, which Game to fetch. + */ + where?: Prisma.GameWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Games to fetch. + */ + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Games. + */ + cursor?: Prisma.GameWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Games 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` Games. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Games. + */ + distinct?: Prisma.GameScalarFieldEnum | Prisma.GameScalarFieldEnum[] +} + +/** + * Game findMany + */ +export type GameFindManyArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter, which Games to fetch. + */ + where?: Prisma.GameWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Games to fetch. + */ + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Games. + */ + cursor?: Prisma.GameWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Games 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` Games. + */ + skip?: number + distinct?: Prisma.GameScalarFieldEnum | Prisma.GameScalarFieldEnum[] +} + +/** + * Game create + */ +export type GameCreateArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * The data needed to create a Game. + */ + data: Prisma.XOR +} + +/** + * Game createMany + */ +export type GameCreateManyArgs = { + /** + * The data used to create many Games. + */ + data: Prisma.GameCreateManyInput | Prisma.GameCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Game createManyAndReturn + */ +export type GameCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * The data used to create many Games. + */ + data: Prisma.GameCreateManyInput | Prisma.GameCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameIncludeCreateManyAndReturn | null +} + +/** + * Game update + */ +export type GameUpdateArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * The data needed to update a Game. + */ + data: Prisma.XOR + /** + * Choose, which Game to update. + */ + where: Prisma.GameWhereUniqueInput +} + +/** + * Game updateMany + */ +export type GameUpdateManyArgs = { + /** + * The data used to update Games. + */ + data: Prisma.XOR + /** + * Filter which Games to update + */ + where?: Prisma.GameWhereInput + /** + * Limit how many Games to update. + */ + limit?: number +} + +/** + * Game updateManyAndReturn + */ +export type GameUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * The data used to update Games. + */ + data: Prisma.XOR + /** + * Filter which Games to update + */ + where?: Prisma.GameWhereInput + /** + * Limit how many Games to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameIncludeUpdateManyAndReturn | null +} + +/** + * Game upsert + */ +export type GameUpsertArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * The filter to search for the Game to update in case it exists. + */ + where: Prisma.GameWhereUniqueInput + /** + * In case the Game found by the `where` argument doesn't exist, create a new Game with this data. + */ + create: Prisma.XOR + /** + * In case the Game was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Game delete + */ +export type GameDeleteArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + /** + * Filter which Game to delete. + */ + where: Prisma.GameWhereUniqueInput +} + +/** + * Game deleteMany + */ +export type GameDeleteManyArgs = { + /** + * Filter which Games to delete + */ + where?: Prisma.GameWhereInput + /** + * Limit how many Games to delete. + */ + limit?: number +} + +/** + * Game.config + */ +export type Game$configArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + where?: Prisma.GameConfigWhereInput +} + +/** + * Game.poem + */ +export type Game$poemArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + where?: Prisma.PoemWhereInput +} + +/** + * Game.players + */ +export type Game$playersArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + where?: Prisma.PlayerWhereInput + orderBy?: Prisma.PlayerOrderByWithRelationInput | Prisma.PlayerOrderByWithRelationInput[] + cursor?: Prisma.PlayerWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.PlayerScalarFieldEnum | Prisma.PlayerScalarFieldEnum[] +} + +/** + * Game without action + */ +export type GameDefaultArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null +} diff --git a/src/generated/prisma/models/GameConfig.ts b/src/generated/prisma/models/GameConfig.ts new file mode 100644 index 0000000..3408c95 --- /dev/null +++ b/src/generated/prisma/models/GameConfig.ts @@ -0,0 +1,1238 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `GameConfig` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model GameConfig + * + */ +export type GameConfigModel = runtime.Types.Result.DefaultSelection + +export type AggregateGameConfig = { + _count: GameConfigCountAggregateOutputType | null + _avg: GameConfigAvgAggregateOutputType | null + _sum: GameConfigSumAggregateOutputType | null + _min: GameConfigMinAggregateOutputType | null + _max: GameConfigMaxAggregateOutputType | null +} + +export type GameConfigAvgAggregateOutputType = { + configId: number | null +} + +export type GameConfigSumAggregateOutputType = { + configId: number | null +} + +export type GameConfigMinAggregateOutputType = { + configId: number | null +} + +export type GameConfigMaxAggregateOutputType = { + configId: number | null +} + +export type GameConfigCountAggregateOutputType = { + configId: number + _all: number +} + + +export type GameConfigAvgAggregateInputType = { + configId?: true +} + +export type GameConfigSumAggregateInputType = { + configId?: true +} + +export type GameConfigMinAggregateInputType = { + configId?: true +} + +export type GameConfigMaxAggregateInputType = { + configId?: true +} + +export type GameConfigCountAggregateInputType = { + configId?: true + _all?: true +} + +export type GameConfigAggregateArgs = { + /** + * Filter which GameConfig to aggregate. + */ + where?: Prisma.GameConfigWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GameConfigs to fetch. + */ + orderBy?: Prisma.GameConfigOrderByWithRelationInput | Prisma.GameConfigOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GameConfigWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GameConfigs 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` GameConfigs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned GameConfigs + **/ + _count?: true | GameConfigCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GameConfigAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GameConfigSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GameConfigMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GameConfigMaxAggregateInputType +} + +export type GetGameConfigAggregateType = { + [P in keyof T & keyof AggregateGameConfig]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type GameConfigGroupByArgs = { + where?: Prisma.GameConfigWhereInput + orderBy?: Prisma.GameConfigOrderByWithAggregationInput | Prisma.GameConfigOrderByWithAggregationInput[] + by: Prisma.GameConfigScalarFieldEnum[] | Prisma.GameConfigScalarFieldEnum + having?: Prisma.GameConfigScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GameConfigCountAggregateInputType | true + _avg?: GameConfigAvgAggregateInputType + _sum?: GameConfigSumAggregateInputType + _min?: GameConfigMinAggregateInputType + _max?: GameConfigMaxAggregateInputType +} + +export type GameConfigGroupByOutputType = { + configId: number + _count: GameConfigCountAggregateOutputType | null + _avg: GameConfigAvgAggregateOutputType | null + _sum: GameConfigSumAggregateOutputType | null + _min: GameConfigMinAggregateOutputType | null + _max: GameConfigMaxAggregateOutputType | null +} + +type GetGameConfigGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof GameConfigGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type GameConfigWhereInput = { + AND?: Prisma.GameConfigWhereInput | Prisma.GameConfigWhereInput[] + OR?: Prisma.GameConfigWhereInput[] + NOT?: Prisma.GameConfigWhereInput | Prisma.GameConfigWhereInput[] + configId?: Prisma.IntFilter<"GameConfig"> | number + games?: Prisma.GameListRelationFilter +} + +export type GameConfigOrderByWithRelationInput = { + configId?: Prisma.SortOrder + games?: Prisma.GameOrderByRelationAggregateInput +} + +export type GameConfigWhereUniqueInput = Prisma.AtLeast<{ + configId?: number + AND?: Prisma.GameConfigWhereInput | Prisma.GameConfigWhereInput[] + OR?: Prisma.GameConfigWhereInput[] + NOT?: Prisma.GameConfigWhereInput | Prisma.GameConfigWhereInput[] + games?: Prisma.GameListRelationFilter +}, "configId"> + +export type GameConfigOrderByWithAggregationInput = { + configId?: Prisma.SortOrder + _count?: Prisma.GameConfigCountOrderByAggregateInput + _avg?: Prisma.GameConfigAvgOrderByAggregateInput + _max?: Prisma.GameConfigMaxOrderByAggregateInput + _min?: Prisma.GameConfigMinOrderByAggregateInput + _sum?: Prisma.GameConfigSumOrderByAggregateInput +} + +export type GameConfigScalarWhereWithAggregatesInput = { + AND?: Prisma.GameConfigScalarWhereWithAggregatesInput | Prisma.GameConfigScalarWhereWithAggregatesInput[] + OR?: Prisma.GameConfigScalarWhereWithAggregatesInput[] + NOT?: Prisma.GameConfigScalarWhereWithAggregatesInput | Prisma.GameConfigScalarWhereWithAggregatesInput[] + configId?: Prisma.IntWithAggregatesFilter<"GameConfig"> | number +} + +export type GameConfigCreateInput = { + games?: Prisma.GameCreateNestedManyWithoutConfigInput +} + +export type GameConfigUncheckedCreateInput = { + configId?: number + games?: Prisma.GameUncheckedCreateNestedManyWithoutConfigInput +} + +export type GameConfigUpdateInput = { + games?: Prisma.GameUpdateManyWithoutConfigNestedInput +} + +export type GameConfigUncheckedUpdateInput = { + configId?: Prisma.IntFieldUpdateOperationsInput | number + games?: Prisma.GameUncheckedUpdateManyWithoutConfigNestedInput +} + +export type GameConfigCreateManyInput = { + configId?: number +} + +export type GameConfigUpdateManyMutationInput = { + +} + +export type GameConfigUncheckedUpdateManyInput = { + configId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type GameConfigNullableScalarRelationFilter = { + is?: Prisma.GameConfigWhereInput | null + isNot?: Prisma.GameConfigWhereInput | null +} + +export type GameConfigCountOrderByAggregateInput = { + configId?: Prisma.SortOrder +} + +export type GameConfigAvgOrderByAggregateInput = { + configId?: Prisma.SortOrder +} + +export type GameConfigMaxOrderByAggregateInput = { + configId?: Prisma.SortOrder +} + +export type GameConfigMinOrderByAggregateInput = { + configId?: Prisma.SortOrder +} + +export type GameConfigSumOrderByAggregateInput = { + configId?: Prisma.SortOrder +} + +export type GameConfigCreateNestedOneWithoutGamesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameConfigCreateOrConnectWithoutGamesInput + connect?: Prisma.GameConfigWhereUniqueInput +} + +export type GameConfigUpdateOneWithoutGamesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GameConfigCreateOrConnectWithoutGamesInput + upsert?: Prisma.GameConfigUpsertWithoutGamesInput + disconnect?: Prisma.GameConfigWhereInput | boolean + delete?: Prisma.GameConfigWhereInput | boolean + connect?: Prisma.GameConfigWhereUniqueInput + update?: Prisma.XOR, Prisma.GameConfigUncheckedUpdateWithoutGamesInput> +} + +export type GameConfigCreateWithoutGamesInput = { + +} + +export type GameConfigUncheckedCreateWithoutGamesInput = { + configId?: number +} + +export type GameConfigCreateOrConnectWithoutGamesInput = { + where: Prisma.GameConfigWhereUniqueInput + create: Prisma.XOR +} + +export type GameConfigUpsertWithoutGamesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.GameConfigWhereInput +} + +export type GameConfigUpdateToOneWithWhereWithoutGamesInput = { + where?: Prisma.GameConfigWhereInput + data: Prisma.XOR +} + +export type GameConfigUpdateWithoutGamesInput = { + +} + +export type GameConfigUncheckedUpdateWithoutGamesInput = { + configId?: Prisma.IntFieldUpdateOperationsInput | number +} + + +/** + * Count Type GameConfigCountOutputType + */ + +export type GameConfigCountOutputType = { + games: number +} + +export type GameConfigCountOutputTypeSelect = { + games?: boolean | GameConfigCountOutputTypeCountGamesArgs +} + +/** + * GameConfigCountOutputType without action + */ +export type GameConfigCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the GameConfigCountOutputType + */ + select?: Prisma.GameConfigCountOutputTypeSelect | null +} + +/** + * GameConfigCountOutputType without action + */ +export type GameConfigCountOutputTypeCountGamesArgs = { + where?: Prisma.GameWhereInput +} + + +export type GameConfigSelect = runtime.Types.Extensions.GetSelect<{ + configId?: boolean + games?: boolean | Prisma.GameConfig$gamesArgs + _count?: boolean | Prisma.GameConfigCountOutputTypeDefaultArgs +}, ExtArgs["result"]["gameConfig"]> + +export type GameConfigSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + configId?: boolean +}, ExtArgs["result"]["gameConfig"]> + +export type GameConfigSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + configId?: boolean +}, ExtArgs["result"]["gameConfig"]> + +export type GameConfigSelectScalar = { + configId?: boolean +} + +export type GameConfigOmit = runtime.Types.Extensions.GetOmit<"configId", ExtArgs["result"]["gameConfig"]> +export type GameConfigInclude = { + games?: boolean | Prisma.GameConfig$gamesArgs + _count?: boolean | Prisma.GameConfigCountOutputTypeDefaultArgs +} +export type GameConfigIncludeCreateManyAndReturn = {} +export type GameConfigIncludeUpdateManyAndReturn = {} + +export type $GameConfigPayload = { + name: "GameConfig" + objects: { + games: Prisma.$GamePayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + configId: number + }, ExtArgs["result"]["gameConfig"]> + composites: {} +} + +export type GameConfigGetPayload = runtime.Types.Result.GetResult + +export type GameConfigCountArgs = + Omit & { + select?: GameConfigCountAggregateInputType | true + } + +export interface GameConfigDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['GameConfig'], meta: { name: 'GameConfig' } } + /** + * Find zero or one GameConfig that matches the filter. + * @param {GameConfigFindUniqueArgs} args - Arguments to find a GameConfig + * @example + * // Get one GameConfig + * const gameConfig = await prisma.gameConfig.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one GameConfig that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GameConfigFindUniqueOrThrowArgs} args - Arguments to find a GameConfig + * @example + * // Get one GameConfig + * const gameConfig = await prisma.gameConfig.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GameConfig 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 {GameConfigFindFirstArgs} args - Arguments to find a GameConfig + * @example + * // Get one GameConfig + * const gameConfig = await prisma.gameConfig.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GameConfig that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code 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 {GameConfigFindFirstOrThrowArgs} args - Arguments to find a GameConfig + * @example + * // Get one GameConfig + * const gameConfig = await prisma.gameConfig.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more GameConfigs 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 {GameConfigFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all GameConfigs + * const gameConfigs = await prisma.gameConfig.findMany() + * + * // Get first 10 GameConfigs + * const gameConfigs = await prisma.gameConfig.findMany({ take: 10 }) + * + * // Only select the `configId` + * const gameConfigWithConfigIdOnly = await prisma.gameConfig.findMany({ select: { configId: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a GameConfig. + * @param {GameConfigCreateArgs} args - Arguments to create a GameConfig. + * @example + * // Create one GameConfig + * const GameConfig = await prisma.gameConfig.create({ + * data: { + * // ... data to create a GameConfig + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many GameConfigs. + * @param {GameConfigCreateManyArgs} args - Arguments to create many GameConfigs. + * @example + * // Create many GameConfigs + * const gameConfig = await prisma.gameConfig.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many GameConfigs and returns the data saved in the database. + * @param {GameConfigCreateManyAndReturnArgs} args - Arguments to create many GameConfigs. + * @example + * // Create many GameConfigs + * const gameConfig = await prisma.gameConfig.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many GameConfigs and only return the `configId` + * const gameConfigWithConfigIdOnly = await prisma.gameConfig.createManyAndReturn({ + * select: { configId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a GameConfig. + * @param {GameConfigDeleteArgs} args - Arguments to delete one GameConfig. + * @example + * // Delete one GameConfig + * const GameConfig = await prisma.gameConfig.delete({ + * where: { + * // ... filter to delete one GameConfig + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one GameConfig. + * @param {GameConfigUpdateArgs} args - Arguments to update one GameConfig. + * @example + * // Update one GameConfig + * const gameConfig = await prisma.gameConfig.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more GameConfigs. + * @param {GameConfigDeleteManyArgs} args - Arguments to filter GameConfigs to delete. + * @example + * // Delete a few GameConfigs + * const { count } = await prisma.gameConfig.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GameConfigs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameConfigUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many GameConfigs + * const gameConfig = await prisma.gameConfig.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GameConfigs and returns the data updated in the database. + * @param {GameConfigUpdateManyAndReturnArgs} args - Arguments to update many GameConfigs. + * @example + * // Update many GameConfigs + * const gameConfig = await prisma.gameConfig.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more GameConfigs and only return the `configId` + * const gameConfigWithConfigIdOnly = await prisma.gameConfig.updateManyAndReturn({ + * select: { configId: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one GameConfig. + * @param {GameConfigUpsertArgs} args - Arguments to update or create a GameConfig. + * @example + * // Update or create a GameConfig + * const gameConfig = await prisma.gameConfig.upsert({ + * create: { + * // ... data to create a GameConfig + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the GameConfig we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__GameConfigClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of GameConfigs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameConfigCountArgs} args - Arguments to filter GameConfigs to count. + * @example + * // Count the number of GameConfigs + * const count = await prisma.gameConfig.count({ + * where: { + * // ... the filter for the GameConfigs we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a GameConfig. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameConfigAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by GameConfig. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GameConfigGroupByArgs} 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 GameConfigGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GameConfigGroupByArgs['orderBy'] } + : { orderBy?: GameConfigGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGameConfigGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the GameConfig model + */ +readonly fields: GameConfigFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for GameConfig. + * 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 interface Prisma__GameConfigClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + games = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the GameConfig model + */ +export interface GameConfigFieldRefs { + readonly configId: Prisma.FieldRef<"GameConfig", 'Int'> +} + + +// Custom InputTypes +/** + * GameConfig findUnique + */ +export type GameConfigFindUniqueArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter, which GameConfig to fetch. + */ + where: Prisma.GameConfigWhereUniqueInput +} + +/** + * GameConfig findUniqueOrThrow + */ +export type GameConfigFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter, which GameConfig to fetch. + */ + where: Prisma.GameConfigWhereUniqueInput +} + +/** + * GameConfig findFirst + */ +export type GameConfigFindFirstArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter, which GameConfig to fetch. + */ + where?: Prisma.GameConfigWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GameConfigs to fetch. + */ + orderBy?: Prisma.GameConfigOrderByWithRelationInput | Prisma.GameConfigOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GameConfigs. + */ + cursor?: Prisma.GameConfigWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GameConfigs 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` GameConfigs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GameConfigs. + */ + distinct?: Prisma.GameConfigScalarFieldEnum | Prisma.GameConfigScalarFieldEnum[] +} + +/** + * GameConfig findFirstOrThrow + */ +export type GameConfigFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter, which GameConfig to fetch. + */ + where?: Prisma.GameConfigWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GameConfigs to fetch. + */ + orderBy?: Prisma.GameConfigOrderByWithRelationInput | Prisma.GameConfigOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GameConfigs. + */ + cursor?: Prisma.GameConfigWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GameConfigs 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` GameConfigs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GameConfigs. + */ + distinct?: Prisma.GameConfigScalarFieldEnum | Prisma.GameConfigScalarFieldEnum[] +} + +/** + * GameConfig findMany + */ +export type GameConfigFindManyArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter, which GameConfigs to fetch. + */ + where?: Prisma.GameConfigWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GameConfigs to fetch. + */ + orderBy?: Prisma.GameConfigOrderByWithRelationInput | Prisma.GameConfigOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing GameConfigs. + */ + cursor?: Prisma.GameConfigWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GameConfigs 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` GameConfigs. + */ + skip?: number + distinct?: Prisma.GameConfigScalarFieldEnum | Prisma.GameConfigScalarFieldEnum[] +} + +/** + * GameConfig create + */ +export type GameConfigCreateArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * The data needed to create a GameConfig. + */ + data?: Prisma.XOR +} + +/** + * GameConfig createMany + */ +export type GameConfigCreateManyArgs = { + /** + * The data used to create many GameConfigs. + */ + data: Prisma.GameConfigCreateManyInput | Prisma.GameConfigCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * GameConfig createManyAndReturn + */ +export type GameConfigCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelectCreateManyAndReturn | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * The data used to create many GameConfigs. + */ + data: Prisma.GameConfigCreateManyInput | Prisma.GameConfigCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * GameConfig update + */ +export type GameConfigUpdateArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * The data needed to update a GameConfig. + */ + data: Prisma.XOR + /** + * Choose, which GameConfig to update. + */ + where: Prisma.GameConfigWhereUniqueInput +} + +/** + * GameConfig updateMany + */ +export type GameConfigUpdateManyArgs = { + /** + * The data used to update GameConfigs. + */ + data: Prisma.XOR + /** + * Filter which GameConfigs to update + */ + where?: Prisma.GameConfigWhereInput + /** + * Limit how many GameConfigs to update. + */ + limit?: number +} + +/** + * GameConfig updateManyAndReturn + */ +export type GameConfigUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * The data used to update GameConfigs. + */ + data: Prisma.XOR + /** + * Filter which GameConfigs to update + */ + where?: Prisma.GameConfigWhereInput + /** + * Limit how many GameConfigs to update. + */ + limit?: number +} + +/** + * GameConfig upsert + */ +export type GameConfigUpsertArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * The filter to search for the GameConfig to update in case it exists. + */ + where: Prisma.GameConfigWhereUniqueInput + /** + * In case the GameConfig found by the `where` argument doesn't exist, create a new GameConfig with this data. + */ + create: Prisma.XOR + /** + * In case the GameConfig was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * GameConfig delete + */ +export type GameConfigDeleteArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null + /** + * Filter which GameConfig to delete. + */ + where: Prisma.GameConfigWhereUniqueInput +} + +/** + * GameConfig deleteMany + */ +export type GameConfigDeleteManyArgs = { + /** + * Filter which GameConfigs to delete + */ + where?: Prisma.GameConfigWhereInput + /** + * Limit how many GameConfigs to delete. + */ + limit?: number +} + +/** + * GameConfig.games + */ +export type GameConfig$gamesArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + where?: Prisma.GameWhereInput + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + cursor?: Prisma.GameWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GameScalarFieldEnum | Prisma.GameScalarFieldEnum[] +} + +/** + * GameConfig without action + */ +export type GameConfigDefaultArgs = { + /** + * Select specific fields to fetch from the GameConfig + */ + select?: Prisma.GameConfigSelect | null + /** + * Omit specific fields from the GameConfig + */ + omit?: Prisma.GameConfigOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameConfigInclude | null +} diff --git a/src/generated/prisma/models/Player.ts b/src/generated/prisma/models/Player.ts new file mode 100644 index 0000000..d1e32e1 --- /dev/null +++ b/src/generated/prisma/models/Player.ts @@ -0,0 +1,1599 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Player` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Player + * + */ +export type PlayerModel = runtime.Types.Result.DefaultSelection + +export type AggregatePlayer = { + _count: PlayerCountAggregateOutputType | null + _avg: PlayerAvgAggregateOutputType | null + _sum: PlayerSumAggregateOutputType | null + _min: PlayerMinAggregateOutputType | null + _max: PlayerMaxAggregateOutputType | null +} + +export type PlayerAvgAggregateOutputType = { + currentGameId: number | null +} + +export type PlayerSumAggregateOutputType = { + currentGameId: number | null +} + +export type PlayerMinAggregateOutputType = { + playerId: string | null + createdAt: Date | null + currentGameId: number | null + state: $Enums.PlayerState | null + previousState: $Enums.PlayerState | null + userName: string | null +} + +export type PlayerMaxAggregateOutputType = { + playerId: string | null + createdAt: Date | null + currentGameId: number | null + state: $Enums.PlayerState | null + previousState: $Enums.PlayerState | null + userName: string | null +} + +export type PlayerCountAggregateOutputType = { + playerId: number + createdAt: number + currentGameId: number + state: number + previousState: number + userName: number + _all: number +} + + +export type PlayerAvgAggregateInputType = { + currentGameId?: true +} + +export type PlayerSumAggregateInputType = { + currentGameId?: true +} + +export type PlayerMinAggregateInputType = { + playerId?: true + createdAt?: true + currentGameId?: true + state?: true + previousState?: true + userName?: true +} + +export type PlayerMaxAggregateInputType = { + playerId?: true + createdAt?: true + currentGameId?: true + state?: true + previousState?: true + userName?: true +} + +export type PlayerCountAggregateInputType = { + playerId?: true + createdAt?: true + currentGameId?: true + state?: true + previousState?: true + userName?: true + _all?: true +} + +export type PlayerAggregateArgs = { + /** + * Filter which Player to aggregate. + */ + where?: Prisma.PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: Prisma.PlayerOrderByWithRelationInput | Prisma.PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players 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` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Players + **/ + _count?: true | PlayerCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PlayerAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PlayerSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PlayerMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PlayerMaxAggregateInputType +} + +export type GetPlayerAggregateType = { + [P in keyof T & keyof AggregatePlayer]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type PlayerGroupByArgs = { + where?: Prisma.PlayerWhereInput + orderBy?: Prisma.PlayerOrderByWithAggregationInput | Prisma.PlayerOrderByWithAggregationInput[] + by: Prisma.PlayerScalarFieldEnum[] | Prisma.PlayerScalarFieldEnum + having?: Prisma.PlayerScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PlayerCountAggregateInputType | true + _avg?: PlayerAvgAggregateInputType + _sum?: PlayerSumAggregateInputType + _min?: PlayerMinAggregateInputType + _max?: PlayerMaxAggregateInputType +} + +export type PlayerGroupByOutputType = { + playerId: string + createdAt: Date + currentGameId: number | null + state: $Enums.PlayerState + previousState: $Enums.PlayerState + userName: string + _count: PlayerCountAggregateOutputType | null + _avg: PlayerAvgAggregateOutputType | null + _sum: PlayerSumAggregateOutputType | null + _min: PlayerMinAggregateOutputType | null + _max: PlayerMaxAggregateOutputType | null +} + +type GetPlayerGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof PlayerGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type PlayerWhereInput = { + AND?: Prisma.PlayerWhereInput | Prisma.PlayerWhereInput[] + OR?: Prisma.PlayerWhereInput[] + NOT?: Prisma.PlayerWhereInput | Prisma.PlayerWhereInput[] + playerId?: Prisma.StringFilter<"Player"> | string + createdAt?: Prisma.DateTimeFilter<"Player"> | Date | string + currentGameId?: Prisma.IntNullableFilter<"Player"> | number | null + state?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + userName?: Prisma.StringFilter<"Player"> | string + currentGame?: Prisma.XOR | null + games?: Prisma.GameListRelationFilter +} + +export type PlayerOrderByWithRelationInput = { + playerId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + currentGameId?: Prisma.SortOrderInput | Prisma.SortOrder + state?: Prisma.SortOrder + previousState?: Prisma.SortOrder + userName?: Prisma.SortOrder + currentGame?: Prisma.GameOrderByWithRelationInput + games?: Prisma.GameOrderByRelationAggregateInput +} + +export type PlayerWhereUniqueInput = Prisma.AtLeast<{ + playerId?: string + AND?: Prisma.PlayerWhereInput | Prisma.PlayerWhereInput[] + OR?: Prisma.PlayerWhereInput[] + NOT?: Prisma.PlayerWhereInput | Prisma.PlayerWhereInput[] + createdAt?: Prisma.DateTimeFilter<"Player"> | Date | string + currentGameId?: Prisma.IntNullableFilter<"Player"> | number | null + state?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + userName?: Prisma.StringFilter<"Player"> | string + currentGame?: Prisma.XOR | null + games?: Prisma.GameListRelationFilter +}, "playerId"> + +export type PlayerOrderByWithAggregationInput = { + playerId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + currentGameId?: Prisma.SortOrderInput | Prisma.SortOrder + state?: Prisma.SortOrder + previousState?: Prisma.SortOrder + userName?: Prisma.SortOrder + _count?: Prisma.PlayerCountOrderByAggregateInput + _avg?: Prisma.PlayerAvgOrderByAggregateInput + _max?: Prisma.PlayerMaxOrderByAggregateInput + _min?: Prisma.PlayerMinOrderByAggregateInput + _sum?: Prisma.PlayerSumOrderByAggregateInput +} + +export type PlayerScalarWhereWithAggregatesInput = { + AND?: Prisma.PlayerScalarWhereWithAggregatesInput | Prisma.PlayerScalarWhereWithAggregatesInput[] + OR?: Prisma.PlayerScalarWhereWithAggregatesInput[] + NOT?: Prisma.PlayerScalarWhereWithAggregatesInput | Prisma.PlayerScalarWhereWithAggregatesInput[] + playerId?: Prisma.StringWithAggregatesFilter<"Player"> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Player"> | Date | string + currentGameId?: Prisma.IntNullableWithAggregatesFilter<"Player"> | number | null + state?: Prisma.EnumPlayerStateWithAggregatesFilter<"Player"> | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateWithAggregatesFilter<"Player"> | $Enums.PlayerState + userName?: Prisma.StringWithAggregatesFilter<"Player"> | string +} + +export type PlayerCreateInput = { + playerId: string + createdAt?: Date | string + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string + currentGame?: Prisma.GameCreateNestedOneWithoutPlayersInput + games?: Prisma.GameCreateNestedManyWithoutHostPlayerInput +} + +export type PlayerUncheckedCreateInput = { + playerId: string + createdAt?: Date | string + currentGameId?: number | null + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string + games?: Prisma.GameUncheckedCreateNestedManyWithoutHostPlayerInput +} + +export type PlayerUpdateInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string + currentGame?: Prisma.GameUpdateOneWithoutPlayersNestedInput + games?: Prisma.GameUpdateManyWithoutHostPlayerNestedInput +} + +export type PlayerUncheckedUpdateInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + currentGameId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string + games?: Prisma.GameUncheckedUpdateManyWithoutHostPlayerNestedInput +} + +export type PlayerCreateManyInput = { + playerId: string + createdAt?: Date | string + currentGameId?: number | null + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string +} + +export type PlayerUpdateManyMutationInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type PlayerUncheckedUpdateManyInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + currentGameId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type PlayerCountOrderByAggregateInput = { + playerId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + currentGameId?: Prisma.SortOrder + state?: Prisma.SortOrder + previousState?: Prisma.SortOrder + userName?: Prisma.SortOrder +} + +export type PlayerAvgOrderByAggregateInput = { + currentGameId?: Prisma.SortOrder +} + +export type PlayerMaxOrderByAggregateInput = { + playerId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + currentGameId?: Prisma.SortOrder + state?: Prisma.SortOrder + previousState?: Prisma.SortOrder + userName?: Prisma.SortOrder +} + +export type PlayerMinOrderByAggregateInput = { + playerId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + currentGameId?: Prisma.SortOrder + state?: Prisma.SortOrder + previousState?: Prisma.SortOrder + userName?: Prisma.SortOrder +} + +export type PlayerSumOrderByAggregateInput = { + currentGameId?: Prisma.SortOrder +} + +export type PlayerScalarRelationFilter = { + is?: Prisma.PlayerWhereInput + isNot?: Prisma.PlayerWhereInput +} + +export type PlayerListRelationFilter = { + every?: Prisma.PlayerWhereInput + some?: Prisma.PlayerWhereInput + none?: Prisma.PlayerWhereInput +} + +export type PlayerOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type EnumPlayerStateFieldUpdateOperationsInput = { + set?: $Enums.PlayerState +} + +export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type PlayerCreateNestedOneWithoutGamesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutGamesInput + connect?: Prisma.PlayerWhereUniqueInput +} + +export type PlayerCreateNestedManyWithoutCurrentGameInput = { + create?: Prisma.XOR | Prisma.PlayerCreateWithoutCurrentGameInput[] | Prisma.PlayerUncheckedCreateWithoutCurrentGameInput[] + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutCurrentGameInput | Prisma.PlayerCreateOrConnectWithoutCurrentGameInput[] + createMany?: Prisma.PlayerCreateManyCurrentGameInputEnvelope + connect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] +} + +export type PlayerUncheckedCreateNestedManyWithoutCurrentGameInput = { + create?: Prisma.XOR | Prisma.PlayerCreateWithoutCurrentGameInput[] | Prisma.PlayerUncheckedCreateWithoutCurrentGameInput[] + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutCurrentGameInput | Prisma.PlayerCreateOrConnectWithoutCurrentGameInput[] + createMany?: Prisma.PlayerCreateManyCurrentGameInputEnvelope + connect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] +} + +export type PlayerUpdateOneRequiredWithoutGamesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutGamesInput + upsert?: Prisma.PlayerUpsertWithoutGamesInput + connect?: Prisma.PlayerWhereUniqueInput + update?: Prisma.XOR, Prisma.PlayerUncheckedUpdateWithoutGamesInput> +} + +export type PlayerUpdateManyWithoutCurrentGameNestedInput = { + create?: Prisma.XOR | Prisma.PlayerCreateWithoutCurrentGameInput[] | Prisma.PlayerUncheckedCreateWithoutCurrentGameInput[] + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutCurrentGameInput | Prisma.PlayerCreateOrConnectWithoutCurrentGameInput[] + upsert?: Prisma.PlayerUpsertWithWhereUniqueWithoutCurrentGameInput | Prisma.PlayerUpsertWithWhereUniqueWithoutCurrentGameInput[] + createMany?: Prisma.PlayerCreateManyCurrentGameInputEnvelope + set?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + disconnect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + delete?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + connect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + update?: Prisma.PlayerUpdateWithWhereUniqueWithoutCurrentGameInput | Prisma.PlayerUpdateWithWhereUniqueWithoutCurrentGameInput[] + updateMany?: Prisma.PlayerUpdateManyWithWhereWithoutCurrentGameInput | Prisma.PlayerUpdateManyWithWhereWithoutCurrentGameInput[] + deleteMany?: Prisma.PlayerScalarWhereInput | Prisma.PlayerScalarWhereInput[] +} + +export type PlayerUncheckedUpdateManyWithoutCurrentGameNestedInput = { + create?: Prisma.XOR | Prisma.PlayerCreateWithoutCurrentGameInput[] | Prisma.PlayerUncheckedCreateWithoutCurrentGameInput[] + connectOrCreate?: Prisma.PlayerCreateOrConnectWithoutCurrentGameInput | Prisma.PlayerCreateOrConnectWithoutCurrentGameInput[] + upsert?: Prisma.PlayerUpsertWithWhereUniqueWithoutCurrentGameInput | Prisma.PlayerUpsertWithWhereUniqueWithoutCurrentGameInput[] + createMany?: Prisma.PlayerCreateManyCurrentGameInputEnvelope + set?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + disconnect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + delete?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + connect?: Prisma.PlayerWhereUniqueInput | Prisma.PlayerWhereUniqueInput[] + update?: Prisma.PlayerUpdateWithWhereUniqueWithoutCurrentGameInput | Prisma.PlayerUpdateWithWhereUniqueWithoutCurrentGameInput[] + updateMany?: Prisma.PlayerUpdateManyWithWhereWithoutCurrentGameInput | Prisma.PlayerUpdateManyWithWhereWithoutCurrentGameInput[] + deleteMany?: Prisma.PlayerScalarWhereInput | Prisma.PlayerScalarWhereInput[] +} + +export type PlayerCreateWithoutGamesInput = { + playerId: string + createdAt?: Date | string + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string + currentGame?: Prisma.GameCreateNestedOneWithoutPlayersInput +} + +export type PlayerUncheckedCreateWithoutGamesInput = { + playerId: string + createdAt?: Date | string + currentGameId?: number | null + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string +} + +export type PlayerCreateOrConnectWithoutGamesInput = { + where: Prisma.PlayerWhereUniqueInput + create: Prisma.XOR +} + +export type PlayerCreateWithoutCurrentGameInput = { + playerId: string + createdAt?: Date | string + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string + games?: Prisma.GameCreateNestedManyWithoutHostPlayerInput +} + +export type PlayerUncheckedCreateWithoutCurrentGameInput = { + playerId: string + createdAt?: Date | string + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string + games?: Prisma.GameUncheckedCreateNestedManyWithoutHostPlayerInput +} + +export type PlayerCreateOrConnectWithoutCurrentGameInput = { + where: Prisma.PlayerWhereUniqueInput + create: Prisma.XOR +} + +export type PlayerCreateManyCurrentGameInputEnvelope = { + data: Prisma.PlayerCreateManyCurrentGameInput | Prisma.PlayerCreateManyCurrentGameInput[] + skipDuplicates?: boolean +} + +export type PlayerUpsertWithoutGamesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.PlayerWhereInput +} + +export type PlayerUpdateToOneWithWhereWithoutGamesInput = { + where?: Prisma.PlayerWhereInput + data: Prisma.XOR +} + +export type PlayerUpdateWithoutGamesInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string + currentGame?: Prisma.GameUpdateOneWithoutPlayersNestedInput +} + +export type PlayerUncheckedUpdateWithoutGamesInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + currentGameId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type PlayerUpsertWithWhereUniqueWithoutCurrentGameInput = { + where: Prisma.PlayerWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type PlayerUpdateWithWhereUniqueWithoutCurrentGameInput = { + where: Prisma.PlayerWhereUniqueInput + data: Prisma.XOR +} + +export type PlayerUpdateManyWithWhereWithoutCurrentGameInput = { + where: Prisma.PlayerScalarWhereInput + data: Prisma.XOR +} + +export type PlayerScalarWhereInput = { + AND?: Prisma.PlayerScalarWhereInput | Prisma.PlayerScalarWhereInput[] + OR?: Prisma.PlayerScalarWhereInput[] + NOT?: Prisma.PlayerScalarWhereInput | Prisma.PlayerScalarWhereInput[] + playerId?: Prisma.StringFilter<"Player"> | string + createdAt?: Prisma.DateTimeFilter<"Player"> | Date | string + currentGameId?: Prisma.IntNullableFilter<"Player"> | number | null + state?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFilter<"Player"> | $Enums.PlayerState + userName?: Prisma.StringFilter<"Player"> | string +} + +export type PlayerCreateManyCurrentGameInput = { + playerId: string + createdAt?: Date | string + state?: $Enums.PlayerState + previousState?: $Enums.PlayerState + userName: string +} + +export type PlayerUpdateWithoutCurrentGameInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string + games?: Prisma.GameUpdateManyWithoutHostPlayerNestedInput +} + +export type PlayerUncheckedUpdateWithoutCurrentGameInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string + games?: Prisma.GameUncheckedUpdateManyWithoutHostPlayerNestedInput +} + +export type PlayerUncheckedUpdateManyWithoutCurrentGameInput = { + playerId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + state?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + previousState?: Prisma.EnumPlayerStateFieldUpdateOperationsInput | $Enums.PlayerState + userName?: Prisma.StringFieldUpdateOperationsInput | string +} + + +/** + * Count Type PlayerCountOutputType + */ + +export type PlayerCountOutputType = { + games: number +} + +export type PlayerCountOutputTypeSelect = { + games?: boolean | PlayerCountOutputTypeCountGamesArgs +} + +/** + * PlayerCountOutputType without action + */ +export type PlayerCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PlayerCountOutputType + */ + select?: Prisma.PlayerCountOutputTypeSelect | null +} + +/** + * PlayerCountOutputType without action + */ +export type PlayerCountOutputTypeCountGamesArgs = { + where?: Prisma.GameWhereInput +} + + +export type PlayerSelect = runtime.Types.Extensions.GetSelect<{ + playerId?: boolean + createdAt?: boolean + currentGameId?: boolean + state?: boolean + previousState?: boolean + userName?: boolean + currentGame?: boolean | Prisma.Player$currentGameArgs + games?: boolean | Prisma.Player$gamesArgs + _count?: boolean | Prisma.PlayerCountOutputTypeDefaultArgs +}, ExtArgs["result"]["player"]> + +export type PlayerSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + playerId?: boolean + createdAt?: boolean + currentGameId?: boolean + state?: boolean + previousState?: boolean + userName?: boolean + currentGame?: boolean | Prisma.Player$currentGameArgs +}, ExtArgs["result"]["player"]> + +export type PlayerSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + playerId?: boolean + createdAt?: boolean + currentGameId?: boolean + state?: boolean + previousState?: boolean + userName?: boolean + currentGame?: boolean | Prisma.Player$currentGameArgs +}, ExtArgs["result"]["player"]> + +export type PlayerSelectScalar = { + playerId?: boolean + createdAt?: boolean + currentGameId?: boolean + state?: boolean + previousState?: boolean + userName?: boolean +} + +export type PlayerOmit = runtime.Types.Extensions.GetOmit<"playerId" | "createdAt" | "currentGameId" | "state" | "previousState" | "userName", ExtArgs["result"]["player"]> +export type PlayerInclude = { + currentGame?: boolean | Prisma.Player$currentGameArgs + games?: boolean | Prisma.Player$gamesArgs + _count?: boolean | Prisma.PlayerCountOutputTypeDefaultArgs +} +export type PlayerIncludeCreateManyAndReturn = { + currentGame?: boolean | Prisma.Player$currentGameArgs +} +export type PlayerIncludeUpdateManyAndReturn = { + currentGame?: boolean | Prisma.Player$currentGameArgs +} + +export type $PlayerPayload = { + name: "Player" + objects: { + currentGame: Prisma.$GamePayload | null + games: Prisma.$GamePayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + playerId: string + createdAt: Date + currentGameId: number | null + state: $Enums.PlayerState + previousState: $Enums.PlayerState + userName: string + }, ExtArgs["result"]["player"]> + composites: {} +} + +export type PlayerGetPayload = runtime.Types.Result.GetResult + +export type PlayerCountArgs = + Omit & { + select?: PlayerCountAggregateInputType | true + } + +export interface PlayerDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Player'], meta: { name: 'Player' } } + /** + * Find zero or one Player that matches the filter. + * @param {PlayerFindUniqueArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Player that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PlayerFindUniqueOrThrowArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Player 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 {PlayerFindFirstArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Player that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code 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 {PlayerFindFirstOrThrowArgs} args - Arguments to find a Player + * @example + * // Get one Player + * const player = await prisma.player.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Players 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 {PlayerFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Players + * const players = await prisma.player.findMany() + * + * // Get first 10 Players + * const players = await prisma.player.findMany({ take: 10 }) + * + * // Only select the `playerId` + * const playerWithPlayerIdOnly = await prisma.player.findMany({ select: { playerId: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Player. + * @param {PlayerCreateArgs} args - Arguments to create a Player. + * @example + * // Create one Player + * const Player = await prisma.player.create({ + * data: { + * // ... data to create a Player + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Players. + * @param {PlayerCreateManyArgs} args - Arguments to create many Players. + * @example + * // Create many Players + * const player = await prisma.player.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Players and returns the data saved in the database. + * @param {PlayerCreateManyAndReturnArgs} args - Arguments to create many Players. + * @example + * // Create many Players + * const player = await prisma.player.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Players and only return the `playerId` + * const playerWithPlayerIdOnly = await prisma.player.createManyAndReturn({ + * select: { playerId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Player. + * @param {PlayerDeleteArgs} args - Arguments to delete one Player. + * @example + * // Delete one Player + * const Player = await prisma.player.delete({ + * where: { + * // ... filter to delete one Player + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Player. + * @param {PlayerUpdateArgs} args - Arguments to update one Player. + * @example + * // Update one Player + * const player = await prisma.player.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Players. + * @param {PlayerDeleteManyArgs} args - Arguments to filter Players to delete. + * @example + * // Delete a few Players + * const { count } = await prisma.player.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Players. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Players + * const player = await prisma.player.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Players and returns the data updated in the database. + * @param {PlayerUpdateManyAndReturnArgs} args - Arguments to update many Players. + * @example + * // Update many Players + * const player = await prisma.player.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Players and only return the `playerId` + * const playerWithPlayerIdOnly = await prisma.player.updateManyAndReturn({ + * select: { playerId: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Player. + * @param {PlayerUpsertArgs} args - Arguments to update or create a Player. + * @example + * // Update or create a Player + * const player = await prisma.player.upsert({ + * create: { + * // ... data to create a Player + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Player we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PlayerClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Players. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerCountArgs} args - Arguments to filter Players to count. + * @example + * // Count the number of Players + * const count = await prisma.player.count({ + * where: { + * // ... the filter for the Players we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Player. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Player. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PlayerGroupByArgs} 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 PlayerGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: PlayerGroupByArgs['orderBy'] } + : { orderBy?: PlayerGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPlayerGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Player model + */ +readonly fields: PlayerFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Player. + * 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 interface Prisma__PlayerClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + currentGame = {}>(args?: Prisma.Subset>): Prisma.Prisma__GameClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + games = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Player model + */ +export interface PlayerFieldRefs { + readonly playerId: Prisma.FieldRef<"Player", 'String'> + readonly createdAt: Prisma.FieldRef<"Player", 'DateTime'> + readonly currentGameId: Prisma.FieldRef<"Player", 'Int'> + readonly state: Prisma.FieldRef<"Player", 'PlayerState'> + readonly previousState: Prisma.FieldRef<"Player", 'PlayerState'> + readonly userName: Prisma.FieldRef<"Player", 'String'> +} + + +// Custom InputTypes +/** + * Player findUnique + */ +export type PlayerFindUniqueArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where: Prisma.PlayerWhereUniqueInput +} + +/** + * Player findUniqueOrThrow + */ +export type PlayerFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where: Prisma.PlayerWhereUniqueInput +} + +/** + * Player findFirst + */ +export type PlayerFindFirstArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where?: Prisma.PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: Prisma.PlayerOrderByWithRelationInput | Prisma.PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Players. + */ + cursor?: Prisma.PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players 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` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Players. + */ + distinct?: Prisma.PlayerScalarFieldEnum | Prisma.PlayerScalarFieldEnum[] +} + +/** + * Player findFirstOrThrow + */ +export type PlayerFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter, which Player to fetch. + */ + where?: Prisma.PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: Prisma.PlayerOrderByWithRelationInput | Prisma.PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Players. + */ + cursor?: Prisma.PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players 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` Players. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Players. + */ + distinct?: Prisma.PlayerScalarFieldEnum | Prisma.PlayerScalarFieldEnum[] +} + +/** + * Player findMany + */ +export type PlayerFindManyArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter, which Players to fetch. + */ + where?: Prisma.PlayerWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Players to fetch. + */ + orderBy?: Prisma.PlayerOrderByWithRelationInput | Prisma.PlayerOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Players. + */ + cursor?: Prisma.PlayerWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Players 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` Players. + */ + skip?: number + distinct?: Prisma.PlayerScalarFieldEnum | Prisma.PlayerScalarFieldEnum[] +} + +/** + * Player create + */ +export type PlayerCreateArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * The data needed to create a Player. + */ + data: Prisma.XOR +} + +/** + * Player createMany + */ +export type PlayerCreateManyArgs = { + /** + * The data used to create many Players. + */ + data: Prisma.PlayerCreateManyInput | Prisma.PlayerCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Player createManyAndReturn + */ +export type PlayerCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * The data used to create many Players. + */ + data: Prisma.PlayerCreateManyInput | Prisma.PlayerCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerIncludeCreateManyAndReturn | null +} + +/** + * Player update + */ +export type PlayerUpdateArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * The data needed to update a Player. + */ + data: Prisma.XOR + /** + * Choose, which Player to update. + */ + where: Prisma.PlayerWhereUniqueInput +} + +/** + * Player updateMany + */ +export type PlayerUpdateManyArgs = { + /** + * The data used to update Players. + */ + data: Prisma.XOR + /** + * Filter which Players to update + */ + where?: Prisma.PlayerWhereInput + /** + * Limit how many Players to update. + */ + limit?: number +} + +/** + * Player updateManyAndReturn + */ +export type PlayerUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * The data used to update Players. + */ + data: Prisma.XOR + /** + * Filter which Players to update + */ + where?: Prisma.PlayerWhereInput + /** + * Limit how many Players to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerIncludeUpdateManyAndReturn | null +} + +/** + * Player upsert + */ +export type PlayerUpsertArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * The filter to search for the Player to update in case it exists. + */ + where: Prisma.PlayerWhereUniqueInput + /** + * In case the Player found by the `where` argument doesn't exist, create a new Player with this data. + */ + create: Prisma.XOR + /** + * In case the Player was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Player delete + */ +export type PlayerDeleteArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null + /** + * Filter which Player to delete. + */ + where: Prisma.PlayerWhereUniqueInput +} + +/** + * Player deleteMany + */ +export type PlayerDeleteManyArgs = { + /** + * Filter which Players to delete + */ + where?: Prisma.PlayerWhereInput + /** + * Limit how many Players to delete. + */ + limit?: number +} + +/** + * Player.currentGame + */ +export type Player$currentGameArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + where?: Prisma.GameWhereInput +} + +/** + * Player.games + */ +export type Player$gamesArgs = { + /** + * Select specific fields to fetch from the Game + */ + select?: Prisma.GameSelect | null + /** + * Omit specific fields from the Game + */ + omit?: Prisma.GameOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GameInclude | null + where?: Prisma.GameWhereInput + orderBy?: Prisma.GameOrderByWithRelationInput | Prisma.GameOrderByWithRelationInput[] + cursor?: Prisma.GameWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GameScalarFieldEnum | Prisma.GameScalarFieldEnum[] +} + +/** + * Player without action + */ +export type PlayerDefaultArgs = { + /** + * Select specific fields to fetch from the Player + */ + select?: Prisma.PlayerSelect | null + /** + * Omit specific fields from the Player + */ + omit?: Prisma.PlayerOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PlayerInclude | null +} diff --git a/src/generated/prisma/models/Poem.ts b/src/generated/prisma/models/Poem.ts new file mode 100644 index 0000000..9cdce73 --- /dev/null +++ b/src/generated/prisma/models/Poem.ts @@ -0,0 +1,1329 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Poem` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Poem + * + */ +export type PoemModel = runtime.Types.Result.DefaultSelection + +export type AggregatePoem = { + _count: PoemCountAggregateOutputType | null + _avg: PoemAvgAggregateOutputType | null + _sum: PoemSumAggregateOutputType | null + _min: PoemMinAggregateOutputType | null + _max: PoemMaxAggregateOutputType | null +} + +export type PoemAvgAggregateOutputType = { + poemId: number | null + gameId: number | null +} + +export type PoemSumAggregateOutputType = { + poemId: number | null + gameId: number | null +} + +export type PoemMinAggregateOutputType = { + poemId: number | null + createdAt: Date | null + gameId: number | null + finished: boolean | null +} + +export type PoemMaxAggregateOutputType = { + poemId: number | null + createdAt: Date | null + gameId: number | null + finished: boolean | null +} + +export type PoemCountAggregateOutputType = { + poemId: number + createdAt: number + gameId: number + finished: number + lines: number + _all: number +} + + +export type PoemAvgAggregateInputType = { + poemId?: true + gameId?: true +} + +export type PoemSumAggregateInputType = { + poemId?: true + gameId?: true +} + +export type PoemMinAggregateInputType = { + poemId?: true + createdAt?: true + gameId?: true + finished?: true +} + +export type PoemMaxAggregateInputType = { + poemId?: true + createdAt?: true + gameId?: true + finished?: true +} + +export type PoemCountAggregateInputType = { + poemId?: true + createdAt?: true + gameId?: true + finished?: true + lines?: true + _all?: true +} + +export type PoemAggregateArgs = { + /** + * Filter which Poem to aggregate. + */ + where?: Prisma.PoemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Poems to fetch. + */ + orderBy?: Prisma.PoemOrderByWithRelationInput | Prisma.PoemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.PoemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Poems 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` Poems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Poems + **/ + _count?: true | PoemCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PoemAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PoemSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PoemMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PoemMaxAggregateInputType +} + +export type GetPoemAggregateType = { + [P in keyof T & keyof AggregatePoem]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type PoemGroupByArgs = { + where?: Prisma.PoemWhereInput + orderBy?: Prisma.PoemOrderByWithAggregationInput | Prisma.PoemOrderByWithAggregationInput[] + by: Prisma.PoemScalarFieldEnum[] | Prisma.PoemScalarFieldEnum + having?: Prisma.PoemScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PoemCountAggregateInputType | true + _avg?: PoemAvgAggregateInputType + _sum?: PoemSumAggregateInputType + _min?: PoemMinAggregateInputType + _max?: PoemMaxAggregateInputType +} + +export type PoemGroupByOutputType = { + poemId: number + createdAt: Date + gameId: number + finished: boolean + lines: runtime.JsonValue + _count: PoemCountAggregateOutputType | null + _avg: PoemAvgAggregateOutputType | null + _sum: PoemSumAggregateOutputType | null + _min: PoemMinAggregateOutputType | null + _max: PoemMaxAggregateOutputType | null +} + +type GetPoemGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof PoemGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type PoemWhereInput = { + AND?: Prisma.PoemWhereInput | Prisma.PoemWhereInput[] + OR?: Prisma.PoemWhereInput[] + NOT?: Prisma.PoemWhereInput | Prisma.PoemWhereInput[] + poemId?: Prisma.IntFilter<"Poem"> | number + createdAt?: Prisma.DateTimeFilter<"Poem"> | Date | string + gameId?: Prisma.IntFilter<"Poem"> | number + finished?: Prisma.BoolFilter<"Poem"> | boolean + lines?: Prisma.JsonFilter<"Poem"> + game?: Prisma.XOR +} + +export type PoemOrderByWithRelationInput = { + poemId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + gameId?: Prisma.SortOrder + finished?: Prisma.SortOrder + lines?: Prisma.SortOrder + game?: Prisma.GameOrderByWithRelationInput +} + +export type PoemWhereUniqueInput = Prisma.AtLeast<{ + poemId?: number + gameId?: number + AND?: Prisma.PoemWhereInput | Prisma.PoemWhereInput[] + OR?: Prisma.PoemWhereInput[] + NOT?: Prisma.PoemWhereInput | Prisma.PoemWhereInput[] + createdAt?: Prisma.DateTimeFilter<"Poem"> | Date | string + finished?: Prisma.BoolFilter<"Poem"> | boolean + lines?: Prisma.JsonFilter<"Poem"> + game?: Prisma.XOR +}, "poemId" | "gameId"> + +export type PoemOrderByWithAggregationInput = { + poemId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + gameId?: Prisma.SortOrder + finished?: Prisma.SortOrder + lines?: Prisma.SortOrder + _count?: Prisma.PoemCountOrderByAggregateInput + _avg?: Prisma.PoemAvgOrderByAggregateInput + _max?: Prisma.PoemMaxOrderByAggregateInput + _min?: Prisma.PoemMinOrderByAggregateInput + _sum?: Prisma.PoemSumOrderByAggregateInput +} + +export type PoemScalarWhereWithAggregatesInput = { + AND?: Prisma.PoemScalarWhereWithAggregatesInput | Prisma.PoemScalarWhereWithAggregatesInput[] + OR?: Prisma.PoemScalarWhereWithAggregatesInput[] + NOT?: Prisma.PoemScalarWhereWithAggregatesInput | Prisma.PoemScalarWhereWithAggregatesInput[] + poemId?: Prisma.IntWithAggregatesFilter<"Poem"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Poem"> | Date | string + gameId?: Prisma.IntWithAggregatesFilter<"Poem"> | number + finished?: Prisma.BoolWithAggregatesFilter<"Poem"> | boolean + lines?: Prisma.JsonWithAggregatesFilter<"Poem"> +} + +export type PoemCreateInput = { + createdAt?: Date | string + finished?: boolean + lines: Prisma.JsonNullValueInput | runtime.InputJsonValue + game: Prisma.GameCreateNestedOneWithoutPoemInput +} + +export type PoemUncheckedCreateInput = { + poemId?: number + createdAt?: Date | string + gameId: number + finished?: boolean + lines: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemUpdateInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue + game?: Prisma.GameUpdateOneRequiredWithoutPoemNestedInput +} + +export type PoemUncheckedUpdateInput = { + poemId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + gameId?: Prisma.IntFieldUpdateOperationsInput | number + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemCreateManyInput = { + poemId?: number + createdAt?: Date | string + gameId: number + finished?: boolean + lines: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemUpdateManyMutationInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemUncheckedUpdateManyInput = { + poemId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + gameId?: Prisma.IntFieldUpdateOperationsInput | number + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemNullableScalarRelationFilter = { + is?: Prisma.PoemWhereInput | null + isNot?: Prisma.PoemWhereInput | null +} + +export type PoemCountOrderByAggregateInput = { + poemId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + gameId?: Prisma.SortOrder + finished?: Prisma.SortOrder + lines?: Prisma.SortOrder +} + +export type PoemAvgOrderByAggregateInput = { + poemId?: Prisma.SortOrder + gameId?: Prisma.SortOrder +} + +export type PoemMaxOrderByAggregateInput = { + poemId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + gameId?: Prisma.SortOrder + finished?: Prisma.SortOrder +} + +export type PoemMinOrderByAggregateInput = { + poemId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + gameId?: Prisma.SortOrder + finished?: Prisma.SortOrder +} + +export type PoemSumOrderByAggregateInput = { + poemId?: Prisma.SortOrder + gameId?: Prisma.SortOrder +} + +export type PoemCreateNestedOneWithoutGameInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoemCreateOrConnectWithoutGameInput + connect?: Prisma.PoemWhereUniqueInput +} + +export type PoemUncheckedCreateNestedOneWithoutGameInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoemCreateOrConnectWithoutGameInput + connect?: Prisma.PoemWhereUniqueInput +} + +export type PoemUpdateOneWithoutGameNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoemCreateOrConnectWithoutGameInput + upsert?: Prisma.PoemUpsertWithoutGameInput + disconnect?: Prisma.PoemWhereInput | boolean + delete?: Prisma.PoemWhereInput | boolean + connect?: Prisma.PoemWhereUniqueInput + update?: Prisma.XOR, Prisma.PoemUncheckedUpdateWithoutGameInput> +} + +export type PoemUncheckedUpdateOneWithoutGameNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PoemCreateOrConnectWithoutGameInput + upsert?: Prisma.PoemUpsertWithoutGameInput + disconnect?: Prisma.PoemWhereInput | boolean + delete?: Prisma.PoemWhereInput | boolean + connect?: Prisma.PoemWhereUniqueInput + update?: Prisma.XOR, Prisma.PoemUncheckedUpdateWithoutGameInput> +} + +export type PoemCreateWithoutGameInput = { + createdAt?: Date | string + finished?: boolean + lines: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemUncheckedCreateWithoutGameInput = { + poemId?: number + createdAt?: Date | string + finished?: boolean + lines: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemCreateOrConnectWithoutGameInput = { + where: Prisma.PoemWhereUniqueInput + create: Prisma.XOR +} + +export type PoemUpsertWithoutGameInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.PoemWhereInput +} + +export type PoemUpdateToOneWithWhereWithoutGameInput = { + where?: Prisma.PoemWhereInput + data: Prisma.XOR +} + +export type PoemUpdateWithoutGameInput = { + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + +export type PoemUncheckedUpdateWithoutGameInput = { + poemId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + finished?: Prisma.BoolFieldUpdateOperationsInput | boolean + lines?: Prisma.JsonNullValueInput | runtime.InputJsonValue +} + + + +export type PoemSelect = runtime.Types.Extensions.GetSelect<{ + poemId?: boolean + createdAt?: boolean + gameId?: boolean + finished?: boolean + lines?: boolean + game?: boolean | Prisma.GameDefaultArgs +}, ExtArgs["result"]["poem"]> + +export type PoemSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + poemId?: boolean + createdAt?: boolean + gameId?: boolean + finished?: boolean + lines?: boolean + game?: boolean | Prisma.GameDefaultArgs +}, ExtArgs["result"]["poem"]> + +export type PoemSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + poemId?: boolean + createdAt?: boolean + gameId?: boolean + finished?: boolean + lines?: boolean + game?: boolean | Prisma.GameDefaultArgs +}, ExtArgs["result"]["poem"]> + +export type PoemSelectScalar = { + poemId?: boolean + createdAt?: boolean + gameId?: boolean + finished?: boolean + lines?: boolean +} + +export type PoemOmit = runtime.Types.Extensions.GetOmit<"poemId" | "createdAt" | "gameId" | "finished" | "lines", ExtArgs["result"]["poem"]> +export type PoemInclude = { + game?: boolean | Prisma.GameDefaultArgs +} +export type PoemIncludeCreateManyAndReturn = { + game?: boolean | Prisma.GameDefaultArgs +} +export type PoemIncludeUpdateManyAndReturn = { + game?: boolean | Prisma.GameDefaultArgs +} + +export type $PoemPayload = { + name: "Poem" + objects: { + game: Prisma.$GamePayload + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + poemId: number + createdAt: Date + gameId: number + finished: boolean + lines: runtime.JsonValue + }, ExtArgs["result"]["poem"]> + composites: {} +} + +export type PoemGetPayload = runtime.Types.Result.GetResult + +export type PoemCountArgs = + Omit & { + select?: PoemCountAggregateInputType | true + } + +export interface PoemDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Poem'], meta: { name: 'Poem' } } + /** + * Find zero or one Poem that matches the filter. + * @param {PoemFindUniqueArgs} args - Arguments to find a Poem + * @example + * // Get one Poem + * const poem = await prisma.poem.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Poem that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PoemFindUniqueOrThrowArgs} args - Arguments to find a Poem + * @example + * // Get one Poem + * const poem = await prisma.poem.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Poem 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 {PoemFindFirstArgs} args - Arguments to find a Poem + * @example + * // Get one Poem + * const poem = await prisma.poem.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Poem that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code 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 {PoemFindFirstOrThrowArgs} args - Arguments to find a Poem + * @example + * // Get one Poem + * const poem = await prisma.poem.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Poems 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 {PoemFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Poems + * const poems = await prisma.poem.findMany() + * + * // Get first 10 Poems + * const poems = await prisma.poem.findMany({ take: 10 }) + * + * // Only select the `poemId` + * const poemWithPoemIdOnly = await prisma.poem.findMany({ select: { poemId: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Poem. + * @param {PoemCreateArgs} args - Arguments to create a Poem. + * @example + * // Create one Poem + * const Poem = await prisma.poem.create({ + * data: { + * // ... data to create a Poem + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Poems. + * @param {PoemCreateManyArgs} args - Arguments to create many Poems. + * @example + * // Create many Poems + * const poem = await prisma.poem.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Poems and returns the data saved in the database. + * @param {PoemCreateManyAndReturnArgs} args - Arguments to create many Poems. + * @example + * // Create many Poems + * const poem = await prisma.poem.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Poems and only return the `poemId` + * const poemWithPoemIdOnly = await prisma.poem.createManyAndReturn({ + * select: { poemId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Poem. + * @param {PoemDeleteArgs} args - Arguments to delete one Poem. + * @example + * // Delete one Poem + * const Poem = await prisma.poem.delete({ + * where: { + * // ... filter to delete one Poem + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Poem. + * @param {PoemUpdateArgs} args - Arguments to update one Poem. + * @example + * // Update one Poem + * const poem = await prisma.poem.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Poems. + * @param {PoemDeleteManyArgs} args - Arguments to filter Poems to delete. + * @example + * // Delete a few Poems + * const { count } = await prisma.poem.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Poems. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PoemUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Poems + * const poem = await prisma.poem.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Poems and returns the data updated in the database. + * @param {PoemUpdateManyAndReturnArgs} args - Arguments to update many Poems. + * @example + * // Update many Poems + * const poem = await prisma.poem.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Poems and only return the `poemId` + * const poemWithPoemIdOnly = await prisma.poem.updateManyAndReturn({ + * select: { poemId: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Poem. + * @param {PoemUpsertArgs} args - Arguments to update or create a Poem. + * @example + * // Update or create a Poem + * const poem = await prisma.poem.upsert({ + * create: { + * // ... data to create a Poem + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Poem we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PoemClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Poems. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PoemCountArgs} args - Arguments to filter Poems to count. + * @example + * // Count the number of Poems + * const count = await prisma.poem.count({ + * where: { + * // ... the filter for the Poems we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Poem. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PoemAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Poem. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PoemGroupByArgs} 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 PoemGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: PoemGroupByArgs['orderBy'] } + : { orderBy?: PoemGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPoemGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Poem model + */ +readonly fields: PoemFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Poem. + * 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 interface Prisma__PoemClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + game = {}>(args?: Prisma.Subset>): Prisma.Prisma__GameClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise + /** + * 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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Poem model + */ +export interface PoemFieldRefs { + readonly poemId: Prisma.FieldRef<"Poem", 'Int'> + readonly createdAt: Prisma.FieldRef<"Poem", 'DateTime'> + readonly gameId: Prisma.FieldRef<"Poem", 'Int'> + readonly finished: Prisma.FieldRef<"Poem", 'Boolean'> + readonly lines: Prisma.FieldRef<"Poem", 'Json'> +} + + +// Custom InputTypes +/** + * Poem findUnique + */ +export type PoemFindUniqueArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter, which Poem to fetch. + */ + where: Prisma.PoemWhereUniqueInput +} + +/** + * Poem findUniqueOrThrow + */ +export type PoemFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter, which Poem to fetch. + */ + where: Prisma.PoemWhereUniqueInput +} + +/** + * Poem findFirst + */ +export type PoemFindFirstArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter, which Poem to fetch. + */ + where?: Prisma.PoemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Poems to fetch. + */ + orderBy?: Prisma.PoemOrderByWithRelationInput | Prisma.PoemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Poems. + */ + cursor?: Prisma.PoemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Poems 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` Poems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Poems. + */ + distinct?: Prisma.PoemScalarFieldEnum | Prisma.PoemScalarFieldEnum[] +} + +/** + * Poem findFirstOrThrow + */ +export type PoemFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter, which Poem to fetch. + */ + where?: Prisma.PoemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Poems to fetch. + */ + orderBy?: Prisma.PoemOrderByWithRelationInput | Prisma.PoemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Poems. + */ + cursor?: Prisma.PoemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Poems 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` Poems. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Poems. + */ + distinct?: Prisma.PoemScalarFieldEnum | Prisma.PoemScalarFieldEnum[] +} + +/** + * Poem findMany + */ +export type PoemFindManyArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter, which Poems to fetch. + */ + where?: Prisma.PoemWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Poems to fetch. + */ + orderBy?: Prisma.PoemOrderByWithRelationInput | Prisma.PoemOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Poems. + */ + cursor?: Prisma.PoemWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Poems 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` Poems. + */ + skip?: number + distinct?: Prisma.PoemScalarFieldEnum | Prisma.PoemScalarFieldEnum[] +} + +/** + * Poem create + */ +export type PoemCreateArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * The data needed to create a Poem. + */ + data: Prisma.XOR +} + +/** + * Poem createMany + */ +export type PoemCreateManyArgs = { + /** + * The data used to create many Poems. + */ + data: Prisma.PoemCreateManyInput | Prisma.PoemCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Poem createManyAndReturn + */ +export type PoemCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * The data used to create many Poems. + */ + data: Prisma.PoemCreateManyInput | Prisma.PoemCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemIncludeCreateManyAndReturn | null +} + +/** + * Poem update + */ +export type PoemUpdateArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * The data needed to update a Poem. + */ + data: Prisma.XOR + /** + * Choose, which Poem to update. + */ + where: Prisma.PoemWhereUniqueInput +} + +/** + * Poem updateMany + */ +export type PoemUpdateManyArgs = { + /** + * The data used to update Poems. + */ + data: Prisma.XOR + /** + * Filter which Poems to update + */ + where?: Prisma.PoemWhereInput + /** + * Limit how many Poems to update. + */ + limit?: number +} + +/** + * Poem updateManyAndReturn + */ +export type PoemUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * The data used to update Poems. + */ + data: Prisma.XOR + /** + * Filter which Poems to update + */ + where?: Prisma.PoemWhereInput + /** + * Limit how many Poems to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemIncludeUpdateManyAndReturn | null +} + +/** + * Poem upsert + */ +export type PoemUpsertArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * The filter to search for the Poem to update in case it exists. + */ + where: Prisma.PoemWhereUniqueInput + /** + * In case the Poem found by the `where` argument doesn't exist, create a new Poem with this data. + */ + create: Prisma.XOR + /** + * In case the Poem was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Poem delete + */ +export type PoemDeleteArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null + /** + * Filter which Poem to delete. + */ + where: Prisma.PoemWhereUniqueInput +} + +/** + * Poem deleteMany + */ +export type PoemDeleteManyArgs = { + /** + * Filter which Poems to delete + */ + where?: Prisma.PoemWhereInput + /** + * Limit how many Poems to delete. + */ + limit?: number +} + +/** + * Poem without action + */ +export type PoemDefaultArgs = { + /** + * Select specific fields to fetch from the Poem + */ + select?: Prisma.PoemSelect | null + /** + * Omit specific fields from the Poem + */ + omit?: Prisma.PoemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PoemInclude | null +} diff --git a/src/handlers/callbacks/begin-game.ts b/src/handlers/callbacks/begin-game.ts new file mode 100644 index 0000000..0b3889d --- /dev/null +++ b/src/handlers/callbacks/begin-game.ts @@ -0,0 +1,15 @@ +import { ONLY_HOST_CAN_START } from "const"; +import { getPlayer } from "data"; +import { messagePlayer } from "messaging"; +import { HandlerFn } from "types"; + +export const beginGameHandler: HandlerFn = async (ctx) => { + const player = getPlayer(ctx); + const game = getGameOrThrow(player.gameId); + const isHost = player.isHost(); + if (!isHost) { + await messagePlayer(player.id, player.state, ctx, ONLY_HOST_CAN_START); + return; + } + await game.startGame(ctx); +}; diff --git a/src/handlers/callbacks/create-game.ts b/src/handlers/callbacks/create-game.ts new file mode 100644 index 0000000..fec9755 --- /dev/null +++ b/src/handlers/callbacks/create-game.ts @@ -0,0 +1,8 @@ +import { getContextPlayerOrThrow } from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +export const createGameHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + await setPlayerState(player.id, ctx, PlayerState.LOBBY); +}; diff --git a/src/handlers/callbacks/delete-description.ts b/src/handlers/callbacks/delete-description.ts new file mode 100644 index 0000000..cb87e43 --- /dev/null +++ b/src/handlers/callbacks/delete-description.ts @@ -0,0 +1,12 @@ +import { getContextPlayerOrThrow, getGameOrThrow } from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +const { SETTING_UP_GAME } = PlayerState; + +export const deleteGameDescriptionHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + const game = getGameOrThrow(player.gameId); + game.setOptions({ description: undefined }); + await setPlayerState(player.id, ctx, SETTING_UP_GAME); +}; diff --git a/src/handlers/callbacks/exit-archive.ts b/src/handlers/callbacks/exit-archive.ts new file mode 100644 index 0000000..38b6064 --- /dev/null +++ b/src/handlers/callbacks/exit-archive.ts @@ -0,0 +1,3 @@ +import { HandlerFn } from "types"; + +export const exitArchiveHandler: HandlerFn = async (_ctx) => {}; diff --git a/src/handlers/callbacks/get-archived-poem.ts b/src/handlers/callbacks/get-archived-poem.ts new file mode 100644 index 0000000..019e8cb --- /dev/null +++ b/src/handlers/callbacks/get-archived-poem.ts @@ -0,0 +1,8 @@ +import { getContextPlayerOrCreate } from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +export const getArchivedPoemHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrCreate(ctx); + await setPlayerState(player.id, ctx, PlayerState.IN_ARCHIVES); +}; diff --git a/src/handlers/callbacks/index.ts b/src/handlers/callbacks/index.ts new file mode 100644 index 0000000..31016d4 --- /dev/null +++ b/src/handlers/callbacks/index.ts @@ -0,0 +1,13 @@ +export { beginGameHandler } from "./begin-game"; +export { createGameHandler } from "./create-game"; +export { deleteGameDescriptionHandler } from "./delete-description"; +export { exitArchiveHandler } from "./exit-archive"; +export { getArchivedPoemHandler } from "./get-archived-poem"; +export { leaveGameHandler } from "./leave-game"; +export { restartAppHandler } from "./restart-app"; +export { restartGameHandler } from "./restart-game"; +export { returnToPreviousStateHandler } from "./return-to-previous-state"; +export { setUpGameHandler } from "./set-up-game"; +export { tryJoinGameHandler } from "./try-join-game"; +export { tryLeaveGameHandler } from "./try-leave"; +export * from "./utils"; diff --git a/src/handlers/callbacks/leave-game.ts b/src/handlers/callbacks/leave-game.ts new file mode 100644 index 0000000..d937bc9 --- /dev/null +++ b/src/handlers/callbacks/leave-game.ts @@ -0,0 +1,8 @@ +import { getContextPlayerOrThrow, getGameOrThrow, leaveGame } from "data"; +import { HandlerFn } from "types"; + +export const leaveGameHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + const game = getGameOrThrow(player.gameId); + await leaveGame(ctx, game, player); +}; diff --git a/src/handlers/callbacks/restart-app.ts b/src/handlers/callbacks/restart-app.ts new file mode 100644 index 0000000..28f373c --- /dev/null +++ b/src/handlers/callbacks/restart-app.ts @@ -0,0 +1,8 @@ +import { getContextPlayerOrCreate } from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +export const restartAppHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrCreate(ctx); + await setPlayerState(player.id, ctx, PlayerState.START); +}; diff --git a/src/handlers/callbacks/restart-game.ts b/src/handlers/callbacks/restart-game.ts new file mode 100644 index 0000000..f827fdc --- /dev/null +++ b/src/handlers/callbacks/restart-game.ts @@ -0,0 +1,10 @@ +import { getContextPlayerOrThrow, getGameOrThrow } from "data"; +import { HandlerFn } from "types"; + +export const restartGameHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + const isHost = player.isHost(); + if (!isHost) return; + const game = getGameOrThrow(player.gameId); + await game.restart(ctx); +}; diff --git a/src/handlers/callbacks/return-to-previous-state.ts b/src/handlers/callbacks/return-to-previous-state.ts new file mode 100644 index 0000000..7c02b98 --- /dev/null +++ b/src/handlers/callbacks/return-to-previous-state.ts @@ -0,0 +1,17 @@ +import { getContextPlayerOrThrow, getGame, leaveGame } from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +export const returnToPreviousStateHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + const game = getGame(player.gameId); + if (game && player.state === PlayerState.SETTING_UP_GAME) { + await leaveGame(ctx, game, player); + return; + } + await setPlayerState( + player.id, + ctx, + player.previousState || PlayerState.START, + ); +}; diff --git a/src/handlers/callbacks/set-up-game.ts b/src/handlers/callbacks/set-up-game.ts new file mode 100644 index 0000000..bca2e79 --- /dev/null +++ b/src/handlers/callbacks/set-up-game.ts @@ -0,0 +1,8 @@ +import { addGame, getContextPlayerOrThrow, joinGame } from "data"; +import { HandlerFn } from "types"; + +export const setUpGameHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + const game = addGame(); + await joinGame(ctx, game, player, true); +}; diff --git a/src/handlers/callbacks/try-join-game.ts b/src/handlers/callbacks/try-join-game.ts new file mode 100644 index 0000000..0509966 --- /dev/null +++ b/src/handlers/callbacks/try-join-game.ts @@ -0,0 +1,6 @@ +import { ConversationState, HandlerFn } from "types"; +import { enterConversation } from "utils"; + +export const tryJoinGameHandler: HandlerFn = async (ctx) => { + await enterConversation(ConversationState.GET_GAME_ID, ctx); +}; diff --git a/src/handlers/callbacks/try-leave.ts b/src/handlers/callbacks/try-leave.ts new file mode 100644 index 0000000..4ce0216 --- /dev/null +++ b/src/handlers/callbacks/try-leave.ts @@ -0,0 +1,8 @@ +import { getContextPlayerOrThrow } from "data"; +import { setPlayerState } from "player-state/set-player-state"; +import { HandlerFn, PlayerState } from "types"; + +export const tryLeaveGameHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrThrow(ctx); + await setPlayerState(player.id, ctx, PlayerState.TRYING_LEAVE); +}; diff --git a/src/handlers/callbacks/utils/configure-option-handler.ts b/src/handlers/callbacks/utils/configure-option-handler.ts new file mode 100644 index 0000000..961cfa8 --- /dev/null +++ b/src/handlers/callbacks/utils/configure-option-handler.ts @@ -0,0 +1,11 @@ +import { gameOptionConversationMap } from "const"; +import { Context, GameOption } from "types"; +import { enterConversation } from "utils"; + +export const enterGameOptionConversation = async ( + ctx: Context, + option: GameOption +) => { + const conversation = gameOptionConversationMap[option]; + await enterConversation(conversation, ctx); +}; diff --git a/src/handlers/callbacks/utils/index.ts b/src/handlers/callbacks/utils/index.ts new file mode 100644 index 0000000..29e29c4 --- /dev/null +++ b/src/handlers/callbacks/utils/index.ts @@ -0,0 +1 @@ +export { enterGameOptionConversation } from "./configure-option-handler"; diff --git a/src/handlers/commands/index.ts b/src/handlers/commands/index.ts new file mode 100644 index 0000000..7fc19ee --- /dev/null +++ b/src/handlers/commands/index.ts @@ -0,0 +1,2 @@ +export { inspoHandler } from "./inspo"; +export { startHandler } from "./start"; diff --git a/src/handlers/commands/inspo.ts b/src/handlers/commands/inspo.ts new file mode 100644 index 0000000..43fead6 --- /dev/null +++ b/src/handlers/commands/inspo.ts @@ -0,0 +1,9 @@ +import { inspoRepo } from "const"; +import { getContextPlayerOrCreate } from "data"; +import { HandlerFn } from "types"; + +export const inspoHandler: HandlerFn = async (ctx) => { + const player = getContextPlayerOrCreate(ctx); + const inspo = inspoRepo[Math.floor(Math.random() * inspoRepo.length)]; + await ctx.api.sendMessage(player.id, inspo, { parse_mode: "MarkdownV2" }); +}; diff --git a/src/handlers/commands/start.ts b/src/handlers/commands/start.ts new file mode 100644 index 0000000..4c1bae1 --- /dev/null +++ b/src/handlers/commands/start.ts @@ -0,0 +1,46 @@ +import { Poem } from "classes"; +import { + addArchivedPoem, + addGame, + addPlayer, + getContextPlayerOrCreate, + getGame, + joinGame, + leaveGame, +} from "data"; +import { setPlayerState } from "player-state"; +import { HandlerFn, PlayerState } from "types"; + +const testingGame = false; +const testingArchive = false; + +export const startHandler: HandlerFn = async (ctx) => { + if (testingArchive) { + const testPoem = new Poem({ id: 1234, gameId: "TEST" }); + testPoem.addLine("Line", "Test author"); + addArchivedPoem(testPoem); + } + if (testingGame) { + const testGame = + getGame("test") || + addGame({ hostId: Number(process.env.MY_USERID), id: "TEST" }); + for (const testuser of [ + { + id: Number(process.env.MY_USERID), + name: process.env.MY_USERNAME ?? "You", + }, + { id: Number(process.env.TEST_USER_1_ID), name: "First Test User" }, + { id: Number(process.env.TEST_USER_2_ID), name: "Second Test User" }, + ]) { + const newPlayer = addPlayer({ id: testuser.id, userName: testuser.name }); + await joinGame(ctx, testGame, newPlayer); + } + return; + } + const player = getContextPlayerOrCreate(ctx); + const game = getGame(player.gameId); + if (game) { + await leaveGame(ctx, game, player); + } + await setPlayerState(player.id, ctx, PlayerState.START); +}; diff --git a/src/handlers/conversations/archived-poem-id.ts b/src/handlers/conversations/archived-poem-id.ts new file mode 100644 index 0000000..13f2ed6 --- /dev/null +++ b/src/handlers/conversations/archived-poem-id.ts @@ -0,0 +1,45 @@ +import { POEM_NOT_FOUND_WITH_ID, VALIDATION_POEM_ID_IS_NUMBER } from "const"; +import { getArchivedPoem, getContextPlayerOrCreate } from "data"; +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { BasicCallback, ConversationFn, PlayerState } from "types"; +import { getConversationValue } from "utils"; + +export const archivedPoemConversation: ConversationFn = async ( + conversation, + ctx, +) => { + const player = getContextPlayerOrCreate(ctx); + await getConversationValue(conversation, { + exitCallback: BasicCallback.EXIT_ARCHIVE, + doEach: async () => {}, + handleCancel: async () => { + await setPlayerState(player.id, ctx, PlayerState.START); + return; + }, + handleSuccess: async (poemId: string) => { + const poem = getArchivedPoem(poemId); + await poem?.sendToPlayer(player.id, ctx); + await setPlayerState(player.id, ctx, PlayerState.IN_ARCHIVES); + return; + }, + stay: true, + validate: async (poemId: string) => { + const poemIdNumber = Number(poemId); + let errorMessage = ""; + if (isNaN(poemIdNumber)) { + errorMessage = VALIDATION_POEM_ID_IS_NUMBER; + } else { + const poem = getArchivedPoem(poemId); + if (!poem) { + errorMessage = POEM_NOT_FOUND_WITH_ID(poemIdNumber); + } + } + if (errorMessage) { + await messagePlayer(player.id, player.state, ctx, errorMessage); + return false; + } + return true; + }, + }); +}; diff --git a/src/handlers/conversations/game-id.ts b/src/handlers/conversations/game-id.ts new file mode 100644 index 0000000..d48003e --- /dev/null +++ b/src/handlers/conversations/game-id.ts @@ -0,0 +1,48 @@ +import { GAME_NOT_FOUND_WITH_ID } from "const"; +import { + getContextPlayerOrThrow, + getGame, + getGameOrThrow, + joinGame, +} from "data"; +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { + BasicCallback, + ConversationFn, + ConversationState, + PlayerState, +} from "types"; +import { getConversationValue } from "utils"; + +export const gameIdConversation: ConversationFn = async (conversation, ctx) => { + const player = getContextPlayerOrThrow(ctx); + await getConversationValue(conversation, { + exitCallback: BasicCallback.RETURN_TO_PREVIOUS_STATE, + doEach: async () => { + await messagePlayer(player.id, ConversationState.GET_GAME_ID, ctx); + }, + handleCancel: async () => { + await setPlayerState(player.id, ctx, PlayerState.START); + return; + }, + handleSuccess: async (gameId: string) => { + const game = getGameOrThrow(gameId); + await joinGame(ctx, game, player); + return; + }, + validate: async (gameId: string) => { + const game = getGame(gameId); + if (game) { + return true; + } + await messagePlayer( + player.id, + player.state, + ctx, + GAME_NOT_FOUND_WITH_ID(gameId), + ); + return false; + }, + }); +}; diff --git a/src/handlers/conversations/game-options/game-description.ts b/src/handlers/conversations/game-options/game-description.ts new file mode 100644 index 0000000..c8d4def --- /dev/null +++ b/src/handlers/conversations/game-options/game-description.ts @@ -0,0 +1,40 @@ +import { getContextPlayerOrThrow, getGameOrThrow } from "data"; +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { + BasicCallback, + ConversationFn, + ConversationState, + PlayerState, +} from "types"; +import { getConversationValue } from "utils"; + +export const gameDescriptionConversation: ConversationFn = async ( + conversation, + ctx, +) => { + const player = getContextPlayerOrThrow(ctx); + const game = getGameOrThrow(player.gameId); + + await getConversationValue(conversation, { + exitCallback: BasicCallback.RETURN_TO_PREVIOUS_STATE, + doEach: async () => + await messagePlayer( + player.id, + ConversationState.GET_GAME_DESCRIPTION, + ctx, + ), + handleCancel: async () => { + await setPlayerState(player.id, ctx, PlayerState.SETTING_UP_GAME); + }, + handleSuccess: async (description: string) => { + game.setOptions({ description }); + await setPlayerState(player.id, ctx, PlayerState.SETTING_UP_GAME); + return; + }, + // eslint-disable-next-line require-await + validate: async (_description: string) => { + return true; + }, + }); +}; diff --git a/src/handlers/conversations/game-options/index.ts b/src/handlers/conversations/game-options/index.ts new file mode 100644 index 0000000..7476d3e --- /dev/null +++ b/src/handlers/conversations/game-options/index.ts @@ -0,0 +1 @@ +export { gameDescriptionConversation } from "./game-description"; diff --git a/src/handlers/conversations/index.ts b/src/handlers/conversations/index.ts new file mode 100644 index 0000000..09d8226 --- /dev/null +++ b/src/handlers/conversations/index.ts @@ -0,0 +1,3 @@ +export { archivedPoemConversation } from "./archived-poem-id"; +export { gameIdConversation } from "./game-id"; +export * from "./game-options"; diff --git a/src/handlers/data-callbacks/index.ts b/src/handlers/data-callbacks/index.ts new file mode 100644 index 0000000..94b7497 --- /dev/null +++ b/src/handlers/data-callbacks/index.ts @@ -0,0 +1 @@ +export { hidePoemMetaHandler, showPoemMetaHandler } from "./toggle-poem-meta"; diff --git a/src/handlers/data-callbacks/toggle-poem-meta.ts b/src/handlers/data-callbacks/toggle-poem-meta.ts new file mode 100644 index 0000000..7d32408 --- /dev/null +++ b/src/handlers/data-callbacks/toggle-poem-meta.ts @@ -0,0 +1,47 @@ +import { HIDE_SHOW_METADATA, POEM_NOT_FOUND } from "const"; +import { getArchivedPoem } from "data"; +import { InlineKeyboard } from "grammy"; +import { CallbackData, CallbackWithData, Context, DataHandlerFn } from "types"; +import { encodeCallbackData } from "utils"; + +const togglePoemMeta = async ( + ctx: Context, + data: CallbackData, + includeMeta?: boolean, +) => { + const poem = getArchivedPoem(data.id); + const keyboard = new InlineKeyboard().text( + HIDE_SHOW_METADATA(includeMeta), + encodeCallbackData( + includeMeta + ? CallbackWithData.HIDE_POEM_META + : CallbackWithData.SHOW_POEM_META, + data, + ), + ); + try { + const compiledPoem = poem?.compile(includeMeta); + if (compiledPoem) { + await ctx.editMessageText(compiledPoem ?? POEM_NOT_FOUND, { + parse_mode: "HTML", + reply_markup: keyboard, + }); + } + } catch (error) { + console.log(error); + } +}; + +export const showPoemMetaHandler: DataHandlerFn = async ( + ctx, + data: CallbackData, +) => { + await togglePoemMeta(ctx, data, true); +}; + +export const hidePoemMetaHandler: DataHandlerFn = async ( + ctx, + data: CallbackData, +) => { + await togglePoemMeta(ctx, data); +}; diff --git a/src/handlers/index.ts b/src/handlers/index.ts new file mode 100644 index 0000000..ecb4f5f --- /dev/null +++ b/src/handlers/index.ts @@ -0,0 +1,5 @@ +export * from "./callbacks"; +export * from "./commands"; +export * from "./conversations"; +export * from "./data-callbacks"; +export * from "./replies"; diff --git a/src/handlers/replies/archive-search.ts b/src/handlers/replies/archive-search.ts new file mode 100644 index 0000000..2389c23 --- /dev/null +++ b/src/handlers/replies/archive-search.ts @@ -0,0 +1,25 @@ +import { VALIDATION_POEM_ID_IS_NUMBER, POEM_NOT_FOUND_WITH_ID } from "const"; +import { getArchivedPoem, getContextPlayerOrCreate } from "data"; +import { messagePlayer } from "messaging"; +import { setPlayerState } from "player-state"; +import { PlayerState, ReplyHandlerFn } from "types"; + +export const archiveSearchHandler: ReplyHandlerFn = async (ctx, poemId) => { + const player = getContextPlayerOrCreate(ctx); + const poemIdNumber = Number(poemId); + let errorMessage = ""; + if (isNaN(poemIdNumber)) { + errorMessage = VALIDATION_POEM_ID_IS_NUMBER; + } else { + const poem = getArchivedPoem(poemId); + if (!poem) { + errorMessage = POEM_NOT_FOUND_WITH_ID(poemIdNumber); + } else { + await poem?.sendToPlayer(player.id, ctx); + } + } + if (errorMessage) { + await messagePlayer(player.id, player.state, ctx, errorMessage); + } + await setPlayerState(player.id, ctx, PlayerState.IN_ARCHIVES); +}; diff --git a/src/handlers/replies/index.ts b/src/handlers/replies/index.ts new file mode 100644 index 0000000..5950656 --- /dev/null +++ b/src/handlers/replies/index.ts @@ -0,0 +1 @@ +export * from "./writing"; diff --git a/src/handlers/replies/writing.ts b/src/handlers/replies/writing.ts new file mode 100644 index 0000000..48b2df0 --- /dev/null +++ b/src/handlers/replies/writing.ts @@ -0,0 +1,9 @@ +import { getContextPlayerOrThrow, getGameOrThrow } from "data"; +import { ReplyHandlerFn } from "types"; + +export const writingReplyHandler: ReplyHandlerFn = async (ctx, reply) => { + // TODO add validation + const player = getContextPlayerOrThrow(ctx); + const game = getGameOrThrow(player.gameId); + await game.addLine(ctx, reply, player); +}; diff --git a/src/lib/prisma.ts b/src/lib/prisma.ts new file mode 100644 index 0000000..72d37c9 --- /dev/null +++ b/src/lib/prisma.ts @@ -0,0 +1,9 @@ +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; +import { PrismaClient } from "../generated/prisma/client"; + +const connectionString = `${process.env.DATABASE_URL}`; + +const adapter = new PrismaBetterSqlite3({ url: connectionString }); +const prisma = new PrismaClient({ adapter }); + +export { prisma }; diff --git a/src/messaging/format-message.ts b/src/messaging/format-message.ts new file mode 100644 index 0000000..ccff350 --- /dev/null +++ b/src/messaging/format-message.ts @@ -0,0 +1,40 @@ +// https://core.telegram.org/bots/api#formatting-options +import { ParseMode } from "grammy/types"; + +// TODO figure out how to use telegram's markdown because it doesn't seem to work +export const sanitizeMarkdownV2 = (markdown: string) => { + const regex = new RegExp(/[_*[\]()~`>#+-=|{}.!]/g); + const sanitizedMarkdown = markdown; + return sanitizedMarkdown.replace(regex, "\\$&"); +}; + +export const sanitizeHtml = (html: string) => { + const sanitizedHtml = html; + sanitizedHtml.replaceAll("<", "<"); + sanitizedHtml.replaceAll(">", ">"); + sanitizedHtml.replaceAll("&", "&"); + return sanitizedHtml; +}; + +export const sanitizeText = ( + str: string, + parseMode: ParseMode = "MarkdownV2", +): string => { + switch (parseMode) { + case "Markdown": + return str; + case "MarkdownV2": + return sanitizeMarkdownV2(str); + case "HTML": + return sanitizeHtml(str); + } +}; + +export const getSanitizedMessage = ( + msg: string, + parseMode: ParseMode = "MarkdownV2", +) => { + const sanitizedMessage = sanitizeText(msg, parseMode); + const newMessage = `${sanitizedMessage.trim()}`; + return newMessage; +}; diff --git a/src/messaging/get-commands.ts b/src/messaging/get-commands.ts new file mode 100644 index 0000000..8df520a --- /dev/null +++ b/src/messaging/get-commands.ts @@ -0,0 +1,7 @@ +import { Player } from "classes"; +import { MessagingState } from "types"; +import { stateCommandsMap } from "const/maps/state-keyboard-button-map"; + +export const getCommandsForState = (player: Player, state: MessagingState) => { + return stateCommandsMap[player.state]; +}; diff --git a/src/messaging/get-message.ts b/src/messaging/get-message.ts new file mode 100644 index 0000000..e76b633 --- /dev/null +++ b/src/messaging/get-message.ts @@ -0,0 +1,11 @@ +import { Player } from "classes"; +import { stateMessageMap } from "const"; +import { MessagingState } from "types"; + +export const getMessageForState = (player: Player, state: MessagingState) => { + const messageFn = stateMessageMap[state]; + if (!messageFn) { + return ""; + } + return messageFn(player); +}; diff --git a/src/messaging/index.ts b/src/messaging/index.ts new file mode 100644 index 0000000..96cc52f --- /dev/null +++ b/src/messaging/index.ts @@ -0,0 +1,2 @@ +export * from "./format-message"; +export { messagePlayer } from "./message-player"; diff --git a/src/messaging/message-player.ts b/src/messaging/message-player.ts new file mode 100644 index 0000000..4d7d44e --- /dev/null +++ b/src/messaging/message-player.ts @@ -0,0 +1,32 @@ +import { ParseMode } from "grammy/types"; +import { getPlayerOrThrow } from "data"; +import { Context, MessagingState } from "types"; +import { getSanitizedMessage } from "./format-message"; +import { getMessageForState } from "./get-message"; +import { getKeyboardForState } from "./get-commands"; +import { getReplyMarkup } from "utils"; + +export const messagePlayer = async ( + playerId: number, + state: MessagingState, + ctx: Context, + customString = "", +) => { + const player = getPlayerOrThrow(playerId); + const stateMessage = customString || getMessageForState(player, state); + if (!stateMessage) return; + const keyboard = getKeyboardForState(player, state); + + const formattedMessage = getSanitizedMessage(stateMessage); + + const replyMarkup = getReplyMarkup({ keyboard, player, state }); + + try { + await ctx.api.sendMessage(player.id, formattedMessage, { + parse_mode: "MarkdownV2" as ParseMode, + reply_markup: replyMarkup, + }); + } catch (error) { + console.log(error); + } +}; diff --git a/src/player-state/index.ts b/src/player-state/index.ts new file mode 100644 index 0000000..215f145 --- /dev/null +++ b/src/player-state/index.ts @@ -0,0 +1 @@ +export { setPlayerState } from "./set-player-state"; diff --git a/src/player-state/set-player-state.ts b/src/player-state/set-player-state.ts new file mode 100644 index 0000000..4764e54 --- /dev/null +++ b/src/player-state/set-player-state.ts @@ -0,0 +1,60 @@ +import { PlayerState } from "generated/prisma/enums"; +import { + getPlayer, + getPlayers, + updatePlayerState, + updatePlayerStates, +} from "data"; +import { messagePlayer } from "messaging"; +import { Context, StateConfig } from "types"; +import { stateRegistry } from "./states/registry"; +import { PlayerModel } from "generated/prisma/models"; + +const executeStateChanges = async ( + player: PlayerModel, + oldState: PlayerState, + newState: PlayerState, + ctx: Context, + noMessage?: boolean, +) => { + console.log( + `transitioning player ${player.userName} from ${oldState} to ${newState}`, + ); + const oldConfig: StateConfig | undefined = stateRegistry[oldState!]; + const newConfig = stateRegistry[newState]; + + await oldConfig?.exit(player); + + if (!noMessage) await messagePlayer(player.playerId, newState, ctx); + await newConfig.enter(player); +}; + +export const setPlayerState = async ( + playerId: number, + ctx: Context, + newState: PlayerState, + noMessage?: boolean, +) => { + const player = await getPlayer(playerId); + const { state: oldState, userName } = player; + console.log( + `transitioning player ${userName} from ${oldState} to ${newState}`, + ); + await updatePlayerState(playerId, newState); + executeStateChanges(player, oldState, newState, ctx, noMessage); +}; + +export const setPlayerStates = async ( + playerIds: number[], + ctx: Context, + newState: PlayerState, + noMessage?: boolean, +) => { + const players = await getPlayers(playerIds); + const oldStates = players.map((p) => p.state); + await updatePlayerStates(playerIds, newState); + for (const [i, player] of players.entries()) { + const oldState = oldStates[i]; + await executeStateChanges(player, oldState, newState, ctx, noMessage); + } +}; diff --git a/src/player-state/states/default.ts b/src/player-state/states/default.ts new file mode 100644 index 0000000..3c26f95 --- /dev/null +++ b/src/player-state/states/default.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const defaultState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/in-archives.ts b/src/player-state/states/in-archives.ts new file mode 100644 index 0000000..b415785 --- /dev/null +++ b/src/player-state/states/in-archives.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const inArchivesState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/lobby.ts b/src/player-state/states/lobby.ts new file mode 100644 index 0000000..c15af7a --- /dev/null +++ b/src/player-state/states/lobby.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const lobbyState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/post-game.ts b/src/player-state/states/post-game.ts new file mode 100644 index 0000000..7fc502e --- /dev/null +++ b/src/player-state/states/post-game.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const postGameState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/registry.ts b/src/player-state/states/registry.ts new file mode 100644 index 0000000..ec51ea1 --- /dev/null +++ b/src/player-state/states/registry.ts @@ -0,0 +1,29 @@ +import { PlayerState } from "generated/prisma/enums"; +import { StateConfig } from "types"; +import { defaultState } from "./default"; +import { lobbyState } from "./lobby"; +import { settingUpGameState } from "./setting-up-game"; +import { spectatingState } from "./spectating"; +import { waitingAfterWritingState } from "./waiting-after-writing"; +import { waitingToWriteState } from "./waiting-to-write"; +import { typingState } from "./typing"; +import { tryingLeaveState } from "./trying-leave"; +import { postGameState } from "./post-game"; +import { viewingArchivedPoemState } from "./viewing-archived-poem"; +import { writingState } from "./writing"; +import { inArchivesState } from "./in-archives"; + +export const stateRegistry: { [key in PlayerState]: StateConfig } = { + [PlayerState.IN_ARCHIVES]: inArchivesState, + [PlayerState.LOBBY]: lobbyState, + [PlayerState.SETTING_UP_GAME]: settingUpGameState, + [PlayerState.SPECTATING]: spectatingState, + [PlayerState.POST_GAME]: postGameState, + [PlayerState.WRITING]: writingState, + [PlayerState.START]: defaultState, + [PlayerState.TRYING_LEAVE]: tryingLeaveState, + [PlayerState.TYPING]: typingState, + [PlayerState.VIEWING_ARCHIVED_POEM]: viewingArchivedPoemState, + [PlayerState.WAITING_AFTER_WRITING]: waitingAfterWritingState, + [PlayerState.WAITING_TO_WRITE]: waitingToWriteState, +}; diff --git a/src/player-state/states/setting-up-game.ts b/src/player-state/states/setting-up-game.ts new file mode 100644 index 0000000..e7b1db4 --- /dev/null +++ b/src/player-state/states/setting-up-game.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const settingUpGameState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/spectating.ts b/src/player-state/states/spectating.ts new file mode 100644 index 0000000..7d74ec3 --- /dev/null +++ b/src/player-state/states/spectating.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const spectatingState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/trying-leave.ts b/src/player-state/states/trying-leave.ts new file mode 100644 index 0000000..085dedb --- /dev/null +++ b/src/player-state/states/trying-leave.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const tryingLeaveState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/typing.ts b/src/player-state/states/typing.ts new file mode 100644 index 0000000..f674b92 --- /dev/null +++ b/src/player-state/states/typing.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const typingState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/viewing-archived-poem.ts b/src/player-state/states/viewing-archived-poem.ts new file mode 100644 index 0000000..49532fb --- /dev/null +++ b/src/player-state/states/viewing-archived-poem.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const viewingArchivedPoemState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/waiting-after-writing.ts b/src/player-state/states/waiting-after-writing.ts new file mode 100644 index 0000000..62a0297 --- /dev/null +++ b/src/player-state/states/waiting-after-writing.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const waitingAfterWritingState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/waiting-to-write.ts b/src/player-state/states/waiting-to-write.ts new file mode 100644 index 0000000..f1e9b45 --- /dev/null +++ b/src/player-state/states/waiting-to-write.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const waitingToWriteState: StateConfig = { enter, exit }; diff --git a/src/player-state/states/writing.ts b/src/player-state/states/writing.ts new file mode 100644 index 0000000..c5fb819 --- /dev/null +++ b/src/player-state/states/writing.ts @@ -0,0 +1,7 @@ +import { StateConfig, StateManagementFn } from "types"; + +const enter: StateManagementFn = async (_player) => {}; + +const exit: StateManagementFn = async (_player) => {}; + +export const writingState: StateConfig = { enter, exit }; diff --git a/src/server/handle-callback-queries-with-data.ts b/src/server/handle-callback-queries-with-data.ts new file mode 100644 index 0000000..07fbc2d --- /dev/null +++ b/src/server/handle-callback-queries-with-data.ts @@ -0,0 +1,13 @@ +import { HandleFromMapFn } from "types"; +import { decodeCallbackData } from "utils"; + +export const handleCallbackQueriesWithData: HandleFromMapFn = (bot, map) => { + bot.callbackQuery(/^[A-Z_]+(\|.+)?$/, async (ctx) => { + const { action, params } = decodeCallbackData(ctx.callbackQuery.data!); + const handler = map[action as keyof typeof map]; + if (!handler) return; + + await ctx.answerCallbackQuery(); + await handler(ctx, params); + }); +}; diff --git a/src/server/handle-commands.ts b/src/server/handle-commands.ts new file mode 100644 index 0000000..5246b85 --- /dev/null +++ b/src/server/handle-commands.ts @@ -0,0 +1,8 @@ +import { commandHandlerMap } from "const"; +import { Bot } from "types"; + +export const handleCommands = (bot: Bot) => { + for (const [command, handler] of Object.entries(commandHandlerMap)) { + bot.command(command, handler); + } +}; diff --git a/src/server/handle-conversations-from-map.ts b/src/server/handle-conversations-from-map.ts new file mode 100644 index 0000000..36ef75b --- /dev/null +++ b/src/server/handle-conversations-from-map.ts @@ -0,0 +1,15 @@ +import { createConversation } from "@grammyjs/conversations"; +import { conversationHandlerMap } from "const"; +import { Bot, Context } from "types"; + +export const handleConversations = (bot: Bot) => { + for (const [conversationName, handler] of Object.entries( + conversationHandlerMap + )) { + bot.use( + createConversation(async (conversation, ctx: Context) => { + await handler(conversation, ctx); + }, conversationName) + ); + } +}; diff --git a/src/server/handle-replies.ts b/src/server/handle-replies.ts new file mode 100644 index 0000000..a67dd52 --- /dev/null +++ b/src/server/handle-replies.ts @@ -0,0 +1,19 @@ +import { replyHandlerMap } from "const"; +import { getContextPlayerOrCreate } from "data"; +import { Bot } from "types"; + +export const handleReplies = (bot: Bot) => { + const replyFilter = bot.filter((ctx) => { + return ctx.msg?.reply_to_message?.from?.id === ctx.me.id; + }); + + replyFilter.on("message:text", async (ctx) => { + // TODO: let players message each other as a chatroom if they're in the same game + const player = getContextPlayerOrCreate(ctx); + const handlerFn = replyHandlerMap[player.state]; + if (handlerFn) { + const reply = ctx.message.text; + await handlerFn(ctx, reply); + } + }); +}; diff --git a/src/server/hears-from-map.ts b/src/server/hears-from-map.ts new file mode 100644 index 0000000..8ee961c --- /dev/null +++ b/src/server/hears-from-map.ts @@ -0,0 +1,13 @@ +import { HandleFromMapFn } from "types"; +import { decodeCallbackName, encodeCallbackName } from "utils"; + +export const hearsFromMap: HandleFromMapFn = (bot, map) => { + bot.hears( + Object.keys(map).map((callbackName) => encodeCallbackName(callbackName)), + async (ctx) => { + const key = ctx.message?.text; + if (!key) return; + await map[decodeCallbackName(key)]?.(ctx); + } + ); +}; diff --git a/src/server/index.ts b/src/server/index.ts new file mode 100644 index 0000000..0e963f4 --- /dev/null +++ b/src/server/index.ts @@ -0,0 +1,30 @@ +import "dotenv/config"; +import { Bot } from "grammy"; +import { conversations } from "@grammyjs/conversations"; +import { + BOT_RUNNING, + callbackHandlerMap, + callbackWithDataHandlerMap, +} from "const"; +import { Context } from "types"; +import { errorHandlingMiddleware } from "utils"; +import { handleCallbackQueriesWithData } from "./handle-callback-queries-with-data"; +import { hearsFromMap } from "./hears-from-map"; +import { handleCommands } from "./handle-commands"; +import { handleConversations } from "./handle-conversations-from-map"; +import { handleReplies } from "./handle-replies"; + +const bot = new Bot(process.env.BOT_TOKEN ?? ""); +bot.use(conversations()); + +handleConversations(bot); +hearsFromMap(bot, callbackHandlerMap); +handleCallbackQueriesWithData(bot, callbackWithDataHandlerMap); +handleCommands(bot); +handleReplies(bot); + +bot.catch(errorHandlingMiddleware); + +bot.start(); + +console.log(BOT_RUNNING); diff --git a/src/types/data.ts b/src/types/data.ts new file mode 100644 index 0000000..72d99a6 --- /dev/null +++ b/src/types/data.ts @@ -0,0 +1,57 @@ +import { Game, Player, Poem } from "classes"; +import { PlayerState } from "./player-state"; + +export type Line = { author: string; date: string; text: string }; + +export type PoemProps = { gameId: string; id: number; lines: Line[] }; + +export type PoemOverrides = Partial & { gameId: string }; + +export enum GameOption { + DESCRIPTION = "description", +} + +export type GameOptions = { + [GameOption.DESCRIPTION]?: string; +}; + +export type GameProps = GameOptions & { + currentWriterId?: number; + destroy: (id: string) => void; + gameId?: string; + hostId: number; + id: string; + inProgress: boolean; + options: GameOptions; + poem: Poem; + playerIds: number[]; +}; + +export type GameOverrides = Partial & { + poemProps?: Partial; +}; + +export type PlayerProps = { + destroy: (id: number) => void; + gameId?: string; + id: number; + userName: string; + state: PlayerState; +}; + +export type PlayerOverrides = Partial & { + id: number; + userName: string; +}; + +export type Games = Record; + +export type Players = { [userId: number]: Player }; + +export type ArchivedPoems = { [id: string]: Poem }; + +export type GlobalProps = { + activePlayers: Players; + games: Games; + archivedPoems: ArchivedPoems; +}; diff --git a/src/types/handlers.ts b/src/types/handlers.ts new file mode 100644 index 0000000..f0f619e --- /dev/null +++ b/src/types/handlers.ts @@ -0,0 +1,56 @@ +import { + Conversation as GrammyConversation, + ConversationFlavor, +} from "@grammyjs/conversations"; +import { Context } from "./server"; + +export enum BasicCallback { + BEGIN_GAME = "Start Game", + CREATE_GAME = "Create Game", + EXIT_ARCHIVE = "Exit Archive", + LEAVE_GAME = "Leave", + RESTART_APP = "Restart", + RESTART_GAME = "Play Again", + RETURN_TO_PREVIOUS_STATE = "Cancel", + SET_UP_GAME = "New Game", + TRY_JOIN = "Join Game", + TRY_LEAVE = "Leave Game", + VIEW_ARCHIVED_POEMS = "View Archived Poems", +} + +export enum CallbackWithData { + HIDE_POEM_META = "HIDE_POEM_META", + SHOW_POEM_META = "SHOW_POEM_META", +} + +export enum GameConfigCallback { + ADD_DESCRIPTION = "Add Description", + EDIT_DESCRIPTION = "Edit Description", + REMOVE_DESCRIPTION = "Delete Description", +} + +export type Callback = BasicCallback | GameConfigCallback; + +export enum Command { + INSPO = "inspo", + RESTART = "restart", + START = "start", +} + +export enum ConversationState { + GET_ARCHIVED_POEM = "GET_ARCHIVED_POEM", + GET_GAME_DESCRIPTION = "GET_GAME_DESCRIPTION", + GET_GAME_ID = "GET_GAME_ID", +} + +export type Conversation = GrammyConversation< + ConversationFlavor, + ConversationFlavor +>; + +export type ConversationFn = ( + conversation: Conversation, + ctx: ConversationFlavor +) => Promise; + +export type ReplyHandlerFn = (ctx: Context, reply: string) => Promise; diff --git a/src/types/index.ts b/src/types/index.ts new file mode 100644 index 0000000..b862b3e --- /dev/null +++ b/src/types/index.ts @@ -0,0 +1,5 @@ +export * from "./data"; +export * from "./handlers"; +export * from "./messaging"; +export * from "./player-state"; +export * from "./server"; diff --git a/src/types/messaging.ts b/src/types/messaging.ts new file mode 100644 index 0000000..9c5425f --- /dev/null +++ b/src/types/messaging.ts @@ -0,0 +1,13 @@ +import { InlineKeyboard, Keyboard as GrammyKeyboard } from "grammy"; +import { PlayerState } from "generated/prisma/enums"; +import { Callback, ConversationState, GameConfigCallback } from "./handlers"; + +export type MessagingState = PlayerState | ConversationState; + +export type CallbackButton = { + label?: string; + callback: Callback | GameConfigCallback; + continueRow?: boolean; +}; + +export type Keyboard = GrammyKeyboard | InlineKeyboard; diff --git a/src/types/player-state.ts b/src/types/player-state.ts new file mode 100644 index 0000000..d7ef40b --- /dev/null +++ b/src/types/player-state.ts @@ -0,0 +1,12 @@ +import { Menu } from "@grammyjs/menu"; +import { PlayerModel } from "generated/prisma/models"; +import { Context } from "./server"; + +export type StateManagementFn = (player: PlayerModel) => Promise; + +export type StateConfig = { + enter: StateManagementFn; + exit: StateManagementFn; +}; + +export type MenuType = Menu; diff --git a/src/types/server.ts b/src/types/server.ts new file mode 100644 index 0000000..90d3f4c --- /dev/null +++ b/src/types/server.ts @@ -0,0 +1,27 @@ +import { + Bot as BotType, + CallbackQueryContext, + CommandContext, + Context as GrammyContext, +} from "grammy"; +import { ConversationFlavor } from "@grammyjs/conversations"; +import { MenuFlavor } from "@grammyjs/menu"; + +type RawContext = + | CallbackQueryContext + | CommandContext; + +export type Context = ConversationFlavor & MenuFlavor; + +export type Bot = BotType; + +export type HandlerFn = (ctx: Context) => Promise; +export type CallbackData = { id: string }; +export type DataHandlerFn = (ctx: Context, data: CallbackData) => Promise; +export type HandlerMap = { + [key in T]: HandlerFn; +}; +export type HandleFromMapFn = ( + bot: Bot, + map: Record, +) => void; diff --git a/src/utils/callback-name-encoding.ts b/src/utils/callback-name-encoding.ts new file mode 100644 index 0000000..4bcfa69 --- /dev/null +++ b/src/utils/callback-name-encoding.ts @@ -0,0 +1,11 @@ +const hiddenSpace = "\u2063"; // invisible character applied before callback names + +const isEncoded = (str: string) => str[0] === hiddenSpace; + +export const encodeCallbackName = (str: string) => { + return isEncoded(str) ? str : `${hiddenSpace}${str}`; +}; + +export const decodeCallbackName = (str: string) => { + return str.replace(hiddenSpace, ""); +}; diff --git a/src/utils/enter-conversation.ts b/src/utils/enter-conversation.ts new file mode 100644 index 0000000..e72e38b --- /dev/null +++ b/src/utils/enter-conversation.ts @@ -0,0 +1,14 @@ +import { getContextPlayerOrThrow } from "data"; +import { setPlayerState } from "player-state"; +import { Context, ConversationState, PlayerState } from "types"; + +const { TYPING } = PlayerState; + +export const enterConversation = async ( + conversation: ConversationState, + ctx: Context, +) => { + const player = getContextPlayerOrThrow(ctx); + await setPlayerState(player.id, ctx, TYPING); + await ctx.conversation.enter(conversation); +}; diff --git a/src/utils/error-handling-middleware.ts b/src/utils/error-handling-middleware.ts new file mode 100644 index 0000000..6c15753 --- /dev/null +++ b/src/utils/error-handling-middleware.ts @@ -0,0 +1,20 @@ +import { UNKNOWN_ERROR } from "const"; +import { BotError, GrammyError, HttpError } from "grammy"; +import { Context } from "types"; + +export const errorHandlingMiddleware = (err: BotError) => { + const ctx = err.ctx; + const e = err.error; + let message = ""; + console.log(e); + if (e instanceof GrammyError) { + message = `Error in request: ${e.description}`; + } else if (e instanceof HttpError) { + message = `Could not contact Telegram: ${e}`; + } else if (err.message) { + message = err.message; + } else { + console.error(e); + } + ctx.reply(`${message || UNKNOWN_ERROR}\n\nUse /start to reset.`); +}; diff --git a/src/utils/get-conversation-value.ts b/src/utils/get-conversation-value.ts new file mode 100644 index 0000000..41ab7ff --- /dev/null +++ b/src/utils/get-conversation-value.ts @@ -0,0 +1,48 @@ +import { Conversation } from "types"; +import { encodeCallbackName } from "./callback-name-encoding"; + +export const getConversationValue = async ( + conversation: Conversation, + { + exitCallback: pExitcallbacks = [], + ignoreCallbacks: pIgnoreCallbacks = [], + handleCancel, + handleSuccess, + stay, + doEach, + validate, + }: { + exitCallback: string | string[]; + ignoreCallbacks?: string[]; + handleSuccess: (val: string) => Promise; + handleCancel?: () => Promise; + stay?: boolean; + doEach?: () => Promise; + validate?: (val: string) => Promise; + }, +) => { + const exitCallbacks = + typeof pExitcallbacks === "string" + ? [encodeCallbackName(pExitcallbacks)] + : pExitcallbacks.map(encodeCallbackName); + const ignoreCallbacks = pIgnoreCallbacks.map(encodeCallbackName); + + while (true) { + await doEach?.(); + + const result = await conversation.waitFor("message:text"); + const message = result.message.text; + + if (exitCallbacks.includes(message)) { + await handleCancel?.(); + return; + } + + if (!ignoreCallbacks.includes(message)) { + if (!validate || (await validate?.(message))) { + await handleSuccess(message); + if (!stay) return; + } + } + } +}; diff --git a/src/utils/get-reply-markup.ts b/src/utils/get-reply-markup.ts new file mode 100644 index 0000000..98be0f2 --- /dev/null +++ b/src/utils/get-reply-markup.ts @@ -0,0 +1,58 @@ +import { Player } from "classes"; +import { stateKeyboardButtonMap } from "const"; +import { + InlineKeyboardMarkup, + ReplyKeyboardMarkup, + ReplyKeyboardRemove, + ForceReply, +} from "grammy/types"; +import { Keyboard, MessagingState } from "types"; +import { encodeCallbackName } from "./callback-name-encoding"; + +type ReplyMarkup = + | InlineKeyboardMarkup + | ReplyKeyboardMarkup + | ReplyKeyboardRemove + | ForceReply + | undefined; + +// TODO. It seems that "force_reply" does not behave with keyboards, so users will manually click and reply for now until a workaround is found +const forceReplyStates: MessagingState[] = [ + /* PlayerState.WRITING */ +]; +const endForceReplyStates: MessagingState[] = [ + /* PlayerState.WAITING_AFTER_WRITING, + PlayerState.POST_GAME, */ +]; + +export const getReplyMarkup = ({ + keyboard, + player, + state, +}: { + keyboard?: Keyboard; + player: Player; + state: MessagingState; +}): ReplyMarkup => { + const forceReply = forceReplyStates.includes(state); + const endForceReply = endForceReplyStates.includes(state); + const btnFn = stateKeyboardButtonMap[state]; + const buttons = btnFn ? [btnFn(player).map(encodeCallbackName)] : []; + + if (forceReply) { + return { keyboard: buttons, force_reply: true, one_time_keyboard: true }; + } + + if (endForceReply) { + return { + remove_keyboard: true, + keyboard: buttons, + }; + } + + if (keyboard) { + return keyboard; + } + + return keyboard; +}; diff --git a/src/utils/get-user-info.ts b/src/utils/get-user-info.ts new file mode 100644 index 0000000..2f68317 --- /dev/null +++ b/src/utils/get-user-info.ts @@ -0,0 +1,18 @@ +import { sha256 } from "crypto-hash"; +import { + FALLBACK_USERNAME, + NO_BOTS_PLS, + UNKNOWN_ERROR, + USER_NOT_FOUND, +} from "const"; +import { Context } from "types"; + +export const getUserInfo = async (ctx: Context) => { + if (!ctx.from) throw new Error(UNKNOWN_ERROR); + if (ctx.from.is_bot) throw new Error(NO_BOTS_PLS); + const id = ctx.from.id; + if (!id) throw new Error(USER_NOT_FOUND); + const name = ctx.from.first_name || FALLBACK_USERNAME; + const playerId = await sha256(id.toString()); + return { userId: id, userName: name, playerId }; +}; diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..32c6abd --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1,15 @@ +export { + decodeCallbackName, + encodeCallbackName, +} from "./callback-name-encoding"; +export { enterConversation } from "./enter-conversation"; +export { errorHandlingMiddleware } from "./error-handling-middleware"; +export { getConversationValue } from "./get-conversation-value"; +export { getReplyMarkup } from "./get-reply-markup"; +export { getUserInfo } from "./get-user-info"; +export { randomString } from "./random-string"; +export * from "./star-decorator"; +export * from "./telegram-error-checkers"; +export * from "./use-all-players-helpers"; +export { decodeCallbackData, encodeCallbackData } from "./use-callback-data"; +// export * from "./validations"; diff --git a/src/utils/random-string.ts b/src/utils/random-string.ts new file mode 100644 index 0000000..8254a90 --- /dev/null +++ b/src/utils/random-string.ts @@ -0,0 +1,9 @@ +export const randomString = (length = 4) => { + const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + let result = ""; + const charactersLength = characters.length; + for (let i = 0; i < length; i++) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + } + return result; +}; diff --git a/src/utils/star-decorator.ts b/src/utils/star-decorator.ts new file mode 100644 index 0000000..f56eb40 --- /dev/null +++ b/src/utils/star-decorator.ts @@ -0,0 +1,4 @@ +export const starDecorators = ["⋆⭒˚。⋆", "⋆˚✰ ݁˖⭑.ᐟ", "˙⋆✮", "⋆⭒˚.⋆"]; + +export const randomStarDecorator = () => + starDecorators[Math.floor(Math.random() * starDecorators.length)]; diff --git a/src/utils/telegram-error-checkers.ts b/src/utils/telegram-error-checkers.ts new file mode 100644 index 0000000..449dfe4 --- /dev/null +++ b/src/utils/telegram-error-checkers.ts @@ -0,0 +1,22 @@ +import { GrammyError } from "grammy"; + +export const messageNotModified = (err?: GrammyError) => { + return ( + err?.error_code === 400 && + err?.description.includes("Bad Request: message is not modified") + ); +}; + +export const messageNotFound = (err?: GrammyError) => { + return ( + err?.error_code === 400 && + err?.description === "Bad Request: message to edit not found" + ); +}; + +export const chatNotFound = (err?: GrammyError) => { + return ( + err?.error_code === 400 && + err?.description.includes("Bad Request: chat not found") + ); +}; diff --git a/src/utils/use-all-players-helpers.ts b/src/utils/use-all-players-helpers.ts new file mode 100644 index 0000000..85e24a6 --- /dev/null +++ b/src/utils/use-all-players-helpers.ts @@ -0,0 +1,16 @@ +import { Player } from "classes"; + +export const forPlayers = async ( + players: Player[], + callback: (player: Player) => Promise, +) => { + await Promise.all( + players.map(async (player) => { + try { + await callback(player); + } catch (err) { + console.error(`Error on iterate players helper`, err); + } + }), + ); +}; diff --git a/src/utils/use-callback-data.ts b/src/utils/use-callback-data.ts new file mode 100644 index 0000000..6777e8d --- /dev/null +++ b/src/utils/use-callback-data.ts @@ -0,0 +1,29 @@ +import { CallbackWithData } from "types"; + +type CallbackParams = Record; + +export const encodeCallbackData = ( + action: CallbackWithData, + params: CallbackParams = {} +) => { + const query = Object.entries(params) + .map(([k, v]) => `${k}=${v}`) + .join("&"); + + return query ? `${action}|${query}` : action; +}; + +export function decodeCallbackData(data: string) { + const [action, paramString] = data.split("|"); + + const params: Record = {}; + + if (paramString) { + for (const pair of paramString.split("&")) { + const [key, value] = pair.split("="); + params[key] = value; + } + } + + return { action, params }; +} diff --git a/src/utils/validations/index.ts b/src/utils/validations/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..5dbd7bc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "outDir": "/dist", + "target": "ES2021", + "lib": ["ES2021"], + "module": "commonjs", + "rootDir": "./src", + "baseUrl": "./src", + "paths": { + "const": ["const/index.ts"], + "data": ["data/index.ts"], + "handlers": ["handlers/index.ts"], + "lib": ["lib/index.ts"], + "player-state": ["player-state/index.ts"], + "server": ["server/index.ts"], + "types": ["types/index.ts"], + "utils": ["utils/index.ts"] + }, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + }, + "include": ["src/**/*", "src/generated", "src/lib"], + "exclude": ["node_modules"] +}