From 2d5a52b12bb8fc2d0006ddc2fb274b784543e280 Mon Sep 17 00:00:00 2001 From: Kevin Leyow Date: Wed, 28 Aug 2024 00:31:54 -0500 Subject: [PATCH] chore: regenerate prisma (#20) * chore: regenerate prisma * fix test and audit * log test * log test * test --- audit-ci.jsonc | 15 + jest.config.js | 1 + package-lock.json | 1316 ++++++++++++++++++++--- package.json | 92 +- prisma/base/centralLedger.prisma | 661 +++++++++--- src/schema/DFSP/DFSP.ts | 17 +- src/schema/Transfer/dataloaders/DFSP.ts | 21 +- test/unit/schema.test.ts | 5 + tsconfig.json | 2 +- 9 files changed, 1766 insertions(+), 364 deletions(-) diff --git a/audit-ci.jsonc b/audit-ci.jsonc index 2f9260a..e9dbe78 100644 --- a/audit-ci.jsonc +++ b/audit-ci.jsonc @@ -4,5 +4,20 @@ // Only use one of ["low": true, "moderate": true, "high": true, "critical": true] "moderate": true, "allowlist": [ // NOTE: Please add as much information as possible to any items added to the allowList + "GHSA-67hx-6x53-jw92", + "GHSA-wf5p-g6vw-rhxx", + "GHSA-grv7-fg5c-xmjg", + "GHSA-rv95-896h-c2vc", + "GHSA-jchw-25xp-jwwc", + "GHSA-cxjh-pqwp-8mfp", + "GHSA-pfrx-2q88-qq97", + "GHSA-9pv7-vfvm-6vr7", + "GHSA-2p57-rm9w-gvfp", + "GHSA-952p-6rrq-rcjv", + "GHSA-vxvm-qww3-2fh7", + "GHSA-c2qf-rxjj-qqgw", + "GHSA-72xf-g2v4-qvf3", + "GHSA-j8xg-fqg3-53r7", + "GHSA-3h5v-q93c-6h6q" ] } diff --git a/jest.config.js b/jest.config.js index 206918e..286613b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -5,4 +5,5 @@ module.exports = { moduleNameMapper: { '^@app/(.*)$': '/src/$1', }, + modulePathIgnorePatterns: ['/src/generated'] }; diff --git a/package-lock.json b/package-lock.json index c5f04ca..13ce1cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,64 +1,64 @@ { "name": "@mojaloop/reporting-hub-bop-api-svc", - "version": "2.0.1", + "version": "2.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@mojaloop/reporting-hub-bop-api-svc", - "version": "2.0.1", + "version": "2.0.3", "license": "Apache-2.0", "dependencies": { - "@apollo/server": "^4.6.0", - "@apollo/server-plugin-landing-page-graphql-playground": "^4.0.0", - "@mojaloop/central-services-logger": "^10.6.2", - "@ory/keto-client": "^0.6.0-alpha.6", - "@prisma/client": "^3.8.0", - "axios": "^0.24.0", - "body-parser": "^1.20.2", - "connection-string": "^4.3.6", - "convict": "^6.2.4", - "cors": "^2.8.5", + "@apollo/server": "4.6.0", + "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", + "@mojaloop/central-services-logger": "10.6.2", + "@ory/keto-client": "0.6.0-alpha.6", + "@prisma/client": "4.16.2", + "axios": "0.24.0", + "body-parser": "1.20.2", + "connection-string": "4.3.6", + "convict": "6.2.4", + "cors": "2.8.5", "cross-env": "7.0.3", - "dataloader": "^2.0.0", - "dotenv": "^11.0.0", - "env-var": "^7.1.1", - "express": "^4.18.2", - "graphql": "^16.6.0", - "graphql-middleware": "^6.1.33", - "graphql-parse-resolve-info": "^4.13.0", - "graphql-scalars": "^1.21.3", - "graphql-shield": "^7.6.5", - "js-yaml": "^4.1.0", - "mongodb": "^4.3.0", - "nexus": "^1.3.0", - "patch-package": "^6.4.7", - "prisma": "^3.8.0", + "dataloader": "2.0.0", + "dotenv": "11.0.0", + "env-var": "7.1.1", + "express": "4.18.2", + "graphql": "16.6.0", + "graphql-middleware": "6.1.33", + "graphql-parse-resolve-info": "4.13.0", + "graphql-scalars": "1.21.3", + "graphql-shield": "7.6.5", + "js-yaml": "4.1.0", + "mongodb": "4.3.0", + "nexus": "1.3.0", + "patch-package": "6.4.7", + "prisma": "4.16.2", "ts-node": "10.4.0", - "tsconfig-paths": "^3.12.0", - "typescript": "^4.5.4", - "winston": "^3.4.0" + "tsconfig-paths": "3.12.0", + "typescript": "4.5.4", + "winston": "3.4.0" }, "devDependencies": { - "@types/convict": "^6.1.1", - "@types/cors": "^2.8.13", - "@types/jest": "^27.4.0", - "@types/node": "^16.11.12", - "@typescript-eslint/eslint-plugin": "^5.9.1", - "@typescript-eslint/parser": "^5.9.1", - "audit-ci": "^6.6.1", - "eslint": "^8.6.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^16.1.0", - "eslint-config-prettier": "^8.3.0", - "eslint-import-resolver-typescript": "^2.5.0", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-prettier": "^4.0.0", - "jest": "^27.4.7", - "nodemon": "^2.0.14", - "prettier": "^2.5.1", - "supertest": "^6.2.1", - "ts-jest": "^27.1.2", + "@types/convict": "6.1.1", + "@types/cors": "2.8.13", + "@types/jest": "27.4.0", + "@types/node": "16.11.12", + "@typescript-eslint/eslint-plugin": "5.9.1", + "@typescript-eslint/parser": "5.9.1", + "audit-ci": "6.6.1", + "eslint": "8.6.0", + "eslint-config-airbnb-base": "15.0.0", + "eslint-config-airbnb-typescript": "16.1.0", + "eslint-config-prettier": "8.3.0", + "eslint-import-resolver-typescript": "2.5.0", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-prettier": "4.0.0", + "jest": "27.4.7", + "nodemon": "2.0.14", + "prettier": "2.5.1", + "supertest": "6.2.1", + "ts-jest": "27.1.2", "ts-node-dev": "1.1.8" } }, @@ -1041,6 +1041,11 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/batch-execute/node_modules/dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "node_modules/@graphql-tools/batch-execute/node_modules/value-or-promise": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", @@ -1102,6 +1107,11 @@ "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } }, + "node_modules/@graphql-tools/delegate/node_modules/dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "node_modules/@graphql-tools/delegate/node_modules/tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", @@ -1634,15 +1644,15 @@ } }, "node_modules/@prisma/client": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.15.2.tgz", - "integrity": "sha512-ErqtwhX12ubPhU4d++30uFY/rPcyvjk+mdifaZO5SeM21zS3t4jQrscy8+6IyB0GIYshl5ldTq6JSBo1d63i8w==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", + "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", "hasInstallScript": true, "dependencies": { - "@prisma/engines-version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e" + "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" }, "engines": { - "node": ">=12.6" + "node": ">=14.17" }, "peerDependencies": { "prisma": "*" @@ -1654,15 +1664,15 @@ } }, "node_modules/@prisma/engines": { - "version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz", - "integrity": "sha512-NHlojO1DFTsSi3FtEleL9QWXeSF/UjhCW0fgpi7bumnNZ4wj/eQ+BJJ5n2pgoOliTOGv9nX2qXvmHap7rJMNmg==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.16.2.tgz", + "integrity": "sha512-vx1nxVvN4QeT/cepQce68deh/Turxy5Mr+4L4zClFuK1GlxN3+ivxfuv+ej/gvidWn1cE1uAhW7ALLNlYbRUAw==", "hasInstallScript": true }, "node_modules/@prisma/engines-version": { - "version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz", - "integrity": "sha512-e3k2Vd606efd1ZYy2NQKkT4C/pn31nehyLhVug6To/q8JT8FpiMrDy7zmm3KLF0L98NOQQcutaVtAPhzKhzn9w==" + "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", + "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", @@ -1718,6 +1728,15 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "node_modules/@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -1736,6 +1755,18 @@ "@sinonjs/commons": "^1.7.0" } }, + "node_modules/@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "dependencies": { + "defer-to-connect": "^1.0.1" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -2314,6 +2345,15 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "dependencies": { + "string-width": "^4.1.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -2703,6 +2743,40 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, + "node_modules/boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "dependencies": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/boxen/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2821,6 +2895,48 @@ "node": ">= 0.8" } }, + "node_modules/cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "dependencies": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cacheable-request/node_modules/lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -2931,6 +3047,18 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2942,6 +3070,18 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -3050,6 +3190,23 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "node_modules/configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "dependencies": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -3190,6 +3347,15 @@ "node": ">= 8" } }, + "node_modules/crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/cssfilter": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", @@ -3234,9 +3400,9 @@ } }, "node_modules/dataloader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", - "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz", + "integrity": "sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ==" }, "node_modules/debug": { "version": "4.3.3", @@ -3260,6 +3426,18 @@ "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", "dev": true }, + "node_modules/decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -3289,6 +3467,12 @@ "node": ">=0.10.0" } }, + "node_modules/defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -3415,6 +3599,18 @@ "node": ">=8" } }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/dotenv": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-11.0.0.tgz", @@ -3429,6 +3625,12 @@ "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, + "node_modules/duplexer3": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", + "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", + "dev": true + }, "node_modules/dynamic-dedupe": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", @@ -3480,6 +3682,15 @@ "node": ">= 0.8" } }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -3829,6 +4040,15 @@ "node": ">=6" } }, + "node_modules/escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -4908,6 +5128,21 @@ "node": ">=10.13.0" } }, + "node_modules/global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "dependencies": { + "ini": "2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globals": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", @@ -4943,6 +5178,40 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "dependencies": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/got/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -5112,6 +5381,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/hexoid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", @@ -5139,6 +5417,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -5251,6 +5535,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -5293,6 +5586,15 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -5473,6 +5775,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "dependencies": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", @@ -5485,6 +5803,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -5508,6 +5838,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "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/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -5609,6 +5957,12 @@ "node": ">=8" } }, + "node_modules/is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -6387,6 +6741,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", + "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", @@ -6444,6 +6804,15 @@ "node": "*" } }, + "node_modules/keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.0" + } + }, "node_modules/klaw-sync": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", @@ -6466,6 +6835,18 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "node_modules/latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "dependencies": { + "package-json": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -6562,6 +6943,15 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "node_modules/lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -6711,6 +7101,15 @@ "node": ">=6" } }, + "node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6896,21 +7295,22 @@ "dev": true }, "node_modules/nodemon": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.21.tgz", - "integrity": "sha512-djN/n2549DUtY33S7o1djRCd7dEm0kBnj9c7S9XVXqRUbuggN1MZH/Nqa+5RFQr63Fbefq37nFXAE9VU86yL1A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.14.tgz", + "integrity": "sha512-frcpDx+PviKEQRSYzwhckuO2zoHcBYLHI754RE9z5h1RGtrngerc04mLpQQCPWBkH/2ObrX7We9YiwVSYZpFJQ==", "dev": true, + "hasInstallScript": true, "dependencies": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", + "chokidar": "^3.2.2", + "debug": "^3.2.6", "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5" + "undefsafe": "^2.0.3", + "update-notifier": "^5.1.0" }, "bin": { "nodemon": "bin/nodemon.js" @@ -6986,6 +7386,15 @@ "node": ">=0.10.0" } }, + "node_modules/normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -7168,6 +7577,15 @@ "node": ">=0.10.0" } }, + "node_modules/p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -7201,6 +7619,30 @@ "node": ">=4" } }, + "node_modules/package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "dependencies": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7573,6 +8015,15 @@ "node": ">= 0.8.0" } }, + "node_modules/prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/prettier": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", @@ -7624,19 +8075,19 @@ } }, "node_modules/prisma": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-3.15.2.tgz", - "integrity": "sha512-nMNSMZvtwrvoEQ/mui8L/aiCLZRCj5t6L3yujKpcDhIPk7garp8tL4nMx2+oYsN0FWBacevJhazfXAbV1kfBzA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.16.2.tgz", + "integrity": "sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g==", "hasInstallScript": true, "dependencies": { - "@prisma/engines": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e" + "@prisma/engines": "4.16.2" }, "bin": { "prisma": "build/index.js", "prisma2": "build/index.js" }, "engines": { - "node": ">=12.6" + "node": ">=14.17" } }, "node_modules/progress": { @@ -7690,6 +8141,16 @@ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "dev": true }, + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -7698,6 +8159,18 @@ "node": ">=6" } }, + "node_modules/pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -7838,6 +8311,30 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/registry-auth-token": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", + "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", + "dev": true, + "dependencies": { + "rc": "1.2.8" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "dependencies": { + "rc": "^1.2.8" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7899,6 +8396,15 @@ "node": ">=10" } }, + "node_modules/responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -8009,6 +8515,27 @@ "node": ">=10" } }, + "node_modules/semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "dependencies": { + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/semver-diff/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", @@ -8127,27 +8654,6 @@ "is-arrayish": "^0.3.1" } }, - "node_modules/simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "dependencies": { - "semver": "~7.0.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/simple-update-notifier/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -8571,6 +9077,15 @@ "node": ">=4" } }, + "node_modules/to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -8984,6 +9499,18 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "node_modules/unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "dependencies": { + "crypto-random-string": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -9000,6 +9527,34 @@ "node": ">= 0.8" } }, + "node_modules/update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "dependencies": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/yeoman/update-notifier?sponsor=1" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -9009,6 +9564,18 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", + "dev": true, + "dependencies": { + "prepend-http": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -9173,6 +9740,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/winston": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.4.0.tgz", @@ -9269,6 +9848,15 @@ } } }, + "node_modules/xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -10109,6 +10697,11 @@ "tslib": "^2.4.0" } }, + "dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "value-or-promise": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", @@ -10157,6 +10750,11 @@ "tslib": "^2.4.0" } }, + "dataloader": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", + "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + }, "tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", @@ -10586,22 +11184,22 @@ } }, "@prisma/client": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-3.15.2.tgz", - "integrity": "sha512-ErqtwhX12ubPhU4d++30uFY/rPcyvjk+mdifaZO5SeM21zS3t4jQrscy8+6IyB0GIYshl5ldTq6JSBo1d63i8w==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-4.16.2.tgz", + "integrity": "sha512-qCoEyxv1ZrQ4bKy39GnylE8Zq31IRmm8bNhNbZx7bF2cU5aiCCnSa93J2imF88MBjn7J9eUQneNxUQVJdl/rPQ==", "requires": { - "@prisma/engines-version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e" + "@prisma/engines-version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81" } }, "@prisma/engines": { - "version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz", - "integrity": "sha512-NHlojO1DFTsSi3FtEleL9QWXeSF/UjhCW0fgpi7bumnNZ4wj/eQ+BJJ5n2pgoOliTOGv9nX2qXvmHap7rJMNmg==" + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-4.16.2.tgz", + "integrity": "sha512-vx1nxVvN4QeT/cepQce68deh/Turxy5Mr+4L4zClFuK1GlxN3+ivxfuv+ej/gvidWn1cE1uAhW7ALLNlYbRUAw==" }, "@prisma/engines-version": { - "version": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e.tgz", - "integrity": "sha512-e3k2Vd606efd1ZYy2NQKkT4C/pn31nehyLhVug6To/q8JT8FpiMrDy7zmm3KLF0L98NOQQcutaVtAPhzKhzn9w==" + "version": "4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-4.16.1-1.4bc8b6e1b66cb932731fb1bdbbc550d1e010de81.tgz", + "integrity": "sha512-q617EUWfRIDTriWADZ4YiWRZXCa/WuhNgLTVd+HqWLffjMSPzyM5uOWoauX91wvQClSKZU4pzI4JJLQ9Kl62Qg==" }, "@protobufjs/aspromise": { "version": "1.1.2", @@ -10657,6 +11255,12 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@sinonjs/commons": { "version": "1.8.3", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", @@ -10675,6 +11279,15 @@ "@sinonjs/commons": "^1.7.0" } }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -11136,6 +11749,15 @@ "uri-js": "^4.2.2" } }, + "ansi-align": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", + "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", + "dev": true, + "requires": { + "string-width": "^4.1.0" + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -11432,6 +12054,30 @@ } } }, + "boxen": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", + "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^6.2.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.1", + "string-width": "^4.2.2", + "type-fest": "^0.20.2", + "widest-line": "^3.1.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -11514,6 +12160,38 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==" }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -11596,6 +12274,12 @@ "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", "dev": true }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -11607,6 +12291,15 @@ "wrap-ansi": "^7.0.0" } }, + "clone-response": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -11704,6 +12397,20 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, "confusing-browser-globals": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", @@ -11801,6 +12508,12 @@ "which": "^2.0.1" } }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, "cssfilter": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/cssfilter/-/cssfilter-0.0.10.tgz", @@ -11841,9 +12554,9 @@ } }, "dataloader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.1.0.tgz", - "integrity": "sha512-qTcEYLen3r7ojZNgVUaRggOI+KM7jrKxXeSHhogh/TWxYMeONEMqY+hmkobiYQozsGIyg9OYVzO4ZIfoB4I0pQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dataloader/-/dataloader-2.0.0.tgz", + "integrity": "sha512-YzhyDAwA4TaQIhM5go+vCLmU0UikghC/t9DTQYZR2M/UvZ1MdOhPezSDZcjj9uqQJOMqjLcpWtyW2iNINdlatQ==" }, "debug": { "version": "4.3.3", @@ -11859,6 +12572,15 @@ "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", @@ -11882,6 +12604,12 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -11973,6 +12701,15 @@ } } }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, "dotenv": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-11.0.0.tgz", @@ -11984,6 +12721,12 @@ "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", "dev": true }, + "duplexer3": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", + "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", + "dev": true + }, "dynamic-dedupe": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/dynamic-dedupe/-/dynamic-dedupe-0.3.0.tgz", @@ -12026,6 +12769,15 @@ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==" }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "enquirer": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", @@ -12248,6 +13000,12 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -13078,6 +13836,15 @@ "is-glob": "^4.0.3" } }, + "global-dirs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", + "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", + "dev": true, + "requires": { + "ini": "2.0.0" + } + }, "globals": { "version": "13.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", @@ -13101,6 +13868,36 @@ "slash": "^3.0.0" } }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + }, + "dependencies": { + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + } + } + }, "graceful-fs": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", @@ -13217,6 +14014,12 @@ "has-symbols": "^1.0.2" } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hexoid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/hexoid/-/hexoid-1.0.0.tgz", @@ -13238,6 +14041,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "dev": true + }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -13312,6 +14121,12 @@ "resolve-from": "^4.0.0" } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", + "dev": true + }, "import-local": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", @@ -13342,6 +14157,12 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", + "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", + "dev": true + }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -13467,12 +14288,28 @@ "is-extglob": "^2.1.1" } }, + "is-installed-globally": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", + "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", + "dev": true, + "requires": { + "global-dirs": "^3.0.0", + "is-path-inside": "^3.0.2" + } + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, + "is-npm": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", + "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -13487,6 +14324,18 @@ "has-tostringtag": "^1.0.0" } }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "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 + }, "is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -13555,6 +14404,12 @@ "is-docker": "^2.0.0" } }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -14163,6 +15018,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -14205,6 +15066,15 @@ "through": ">=2.2.7 <3" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "klaw-sync": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", @@ -14224,6 +15094,15 @@ "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -14304,6 +15183,12 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -14416,6 +15301,12 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -14562,21 +15453,21 @@ "dev": true }, "nodemon": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.21.tgz", - "integrity": "sha512-djN/n2549DUtY33S7o1djRCd7dEm0kBnj9c7S9XVXqRUbuggN1MZH/Nqa+5RFQr63Fbefq37nFXAE9VU86yL1A==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-2.0.14.tgz", + "integrity": "sha512-frcpDx+PviKEQRSYzwhckuO2zoHcBYLHI754RE9z5h1RGtrngerc04mLpQQCPWBkH/2ObrX7We9YiwVSYZpFJQ==", "dev": true, "requires": { - "chokidar": "^3.5.2", - "debug": "^3.2.7", + "chokidar": "^3.2.2", + "debug": "^3.2.6", "ignore-by-default": "^1.0.1", - "minimatch": "^3.1.2", - "pstree.remy": "^1.1.8", + "minimatch": "^3.0.4", + "pstree.remy": "^1.1.7", "semver": "^5.7.1", - "simple-update-notifier": "^1.0.7", "supports-color": "^5.5.0", "touch": "^3.1.0", - "undefsafe": "^2.0.5" + "undefsafe": "^2.0.3", + "update-notifier": "^5.1.0" }, "dependencies": { "debug": { @@ -14626,6 +15517,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", + "dev": true + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -14757,6 +15654,12 @@ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -14781,6 +15684,26 @@ "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -15058,6 +15981,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", + "dev": true + }, "prettier": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", @@ -15093,11 +16022,11 @@ } }, "prisma": { - "version": "3.15.2", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-3.15.2.tgz", - "integrity": "sha512-nMNSMZvtwrvoEQ/mui8L/aiCLZRCj5t6L3yujKpcDhIPk7garp8tL4nMx2+oYsN0FWBacevJhazfXAbV1kfBzA==", + "version": "4.16.2", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-4.16.2.tgz", + "integrity": "sha512-SYCsBvDf0/7XSJyf2cHTLjLeTLVXYfqp7pG5eEVafFLeT0u/hLFz/9W196nDRGUOo1JfPatAEb+uEnTQImQC1g==", "requires": { - "@prisma/engines": "3.15.1-1.461d6a05159055555eb7dfb337c9fb271cbd4d7e" + "@prisma/engines": "4.16.2" } }, "progress": { @@ -15142,11 +16071,30 @@ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "dev": true }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", @@ -15242,6 +16190,24 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, + "registry-auth-token": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", + "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", + "dev": true, + "requires": { + "rc": "1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -15287,6 +16253,15 @@ "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -15358,6 +16333,23 @@ "lru-cache": "^6.0.0" } }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, "send": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", @@ -15462,23 +16454,6 @@ "is-arrayish": "^0.3.1" } }, - "simple-update-notifier": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz", - "integrity": "sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==", - "dev": true, - "requires": { - "semver": "~7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -15802,6 +16777,12 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -16081,6 +17062,15 @@ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", "dev": true }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -16091,6 +17081,28 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==" }, + "update-notifier": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", + "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", + "dev": true, + "requires": { + "boxen": "^5.0.0", + "chalk": "^4.1.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.4.0", + "is-npm": "^5.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.1.0", + "pupa": "^2.1.1", + "semver": "^7.3.4", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -16100,6 +17112,15 @@ "punycode": "^2.1.0" } }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -16230,6 +17251,15 @@ "is-symbol": "^1.0.3" } }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "winston": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/winston/-/winston-3.4.0.tgz", @@ -16297,6 +17327,12 @@ "dev": true, "requires": {} }, + "xdg-basedir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", + "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", + "dev": true + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", diff --git a/package.json b/package.json index 411b47f..9b64d92 100644 --- a/package.json +++ b/package.json @@ -35,56 +35,56 @@ }, "homepage": "https://github.com/mojaloop/reporting-hub-bop-api-svc#readme", "devDependencies": { - "@types/convict": "^6.1.1", - "@types/cors": "^2.8.13", - "@types/jest": "^27.4.0", - "@types/node": "^16.11.12", - "@typescript-eslint/eslint-plugin": "^5.9.1", - "@typescript-eslint/parser": "^5.9.1", - "audit-ci": "^6.6.1", - "eslint": "^8.6.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^16.1.0", - "eslint-config-prettier": "^8.3.0", - "eslint-import-resolver-typescript": "^2.5.0", - "eslint-plugin-import": "^2.25.4", - "eslint-plugin-prettier": "^4.0.0", - "jest": "^27.4.7", - "nodemon": "^2.0.14", - "prettier": "^2.5.1", - "supertest": "^6.2.1", - "ts-jest": "^27.1.2", + "@types/convict": "6.1.1", + "@types/cors": "2.8.13", + "@types/jest": "27.4.0", + "@types/node": "16.11.12", + "@typescript-eslint/eslint-plugin": "5.9.1", + "@typescript-eslint/parser": "5.9.1", + "audit-ci": "6.6.1", + "eslint": "8.6.0", + "eslint-config-airbnb-base": "15.0.0", + "eslint-config-airbnb-typescript": "16.1.0", + "eslint-config-prettier": "8.3.0", + "eslint-import-resolver-typescript": "2.5.0", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-prettier": "4.0.0", + "jest": "27.4.7", + "nodemon": "2.0.14", + "prettier": "2.5.1", + "supertest": "6.2.1", + "ts-jest": "27.1.2", "ts-node-dev": "1.1.8" }, "dependencies": { - "@apollo/server": "^4.6.0", - "@apollo/server-plugin-landing-page-graphql-playground": "^4.0.0", - "@mojaloop/central-services-logger": "^10.6.2", - "@ory/keto-client": "^0.6.0-alpha.6", - "@prisma/client": "^3.8.0", - "axios": "^0.24.0", - "body-parser": "^1.20.2", - "connection-string": "^4.3.6", - "convict": "^6.2.4", - "cors": "^2.8.5", + "@apollo/server": "4.6.0", + "@apollo/server-plugin-landing-page-graphql-playground": "4.0.0", + "@mojaloop/central-services-logger": "10.6.2", + "@ory/keto-client": "0.6.0-alpha.6", + "@prisma/client": "4.16.2", + "axios": "0.24.0", + "body-parser": "1.20.2", + "connection-string": "4.3.6", + "convict": "6.2.4", + "cors": "2.8.5", "cross-env": "7.0.3", - "dataloader": "^2.0.0", - "dotenv": "^11.0.0", - "env-var": "^7.1.1", - "express": "^4.18.2", - "graphql": "^16.6.0", - "graphql-middleware": "^6.1.33", - "graphql-parse-resolve-info": "^4.13.0", - "graphql-scalars": "^1.21.3", - "graphql-shield": "^7.6.5", - "js-yaml": "^4.1.0", - "mongodb": "^4.3.0", - "nexus": "^1.3.0", - "patch-package": "^6.4.7", - "prisma": "^3.8.0", + "dataloader": "2.0.0", + "dotenv": "11.0.0", + "env-var": "7.1.1", + "express": "4.18.2", + "graphql": "16.6.0", + "graphql-middleware": "6.1.33", + "graphql-parse-resolve-info": "4.13.0", + "graphql-scalars": "1.21.3", + "graphql-shield": "7.6.5", + "js-yaml": "4.1.0", + "mongodb": "4.3.0", + "nexus": "1.3.0", + "patch-package": "6.4.7", + "prisma": "4.16.2", "ts-node": "10.4.0", - "tsconfig-paths": "^3.12.0", - "typescript": "^4.5.4", - "winston": "^3.4.0" + "tsconfig-paths": "3.12.0", + "typescript": "4.5.4", + "winston": "3.4.0" } } diff --git a/prisma/base/centralLedger.prisma b/prisma/base/centralLedger.prisma index 0141126..a96a1eb 100644 --- a/prisma/base/centralLedger.prisma +++ b/prisma/base/centralLedger.prisma @@ -9,11 +9,13 @@ datasource db { } model amountType { - amountTypeId Int @id @default(autoincrement()) @db.UnsignedInt - name String @unique(map: "amounttype_name_unique") @db.VarChar(256) - description String? @db.VarChar(1024) - createdDate DateTime @default(now()) @db.DateTime(0) - quote quote[] + amountTypeId Int @id @default(autoincrement()) @db.UnsignedInt + name String @unique(map: "amounttype_name_unique") @db.VarChar(256) + description String? @db.VarChar(1024) + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuoteConversionTerms fxQuoteConversionTerms[] + fxQuoteResponseConversionTerms fxQuoteResponseConversionTerms[] + quote quote[] } model balanceOfPayments { @@ -40,9 +42,9 @@ model bulkTransfer { payeeParticipantId Int? @db.UnsignedInt expirationDate DateTime @db.DateTime(0) createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransferDuplicateCheck bulkTransferDuplicateCheck @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransfer_bulktransferid_foreign") - participant_bulkTransfer_payeeParticipantIdToparticipant participant? @relation("bulkTransfer_payeeParticipantIdToparticipant", fields: [payeeParticipantId], references: [participantId], onDelete: Restrict, onUpdate: Restrict, map: "bulktransfer_payeeparticipantid_foreign") - participant_bulkTransfer_payerParticipantIdToparticipant participant? @relation("bulkTransfer_payerParticipantIdToparticipant", fields: [payerParticipantId], references: [participantId], onDelete: Restrict, onUpdate: Restrict, map: "bulktransfer_payerparticipantid_foreign") + bulkTransferDuplicateCheck bulkTransferDuplicateCheck @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransfer_bulktransferid_foreign") + participant_bulkTransfer_payeeParticipantIdToparticipant participant? @relation("bulkTransfer_payeeParticipantIdToparticipant", fields: [payeeParticipantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransfer_payeeparticipantid_foreign") + participant_bulkTransfer_payerParticipantIdToparticipant participant? @relation("bulkTransfer_payerParticipantIdToparticipant", fields: [payerParticipantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransfer_payerparticipantid_foreign") bulkTransferAssociation bulkTransferAssociation[] bulkTransferExtension bulkTransferExtension[] bulkTransferFulfilmentDuplicateCheck bulkTransferFulfilmentDuplicateCheck? @@ -61,8 +63,8 @@ model bulkTransferAssociation { lastProcessedDate DateTime @default(now()) @db.DateTime(0) errorCode Int? @db.UnsignedInt errorDescription String? @db.VarChar(128) - bulkProcessingState bulkProcessingState @relation(fields: [bulkProcessingStateId], references: [bulkProcessingStateId], onUpdate: Restrict, map: "bulktransferassociation_bulkprocessingstateid_foreign") - bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransferassociation_bulktransferid_foreign") + bulkProcessingState bulkProcessingState @relation(fields: [bulkProcessingStateId], references: [bulkProcessingStateId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferassociation_bulkprocessingstateid_foreign") + bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferassociation_bulktransferid_foreign") @@unique([transferId, bulkTransferId], map: "bulktransferassociation_transferid_bulktransferid_unique") @@index([bulkProcessingStateId], map: "bulktransferassociation_bulkprocessingstateid_foreign") @@ -82,7 +84,7 @@ model bulkTransferError { errorCode Int @db.UnsignedInt errorDescription String @db.VarChar(128) createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransferStateChange bulkTransferStateChange @relation(fields: [bulkTransferStateChangeId], references: [bulkTransferStateChangeId], onUpdate: Restrict, map: "bulktransfererror_bulktransferstatechangeid_foreign") + bulkTransferStateChange bulkTransferStateChange @relation(fields: [bulkTransferStateChangeId], references: [bulkTransferStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransfererror_bulktransferstatechangeid_foreign") @@index([bulkTransferStateChangeId], map: "bulktransfererror_bulktransferstatechangeid_index") } @@ -94,7 +96,7 @@ model bulkTransferExtension { key String @db.VarChar(128) value String @db.Text createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransferextension_bulktransferid_foreign") + bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferextension_bulktransferid_foreign") @@index([bulkTransferId], map: "bulktransferextension_bulktransferid_index") } @@ -103,15 +105,15 @@ model bulkTransferFulfilment { bulkTransferId String @id @db.VarChar(36) completedDate DateTime @db.DateTime(0) createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransferFulfilmentDuplicateCheck bulkTransferFulfilmentDuplicateCheck @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransferfulfilment_bulktransferid_foreign") + bulkTransferFulfilmentDuplicateCheck bulkTransferFulfilmentDuplicateCheck @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferfulfilment_bulktransferid_foreign") } model bulkTransferFulfilmentDuplicateCheck { bulkTransferId String @id @db.VarChar(36) hash String @db.VarChar(256) createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransferfulfilmentduplicatecheck_bulktransferid_foreign") bulkTransferFulfilment bulkTransferFulfilment? + bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferfulfilmentduplicatecheck_bulktransferid_foreign") } model bulkTransferState { @@ -129,9 +131,9 @@ model bulkTransferStateChange { bulkTransferStateId String @db.VarChar(50) reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) - bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onUpdate: Restrict, map: "bulktransferstatechange_bulktransferid_foreign") - bulkTransferState bulkTransferState @relation(fields: [bulkTransferStateId], references: [bulkTransferStateId], onUpdate: Restrict, map: "bulktransferstatechange_bulktransferstateid_foreign") bulkTransferError bulkTransferError[] + bulkTransfer bulkTransfer @relation(fields: [bulkTransferId], references: [bulkTransferId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferstatechange_bulktransferid_foreign") + bulkTransferState bulkTransferState @relation(fields: [bulkTransferStateId], references: [bulkTransferStateId], onDelete: NoAction, onUpdate: NoAction, map: "bulktransferstatechange_bulktransferstateid_foreign") @@index([bulkTransferId], map: "bulktransferstatechange_bulktransferid_index") @@index([bulkTransferStateId], map: "bulktransferstatechange_bulktransferstateid_index") @@ -147,20 +149,26 @@ model contactType { } model currency { - currencyId String @id @db.VarChar(3) - name String? @db.VarChar(128) - isActive Boolean @default(true) - createdDate DateTime @default(now()) @db.DateTime(0) - scale Int @default(4) @db.UnsignedInt - participantCurrency participantCurrency[] - quote quote[] - quoteParty quoteParty[] - quoteResponse_currencyToquoteResponse_payeeFspCommissionCurrencyId quoteResponse[] @relation("currencyToquoteResponse_payeeFspCommissionCurrencyId") - quoteResponse_currencyToquoteResponse_payeeReceiveAmountCurrencyId quoteResponse[] @relation("currencyToquoteResponse_payeeReceiveAmountCurrencyId") - quoteResponse_currencyToquoteResponse_transferAmountCurrencyId quoteResponse[] @relation("currencyToquoteResponse_transferAmountCurrencyId") - settlementModel settlementModel[] - settlementWindowContent settlementWindowContent[] - transfer transfer[] + currencyId String @id @db.VarChar(3) + name String? @db.VarChar(128) + isActive Boolean @default(true) + createdDate DateTime @default(now()) @db.DateTime(0) + scale Int @default(4) @db.UnsignedInt + fxQuoteConversionTerms_fxQuoteConversionTerms_sourceCurrencyTocurrency fxQuoteConversionTerms[] @relation("fxQuoteConversionTerms_sourceCurrencyTocurrency") + fxQuoteConversionTerms_fxQuoteConversionTerms_targetCurrencyTocurrency fxQuoteConversionTerms[] @relation("fxQuoteConversionTerms_targetCurrencyTocurrency") + fxQuoteResponseConversionTerms_fxQuoteResponseConversionTerms_sourceCurrencyTocurrency fxQuoteResponseConversionTerms[] @relation("fxQuoteResponseConversionTerms_sourceCurrencyTocurrency") + fxQuoteResponseConversionTerms_fxQuoteResponseConversionTerms_targetCurrencyTocurrency fxQuoteResponseConversionTerms[] @relation("fxQuoteResponseConversionTerms_targetCurrencyTocurrency") + fxTransfer_fxTransfer_sourceCurrencyTocurrency fxTransfer[] @relation("fxTransfer_sourceCurrencyTocurrency") + fxTransfer_fxTransfer_targetCurrencyTocurrency fxTransfer[] @relation("fxTransfer_targetCurrencyTocurrency") + participantCurrency participantCurrency[] + quote quote[] + quoteParty quoteParty[] + quoteResponse_currencyToquoteResponse_payeeFspCommissionCurrencyId quoteResponse[] @relation("currencyToquoteResponse_payeeFspCommissionCurrencyId") + quoteResponse_currencyToquoteResponse_payeeReceiveAmountCurrencyId quoteResponse[] @relation("currencyToquoteResponse_payeeReceiveAmountCurrencyId") + quoteResponse_currencyToquoteResponse_transferAmountCurrencyId quoteResponse[] @relation("currencyToquoteResponse_transferAmountCurrencyId") + settlementModel settlementModel[] + settlementWindowContent settlementWindowContent[] + transfer transfer[] } model endpointType { @@ -184,7 +192,7 @@ model expiringTransfer { transferId String @unique(map: "expiringtransfer_transferid_unique") @db.VarChar(36) expirationDate DateTime @db.DateTime(0) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "expiringtransfer_transferid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "expiringtransfer_transferid_foreign") @@index([expirationDate], map: "expiringtransfer_expirationdate_index") } @@ -195,7 +203,7 @@ model geoCode { latitude String @db.VarChar(50) longitude String @db.VarChar(50) createdDate DateTime @default(now()) @db.DateTime(0) - quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onUpdate: Restrict, map: "geocode_quotepartyid_foreign") + quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onDelete: NoAction, onUpdate: NoAction, map: "geocode_quotepartyid_foreign") @@index([quotePartyId], map: "geocode_quotepartyid_foreign") } @@ -204,7 +212,7 @@ model ilpPacket { transferId String @id @db.VarChar(36) value String @db.Text createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "ilppacket_transferid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "ilppacket_transferid_foreign") } model ledgerAccountType { @@ -227,7 +235,8 @@ model ledgerEntryType { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) ledgerAccountTypeId Int? @db.UnsignedInt - ledgerAccountType ledgerAccountType? @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onDelete: Restrict, onUpdate: Restrict, map: "ledgerentrytype_ledgeraccounttypeid_foreign") + fxTransferParticipant fxTransferParticipant[] + ledgerAccountType ledgerAccountType? @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "ledgerentrytype_ledgeraccounttypeid_foreign") quoteParty quoteParty[] settlementContentAggregation settlementContentAggregation[] settlementTransferParticipant settlementTransferParticipant[] @@ -243,6 +252,7 @@ model participant { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) createdBy String @db.VarChar(128) + isProxy Boolean @default(false) bulkTransfer_bulkTransfer_payeeParticipantIdToparticipant bulkTransfer[] @relation("bulkTransfer_payeeParticipantIdToparticipant") bulkTransfer_bulkTransfer_payerParticipantIdToparticipant bulkTransfer[] @relation("bulkTransfer_payerParticipantIdToparticipant") participantContact participantContact[] @@ -262,8 +272,8 @@ model participantContact { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) createdBy String @db.VarChar(128) - contactType contactType @relation(fields: [contactTypeId], references: [contactTypeId], onUpdate: Restrict, map: "participantcontact_contacttypeid_foreign") - participant participant @relation(fields: [participantId], references: [participantId], onUpdate: Restrict, map: "participantcontact_participantid_foreign") + contactType contactType @relation(fields: [contactTypeId], references: [contactTypeId], onDelete: NoAction, onUpdate: NoAction, map: "participantcontact_contacttypeid_foreign") + participant participant @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "participantcontact_participantid_foreign") @@index([contactTypeId], map: "participantcontact_contacttypeid_index") @@index([participantId], map: "participantcontact_participantid_index") @@ -277,11 +287,13 @@ model participantCurrency { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) createdBy String @db.VarChar(128) - currency currency @relation(fields: [currencyId], references: [currencyId], onUpdate: Restrict, map: "participantcurrency_currencyid_foreign") - ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onUpdate: Restrict, map: "participantcurrency_ledgeraccounttypeid_foreign") - participant participant @relation(fields: [participantId], references: [participantId], onUpdate: Restrict, map: "participantcurrency_participantid_foreign") + fxTransferParticipant fxTransferParticipant[] + currency currency @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "participantcurrency_currencyid_foreign") + ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "participantcurrency_ledgeraccounttypeid_foreign") + participant participant @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "participantcurrency_participantid_foreign") participantLimit participantLimit[] participantPosition participantPosition[] + participantPositionChange participantPositionChange[] settlementContentAggregation settlementContentAggregation[] settlementParticipantCurrency settlementParticipantCurrency[] settlementTransferParticipant settlementTransferParticipant[] @@ -301,8 +313,8 @@ model participantEndpoint { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) createdBy String @db.VarChar(128) - endpointType endpointType @relation(fields: [endpointTypeId], references: [endpointTypeId], onUpdate: Restrict, map: "participantendpoint_endpointtypeid_foreign") - participant participant @relation(fields: [participantId], references: [participantId], onUpdate: Restrict, map: "participantendpoint_participantid_foreign") + endpointType endpointType @relation(fields: [endpointTypeId], references: [endpointTypeId], onDelete: NoAction, onUpdate: NoAction, map: "participantendpoint_endpointtypeid_foreign") + participant participant @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "participantendpoint_participantid_foreign") @@index([endpointTypeId], map: "participantendpoint_endpointtypeid_index") @@index([participantId], map: "participantendpoint_participantid_index") @@ -318,9 +330,9 @@ model participantLimit { isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) createdBy String @db.VarChar(128) - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "participantlimit_participantcurrencyid_foreign") - participantLimitType participantLimitType @relation(fields: [participantLimitTypeId], references: [participantLimitTypeId], onUpdate: Restrict, map: "participantlimit_participantlimittypeid_foreign") - participantPositionChange participantPositionChange? @relation(fields: [startAfterParticipantPositionChangeId], references: [participantPositionChangeId], onDelete: Restrict, onUpdate: Restrict, map: "participantlimit_startafterparticipantpositionchangeid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "participantlimit_participantcurrencyid_foreign") + participantLimitType participantLimitType @relation(fields: [participantLimitTypeId], references: [participantLimitTypeId], onDelete: NoAction, onUpdate: NoAction, map: "participantlimit_participantlimittypeid_foreign") + participantPositionChange participantPositionChange? @relation(fields: [startAfterParticipantPositionChangeId], references: [participantPositionChangeId], onDelete: NoAction, onUpdate: NoAction, map: "participantlimit_startafterparticipantpositionchangeid_foreign") @@unique([participantCurrencyId, participantLimitTypeId, isActive, participantLimitId], map: "participantLimit_unique_idx") @@index([participantCurrencyId], map: "participantlimit_participantcurrencyid_index") @@ -341,7 +353,7 @@ model participantParty { participantPartyId BigInt @id @default(autoincrement()) @db.UnsignedBigInt participantId Int @db.UnsignedInt partyId BigInt @db.UnsignedBigInt - participant participant @relation(fields: [participantId], references: [participantId], onUpdate: Restrict, map: "participantparty_participantid_foreign") + participant participant @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "participantparty_participantid_foreign") @@unique([participantId, partyId], map: "participantparty_participantid_partyid_unique") @@index([participantId], map: "participantparty_participantid_index") @@ -353,25 +365,31 @@ model participantPosition { value Decimal @db.Decimal(18, 4) reservedValue Decimal @db.Decimal(18, 4) changedDate DateTime @default(now()) @db.DateTime(0) - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "participantposition_participantcurrencyid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "participantposition_participantcurrencyid_foreign") participantPositionChange participantPositionChange[] @@index([participantCurrencyId], map: "participantposition_participantcurrencyid_index") } model participantPositionChange { - participantPositionChangeId BigInt @id @default(autoincrement()) @db.UnsignedBigInt - participantPositionId BigInt @db.UnsignedBigInt - transferStateChangeId BigInt @db.UnsignedBigInt - value Decimal @db.Decimal(18, 4) - reservedValue Decimal @db.Decimal(18, 4) - createdDate DateTime @default(now()) @db.DateTime(0) - participantPosition participantPosition @relation(fields: [participantPositionId], references: [participantPositionId], onUpdate: Restrict, map: "participantpositionchange_participantpositionid_foreign") - transferStateChange transferStateChange @relation(fields: [transferStateChangeId], references: [transferStateChangeId], onUpdate: Restrict, map: "participantpositionchange_transferstatechangeid_foreign") + participantPositionChangeId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + participantPositionId BigInt @db.UnsignedBigInt + transferStateChangeId BigInt? @db.UnsignedBigInt + value Decimal @db.Decimal(18, 4) + reservedValue Decimal @db.Decimal(18, 4) + createdDate DateTime @default(now()) @db.DateTime(0) + participantCurrencyId Int @db.UnsignedInt + fxTransferStateChangeId BigInt? @db.UnsignedBigInt participantLimit participantLimit[] + fxTransferStateChange fxTransferStateChange? @relation(fields: [fxTransferStateChangeId], references: [fxTransferStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "participantpositionchange_fxtransferstatechangeid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "participantpositionchange_participantcurrencyid_foreign") + participantPosition participantPosition @relation(fields: [participantPositionId], references: [participantPositionId], onDelete: NoAction, onUpdate: NoAction, map: "participantpositionchange_participantpositionid_foreign") + transferStateChange transferStateChange? @relation(fields: [transferStateChangeId], references: [transferStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "participantpositionchange_transferstatechangeid_foreign") @@index([participantPositionId], map: "participantpositionchange_participantpositionid_index") @@index([transferStateChangeId], map: "participantpositionchange_transferstatechangeid_index") + @@index([fxTransferStateChangeId], map: "participantpositionchange_fxtransferstatechangeid_foreign") + @@index([participantCurrencyId], map: "participantpositionchange_participantcurrencyid_foreign") } model party { @@ -381,7 +399,7 @@ model party { middleName String? @db.VarChar(128) lastName String? @db.VarChar(128) dateOfBirth DateTime? @db.DateTime(0) - quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onUpdate: Restrict, map: "party_quotepartyid_foreign") + quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onDelete: NoAction, onUpdate: NoAction, map: "party_quotepartyid_foreign") @@index([quotePartyId], map: "party_quotepartyid_foreign") } @@ -391,7 +409,6 @@ model partyIdentifierType { name String @unique(map: "partyidentifiertype_name_unique") @db.VarChar(50) description String @db.VarChar(512) quoteParty_partyIdentifierTypeToquoteParty_partyIdentifierTypeId quoteParty[] @relation("partyIdentifierTypeToquoteParty_partyIdentifierTypeId") - quoteParty_partyIdentifierTypeToquoteParty_partySubIdOrTypeId quoteParty[] @relation("partyIdentifierTypeToquoteParty_partySubIdOrTypeId") } model partyType { @@ -414,17 +431,16 @@ model quote { transactionSubScenarioId Int? @db.UnsignedInt amountTypeId Int @db.UnsignedInt amount Decimal @default(0.0000) @db.Decimal(18, 4) - currencyId String? @db.VarChar(3) + currencyId String? @db.VarChar(255) createdDate DateTime @default(now()) @db.DateTime(0) - amountType amountType @relation(fields: [amountTypeId], references: [amountTypeId], onUpdate: Restrict, map: "quote_amounttypeid_foreign") - balanceOfPayments balanceOfPayments? @relation(fields: [balanceOfPaymentsId], references: [balanceOfPaymentsId], onDelete: Restrict, onUpdate: Restrict, map: "quote_balanceofpaymentsid_foreign") - currency currency? @relation(fields: [currencyId], references: [currencyId], onDelete: Restrict, onUpdate: Restrict, map: "quote_currencyid_foreign") - transactionInitiator transactionInitiator @relation(fields: [transactionInitiatorId], references: [transactionInitiatorId], onUpdate: Restrict, map: "quote_transactioninitiatorid_foreign") - transactionInitiatorType transactionInitiatorType @relation(fields: [transactionInitiatorTypeId], references: [transactionInitiatorTypeId], onUpdate: Restrict, map: "quote_transactioninitiatortypeid_foreign") - transactionReference_quote_transactionReferenceIdTotransactionReference transactionReference @relation("quote_transactionReferenceIdTotransactionReference", fields: [transactionReferenceId], references: [transactionReferenceId], onUpdate: Restrict, map: "quote_transactionreferenceid_foreign") - transactionReference_quote_transactionRequestIdTotransactionReference transactionReference? @relation("quote_transactionRequestIdTotransactionReference", fields: [transactionRequestId], references: [transactionReferenceId], onDelete: Restrict, onUpdate: Restrict, map: "quote_transactionrequestid_foreign") - transactionScenario transactionScenario @relation(fields: [transactionScenarioId], references: [transactionScenarioId], onUpdate: Restrict, map: "quote_transactionscenarioid_foreign") - transactionSubScenario transactionSubScenario? @relation(fields: [transactionSubScenarioId], references: [transactionSubScenarioId], onDelete: Restrict, onUpdate: Restrict, map: "quote_transactionsubscenarioid_foreign") + amountType amountType @relation(fields: [amountTypeId], references: [amountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quote_amounttypeid_foreign") + balanceOfPayments balanceOfPayments? @relation(fields: [balanceOfPaymentsId], references: [balanceOfPaymentsId], onDelete: NoAction, onUpdate: NoAction, map: "quote_balanceofpaymentsid_foreign") + currency currency? @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "quote_currencyid_foreign") + transactionInitiator transactionInitiator @relation(fields: [transactionInitiatorId], references: [transactionInitiatorId], onDelete: NoAction, onUpdate: NoAction, map: "quote_transactioninitiatorid_foreign") + transactionInitiatorType transactionInitiatorType @relation(fields: [transactionInitiatorTypeId], references: [transactionInitiatorTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quote_transactioninitiatortypeid_foreign") + transactionReference_quote_transactionReferenceIdTotransactionReference transactionReference @relation("quote_transactionReferenceIdTotransactionReference", fields: [transactionReferenceId], references: [transactionReferenceId], onDelete: NoAction, onUpdate: NoAction, map: "quote_transactionreferenceid_foreign") + transactionScenario transactionScenario @relation(fields: [transactionScenarioId], references: [transactionScenarioId], onDelete: NoAction, onUpdate: NoAction, map: "quote_transactionscenarioid_foreign") + transactionSubScenario transactionSubScenario? @relation(fields: [transactionSubScenarioId], references: [transactionSubScenarioId], onDelete: NoAction, onUpdate: NoAction, map: "quote_transactionsubscenarioid_foreign") quoteError quoteError[] quoteExtension quoteExtension[] quoteParty quoteParty[] @@ -456,8 +472,8 @@ model quoteError { errorCode Int @db.UnsignedInt errorDescription String @db.VarChar(128) createdDate DateTime @default(now()) @db.DateTime(0) - quote quote @relation(fields: [quoteId], references: [quoteId], onUpdate: Restrict, map: "quoteerror_quoteid_foreign") - quoteResponse quoteResponse? @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: Restrict, onUpdate: Restrict, map: "quoteerror_quoteresponseid_foreign") + quote quote @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "quoteerror_quoteid_foreign") + quoteResponse quoteResponse? @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "quoteerror_quoteresponseid_foreign") @@index([quoteId], map: "quoteerror_quoteid_foreign") @@index([quoteResponseId], map: "quoteerror_quoteresponseid_foreign") @@ -471,9 +487,9 @@ model quoteExtension { key String @db.VarChar(128) value String @db.Text createdDate DateTime @default(now()) @db.DateTime(0) - quote quote @relation(fields: [quoteId], references: [quoteId], onUpdate: Restrict, map: "quoteextension_quoteid_foreign") - quoteResponse quoteResponse? @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: Restrict, onUpdate: Restrict, map: "quoteextension_quoteresponseid_foreign") - transactionReference transactionReference? @relation(fields: [transactionId], references: [transactionReferenceId], onDelete: Restrict, onUpdate: Restrict, map: "quoteextension_transactionid_foreign") + quote quote @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "quoteextension_quoteid_foreign") + quoteResponse quoteResponse? @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "quoteextension_quoteresponseid_foreign") + transactionReference transactionReference? @relation(fields: [transactionId], references: [transactionReferenceId], onDelete: NoAction, onUpdate: NoAction, map: "quoteextension_transactionid_foreign") @@index([quoteId], map: "quoteextension_quoteid_foreign") @@index([quoteResponseId], map: "quoteextension_quoteresponseid_foreign") @@ -486,7 +502,7 @@ model quoteParty { partyTypeId Int @db.UnsignedInt partyIdentifierTypeId Int @db.UnsignedInt partyIdentifierValue String @db.VarChar(128) - partySubIdOrTypeId Int? @db.UnsignedInt + partySubIdOrTypeId String? @db.VarChar(128) fspId String? @db.VarChar(255) participantId Int? @db.UnsignedInt merchantClassificationCode String? @db.VarChar(4) @@ -496,16 +512,15 @@ model quoteParty { amount Decimal @db.Decimal(18, 4) currencyId String @db.VarChar(3) createdDate DateTime @default(now()) @db.DateTime(0) - currency currency @relation(fields: [currencyId], references: [currencyId], onUpdate: Restrict, map: "quoteparty_currencyid_foreign") - ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onUpdate: Restrict, map: "quoteparty_ledgerentrytypeid_foreign") - participant participant? @relation(fields: [participantId], references: [participantId], onDelete: Restrict, onUpdate: Restrict, map: "quoteparty_participantid_foreign") - partyIdentifierType_partyIdentifierTypeToquoteParty_partyIdentifierTypeId partyIdentifierType @relation("partyIdentifierTypeToquoteParty_partyIdentifierTypeId", fields: [partyIdentifierTypeId], references: [partyIdentifierTypeId], onUpdate: Restrict, map: "quoteparty_partyidentifiertypeid_foreign") - partyIdentifierType_partyIdentifierTypeToquoteParty_partySubIdOrTypeId partyIdentifierType? @relation("partyIdentifierTypeToquoteParty_partySubIdOrTypeId", fields: [partySubIdOrTypeId], references: [partyIdentifierTypeId], onDelete: Restrict, onUpdate: Restrict, map: "quoteparty_partysubidortypeid_foreign") - partyType partyType @relation(fields: [partyTypeId], references: [partyTypeId], onUpdate: Restrict, map: "quoteparty_partytypeid_foreign") - quote quote @relation(fields: [quoteId], references: [quoteId], onUpdate: Restrict, map: "quoteparty_quoteid_foreign") - transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onUpdate: Restrict, map: "quoteparty_transferparticipantroletypeid_foreign") geoCode geoCode[] party party[] + currency currency @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_currencyid_foreign") + ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_ledgerentrytypeid_foreign") + participant participant? @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_participantid_foreign") + partyIdentifierType_partyIdentifierTypeToquoteParty_partyIdentifierTypeId partyIdentifierType @relation("partyIdentifierTypeToquoteParty_partyIdentifierTypeId", fields: [partyIdentifierTypeId], references: [partyIdentifierTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_partyidentifiertypeid_foreign") + partyType partyType @relation(fields: [partyTypeId], references: [partyTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_partytypeid_foreign") + quote quote @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_quoteid_foreign") + transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onDelete: NoAction, onUpdate: NoAction, map: "quoteparty_transferparticipantroletypeid_foreign") quotePartyIdInfoExtension quotePartyIdInfoExtension[] @@index([currencyId], map: "quoteparty_currencyid_foreign") @@ -524,7 +539,7 @@ model quotePartyIdInfoExtension { key String @db.VarChar(128) value String @db.Text createdDate DateTime @default(now()) @db.DateTime(0) - quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onUpdate: Restrict, map: "quotepartyidinfoextension_quotepartyid_foreign") + quoteParty quoteParty @relation(fields: [quotePartyId], references: [quotePartyId], onDelete: NoAction, onUpdate: NoAction, map: "quotepartyidinfoextension_quotepartyid_foreign") @@index([quotePartyId], map: "quotepartyidinfoextension_quotepartyid_foreign") } @@ -540,16 +555,16 @@ model quoteResponse { payeeFspFeeAmount Decimal? @db.Decimal(18, 4) payeeFspCommissionCurrencyId String? @db.VarChar(3) payeeFspCommissionAmount Decimal? @db.Decimal(18, 4) - ilpCondition String @unique(map: "quoteResponse_ilpCondition_unique") @db.VarChar(256) + ilpCondition String @db.VarChar(256) responseExpirationDate DateTime? @db.DateTime(0) isValid Boolean? createdDate DateTime @default(now()) @db.DateTime(0) - currency_currencyToquoteResponse_payeeFspCommissionCurrencyId currency? @relation("currencyToquoteResponse_payeeFspCommissionCurrencyId", fields: [payeeFspCommissionCurrencyId], references: [currencyId], onDelete: Restrict, onUpdate: Restrict, map: "quoteresponse_payeefspcommissioncurrencyid_foreign") - currency_currencyToquoteResponse_payeeReceiveAmountCurrencyId currency? @relation("currencyToquoteResponse_payeeReceiveAmountCurrencyId", fields: [payeeReceiveAmountCurrencyId], references: [currencyId], onDelete: Restrict, onUpdate: Restrict, map: "quoteresponse_payeereceiveamountcurrencyid_foreign") - quote quote @relation(fields: [quoteId], references: [quoteId], onUpdate: Restrict, map: "quoteresponse_quoteid_foreign") - currency_currencyToquoteResponse_transferAmountCurrencyId currency @relation("currencyToquoteResponse_transferAmountCurrencyId", fields: [transferAmountCurrencyId], references: [currencyId], onUpdate: Restrict, map: "quoteresponse_transferamountcurrencyid_foreign") quoteError quoteError[] quoteExtension quoteExtension[] + currency_currencyToquoteResponse_payeeFspCommissionCurrencyId currency? @relation("currencyToquoteResponse_payeeFspCommissionCurrencyId", fields: [payeeFspCommissionCurrencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponse_payeefspcommissioncurrencyid_foreign") + currency_currencyToquoteResponse_payeeReceiveAmountCurrencyId currency? @relation("currencyToquoteResponse_payeeReceiveAmountCurrencyId", fields: [payeeReceiveAmountCurrencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponse_payeereceiveamountcurrencyid_foreign") + quote quote @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponse_quoteid_foreign") + currency_currencyToquoteResponse_transferAmountCurrencyId currency @relation("currencyToquoteResponse_transferAmountCurrencyId", fields: [transferAmountCurrencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponse_transferamountcurrencyid_foreign") quoteResponseDuplicateCheck quoteResponseDuplicateCheck? quoteResponseIlpPacket quoteResponseIlpPacket? @@ -564,8 +579,8 @@ model quoteResponseDuplicateCheck { quoteId String @db.VarChar(36) hash String? @db.VarChar(255) createdDate DateTime @default(now()) @db.DateTime(0) - quote quote @relation(fields: [quoteId], references: [quoteId], onUpdate: Restrict, map: "quoteresponseduplicatecheck_quoteid_foreign") - quoteResponse quoteResponse @relation(fields: [quoteResponseId], references: [quoteResponseId], onUpdate: Restrict, map: "quoteresponseduplicatecheck_quoteresponseid_foreign") + quote quote @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponseduplicatecheck_quoteid_foreign") + quoteResponse quoteResponse @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponseduplicatecheck_quoteresponseid_foreign") @@index([quoteId], map: "quoteresponseduplicatecheck_quoteid_foreign") } @@ -573,7 +588,7 @@ model quoteResponseDuplicateCheck { model quoteResponseIlpPacket { quoteResponseId BigInt @id @default(autoincrement()) @db.UnsignedBigInt value String @db.Text - quoteResponse quoteResponse @relation(fields: [quoteResponseId], references: [quoteResponseId], onUpdate: Restrict, map: "quoteresponseilppacket_quoteresponseid_foreign") + quoteResponse quoteResponse @relation(fields: [quoteResponseId], references: [quoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "quoteresponseilppacket_quoteresponseid_foreign") } model segment { @@ -593,8 +608,8 @@ model settlement { createdDate DateTime @default(now()) @db.DateTime(0) currentStateChangeId BigInt? @db.UnsignedBigInt settlementModelId Int? @db.UnsignedInt - settlementStateChange_settlement_currentStateChangeIdTosettlementStateChange settlementStateChange? @relation("settlement_currentStateChangeIdTosettlementStateChange", fields: [currentStateChangeId], references: [settlementStateChangeId], onDelete: Restrict, onUpdate: Restrict, map: "settlement_currentstatechangeid_foreign") - settlementModel settlementModel? @relation(fields: [settlementModelId], references: [settlementModelId], onDelete: Restrict, onUpdate: Restrict, map: "settlement_settlementmodelid_foreign") + settlementStateChange_settlement_currentStateChangeIdTosettlementStateChange settlementStateChange? @relation("settlement_currentStateChangeIdTosettlementStateChange", fields: [currentStateChangeId], references: [settlementStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "settlement_currentstatechangeid_foreign") + settlementModel settlementModel? @relation(fields: [settlementModelId], references: [settlementModelId], onDelete: NoAction, onUpdate: NoAction, map: "settlement_settlementmodelid_foreign") settlementContentAggregation settlementContentAggregation[] settlementParticipantCurrency settlementParticipantCurrency[] settlementSettlementWindow settlementSettlementWindow[] @@ -616,12 +631,12 @@ model settlementContentAggregation { createdDate DateTime @default(now()) @db.DateTime(0) currentStateId String @db.VarChar(50) settlementId BigInt? @db.UnsignedBigInt - settlementWindowState settlementWindowState @relation(fields: [currentStateId], references: [settlementWindowStateId], onUpdate: Restrict, map: "settlementcontentaggregation_currentstateid_foreign") - ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onUpdate: Restrict, map: "settlementcontentaggregation_ledgerentrytypeid_foreign") - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "settlementcontentaggregation_participantcurrencyid_foreign") - settlement settlement? @relation(fields: [settlementId], references: [settlementId], onDelete: Restrict, onUpdate: Restrict, map: "settlementcontentaggregation_settlementid_foreign") - settlementWindowContent settlementWindowContent @relation(fields: [settlementWindowContentId], references: [settlementWindowContentId], onUpdate: Restrict, map: "settlementcontentaggregation_settlementwindowcontentid_foreign") - transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onUpdate: Restrict, map: "sca_transferparticipantroletypeid_foreign") + transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onDelete: NoAction, onUpdate: NoAction, map: "sca_transferparticipantroletypeid_foreign") + settlementWindowState settlementWindowState @relation(fields: [currentStateId], references: [settlementWindowStateId], onDelete: NoAction, onUpdate: NoAction, map: "settlementcontentaggregation_currentstateid_foreign") + ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementcontentaggregation_ledgerentrytypeid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "settlementcontentaggregation_participantcurrencyid_foreign") + settlement settlement? @relation(fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementcontentaggregation_settlementid_foreign") + settlementWindowContent settlementWindowContent @relation(fields: [settlementWindowContentId], references: [settlementWindowContentId], onDelete: NoAction, onUpdate: NoAction, map: "settlementcontentaggregation_settlementwindowcontentid_foreign") @@index([currentStateId], map: "settlementcontentaggregation_currentstateid_index") @@index([ledgerEntryTypeId], map: "settlementcontentaggregation_ledgerentrytypeid_index") @@ -659,24 +674,25 @@ model settlementInterchange { } model settlementModel { - settlementModelId Int @id @default(autoincrement()) @db.UnsignedInt - name String @unique(map: "settlementmodel_name_unique") @db.VarChar(50) - isActive Boolean @default(true) - settlementGranularityId Int @db.UnsignedInt - settlementInterchangeId Int @db.UnsignedInt - settlementDelayId Int @db.UnsignedInt - currencyId String? @db.VarChar(3) - requireLiquidityCheck Boolean @default(true) - ledgerAccountTypeId Int @db.UnsignedInt - autoPositionReset Boolean @default(false) - adjustPosition Boolean @default(false) + settlementModelId Int @id @default(autoincrement()) @db.UnsignedInt + name String @unique(map: "settlementmodel_name_unique") @db.VarChar(50) + isActive Boolean @default(true) + settlementGranularityId Int @db.UnsignedInt + settlementInterchangeId Int @db.UnsignedInt + settlementDelayId Int @db.UnsignedInt + currencyId String? @db.VarChar(3) + requireLiquidityCheck Boolean @default(true) + ledgerAccountTypeId Int @db.UnsignedInt + autoPositionReset Boolean @default(false) + adjustPosition Boolean @default(false) settlementAccountTypeId Int - currency currency? @relation(fields: [currencyId], references: [currencyId], onDelete: Restrict, onUpdate: Restrict, map: "settlementmodel_currencyid_foreign") - ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onUpdate: Restrict, map: "settlementmodel_ledgeraccounttypeid_foreign") - settlementDelay settlementDelay @relation(fields: [settlementDelayId], references: [settlementDelayId], onUpdate: Restrict, map: "settlementmodel_settlementdelayid_foreign") - settlementGranularity settlementGranularity @relation(fields: [settlementGranularityId], references: [settlementGranularityId], onUpdate: Restrict, map: "settlementmodel_settlementgranularityid_foreign") - settlementInterchange settlementInterchange @relation(fields: [settlementInterchangeId], references: [settlementInterchangeId], onUpdate: Restrict, map: "settlementmodel_settlementinterchangeid_foreign") settlement settlement[] + currency currency? @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "settlementmodel_currencyid_foreign") + ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementmodel_ledgeraccounttypeid_foreign") + settlementDelay settlementDelay @relation(fields: [settlementDelayId], references: [settlementDelayId], onDelete: NoAction, onUpdate: NoAction, map: "settlementmodel_settlementdelayid_foreign") + settlementGranularity settlementGranularity @relation(fields: [settlementGranularityId], references: [settlementGranularityId], onDelete: NoAction, onUpdate: NoAction, map: "settlementmodel_settlementgranularityid_foreign") + settlementInterchange settlementInterchange @relation(fields: [settlementInterchangeId], references: [settlementInterchangeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementmodel_settlementinterchangeid_foreign") + settlementWindowContent settlementWindowContent[] @@unique([currencyId, ledgerAccountTypeId], map: "settlementmodel_currencyid_ledgeraccounttypeid_unique") @@unique([settlementGranularityId, settlementInterchangeId, settlementDelayId, ledgerAccountTypeId, currencyId], map: "settlementmodel_unique") @@ -696,9 +712,9 @@ model settlementParticipantCurrency { createdDate DateTime @default(now()) @db.DateTime(0) currentStateChangeId BigInt? @db.UnsignedBigInt settlementTransferId String? @db.VarChar(36) - settlementParticipantCurrencyStateChange_settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange settlementParticipantCurrencyStateChange? @relation("settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange", fields: [currentStateChangeId], references: [settlementParticipantCurrencyStateChangeId], onDelete: Restrict, onUpdate: Restrict, map: "spc_currentstatechangeid_foreign") - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "settlementparticipantcurrency_participantcurrencyid_foreign") - settlement settlement @relation(fields: [settlementId], references: [settlementId], onUpdate: Restrict, map: "settlementparticipantcurrency_settlementid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "settlementparticipantcurrency_participantcurrencyid_foreign") + settlement settlement @relation(fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementparticipantcurrency_settlementid_foreign") + settlementParticipantCurrencyStateChange_settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange settlementParticipantCurrencyStateChange? @relation("settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange", fields: [currentStateChangeId], references: [settlementParticipantCurrencyStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "spc_currentstatechangeid_foreign") settlementParticipantCurrencyStateChange_settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId settlementParticipantCurrencyStateChange[] @relation("settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId") @@index([participantCurrencyId], map: "settlementparticipantcurrency_participantcurrencyid_index") @@ -714,9 +730,9 @@ model settlementParticipantCurrencyStateChange { reason String? @db.VarChar(512) externalReference String? @db.VarChar(50) createdDate DateTime @default(now()) @db.DateTime(0) - settlementParticipantCurrency_settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId settlementParticipantCurrency @relation("settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId", fields: [settlementParticipantCurrencyId], references: [settlementParticipantCurrencyId], onUpdate: Restrict, map: "spcsc_settlementparticipantcurrencyid_foreign") - settlementState settlementState @relation(fields: [settlementStateId], references: [settlementStateId], onUpdate: Restrict, map: "spcsc_settlementstateid_foreign") settlementParticipantCurrency_settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange settlementParticipantCurrency[] @relation("settlementParticipantCurrency_currentStateChangeIdTosettlementParticipantCurrencyStateChange") + settlementParticipantCurrency_settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId settlementParticipantCurrency @relation("settlementParticipantCurrencyTosettlementParticipantCurrencyStateChange_settlementParticipantCurrencyId", fields: [settlementParticipantCurrencyId], references: [settlementParticipantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "spcsc_settlementparticipantcurrencyid_foreign") + settlementState settlementState @relation(fields: [settlementStateId], references: [settlementStateId], onDelete: NoAction, onUpdate: NoAction, map: "spcsc_settlementstateid_foreign") @@index([settlementParticipantCurrencyId], map: "spcsc_settlementparticipantcurrencyid_index") @@index([settlementStateId], map: "spcsc_settlementstateid_index") @@ -727,8 +743,8 @@ model settlementSettlementWindow { settlementId BigInt @db.UnsignedBigInt settlementWindowId BigInt @db.UnsignedBigInt createdDate DateTime @default(now()) @db.DateTime(0) - settlement settlement @relation(fields: [settlementId], references: [settlementId], onUpdate: Restrict, map: "settlementsettlementwindow_settlementid_foreign") - settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onUpdate: Restrict, map: "settlementsettlementwindow_settlementwindowid_foreign") + settlement settlement @relation(fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementsettlementwindow_settlementid_foreign") + settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "settlementsettlementwindow_settlementwindowid_foreign") @@unique([settlementId, settlementWindowId], map: "settlementsettlementwindow_unique") @@index([settlementId], map: "settlementsettlementwindow_settlementid_index") @@ -751,9 +767,9 @@ model settlementStateChange { settlementStateId String @db.VarChar(50) reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) - settlement_settlementTosettlementStateChange_settlementId settlement @relation("settlementTosettlementStateChange_settlementId", fields: [settlementId], references: [settlementId], onUpdate: Restrict, map: "settlementstatechange_settlementid_foreign") - settlementState settlementState @relation(fields: [settlementStateId], references: [settlementStateId], onUpdate: Restrict, map: "settlementstatechange_settlementstateid_foreign") settlement_settlement_currentStateChangeIdTosettlementStateChange settlement[] @relation("settlement_currentStateChangeIdTosettlementStateChange") + settlement_settlementTosettlementStateChange_settlementId settlement @relation("settlementTosettlementStateChange_settlementId", fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementstatechange_settlementid_foreign") + settlementState settlementState @relation(fields: [settlementStateId], references: [settlementStateId], onDelete: NoAction, onUpdate: NoAction, map: "settlementstatechange_settlementstateid_foreign") @@index([settlementId], map: "settlementstatechange_settlementid_index") @@index([settlementStateId], map: "settlementstatechange_settlementstateid_index") @@ -768,11 +784,11 @@ model settlementTransferParticipant { ledgerEntryTypeId Int @db.UnsignedInt amount Decimal @db.Decimal(18, 4) createdDate DateTime @default(now()) @db.DateTime(0) - ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onUpdate: Restrict, map: "settlementtransferparticipant_ledgerentrytypeid_foreign") - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "settlementtransferparticipant_participantcurrencyid_foreign") - settlement settlement @relation(fields: [settlementId], references: [settlementId], onUpdate: Restrict, map: "settlementtransferparticipant_settlementid_foreign") - settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onUpdate: Restrict, map: "settlementtransferparticipant_settlementwindowid_foreign") - transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onUpdate: Restrict, map: "stp_transferparticipantroletypeid_foreign") + ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementtransferparticipant_ledgerentrytypeid_foreign") + participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "settlementtransferparticipant_participantcurrencyid_foreign") + settlement settlement @relation(fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementtransferparticipant_settlementid_foreign") + settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "settlementtransferparticipant_settlementwindowid_foreign") + transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onDelete: NoAction, onUpdate: NoAction, map: "stp_transferparticipantroletypeid_foreign") @@index([ledgerEntryTypeId], map: "settlementtransferparticipant_ledgerentrytypeid_index") @@index([participantCurrencyId], map: "settlementtransferparticipant_participantcurrencyid_index") @@ -786,9 +802,10 @@ model settlementWindow { reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) currentStateChangeId BigInt? @db.UnsignedBigInt - settlementWindowStateChange_settlementWindow_currentStateChangeIdTosettlementWindowStateChange settlementWindowStateChange? @relation("settlementWindow_currentStateChangeIdTosettlementWindowStateChange", fields: [currentStateChangeId], references: [settlementWindowStateChangeId], onDelete: Restrict, onUpdate: Restrict, map: "settlementwindow_currentstatechangeid_foreign") + fxTransferFulfilment fxTransferFulfilment[] settlementSettlementWindow settlementSettlementWindow[] settlementTransferParticipant settlementTransferParticipant[] + settlementWindowStateChange_settlementWindow_currentStateChangeIdTosettlementWindowStateChange settlementWindowStateChange? @relation("settlementWindow_currentStateChangeIdTosettlementWindowStateChange", fields: [currentStateChangeId], references: [settlementWindowStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindow_currentstatechangeid_foreign") settlementWindowContent settlementWindowContent[] settlementWindowStateChange_settlementWindowTosettlementWindowStateChange_settlementWindowId settlementWindowStateChange[] @relation("settlementWindowTosettlementWindowStateChange_settlementWindowId") transferFulfilment transferFulfilment[] @@ -804,12 +821,14 @@ model settlementWindowContent { createdDate DateTime @default(now()) @db.DateTime(0) currentStateChangeId BigInt? @db.UnsignedBigInt settlementId BigInt? @db.UnsignedBigInt - currency currency @relation(fields: [currencyId], references: [currencyId], onUpdate: Restrict, map: "settlementwindowcontent_currencyid_foreign") - settlementWindowContentStateChange_settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange settlementWindowContentStateChange? @relation("settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange", fields: [currentStateChangeId], references: [settlementWindowContentStateChangeId], onDelete: Restrict, onUpdate: Restrict, map: "settlementwindowcontent_currentstatechangeid_foreign") - ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onUpdate: Restrict, map: "settlementwindowcontent_ledgeraccounttypeid_foreign") - settlement settlement? @relation(fields: [settlementId], references: [settlementId], onDelete: Restrict, onUpdate: Restrict, map: "settlementwindowcontent_settlementid_foreign") - settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onUpdate: Restrict, map: "settlementwindowcontent_settlementwindowid_foreign") + SettlementModelId Int? @db.UnsignedInt settlementContentAggregation settlementContentAggregation[] + currency currency @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_currencyid_foreign") + settlementWindowContentStateChange_settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange settlementWindowContentStateChange? @relation("settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange", fields: [currentStateChangeId], references: [settlementWindowContentStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_currentstatechangeid_foreign") + ledgerAccountType ledgerAccountType @relation(fields: [ledgerAccountTypeId], references: [ledgerAccountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_ledgeraccounttypeid_foreign") + settlement settlement? @relation(fields: [settlementId], references: [settlementId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_settlementid_foreign") + settlementModel settlementModel? @relation(fields: [SettlementModelId], references: [settlementModelId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_settlementmodelid_foreign") + settlementWindow settlementWindow @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowcontent_settlementwindowid_foreign") settlementWindowContentStateChange_settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId settlementWindowContentStateChange[] @relation("settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId") @@index([currencyId], map: "settlementwindowcontent_currencyid_index") @@ -817,6 +836,7 @@ model settlementWindowContent { @@index([ledgerAccountTypeId], map: "settlementwindowcontent_ledgeraccounttypeid_index") @@index([settlementId], map: "settlementwindowcontent_settlementid_index") @@index([settlementWindowId], map: "settlementwindowcontent_settlementwindowid_index") + @@index([SettlementModelId], map: "settlementwindowcontent_settlementmodelid_foreign") } model settlementWindowContentStateChange { @@ -825,9 +845,9 @@ model settlementWindowContentStateChange { settlementWindowStateId String @db.VarChar(50) reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) - settlementWindowContent_settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId settlementWindowContent @relation("settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId", fields: [settlementWindowContentId], references: [settlementWindowContentId], onUpdate: Restrict, map: "swc_settlementwindowcontentid_foreign") - settlementWindowState settlementWindowState @relation(fields: [settlementWindowStateId], references: [settlementWindowStateId], onUpdate: Restrict, map: "sws1_settlementwindowstateid_foreign") settlementWindowContent_settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange settlementWindowContent[] @relation("settlementWindowContent_currentStateChangeIdTosettlementWindowContentStateChange") + settlementWindowContent_settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId settlementWindowContent @relation("settlementWindowContentTosettlementWindowContentStateChange_settlementWindowContentId", fields: [settlementWindowContentId], references: [settlementWindowContentId], onDelete: NoAction, onUpdate: NoAction, map: "swc_settlementwindowcontentid_foreign") + settlementWindowState settlementWindowState @relation(fields: [settlementWindowStateId], references: [settlementWindowStateId], onDelete: NoAction, onUpdate: NoAction, map: "sws1_settlementwindowstateid_foreign") @@index([settlementWindowContentId], map: "swcsc_settlementwindowcontentid_index") @@index([settlementWindowStateId], map: "swcsc_settlementwindowstateid_index") @@ -850,9 +870,9 @@ model settlementWindowStateChange { settlementWindowStateId String @db.VarChar(50) reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) - settlementWindow_settlementWindowTosettlementWindowStateChange_settlementWindowId settlementWindow @relation("settlementWindowTosettlementWindowStateChange_settlementWindowId", fields: [settlementWindowId], references: [settlementWindowId], onUpdate: Restrict, map: "settlementwindowstatechange_settlementwindowid_foreign") - settlementWindowState settlementWindowState @relation(fields: [settlementWindowStateId], references: [settlementWindowStateId], onUpdate: Restrict, map: "settlementwindowstatechange_settlementwindowstateid_foreign") settlementWindow_settlementWindow_currentStateChangeIdTosettlementWindowStateChange settlementWindow[] @relation("settlementWindow_currentStateChangeIdTosettlementWindowStateChange") + settlementWindow_settlementWindowTosettlementWindowStateChange_settlementWindowId settlementWindow @relation("settlementWindowTosettlementWindowStateChange_settlementWindowId", fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowstatechange_settlementwindowid_foreign") + settlementWindowState settlementWindowState @relation(fields: [settlementWindowStateId], references: [settlementWindowStateId], onDelete: NoAction, onUpdate: NoAction, map: "settlementwindowstatechange_settlementwindowstateid_foreign") @@index([settlementWindowId], map: "settlementwindowstatechange_settlementwindowid_index") @@index([settlementWindowStateId], map: "settlementwindowstatechange_settlementwindowstateid_index") @@ -864,7 +884,7 @@ model token { value String @unique(map: "token_value_unique") @db.VarChar(256) expiration BigInt? createdDate DateTime @default(now()) @db.DateTime(0) - participant participant @relation(fields: [participantId], references: [participantId], onUpdate: Restrict, map: "token_participantid_foreign") + participant participant @relation(fields: [participantId], references: [participantId], onDelete: NoAction, onUpdate: NoAction, map: "token_participantid_foreign") @@index([participantId], map: "token_participantid_index") } @@ -889,10 +909,9 @@ model transactionReference { transactionReferenceId String @id @db.VarChar(36) quoteId String? @db.VarChar(36) createdDate DateTime @default(now()) @db.DateTime(0) - quoteDuplicateCheck quoteDuplicateCheck? @relation(fields: [quoteId], references: [quoteId], onDelete: Restrict, onUpdate: Restrict, map: "transactionreference_quoteid_foreign") quote_quote_transactionReferenceIdTotransactionReference quote[] @relation("quote_transactionReferenceIdTotransactionReference") - quote_quote_transactionRequestIdTotransactionReference quote[] @relation("quote_transactionRequestIdTotransactionReference") quoteExtension quoteExtension[] + quoteDuplicateCheck quoteDuplicateCheck? @relation(fields: [quoteId], references: [quoteId], onDelete: NoAction, onUpdate: NoAction, map: "transactionreference_quoteid_foreign") @@index([quoteId], map: "transactionreference_quoteid_index") } @@ -920,10 +939,10 @@ model transfer { ilpCondition String @unique(map: "transfer_ilpCondition_unique") @db.VarChar(256) expirationDate DateTime @db.DateTime(0) createdDate DateTime @default(now()) @db.DateTime(0) - currency currency @relation(fields: [currencyId], references: [currencyId], onUpdate: Restrict, map: "transfer_currencyid_foreign") - transferDuplicateCheck transferDuplicateCheck @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transfer_transferid_foreign") expiringTransfer expiringTransfer? ilpPacket ilpPacket? + currency currency @relation(fields: [currencyId], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "transfer_currencyid_foreign") + transferDuplicateCheck transferDuplicateCheck @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transfer_transferid_foreign") transferErrorDuplicateCheck transferErrorDuplicateCheck? transferExtension transferExtension[] transferFulfilmentDuplicateCheck transferFulfilmentDuplicateCheck? @@ -947,7 +966,7 @@ model transferError { errorCode Int @db.UnsignedInt errorDescription String @db.VarChar(128) createdDate DateTime @default(now()) @db.DateTime(0) - transferStateChange transferStateChange @relation(fields: [transferStateChangeId], references: [transferStateChangeId], onUpdate: Restrict, map: "transfererror_transferstatechangeid_foreign") + transferStateChange transferStateChange @relation(fields: [transferStateChangeId], references: [transferStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "transfererror_transferstatechangeid_foreign") @@index([transferStateChangeId], map: "transfererror_transferstatechangeid_foreign") } @@ -956,7 +975,7 @@ model transferErrorDuplicateCheck { transferId String @id @db.VarChar(36) hash String? @db.VarChar(256) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transfererrorduplicatecheck_transferid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transfererrorduplicatecheck_transferid_foreign") } model transferExtension { @@ -967,7 +986,7 @@ model transferExtension { isFulfilment Boolean @default(false) isError Boolean @default(false) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transferextension_transferid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transferextension_transferid_foreign") @@index([transferId], map: "transferextension_transferid_foreign") } @@ -979,8 +998,8 @@ model transferFulfilment { isValid Boolean? settlementWindowId BigInt? @db.UnsignedBigInt createdDate DateTime @default(now()) @db.DateTime(0) - settlementWindow settlementWindow? @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: Restrict, onUpdate: Restrict, map: "transferfulfilment_settlementwindowid_foreign") - transferFulfilmentDuplicateCheck transferFulfilmentDuplicateCheck @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transferfulfilment_transferid_foreign") + settlementWindow settlementWindow? @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "transferfulfilment_settlementwindowid_foreign") + transferFulfilmentDuplicateCheck transferFulfilmentDuplicateCheck @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transferfulfilment_transferid_foreign") @@index([settlementWindowId], map: "transferfulfilment_settlementwindowid_foreign") } @@ -989,28 +1008,30 @@ model transferFulfilmentDuplicateCheck { transferId String @id @db.VarChar(36) hash String? @db.VarChar(256) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transferfulfilmentduplicatecheck_transferid_foreign") transferFulfilment transferFulfilment? + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transferfulfilmentduplicatecheck_transferid_foreign") } model transferParticipant { transferParticipantId BigInt @id @default(autoincrement()) @db.UnsignedBigInt transferId String @db.VarChar(36) - participantCurrencyId Int @db.UnsignedInt + participantCurrencyId Int? @db.UnsignedInt transferParticipantRoleTypeId Int @db.UnsignedInt ledgerEntryTypeId Int @db.UnsignedInt amount Decimal @db.Decimal(18, 4) createdDate DateTime @default(now()) @db.DateTime(0) - ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onUpdate: Restrict, map: "transferparticipant_ledgerentrytypeid_foreign") - participantCurrency participantCurrency @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onUpdate: Restrict, map: "transferparticipant_participantcurrencyid_foreign") - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transferparticipant_transferid_foreign") - transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onUpdate: Restrict, map: "transferparticipant_transferparticipantroletypeid_foreign") + participantId Int @db.UnsignedInt + ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onDelete: NoAction, onUpdate: NoAction, map: "transferparticipant_ledgerentrytypeid_foreign") + participantCurrency participantCurrency? @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "transferparticipant_participantcurrencyid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transferparticipant_transferid_foreign") + transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onDelete: NoAction, onUpdate: NoAction, map: "transferparticipant_transferparticipantroletypeid_foreign") @@index([transferId, transferParticipantRoleTypeId, ledgerEntryTypeId], map: "getTransferInfoToChangePosition") @@index([ledgerEntryTypeId], map: "transferparticipant_ledgerentrytypeid_index") @@index([participantCurrencyId], map: "transferparticipant_participantcurrencyid_index") @@index([transferId], map: "transferparticipant_transferid_index") @@index([transferParticipantRoleTypeId], map: "transferparticipant_transferparticipantroletypeid_index") + @@index([participantId], map: "transferparticipant_participantid_index") } model transferParticipantRoleType { @@ -1019,6 +1040,7 @@ model transferParticipantRoleType { description String? @db.VarChar(512) isActive Boolean @default(true) createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferParticipant fxTransferParticipant[] quoteParty quoteParty[] settlementContentAggregation settlementContentAggregation[] settlementTransferParticipant settlementTransferParticipant[] @@ -1035,12 +1057,13 @@ model transferRules { } model transferState { - transferStateId String @id @db.VarChar(50) - enumeration String @db.VarChar(50) - description String? @db.VarChar(512) - isActive Boolean @default(true) - createdDate DateTime @default(now()) @db.DateTime(0) - transferStateChange transferStateChange[] + transferStateId String @id @db.VarChar(50) + enumeration String @db.VarChar(50) + description String? @db.VarChar(512) + isActive Boolean @default(true) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferStateChange fxTransferStateChange[] + transferStateChange transferStateChange[] } model transferStateChange { @@ -1049,10 +1072,10 @@ model transferStateChange { transferStateId String @db.VarChar(50) reason String? @db.VarChar(512) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transferstatechange_transferid_foreign") - transferState transferState @relation(fields: [transferStateId], references: [transferStateId], onUpdate: Restrict, map: "transferstatechange_transferstateid_foreign") participantPositionChange participantPositionChange[] transferError transferError[] + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transferstatechange_transferid_foreign") + transferState transferState @relation(fields: [transferStateId], references: [transferStateId], onDelete: NoAction, onUpdate: NoAction, map: "transferstatechange_transferstateid_foreign") @@index([transferId], map: "transferstatechange_transferid_index") @@index([transferStateId], map: "transferstatechange_transferstateid_index") @@ -1063,5 +1086,319 @@ model transferTimeout { transferId String @unique(map: "transfertimeout_transferid_unique") @db.VarChar(36) expirationDate DateTime @db.DateTime(0) createdDate DateTime @default(now()) @db.DateTime(0) - transfer transfer @relation(fields: [transferId], references: [transferId], onUpdate: Restrict, map: "transfertimeout_transferid_foreign") + transfer transfer @relation(fields: [transferId], references: [transferId], onDelete: NoAction, onUpdate: NoAction, map: "transfertimeout_transferid_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxCharge { + fxChargeId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + chargeType String @db.VarChar(32) + conversionId String @db.VarChar(36) + sourceAmount Decimal? @db.Decimal(18, 4) + sourceCurrency String? @db.VarChar(3) + targetAmount Decimal? @db.Decimal(18, 4) + targetCurrency String? @db.VarChar(3) + fxQuoteResponseConversionTerms fxQuoteResponseConversionTerms @relation(fields: [conversionId], references: [conversionId], onDelete: NoAction, onUpdate: NoAction, map: "fxcharge_conversionid_foreign") + + @@index([conversionId], map: "fxcharge_conversionid_foreign") +} + +model fxParticipantCurrencyType { + fxParticipantCurrencyTypeId Int @id @default(autoincrement()) @db.UnsignedInt + name String @unique(map: "fxparticipantcurrencytype_name_unique") @db.VarChar(50) + description String? @db.VarChar(512) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferParticipant fxTransferParticipant[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuote { + conversionRequestId String @id @db.VarChar(36) + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuoteConversionTerms fxQuoteConversionTerms[] + fxQuoteError fxQuoteError[] + fxQuoteResponse fxQuoteResponse[] + fxQuoteResponseConversionTerms fxQuoteResponseConversionTerms[] + fxQuoteResponseDuplicateCheck fxQuoteResponseDuplicateCheck[] +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteConversionTerms { + conversionId String @id @db.VarChar(255) + determiningTransferId String? @db.VarChar(36) + conversionRequestId String @db.VarChar(36) + amountTypeId Int @db.UnsignedInt + initiatingFsp String? @db.VarChar(255) + counterPartyFsp String? @db.VarChar(255) + sourceAmount Decimal @db.Decimal(18, 4) + sourceCurrency String @db.VarChar(3) + targetAmount Decimal? @db.Decimal(18, 4) + targetCurrency String @db.VarChar(3) + expirationDate DateTime @db.DateTime(0) + createdDate DateTime @default(now()) @db.DateTime(0) + amountType amountType @relation(fields: [amountTypeId], references: [amountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteconversionterms_amounttypeid_foreign") + fxQuote fxQuote @relation(fields: [conversionRequestId], references: [conversionRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteconversionterms_conversionrequestid_foreign") + currency_fxQuoteConversionTerms_sourceCurrencyTocurrency currency @relation("fxQuoteConversionTerms_sourceCurrencyTocurrency", fields: [sourceCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteconversionterms_sourcecurrency_foreign") + currency_fxQuoteConversionTerms_targetCurrencyTocurrency currency @relation("fxQuoteConversionTerms_targetCurrencyTocurrency", fields: [targetCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteconversionterms_targetcurrency_foreign") + fxQuoteConversionTermsExtension fxQuoteConversionTermsExtension[] + + @@index([amountTypeId], map: "fxquoteconversionterms_amounttypeid_foreign") + @@index([conversionRequestId], map: "fxquoteconversionterms_conversionrequestid_foreign") + @@index([sourceCurrency], map: "fxquoteconversionterms_sourcecurrency_foreign") + @@index([targetCurrency], map: "fxquoteconversionterms_targetcurrency_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteConversionTermsExtension { + fxQuoteConversionTermExtension BigInt @id @default(autoincrement()) @db.UnsignedBigInt + conversionId String @db.VarChar(36) + key String @db.VarChar(128) + value String @db.Text + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuoteConversionTerms fxQuoteConversionTerms @relation(fields: [conversionId], references: [conversionId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteconversiontermsextension_conversionid_foreign") + + @@index([conversionId], map: "fxquoteconversiontermsextension_conversionid_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteDuplicateCheck { + conversionRequestId String @id @db.VarChar(36) + hash String? @db.VarChar(1024) + createdDate DateTime @default(now()) @db.DateTime(0) +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteError { + fxQuoteErrorId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + conversionRequestId String @db.VarChar(36) + fxQuoteResponseId BigInt? @db.UnsignedBigInt + errorCode Int @db.UnsignedInt + errorDescription String @db.VarChar(128) + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuote fxQuote @relation(fields: [conversionRequestId], references: [conversionRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteerror_conversionrequestid_foreign") + fxQuoteResponse fxQuoteResponse? @relation(fields: [fxQuoteResponseId], references: [fxQuoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteerror_fxquoteresponseid_foreign") + + @@index([conversionRequestId], map: "fxquoteerror_conversionrequestid_foreign") + @@index([fxQuoteResponseId], map: "fxquoteerror_fxquoteresponseid_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteResponse { + fxQuoteResponseId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + conversionRequestId String @db.VarChar(36) + ilpCondition String @db.VarChar(256) + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuoteError fxQuoteError[] + fxQuote fxQuote @relation(fields: [conversionRequestId], references: [conversionRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponse_conversionrequestid_foreign") + fxQuoteResponseConversionTerms fxQuoteResponseConversionTerms[] + fxQuoteResponseDuplicateCheck fxQuoteResponseDuplicateCheck? + + @@index([conversionRequestId], map: "fxquoteresponse_conversionrequestid_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteResponseConversionTerms { + conversionId String @id @db.VarChar(255) + determiningTransferId String? @db.VarChar(36) + conversionRequestId String @db.VarChar(36) + fxQuoteResponseId BigInt @db.UnsignedBigInt + amountTypeId Int @db.UnsignedInt + initiatingFsp String? @db.VarChar(255) + counterPartyFsp String? @db.VarChar(255) + sourceAmount Decimal @db.Decimal(18, 4) + sourceCurrency String @db.VarChar(3) + targetAmount Decimal @db.Decimal(18, 4) + targetCurrency String @db.VarChar(3) + expirationDate DateTime @db.DateTime(0) + createdDate DateTime @default(now()) @db.DateTime(0) + fxCharge fxCharge[] + amountType amountType @relation(fields: [amountTypeId], references: [amountTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversionterms_amounttypeid_foreign") + fxQuote fxQuote @relation(fields: [conversionRequestId], references: [conversionRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversionterms_conversionrequestid_foreign") + fxQuoteResponse fxQuoteResponse @relation(fields: [fxQuoteResponseId], references: [fxQuoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversionterms_fxquoteresponseid_foreign") + currency_fxQuoteResponseConversionTerms_sourceCurrencyTocurrency currency @relation("fxQuoteResponseConversionTerms_sourceCurrencyTocurrency", fields: [sourceCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversionterms_sourcecurrency_foreign") + currency_fxQuoteResponseConversionTerms_targetCurrencyTocurrency currency @relation("fxQuoteResponseConversionTerms_targetCurrencyTocurrency", fields: [targetCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversionterms_targetcurrency_foreign") + fxQuoteResponseConversionTermsExtension fxQuoteResponseConversionTermsExtension[] + + @@index([amountTypeId], map: "fxquoteresponseconversionterms_amounttypeid_foreign") + @@index([conversionRequestId], map: "fxquoteresponseconversionterms_conversionrequestid_foreign") + @@index([fxQuoteResponseId], map: "fxquoteresponseconversionterms_fxquoteresponseid_foreign") + @@index([sourceCurrency], map: "fxquoteresponseconversionterms_sourcecurrency_foreign") + @@index([targetCurrency], map: "fxquoteresponseconversionterms_targetcurrency_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteResponseConversionTermsExtension { + fxQuoteResponseConversionTermsExtension BigInt @id @default(autoincrement()) @db.UnsignedBigInt + conversionId String @db.VarChar(36) + key String @db.VarChar(128) + value String @db.Text + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuoteResponseConversionTerms fxQuoteResponseConversionTerms @relation(fields: [conversionId], references: [conversionId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseconversiontermsextension_conversionid_foreign") + + @@index([conversionId], map: "fxquoteresponseconversiontermsextension_conversionid_foreign") +} + +/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments +model fxQuoteResponseDuplicateCheck { + fxQuoteResponseId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + conversionRequestId String @db.VarChar(36) + hash String? @db.VarChar(255) + createdDate DateTime @default(now()) @db.DateTime(0) + fxQuote fxQuote @relation(fields: [conversionRequestId], references: [conversionRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseduplicatecheck_conversionrequestid_foreign") + fxQuoteResponse fxQuoteResponse @relation(fields: [fxQuoteResponseId], references: [fxQuoteResponseId], onDelete: NoAction, onUpdate: NoAction, map: "fxquoteresponseduplicatecheck_fxquoteresponseid_foreign") + + @@index([conversionRequestId], map: "fxquoteresponseduplicatecheck_conversionrequestid_foreign") +} + +model fxTransfer { + commitRequestId String @id @db.VarChar(36) + determiningTransferId String? @db.VarChar(36) + sourceAmount Decimal @db.Decimal(18, 4) + targetAmount Decimal @db.Decimal(18, 4) + sourceCurrency String @db.VarChar(3) + targetCurrency String @db.VarChar(3) + ilpCondition String @db.VarChar(256) + expirationDate DateTime @db.DateTime(0) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferDuplicateCheck fxTransferDuplicateCheck @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransfer_commitrequestid_foreign") + currency_fxTransfer_sourceCurrencyTocurrency currency @relation("fxTransfer_sourceCurrencyTocurrency", fields: [sourceCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransfer_sourcecurrency_foreign") + currency_fxTransfer_targetCurrencyTocurrency currency @relation("fxTransfer_targetCurrencyTocurrency", fields: [targetCurrency], references: [currencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransfer_targetcurrency_foreign") + fxTransferFulfilment fxTransferFulfilment? + fxTransferFulfilmentDuplicateCheck fxTransferFulfilmentDuplicateCheck? + fxTransferParticipant fxTransferParticipant[] + fxTransferStateChange fxTransferStateChange[] + fxTransferTimeout fxTransferTimeout? + fxWatchList fxWatchList[] + + @@index([sourceCurrency], map: "fxtransfer_sourcecurrency_index") + @@index([targetCurrency], map: "fxtransfer_targetcurrency_index") +} + +model fxTransferDuplicateCheck { + commitRequestId String @id @db.VarChar(36) + hash String @db.VarChar(256) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransfer fxTransfer? +} + +model fxTransferError { + commitRequestId String @id @db.VarChar(36) + fxTransferStateChangeId BigInt @db.UnsignedBigInt + errorCode Int @db.UnsignedInt + errorDescription String @db.VarChar(128) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferStateChange fxTransferStateChange @relation(fields: [fxTransferStateChangeId], references: [fxTransferStateChangeId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransfererror_fxtransferstatechangeid_foreign") + + @@index([fxTransferStateChangeId], map: "fxtransfererror_fxtransferstatechangeid_index") +} + +model fxTransferErrorDuplicateCheck { + commitRequestId String @id @db.VarChar(36) + hash String @db.VarChar(256) + createdDate DateTime @default(now()) @db.DateTime(0) +} + +model fxTransferFulfilment { + commitRequestId String @id @db.VarChar(36) + ilpFulfilment String? @db.VarChar(256) + completedDate DateTime @db.DateTime(0) + isValid Boolean? + settlementWindowId BigInt? @db.UnsignedBigInt + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferfulfilment_commitrequestid_foreign") + settlementWindow settlementWindow? @relation(fields: [settlementWindowId], references: [settlementWindowId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferfulfilment_settlementwindowid_foreign") + + @@unique([commitRequestId, ilpFulfilment], map: "fxtransferfulfilment_commitrequestid_ilpfulfilment_unique") + @@index([commitRequestId], map: "fxtransferfulfilment_commitrequestid_index") + @@index([settlementWindowId], map: "fxtransferfulfilment_settlementwindowid_index") +} + +model fxTransferFulfilmentDuplicateCheck { + commitRequestId String @id @db.VarChar(36) + hash String? @db.VarChar(256) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferfulfilmentduplicatecheck_commitrequestid_foreign") + + @@index([commitRequestId], map: "fxtransferfulfilmentduplicatecheck_commitrequestid_index") +} + +model fxTransferParticipant { + fxTransferParticipantId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + commitRequestId String @db.VarChar(36) + participantCurrencyId Int? @db.UnsignedInt + transferParticipantRoleTypeId Int @db.UnsignedInt + ledgerEntryTypeId Int @db.UnsignedInt + fxParticipantCurrencyTypeId Int? @db.UnsignedInt + amount Decimal @db.Decimal(18, 4) + createdDate DateTime @default(now()) @db.DateTime(0) + participantId Int @db.UnsignedInt + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferparticipant_commitrequestid_foreign") + fxParticipantCurrencyType fxParticipantCurrencyType? @relation(fields: [fxParticipantCurrencyTypeId], references: [fxParticipantCurrencyTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferparticipant_fxparticipantcurrencytypeid_foreign") + ledgerEntryType ledgerEntryType @relation(fields: [ledgerEntryTypeId], references: [ledgerEntryTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferparticipant_ledgerentrytypeid_foreign") + participantCurrency participantCurrency? @relation(fields: [participantCurrencyId], references: [participantCurrencyId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferparticipant_participantcurrencyid_foreign") + transferParticipantRoleType transferParticipantRoleType @relation(fields: [transferParticipantRoleTypeId], references: [transferParticipantRoleTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferparticipant_transferparticipantroletypeid_foreign") + + @@index([commitRequestId], map: "fxtransferparticipant_commitrequestid_index") + @@index([fxParticipantCurrencyTypeId], map: "fxtransferparticipant_fxparticipantcurrencytypeid_foreign") + @@index([ledgerEntryTypeId], map: "fxtransferparticipant_ledgerentrytypeid_index") + @@index([participantCurrencyId], map: "fxtransferparticipant_participantcurrencyid_index") + @@index([participantId], map: "fxtransferparticipant_participantid_index") + @@index([transferParticipantRoleTypeId], map: "fxtransferparticipant_transferparticipantroletypeid_index") +} + +model fxTransferStateChange { + fxTransferStateChangeId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + commitRequestId String @db.VarChar(36) + transferStateId String @db.VarChar(50) + reason String? @db.VarChar(512) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransferError fxTransferError[] + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferstatechange_commitrequestid_foreign") + transferState transferState @relation(fields: [transferStateId], references: [transferStateId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransferstatechange_transferstateid_foreign") + participantPositionChange participantPositionChange[] + + @@index([commitRequestId], map: "fxtransferstatechange_commitrequestid_index") + @@index([transferStateId], map: "fxtransferstatechange_transferstateid_index") +} + +model fxTransferTimeout { + fxTransferTimeoutId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + commitRequestId String @unique(map: "fxtransfertimeout_commitrequestid_unique") @db.VarChar(36) + expirationDate DateTime @db.DateTime(0) + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxtransfertimeout_commitrequestid_foreign") +} + +model fxTransferType { + fxTransferTypeId Int @id @default(autoincrement()) @db.UnsignedInt + name String @unique(map: "fxtransfertype_name_unique") @db.VarChar(50) + description String? @db.VarChar(512) + createdDate DateTime @default(now()) @db.DateTime(0) + fxWatchList fxWatchList[] +} + +model fxWatchList { + fxWatchListId BigInt @id @default(autoincrement()) @db.UnsignedBigInt + commitRequestId String @db.VarChar(36) + determiningTransferId String @db.VarChar(36) + fxTransferTypeId Int @db.UnsignedInt + createdDate DateTime @default(now()) @db.DateTime(0) + fxTransfer fxTransfer @relation(fields: [commitRequestId], references: [commitRequestId], onDelete: NoAction, onUpdate: NoAction, map: "fxwatchlist_commitrequestid_foreign") + fxTransferType fxTransferType @relation(fields: [fxTransferTypeId], references: [fxTransferTypeId], onDelete: NoAction, onUpdate: NoAction, map: "fxwatchlist_fxtransfertypeid_foreign") + + @@index([commitRequestId], map: "fxwatchlist_commitrequestid_index") + @@index([determiningTransferId], map: "fxwatchlist_determiningtransferid_index") + @@index([fxTransferTypeId], map: "fxwatchlist_fxtransfertypeid_foreign") +} + +model migration { + id Int @id @default(autoincrement()) @db.UnsignedInt + name String? @db.VarChar(255) + batch Int? + migration_time DateTime? @db.Timestamp(0) +} + +model migration_lock { + index Int @id @default(autoincrement()) @db.UnsignedInt + is_locked Int? } diff --git a/src/schema/DFSP/DFSP.ts b/src/schema/DFSP/DFSP.ts index af1278b..13b9cd1 100644 --- a/src/schema/DFSP/DFSP.ts +++ b/src/schema/DFSP/DFSP.ts @@ -20,14 +20,15 @@ const DFSP = objectType({ t.nonNull.list.nonNull.field('currencies', { type: 'NonEmptyString', resolve: async (_parent, _args, ctx) => { - const currencies = await ctx.centralLedger.participant - .findUnique({ - where: { - participantId: _parent.id, - }, - }) - .participantCurrency(); - return currencies.map((currency) => currency.currencyId); + const currencies = + (await ctx.centralLedger.participant + .findUnique({ + where: { + participantId: _parent.id, + }, + }) + .participantCurrency()) || []; + return currencies.map((currency) => currency.currencyId || ''); }, }); }, diff --git a/src/schema/Transfer/dataloaders/DFSP.ts b/src/schema/Transfer/dataloaders/DFSP.ts index 5919d0d..25c5640 100644 --- a/src/schema/Transfer/dataloaders/DFSP.ts +++ b/src/schema/Transfer/dataloaders/DFSP.ts @@ -39,15 +39,22 @@ const findDfsps = async (ctx: Context, transferIds: string[], type: DFSPType) => }); return Object.fromEntries( transferParticipant.map((t) => { - const p = t.participantCurrency.participant; + const p = t.participantCurrency?.participant; return [ t.transferId, - { - id: p?.participantId, - name: p?.name, - description: p?.description, - active: p?.isActive, - }, + p + ? { + id: p?.participantId, + name: p?.name, + description: p?.description, + active: p?.isActive, + } + : { + id: 0, + name: 'Unknown', + description: 'Unknown', + active: false, + }, ]; }) ); diff --git a/test/unit/schema.test.ts b/test/unit/schema.test.ts index 390ff1c..3f3dadb 100644 --- a/test/unit/schema.test.ts +++ b/test/unit/schema.test.ts @@ -1,5 +1,10 @@ import 'tsconfig-paths/register'; test('able to create schema', async () => { + try { await import('@app/schema'); + } catch (error) { + console.error(error); + throw new Error('Unable to create schema'); + } }); diff --git a/tsconfig.json b/tsconfig.json index 97ae649..5599611 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,7 +20,7 @@ "outDir": "dist", "lib": ["es2020"], "strict": true, - "noImplicitAny": true, + "noImplicitAny": false, "noImplicitThis": true, "alwaysStrict": true, "strictBindCallApply": true,