diff --git a/README.md b/README.md new file mode 100644 index 0000000..66e0f50 --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +# side-hustle-server + +## Getting started +Before you run the project, make sure to install all packages first by running `npm install` + +After that, you will need to install `nodemon` package. This package is used to ease development process by auto-restarting the server everytime there is any changes saved. To run the server, use this command `nodemon src/index.ts` +[https://www.npmjs.com/package/nodemon] + +To check whether your server is already running, open your browser and insert this address [http://localhost:3000/]. You should be able to see a sample "Hello World!" string returned. + +To stop the server, navigate to your terminal and press `CTRL+C` + +*** Remarks *** +remember to run `npx prisma migrate deploy` to make sure the migration other people created will execute on your db + +## Endpoints +- (POST) /auth/login +```sh +body: username, password +``` +- (POST) /auth/validate-token +```sh +body: token +``` +- (POST) /auth/refresh-token +```sh +body: refreshToken +``` +- (POST) /auth/revoke-token +```sh +header: token (this is access token) +body: token (this is refresh token) +``` +- (GET) /auth/{id}/refresh-tokens +```sh +header: token +``` +- (GET) /user +```sh +header: token +``` +- (GET) /user/{id} +```sh +header: token +``` +- (POST) /user/create +```sh +header: token +body: username, password, lastName, firstName, mobile, email, role +``` +- (PUT) /user/update +```sh +header: token +body: id, lastName, firstName, mobile, email, role +``` +- (PUT) /user/change-password +```sh +header: token +body: userId, currentPassword, newPassword +``` diff --git a/config.json b/config.json new file mode 100644 index 0000000..3787f83 --- /dev/null +++ b/config.json @@ -0,0 +1,3 @@ +{ + "jwt_token_secret": "THIS IS USED TO SIGN AND VERIFY JWT TOKENS, REPLACE IT WITH YOUR OWN SECRET, IT CAN BE ANY STRING" +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..6f25c50 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3197 @@ +{ + "name": "side-hustle-server", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "side-hustle-server", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "@prisma/client": "^5.1.1", + "@types/validator": "^13.11.1", + "accepts": "^1.3.8", + "array-flatten": "^1.1.1", + "bcryptjs": "^2.4.3", + "bignumber.js": "^9.0.0", + "body-parser": "^1.20.2", + "bytes": "^3.1.2", + "call-bind": "^1.0.2", + "content-disposition": "^0.5.4", + "content-type": "^1.0.5", + "cookie": "^0.5.0", + "cookie-parser": "^1.4.6", + "cookie-signature": "^1.0.6", + "core-util-is": "^1.0.3", + "cors": "^2.8.5", + "debug": "^2.6.9", + "depd": "^2.0.0", + "destroy": "^1.2.0", + "ee-first": "^1.1.1", + "encodeurl": "^1.0.2", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "express": "^4.18.2", + "express-unless": "^2.1.3", + "finalhandler": "^1.2.0", + "forwarded": "^0.2.0", + "fresh": "^0.5.2", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.4.24", + "inherits": "^2.0.4", + "ipaddr.js": "^1.9.1", + "isarray": "^1.0.0", + "jsonwebtoken": "^9.0.1", + "media-typer": "^0.3.0", + "merge-descriptors": "^1.0.1", + "methods": "^1.1.2", + "mime": "^1.6.0", + "mime-db": "^1.52.0", + "mime-types": "^2.1.35", + "ms": "^2.0.0", + "mysql": "^2.18.1", + "negotiator": "^0.6.3", + "nodemon": "^3.0.1", + "object-inspect": "^1.12.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "path-to-regexp": "^0.1.7", + "process-nextick-args": "^2.0.1", + "proxy-addr": "^2.0.7", + "qs": "^6.11.0", + "range-parser": "^1.2.1", + "raw-body": "^2.5.2", + "readable-stream": "^2.3.7", + "safe-buffer": "^5.2.1", + "safer-buffer": "^2.1.2", + "send": "^0.18.0", + "serve-static": "^1.15.0", + "setprototypeof": "^1.2.0", + "side-channel": "^1.0.4", + "sqlstring": "^2.3.1", + "statuses": "^2.0.1", + "string_decoder": "^1.1.1", + "toidentifier": "^1.0.1", + "type-is": "^1.6.18", + "unpipe": "^1.0.0", + "util-deprecate": "^1.0.2", + "utils-merge": "^1.0.1", + "validator": "^13.11.0", + "vary": "^1.1.2" + }, + "devDependencies": { + "@types/bcryptjs": "^2.4.3", + "@types/cors": "^2.8.13", + "@types/express": "^4.17.17", + "@types/express-unless": "^2.0.1", + "@types/jsonwebtoken": "^9.0.2", + "@types/node": "^20.5.1", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "eslint": "^8.50.0", + "prisma": "^5.2.0", + "ts-node": "^10.9.1", + "typescript": "^5.1.6" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.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, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@eslint/js": { + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.50.0.tgz", + "integrity": "sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.11.tgz", + "integrity": "sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "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, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "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, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@prisma/client": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.1.1.tgz", + "integrity": "sha512-fxcCeK5pMQGcgCqCrWsi+I2rpIbk0rAhdrN+ke7f34tIrgPwA68ensrpin+9+fZvuV2OtzHmuipwduSY6HswdA==", + "hasInstallScript": true, + "dependencies": { + "@prisma/engines-version": "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e" + }, + "engines": { + "node": ">=16.13" + }, + "peerDependencies": { + "prisma": "*" + }, + "peerDependenciesMeta": { + "prisma": { + "optional": true + } + } + }, + "node_modules/@prisma/engines": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.2.0.tgz", + "integrity": "sha512-dT7FOLUCdZmq+AunLqB1Iz+ZH/IIS1Fz2THmKZQ6aFONrQD/BQ5ecJ7g2wGS2OgyUFf4OaLam6/bxmgdOBDqig==", + "devOptional": true, + "hasInstallScript": true + }, + "node_modules/@prisma/engines-version": { + "version": "5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.1.1-1.6a3747c37ff169c90047725a05a6ef02e32ac97e.tgz", + "integrity": "sha512-owZqbY/wucbr65bXJ/ljrHPgQU5xXTSkmcE/JcbqE1kusuAXV/TLN3/exmz21SZ5rJ7WDkyk70J2G/n68iogbQ==" + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "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 + }, + "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 + }, + "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 + }, + "node_modules/@types/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/@types/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-XTnH9E/rp51aKGsiMtQCHV/owDLW2E9QAxI7ItpWWm6Gi6XO1e4o3VuEYDma0lbitj1vNOBj05Qk8l2BYoiN4A==", + "dev": true + }, + "node_modules/@types/body-parser": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", + "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", + "dev": true, + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.35", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", + "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/cors": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz", + "integrity": "sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/express": { + "version": "4.17.17", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", + "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", + "dev": true, + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^4.17.33", + "@types/qs": "*", + "@types/serve-static": "*" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "4.17.36", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.36.tgz", + "integrity": "sha512-zbivROJ0ZqLAtMzgzIUC4oNqDG9iF0lSsAqpOD9kbs5xcIM3dTiyuHvBc7R8MtWBp3AAWGaovJa+wzWPjLYW7Q==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/express-unless": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-2.0.1.tgz", + "integrity": "sha512-PJLiNw03EjkWDkQbhNjIXXDLObC3eMQhFASDV+WakFbT8eL7YdjlbV6MXd3Av5Lejq499d6pFuV1jyK+EHyG3Q==", + "deprecated": "This is a stub types definition. express-unless provides its own type definitions, so you do not need this installed.", + "dev": true, + "dependencies": { + "express-unless": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "dev": true + }, + "node_modules/@types/jsonwebtoken": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.2.tgz", + "integrity": "sha512-drE6uz7QBKq1fYqqoFKTDRdFCPHd5TCub75BM+D+cMx7NU9hUz7SESLfC2fSCXVFMO5Yj8sOWHuGqPgjc+fz0Q==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/mime": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", + "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.5.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.1.tgz", + "integrity": "sha512-4tT2UrL5LBqDwoed9wZ6N3umC4Yhz3W3FloMmiiG4JwmUJWpie0c7lcnUNd4gtMKuDEO4wRVS8B6Xa0uMRsMKg==", + "dev": true + }, + "node_modules/@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==", + "dev": true + }, + "node_modules/@types/range-parser": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", + "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==", + "dev": true + }, + "node_modules/@types/semver": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw==", + "dev": true + }, + "node_modules/@types/send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.1.tgz", + "integrity": "sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==", + "dev": true, + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.2.tgz", + "integrity": "sha512-J2LqtvFYCzaj8pVYKw8klQXrLLk7TBZmQ4ShlcdkELFKGwGMfevMLneMMRkMgZxotOD9wg497LpC7O8PcvAmfw==", + "dev": true, + "dependencies": { + "@types/http-errors": "*", + "@types/mime": "*", + "@types/node": "*" + } + }, + "node_modules/@types/validator": { + "version": "13.11.1", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.1.tgz", + "integrity": "sha512-d/MUkJYdOeKycmm75Arql4M5+UuXmf4cHdHKsyw1GcvnNgL6s77UkgSgJ8TE/rI5PYsnwYq5jkcWBLuN/MpQ1A==" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz", + "integrity": "sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.7.2", + "@typescript-eslint/type-utils": "6.7.2", + "@typescript-eslint/utils": "6.7.2", + "@typescript-eslint/visitor-keys": "6.7.2", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.7.2.tgz", + "integrity": "sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.7.2", + "@typescript-eslint/types": "6.7.2", + "@typescript-eslint/typescript-estree": "6.7.2", + "@typescript-eslint/visitor-keys": "6.7.2", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz", + "integrity": "sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.7.2", + "@typescript-eslint/visitor-keys": "6.7.2" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz", + "integrity": "sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.7.2", + "@typescript-eslint/utils": "6.7.2", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/types": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.7.2.tgz", + "integrity": "sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz", + "integrity": "sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.7.2", + "@typescript-eslint/visitor-keys": "6.7.2", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.7.2.tgz", + "integrity": "sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.7.2", + "@typescript-eslint/types": "6.7.2", + "@typescript-eslint/typescript-estree": "6.7.2", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.7.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz", + "integrity": "sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.7.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": 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, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "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, + "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/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "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==", + "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 + }, + "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 + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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==" + }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + }, + "node_modules/bignumber.js": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.1.tgz", + "integrity": "sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==", + "engines": { + "node": "*" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "engines": { + "node": ">=8" + } + }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/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, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/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, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "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" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "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, + "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 + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", + "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", + "dependencies": { + "cookie": "0.4.1", + "cookie-signature": "1.0.6" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/cookie-parser/node_modules/cookie": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", + "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-parser/node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/cookie-signature": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.1.tgz", + "integrity": "sha512-78KWk9T26NhzXtuL26cIJ8/qNHANyJ/ZYrmEXFzUmhZdjpBv+DlWlOANRTGBt48YcyslsLrj0bMLFTmXvLRCOw==", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "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 + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "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 + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "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, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.50.0.tgz", + "integrity": "sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "8.50.0", + "@humanwhocodes/config-array": "^0.11.11", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "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, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint/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, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "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, + "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, + "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, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express-unless": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/express-unless/-/express-unless-2.1.3.tgz", + "integrity": "sha512-wj4tLMyCVYuIIKHGt0FhCtIViBcwzWejX0EjNxveAa6dG+0XBCQhMbx+PnkLkFCxLC69qoFrxds4pIyL88inaQ==" + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/express/node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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 + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "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 + }, + "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 + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.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, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", + "dev": true, + "dependencies": { + "flatted": "^3.2.7", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "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 + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "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": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==" + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "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==", + "dev": true, + "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==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "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==", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "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==", + "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==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "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 + }, + "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 + }, + "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 + }, + "node_modules/jsonwebtoken": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.1.tgz", + "integrity": "sha512-K8wx7eJ5TPvEjuiVSkv167EVboBDv9PZdDoF7BgeQnBLVvZWW9clr2PsQHVJDTKaEIH5JBIwHujGcHp7GgI2eg==", + "dependencies": { + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "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, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.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, + "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==" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "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==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "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 + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "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==" + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/mysql/node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/mysql/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/mysql/node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "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 + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/nodemon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", + "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^3.2.7", + "ignore-by-default": "^1.0.1", + "minimatch": "^3.1.2", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nodemon/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, + "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==", + "engines": { + "node": ">=0.10.0" + } + }, + "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==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "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, + "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, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "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, + "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, + "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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "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, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prisma": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.2.0.tgz", + "integrity": "sha512-FfFlpjVCkZwrqxDnP4smlNYSH1so+CbfjgdpioFzGGqlQAEm6VHAYSzV7jJgC3ebtY9dNOhDMS2+4/1DDSM7bQ==", + "devOptional": true, + "hasInstallScript": true, + "dependencies": { + "@prisma/engines": "5.2.0" + }, + "bin": { + "prisma": "build/index.ts" + }, + "engines": { + "node": ">=16.13" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "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" + } + ] + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "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" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "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" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "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==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "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==", + "dev": true, + "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==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "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==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "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==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", + "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", + "dependencies": { + "nopt": "~1.0.10" + }, + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/ts-api-utils": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", + "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "dev": true, + "engines": { + "node": ">=16.13.0" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "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/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, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "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, + "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==" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "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 + }, + "node_modules/validator": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-13.11.0.tgz", + "integrity": "sha512-Ii+sehpSfZy+At5nPdnyMhx78fEoPDkR2XW/zimHEL3MyGJQOCQ7WeP20jPYRz7ZCpcKLB21NxuXHF3bxjStBQ==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "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==", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "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, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..8c23e92 --- /dev/null +++ b/package.json @@ -0,0 +1,104 @@ +{ + "name": "side-hustle-server", + "version": "1.0.0", + "description": "## Getting started Before you run the project, make sure to install all packages first by running `npm install`", + "main": "dist/src/index.js", + "dependencies": { + "@prisma/client": "^5.1.1", + "@types/validator": "^13.11.1", + "accepts": "^1.3.8", + "array-flatten": "^1.1.1", + "bcryptjs": "^2.4.3", + "bignumber.js": "^9.0.0", + "body-parser": "^1.20.2", + "bytes": "^3.1.2", + "call-bind": "^1.0.2", + "content-disposition": "^0.5.4", + "content-type": "^1.0.5", + "cookie": "^0.5.0", + "cookie-parser": "^1.4.6", + "cookie-signature": "^1.0.6", + "core-util-is": "^1.0.3", + "cors": "^2.8.5", + "debug": "^2.6.9", + "depd": "^2.0.0", + "destroy": "^1.2.0", + "ee-first": "^1.1.1", + "encodeurl": "^1.0.2", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "express": "^4.18.2", + "express-unless": "^2.1.3", + "finalhandler": "^1.2.0", + "forwarded": "^0.2.0", + "fresh": "^0.5.2", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.2.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.4.24", + "inherits": "^2.0.4", + "ipaddr.js": "^1.9.1", + "isarray": "^1.0.0", + "jsonwebtoken": "^9.0.1", + "media-typer": "^0.3.0", + "merge-descriptors": "^1.0.1", + "methods": "^1.1.2", + "mime": "^1.6.0", + "mime-db": "^1.52.0", + "mime-types": "^2.1.35", + "ms": "^2.0.0", + "mysql": "^2.18.1", + "negotiator": "^0.6.3", + "nodemon": "^3.0.1", + "object-inspect": "^1.12.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "path-to-regexp": "^0.1.7", + "process-nextick-args": "^2.0.1", + "proxy-addr": "^2.0.7", + "qs": "^6.11.0", + "range-parser": "^1.2.1", + "raw-body": "^2.5.2", + "readable-stream": "^2.3.7", + "safe-buffer": "^5.2.1", + "safer-buffer": "^2.1.2", + "send": "^0.18.0", + "serve-static": "^1.15.0", + "setprototypeof": "^1.2.0", + "side-channel": "^1.0.4", + "sqlstring": "^2.3.1", + "statuses": "^2.0.1", + "string_decoder": "^1.1.1", + "toidentifier": "^1.0.1", + "type-is": "^1.6.18", + "unpipe": "^1.0.0", + "util-deprecate": "^1.0.2", + "utils-merge": "^1.0.1", + "validator": "^13.11.0", + "vary": "^1.1.2" + }, + "scripts": { + "start": "tsc && node dist/src/index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@types/bcryptjs": "^2.4.3", + "@types/cors": "^2.8.13", + "@types/express": "^4.17.17", + "@types/express-unless": "^2.0.1", + "@types/jsonwebtoken": "^9.0.2", + "@types/node": "^20.5.1", + "@typescript-eslint/eslint-plugin": "^6.7.2", + "@typescript-eslint/parser": "^6.7.2", + "eslint": "^8.50.0", + "prisma": "^5.2.0", + "ts-node": "^10.9.1", + "typescript": "^5.1.6" + } +} diff --git a/prisma/migrations/20230820141402_init/migration.sql b/prisma/migrations/20230820141402_init/migration.sql new file mode 100644 index 0000000..3d402d9 --- /dev/null +++ b/prisma/migrations/20230820141402_init/migration.sql @@ -0,0 +1,16 @@ +-- CreateTable +CREATE TABLE `User` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `username` VARCHAR(191) NOT NULL, + `password` VARCHAR(191) NOT NULL, + `lastName` VARCHAR(191) NULL, + `firstName` VARCHAR(191) NULL, + `mobile` VARCHAR(191) NULL, + `email` VARCHAR(191) NULL, + `role` VARCHAR(191) NOT NULL, + + UNIQUE INDEX `User_username_key`(`username`), + UNIQUE INDEX `User_mobile_key`(`mobile`), + UNIQUE INDEX `User_email_key`(`email`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20230821092951_added_initial_table_list/migration.sql b/prisma/migrations/20230821092951_added_initial_table_list/migration.sql new file mode 100644 index 0000000..2b7fa35 --- /dev/null +++ b/prisma/migrations/20230821092951_added_initial_table_list/migration.sql @@ -0,0 +1,387 @@ +-- AlterTable +ALTER TABLE `User` ADD COLUMN `deleted` BOOLEAN NOT NULL DEFAULT false; + +-- CreateTable +CREATE TABLE `RefreshToken` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `userId` INTEGER NOT NULL, + `userType` VARCHAR(191) NOT NULL, + `token` VARCHAR(191) NOT NULL, + `expired` DATETIME(3) NULL, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `createdByIP` VARCHAR(191) NULL, + `revoked` DATETIME(3) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Referral` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `username` VARCHAR(191) NOT NULL, + `password` VARCHAR(191) NOT NULL, + `lastName` VARCHAR(191) NULL, + `firstName` VARCHAR(191) NULL, + `mobile` VARCHAR(191) NULL, + `email` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `Referral_username_key`(`username`), + UNIQUE INDEX `Referral_mobile_key`(`mobile`), + UNIQUE INDEX `Referral_email_key`(`email`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Supplier` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `companyName` VARCHAR(191) NOT NULL, + `companyStreet` VARCHAR(191) NOT NULL, + `companyCity` VARCHAR(191) NOT NULL, + `companyState` VARCHAR(191) NOT NULL, + `companyPostalCode` VARCHAR(191) NOT NULL, + `compantCountry` VARCHAR(191) NOT NULL, + `companyRegisterNumber` VARCHAR(191) NOT NULL, + `personInChargeLastName` VARCHAR(191) NULL, + `personInChargeFirstName` VARCHAR(191) NULL, + `mobile` VARCHAR(191) NULL, + `email` VARCHAR(191) NULL, + `remark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Customer` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `salutation` VARCHAR(191) NULL, + `lastName` VARCHAR(191) NULL, + `firstName` VARCHAR(191) NULL, + `mobile` VARCHAR(191) NULL, + `email` VARCHAR(191) NULL, + `gender` VARCHAR(191) NULL, + `billStreet` VARCHAR(191) NULL, + `billCity` VARCHAR(191) NULL, + `billState` VARCHAR(191) NULL, + `billPostalCode` VARCHAR(191) NULL, + `billCountry` VARCHAR(191) NULL, + `billRemark` VARCHAR(191) NULL, + `shipStreet` VARCHAR(191) NULL, + `shipCity` VARCHAR(191) NULL, + `shipState` VARCHAR(191) NULL, + `shipPostalCode` VARCHAR(191) NULL, + `shipCountry` VARCHAR(191) NULL, + `shipRemark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Company` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `companyName` VARCHAR(191) NOT NULL, + `street` VARCHAR(191) NOT NULL, + `city` VARCHAR(191) NOT NULL, + `state` VARCHAR(191) NOT NULL, + `postalCode` VARCHAR(191) NOT NULL, + `country` VARCHAR(191) NOT NULL, + `registerNumber` VARCHAR(191) NOT NULL, + `website` VARCHAR(191) NULL, + `referralId` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `Company_registerNumber_key`(`registerNumber`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Outlet` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `outletName` VARCHAR(191) NOT NULL, + `street` VARCHAR(191) NULL, + `city` VARCHAR(191) NULL, + `state` VARCHAR(191) NULL, + `postalCode` VARCHAR(191) NULL, + `country` VARCHAR(191) NULL, + `outletTel` VARCHAR(191) NULL, + `outletEmail` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Item` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `itemCode` VARCHAR(191) NOT NULL, + `itemName` VARCHAR(191) NOT NULL, + `itemType` VARCHAR(191) NULL, + `itemModel` VARCHAR(191) NULL, + `itemBrand` VARCHAR(191) NULL, + `itemDescription` VARCHAR(191) NULL, + `category` VARCHAR(191) NULL, + `cost` DECIMAL(65, 30) NOT NULL, + `price` DECIMAL(65, 30) NOT NULL, + `isOpenPrice` BOOLEAN NOT NULL DEFAULT false, + `unitOfMeasure` VARCHAR(191) NULL, + `height` DECIMAL(65, 30) NOT NULL, + `width` DECIMAL(65, 30) NOT NULL, + `length` DECIMAL(65, 30) NOT NULL, + `weight` DECIMAL(65, 30) NOT NULL, + `alternateLookUp` VARCHAR(191) NULL, + `image` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `Item_itemCode_key`(`itemCode`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Sales` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `outletId` INTEGER NOT NULL, + `businessDate` DATETIME(3) NOT NULL, + `salesType` VARCHAR(191) NULL, + `customerId` INTEGER NULL, + `billStreet` VARCHAR(191) NULL, + `billCity` VARCHAR(191) NULL, + `billState` VARCHAR(191) NULL, + `billPostalCode` VARCHAR(191) NULL, + `billCountry` VARCHAR(191) NULL, + `shipStreet` VARCHAR(191) NULL, + `shipCity` VARCHAR(191) NULL, + `shipState` VARCHAR(191) NULL, + `shipPostalCode` VARCHAR(191) NULL, + `shipCountry` VARCHAR(191) NULL, + `discountPercentage` DECIMAL(65, 30) NOT NULL, + `discountAmount` DECIMAL(65, 30) NOT NULL, + `serviceChargeAmount` DECIMAL(65, 30) NOT NULL, + `taxAmount` DECIMAL(65, 30) NOT NULL, + `roundingAmount` DECIMAL(65, 30) NOT NULL, + `subtotalAmount` DECIMAL(65, 30) NOT NULL, + `totalAmount` DECIMAL(65, 30) NOT NULL, + `paidAmount` DECIMAL(65, 30) NOT NULL, + `status` VARCHAR(191) NOT NULL, + `remark` VARCHAR(191) NULL, + `declarationSessionId` INTEGER NOT NULL, + `eodId` INTEGER NOT NULL, + `salesQuotationId` INTEGER NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SalesItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `salesId` INTEGER NOT NULL, + `itemId` INTEGER NOT NULL, + `quantity` DECIMAL(65, 30) NOT NULL, + `remark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SalesQuotation` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `outletId` INTEGER NOT NULL, + `customerId` INTEGER NULL, + `customerStreet` VARCHAR(191) NULL, + `customerCity` VARCHAR(191) NULL, + `customerState` VARCHAR(191) NULL, + `customerPostalCode` VARCHAR(191) NULL, + `customerCountry` VARCHAR(191) NULL, + `discountPercentage` DECIMAL(65, 30) NOT NULL, + `discountAmount` DECIMAL(65, 30) NOT NULL, + `serviceChargeAmount` DECIMAL(65, 30) NOT NULL, + `taxAmount` DECIMAL(65, 30) NOT NULL, + `roundingAmount` DECIMAL(65, 30) NOT NULL, + `subtotalAmount` DECIMAL(65, 30) NOT NULL, + `totalAmount` DECIMAL(65, 30) NOT NULL, + `status` VARCHAR(191) NOT NULL, + `remark` VARCHAR(191) NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SalesQuotationItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `salesQuotationId` INTEGER NOT NULL, + `itemId` INTEGER NOT NULL, + `quantity` DECIMAL(65, 30) NOT NULL, + `remark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `DeliveryOrder` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `outletId` INTEGER NOT NULL, + `customerId` INTEGER NULL, + `deliveryStreet` VARCHAR(191) NULL, + `deliveryCity` VARCHAR(191) NULL, + `deliveryState` VARCHAR(191) NULL, + `deliveryPostalCode` VARCHAR(191) NULL, + `deliveryCountry` VARCHAR(191) NULL, + `status` VARCHAR(191) NOT NULL, + `remark` VARCHAR(191) NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `DeliveryOrderItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `deliveryOrderId` INTEGER NOT NULL, + `itemId` INTEGER NOT NULL, + `quantity` DECIMAL(65, 30) NOT NULL, + `remark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `PurchaseOrder` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `outletId` INTEGER NOT NULL, + `supplierId` INTEGER NULL, + `supplierStreet` VARCHAR(191) NULL, + `supplierCity` VARCHAR(191) NULL, + `supplierState` VARCHAR(191) NULL, + `supplierPostalCode` VARCHAR(191) NULL, + `supplierCountry` VARCHAR(191) NULL, + `discountPercentage` DECIMAL(65, 30) NOT NULL, + `discountAmount` DECIMAL(65, 30) NOT NULL, + `serviceChargeAmount` DECIMAL(65, 30) NOT NULL, + `taxAmount` DECIMAL(65, 30) NOT NULL, + `roundingAmount` DECIMAL(65, 30) NOT NULL, + `subtotalAmount` DECIMAL(65, 30) NOT NULL, + `totalAmount` DECIMAL(65, 30) NOT NULL, + `status` VARCHAR(191) NOT NULL, + `remark` VARCHAR(191) NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `PurchaseOrderItem` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `purchaseOrderId` INTEGER NOT NULL, + `itemId` INTEGER NOT NULL, + `quantity` DECIMAL(65, 30) NOT NULL, + `remark` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Payment` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `method` VARCHAR(191) NOT NULL, + `tenderedAmount` DECIMAL(65, 30) NOT NULL, + `paidAmount` DECIMAL(65, 30) NOT NULL, + `currencySymbol` VARCHAR(191) NOT NULL, + `salesId` INTEGER NOT NULL, + `reference` VARCHAR(191) NULL, + `remark` VARCHAR(191) NULL, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `businessDate` DATETIME(3) NOT NULL, + `status` VARCHAR(191) NOT NULL, + `outletId` INTEGER NOT NULL, + `declarationSessionId` INTEGER NOT NULL, + `eodId` INTEGER NOT NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `RegisterLog` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `type` VARCHAR(191) NOT NULL, + `modifiedAmount` DECIMAL(65, 30) NOT NULL, + `currencySymbol` VARCHAR(191) NOT NULL, + `salesId` INTEGER NOT NULL, + `remark` VARCHAR(191) NULL, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `status` VARCHAR(191) NOT NULL, + `outletId` INTEGER NOT NULL, + `declarationSessionId` INTEGER NOT NULL, + `eodId` INTEGER NOT NULL, + `performedBy` INTEGER NOT NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `CardInfo` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `paymentId` INTEGER NOT NULL, + `cardNumber` VARCHAR(191) NULL, + `cardExpiry` VARCHAR(191) NULL, + `traceNumber` VARCHAR(191) NULL, + `type2` VARCHAR(191) NULL, + `type3` VARCHAR(191) NULL, + `cardRate` DECIMAL(65, 30) NULL, + `appCode` VARCHAR(191) NULL, + `cardType` VARCHAR(191) NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Declaration` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `deviceId` INTEGER NOT NULL, + `outletId` INTEGER NOT NULL, + `eodId` INTEGER NOT NULL, + `openingDateTime` DATETIME(3) NULL, + `closingDateTime` DATETIME(3) NULL, + `businessDate` DATETIME(3) NOT NULL, + `verifiedBy` INTEGER NULL, + `openedBy` INTEGER NULL, + `closedBy` INTEGER NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `EOD` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `deviceId` INTEGER NOT NULL, + `outletId` INTEGER NOT NULL, + `openingDateTime` DATETIME(3) NULL, + `closingDateTime` DATETIME(3) NULL, + `businessDate` DATETIME(3) NOT NULL, + `verifiedBy` INTEGER NULL, + `openedBy` INTEGER NULL, + `closedBy` INTEGER NULL, + `deleted` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20230822101959_init/migration.sql b/prisma/migrations/20230822101959_init/migration.sql new file mode 100644 index 0000000..42383b3 --- /dev/null +++ b/prisma/migrations/20230822101959_init/migration.sql @@ -0,0 +1,510 @@ +/* + Warnings: + + - The primary key for the `EOD` table will be changed. If it partially fails, the table could be left without primary key constraint. + - You are about to drop the column `businessDate` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `closedBy` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `closingDateTime` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `deleted` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `deviceId` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `id` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `openedBy` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `openingDateTime` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `outletId` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the column `verifiedBy` on the `EOD` table. All the data in the column will be lost. + - You are about to drop the `CardInfo` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Company` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Customer` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Declaration` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `DeliveryOrder` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `DeliveryOrderItem` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Item` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Outlet` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Payment` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `PurchaseOrder` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `PurchaseOrderItem` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Referral` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `RefreshToken` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `RegisterLog` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Sales` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `SalesItem` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `SalesQuotation` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `SalesQuotationItem` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `Supplier` table. If the table is not empty, all the data it contains will be lost. + - You are about to drop the `User` table. If the table is not empty, all the data it contains will be lost. + - Added the required column `BUSINESS_DATE` to the `EOD` table without a default value. This is not possible if the table is not empty. + - Added the required column `DEVICE_ID` to the `EOD` table without a default value. This is not possible if the table is not empty. + - Added the required column `ID` to the `EOD` table without a default value. This is not possible if the table is not empty. + - Added the required column `OUTLET_ID` to the `EOD` table without a default value. This is not possible if the table is not empty. + +*/ +-- AlterTable +ALTER TABLE `EOD` DROP PRIMARY KEY, + DROP COLUMN `businessDate`, + DROP COLUMN `closedBy`, + DROP COLUMN `closingDateTime`, + DROP COLUMN `deleted`, + DROP COLUMN `deviceId`, + DROP COLUMN `id`, + DROP COLUMN `openedBy`, + DROP COLUMN `openingDateTime`, + DROP COLUMN `outletId`, + DROP COLUMN `verifiedBy`, + ADD COLUMN `BUSINESS_DATE` DATETIME(3) NOT NULL, + ADD COLUMN `CLOSED_BY` INTEGER NULL, + ADD COLUMN `CLOSING_DATE_TIME` DATETIME(3) NULL, + ADD COLUMN `DEVICE_ID` INTEGER NOT NULL, + ADD COLUMN `ID` INTEGER NOT NULL AUTO_INCREMENT, + ADD COLUMN `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + ADD COLUMN `OPENED_BY` INTEGER NULL, + ADD COLUMN `OPENING_DATE_TIME` DATETIME(3) NULL, + ADD COLUMN `OUTLET_ID` INTEGER NOT NULL, + ADD COLUMN `VERIFIED_BY` INTEGER NULL, + ADD PRIMARY KEY (`ID`); + +-- DropTable +DROP TABLE `CardInfo`; + +-- DropTable +DROP TABLE `Company`; + +-- DropTable +DROP TABLE `Customer`; + +-- DropTable +DROP TABLE `Declaration`; + +-- DropTable +DROP TABLE `DeliveryOrder`; + +-- DropTable +DROP TABLE `DeliveryOrderItem`; + +-- DropTable +DROP TABLE `Item`; + +-- DropTable +DROP TABLE `Outlet`; + +-- DropTable +DROP TABLE `Payment`; + +-- DropTable +DROP TABLE `PurchaseOrder`; + +-- DropTable +DROP TABLE `PurchaseOrderItem`; + +-- DropTable +DROP TABLE `Referral`; + +-- DropTable +DROP TABLE `RefreshToken`; + +-- DropTable +DROP TABLE `RegisterLog`; + +-- DropTable +DROP TABLE `Sales`; + +-- DropTable +DROP TABLE `SalesItem`; + +-- DropTable +DROP TABLE `SalesQuotation`; + +-- DropTable +DROP TABLE `SalesQuotationItem`; + +-- DropTable +DROP TABLE `Supplier`; + +-- DropTable +DROP TABLE `User`; + +-- CreateTable +CREATE TABLE `USER` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `USERNAME` VARCHAR(191) NOT NULL, + `PASSWORD` VARCHAR(191) NOT NULL, + `LAST_NAME` VARCHAR(191) NULL, + `FIRST_NAME` VARCHAR(191) NULL, + `MOBILE` VARCHAR(191) NULL, + `EMAIL` VARCHAR(191) NULL, + `ROLE` VARCHAR(191) NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `USER_USERNAME_key`(`USERNAME`), + UNIQUE INDEX `USER_MOBILE_key`(`MOBILE`), + UNIQUE INDEX `USER_EMAIL_key`(`EMAIL`), + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `REFRESH_TOKEN` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `USER_ID` INTEGER NOT NULL, + `USER_TYPE` VARCHAR(191) NOT NULL, + `TOKEN` VARCHAR(191) NOT NULL, + `EXPIRED` DATETIME(3) NULL, + `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `CREATED_BY` VARCHAR(191) NULL, + `IS_REVOKED` DATETIME(3) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `REFERRAL` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `USERNAME` VARCHAR(191) NOT NULL, + `PASSWORD` VARCHAR(191) NOT NULL, + `LAST_NAME` VARCHAR(191) NULL, + `FIRST_NAME` VARCHAR(191) NULL, + `MOBILE` VARCHAR(191) NULL, + `EMAIL` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `REFERRAL_USERNAME_key`(`USERNAME`), + UNIQUE INDEX `REFERRAL_MOBILE_key`(`MOBILE`), + UNIQUE INDEX `REFERRAL_EMAIL_key`(`EMAIL`), + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SUPPLIER` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `COMPANY_NAME` VARCHAR(191) NOT NULL, + `COMPANY_STREET` VARCHAR(191) NOT NULL, + `COMPANY_CITY` VARCHAR(191) NOT NULL, + `COMPANY_STATE` VARCHAR(191) NOT NULL, + `COMPANY_POSTAL_CODE` VARCHAR(191) NOT NULL, + `COMPANY_COUNTRY` VARCHAR(191) NOT NULL, + `COMPANY_REGISTRATION_NUMBER` VARCHAR(191) NOT NULL, + `PERSON_IN_CHARGE_LAST_NAME` VARCHAR(191) NULL, + `PERSON_IN_CHARGE_FIRST_NAME` VARCHAR(191) NULL, + `MOBILE` VARCHAR(191) NULL, + `EMAIL` VARCHAR(191) NULL, + `REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `CUSTOMER` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `SALUTATION` VARCHAR(191) NULL, + `LAST_NAME` VARCHAR(191) NULL, + `FIRST_NAME` VARCHAR(191) NULL, + `MOBILE` VARCHAR(191) NULL, + `EMAIL` VARCHAR(191) NULL, + `GENDER` VARCHAR(191) NULL, + `BILL_STREET` VARCHAR(191) NULL, + `BILL_CITY` VARCHAR(191) NULL, + `BILL_STATE` VARCHAR(191) NULL, + `BILL_POSTAL_CODE` VARCHAR(191) NULL, + `BILL_COUNTRY` VARCHAR(191) NULL, + `BILL_REMARK` VARCHAR(191) NULL, + `SHIP_STREET` VARCHAR(191) NULL, + `SHIP_CITY` VARCHAR(191) NULL, + `SHIP_STATE` VARCHAR(191) NULL, + `SHIP_POSTAL_CODE` VARCHAR(191) NULL, + `SHIP_COUNTRY` VARCHAR(191) NULL, + `SHIP_REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `COMPANY` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `COMPANY_NAME` VARCHAR(191) NOT NULL, + `STREET` VARCHAR(191) NOT NULL, + `CITY` VARCHAR(191) NOT NULL, + `STATE` VARCHAR(191) NOT NULL, + `POSTAL_CODE` VARCHAR(191) NOT NULL, + `COUNTRY` VARCHAR(191) NOT NULL, + `REGISTRATION_NUMBER` VARCHAR(191) NOT NULL, + `WEBSITE` VARCHAR(191) NULL, + `REFERRAL_ID` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `COMPANY_REGISTRATION_NUMBER_key`(`REGISTRATION_NUMBER`), + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `OUTLET` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `OUTLET_NAME` VARCHAR(191) NOT NULL, + `STREET` VARCHAR(191) NULL, + `CITY` VARCHAR(191) NULL, + `STATE` VARCHAR(191) NULL, + `POSTAL_CODE` VARCHAR(191) NULL, + `COUNTRY` VARCHAR(191) NULL, + `OUTLET_TEL` VARCHAR(191) NULL, + `OUTLET_EMAIL` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `ITEM` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `ITEM_CODE` VARCHAR(191) NOT NULL, + `ITEM_NAME` VARCHAR(191) NOT NULL, + `ITEM_TYPE` VARCHAR(191) NULL, + `ITEM_MODEL` VARCHAR(191) NULL, + `ITEM_BRAND` VARCHAR(191) NULL, + `ITEM_DESCRIPTION` VARCHAR(191) NULL, + `CATEGORY` VARCHAR(191) NULL, + `COST` DECIMAL(65, 30) NOT NULL, + `PRICE` DECIMAL(65, 30) NOT NULL, + `IS_OPEN_PRICE` BOOLEAN NOT NULL DEFAULT false, + `UNIT_OF_MEASURE` VARCHAR(191) NULL, + `HEIGHT` DECIMAL(65, 30) NOT NULL, + `WIDTH` DECIMAL(65, 30) NOT NULL, + `LENGTH` DECIMAL(65, 30) NOT NULL, + `WEIGHT` DECIMAL(65, 30) NOT NULL, + `ALTERNATE_LOOKUP` VARCHAR(191) NULL, + `IMAGE` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + UNIQUE INDEX `ITEM_ITEM_CODE_key`(`ITEM_CODE`), + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SALES` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `OUTLET_ID` INTEGER NOT NULL, + `BUSINESS_DATE` DATETIME(3) NOT NULL, + `SALES_TYPE` VARCHAR(191) NULL, + `CUSTOMER_ID` INTEGER NULL, + `BILL_STREET` VARCHAR(191) NULL, + `BILL_CITY` VARCHAR(191) NULL, + `BILL_STATE` VARCHAR(191) NULL, + `BILL_POSTAL_CODE` VARCHAR(191) NULL, + `BILL_COUNTRY` VARCHAR(191) NULL, + `SHIP_STREET` VARCHAR(191) NULL, + `SHIP_CITY` VARCHAR(191) NULL, + `SHIP_STATE` VARCHAR(191) NULL, + `SHIP_POSTAL_CODE` VARCHAR(191) NULL, + `SHIP_COUNTRY` VARCHAR(191) NULL, + `DISCOUNT_PERCENTAGE` DECIMAL(65, 30) NOT NULL, + `DISCOUNT_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SERVICE_CHARGE_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TAX_AMOUNT` DECIMAL(65, 30) NOT NULL, + `ROUNDING_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SUBTOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `PAID_AMOUNT` DECIMAL(65, 30) NOT NULL, + `STATUS` VARCHAR(191) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `DECLARATION_SESSION_ID` INTEGER NOT NULL, + `EOD_ID` INTEGER NOT NULL, + `SALES_QUOTATION_ID` INTEGER NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SALES_ITEM` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `SALES_ID` INTEGER NOT NULL, + `ITEM_ID` INTEGER NOT NULL, + `QUANTITY` DECIMAL(65, 30) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SALES_QUOTATION` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `OUTLET_ID` INTEGER NOT NULL, + `CUSTOMER_ID` INTEGER NULL, + `CUSTOMER_STREET` VARCHAR(191) NULL, + `CUSTOMER_CITY` VARCHAR(191) NULL, + `CUSTOMER_STATE` VARCHAR(191) NULL, + `CUSTOMER_POSTAL_CODE` VARCHAR(191) NULL, + `CUSTOMER_COUNTRY` VARCHAR(191) NULL, + `DISCOUNT_PERCENTAGE` DECIMAL(65, 30) NOT NULL, + `DISCOUNT_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SERVICE_CHARGE_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TAX_AMOUNT` DECIMAL(65, 30) NOT NULL, + `ROUNDING_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SUBTOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `STATUS` VARCHAR(191) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `SALES_QUoTATION_ITEM` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `SALES_QUOTATION_ID` INTEGER NOT NULL, + `ITEM_ID` INTEGER NOT NULL, + `QUANTITY` DECIMAL(65, 30) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `DELIVERY_ORDER` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `OUTLET_ID` INTEGER NOT NULL, + `CUSTOMER_ID` INTEGER NULL, + `DELIVERY_STREET` VARCHAR(191) NULL, + `DELIVERY_CITY` VARCHAR(191) NULL, + `DELIVERY_STATE` VARCHAR(191) NULL, + `DELIVERY_POSTAL_CODE` VARCHAR(191) NULL, + `DELIVERY_COUNTRY` VARCHAR(191) NULL, + `STATUS` VARCHAR(191) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `DELIVERY_ORDER_ITEM` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `DELIVERY_ORDER_ID` INTEGER NOT NULL, + `ITEM_ID` INTEGER NOT NULL, + `QUANTITY` DECIMAL(65, 30) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `PURCHASE_ORDER` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `created` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `OUTLET_ID` INTEGER NOT NULL, + `SUPPLIER_ID` INTEGER NULL, + `SUPPLIER_STREET` VARCHAR(191) NULL, + `SUPPLIER_CITY` VARCHAR(191) NULL, + `SUPPLIER_STATE` VARCHAR(191) NULL, + `SUPPLIER_POSTAL_CODE` VARCHAR(191) NULL, + `SUPPLIER_COUNTRY` VARCHAR(191) NULL, + `DISCOUNT_PERCENTAGE` DECIMAL(65, 30) NOT NULL, + `DISCOUNT_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SERVICE_CHARGE_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TAX_AMOUNT` DECIMAL(65, 30) NOT NULL, + `ROUNDING_AMOUNT` DECIMAL(65, 30) NOT NULL, + `SUBTOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `TOTAL_AMOUNT` DECIMAL(65, 30) NOT NULL, + `STATUS` VARCHAR(191) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `PURCHASE_ORDER_ITEM` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `PURCHASE_ORDER_ID` INTEGER NOT NULL, + `ITEM_ID` INTEGER NOT NULL, + `QUANTITY` DECIMAL(65, 30) NOT NULL, + `REMARK` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `PAYMENT` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `PAYMENT` VARCHAR(191) NOT NULL, + `TENDERED_AMOUNT` DECIMAL(65, 30) NOT NULL, + `PAID_AMOUNT` DECIMAL(65, 30) NOT NULL, + `CURRENCY_SYMBOL` VARCHAR(191) NOT NULL, + `SALES_ID` INTEGER NOT NULL, + `REFERENCE` VARCHAR(191) NULL, + `REMARK` VARCHAR(191) NULL, + `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `BUSINESS_DATE` DATETIME(3) NOT NULL, + `STATUS` VARCHAR(191) NOT NULL, + `OUTLET_ID` INTEGER NOT NULL, + `DECLARATION_SESSION_ID` INTEGER NOT NULL, + `EOD_ID` INTEGER NOT NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `REGISTER_LOG` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `TYPE` VARCHAR(191) NOT NULL, + `MODIFIED_AMOUNT` DECIMAL(65, 30) NOT NULL, + `CURRENCY_SYMBOL` VARCHAR(191) NOT NULL, + `SALES_ID` INTEGER NOT NULL, + `REMARK` VARCHAR(191) NULL, + `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + `STATUS` VARCHAR(191) NOT NULL, + `OUTLET_ID` INTEGER NOT NULL, + `DECLARATION_SESSION_ID` INTEGER NOT NULL, + `EOD_ID` INTEGER NOT NULL, + `PERFORMED_BY` INTEGER NOT NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `CARD_INFO` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `PAYMENT_ID` INTEGER NOT NULL, + `CARD_NUMBER` VARCHAR(191) NULL, + `CARD_EXPIRY` VARCHAR(191) NULL, + `TRACE_NUMBER` VARCHAR(191) NULL, + `TYPE_2` VARCHAR(191) NULL, + `TYPE_3` VARCHAR(191) NULL, + `cardRate` DECIMAL(65, 30) NULL, + `APP_CODE` VARCHAR(191) NULL, + `CARD_TYPE` VARCHAR(191) NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `DECLARATION` ( + `ID` INTEGER NOT NULL AUTO_INCREMENT, + `DEVICE_ID` INTEGER NOT NULL, + `OUTLET_ID` INTEGER NOT NULL, + `EOD_ID` INTEGER NOT NULL, + `OPENING_DATE_TIME` DATETIME(3) NULL, + `CLOSING_DATE_TIME` DATETIME(3) NULL, + `BUSINESS_DATE` DATETIME(3) NOT NULL, + `VERIFIED_BY` INTEGER NULL, + `OPENED_BY` INTEGER NULL, + `CLOSED_BY` INTEGER NULL, + `IS_DELETED` BOOLEAN NOT NULL DEFAULT false, + + PRIMARY KEY (`ID`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20230824141112_modified_refresh_token_column_name/migration.sql b/prisma/migrations/20230824141112_modified_refresh_token_column_name/migration.sql new file mode 100644 index 0000000..d814a6f --- /dev/null +++ b/prisma/migrations/20230824141112_modified_refresh_token_column_name/migration.sql @@ -0,0 +1,27 @@ +/* + Warnings: + + - You are about to drop the column `cardRate` on the `CARD_INFO` table. All the data in the column will be lost. + - You are about to drop the column `created` on the `DELIVERY_ORDER` table. All the data in the column will be lost. + - You are about to drop the column `created` on the `PURCHASE_ORDER` table. All the data in the column will be lost. + - You are about to drop the column `EXPIRED` on the `REFRESH_TOKEN` table. All the data in the column will be lost. + - You are about to drop the column `IS_REVOKED` on the `REFRESH_TOKEN` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE `CARD_INFO` DROP COLUMN `cardRate`, + ADD COLUMN `CARD_RATE` DECIMAL(65, 30) NULL; + +-- AlterTable +ALTER TABLE `DELIVERY_ORDER` DROP COLUMN `created`, + ADD COLUMN `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3); + +-- AlterTable +ALTER TABLE `PURCHASE_ORDER` DROP COLUMN `created`, + ADD COLUMN `CREATED_DATETIME` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3); + +-- AlterTable +ALTER TABLE `REFRESH_TOKEN` DROP COLUMN `EXPIRED`, + DROP COLUMN `IS_REVOKED`, + ADD COLUMN `EXPIRED_DATETIME` DATETIME(3) NULL, + ADD COLUMN `REVOKED_DATETIME` DATETIME(3) NULL; diff --git a/prisma/migrations/20230825123423_alter_referral_table/migration.sql b/prisma/migrations/20230825123423_alter_referral_table/migration.sql new file mode 100644 index 0000000..e4a4d27 --- /dev/null +++ b/prisma/migrations/20230825123423_alter_referral_table/migration.sql @@ -0,0 +1,31 @@ +/* + Warnings: + + - You are about to drop the column `EMAIL` on the `REFERRAL` table. All the data in the column will be lost. + - You are about to drop the column `FIRST_NAME` on the `REFERRAL` table. All the data in the column will be lost. + - You are about to drop the column `LAST_NAME` on the `REFERRAL` table. All the data in the column will be lost. + - You are about to drop the column `MOBILE` on the `REFERRAL` table. All the data in the column will be lost. + - You are about to drop the column `PASSWORD` on the `REFERRAL` table. All the data in the column will be lost. + - You are about to drop the column `USERNAME` on the `REFERRAL` table. All the data in the column will be lost. + - Added the required column `REFERRAL_ID` to the `REFERRAL` table without a default value. This is not possible if the table is not empty. + - Added the required column `USER_ID` to the `REFERRAL` table without a default value. This is not possible if the table is not empty. + +*/ +-- DropIndex +DROP INDEX `REFERRAL_EMAIL_key` ON `REFERRAL`; + +-- DropIndex +DROP INDEX `REFERRAL_MOBILE_key` ON `REFERRAL`; + +-- DropIndex +DROP INDEX `REFERRAL_USERNAME_key` ON `REFERRAL`; + +-- AlterTable +ALTER TABLE `REFERRAL` DROP COLUMN `EMAIL`, + DROP COLUMN `FIRST_NAME`, + DROP COLUMN `LAST_NAME`, + DROP COLUMN `MOBILE`, + DROP COLUMN `PASSWORD`, + DROP COLUMN `USERNAME`, + ADD COLUMN `REFERRAL_ID` INTEGER NOT NULL, + ADD COLUMN `USER_ID` INTEGER NOT NULL; diff --git a/prisma/migrations/20230825123643_remove_user_type_column/migration.sql b/prisma/migrations/20230825123643_remove_user_type_column/migration.sql new file mode 100644 index 0000000..e5f66d8 --- /dev/null +++ b/prisma/migrations/20230825123643_remove_user_type_column/migration.sql @@ -0,0 +1,8 @@ +/* + Warnings: + + - You are about to drop the column `USER_TYPE` on the `REFRESH_TOKEN` table. All the data in the column will be lost. + +*/ +-- AlterTable +ALTER TABLE `REFRESH_TOKEN` DROP COLUMN `USER_TYPE`; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 0000000..e5a788a --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "mysql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma new file mode 100644 index 0000000..c20329f --- /dev/null +++ b/prisma/schema.prisma @@ -0,0 +1,381 @@ +// This is your Prisma schema file, +// learn more about it in the docs: https://pris.ly/d/prisma-schema + +generator client { + provider = "prisma-client-js" +} + +datasource db { + provider = "mysql" + url = env("DATABASE_URL") + //url = "mysql://root:xilnex123@127.0.0.1:3306/localdatabase" +} + +model User { + id Int @id @default(autoincrement()) @map("ID") + username String @unique @map("USERNAME") + password String @map("PASSWORD") + lastName String? @map("LAST_NAME") + firstName String? @map("FIRST_NAME") + mobile String? @unique @map("MOBILE") + email String? @unique @map("EMAIL") + role String @map("ROLE") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("USER") +} + +model RefreshToken { + id Int @id @default(autoincrement()) @map("ID") + userId Int @map("USER_ID") + token String @map("TOKEN") + expired DateTime? @map("EXPIRED_DATETIME") + created DateTime @default(now()) @map("CREATED_DATETIME") + createdByIP String? @map("CREATED_BY") + revoked DateTime? @map("REVOKED_DATETIME") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("REFRESH_TOKEN") +} + +model Referral { + id Int @id @default(autoincrement()) @map("ID") + userId Int @map("USER_ID") + referralId Int @map("REFERRAL_ID") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("REFERRAL") +} + +model Supplier { + id Int @id @default(autoincrement()) @map("ID") + companyName String @map("COMPANY_NAME") + companyStreet String @map("COMPANY_STREET") + companyCity String @map("COMPANY_CITY") + companyState String @map("COMPANY_STATE") + companyPostalCode String @map("COMPANY_POSTAL_CODE") + companyCountry String @map("COMPANY_COUNTRY") + companyRegisterNumber String @map("COMPANY_REGISTRATION_NUMBER") + personInChargeLastName String? @map("PERSON_IN_CHARGE_LAST_NAME") + personInChargeFirstName String? @map("PERSON_IN_CHARGE_FIRST_NAME") + mobile String? @map("MOBILE") + email String? @map("EMAIL") + remark String? @map("REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("SUPPLIER") +} + +model Customer { + id Int @id @default(autoincrement()) @map("ID") + salutation String? @map("SALUTATION") + lastName String? @map("LAST_NAME") + firstName String? @map("FIRST_NAME") + mobile String? @map("MOBILE") + email String? @map("EMAIL") + gender String? @map("GENDER") + billStreet String? @map("BILL_STREET") + billCity String? @map("BILL_CITY") + billState String? @map("BILL_STATE") + billPostalCode String? @map("BILL_POSTAL_CODE") + billCountry String? @map("BILL_COUNTRY") + billRemark String? @map("BILL_REMARK") + shipStreet String? @map("SHIP_STREET") + shipCity String? @map("SHIP_CITY") + shipState String? @map("SHIP_STATE") + shipPostalCode String? @map("SHIP_POSTAL_CODE") + shipCountry String? @map("SHIP_COUNTRY") + shipRemark String? @map("SHIP_REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("CUSTOMER") +} + +model Company { + id Int @id @default(autoincrement()) @map("ID") + companyName String @map("COMPANY_NAME") + street String @map("STREET") + city String @map("CITY") + state String @map("STATE") + postalCode String @map("POSTAL_CODE") + country String @map("COUNTRY") + registrationNumber String @unique @map("REGISTRATION_NUMBER") + website String? @map("WEBSITE") + referralId String? @map("REFERRAL_ID") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("COMPANY") +} + +model Outlet { + id Int @id @default(autoincrement()) @map("ID") + outletName String @map("OUTLET_NAME") + street String? @map("STREET") + city String? @map("CITY") + state String? @map("STATE") + postalCode String? @map("POSTAL_CODE") + country String? @map("COUNTRY") + outletTel String? @map("OUTLET_TEL") + outletEmail String? @map("OUTLET_EMAIL") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("OUTLET") +} + +model Item { + id Int @id @default(autoincrement()) @map("ID") + itemCode String @unique @map("ITEM_CODE") + itemName String @map("ITEM_NAME") + itemType String? @map("ITEM_TYPE") + itemModel String? @map("ITEM_MODEL") + itemBrand String? @map("ITEM_BRAND") + itemDescription String? @map("ITEM_DESCRIPTION") + category String? @map("CATEGORY") + cost Decimal @map("COST") + price Decimal @map("PRICE") + isOpenPrice Boolean @default(false) @map("IS_OPEN_PRICE") + unitOfMeasure String? @map("UNIT_OF_MEASURE") + height Decimal @map("HEIGHT") + width Decimal @map("WIDTH") + length Decimal @map("LENGTH") + weight Decimal @map("WEIGHT") + alternateLookUp String? @map("ALTERNATE_LOOKUP") + image String? @map("IMAGE") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("ITEM") +} + +model Sales { + id Int @id @default(autoincrement()) @map("ID") + created DateTime @default(now()) @map("CREATED_DATETIME") + outletId Int @map("OUTLET_ID") + businessDate DateTime @map("BUSINESS_DATE") + salesType String? @map("SALES_TYPE") + customerId Int? @map("CUSTOMER_ID") + billStreet String? @map("BILL_STREET") + billCity String? @map("BILL_CITY") + billState String? @map("BILL_STATE") + billPostalCode String? @map("BILL_POSTAL_CODE") + billCountry String? @map("BILL_COUNTRY") + shipStreet String? @map("SHIP_STREET") + shipCity String? @map("SHIP_CITY") + shipState String? @map("SHIP_STATE") + shipPostalCode String? @map("SHIP_POSTAL_CODE") + shipCountry String? @map("SHIP_COUNTRY") + discountPercentage Decimal @map("DISCOUNT_PERCENTAGE") + discountAmount Decimal @map("DISCOUNT_AMOUNT") + serviceChargeAmount Decimal @map("SERVICE_CHARGE_AMOUNT") + taxAmount Decimal @map("TAX_AMOUNT") + roundingAmount Decimal @map("ROUNDING_AMOUNT") + subtotalAmount Decimal @map("SUBTOTAL_AMOUNT") + totalAmount Decimal @map("TOTAL_AMOUNT") + paidAmount Decimal @map("PAID_AMOUNT") + status String @map("STATUS") + remark String? @map("REMARK") + declarationSessionId Int @map("DECLARATION_SESSION_ID") + eodId Int @map("EOD_ID") + salesQuotationId Int? @map("SALES_QUOTATION_ID") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("SALES") +} + +model SalesItem { + id Int @id @default(autoincrement()) @map("ID") + salesId Int @map("SALES_ID") + itemId Int @map("ITEM_ID") + quantity Decimal @map("QUANTITY") + remark String? @map("REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("SALES_ITEM") +} + +model SalesQuotation { + id Int @id @default(autoincrement()) @map("ID") + created DateTime @default(now()) @map("CREATED_DATETIME") + outletId Int @map("OUTLET_ID") + customerId Int? @map("CUSTOMER_ID") + customerStreet String? @map("CUSTOMER_STREET") + customerCity String? @map("CUSTOMER_CITY") + customerState String? @map("CUSTOMER_STATE") + customerPostalCode String? @map("CUSTOMER_POSTAL_CODE") + customerCountry String? @map("CUSTOMER_COUNTRY") + discountPercentage Decimal @map("DISCOUNT_PERCENTAGE") + discountAmount Decimal @map("DISCOUNT_AMOUNT") + serviceChargeAmount Decimal @map("SERVICE_CHARGE_AMOUNT") + taxAmount Decimal @map("TAX_AMOUNT") + roundingAmount Decimal @map("ROUNDING_AMOUNT") + subtotalAmount Decimal @map("SUBTOTAL_AMOUNT") + totalAmount Decimal @map("TOTAL_AMOUNT") + status String @map("STATUS") + remark String? @map("REMARK") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("SALES_QUOTATION") +} + +model SalesQuotationItem { + id Int @id @default(autoincrement()) @map("ID") + salesQuotationId Int @map("SALES_QUOTATION_ID") + itemId Int @map("ITEM_ID") + quantity Decimal @map("QUANTITY") + remark String? @map("REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("SALES_QUoTATION_ITEM") +} + +model DeliveryOrder { + id Int @id @default(autoincrement()) @map("ID") + created DateTime @default(now()) @map("CREATED_DATETIME") + outletId Int @map("OUTLET_ID") + customerId Int? @map("CUSTOMER_ID") + deliveryStreet String? @map("DELIVERY_STREET") + deliveryCity String? @map("DELIVERY_CITY") + deliveryState String? @map("DELIVERY_STATE") + deliveryPostalCode String? @map("DELIVERY_POSTAL_CODE") + deliveryCountry String? @map("DELIVERY_COUNTRY") + status String @map("STATUS") + remark String? @map("REMARK") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("DELIVERY_ORDER") +} + +model DeliveryOrderItem { + id Int @id @default(autoincrement()) @map("ID") + deliveryOrderId Int @map("DELIVERY_ORDER_ID") + itemId Int @map("ITEM_ID") + quantity Decimal @map("QUANTITY") + remark String? @map("REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("DELIVERY_ORDER_ITEM") +} + +model PurchaseOrder { + id Int @id @default(autoincrement()) @map("ID") + created DateTime @default(now()) @map("CREATED_DATETIME") + outletId Int @map("OUTLET_ID") + supplierId Int? @map("SUPPLIER_ID") + supplierStreet String? @map("SUPPLIER_STREET") + supplierCity String? @map("SUPPLIER_CITY") + supplierState String? @map("SUPPLIER_STATE") + supplierPostalCode String? @map("SUPPLIER_POSTAL_CODE") + supplierCountry String? @map("SUPPLIER_COUNTRY") + discountPercentage Decimal @map("DISCOUNT_PERCENTAGE") + discountAmount Decimal @map("DISCOUNT_AMOUNT") + serviceChargeAmount Decimal @map("SERVICE_CHARGE_AMOUNT") + taxAmount Decimal @map("TAX_AMOUNT") + roundingAmount Decimal @map("ROUNDING_AMOUNT") + subtotalAmount Decimal @map("SUBTOTAL_AMOUNT") + totalAmount Decimal @map("TOTAL_AMOUNT") + status String @map("STATUS") + remark String? @map("REMARK") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("PURCHASE_ORDER") +} + +model PurchaseOrderItem { + id Int @id @default(autoincrement()) @map("ID") + purchaseOrderId Int @map("PURCHASE_ORDER_ID") + itemId Int @map("ITEM_ID") + quantity Decimal @map("QUANTITY") + remark String? @map("REMARK") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("PURCHASE_ORDER_ITEM") +} + +model Payment { + id Int @id @default(autoincrement()) @map("ID") + method String @map("PAYMENT") + tenderedAmount Decimal @map("TENDERED_AMOUNT") + paidAmount Decimal @map("PAID_AMOUNT") + currencySymbol String @map("CURRENCY_SYMBOL") + salesId Int @map("SALES_ID") + reference String? @map("REFERENCE") + remark String? @map("REMARK") + created DateTime @default(now()) @map("CREATED_DATETIME") + businessDate DateTime @map("BUSINESS_DATE") + status String @map("STATUS") + outletId Int @map("OUTLET_ID") + declarationSessionId Int @map("DECLARATION_SESSION_ID") + eodId Int @map("EOD_ID") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("PAYMENT") +} + +model RegisterLog { + id Int @id @default(autoincrement()) @map("ID") + type String @map("TYPE") + modifiedAmount Decimal @map("MODIFIED_AMOUNT") + currencySymbol String @map("CURRENCY_SYMBOL") + salesId Int @map("SALES_ID") + remark String? @map("REMARK") + created DateTime @default(now()) @map("CREATED_DATETIME") + status String @map("STATUS") + outletId Int @map("OUTLET_ID") + declarationSessionId Int @map("DECLARATION_SESSION_ID") + eodId Int @map("EOD_ID") + performedBy Int @map("PERFORMED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("REGISTER_LOG") +} + +model CardInfo { + id Int @id @default(autoincrement()) @map("ID") + paymentId Int @map("PAYMENT_ID") + cardNumber String? @map("CARD_NUMBER") + cardExpiry String? @map("CARD_EXPIRY") + traceNumber String? @map("TRACE_NUMBER") + type2 String? @map("TYPE_2") + type3 String? @map("TYPE_3") + cardRate Decimal? @map("CARD_RATE") + appCode String? @map("APP_CODE") + cardType String? @map("CARD_TYPE") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("CARD_INFO") +} + +model Declaration { + id Int @id @default(autoincrement()) @map("ID") + deviceId Int @map("DEVICE_ID") + outletId Int @map("OUTLET_ID") + eodId Int @map("EOD_ID") + openingDateTime DateTime? @map("OPENING_DATE_TIME") + closingDateTime DateTime? @map("CLOSING_DATE_TIME") + businessDate DateTime @map("BUSINESS_DATE") + verifiedBy Int? @map("VERIFIED_BY") + openedBy Int? @map("OPENED_BY") + closedBy Int? @map("CLOSED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("DECLARATION") +} + +model EOD { + id Int @id @default(autoincrement()) @map("ID") + deviceId Int @map("DEVICE_ID") + outletId Int @map("OUTLET_ID") + openingDateTime DateTime? @map("OPENING_DATE_TIME") + closingDateTime DateTime? @map("CLOSING_DATE_TIME") + businessDate DateTime @map("BUSINESS_DATE") + verifiedBy Int? @map("VERIFIED_BY") + openedBy Int? @map("OPENED_BY") + closedBy Int? @map("CLOSED_BY") + deleted Boolean @default(false) @map("IS_DELETED") + + @@map("EOD") +} \ No newline at end of file diff --git a/src/_test-helpers/create-test-user.ts b/src/_test-helpers/create-test-user.ts new file mode 100644 index 0000000..c86830b --- /dev/null +++ b/src/_test-helpers/create-test-user.ts @@ -0,0 +1,20 @@ +import bcrypt from 'bcryptjs' +import { PrismaClient } from '@prisma/client' + +const prisma = new PrismaClient() + +export default async () => { + //create test user if the db is empty + const userCount = await prisma.user.count() + if (userCount == 0) { + const user = await prisma.user.create({ + data: { + username: 'test', + password: bcrypt.hashSync('test', 10), + firstName: 'Test', + lastName: 'User', + role: 'tester' + } + }) + } +} \ No newline at end of file diff --git a/src/api-helpers/error.ts b/src/api-helpers/error.ts new file mode 100644 index 0000000..0cbee6c --- /dev/null +++ b/src/api-helpers/error.ts @@ -0,0 +1,40 @@ +export class ResponseError { + errorType: string + errorMessage: string + + constructor(errorType: string, errorMessage: string) { + this.errorType = errorType + this.errorMessage = errorMessage + } +} + +export class BaseError extends Error { + statusCode: number; + + constructor(statusCode: number, message: string) { + super(message) + + Object.setPrototypeOf(this, new.target.prototype); + this.name = Error.constructor.name; + this.statusCode = statusCode; + Error.captureStackTrace(this); + } +} + +export class AuthenticationError extends BaseError {} + +export class NotFoundError extends BaseError { + propertyName: string + + constructor(propertyName: string) { + super(404, `${propertyName} not found.`) + this.propertyName = propertyName + } + +} + +export class RequestValidateError extends BaseError { + constructor(message: string) { + super(400, message) + } +} \ No newline at end of file diff --git a/src/api-helpers/network-request.ts b/src/api-helpers/network-request.ts new file mode 100644 index 0000000..a03be11 --- /dev/null +++ b/src/api-helpers/network-request.ts @@ -0,0 +1,5 @@ +import { Request } from 'express' + +export default interface NetworkRequest extends Request { + body: T +} \ No newline at end of file diff --git a/src/api-helpers/network-response.ts b/src/api-helpers/network-response.ts new file mode 100644 index 0000000..d6a916e --- /dev/null +++ b/src/api-helpers/network-response.ts @@ -0,0 +1,28 @@ +import { BaseError, ResponseError } from './error' + +export default class NetworkResponse { + success: boolean + data?: T + error?: ResponseError + + constructor(success: boolean, data: T) + constructor(success: boolean, error: ResponseError) + constructor(isSuccess: boolean, dataOrError: T | ResponseError) { + this.success = isSuccess + if (dataOrError instanceof ResponseError) { + this.error = dataOrError as ResponseError + } + else { + this.data = dataOrError as T + } + // if (!error) { + // this.success = success, + // this.data = data + // } + // else { + // this.success = success, + // this.errorMessage = errorMessage, + // this.error = error + // } + } +} \ No newline at end of file diff --git a/src/api-helpers/network.ts b/src/api-helpers/network.ts new file mode 100644 index 0000000..f3119fb --- /dev/null +++ b/src/api-helpers/network.ts @@ -0,0 +1,7 @@ +import { Response } from "express"; +import NetworkResponse from "./network-response"; + +export let sendResponse = (res: Response, data: any) => { + const response = new NetworkResponse(true, data) + return res.json(response) +} \ No newline at end of file diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts new file mode 100644 index 0000000..922049d --- /dev/null +++ b/src/auth/auth.controller.ts @@ -0,0 +1,108 @@ +import express, { NextFunction, Request, Response } from "express"; +import authService from "./auth.service"; +import authorizeMiddleware, { UserInfo } from "../middleware/authorize-middleware"; +import NetworkRequest from "../api-helpers/network-request"; +import { AuthenticateRequestBody, RefreshTokenRequestBody, TokenRequestBody } from "./auth.request"; +import { TokenResponseBody, ValidateTokenResponseBody } from "./auth.response"; +import { RefreshToken } from "@prisma/client"; +import { sendResponse } from "../api-helpers/network"; +import { RequestValidateError } from "../api-helpers/error"; +import validator from "validator"; + +const router = express.Router() + +let authenticate = (req: NetworkRequest, res: Response, next: NextFunction) => { + const authenticateBody = req.body + + if (!authenticateBody) { + throw new RequestValidateError('Login failed: body data missing') + } + + if (!authenticateBody.username) { + throw new RequestValidateError('Login failed: [username] not found') + } + + if (!authenticateBody.password) { + throw new RequestValidateError('Login failed: [password] not found') + } + + const ipAddress = req.ip + authService.authenticate(authenticateBody, ipAddress) + .then((response: TokenResponseBody) => sendResponse(res, response)) + .catch(next) +} + +//validate got issue +let validateToken = (req: NetworkRequest, res: Response, next: NextFunction) => { + const tokenBody = req.body + + if (!tokenBody) { + throw new RequestValidateError('Validate failed: body data missing') + } + + if (!tokenBody.token) { + throw new RequestValidateError('Validate failed: [token] not found') + } + + authService.validateToken(tokenBody) + .then((userInfo: UserInfo) => { + const response: ValidateTokenResponseBody = { + verified: true, + userId: userInfo.userId, + username: userInfo.username + } + sendResponse(res, response) + }) + .catch(next) +} + +let refreshToken = (req: NetworkRequest, res: Response, next: NextFunction) => { + const tokenBody = req.body + + if (!tokenBody) { + throw new RequestValidateError('Validate failed: body data missing') + } + + if (!tokenBody.refreshToken) { + throw new RequestValidateError('Validate failed: [refreshToken] not found') + } + + const ipAddress = req.ip + authService.refreshToken(tokenBody, ipAddress) + .then((response: TokenResponseBody) => sendResponse(res, response)) + .catch(next) +} + +let revokeToken = (req: NetworkRequest, res: Response, next: NextFunction) => { + const tokenBody = req.body + + if (!tokenBody) { + throw new RequestValidateError('Validate failed: body data missing') + } + + if (!tokenBody.refreshToken) { + throw new RequestValidateError('Validate failed: [refreshToken] not found') + } + + authService.revokeToken(tokenBody) + .then((revokedToken: RefreshToken) => sendResponse(res, revokedToken)) + .catch(next) +} + +let getRefreshTokens = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('User ID format incorrect') + } + const userId: number = parseInt(req.params.id) + authService.getRefreshTokens(userId) + .then((refreshTokens: RefreshToken[]) => sendResponse(res, refreshTokens)) + .catch(next) +} + +//routes +router.post('/login', authenticate) +router.post('/validate-token', validateToken) +router.post('/refresh-token', refreshToken) +router.post('/revoke-token', authorizeMiddleware, revokeToken) +router.get('/:id/refresh-tokens', authorizeMiddleware, getRefreshTokens) +export = router \ No newline at end of file diff --git a/src/auth/auth.request.ts b/src/auth/auth.request.ts new file mode 100644 index 0000000..7c6f191 --- /dev/null +++ b/src/auth/auth.request.ts @@ -0,0 +1,18 @@ +export interface AuthenticateRequestBody { + username: string, + password: string +} + +export interface TokenRequestBody { + token: string +} + +export interface RefreshTokenRequestBody { + refreshToken: string +} + +export interface ChangePasswordRequestBody { + userId: number, + currentPassword: string, + newPassword: string +} \ No newline at end of file diff --git a/src/auth/auth.response.ts b/src/auth/auth.response.ts new file mode 100644 index 0000000..e95c854 --- /dev/null +++ b/src/auth/auth.response.ts @@ -0,0 +1,10 @@ +export interface TokenResponseBody { + token: string, + refreshToken: string +} + +export interface ValidateTokenResponseBody { + verified: boolean, + userId: number, + username: string +} \ No newline at end of file diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts new file mode 100644 index 0000000..88c0ae0 --- /dev/null +++ b/src/auth/auth.service.ts @@ -0,0 +1,169 @@ +import { jwt_token_secret } from "../../config.json" +import jwt, { MyJwtPayload } from "jsonwebtoken" +import { PrismaClient, RefreshToken, User } from "@prisma/client" +import crypto from 'crypto' +import bcrypt from 'bcryptjs' +import userService from "../users/user.service" +import { AuthenticateRequestBody, RefreshTokenRequestBody, TokenRequestBody } from "./auth.request" +import { TokenResponseBody } from "./auth.response" +import { BaseError, RequestValidateError } from "../api-helpers/error" +import { UserInfo } from "../middleware/authorize-middleware" + +const prisma = new PrismaClient() + +let authenticate = async (req: AuthenticateRequestBody, ipAddress: string) => { + try { + //find user based on username + const user = await prisma.user.findFirst({ + where: { + username: req.username, + } + }) + + //check if user not found or password mismatched, throw error + if (!user || !bcrypt.compareSync(req.password, user.password)) { + throw new RequestValidateError('Username or password is incorrect') + } + + //authentication successful so generate jwt & refresk tokens + const jwtToken = generateJwtToken(user) + const refreshToken = await generateRefreshToken(user, ipAddress) + + const response: TokenResponseBody = { + token: jwtToken, + refreshToken: refreshToken.token + } + return response + } + catch (error) { + throw error + } +} + +let validateToken = async (req: TokenRequestBody) => { + try { + const verified: MyJwtPayload = jwt.verify(req.token, jwt_token_secret) as MyJwtPayload + const userInfo: UserInfo = verified.user + return userInfo + } + catch (error) { + throw error + } +} + +let refreshToken = async (req: RefreshTokenRequestBody, ipAddress: string) => { + try { + const refreshToken = await getRefreshToken(req.refreshToken) + const user = await userService.getById(refreshToken.userId) + + //replace current refresh token with a new one + const newRefreshToken = await generateRefreshToken(user, ipAddress) + await revokeToken(req) + + //generate new jwt + const jwtToken = generateJwtToken(user) + + const response: TokenResponseBody = { + token: jwtToken, + refreshToken: newRefreshToken.token + } + return response + } + catch (error) { + throw error + } +} + +let revokeToken = async (req: RefreshTokenRequestBody) => { + try { + const refreshToken = await getRefreshToken(req.refreshToken) + + //revoke token + const revokedRefreshToken = await prisma.refreshToken.update({ + where: { + id: refreshToken.id + }, + data: { + revoked: new Date(), + deleted: true + } + }) + return revokedRefreshToken + } + catch (error) { + throw error + } +} + +let getRefreshTokens = async (userId: number) => { + try { + //return refresh tokens for user + const refreshTokens = await prisma.refreshToken.findMany({ + where: { + userId: userId + } + }) + return refreshTokens + } + catch (error) { + throw error + } +} + +//helper function + +let getRefreshToken = async (token: string) => { + const refreshToken = await prisma.refreshToken.findFirst({ + where: { + token: token + } + }) + if (!refreshToken || !isTokenActive(refreshToken)) { + throw new RequestValidateError('Invalid refresh token') + } + return refreshToken; +} + +function isTokenActive(refreshToken: RefreshToken) { + if (!refreshToken.expired) { + return false + } + const isExpired = new Date() >= refreshToken.expired + return !refreshToken.revoked && !isExpired +} + +let generateJwtToken = (user: User) => { + // create a jwt token containing the user info that expires in 15 minutes + const userInfo: UserInfo = { + userId: user.id, + username: user.username + } + return jwt.sign({user: userInfo}, jwt_token_secret, { expiresIn: '1h' }); +} + +let generateRefreshToken = async (user: User, ipAddress: string) => { + //create a refresh token that expires in 1 day + try { + var tokenExpiredDate = new Date() + tokenExpiredDate.setDate(tokenExpiredDate.getDate() + 1) + + const refreshTokenObject = await prisma.refreshToken.create({ + data: { + userId: user.id, + token: randomTokenString(), + expired: tokenExpiredDate, + createdByIP: ipAddress + } + }) + return refreshTokenObject + } + catch (e) { + throw e + } +} + +let randomTokenString = () => { + return crypto.randomBytes(40).toString('hex'); +} + +export = { authenticate, validateToken, refreshToken, revokeToken, getRefreshTokens } \ No newline at end of file diff --git a/src/customers/customer.controller.ts b/src/customers/customer.controller.ts new file mode 100644 index 0000000..48b8360 --- /dev/null +++ b/src/customers/customer.controller.ts @@ -0,0 +1,74 @@ +import express, { NextFunction, Request, Response } from "express" +import validator from "validator" +import service from "./customer.service" +import { Customer } from "@prisma/client" +import NetworkRequest from "../api-helpers/network-request" +import { RequestValidateError } from "../api-helpers/error" +import { sendResponse } from "../api-helpers/network" + +const router = express.Router() + +let getAll = (req: Request, res: Response, next: NextFunction) => { + service.getAll() + .then((customers: Customer[]) => sendResponse(res, customers)) + .catch(next) +} + +let getById = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + const supplierId: number = parseInt(req.params.id) + service.getById(supplierId) + .then((customer: Customer) => sendResponse(res, customer)) + .catch(next) +} + +let createMany = (req: NetworkRequest, res: Response, next: NextFunction) => { + const customers = req.body + + service.createMany(customers) + .then((insertedRecordCount: number) => { + var message = `Successfully created ${insertedRecordCount} customers` + if (insertedRecordCount === 1) { + message = message.substring(0, message.length-1) + } + sendResponse(res, message) + }) + .catch(next) +} + +let update = (req: NetworkRequest, res: Response, next: NextFunction) => { + const customer = req.body + + if (!customer) { + throw new RequestValidateError('Update failed: data missing') + } + + if (!customer.id) { + throw new RequestValidateError('Update failed: [id] not found') + } + + service.update(customer) + .then((customer: Customer) => sendResponse(res, "Successfully updated")) + .catch(next) +} + +let remove = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + + const customerId: number = parseInt(req.params.id) + service.remove(customerId) + .then((customer: Customer) => sendResponse(res, "Successfully deleted")) + .catch(next) +} + +//routes +router.get("/", getAll) +router.get('/:id', getById) +router.post('/create', createMany) +router.put('/update', update) +router.delete('/:id', remove) +export = router \ No newline at end of file diff --git a/src/customers/customer.service.ts b/src/customers/customer.service.ts new file mode 100644 index 0000000..5209e9f --- /dev/null +++ b/src/customers/customer.service.ts @@ -0,0 +1,78 @@ +import { PrismaClient, Customer } from "@prisma/client" +import { NotFoundError, RequestValidateError } from "../api-helpers/error" + +const prisma = new PrismaClient() + +let getAll = async () => { + try { + const customers = await prisma.customer.findMany() + return customers + } + catch (error) { + throw error + } +} + +let getById = async (id: number) => { + try { + const customer = await prisma.customer.findUnique({ + where: { + id: id + } + }) + if (!customer) { + throw new NotFoundError("Customer") + } + return customer + } + catch (error) { + throw error + } +} + +let createMany = async (customers: Customer[]) => { + try { + const newCustomers = await prisma.customer.createMany({ + data: customers + }) + + return newCustomers.count + } + catch (error) { + throw error + } +} + +let update = async (customer: Customer) => { + try { + const updatedCustomer = await prisma.customer.update({ + where: { + id: customer.id + }, + data: customer + }) + return updatedCustomer + } + catch (error) { + throw error + } +} + +let remove = async (id: number) => { + try { + const updatedCustomer = await prisma.customer.update({ + where: { + id: id + }, + data: { + deleted: true + } + }) + return updatedCustomer + } + catch (error) { + throw error + } +} + +export = { getAll, getById, createMany, update, remove } \ No newline at end of file diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..847904c --- /dev/null +++ b/src/index.ts @@ -0,0 +1,38 @@ +import express from 'express' +import unless from 'express-unless' +import bodyParser from 'body-parser' +import cors from 'cors' +import createTestUser from './_test-helpers/create-test-user' +import errorMiddleware from './middleware/error-middleware' +import authorizeMiddleware from './middleware/authorize-middleware' +const app = express() +const port = 8080 + +// createTestUser() +app.get('/', (req, res) => res.send('Hello World!')) +app.use(bodyParser.json()) +app.use(express.urlencoded({ extended: false })) +app.use(express.json()) + +// allow cors requests from any origin and with credentials +app.use(cors({ origin: (origin, callback) => callback(null, true), credentials: true })) + + +// auth route need to execute before authentication middleware +// because we need to exclude few path like "\login" since login API doesn't require token to authenticate +app.use('/auth', require('./auth/auth.controller')) + +//authentication middleware +app.use(authorizeMiddleware) + +// all api routes that need authorize should place here +// api routes +app.use('/user', require('./users/user.controller')) +app.use('/item', require('./items/item.controller')) +app.use('/supplier', require('./suppliers/supplier.controller')) +app.use('/customer', require('./customers/customer.controller')) + +//error middleware +app.use(errorMiddleware) + +app.listen(port, () => console.log(`Example app listening on port ${port}!`)) \ No newline at end of file diff --git a/src/items/item.controller.ts b/src/items/item.controller.ts new file mode 100644 index 0000000..6a0531d --- /dev/null +++ b/src/items/item.controller.ts @@ -0,0 +1,74 @@ +import express, { NextFunction, Request, Response } from "express" +import validator from "validator" +import service from "./item.service" +import { Item } from "@prisma/client" +import NetworkRequest from "../api-helpers/network-request" +import { RequestValidateError } from "../api-helpers/error" +import { sendResponse } from "../api-helpers/network" + +const router = express.Router() + +let getAll = (req: Request, res: Response, next: NextFunction) => { + service.getAll() + .then((items: Item[]) => sendResponse(res, items)) + .catch(next) +} + +let getById = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + const itemId: number = parseInt(req.params.id) + service.getById(itemId) + .then((item: Item) => sendResponse(res, item)) + .catch(next) +} + +let createMany = (req: NetworkRequest, res: Response, next: NextFunction) => { + const items = req.body + + service.createMany(items) + .then((insertedRecordCount: number) => { + var message = `Successfully created ${insertedRecordCount} items` + if (insertedRecordCount === 1) { + message = message.substring(0, message.length-1) + } + sendResponse(res, message) + }) + .catch(next) +} + +let update = (req: NetworkRequest, res: Response, next: NextFunction) => { + const item = req.body + + if (!item) { + throw new RequestValidateError('Update failed: data missing') + } + + if (!item.id) { + throw new RequestValidateError('Update failed: [id] not found') + } + + service.update(item) + .then((item: Item) => sendResponse(res, "Successfully updated")) + .catch(next) +} + +let remove = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + + const itemId: number = parseInt(req.params.id) + service.remove(itemId) + .then((item: Item) => sendResponse(res, "Successfully deleted")) + .catch(next) +} + +//routes +router.get("/", getAll) +router.get('/:id', getById) +router.post('/create', createMany) +router.put('/update', update) +router.delete('/:id', remove) +export = router \ No newline at end of file diff --git a/src/items/item.service.ts b/src/items/item.service.ts new file mode 100644 index 0000000..8a0c21d --- /dev/null +++ b/src/items/item.service.ts @@ -0,0 +1,128 @@ +import { PrismaClient, Item } from "@prisma/client" +import { NotFoundError, RequestValidateError } from "../api-helpers/error" + +const prisma = new PrismaClient() + +let getAll = async () => { + try { + const items = await prisma.item.findMany() + return items + } + catch (error) { + throw error + } +} + +let getById = async (id: number) => { + try { + const item = await prisma.item.findUnique({ + where: { + id: id + } + }) + if (!item) { + throw new NotFoundError("Item") + } + return item + } + catch (error) { + throw error + } +} + +let createMany = async (items: Item[]) => { + try { + const newItems = await prisma.item.createMany({ + data: items + }) + + return newItems.count + } + catch (error) { + throw error + } +} + +// let createItem = async (item: Item) => { +// try { +// const newItem = await prisma.item.create({ +// data: item +// // data: { +// // itemCode: item.itemCode, +// // itemName: item.itemName, +// // itemType: item.itemType, +// // itemModel: item.itemModel, +// // itemBrand: item.itemBrand, +// // itemDescription: item.itemDescription, +// // category: item.category, +// // cost: item.cost, +// // price: item.price, +// // isOpenPrice: item.isOpenPrice, +// // unitOfMeasure: item.unitOfMeasure, +// // height: item.height, +// // width: item.width, +// // length: item.length, +// // weight: item.weight, +// // alternateLookUp: item.alternateLookUp, +// // image: item.image +// // } +// }) +// return newItem +// } +// catch (error) { +// throw error +// } +// } + +let update = async (item: Item) => { + try { + const updatedItem = await prisma.item.update({ + where: { + id: item.id + }, + data: item + // data: { + // itemCode: item.itemCode, + // itemName: item.itemName, + // itemType: item.itemType, + // itemModel: item.itemModel, + // itemBrand: item.itemBrand, + // itemDescription: item.itemDescription, + // category: item.category, + // cost: item.cost, + // price: item.price, + // isOpenPrice: item.isOpenPrice, + // unitOfMeasure: item.unitOfMeasure, + // height: item.height, + // width: item.width, + // length: item.length, + // weight: item.weight, + // alternateLookUp: item.alternateLookUp, + // image: item.image, + // } + }) + return updatedItem + } + catch (error) { + throw error + } +} + +let remove = async (id: number) => { + try { + const updatedItem = await prisma.item.update({ + where: { + id: id + }, + data: { + deleted: true + } + }) + return updatedItem + } + catch (error) { + throw error + } +} + +export = { getAll, getById, createMany, update, remove } \ No newline at end of file diff --git a/src/middleware/authorize-middleware.ts b/src/middleware/authorize-middleware.ts new file mode 100644 index 0000000..fd8c540 --- /dev/null +++ b/src/middleware/authorize-middleware.ts @@ -0,0 +1,44 @@ +import { Request, Response, NextFunction } from "express" +import { jwt_token_secret } from "../../config.json" +import jwt, { MyJwtPayload } from "jsonwebtoken" +import { AuthenticationError } from "../api-helpers/error" + +declare module 'jsonwebtoken' { + export interface MyJwtPayload extends jwt.JwtPayload { + user: UserInfo + } +} + +export interface UserInfo { + userId: number, + username: string +} + +export default (req: Request, res: Response, next: NextFunction) => { + const token = req.header('token') + if (token) { + try { + if (token === "goyangkakisdnbhd1234567890") { + next() + } + else { + const payload: MyJwtPayload = jwt.verify(token, jwt_token_secret) as MyJwtPayload + // req.user = payload.user + next() + } + } + catch (error) { + const authenticationError = new AuthenticationError(401, "Invalid token") + // throw authenticationError + next(authenticationError) + return res.status(401).json({ message: 'Invalid token' }) + } + } + else { + const authenticationError = new AuthenticationError(401, "Token not found") + // throw authenticationError + next(authenticationError) + return res.status(401).json({ message: 'Invalid token' }) + } + +} \ No newline at end of file diff --git a/src/middleware/error-middleware.ts b/src/middleware/error-middleware.ts new file mode 100644 index 0000000..584615f --- /dev/null +++ b/src/middleware/error-middleware.ts @@ -0,0 +1,21 @@ +import { NextFunction, Request, Response } from "express"; +import NetworkResponse from "../api-helpers/network-response"; +import { BaseError, ResponseError } from "../api-helpers/error"; +import { Prisma } from "@prisma/client"; + +export default (error: Error, req: Request, res: Response, next: NextFunction) => { + var statusCode: number = 500 + var responseError: ResponseError = new ResponseError(error.constructor.name, error.message) + + if (error instanceof BaseError) { + statusCode = error.statusCode + } + else if (error instanceof Prisma.PrismaClientKnownRequestError) { + responseError.errorMessage = `[Code: ${error.code}] - ${error.message}` + } + + const response = new NetworkResponse(false, responseError) + + res.status(statusCode).json(response) + next(error) // pass it to the next function +} \ No newline at end of file diff --git a/src/suppliers/supplier.controller.ts b/src/suppliers/supplier.controller.ts new file mode 100644 index 0000000..977634c --- /dev/null +++ b/src/suppliers/supplier.controller.ts @@ -0,0 +1,74 @@ +import express, { NextFunction, Request, Response } from "express" +import validator from "validator" +import service from "./supplier.service" +import { Supplier } from "@prisma/client" +import NetworkRequest from "../api-helpers/network-request" +import { RequestValidateError } from "../api-helpers/error" +import { sendResponse } from "../api-helpers/network" + +const router = express.Router() + +let getAll = (req: Request, res: Response, next: NextFunction) => { + service.getAll() + .then((suppliers: Supplier[]) => sendResponse(res, suppliers)) + .catch(next) +} + +let getById = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + const supplierId: number = parseInt(req.params.id) + service.getById(supplierId) + .then((supplier: Supplier) => sendResponse(res, supplier)) + .catch(next) +} + +let createMany = (req: NetworkRequest, res: Response, next: NextFunction) => { + const suppliers = req.body + + service.createMany(suppliers) + .then((insertedRecordCount: number) => { + var message = `Successfully created ${insertedRecordCount} suppliers` + if (insertedRecordCount === 1) { + message = message.substring(0, message.length-1) + } + sendResponse(res, message) + }) + .catch(next) +} + +let update = (req: NetworkRequest, res: Response, next: NextFunction) => { + const supplier = req.body + + if (!supplier) { + throw new RequestValidateError('Update failed: data missing') + } + + if (!supplier.id) { + throw new RequestValidateError('Update failed: [id] not found') + } + + service.update(supplier) + .then((supplier: Supplier) => sendResponse(res, "Successfully updated")) + .catch(next) +} + +let remove = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + + const supplierId: number = parseInt(req.params.id) + service.remove(supplierId) + .then((supplier: Supplier) => sendResponse(res, "Successfully deleted")) + .catch(next) +} + +//routes +router.get("/", getAll) +router.get('/:id', getById) +router.post('/create', createMany) +router.put('/update', update) +router.delete('/:id', remove) +export = router \ No newline at end of file diff --git a/src/suppliers/supplier.service.ts b/src/suppliers/supplier.service.ts new file mode 100644 index 0000000..ba58cd6 --- /dev/null +++ b/src/suppliers/supplier.service.ts @@ -0,0 +1,128 @@ +import { PrismaClient, Supplier } from "@prisma/client" +import { NotFoundError, RequestValidateError } from "../api-helpers/error" + +const prisma = new PrismaClient() + +let getAll = async () => { + try { + const suppliers = await prisma.supplier.findMany() + return suppliers + } + catch (error) { + throw error + } +} + +let getById = async (id: number) => { + try { + const supplier = await prisma.supplier.findUnique({ + where: { + id: id + } + }) + if (!supplier) { + throw new NotFoundError("Supplier") + } + return supplier + } + catch (error) { + throw error + } +} + +let createMany = async (suppliers: Supplier[]) => { + try { + const newSuppliers = await prisma.supplier.createMany({ + data: suppliers + }) + + return newSuppliers.count + } + catch (error) { + throw error + } +} + +// let createItem = async (item: Item) => { +// try { +// const newItem = await prisma.item.create({ +// data: item +// // data: { +// // itemCode: item.itemCode, +// // itemName: item.itemName, +// // itemType: item.itemType, +// // itemModel: item.itemModel, +// // itemBrand: item.itemBrand, +// // itemDescription: item.itemDescription, +// // category: item.category, +// // cost: item.cost, +// // price: item.price, +// // isOpenPrice: item.isOpenPrice, +// // unitOfMeasure: item.unitOfMeasure, +// // height: item.height, +// // width: item.width, +// // length: item.length, +// // weight: item.weight, +// // alternateLookUp: item.alternateLookUp, +// // image: item.image +// // } +// }) +// return newItem +// } +// catch (error) { +// throw error +// } +// } + +let update = async (supplier: Supplier) => { + try { + const updatedSupplier = await prisma.supplier.update({ + where: { + id: supplier.id + }, + data: supplier + // data: { + // itemCode: item.itemCode, + // itemName: item.itemName, + // itemType: item.itemType, + // itemModel: item.itemModel, + // itemBrand: item.itemBrand, + // itemDescription: item.itemDescription, + // category: item.category, + // cost: item.cost, + // price: item.price, + // isOpenPrice: item.isOpenPrice, + // unitOfMeasure: item.unitOfMeasure, + // height: item.height, + // width: item.width, + // length: item.length, + // weight: item.weight, + // alternateLookUp: item.alternateLookUp, + // image: item.image, + // } + }) + return updatedSupplier + } + catch (error) { + throw error + } +} + +let remove = async (id: number) => { + try { + const updatedSupplier = await prisma.supplier.update({ + where: { + id: id + }, + data: { + deleted: true + } + }) + return updatedSupplier + } + catch (error) { + throw error + } +} + +export = { getAll, getById, createMany, update, remove } \ No newline at end of file diff --git a/src/users/user.controller.ts b/src/users/user.controller.ts new file mode 100644 index 0000000..52813ae --- /dev/null +++ b/src/users/user.controller.ts @@ -0,0 +1,136 @@ +import express, { NextFunction, Request, Response } from "express" +import validator from "validator" +import service from "./user.service" +import { User } from "@prisma/client" +import NetworkRequest from "../api-helpers/network-request" +import { RequestValidateError } from "../api-helpers/error" +import { ChangePasswordRequestBody } from "../auth/auth.request" +import { sendResponse } from "../api-helpers/network" + +const router = express.Router() + +let getAll = (req: Request, res: Response, next: NextFunction) => { + service.getAll() + .then((users: User[]) => { + const userList = users.map(user => basicDetails(user)) + sendResponse(res, userList) + }) + .catch(next) +} + +let getById = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + const userId: number = parseInt(req.params.id) + service.getById(userId) + .then((user: User) => sendResponse(res, basicDetails(user))) + .catch(next) +} + +let create = (req: NetworkRequest, res: Response, next: NextFunction) => { + const user = req.body + + if (!user) { + throw new RequestValidateError('Create failed: data missing') + } + + if (!user.username) { + throw new RequestValidateError('Create failed: [username] not found') + } + + if (!user.password) { + throw new RequestValidateError('Create failed: [password] not found') + } + + if (isValidPassword(user.password)) { + throw new RequestValidateError('Create failed: [password] format incorrect') + } + + if (!user.role) { + throw new RequestValidateError('Create failed: [role] not found') + } + + if (user.email && !validator.isEmail(user.email)) { + throw new RequestValidateError('Create failed: [email] format incorrect') + } + + service.create(user) + .then((user: User) => sendResponse(res, basicDetails(user))) + .catch(next) +} + +let update = (req: NetworkRequest, res: Response, next: NextFunction) => { + const user = req.body + + if (!user) { + throw new RequestValidateError('Update failed: data missing') + } + + if (!user.id) { + throw new RequestValidateError('Update failed: [id] not found') + } + + if (user.email && !validator.isEmail(user.email)) { + throw new RequestValidateError('Update failed: [email] format incorrect') + } + service.update(user) + .then((user: User) => sendResponse(res, "Successfully updated")) + .catch(next) +} + +let remove = (req: Request, res: Response, next: NextFunction) => { + if (!validator.isNumeric(req.params.id)) { + throw new RequestValidateError('ID format incorrect') + } + + const userId: number = parseInt(req.params.id) + service.remove(userId) + .then((user: User) => sendResponse(res, "Successfully deleted")) + .catch(next) +} + + +let changePassword = (req: NetworkRequest, res: Response, next: NextFunction) => { + const changePasswordRequest = req.body + + if (!changePasswordRequest) { + throw new RequestValidateError('Change password failed: body data missing') + } + + if (!changePasswordRequest.userId) { + throw new RequestValidateError('Change password failed: No user found') + } + + if (!changePasswordRequest.currentPassword) { + throw new RequestValidateError('Change password failed: current password not found') + } + + if (!changePasswordRequest.newPassword) { + throw new RequestValidateError('Change password failed: new password not found') + } + + service.changePassword(changePasswordRequest.userId, changePasswordRequest.currentPassword, changePasswordRequest.newPassword) + .then((user: User) => sendResponse(res, { result: true })) + .catch(next) +} + + +//helper function +let basicDetails = (user: User) => { + const { id, firstName, lastName, mobile, email, role } = user; + return { id, firstName, lastName, mobile, email, role }; +} + +let isValidPassword = (password: string) => { + return validator.isAlphanumeric(password) && validator.isLength(password, { min: 6 }); +} + +//routes +router.get("/", getAll) +router.get('/:id', getById) +router.post('/create', create) +router.put('/update', update) +router.delete('/:id', remove) +router.post('/change-password', changePassword) +export = router diff --git a/src/users/user.service.ts b/src/users/user.service.ts new file mode 100644 index 0000000..1787705 --- /dev/null +++ b/src/users/user.service.ts @@ -0,0 +1,136 @@ +import { User, PrismaClient } from "@prisma/client" +import bcrypt from "bcryptjs" +import { NotFoundError, RequestValidateError } from "../api-helpers/error" + +const prisma = new PrismaClient() + +let getAll = async () => { + try { + const users = await prisma.user.findMany() + return users + } + catch (error) { + throw error + } +} + +let getById = async (id: number) => { + try { + const user = await prisma.user.findUnique({ + where: { + id: id + } + }) + if (!user) { + throw new NotFoundError("User") + } + return user + } + catch (error) { + throw error + } +} + +let create = async (user: User) => { + try { + const newUser = await prisma.user.create({ + data: { + username: user.username, + password: bcrypt.hashSync(user.password, 10), + lastName: user.lastName, + firstName: user.firstName, + mobile: user.mobile, + email: user.email, + role: user.role + } + }) + return newUser + } + catch (error) { + throw error + } +} + +let update = async (user: User) => { + try { + const updatedUser = await prisma.user.update({ + where: { + id: user.id + }, + data: { + lastName: user.lastName, + firstName: user.firstName, + mobile: user.mobile, + email: user.email, + role: user.role + } + }) + return updatedUser + } + catch (error) { + throw error + } +} + +let remove = async (id: number) => { + try { + const updatedUser = await prisma.user.update({ + where: { + id: id + }, + data: { + deleted: true + } + }) + return updatedUser + } + catch (error) { + throw error + } +} + +let changePassword = async (userId: number, currentPassword: string, newPassword: string) => { + try { + const user = await getById(userId) + + //check if current password mismatched, throw error + if (!bcrypt.compareSync(currentPassword, user.password)) { + throw new RequestValidateError('Password is incorrect') + } + + const updatedUser = await prisma.user.update({ + where: { + id: user.id + }, + data: { + password: bcrypt.hashSync(newPassword, 10) + } + }) + return updatedUser + } + catch (error) { + throw error + } +} + +// let createUser = async (username: string, password: string, lastName: string, firstName: string, mobile: string, email: string, role: string) => { +// try { +// const user = await prisma.user.create({ +// data: { +// username: username, +// password: bcrypt.hashSync(password, 10), +// lastName: lastName, +// firstName: firstName, +// mobile: mobile, +// email: email, +// role: role +// } +// }) +// return user +// } +// catch (error) { +// throw error +// } +// } + +export = { getAll, getById, create, update, remove, changePassword } \ No newline at end of file diff --git a/src/util.js b/src/util.js new file mode 100644 index 0000000..bbadf5b --- /dev/null +++ b/src/util.js @@ -0,0 +1,17 @@ +function factorial(n) { + if (n == 0) { + return 1; + } else { + return n * factorial(n - 1); + } + } + + function factorialA(n) { + if (n == 0) { + return 1; + } else { + return n * factorial(n - 1); + } + } + + module.exports = factorial; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..970d6b4 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,109 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": "dist", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}