diff --git a/package-lock.json b/package-lock.json index 1ad998e28..093724a21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,10 @@ "license": "MIT", "dependencies": { "@apollo/server": "^4.9.3", + "@aws-sdk/client-s3": "^3.438.0", + "@aws-sdk/lib-storage": "^3.438.0", "@elastic/elasticsearch": "7.12.0", - "@golevelup/nestjs-rabbitmq": "3.4.0", + "@golevelup/nestjs-rabbitmq": "4.0.0", "@multiversx/sdk-core": "12.6.1", "@multiversx/sdk-native-auth-server": "1.0.7", "@multiversx/sdk-nestjs-cache": "2.0.0-beta.2", @@ -37,7 +39,6 @@ "agentkeepalive": "4.2.1", "amqp-connection-manager": "3.7.0", "amqplib": "0.8.0", - "aws-sdk": "2.1366.0", "axios": "0.21.4", "axios-retry": "3.1.8", "bignumber.js": "9.0.1", @@ -776,8 +777,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", - "optional": true, - "peer": true, "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -787,16 +786,27 @@ "node_modules/@aws-crypto/crc32/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/crc32c": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz", + "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==", + "dependencies": { + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/crc32c/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/ie11-detection": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz", "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^1.11.1" } @@ -804,16 +814,31 @@ "node_modules/@aws-crypto/ie11-detection/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@aws-crypto/sha1-browser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz", + "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==", + "dependencies": { + "@aws-crypto/ie11-detection": "^3.0.0", + "@aws-crypto/supports-web-crypto": "^3.0.0", + "@aws-crypto/util": "^3.0.0", + "@aws-sdk/types": "^3.222.0", + "@aws-sdk/util-locate-window": "^3.0.0", + "@aws-sdk/util-utf8-browser": "^3.0.0", + "tslib": "^1.11.1" + } + }, + "node_modules/@aws-crypto/sha1-browser/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/sha256-browser": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz", "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==", - "optional": true, - "peer": true, "dependencies": { "@aws-crypto/ie11-detection": "^3.0.0", "@aws-crypto/sha256-js": "^3.0.0", @@ -828,16 +853,12 @@ "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/sha256-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz", "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==", - "optional": true, - "peer": true, "dependencies": { "@aws-crypto/util": "^3.0.0", "@aws-sdk/types": "^3.222.0", @@ -847,16 +868,12 @@ "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/supports-web-crypto": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz", "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^1.11.1" } @@ -864,16 +881,12 @@ "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-crypto/util": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", - "optional": true, - "peer": true, "dependencies": { "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-utf8-browser": "^3.0.0", @@ -883,9 +896,7 @@ "node_modules/@aws-crypto/util/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "optional": true, - "peer": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@aws-sdk/client-cognito-identity": { "version": "3.387.0", @@ -935,6 +946,474 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/client-s3": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.438.0.tgz", + "integrity": "sha512-5VxdfyZ9oovbK5qzIYW4ZeJ1waD6VqfclSDQLHmgulekM2JYo/goEQJSjWnI4VMWuMsopzvqyeA+L9xq9uXLBQ==", + "dependencies": { + "@aws-crypto/sha1-browser": "3.0.0", + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/client-sts": "3.438.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-bucket-endpoint": "3.433.0", + "@aws-sdk/middleware-expect-continue": "3.433.0", + "@aws-sdk/middleware-flexible-checksums": "3.433.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-location-constraint": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-s3": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-ssec": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/signature-v4-multi-region": "3.437.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@aws-sdk/xml-builder": "3.310.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/eventstream-serde-browser": "^2.0.12", + "@smithy/eventstream-serde-config-resolver": "^2.0.12", + "@smithy/eventstream-serde-node": "^2.0.12", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-blob-browser": "^2.0.12", + "@smithy/hash-node": "^2.0.12", + "@smithy/hash-stream-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/md5-js": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-stream": "^2.0.17", + "@smithy/util-utf8": "^2.0.0", + "@smithy/util-waiter": "^2.0.12", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.438.0.tgz", + "integrity": "sha512-L/xKq+K78PShLku8x5gM6lZDUp7LhFJ2ksKH7Vll+exSZq+QUaxuzjp4gqdzh6B0oIshv2jssQlUa0ScOmVRMg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sts": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.438.0.tgz", + "integrity": "sha512-UBxLZKVVvbR4LHwSNSqaKx22YBSOGkavrh4SyDP8o8XOlXeRxTCllfSfjL9K5Mktp+ZwQ2NiubNcwmvUcGKbbg==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/core": "3.436.0", + "@aws-sdk/credential-provider-node": "3.438.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-sdk-sts": "3.433.0", + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.433.0.tgz", + "integrity": "sha512-Vl7Qz5qYyxBurMn6hfSiNJeUHSqfVUlMt0C1Bds3tCkl3IzecRWwyBOlxtxO3VCrgVeW3HqswLzCvhAFzPH6nQ==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.438.0.tgz", + "integrity": "sha512-WYPQR3pXoHJjn9/RMWipUhsUNFy6zhOiII6u8LJ5w84aNqIjV4+BdRYztRNGJD98jdtekhbkX0YKoSuZqP+unQ==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.438.0.tgz", + "integrity": "sha512-uaw3D2R0svyrC32qyZ2aOv/l0AT9eClh+eQsZJTQD3Kz9q+2VdeOBThQ8fsMfRtm26nUbZo6A/CRwxkm6okI+w==", + "dependencies": { + "@aws-sdk/credential-provider-env": "3.433.0", + "@aws-sdk/credential-provider-ini": "3.438.0", + "@aws-sdk/credential-provider-process": "3.433.0", + "@aws-sdk/credential-provider-sso": "3.438.0", + "@aws-sdk/credential-provider-web-identity": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/credential-provider-imds": "^2.0.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.433.0.tgz", + "integrity": "sha512-W7FcGlQjio9Y/PepcZGRyl5Bpwb0uWU7qIUCh+u4+q2mW4D5ZngXg8V/opL9/I/p4tUH9VXZLyLGwyBSkdhL+A==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.438.0.tgz", + "integrity": "sha512-Xykli/64xR18cBV5P0XFxcH120omtfAjC/cFy/9nFU/+dPvbk0uu1yEOZYteWHyGGkPN4PkHmbh60GiUCLQkWQ==", + "dependencies": { + "@aws-sdk/client-sso": "3.438.0", + "@aws-sdk/token-providers": "3.438.0", + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.433.0.tgz", + "integrity": "sha512-RlwjP1I5wO+aPpwyCp23Mk8nmRbRL33hqRASy73c4JA2z2YiRua+ryt6MalIxehhwQU6xvXUKulJnPG9VaMFZg==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.433.0.tgz", + "integrity": "sha512-mBTq3UWv1UzeHG+OfUQ2MB/5GEkt5LTKFaUqzL7ESwzW8XtpBgXnjZvIwu3Vcd3sEetMwijwaGiJhY0ae/YyaA==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.433.0.tgz", + "integrity": "sha512-We346Fb5xGonTGVZC9Nvqtnqy74VJzYuTLLiuuftA5sbNzftBDy/22QCfvYSTOAl3bvif+dkDUzQY2ihc5PwOQ==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.433.0.tgz", + "integrity": "sha512-HEvYC9PQlWY/ccUYtLvAlwwf1iCif2TSAmLNr3YTBRVa98x6jKL0hlCrHWYklFeqOGSKy6XhE+NGJMUII0/HaQ==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-sdk-sts": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.433.0.tgz", + "integrity": "sha512-ORYbJnBejUyonFl5FwIqhvI3Cq6sAp9j+JpkKZtFNma9tFPdrhmYgfCeNH32H/wGTQV/tUoQ3luh0gA4cuk6DA==", + "dependencies": { + "@aws-sdk/middleware-signing": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-signing": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.433.0.tgz", + "integrity": "sha512-jxPvt59NZo/epMNLNTu47ikmP8v0q217I6bQFGJG7JVFnfl36zDktMwGw+0xZR80qiK47/2BWrNpta61Zd2FxQ==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.438.0.tgz", + "integrity": "sha512-a+xHT1wOxT6EA6YyLmrfaroKWOkwwyiktUfXKM0FsUutGzNi4fKhb5NZ2al58NsXzHgHFrasSDp+Lqbd/X2cEw==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.438.0.tgz", + "integrity": "sha512-G2fUfTtU6/1ayYRMu0Pd9Ln4qYSvwJOWCqJMdkDgvXSwdgcOSOLsnAIk1AHGJDAvgLikdCzuyOsdJiexr9Vnww==", + "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "3.433.0", + "@aws-sdk/middleware-logger": "3.433.0", + "@aws-sdk/middleware-recursion-detection": "3.433.0", + "@aws-sdk/middleware-user-agent": "3.438.0", + "@aws-sdk/region-config-resolver": "3.433.0", + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-endpoints": "3.438.0", + "@aws-sdk/util-user-agent-browser": "3.433.0", + "@aws-sdk/util-user-agent-node": "3.437.0", + "@smithy/config-resolver": "^2.0.16", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/hash-node": "^2.0.12", + "@smithy/invalid-dependency": "^2.0.12", + "@smithy/middleware-content-length": "^2.0.14", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/middleware-retry": "^2.0.18", + "@smithy/middleware-serde": "^2.0.12", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/property-provider": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/shared-ini-file-loader": "^2.0.6", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.1.0", + "@smithy/util-defaults-mode-browser": "^2.0.16", + "@smithy/util-defaults-mode-node": "^2.0.21", + "@smithy/util-endpoints": "^1.0.2", + "@smithy/util-retry": "^2.0.5", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-endpoints": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.438.0.tgz", + "integrity": "sha512-6VyPTq1kN3GWxwFt5DdZfOsr6cJZPLjWh0troY/0uUv3hK74C9o3Y0Xf/z8UAUvQFkVqZse12O0/BgPVMImvfA==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/util-endpoints": "^1.0.2", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.433.0.tgz", + "integrity": "sha512-2Cf/Lwvxbt5RXvWFXrFr49vXv0IddiUwrZoAiwhDYxvsh+BMnh+NUFot+ZQaTrk/8IPZVDeLPWZRdVy00iaVXQ==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "bowser": "^2.11.0", + "tslib": "^2.5.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.437.0.tgz", + "integrity": "sha512-JVEcvWaniamtYVPem4UthtCNoTBCfFTwYj7Y3CrWZ2Qic4TqrwLkAfaBGtI2TGrhIClVr77uzLI6exqMTN7orA==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/client-sso": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.387.0.tgz", @@ -1029,6 +1508,17 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/core": { + "version": "3.436.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.436.0.tgz", + "integrity": "sha512-vX5/LjXvCejC2XUY6TSg1oozjqK6BvkE75t0ys9dgqyr5PlZyZksMoeAFHUlj0sCjhT3ziWCujP1oiSpPWY9hg==", + "dependencies": { + "@smithy/smithy-client": "^2.1.12" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.387.0.tgz", @@ -1186,6 +1676,164 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/lib-storage": { + "version": "3.438.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.438.0.tgz", + "integrity": "sha512-IMoYL22S2Xt9dmhk1vlWCcdPORnoE7STxT6iXj06T/6qAiJiDWsd7P9z8CZmP1GRIE/m2whHNxWrtFID0hmznw==", + "dependencies": { + "@smithy/abort-controller": "^2.0.1", + "@smithy/middleware-endpoint": "^2.1.3", + "@smithy/smithy-client": "^2.1.12", + "buffer": "5.6.0", + "events": "3.3.0", + "stream-browserify": "3.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "@aws-sdk/client-s3": "^3.0.0" + } + }, + "node_modules/@aws-sdk/lib-storage/node_modules/buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "node_modules/@aws-sdk/lib-storage/node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.433.0.tgz", + "integrity": "sha512-Lk1xIu2tWTRa1zDw5hCF1RrpWQYSodUhrS/q3oKz8IAoFqEy+lNaD5jx+fycuZb5EkE4IzWysT+8wVkd0mAnOg==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-bucket-endpoint/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.433.0.tgz", + "integrity": "sha512-Uq2rPIsjz0CR2sulM/HyYr5WiqiefrSRLdwUZuA7opxFSfE808w5DBWSprHxbH3rbDSQR4nFiOiVYIH8Eth7nA==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-expect-continue/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.433.0.tgz", + "integrity": "sha512-Ptssx373+I7EzFUWjp/i/YiNFt6I6sDuRHz6DOUR9nmmRTlHHqmdcBXlJL2d9wwFxoBRCN8/PXGsTc/DJ4c95Q==", + "dependencies": { + "@aws-crypto/crc32": "3.0.0", + "@aws-crypto/crc32c": "3.0.0", + "@aws-sdk/types": "3.433.0", + "@smithy/is-array-buffer": "^2.0.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/middleware-host-header": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.387.0.tgz", @@ -1202,6 +1850,31 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/middleware-location-constraint": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.433.0.tgz", + "integrity": "sha512-2YD860TGntwZifIUbxm+lFnNJJhByR/RB/+fV1I8oGKg+XX2rZU+94pRfHXRywoZKlCA0L+LGDA1I56jxrB9sw==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-location-constraint/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/middleware-logger": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.387.0.tgz", @@ -1233,6 +1906,46 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/middleware-sdk-s3": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.433.0.tgz", + "integrity": "sha512-mkn3DiSuMVh4NTLsduC42Av+ApcOor52LMoQY0Wc6M5Mx7Xd05U+G1j8sjI9n/1bs5cZ/PoeRYJ/9bL1Xxznnw==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@aws-sdk/util-arn-parser": "3.310.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/middleware-sdk-sts": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-sts/-/middleware-sdk-sts-3.387.0.tgz", @@ -1268,6 +1981,31 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/middleware-ssec": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.433.0.tgz", + "integrity": "sha512-2AMaPx0kYfCiekxoL7aqFqSSoA9du+yI4zefpQNLr+1cZOerYiDxdsZ4mbqStR1CVFaX6U6hrYokXzjInsvETw==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/middleware-ssec/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/middleware-user-agent": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.387.0.tgz", @@ -1285,6 +2023,60 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.433.0.tgz", + "integrity": "sha512-xpjRjCZW+CDFdcMmmhIYg81ST5UAnJh61IHziQEk0FXONrg4kjyYPZAOjEdzXQ+HxJQuGQLKPhRdzxmQnbX7pg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "@smithy/util-config-provider": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region": { + "version": "3.437.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.437.0.tgz", + "integrity": "sha512-MmrqudssOs87JgVg7HGVdvJws/t4kcOrJJd+975ki+DPeSoyK2U4zBDfDkJ+n0tFuZBs3sLwLh0QXE7BV28rRA==", + "dependencies": { + "@aws-sdk/types": "3.433.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/signature-v4": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region/node_modules/@aws-sdk/types": { + "version": "3.433.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.433.0.tgz", + "integrity": "sha512-0jEE2mSrNDd8VGFjTc1otYrwYPIkzZJEIK90ZxisKvQ/EURGBhNzWn7ejWB9XCMFT6XumYLBR0V9qq5UPisWtA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@aws-sdk/signature-v4-multi-region/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/token-providers": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.387.0.tgz", @@ -1306,8 +2098,6 @@ "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.387.0.tgz", "integrity": "sha512-YTjFabNwjTF+6yl88f0/tWff018qmmgMmjlw45s6sdVKueWxdxV68U7gepNLF2nhaQPZa6FDOBoA51NaviVs0Q==", - "optional": true, - "peer": true, "dependencies": { "@smithy/types": "^2.1.0", "tslib": "^2.5.0" @@ -1316,6 +2106,17 @@ "node": ">=14.0.0" } }, + "node_modules/@aws-sdk/util-arn-parser": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.310.0.tgz", + "integrity": "sha512-jL8509owp/xB9+Or0pvn3Fe+b94qfklc2yPowZZIFAkFcCSIdkIglz18cPDWnYAcy9JGewpMS1COXKIUhZkJsA==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@aws-sdk/util-endpoints": { "version": "3.387.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.387.0.tgz", @@ -1334,8 +2135,6 @@ "version": "3.310.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.310.0.tgz", "integrity": "sha512-qo2t/vBTnoXpjKxlsC2e1gBrRm80M3bId27r0BRB2VniSSe7bL1mmzM+/HFtujm0iAxtPM+aLEflLJlJeDPg0w==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" }, @@ -1380,26 +2179,107 @@ } } }, - "node_modules/@aws-sdk/util-utf8-browser": { - "version": "3.259.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", - "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", - "optional": true, - "peer": true, + "node_modules/@aws-sdk/util-utf8-browser": { + "version": "3.259.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", + "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "dependencies": { + "tslib": "^2.3.1" + } + }, + "node_modules/@aws-sdk/xml-builder": { + "version": "3.310.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.310.0.tgz", + "integrity": "sha512-TqELu4mOuSIKQCqj63fGVs86Yh+vBx5nHRpWKNUNhB2nPTpfbziTs5c1X358be3peVWA4wPxW7Nt53KIg1tnNw==", + "dependencies": { + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, "dependencies": { - "tslib": "^2.3.1" + "color-name": "1.1.3" } }, - "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "has-flag": "^3.0.0" }, "engines": { - "node": ">=6.9.0" + "node": ">=4" } }, "node_modules/@babel/compat-data": { @@ -1457,13 +2337,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.20.14", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.14.tgz", - "integrity": "sha512-AEmuXHdcD3A52HHXxaTmYlb8q/xMEhoRP67B3T4Oq7lbmSoqroMZzjnGj3+i1io3pdnF8iBYVu4Ilj+c4hBxYg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", + "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7", + "@babel/types": "^7.23.0", "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "engines": { @@ -1528,34 +2409,34 @@ "dev": true }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", - "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", "dev": true, "dependencies": { - "@babel/template": "^7.18.10", - "@babel/types": "^7.19.0" + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -1614,30 +2495,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -1667,13 +2548,13 @@ } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { @@ -1752,9 +2633,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.20.15", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz", - "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", + "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1952,33 +2833,33 @@ } }, "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.20.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.13.tgz", - "integrity": "sha512-kMJXfF0T6DIS9E8cgdLCSAL+cuCK+YEZHWiLK0SXpTo8YRj5lpJu3CDNKiIBCne4m9hhTIqUg6SYTAI39tAiVQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.20.13", - "@babel/types": "^7.20.7", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", + "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.0", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.0", + "@babel/types": "^7.23.0", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1996,13 +2877,13 @@ } }, "node_modules/@babel/types": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz", - "integrity": "sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==", + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", + "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2133,84 +3014,60 @@ "dev": true }, "node_modules/@golevelup/nestjs-common": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@golevelup/nestjs-common/-/nestjs-common-1.4.4.tgz", - "integrity": "sha512-NTjtOhHTMuGwiR3lmBQKKaRr++mHQEsh8AxtaH+/EWOYKMK2Cv/8duaH9MQ0hI3TwnouyaA5IRxYR1ZCUyNXOQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@golevelup/nestjs-common/-/nestjs-common-2.0.0.tgz", + "integrity": "sha512-D9RLXgkqn9SDLnZ2VoMER9l/+g5CM9Z7sZXa+10+0rZs6yevMepoiWmMVsFoUXLzYG2GwfixHLExwUr3XBCHFw==", "dependencies": { - "nanoid": "^3.2.0" + "lodash": "^4.17.21", + "nanoid": "^3.3.6" + }, + "peerDependencies": { + "@nestjs/common": "^10.x" } }, "node_modules/@golevelup/nestjs-discovery": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@golevelup/nestjs-discovery/-/nestjs-discovery-3.0.0.tgz", - "integrity": "sha512-ZvkXtobTKxXB1LJanP/l6Z/Fing88IMBr3uabQpU2IWjfsstjh02qYDSU2cfD6CSmNldX5ewW5Pd+SdK2lU8Sw==", - "dependencies": { - "lodash": "^4.17.15" - } - }, - "node_modules/@golevelup/nestjs-rabbitmq": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/@golevelup/nestjs-rabbitmq/-/nestjs-rabbitmq-3.4.0.tgz", - "integrity": "sha512-Ca6JtboZL11qTWl8mFYT3phs+JAhZDhct6/gKbcNEhaaEd3IU6+hEBnjs7LDbYSAIdlpZNODy/rRGSPCFmUYsQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@golevelup/nestjs-discovery/-/nestjs-discovery-4.0.0.tgz", + "integrity": "sha512-iyZLYip9rhVMR0C93vo860xmboRrD5g5F5iEOfpeblGvYSz8ymQrL9RAST7x/Fp3n+TAXSeOLzDIASt+rak68g==", "dependencies": { - "@golevelup/nestjs-common": "^1.4.4", - "@golevelup/nestjs-discovery": "^3.0.0", - "@golevelup/nestjs-modules": "^0.6.1", - "amqp-connection-manager": "^3.0.0", - "amqplib": "^0.8.0" + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@nestjs/common": "^10.x", + "@nestjs/core": "^10.x" } }, - "node_modules/@golevelup/nestjs-rabbitmq/node_modules/@golevelup/nestjs-modules": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@golevelup/nestjs-modules/-/nestjs-modules-0.6.1.tgz", - "integrity": "sha512-E0STg8In8fhIivnGDJAA70+XLPHzK5bMTkCnif9FbZ8waTYDQ3T/QQL0h73k+CUFeznn1hmuEW14sNaE+8cd7w==", + "node_modules/@golevelup/nestjs-modules": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@golevelup/nestjs-modules/-/nestjs-modules-0.7.0.tgz", + "integrity": "sha512-4WxGKubYx0IJF2rxL3S4SChKdl4ZDZPwCdSj6HxmmElXRyua/LlcwLH6NYquh4RRIkQGspDd5WpcMTBw3SxR5g==", "dependencies": { "lodash": "^4.17.21" }, "peerDependencies": { - "@nestjs/common": "^9.x", + "@nestjs/common": "^10.x", "rxjs": "^7.x" } }, - "node_modules/@golevelup/nestjs-rabbitmq/node_modules/@nestjs/common": { - "version": "9.4.3", - "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.4.3.tgz", - "integrity": "sha512-Gd6D4IaYj01o14Bwv81ukidn4w3bPHCblMUq+SmUmWLyosK+XQmInCS09SbDDZyL8jy86PngtBLTdhJ2bXSUig==", - "peer": true, + "node_modules/@golevelup/nestjs-rabbitmq": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@golevelup/nestjs-rabbitmq/-/nestjs-rabbitmq-4.0.0.tgz", + "integrity": "sha512-CQHRq/jyK3GlM7Lv4nVaqd+BJ53tZXsrOtO/8/OZh19i0YOcQxyRM7iDdtULeG8omJB5/aGMZNsbioLuupxoog==", "dependencies": { - "iterare": "1.2.1", - "tslib": "2.5.3", - "uid": "2.0.2" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/nest" + "@golevelup/nestjs-common": "^2.0.0", + "@golevelup/nestjs-discovery": "^4.0.0", + "@golevelup/nestjs-modules": "^0.7.0", + "amqp-connection-manager": "^3.0.0", + "amqplib": "^0.8.0", + "lodash": "^4.17.21" }, "peerDependencies": { - "cache-manager": "<=5", - "class-transformer": "*", - "class-validator": "*", - "reflect-metadata": "^0.1.12", - "rxjs": "^7.1.0" - }, - "peerDependenciesMeta": { - "cache-manager": { - "optional": true - }, - "class-transformer": { - "optional": true - }, - "class-validator": { - "optional": true - } + "@nestjs/common": "^10.x", + "@nestjs/core": "^10.x", + "reflect-metadata": "^0.1.0", + "rxjs": "^7.x" } }, - "node_modules/@golevelup/nestjs-rabbitmq/node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==", - "peer": true - }, "node_modules/@graphql-tools/merge": { "version": "8.3.12", "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.12.tgz", @@ -4002,29 +4859,43 @@ } }, "node_modules/@smithy/abort-controller": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.2.tgz", - "integrity": "sha512-ln5Cob0mksym62sLr7NiPOSqJ0jKao4qjfcNLDdgINM1lQI12hXrZBlKdPHbXJqpKhKiECDgonMoqCM8bigq4g==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.12.tgz", + "integrity": "sha512-YIJyefe1mi3GxKdZxEBEuzYOeQ9xpYfqnFmWzojCssRAuR7ycxwpoRQgp965vuW426xUAQhCV5rCaWElQ7XsaA==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, + "node_modules/@smithy/chunked-blob-reader": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz", + "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==", + "dependencies": { + "tslib": "^2.5.0" + } + }, + "node_modules/@smithy/chunked-blob-reader-native": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.0.tgz", + "integrity": "sha512-HM8V2Rp1y8+1343tkZUKZllFhEQPNmpNdgFAncbTsxkZ18/gqjk23XXv3qGyXWp412f3o43ZZ1UZHVcHrpRnCQ==", + "dependencies": { + "@smithy/util-base64": "^2.0.0", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/config-resolver": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.2.tgz", - "integrity": "sha512-0kdsqBL6BdmSbdU6YaDkodVBMua5MuQQluC3nocJ7OJ6PnOuM7i2FEQHE46LBadLqT+CimlDSM+6j91uHNL1ng==", - "optional": true, - "peer": true, + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", + "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", - "@smithy/util-middleware": "^2.0.0", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { @@ -4032,16 +4903,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.2.tgz", - "integrity": "sha512-mbWFYEZ00LBRDk3WvcXViwpdpkJQcfrM3seuKzFxZnF6wIBLMwrcWcsj+OUC/1L+86m8aQY9imXMAaQsAoGxow==", - "optional": true, - "peer": true, - "dependencies": { - "@smithy/node-config-provider": "^2.0.2", - "@smithy/property-provider": "^2.0.2", - "@smithy/types": "^2.1.0", - "@smithy/url-parser": "^2.0.2", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", + "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", "tslib": "^2.5.0" }, "engines": { @@ -4049,40 +4918,108 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.2.tgz", - "integrity": "sha512-PQZiKx7fMnNwx4zxcUCm82VjnqK6wV4MEHSmMy3taj5dKfXV782IjRGyaDT+8TsmNqVdZIkve5zLRAzh+7kOhA==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.12.tgz", + "integrity": "sha512-ZZQLzHBJkbiAAdj2C5K+lBlYp/XJ+eH2uy+jgJgYIFW/o5AM59Hlj7zyI44/ZTDIQWmBxb3EFv/c5t44V8/g8A==", "dependencies": { "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "@smithy/util-hex-encoding": "^2.0.0", "tslib": "^2.5.0" } }, + "node_modules/@smithy/eventstream-serde-browser": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.12.tgz", + "integrity": "sha512-0pi8QlU/pwutNshoeJcbKR1p7Ie5STd8UFAMX5xhSoSJjNlxIv/OsHbF023jscMRN2Prrqd6ToGgdCnsZVQjvg==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-config-resolver": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.12.tgz", + "integrity": "sha512-I0XfwQkIX3gAnbrU5rLMkBSjTM9DHttdbLwf12CXmj7SSI5dT87PxtKLRrZGanaCMbdf2yCep+MW5/4M7IbvQA==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-node": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.12.tgz", + "integrity": "sha512-vf1vMHGOkG3uqN9x1zKOhnvW/XgvhJXWqjV6zZiT2FMjlEayugQ1mzpSqr7uf89+BzjTzuZKERmOsEAmewLbxw==", + "dependencies": { + "@smithy/eventstream-serde-universal": "^2.0.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/eventstream-serde-universal": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.12.tgz", + "integrity": "sha512-xZ3ZNpCxIND+q+UCy7y1n1/5VQEYicgSTNCcPqsKawX+Vd+6OcFX7gUHMyPzL8cZr+GdmJuxNleqHlH4giK2tw==", + "dependencies": { + "@smithy/eventstream-codec": "^2.0.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.0.2.tgz", - "integrity": "sha512-Wo2m1RaiXNSLF4J3D62LpdSoj/YYb+6tn0H8is1tSrzr7eXAdiYVBc0wIa23N0wT4zmN0iG/yNY6gTCDQ6799A==", - "optional": true, - "peer": true, + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.2.4.tgz", + "integrity": "sha512-gIPRFEGi+c6V52eauGKrjDzPWF2Cu7Z1r5F8A3j2wcwz25sPG/t8kjsbEhli/tS/2zJp/ybCZXe4j4ro3yv/HA==", "dependencies": { - "@smithy/protocol-http": "^2.0.2", - "@smithy/querystring-builder": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "tslib": "^2.5.0" } }, + "node_modules/@smithy/fetch-http-handler/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/hash-blob-browser": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.12.tgz", + "integrity": "sha512-riLnV16f27yyePX8UF0deRHAeccUK8SrOxyTykSTrnVkgS3DsjNapZtTbd8OGNKEbI60Ncdb5GwN3rHZudXvog==", + "dependencies": { + "@smithy/chunked-blob-reader": "^2.0.0", + "@smithy/chunked-blob-reader-native": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/hash-node": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.2.tgz", - "integrity": "sha512-JKDzZ1YVR7JzOBaJoWy3ToJCE86OQE6D4kOBvvVsu93a3lcF9kv6KYTKBYEWAjwOn/CpK4NH7mKB01OQ8H+aiA==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.12.tgz", + "integrity": "sha512-fDZnTr5j9t5qcbeJ037aMZXxMka13Znqwrgy3PAqYj6Dm3XHXHftTH3q+NWgayUxl1992GFtQt1RuEzRMy3NnQ==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.5.0" @@ -4091,14 +5028,25 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/hash-stream-node": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.12.tgz", + "integrity": "sha512-x/DrSynPKrW0k00q7aZ/vy531a3mRw79mOajHp+cIF0TrA1SqEMFoy/B8X0XtoAtlJWt/vvgeDNqt/KAeaAqMw==", + "dependencies": { + "@smithy/types": "^2.4.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@smithy/invalid-dependency": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.2.tgz", - "integrity": "sha512-inQZQ5gCO3WRWuXpsc1YJ4KBjsvj2qsoU32yTIKznBWTCQe/D5Dp+sSaysqBqxe0VTZ+8nFEHdUMWUX2BxQThw==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.12.tgz", + "integrity": "sha512-p5Y+iMHV3SoEpy3VSR7mifbreHQwVSvHSAz/m4GdoXfOzKzaYC8hYv10Ks7Deblkf7lhas8U+lAp9ThbBM+ZXA==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -4106,8 +5054,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz", "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" }, @@ -4115,65 +5061,94 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/md5-js": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.12.tgz", + "integrity": "sha512-OgDt+Xnrw+W5z3MSl5KZZzebqmXrYl9UdbCiBYnnjErmNywwSjV6QB/Oic3/7hnsPniSU81n7Rvlhz2kH4EREQ==", + "dependencies": { + "@smithy/types": "^2.4.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0" + } + }, "node_modules/@smithy/middleware-content-length": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.2.tgz", - "integrity": "sha512-FmHlNfuvYgDZE3fIx0G3rD/wLXfAmBYE4mVc/w6d7RllA7TygPzq2pfHL1iCMzWkWTdoAVnt3h4aavAZnhaxEQ==", - "optional": true, - "peer": true, + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.14.tgz", + "integrity": "sha512-poUNgKTw9XwPXfX9nEHpVgrMNVpaSMZbshqvPxFVoalF4wp6kRzYKOfdesSVectlQ51VtigoLfbXcdyPwvxgTg==", "dependencies": { - "@smithy/protocol-http": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/protocol-http": "^3.0.8", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@smithy/middleware-endpoint": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.0.2.tgz", - "integrity": "sha512-ropE7/c+g22QeluZ+By/B/WvVep0UFreX+IeRMGIO7EbOUPgqtJRXpbJFdG6JKB1uC+CdaJLn4MnZnVBpcyjuA==", - "optional": true, - "peer": true, + "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/middleware-serde": "^2.0.2", - "@smithy/types": "^2.1.0", - "@smithy/url-parser": "^2.0.2", - "@smithy/util-middleware": "^2.0.0", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-endpoint": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", + "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", + "dependencies": { + "@smithy/middleware-serde": "^2.0.12", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", + "@smithy/url-parser": "^2.0.12", + "@smithy/util-middleware": "^2.0.5", "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, - "node_modules/@smithy/middleware-retry": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.2.tgz", - "integrity": "sha512-wtBUXqtZVriiXppYaFkUrybAPhFVX7vebnW/yVPliLMWMcguOMS58qhOYPZe3t9Wki2+mASfyu+kO3An8lAg2A==", - "optional": true, - "peer": true, + "node_modules/@smithy/middleware-retry": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", + "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/protocol-http": "^3.0.8", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", + "@smithy/util-middleware": "^2.0.5", + "@smithy/util-retry": "^2.0.5", + "tslib": "^2.5.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/protocol-http": "^2.0.2", - "@smithy/service-error-classification": "^2.0.0", - "@smithy/types": "^2.1.0", - "@smithy/util-middleware": "^2.0.0", - "@smithy/util-retry": "^2.0.0", - "tslib": "^2.5.0", - "uuid": "^8.3.2" + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/middleware-serde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.2.tgz", - "integrity": "sha512-Kw9xLdlueIaivUWslKB67WZ/cCUg3QnzYVIA3t5KfgsseEEuU4UxXw8NSTvIt71gqQloY+Um8ugS+idgxrWWnw==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.12.tgz", + "integrity": "sha512-IBeco157lIScecq2Z+n0gq56i4MTnfKxS7rbfrAORveDJgnbBAaEQgYqMqp/cYqKrpvEXcyTjwKHrBjCCIZh2A==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4181,12 +5156,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.0.tgz", - "integrity": "sha512-31XC1xNF65nlbc16yuh3wwTudmqs6qy4EseQUGF8A/p2m/5wdd/cnXJqpniy/XvXVwkHPz/GwV36HqzHtIKATQ==", - "optional": true, - "peer": true, + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.6.tgz", + "integrity": "sha512-YSvNZeOKWLJ0M/ycxwDIe2Ztkp6Qixmcml1ggsSv2fdHKGkBPhGrX5tMzPGMI1yyx55UEYBi2OB4s+RriXX48A==", "dependencies": { + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4194,15 +5168,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.0.2.tgz", - "integrity": "sha512-9wVJccASfuCctNWrzR0zrDkf0ox3HCHGEhFlWL2LBoghUYuK28pVRBbG69wvnkhlHnB8dDZHagxH+Nq9dm7eWw==", - "optional": true, - "peer": true, + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", + "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", "dependencies": { - "@smithy/property-provider": "^2.0.2", - "@smithy/shared-ini-file-loader": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/property-provider": "^2.0.13", + "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4210,16 +5182,26 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.0.2.tgz", - "integrity": "sha512-lpZjmtmyZqSAtMPsbrLhb7XoAQ2kAHeuLY/csW6I2k+QyFvOk7cZeQsqEngWmZ9SJaeYiDCBINxAIM61i5WGLw==", - "optional": true, - "peer": true, + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.1.8.tgz", + "integrity": "sha512-KZylM7Wff/So5SmCiwg2kQNXJ+RXgz34wkxS7WNwIUXuZrZZpY/jKJCK+ZaGyuESDu3TxcaY+zeYGJmnFKbQsA==", + "dependencies": { + "@smithy/abort-controller": "^2.0.12", + "@smithy/protocol-http": "^3.0.8", + "@smithy/querystring-builder": "^2.0.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.8.tgz", + "integrity": "sha512-SHJvYeWq8q0FK8xHk+xjV9dzDUDjFMT+G1pZbV+XB6OVoac/FSVshlMNPeUJ8AmSkcDKHRu5vASnRqZHgD3qhw==", "dependencies": { - "@smithy/abort-controller": "^2.0.2", - "@smithy/protocol-http": "^2.0.2", - "@smithy/querystring-builder": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4227,13 +5209,11 @@ } }, "node_modules/@smithy/property-provider": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.2.tgz", - "integrity": "sha512-DfaZ8cO+d/mgnMzIllcXcU4OYP+omiOl2LYdn/fTGpw/EAQSVzscYV2muV3sDDnuPYQ/r014hUqIxnF+pzh+SQ==", - "optional": true, - "peer": true, + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.13.tgz", + "integrity": "sha512-VJqUf2CbsQX6uUiC5dUPuoEATuFjkbkW3lJHbRnpk9EDC9X+iKqhfTK+WP+lve5EQ9TcCI1Q6R7hrg41FyC54w==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4255,13 +5235,11 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.2.tgz", - "integrity": "sha512-H99LOMWEssfwqkOoTs4Y12UiZ7CTGQSX5Nrx5UkYgRbUEpC1GnnaprHiYrqclC58/xr4K76aNchdPyioxewMzA==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.12.tgz", + "integrity": "sha512-cDbF07IuCjiN8CdGvPzfJjXIrmDSelScRfyJYrYBNBbKl2+k7QD/KqiHhtRyEKgID5mmEVrV6KE6L/iPJ98sFw==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "@smithy/util-uri-escape": "^2.0.0", "tslib": "^2.5.0" }, @@ -4270,13 +5248,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.2.tgz", - "integrity": "sha512-L4VtKQ8O4/aWPQJbiFymbhAmxdfLnEaROh/Vs0OstJ7jtOZeBl2QJmuWY2V7hjt64W7V+tEn2sv6vVvnxkm/xQ==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.12.tgz", + "integrity": "sha512-fytyTcXaMzPBuNtPlhj5v6dbl4bJAnwKZFyyItAGt4Tgm9HFPZNo7a9r1SKPr/qdxUEBzvL9Rh+B9SkTX3kFxg==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4284,23 +5260,22 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.0.tgz", - "integrity": "sha512-2z5Nafy1O0cTf69wKyNjGW/sNVMiqDnb4jgwfMG8ye8KnFJ5qmJpDccwIbJNhXIfbsxTg9SEec2oe1cexhMJvw==", - "optional": true, - "peer": true, + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.5.tgz", + "integrity": "sha512-M0SeJnEgD2ywJyV99Fb1yKFzmxDe9JfpJiYTVSRMyRLc467BPU0qsuuDPzMCdB1mU8M8u1rVOdkqdoyFN8UFTw==", + "dependencies": { + "@smithy/types": "^2.4.0" + }, "engines": { "node": ">=14.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.0.2.tgz", - "integrity": "sha512-2VkNOM/82u4vatVdK5nfusgGIlvR48Fkq6me17Oc+V1iyxfR/1x0pG6LzW0br1qlGtzBYFZKmDyviBRcPVFTVw==", - "optional": true, - "peer": true, + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", + "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", "dependencies": { - "@smithy/types": "^2.1.0", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4311,8 +5286,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.2.tgz", "integrity": "sha512-YMooDEw/UmGxcXY4qWnSXkbPFsRloluSvyXVT678YPDN/K2AS1GzKfRsvSU7fbccOB4WF8MHZf2UqcRGEltE3Q==", - "optional": true, - "peer": true, "dependencies": { "@smithy/eventstream-codec": "^2.0.2", "@smithy/is-array-buffer": "^2.0.0", @@ -4328,15 +5301,13 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.0.2.tgz", - "integrity": "sha512-mDfokI8WwLU5C0gcQ4ww/zJI/WLGSh2+vdIA42JRnjfYUjJNH/rKfX9YOnn2eBOxl3loATERVUqkHmKe+P8s2Q==", - "optional": true, - "peer": true, + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.1.12.tgz", + "integrity": "sha512-XXqhridfkKnpj+lt8vM6HRlZbqUAqBjVC74JIi13F/AYQd/zTj9SOyGfxnbp4mjY9q28LityxIuV8CTinr9r5w==", "dependencies": { - "@smithy/middleware-stack": "^2.0.0", - "@smithy/types": "^2.1.0", - "@smithy/util-stream": "^2.0.2", + "@smithy/middleware-stack": "^2.0.6", + "@smithy/types": "^2.4.0", + "@smithy/util-stream": "^2.0.17", "tslib": "^2.5.0" }, "engines": { @@ -4344,11 +5315,9 @@ } }, "node_modules/@smithy/types": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.1.0.tgz", - "integrity": "sha512-KLsCsqxX0j2l99iP8s0f7LBlcsp7a7ceXGn0LPYPyVOsqmIKvSaPQajq0YevlL4T9Bm+DtcyXfBTbtBcLX1I7A==", - "optional": true, - "peer": true, + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.4.0.tgz", + "integrity": "sha512-iH1Xz68FWlmBJ9vvYeHifVMWJf82ONx+OybPW8ZGf5wnEv2S0UXcU4zwlwJkRXuLKpcSLHrraHbn2ucdVXLb4g==", "dependencies": { "tslib": "^2.5.0" }, @@ -4357,14 +5326,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.2.tgz", - "integrity": "sha512-X1mHCzrSVDlhVy7d3S7Vq+dTfYzwh4n7xGHhyJumu77nJqIss0lazVug85Pwo0DKIoO314wAOvMnBxNYDa+7wA==", - "optional": true, - "peer": true, + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.12.tgz", + "integrity": "sha512-qgkW2mZqRvlNUcBkxYB/gYacRaAdck77Dk3/g2iw0S9F0EYthIS3loGfly8AwoWpIvHKhkTsCXXQfzksgZ4zIA==", "dependencies": { - "@smithy/querystring-parser": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/querystring-parser": "^2.0.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" } }, @@ -4372,8 +5339,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.0.tgz", "integrity": "sha512-Zb1E4xx+m5Lud8bbeYi5FkcMJMnn+1WUnJF3qD7rAdXpaL7UjkFQLdmW5fHadoKbdHpwH9vSR8EyTJFHJs++tA==", - "optional": true, - "peer": true, "dependencies": { "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" @@ -4386,18 +5351,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.0.tgz", "integrity": "sha512-JdDuS4ircJt+FDnaQj88TzZY3+njZ6O+D3uakS32f2VNnDo3vyEuNdBOh/oFd8Df1zSZOuH1HEChk2AOYDezZg==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" } }, "node_modules/@smithy/util-body-length-node": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.0.0.tgz", - "integrity": "sha512-ZV7Z/WHTMxHJe/xL/56qZwSUcl63/5aaPAGjkfynJm4poILjdD4GmFI+V+YWabh2WJIjwTKZ5PNsuvPQKt93Mg==", - "optional": true, - "peer": true, + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz", + "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==", "dependencies": { "tslib": "^2.5.0" }, @@ -4409,8 +5370,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz", "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==", - "optional": true, - "peer": true, "dependencies": { "@smithy/is-array-buffer": "^2.0.0", "tslib": "^2.5.0" @@ -4423,8 +5382,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.0.0.tgz", "integrity": "sha512-xCQ6UapcIWKxXHEU4Mcs2s7LcFQRiU3XEluM2WcCjjBtQkUN71Tb+ydGmJFPxMUrW/GWMgQEEGipLym4XG0jZg==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" }, @@ -4433,14 +5390,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.2.tgz", - "integrity": "sha512-c2tMMjb624XLuzmlRoZpnFOkejVxcgw3WQKdmgdGZYZapcLzXyC0H9JhnXMjQCt30GqLTlsILRNVBYwFRbw/4Q==", - "optional": true, - "peer": true, + "version": "2.0.16", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.16.tgz", + "integrity": "sha512-Uv5Cu8nVkuvLn0puX+R9zWbSNpLIR3AxUlPoLJ7hC5lvir8B2WVqVEkJLwtixKAncVLasnTVjPDCidtAUTGEQw==", "dependencies": { - "@smithy/property-provider": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "bowser": "^2.11.0", "tslib": "^2.5.0" }, @@ -4449,29 +5405,39 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.2.tgz", - "integrity": "sha512-gt7m5LLqUtEKldJLyc14DE4kb85vxwomvt9AfEMEvWM4VwfWS1kGJqiStZFb5KNqnQPXw8vvpgLTi8NrWAOXqg==", - "optional": true, - "peer": true, - "dependencies": { - "@smithy/config-resolver": "^2.0.2", - "@smithy/credential-provider-imds": "^2.0.2", - "@smithy/node-config-provider": "^2.0.2", - "@smithy/property-provider": "^2.0.2", - "@smithy/types": "^2.1.0", + "version": "2.0.21", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", + "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", + "dependencies": { + "@smithy/config-resolver": "^2.0.16", + "@smithy/credential-provider-imds": "^2.0.18", + "@smithy/node-config-provider": "^2.1.3", + "@smithy/property-provider": "^2.0.13", + "@smithy/smithy-client": "^2.1.12", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { "node": ">= 10.0.0" } }, + "node_modules/@smithy/util-endpoints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.2.tgz", + "integrity": "sha512-QEdq+sP68IJHAMVB2ugKVVZEWeKQtZLuf+akHzc8eTVElsZ2ZdVLWC6Cp+uKjJ/t4yOj1qu6ZzyxJQEQ8jdEjg==", + "dependencies": { + "@smithy/node-config-provider": "^2.1.3", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">= 14.0.0" + } + }, "node_modules/@smithy/util-hex-encoding": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz", "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" }, @@ -4480,12 +5446,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.0.tgz", - "integrity": "sha512-eCWX4ECuDHn1wuyyDdGdUWnT4OGyIzV0LN1xRttBFMPI9Ff/4heSHVxneyiMtOB//zpXWCha1/SWHJOZstG7kA==", - "optional": true, - "peer": true, + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.5.tgz", + "integrity": "sha512-1lyT3TcaMJQe+OFfVI+TlomDkPuVzb27NZYdYtmSTltVmLaUjdCyt4KE+OH1CnhZKsz4/cdCL420Lg9UH5Z2Mw==", "dependencies": { + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4493,13 +5458,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.0.tgz", - "integrity": "sha512-/dvJ8afrElasuiiIttRJeoS2sy8YXpksQwiM/TcepqdRVp7u4ejd9C4IQURHNjlfPUT7Y6lCDSa2zQJbdHhVTg==", - "optional": true, - "peer": true, + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.5.tgz", + "integrity": "sha512-x3t1+MQAJ6QONk3GTbJNcugCFDVJ+Bkro5YqQQK1EyVesajNDqxFtCx9WdOFNGm/Cbm7tUdwVEmfKQOJoU2Vtw==", "dependencies": { - "@smithy/service-error-classification": "^2.0.0", + "@smithy/service-error-classification": "^2.0.5", + "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, "engines": { @@ -4507,15 +5471,13 @@ } }, "node_modules/@smithy/util-stream": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.2.tgz", - "integrity": "sha512-Mg9IJcKIu4YKlbzvpp1KLvh4JZLdcPgpxk+LICuDwzZCfxe47R9enVK8dNEiuyiIGK2ExbfvzCVT8IBru62vZw==", - "optional": true, - "peer": true, + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.17.tgz", + "integrity": "sha512-fP/ZQ27rRvHsqItds8yB7jerwMpZFTL3QqbQbidUiG0+mttMoKdP0ZqnvM8UK5q0/dfc3/pN7g4XKPXOU7oRWw==", "dependencies": { - "@smithy/fetch-http-handler": "^2.0.2", - "@smithy/node-http-handler": "^2.0.2", - "@smithy/types": "^2.1.0", + "@smithy/fetch-http-handler": "^2.2.4", + "@smithy/node-http-handler": "^2.1.8", + "@smithy/types": "^2.4.0", "@smithy/util-base64": "^2.0.0", "@smithy/util-buffer-from": "^2.0.0", "@smithy/util-hex-encoding": "^2.0.0", @@ -4530,8 +5492,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz", "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==", - "optional": true, - "peer": true, "dependencies": { "tslib": "^2.5.0" }, @@ -4543,8 +5503,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.0.tgz", "integrity": "sha512-rctU1VkziY84n5OXe3bPNpKR001ZCME2JCaBBFgtiM2hfKbHFudc/BkMuPab8hRbLd0j3vbnBTTZ1igBf0wgiQ==", - "optional": true, - "peer": true, "dependencies": { "@smithy/util-buffer-from": "^2.0.0", "tslib": "^2.5.0" @@ -4553,6 +5511,19 @@ "node": ">=14.0.0" } }, + "node_modules/@smithy/util-waiter": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.12.tgz", + "integrity": "sha512-3sENmyVa1NnOPoiT2NCApPmu7ukP7S/v7kL9IxNmnygkDldn7/yK0TP42oPJLwB2k3mospNsSePIlqdXEUyPHA==", + "dependencies": { + "@smithy/abort-controller": "^2.0.12", + "@smithy/types": "^2.4.0", + "tslib": "^2.5.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@sqltools/formatter": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", @@ -5660,6 +6631,8 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -5667,49 +6640,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sdk": { - "version": "2.1366.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1366.0.tgz", - "integrity": "sha512-tS7y18KHH0eq43I8WJsxVBpwOMY45FSsu6a+A/6k0bMrE4zhd1fzhPN+5coNIODaGxnqVvgw9guLg3AOe4SpaA==", - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "util": "^0.12.4", - "uuid": "8.0.0", - "xml2js": "0.5.0" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/aws-sdk/node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/aws-sdk/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/aws-sdk/node_modules/uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/axios": { "version": "0.21.4", "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", @@ -6065,9 +6995,7 @@ "node_modules/bowser": { "version": "2.11.0", "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==", - "optional": true, - "peer": true + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" }, "node_modules/brace-expansion": { "version": "1.1.11", @@ -6920,9 +7848,9 @@ } }, "node_modules/crypto-js": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.1.1.tgz", - "integrity": "sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" }, "node_modules/cssfilter": { "version": "0.0.10", @@ -7753,14 +8681,6 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -7976,8 +8896,6 @@ "url": "https://github.com/sponsors/NaturalIntelligence" } ], - "optional": true, - "peer": true, "dependencies": { "strnum": "^1.0.5" }, @@ -8152,6 +9070,8 @@ "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "optional": true, + "peer": true, "dependencies": { "is-callable": "^1.1.3" } @@ -8433,6 +9353,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "optional": true, + "peer": true, "dependencies": { "get-intrinsic": "^1.1.3" }, @@ -8682,6 +9604,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "optional": true, + "peer": true, "dependencies": { "has-symbols": "^1.0.2" }, @@ -9046,6 +9970,8 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "optional": true, + "peer": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -9123,6 +10049,8 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "optional": true, + "peer": true, "engines": { "node": ">= 0.4" }, @@ -9183,20 +10111,6 @@ "node": ">=6" } }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -9367,6 +10281,8 @@ "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "optional": true, + "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -10204,14 +11120,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/jose": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/jose/-/jose-2.0.6.tgz", @@ -11377,9 +12285,15 @@ "integrity": "sha512-C40jQ3NzfkP53NsO8kEOFd79p4b9kDXQMwgiY1z8ZwrDZgUyom0AHwGegF4Dm99L+YoYhuaB0ceerUcXmqr1rQ==" }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", + "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -12384,15 +13298,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -12805,11 +13710,6 @@ "mingo": "1" } }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" - }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", @@ -13229,6 +14129,36 @@ "node": ">= 0.4" } }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-browserify/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/stream-combiner": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", @@ -13321,9 +14251,7 @@ "node_modules/strnum": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "optional": true, - "peer": true + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" }, "node_modules/subscriptions-transport-ws": { "version": "0.11.0", @@ -14323,15 +15251,6 @@ "punycode": "^2.1.0" } }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -14341,23 +15260,6 @@ "requires-port": "^1.0.0" } }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -14614,6 +15516,8 @@ "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "optional": true, + "peer": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", @@ -14846,26 +15750,6 @@ } } }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/xss": { "version": "1.0.14", "resolved": "https://registry.npmjs.org/xss/-/xss-1.0.14.tgz", diff --git a/package.json b/package.json index 033ec99a2..7982b2992 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,10 @@ }, "dependencies": { "@apollo/server": "^4.9.3", + "@aws-sdk/client-s3": "^3.438.0", + "@aws-sdk/lib-storage": "^3.438.0", "@elastic/elasticsearch": "7.12.0", - "@golevelup/nestjs-rabbitmq": "3.4.0", + "@golevelup/nestjs-rabbitmq": "4.0.0", "@multiversx/sdk-core": "12.6.1", "@multiversx/sdk-native-auth-server": "1.0.7", "@multiversx/sdk-nestjs-cache": "2.0.0-beta.2", @@ -62,7 +64,6 @@ "agentkeepalive": "4.2.1", "amqp-connection-manager": "3.7.0", "amqplib": "0.8.0", - "aws-sdk": "2.1366.0", "axios": "0.21.4", "axios-retry": "3.1.8", "bignumber.js": "9.0.1", diff --git a/schema.gql b/schema.gql index 12beb5aa5..2529f0127 100644 --- a/schema.gql +++ b/schema.gql @@ -352,12 +352,6 @@ input BuySftActionArgs { quantity: String } -input BuyTicketsArgs { - collectionIdentifier: String! - price: String! - ticketsNumber: Int! -} - type Campaign { availableNfts: Int! campaignId: ID! @@ -426,10 +420,6 @@ input ChildFilter { values: [String!]! } -input ClaimTicketsArgs { - collectionIdentifier: String! -} - input ClearReportCollectionInput { collectionIdentifier: String! } @@ -971,8 +961,6 @@ type Mutation { burnQuantity(input: HandleQuantityArgs!): TransactionNode! buyRandomNft(input: BuyRandomNftActionArgs!): TransactionNode! buySft(input: BuySftActionArgs!): TransactionNode! - buyTickets(input: BuyTicketsArgs!): TransactionNode! - claimTicket(input: ClaimTicketsArgs!): TransactionNode! clearCollectionScamInfo(collection: String!): Boolean! clearNftScamInfo(identifier: String!): Boolean! clearReportCollection(input: ClearReportCollectionInput!): Boolean! @@ -995,6 +983,7 @@ type Mutation { removeBlacklistedCollection(collection: String!): Boolean! removeFeaturedCollection(input: FeaturedCollectionsArgs!): Boolean! removeLike(input: RemoveLikeArgs!): Boolean! + removeWhitelistCollection(input: RemoveWhitelistCollectionArgs!): Boolean! reportCollection( """This endpoint can be used to report a Collection""" input: ReportCollectionInput! @@ -1239,36 +1228,6 @@ type PriceRange { minBid: Price! } -type PrimarySale { - collectionIdentifier: ID - frozen: Boolean - maxUnitsPerWallet: Int! - paymentToken: String! - price: String - saleTime: PrimarySaleTime! - status: PrimarySaleStatusEnum! -} - -input PrimarySaleFilter { - collectionName: String! -} - -enum PrimarySaleStatusEnum { - BetweenPeriod - ClaimPeriod - EndedPeriod - NonePeriod - NotStarted - SalePeriod -} - -type PrimarySaleTime { - endClaim: Int - endSale: Int! - startClaim: Int - startSale: Int! -} - enum Privacy { private public @@ -1307,17 +1266,13 @@ type Query { featuredCollections(filters: FeaturedCollectionsFilter, pagination: ConnectionArgs): CollectionResponse! featuredNfts(pagination: ConnectionArgs): AssetsResponse! generalAnalytics(input: AnalyticsInput): GeneralAnalyticsModel! - hasClaimedTickets(collectionIdentifier: String!): Boolean! - isWhitelisted: WhitelistedInfo! marketplaces(filters: MarketplaceFilters, pagination: ConnectionArgs): MarketplacesResponse! myClaimableAuctions(filters: MyClaimableAuctionsFilters, pagination: ConnectionArgs): AuctionResponse! - myTickets(collectionIdentifier: String!): [TicketInfo!]! notifications(filters: NotificationsFilters, pagination: ConnectionArgs): NotificationsResponse! offers(filters: OffersFilters, pagination: ConnectionArgs): OffersResponse! orders(filters: FiltersExpression, pagination: ConnectionArgs, sorting: [Sorting!]): OrdersResponse! owners(filters: OwnersFilters!, pagination: ConnectionArgs): OwnerResponse! priceRange(filters: TokenFilter): PriceRange! - primarySale(filters: PrimarySaleFilter!): PrimarySale! search(filters: SearchFilter!): SearchResponse! tags(filters: TagsFilter!, pagination: ConnectionArgs): TagsResponse! trendingAssets: [Asset!]! @@ -1341,6 +1296,11 @@ input RemoveLikeArgs { identifier: String! } +input RemoveWhitelistCollectionArgs { + collection: String! + marketplaceKey: String! +} + input ReportCollectionInput { collectionIdentifier: String! } @@ -1442,12 +1402,6 @@ type TagsResponse { pageInfo: TagPageInfo } -type TicketInfo { - buyer: String! - ticketNumber: Int! - winningNonce: String! -} - type Tier { availableNfts: Int! campaignId: ID! @@ -1586,9 +1540,4 @@ input WhitelistMarketplaceArgs { input WhitelistMinterArgs { address: String! adminAddress: String! -} - -type WhitelistedInfo { - isWhitelisted: Boolean! - message: String } \ No newline at end of file diff --git a/src/abis/primary-sales-sc.abi.json b/src/abis/primary-sales-sc.abi.json deleted file mode 100644 index 8b4536ea6..000000000 --- a/src/abis/primary-sales-sc.abi.json +++ /dev/null @@ -1,768 +0,0 @@ -{ - "buildInfo": { - "rustc": { - "version": "1.66.0-nightly", - "commitHash": "a24a020e6d926dffe6b472fc647978f92269504e", - "commitDate": "2022-10-18", - "channel": "Nightly", - "short": "rustc 1.66.0-nightly (a24a020e6 2022-10-18)" - }, - "contractCrate": { - "name": "primary-sales-sc", - "version": "0.0.0", - "git_version": "6a13673" - }, - "framework": { - "name": "elrond-wasm", - "version": "0.33.1" - } - }, - "name": "Sales", - "constructor": { - "inputs": [ - { - "name": "payment_token", - "type": "EgldOrEsdtTokenIdentifier" - } - ], - "outputs": [] - }, - "endpoints": [ - { - "name": "add_nfts", - "mutability": "mutable", - "payableInTokens": ["*"], - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "frozen", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "bool" - } - ] - }, - { - "name": "admin", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "worker", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "manager", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "valid_nft_collections", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "variadic<TokenIdentifier>", - "multi_result": true - } - ] - }, - { - "name": "price", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "BigUint" - } - ] - }, - { - "name": "max_units_per_wallet", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "u32" - } - ] - }, - { - "name": "max_nfts", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "u32" - } - ] - }, - { - "name": "num_total_nfts", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "u32" - } - ] - }, - { - "name": "sc_nft_creator", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "payment_token", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "EgldOrEsdtTokenIdentifier" - } - ] - }, - { - "name": "buyer_users", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "variadic<Address>", - "multi_result": true - } - ] - }, - { - "name": "ticket_queues_info", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "index", - "type": "u32" - } - ], - "outputs": [ - { - "type": "variadic<u32>", - "multi_result": true - } - ] - }, - { - "name": "timestamps", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "Timestamps" - } - ] - }, - { - "name": "current_token", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "TokenIdentifier" - } - ] - }, - { - "name": "funds_wallet", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "withdraw_wallet", - "mutability": "readonly", - "inputs": [], - "outputs": [ - { - "type": "Address" - } - ] - }, - { - "name": "claimers", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "variadic<Address>", - "multi_result": true - } - ] - }, - { - "name": "all_tickets", - "mutability": "readonly", - "inputs": [ - { - "name": "caller", - "type": "Address" - }, - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "List<TicketInfo>" - } - ] - }, - { - "name": "payback", - "mutability": "readonly", - "inputs": [ - { - "name": "caller", - "type": "Address" - }, - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "BigUint" - } - ] - }, - { - "name": "freeze", - "mutability": "mutable", - "inputs": [], - "outputs": [] - }, - { - "name": "unfreeze", - "onlyOwner": true, - "mutability": "mutable", - "inputs": [], - "outputs": [] - }, - { - "name": "set_admin", - "onlyOwner": true, - "mutability": "mutable", - "inputs": [ - { - "name": "address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_worker", - "onlyOwner": true, - "mutability": "mutable", - "inputs": [ - { - "name": "address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_manager", - "onlyOwner": true, - "mutability": "mutable", - "inputs": [ - { - "name": "address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_sc_nft_creator", - "mutability": "mutable", - "inputs": [ - { - "name": "new_address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_sc_whitelist", - "mutability": "mutable", - "inputs": [ - { - "name": "new_address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "add_valid_nft_collection", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "remove_valid_nft_collection", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "set_price", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "amount", - "type": "BigUint" - } - ], - "outputs": [] - }, - { - "name": "set_max_units_per_wallet", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "max", - "type": "u32" - } - ], - "outputs": [] - }, - { - "name": "set_max_nfts", - "mutability": "mutable", - "inputs": [ - { - "name": "max", - "type": "u32" - } - ], - "outputs": [] - }, - { - "name": "configure_collection_for_sale", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "price", - "type": "BigUint" - }, - { - "name": "max_units_per_wallet", - "type": "u32" - } - ], - "outputs": [] - }, - { - "name": "set_funds_wallet", - "mutability": "mutable", - "inputs": [ - { - "name": "wallet_address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_withdraw_wallet", - "mutability": "mutable", - "inputs": [ - { - "name": "wallet_address", - "type": "Address" - } - ], - "outputs": [] - }, - { - "name": "set_current_token", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "buy_tickets", - "mutability": "mutable", - "payableInTokens": ["*"], - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "num", - "type": "u32" - } - ], - "outputs": [] - }, - { - "name": "buyers", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "variadic<tuple<Address,u32>>", - "multi_result": true - } - ] - }, - { - "name": "my_tickets", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "user_address", - "type": "Address" - } - ], - "outputs": [ - { - "type": "variadic<u32>", - "multi_result": true - } - ] - }, - { - "name": "withdraw_funds", - "mutability": "mutable", - "inputs": [], - "outputs": [] - }, - { - "name": "withdraw_nfts", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "fair_distribution", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "available_nonces", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "u32" - } - ] - }, - { - "name": "claim", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "airdrop_unclaimed", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [] - }, - { - "name": "set_sale_timestamps", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "start_sale", - "type": "u64" - }, - { - "name": "end_sale", - "type": "u64" - }, - { - "name": "start_claim", - "type": "u64" - }, - { - "name": "end_claim", - "type": "u64" - } - ], - "outputs": [] - }, - { - "name": "set_sale_start", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "start_sale", - "type": "u64" - } - ], - "outputs": [] - }, - { - "name": "set_sale_end", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "end_sale", - "type": "u64" - } - ], - "outputs": [] - }, - { - "name": "set_claim_start", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "start_claim", - "type": "u64" - } - ], - "outputs": [] - }, - { - "name": "set_claim_end", - "mutability": "mutable", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - }, - { - "name": "end_claim", - "type": "u64" - } - ], - "outputs": [] - }, - { - "name": "status", - "mutability": "readonly", - "inputs": [ - { - "name": "nft_collection", - "type": "TokenIdentifier" - } - ], - "outputs": [ - { - "type": "Status" - } - ] - } - ], - "events": [], - "hasCallback": false, - "types": { - "Status": { - "type": "enum", - "variants": [ - { - "name": "ClaimPeriod", - "discriminant": 0 - }, - { - "name": "SalePeriod", - "discriminant": 1 - }, - { - "name": "NonePeriod", - "discriminant": 2 - } - ] - }, - "TicketInfo": { - "type": "struct", - "fields": [ - { - "name": "buyer", - "type": "Address" - }, - { - "name": "ticket_number", - "type": "u32" - }, - { - "name": "winner_nonce", - "type": "u64" - }, - { - "name": "price", - "type": "BigUint" - } - ] - }, - "Timestamps": { - "type": "struct", - "fields": [ - { - "name": "start_sale", - "type": "u64" - }, - { - "name": "end_sale", - "type": "u64" - }, - { - "name": "start_claim", - "type": "u64" - }, - { - "name": "end_claim", - "type": "u64" - } - ] - } - } -} diff --git a/src/app.module.ts b/src/app.module.ts index 86a275f7a..9a3f2a66a 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -31,7 +31,6 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { MarketplacesModuleGraph } from './modules/marketplaces/marketplaces.module'; import { ArtistsModuleGraph } from './modules/artists/artists.module'; import { ExploreStatsModuleGraph } from './modules/explore-stats/explore-stats.module'; -import { PrimarySaleModuleGraph } from './modules/primary-sale-sc/primary-sale.module'; import { ScamModule } from './modules/scam/scam.module'; import { ComplexityPlugin } from './modules/common/complexity.plugin'; import { BlacklistedCollectionsModule } from './modules/blacklist/blacklisted-collections.module'; @@ -40,6 +39,7 @@ import '@multiversx/sdk-nestjs-common/lib/utils/extensions/array.extensions'; import '@multiversx/sdk-nestjs-common/lib/utils/extensions/number.extensions'; import { TimescaleDbModule } from './common/persistence/timescaledb/timescaledb.module'; import { MintersModuleGraph } from './modules/minters/minters.module'; +import { PersistenceModule } from './common/persistence/persistence.module'; @Module({ imports: [ @@ -72,6 +72,7 @@ import { MintersModuleGraph } from './modules/minters/minters.module'; }), }), CommonModule, + PersistenceModule, CollectionsModuleGraph, AssetsModuleGraph, AssetHistoryModuleGraph, @@ -96,7 +97,6 @@ import { MintersModuleGraph } from './modules/minters/minters.module'; MarketplacesModuleGraph, ArtistsModuleGraph, ExploreStatsModuleGraph, - PrimarySaleModuleGraph, TimescaleDbModule, MintersModuleGraph, ], diff --git a/src/common.module.ts b/src/common.module.ts index 347fa29f1..25ceaea2c 100644 --- a/src/common.module.ts +++ b/src/common.module.ts @@ -1,10 +1,11 @@ -import { forwardRef, Logger, Module } from '@nestjs/common'; +import { forwardRef, Global, Logger, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config/dist'; import { ScheduleModule } from '@nestjs/schedule'; import { MxCommunicationModule } from './common/services/mx-communication/mx-communication.module'; import { CacheModule } from './common/services/caching/caching.module'; import { ApiConfigModule } from './modules/common/api-config/api.config.module'; +@Global() @Module({ imports: [forwardRef(() => CacheModule), ScheduleModule.forRoot(), ConfigModule, ApiConfigModule, MxCommunicationModule], exports: [MxCommunicationModule, CacheModule, Logger, ApiConfigModule], diff --git a/src/common/persistence/persistence.module.ts b/src/common/persistence/persistence.module.ts index d31fecb72..7c39c947c 100644 --- a/src/common/persistence/persistence.module.ts +++ b/src/common/persistence/persistence.module.ts @@ -39,25 +39,27 @@ import { MintersRepository } from 'src/db/minters/minters.repository'; @Global() @Module({ imports: [ - TypeOrmModule.forFeature([AssetLikeEntity]), - TypeOrmModule.forFeature([FeaturedCollectionEntity]), - TypeOrmModule.forFeature([FeaturedNftEntity]), - TypeOrmModule.forFeature([BlacklistedCollectionEntity]), - TypeOrmModule.forFeature([TagEntity]), - TypeOrmModule.forFeature([CampaignEntity]), - TypeOrmModule.forFeature([TierEntity]), - TypeOrmModule.forFeature([MarketplaceEntity]), - TypeOrmModule.forFeature([MarketplaceCollectionEntity]), - TypeOrmModule.forFeature([ReportNftEntity]), - TypeOrmModule.forFeature([ReportCollectionEntity]), - TypeOrmModule.forFeature([NftFlagsEntity]), - TypeOrmModule.forFeature([NftRarityEntity]), - TypeOrmModule.forFeature([NotificationEntity]), - TypeOrmModule.forFeature([OrderEntity]), - TypeOrmModule.forFeature([AuctionEntity]), - TypeOrmModule.forFeature([OfferEntity]), - TypeOrmModule.forFeature([MarketplaceEventsEntity]), - TypeOrmModule.forFeature([MinterEntity]), + TypeOrmModule.forFeature([ + AssetLikeEntity, + FeaturedCollectionEntity, + FeaturedNftEntity, + BlacklistedCollectionEntity, + TagEntity, + CampaignEntity, + TierEntity, + MarketplaceEntity, + MarketplaceCollectionEntity, + ReportNftEntity, + ReportCollectionEntity, + NftFlagsEntity, + NftRarityEntity, + NotificationEntity, + OrderEntity, + AuctionEntity, + OfferEntity, + MarketplaceEventsEntity, + MinterEntity, + ]), CacheEventsPublisherModule, MxCommunicationModule, ], diff --git a/src/common/persistence/persistence.service.ts b/src/common/persistence/persistence.service.ts index adc49b9de..ea159ab96 100644 --- a/src/common/persistence/persistence.service.ts +++ b/src/common/persistence/persistence.service.ts @@ -1,5 +1,5 @@ import { PerformanceProfiler } from '@multiversx/sdk-nestjs-monitoring'; -import { Injectable } from '@nestjs/common'; +import { Inject, Injectable, forwardRef } from '@nestjs/common'; import { mxConfig } from 'src/config'; import { AccountStatsEntity } from 'src/db/account-stats/account-stats'; import { AccountStatsRepository } from 'src/db/account-stats/account-stats.repository'; @@ -63,6 +63,7 @@ export class PersistenceService { private readonly nftRarityRepository: NftRarityRepository, private readonly notificationRepository: NotificationsRepository, private readonly ordersRepository: OrdersRepository, + @Inject(forwardRef(() => AuctionsRepository)) private readonly auctionsRepository: AuctionsRepository, private readonly marketplaceEventsRepository: MarketplaceEventsRepository, private readonly offersRepository: OffersRepository, @@ -259,6 +260,13 @@ export class PersistenceService { this.marketplaceCollectionsRepository.getMarketplaceByKeyAndCollection(collection, key), ); } + + async getCollectionByKeyAndCollection(collection: string, key: string): Promise<MarketplaceCollectionEntity> { + return await this.execute( + this.getCollectionByKeyAndCollection.name, + this.marketplaceCollectionsRepository.getCollectionByKeyAndCollection(collection, key), + ); + } async getAllMarketplaceCollections(): Promise<MarketplaceCollectionEntity[]> { return await this.execute(this.getAllMarketplaceCollections.name, this.marketplaceCollectionsRepository.getAllCollections()); } @@ -277,11 +285,12 @@ export class PersistenceService { ); } - async saveMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<MarketplaceCollectionEntity> { - return await this.execute( - this.getCollectionsByMarketplace.name, - this.marketplaceCollectionsRepository.saveMarketplaceCollection(entity), - ); + async saveMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<boolean> { + return await this.execute(this.saveMarketplaceCollection.name, this.marketplaceCollectionsRepository.saveMarketplaceCollection(entity)); + } + + async deleteMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<MarketplaceCollectionEntity> { + return this.execute(this.deleteMarketplaceCollection.name, this.marketplaceCollectionsRepository.deleteMarketplaceCollection(entity)); } async saveMarketplace(entity: MarketplaceEntity): Promise<MarketplaceEntity> { diff --git a/src/config/development.json b/src/config/development.json index 3e712555c..f5bada401 100644 --- a/src/config/development.json +++ b/src/config/development.json @@ -1,7 +1,7 @@ { "multiversX": { "esdtNftAddress": "erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", - "nftMarketplaceAddress": "erd1qqqqqqqqqqqqqpgqs8gtvhtt6k7h6khkmudzd6y4z0r08rx4u00svnnxt2", + "nftMarketplaceAddress": "erd1qqqqqqqqqqqqqpgq9ac9zvc4ugzrgqaqjqgjdhvxxtx7wu2eu00sxezym3", "issueNftCost": 50000000000000000, "wegld": "WEGLD-d7c6bb", "mex": "MEX-dc289c", diff --git a/src/crons/elastic.updater/nsfw-queries.ts b/src/crons/elastic.updater/nsfw-queries.ts index ef09ff334..1c57f77a4 100644 --- a/src/crons/elastic.updater/nsfw-queries.ts +++ b/src/crons/elastic.updater/nsfw-queries.ts @@ -1,16 +1,17 @@ import { NftTypeEnum } from 'src/modules/assets/models'; import { ElasticQuery, QueryType } from '@multiversx/sdk-nestjs-elastic'; import { constants } from 'src/config'; +import { ELASTIC_NFT_NSFW } from 'src/utils/constants'; export const getNsfwNotMarkedQuery = ElasticQuery.create() - .withMustNotExistCondition('nft_nsfw_mark') + .withMustNotExistCondition(ELASTIC_NFT_NSFW) .withMustExistCondition('identifier') .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true })) .withPagination({ from: 0, size: constants.elasticMaxBatch }); export const getNsfwMarkedQuery = ElasticQuery.create() - .withFields(['nft_nsfw_mark']) + .withFields([ELASTIC_NFT_NSFW]) .withMustExistCondition('identifier') .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true })) diff --git a/src/crons/elastic.updater/nsfw.updater.service.ts b/src/crons/elastic.updater/nsfw.updater.service.ts index e388bd2aa..2d562b9de 100644 --- a/src/crons/elastic.updater/nsfw.updater.service.ts +++ b/src/crons/elastic.updater/nsfw.updater.service.ts @@ -7,6 +7,7 @@ import { CacheEventsPublisherService } from 'src/modules/rabbitmq/cache-invalida import { ChangedEvent, CacheEventTypeEnum } from 'src/modules/rabbitmq/cache-invalidation/events/changed.event'; import { getNsfwMarkedQuery, getNsfwNotMarkedQuery } from './nsfw-queries'; import { constants } from 'src/config'; +import { ELASTIC_NFT_NSFW, ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; type NsfwType = { identifier: string; @@ -24,7 +25,7 @@ export class NsfwUpdaterService { ) {} public async cleanReindexing() { - await this.elasticService.getScrollableList('tokens', 'identifier', getNsfwNotMarkedQuery, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', getNsfwNotMarkedQuery, async (items) => { const nsfwItems = items.map((item) => ({ identifier: item.identifier, nsfw: item.nft_nsfw_mark, @@ -35,7 +36,7 @@ export class NsfwUpdaterService { } public async validateNsfwFlags() { - await this.elasticService.getScrollableList('tokens', 'identifier', getNsfwMarkedQuery, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', getNsfwMarkedQuery, async (items) => { const nsfwItems = items.map((item) => ({ identifier: item.identifier, nsfw: item.nft_nsfw_mark, @@ -46,7 +47,7 @@ export class NsfwUpdaterService { } public async updateNsfwWhereNone() { - await this.elasticService.getScrollableList('tokens', 'identifier', getNsfwNotMarkedQuery, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', getNsfwNotMarkedQuery, async (items) => { const nsfwItems = items.map((item) => ({ identifier: item.identifier, nsfw: item.nft_nsfw_mark, @@ -118,9 +119,9 @@ export class NsfwUpdaterService { try { this.logger.log(`Setting nsfw for '${identifier}' with value ${nsfw}`); await this.elasticService.setCustomValue( - 'tokens', + ELASTIC_TOKENS_INDEX, identifier, - this.elasticService.buildUpdateBody<number>('nft_nsfw_mark', nsfw), + this.elasticService.buildUpdateBody<number>(ELASTIC_NFT_NSFW, nsfw), '?retry_on_conflict=2', ); } catch (error) { @@ -136,7 +137,7 @@ export class NsfwUpdaterService { try { if (items && items.length > 0) { this.logger.log(`Updating NSFW flag`); - await this.elasticService.bulkRequest('tokens', this.buildNsfwBulkUpdate(items)); + await this.elasticService.bulkRequest(ELASTIC_TOKENS_INDEX, this.buildNsfwBulkUpdate(items)); } } catch (error) { this.logger.error('Unexpected error when updating nsfw with bulk request', { @@ -149,7 +150,7 @@ export class NsfwUpdaterService { private buildNsfwBulkUpdate(items: { identifier: string; nsfw: number }[]): string[] { let updates: string[] = []; items.forEach((r) => { - updates.push(this.buildBulkUpdate('tokens', r.identifier, 'nft_nsfw_mark', parseFloat(r.nsfw.toString()))); + updates.push(this.buildBulkUpdate(ELASTIC_TOKENS_INDEX, r.identifier, ELASTIC_NFT_NSFW, parseFloat(r.nsfw.toString()))); }); return updates; } diff --git a/src/crons/elastic.updater/rarity.updater.service.ts b/src/crons/elastic.updater/rarity.updater.service.ts index a36ba45bc..7c50ec626 100644 --- a/src/crons/elastic.updater/rarity.updater.service.ts +++ b/src/crons/elastic.updater/rarity.updater.service.ts @@ -5,6 +5,7 @@ import { generateCacheKeyFromParams } from 'src/utils/generate-cache-key'; import { NftRarityElasticService } from 'src/modules/nft-rarity/nft-rarity.elastic.service'; import { RedisCacheService } from '@multiversx/sdk-nestjs-cache'; import { Locker } from '@multiversx/sdk-nestjs-common'; +import { ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class RarityUpdaterService { @@ -33,7 +34,7 @@ export class RarityUpdaterService { const query = this.nftRarityElasticService.getAllNftsWhereRarityNotComputedFromElasticQuery(); - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { const collections = [...new Set(items.map((i) => i.token))]; collectionsToUpdate = collectionsToUpdate.concat(collections.filter((c) => collectionsToUpdate.indexOf(c) === -1)); if (collectionsToUpdate.length >= maxCollectionsToUpdate) { diff --git a/src/crons/elastic.updater/traits.updater.service.ts b/src/crons/elastic.updater/traits.updater.service.ts index fd302584d..f24bf1490 100644 --- a/src/crons/elastic.updater/traits.updater.service.ts +++ b/src/crons/elastic.updater/traits.updater.service.ts @@ -10,6 +10,7 @@ import { getCollectionsWhereTraitsFlagNotSetFromElasticQuery, getCollectionsWithTraitSummaryFromElasticQuery, } from 'src/modules/nft-traits/nft-traits.elastic.queries'; +import { ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class TraitsUpdaterService { @@ -30,7 +31,7 @@ export class TraitsUpdaterService { const lastIndex = await this.getLastValidatedCollectionIndex(); let collections: string[] = []; - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { collections = collections.concat([...new Set(items.map((i) => i.token))]); if (collections.length > lastIndex + maxCollectionsToValidate) { return undefined; @@ -65,7 +66,7 @@ export class TraitsUpdaterService { const query = getCollectionsWhereTraitsFlagNotSetFromElasticQuery(maxCollectionsToUpdate); - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { const collections = [...new Set(items.map((i) => i.token))]; collectionsToUpdate = collectionsToUpdate.concat(collections.filter((c) => collectionsToUpdate.indexOf(c) === -1)); if (collectionsToUpdate.length >= maxCollectionsToUpdate) { diff --git a/src/db/marketplaces/marketplace-collections.repository.ts b/src/db/marketplaces/marketplace-collections.repository.ts index f35017643..cde57cbd7 100644 --- a/src/db/marketplaces/marketplace-collections.repository.ts +++ b/src/db/marketplaces/marketplace-collections.repository.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { Repository } from 'typeorm'; +import { DeleteResult, Repository } from 'typeorm'; import { MarketplaceCollectionEntity } from './marketplace-collection.entity'; import { MarketplaceEntity } from './marketplace.entity'; @@ -87,7 +87,27 @@ export class MarketplaceCollectionsRepository { .execute(); } - async saveMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<MarketplaceCollectionEntity> { - return await this.marketplaceCollectionRepository.save(entity); + async getCollectionByIdentifier(collectionIdentifier: string): Promise<MarketplaceCollectionEntity> { + return this.marketplaceCollectionRepository.findOne({ + where: [{ collectionIdentifier: collectionIdentifier }], + }); + } + + async getCollectionByKeyAndCollection(collection: string, key: string): Promise<MarketplaceCollectionEntity> { + return this.marketplaceCollectionRepository + .createQueryBuilder('mc') + .select('mc.*') + .leftJoin('mc.marketplaces', 'm') + .where(`collectionIdentifier = '${collection}' and m.key= '${key}'`) + .execute(); + } + + async saveMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<boolean> { + const result = await this.marketplaceCollectionRepository.save(entity); + return result ? true : false; + } + + async deleteMarketplaceCollection(entity: MarketplaceCollectionEntity): Promise<MarketplaceCollectionEntity> { + return await this.marketplaceCollectionRepository.remove(entity); } } diff --git a/src/modules/account-stats/accounts-stats.module.ts b/src/modules/account-stats/accounts-stats.module.ts index 2ee73788b..e57322798 100644 --- a/src/modules/account-stats/accounts-stats.module.ts +++ b/src/modules/account-stats/accounts-stats.module.ts @@ -7,6 +7,7 @@ import { MarketplacesService } from '../marketplaces/marketplaces.service'; import { MarketplacesCachingService } from '../marketplaces/marketplaces-caching.service'; import { CollectionsModuleGraph } from '../nftCollections/collections.module'; import { OffersModuleGraph } from '../offers/offers.module'; +import { PubSubListenerModule } from 'src/pubsub/pub.sub.listener.module'; @Module({ providers: [ @@ -17,7 +18,7 @@ import { OffersModuleGraph } from '../offers/offers.module'; MarketplacesService, MarketplacesCachingService, ], - imports: [MxCommunicationModule, forwardRef(() => CollectionsModuleGraph), forwardRef(() => OffersModuleGraph)], + imports: [MxCommunicationModule, forwardRef(() => CollectionsModuleGraph), forwardRef(() => OffersModuleGraph), PubSubListenerModule], exports: [AccountsStatsService], }) export class AccountsStatsModuleGraph {} diff --git a/src/modules/admins/flag-nft.service.ts b/src/modules/admins/flag-nft.service.ts index 10adc9098..4fe1584bc 100644 --- a/src/modules/admins/flag-nft.service.ts +++ b/src/modules/admins/flag-nft.service.ts @@ -10,6 +10,7 @@ import { Asset, NftTypeEnum } from '../assets/models'; import { VerifyContentService } from '../assets/verify-content.service'; import { CacheEventsPublisherService } from '../rabbitmq/cache-invalidation/cache-invalidation-publisher/change-events-publisher.service'; import { CacheEventTypeEnum, ChangedEvent } from '../rabbitmq/cache-invalidation/events/changed.event'; +import { ELASTIC_NFT_NSFW, ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; type NsfwType = { identifier: string; nsfw: any; @@ -68,7 +69,7 @@ export class FlagNftService { .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true })) .withPagination({ from: 0, size: 10000 }); - await this.elasticUpdater.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.elasticUpdater.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { const nsfwItems = items.map((item) => ({ identifier: item.identifier, nsfw: item.nft_nsfw_mark, @@ -124,9 +125,9 @@ export class FlagNftService { }), ); await this.elasticUpdater.setCustomValue( - 'tokens', + ELASTIC_TOKENS_INDEX, identifier, - this.elasticUpdater.buildUpdateBody<number>('nft_nsfw_mark', savedValue), + this.elasticUpdater.buildUpdateBody<number>(ELASTIC_NFT_NSFW, savedValue), '?retry_on_conflict=2', ); } @@ -158,9 +159,9 @@ export class FlagNftService { }), ); await this.elasticUpdater.setCustomValue( - 'tokens', + ELASTIC_TOKENS_INDEX, identifier, - this.elasticUpdater.buildUpdateBody<number>('nft_nsfw_mark', value.toRounded(2)), + this.elasticUpdater.buildUpdateBody<number>(ELASTIC_NFT_NSFW, value.toRounded(2)), '?retry_on_conflict=2', ); @@ -219,10 +220,10 @@ export class FlagNftService { async () => { try { await this.elasticUpdater.putMappings( - 'tokens', + ELASTIC_TOKENS_INDEX, this.elasticUpdater.buildPutMultipleMappingsBody([ { - key: 'nft_nsfw_mark', + key: ELASTIC_NFT_NSFW, value: 'float', }, ]), diff --git a/src/modules/analytics/analytics.module.ts b/src/modules/analytics/analytics.module.ts index 7aeff0f6a..6095a5175 100644 --- a/src/modules/analytics/analytics.module.ts +++ b/src/modules/analytics/analytics.module.ts @@ -29,6 +29,7 @@ import { UpdatePriceEventParser } from './events-parsers/updatePrice-event.parse import { HoldersResolver } from './holders.resolver'; import { AccountsProvider } from '../account-stats/loaders/accounts.loader'; import { AccountsRedisHandler } from '../account-stats/loaders/accounts.redis-handler'; +import { PubSubListenerModule } from 'src/pubsub/pub.sub.listener.module'; @Module({ providers: [ @@ -56,6 +57,7 @@ import { AccountsRedisHandler } from '../account-stats/loaders/accounts.redis-ha HoldersResolver, ], imports: [ + PubSubListenerModule, ConfigModule.forRoot({ isGlobal: true, }), diff --git a/src/modules/analytics/collections-analytics.service.ts b/src/modules/analytics/collections-analytics.service.ts index fbdc9e105..4f1a71a8b 100644 --- a/src/modules/analytics/collections-analytics.service.ts +++ b/src/modules/analytics/collections-analytics.service.ts @@ -80,7 +80,11 @@ export class CollectionsAnalyticsService { return await this.analyticsGetter.getVolumeDataForTimePeriod(time, series, metric); } - public async getFloorPriceVolumeForTimePeriod(time: string, series: string, metric: string): Promise<AnalyticsAggregateValue[]> { + public async getFloorPriceVolumeForTimePeriod( + time: string, + series: string, + metric: string = 'floorPriceUSD', + ): Promise<AnalyticsAggregateValue[]> { return await this.analyticsGetter.getFloorPriceForTimePeriod(time, series, metric); } diff --git a/src/modules/artists/artists.module.ts b/src/modules/artists/artists.module.ts index fc754e229..0ad0f4f66 100644 --- a/src/modules/artists/artists.module.ts +++ b/src/modules/artists/artists.module.ts @@ -6,10 +6,11 @@ import { MarketplacesCachingService } from '../marketplaces/marketplaces-caching import { ArtistsService } from './artists.service'; import { CollectionsModuleGraph } from '../nftCollections/collections.module'; import { CommonModule } from 'src/common.module'; +import { PubSubListenerModule } from 'src/pubsub/pub.sub.listener.module'; @Module({ providers: [ArtistsService, ArtistsResolver, MarketplacesService, MarketplacesCachingService], - imports: [MxCommunicationModule, CollectionsModuleGraph, CommonModule], + imports: [MxCommunicationModule, CollectionsModuleGraph, CommonModule, PubSubListenerModule], exports: [ArtistsService], }) export class ArtistsModuleGraph {} diff --git a/src/modules/asset-history/asset-history.module.ts b/src/modules/asset-history/asset-history.module.ts index fb12f157e..b456c6779 100644 --- a/src/modules/asset-history/asset-history.module.ts +++ b/src/modules/asset-history/asset-history.module.ts @@ -19,7 +19,6 @@ import { AssetsHistoryElasticService } from './assets-history-elastic.service'; AssetHistoryAccountResolver, AccountsProvider, AccountsRedisHandler, - CommonModule, AssetsHistoryNftEventService, AssetsHistoryAuctionService, AssetsHistoryExternalAuctionService, diff --git a/src/modules/assets/assets-getter.service.ts b/src/modules/assets/assets-getter.service.ts index 776b7dbb7..6469b4da4 100644 --- a/src/modules/assets/assets-getter.service.ts +++ b/src/modules/assets/assets-getter.service.ts @@ -23,6 +23,7 @@ import { FeaturedService } from '../featured/featured.service'; import { FeaturedCollectionsFilter } from '../featured/Featured-Collections.Filter'; import { FeaturedCollectionTypeEnum } from '../featured/FeatureCollectionType.enum'; import { constants } from 'src/config'; +import { ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class AssetsGetterService { @@ -200,7 +201,7 @@ export class AssetsGetterService { if (artistCollections) { const batch = artistCollections?.collections?.slice(0, 100); let elasticQuery = this.getCollectionsElasticQuery(batch, offset, size); - let elasticNfts = await this.elasticService.getList('tokens', 'identifier', elasticQuery); + let elasticNfts = await this.elasticService.getList(ELASTIC_TOKENS_INDEX, 'identifier', elasticQuery); const returnAssets = await this.mapElasticNfts(elasticNfts); return new CollectionType({ diff --git a/src/modules/assets/assets.module.ts b/src/modules/assets/assets.module.ts index 0b879ae73..05db9afdd 100644 --- a/src/modules/assets/assets.module.ts +++ b/src/modules/assets/assets.module.ts @@ -43,7 +43,6 @@ import { InternalMarketplaceProvider } from './loaders/internal-marketplace.load import { InternalMarketplaceRedisHandler } from './loaders/internal-marketplace.redis-handler'; import { LowestAuctionForMarketplaceRedisHandler } from '../auctions/loaders/lowest-auctions-for-marketplace.redis-handler'; import { LowestAuctionForMarketplaceProvider } from '../auctions/loaders/lowest-auctions-for-marketplace.loader'; -import { PersistenceModule } from 'src/common/persistence/persistence.module'; import { ArtistAddressProvider } from '../artists/artists.loader'; import { ArtistAddressRedisHandler } from '../artists/artists.redis-handler'; import { SmartContractArtistsService } from '../artists/smart-contract-artist.service'; @@ -114,7 +113,6 @@ import { IsTicketRedisHandler } from './loaders/asset-is-ticket.redis-handler'; forwardRef(() => FeaturedModuleGraph), forwardRef(() => AuthModule), IpfsModule, - PersistenceModule, ], exports: [ AssetsTransactionService, diff --git a/src/modules/blacklist/blacklisted-collections.module.ts b/src/modules/blacklist/blacklisted-collections.module.ts index ca44ceb4f..258faf095 100644 --- a/src/modules/blacklist/blacklisted-collections.module.ts +++ b/src/modules/blacklist/blacklisted-collections.module.ts @@ -1,13 +1,12 @@ import { Module } from '@nestjs/common'; -import { CommonModule } from 'src/common.module'; -import { PersistenceModule } from 'src/common/persistence/persistence.module'; import { CacheEventsPublisherModule } from '../rabbitmq/cache-invalidation/cache-invalidation-publisher/change-events-publisher.module'; import { BlacklistedCollectionsCachingService } from './blacklisted-collections.caching.service'; import { BlacklistedCollectionsResolver } from './blacklisted-collections.resolver'; import { BlacklistedCollectionsService } from './blacklisted-collections.service'; +import { PersistenceModule } from 'src/common/persistence/persistence.module'; @Module({ - imports: [CommonModule, PersistenceModule, CacheEventsPublisherModule], + imports: [CacheEventsPublisherModule, PersistenceModule], providers: [BlacklistedCollectionsService, BlacklistedCollectionsCachingService, BlacklistedCollectionsResolver], exports: [BlacklistedCollectionsService], }) diff --git a/src/modules/collection-stats/collections-stats.service.ts b/src/modules/collection-stats/collections-stats.service.ts index bc18d35ea..ee120ee1b 100644 --- a/src/modules/collection-stats/collections-stats.service.ts +++ b/src/modules/collection-stats/collections-stats.service.ts @@ -57,7 +57,10 @@ export class CollectionsStatsService { } private getCollectionNftsCacheKey(key: string, marketplaceKey: string = undefined) { - return generateCacheKeyFromParams(CacheInfo.CollectionAssetsCount.key, key, marketplaceKey); + if (marketplaceKey) { + return generateCacheKeyFromParams(CacheInfo.CollectionAssetsCount.key, key, marketplaceKey); + } + return generateCacheKeyFromParams(CacheInfo.CollectionAssetsCount.key, key); } private getQueryForCollection(identifier: string): string { diff --git a/src/modules/collection-stats/tests/collections-stats.service.spec.ts b/src/modules/collection-stats/tests/collections-stats.service.spec.ts index 4d8e95cf9..dc3dedcd2 100644 --- a/src/modules/collection-stats/tests/collections-stats.service.spec.ts +++ b/src/modules/collection-stats/tests/collections-stats.service.spec.ts @@ -69,7 +69,7 @@ describe('CollectionsStatsService', () => { const stub = jest.spyOn(redisCacheService, 'getOrSet').mockImplementation(() => Promise.resolve({ key: 'identifier', value: '4' })); const results = await service.getItemsCount('identifier'); - const expectedCacheKey = `${CacheInfo.CollectionAssetsCount.key}_identifier_undefined`; + const expectedCacheKey = `${CacheInfo.CollectionAssetsCount.key}_identifier`; expect(stub).toHaveBeenCalled(); expect(stub).toBeCalledWith(expectedCacheKey, expect.anything(), CacheInfo.CollectionAssetsCount.ttl); expect(results).toMatchObject({ key: 'identifier', value: '4' }); diff --git a/src/modules/featured/featured.module.ts b/src/modules/featured/featured.module.ts index 4736fecda..0236a2abf 100644 --- a/src/modules/featured/featured.module.ts +++ b/src/modules/featured/featured.module.ts @@ -1,6 +1,4 @@ import { Module } from '@nestjs/common'; -import { CommonModule } from 'src/common.module'; -import { PersistenceModule } from 'src/common/persistence/persistence.module'; import { CacheEventsPublisherModule } from '../rabbitmq/cache-invalidation/cache-invalidation-publisher/change-events-publisher.module'; import { FeaturedCollectionsCachingService } from './featured-caching.service'; import { FeaturedCollectionsResolver } from './featured-collections.resolver'; @@ -8,7 +6,7 @@ import { FeaturedNftsResolver } from './featured-nfts.resolver'; import { FeaturedService } from './featured.service'; @Module({ - imports: [CommonModule, PersistenceModule, CacheEventsPublisherModule], + imports: [CacheEventsPublisherModule], providers: [FeaturedService, FeaturedNftsResolver, FeaturedCollectionsResolver, FeaturedCollectionsCachingService], exports: [FeaturedService], }) diff --git a/src/modules/marketplaces/marketplaces-caching.service.ts b/src/modules/marketplaces/marketplaces-caching.service.ts index 4e938e919..fd364c7a8 100644 --- a/src/modules/marketplaces/marketplaces-caching.service.ts +++ b/src/modules/marketplaces/marketplaces-caching.service.ts @@ -1,14 +1,15 @@ -import { Injectable } from '@nestjs/common'; +import { Inject, Injectable } from '@nestjs/common'; import '../../utils/extensions'; import { Constants } from '@multiversx/sdk-nestjs-common'; -import { RedisCacheService } from '@multiversx/sdk-nestjs-cache'; +import { CacheService, RedisCacheService } from '@multiversx/sdk-nestjs-cache'; import { CollectionType } from '../assets/models/Collection.type'; import { CacheInfo } from 'src/common/services/caching/entities/cache.info'; import { Marketplace } from './models'; +import { ClientProxy } from '@nestjs/microservices'; @Injectable() export class MarketplacesCachingService { - constructor(private cacheService: RedisCacheService) {} + constructor(private cacheService: CacheService, @Inject('PUBSUB_SERVICE') private clientProxy: ClientProxy) {} public async getAllMarketplaces(getMarketplaces: () => any): Promise<CollectionType<Marketplace>> { return await this.cacheService.getOrSet(CacheInfo.AllMarketplaces.key, () => getMarketplaces(), Constants.oneHour()); @@ -49,17 +50,31 @@ export class MarketplacesCachingService { private async invalidateMarketplacesCache() { await this.cacheService.delete(CacheInfo.AllMarketplaces.key); + await this.refreshCacheKey(CacheInfo.AllMarketplaces.key, CacheInfo.AllMarketplaces.ttl); } private async invalidateCollectionsByMarketplace(key: string) { await this.cacheService.delete(`${CacheInfo.CollectionsByMarketplace.key}_${key}`); + await this.refreshCacheKey(`${CacheInfo.CollectionsByMarketplace.key}_${key}`, CacheInfo.CollectionsByMarketplace.ttl); } private async invalidateMarketplaceByCollection(key: string) { await this.cacheService.delete(`${CacheInfo.MarketplaceCollection.key}_${key}`); + await this.refreshCacheKey(`${CacheInfo.MarketplaceCollection.key}_${key}`, CacheInfo.MarketplaceCollection.ttl); } private async invalidateMarketplaceByAddressAndCollection(key: string) { await this.cacheService.delete(`${CacheInfo.MarketplaceAddressCollection.key}_${key}`); + await this.refreshCacheKey(`${CacheInfo.MarketplaceAddressCollection.key}_${key}`, CacheInfo.MarketplaceAddressCollection.ttl); + } + + private async refreshCacheKey(key: string, ttl: number) { + this.clientProxy.emit<{ + key: string; + ttl: number; + }>('refreshCacheKey', { + key, + ttl, + }); } } diff --git a/src/modules/marketplaces/marketplaces-mutations.resolver.ts b/src/modules/marketplaces/marketplaces-mutations.resolver.ts index 287051579..7b9440aac 100644 --- a/src/modules/marketplaces/marketplaces-mutations.resolver.ts +++ b/src/modules/marketplaces/marketplaces-mutations.resolver.ts @@ -2,8 +2,8 @@ import { Resolver, Args, Mutation } from '@nestjs/graphql'; import { BaseResolver } from '../common/base.resolver'; import { Marketplace } from './models'; import { MarketplacesService } from './marketplaces.service'; -import { WhitelistCollectionArgs } from './models/WhitelistCollectionArgs'; -import { WhitelistCollectionRequest } from './models/requests/WhitelistCollectionOnMarketplaceRequest'; +import { RemoveWhitelistCollectionArgs, WhitelistCollectionArgs } from './models/WhitelistCollectionArgs'; +import { RemoveWhitelistCollectionRequest, WhitelistCollectionRequest } from './models/requests/WhitelistCollectionOnMarketplaceRequest'; import { WhitelistMarketplaceArgs } from './models/WhitelistMarketplaceArgs'; import { WhitelistMarketplaceRequest } from './models/requests/WhitelistMarketplaceRequest'; import { UseGuards } from '@nestjs/common'; @@ -24,6 +24,12 @@ export class MarketplacesMutationsResolver extends BaseResolver(Marketplace) { return this.marketplaceService.whitelistCollectionOnMarketplace(WhitelistCollectionRequest.fromArgs(input)); } + @Mutation(() => Boolean) + @UseGuards(JwtOrNativeAuthGuard, GqlAdminAuthGuard) + async removeWhitelistCollection(@Args('input') input: RemoveWhitelistCollectionArgs): Promise<Boolean> { + return this.marketplaceService.removeWhitelistCollection(RemoveWhitelistCollectionRequest.fromArgs(input)); + } + @Mutation(() => Boolean) @UseGuards(JwtOrNativeAuthGuard, GqlAdminAuthGuard) async updateMarketplace(@Args('input') input: UpdateMarketplaceArgs): Promise<Boolean> { diff --git a/src/modules/marketplaces/marketplaces.service.ts b/src/modules/marketplaces/marketplaces.service.ts index 763b5a7cd..df1f74f71 100644 --- a/src/modules/marketplaces/marketplaces.service.ts +++ b/src/modules/marketplaces/marketplaces.service.ts @@ -7,7 +7,7 @@ import { MarketplaceCollectionEntity, MarketplaceEntity } from 'src/db/marketpla import { MarketplaceTypeEnum } from './models/MarketplaceType.enum'; import { MarketplaceFilters } from './models/Marketplace.Filter'; import { PersistenceService } from 'src/common/persistence/persistence.service'; -import { WhitelistCollectionRequest } from './models/requests/WhitelistCollectionOnMarketplaceRequest'; +import { RemoveWhitelistCollectionRequest, WhitelistCollectionRequest } from './models/requests/WhitelistCollectionOnMarketplaceRequest'; import { BadRequestError } from 'src/common/models/errors/bad-request-error'; import { WhitelistMarketplaceRequest } from './models/requests/WhitelistMarketplaceRequest'; import { UpdateMarketplaceRequest } from './models/requests/UpdateMarketplaceRequest'; @@ -180,7 +180,7 @@ export class MarketplacesService { if (savedCollection) { this.triggerCacheInvalidation(request.marketplaceKey, request.collection, marketplace.address); } - return savedCollection ? true : false; + return savedCollection; } catch (error) { this.logger.error('An error has occured while whitelisting collection', { path: this.whitelistCollectionOnMarketplace.name, @@ -192,6 +192,31 @@ export class MarketplacesService { } } + async removeWhitelistCollection(request: RemoveWhitelistCollectionRequest): Promise<Boolean> { + const collection = await this.persistenceService.getCollectionByKeyAndCollection(request.collection, request.marketplaceKey); + const marketplace = await this.persistenceService.getMarketplaceByKey(request.marketplaceKey); + + if (!collection || !marketplace) { + throw new BadRequestError('Marketplace not available for this key, choose another key if this is not your marketplace'); + } + try { + const removedCollection = await this.persistenceService.deleteMarketplaceCollection(collection); + + if (removedCollection) { + this.triggerCacheInvalidation(request.marketplaceKey, request.collection, marketplace.address); + } + return removedCollection ? true : false; + } catch (error) { + this.logger.error('An error has occured while remove whitelist for collection', { + path: this.whitelistCollectionOnMarketplace.name, + collection: request?.collection, + marketplace: request?.marketplaceKey, + exception: error, + }); + return false; + } + } + async whitelistMarketplace(request: WhitelistMarketplaceRequest): Promise<Boolean> { const marketplace = await this.persistenceService.getMarketplaceByKey(request.marketplaceKey); if (marketplace) { diff --git a/src/modules/marketplaces/models/WhitelistCollectionArgs.ts b/src/modules/marketplaces/models/WhitelistCollectionArgs.ts index 33a042071..ff3d13f33 100644 --- a/src/modules/marketplaces/models/WhitelistCollectionArgs.ts +++ b/src/modules/marketplaces/models/WhitelistCollectionArgs.ts @@ -14,3 +14,16 @@ export class WhitelistCollectionArgs { @Field() marketplaceKey: string; } + +@InputType() +export class RemoveWhitelistCollectionArgs { + @Matches(RegExp(COLLECTION_IDENTIFIER_RGX), { + message: COLLECTION_IDENTIFIER_ERROR, + }) + @Field() + collection: string; + + @MaxLength(62) + @Field() + marketplaceKey: string; +} diff --git a/src/modules/marketplaces/models/requests/WhitelistCollectionOnMarketplaceRequest.ts b/src/modules/marketplaces/models/requests/WhitelistCollectionOnMarketplaceRequest.ts index 9f726cb2c..51c2f51cb 100644 --- a/src/modules/marketplaces/models/requests/WhitelistCollectionOnMarketplaceRequest.ts +++ b/src/modules/marketplaces/models/requests/WhitelistCollectionOnMarketplaceRequest.ts @@ -1,4 +1,4 @@ -import { WhitelistCollectionArgs } from '../WhitelistCollectionArgs'; +import { RemoveWhitelistCollectionArgs, WhitelistCollectionArgs } from '../WhitelistCollectionArgs'; export class WhitelistCollectionRequest { collection: string; @@ -14,3 +14,18 @@ export class WhitelistCollectionRequest { }); } } + +export class RemoveWhitelistCollectionRequest { + collection: string; + marketplaceKey: string; + constructor(init?: Partial<RemoveWhitelistCollectionRequest>) { + Object.assign(this, init); + } + + static fromArgs(args: RemoveWhitelistCollectionArgs) { + return new RemoveWhitelistCollectionRequest({ + collection: args.collection, + marketplaceKey: args.marketplaceKey, + }); + } +} diff --git a/src/modules/marketplaces/tests/marketplaces.service.spec.ts b/src/modules/marketplaces/tests/marketplaces.service.spec.ts index 311495c0c..0d5b54dbd 100644 --- a/src/modules/marketplaces/tests/marketplaces.service.spec.ts +++ b/src/modules/marketplaces/tests/marketplaces.service.spec.ts @@ -7,7 +7,7 @@ import { MarketplaceCollectionEntity, MarketplaceEntity } from 'src/db/marketpla import { MarketplaceTypeEnum } from '../models/MarketplaceType.enum'; import { MarketplaceFilters } from '../models/Marketplace.Filter'; import { Marketplace } from '../models'; -import { WhitelistCollectionRequest } from '../models/requests/WhitelistCollectionOnMarketplaceRequest'; +import { RemoveWhitelistCollectionRequest, WhitelistCollectionRequest } from '../models/requests/WhitelistCollectionOnMarketplaceRequest'; import { BadRequestError } from 'src/common/models/errors/bad-request-error'; import { Logger } from '@nestjs/common'; import { WhitelistMarketplaceRequest } from '../models/requests/WhitelistMarketplaceRequest'; @@ -738,6 +738,64 @@ describe('Marketplaces Service', () => { }); }); + describe('removeWhitelistCollection', () => { + it('when marketplace not found throws error', async () => { + const persistenceService = module.get<PersistenceService>(PersistenceService); + + persistenceService.getMarketplaceByKey = jest.fn().mockReturnValueOnce(null); + persistenceService.getCollectionByKeyAndCollection = jest.fn().mockReturnValueOnce(new MarketplaceCollectionEntity()); + + await expect(service.removeWhitelistCollection(new RemoveWhitelistCollectionRequest())).rejects.toThrowError(BadRequestError); + }); + + it('when collection not found throws error', async () => { + const persistenceService = module.get<PersistenceService>(PersistenceService); + + persistenceService.getMarketplaceByKey = jest.fn().mockReturnValueOnce(inputMarketplace[0]); + persistenceService.getCollectionByKeyAndCollection = jest.fn().mockReturnValueOnce(null); + + await expect(service.removeWhitelistCollection(new RemoveWhitelistCollectionRequest())).rejects.toThrowError(BadRequestError); + }); + + it('when marketplace exists and delete fails returns false', async () => { + const persistenceService = module.get<PersistenceService>(PersistenceService); + + persistenceService.getMarketplaceByKey = jest.fn().mockReturnValueOnce(inputMarketplace[0]); + persistenceService.getCollectionByKeyAndCollection = jest.fn().mockReturnValueOnce(new MarketplaceCollectionEntity()); + + persistenceService.deleteMarketplaceCollection = jest.fn(() => { + throw new Error(); + }); + + const expectedResult = await service.removeWhitelistCollection( + new RemoveWhitelistCollectionRequest({ marketplaceKey: 'xoxno', collection: 'identifier' }), + ); + + expect(expectedResult).toBeFalsy(); + }); + + it('when marketplace exists and save is succesfull returns true', async () => { + const persistenceService = module.get<PersistenceService>(PersistenceService); + const eventPublisher = module.get<CacheEventsPublisherService>(CacheEventsPublisherService); + + eventPublisher.publish = jest.fn(); + persistenceService.getMarketplaceByKey = jest.fn().mockReturnValueOnce(inputMarketplace[0]); + persistenceService.getCollectionByKeyAndCollection = jest.fn().mockReturnValueOnce(new MarketplaceCollectionEntity()); + + persistenceService.deleteMarketplaceCollection = jest.fn().mockReturnValueOnce( + new MarketplaceCollectionEntity({ + collectionIdentifier: 'collection', + marketplaces: [inputMarketplace[0]], + }), + ); + const expectedResult = await service.removeWhitelistCollection( + new RemoveWhitelistCollectionRequest({ marketplaceKey: 'xoxno', collection: 'identifier' }), + ); + + expect(expectedResult).toBeTruthy(); + }); + }); + describe('whitelistMarketplace', () => { it('when marketplace key exists throws error', async () => { const persistenceService = module.get<PersistenceService>(PersistenceService); diff --git a/src/modules/nft-rarity/nft-rarity.elastic.service.ts b/src/modules/nft-rarity/nft-rarity.elastic.service.ts index 9111aacee..d4f6550a6 100644 --- a/src/modules/nft-rarity/nft-rarity.elastic.service.ts +++ b/src/modules/nft-rarity/nft-rarity.elastic.service.ts @@ -8,6 +8,20 @@ import { constants } from 'src/config'; import { CustomRank } from './models/custom-rank.model'; import { CollectionFromElastic } from './models/collection-from-elastic.model'; import { Rarity } from '../assets/models/Rarity'; +import { + ELASTIC_NFT_HASRARITY, + ELASTIC_NFT_RANK_CUSTOM, + ELASTIC_NFT_RANK_HASH, + ELASTIC_NFT_RANK_JACCARD, + ELASTIC_NFT_RANK_OPENRARITY, + ELASTIC_NFT_RANK_STATISTICAL, + ELASTIC_NFT_RANK_TRAIT, + ELASTIC_NFT_SCORE_JACCARD, + ELASTIC_NFT_SCORE_OPENRARITY, + ELASTIC_NFT_SCORE_STATISTICAL, + ELASTIC_NFT_SCORE_TRAIT, + ELASTIC_TOKENS_INDEX, +} from 'src/utils/constants'; @Injectable() export class NftRarityElasticService { @@ -20,7 +34,7 @@ export class NftRarityElasticService { try { const updateBody = this.elasticService.buildUpdateBody<boolean>('nft_hasRarities', hasRarities); - await this.elasticService.setCustomValue('tokens', collection, updateBody, '?retry_on_conflict=2&timeout=1m'); + await this.elasticService.setCustomValue(ELASTIC_TOKENS_INDEX, collection, updateBody, '?retry_on_conflict=2&timeout=1m'); } catch (error) { this.logger.error('Error when setting collection rarity flag', { path: 'NftRarityService.updateRarities', @@ -49,7 +63,11 @@ export class NftRarityElasticService { } try { - await this.elasticService.bulkRequest('tokens', this.buildNftRaritiesBulkUpdate(outdatedNfts, hasRarities), '?timeout=1m'); + await this.elasticService.bulkRequest( + ELASTIC_TOKENS_INDEX, + this.buildNftRaritiesBulkUpdate(outdatedNfts, hasRarities), + '?timeout=1m', + ); } catch (error) { this.logger.error('Error when bulk updating nft rarities Elastic', { path: 'NftRarityService.setNftRaritiesInElastic', @@ -73,7 +91,11 @@ export class NftRarityElasticService { if (customRanks.length > 0) { try { - await this.elasticService.bulkRequest('tokens', this.buildNftCustomRanksBulkUpdate(collection, outdatedRanks), '?timeout=1m'); + await this.elasticService.bulkRequest( + ELASTIC_TOKENS_INDEX, + this.buildNftCustomRanksBulkUpdate(collection, outdatedRanks), + '?timeout=1m', + ); } catch (error) { this.logger.error('Error when bulk updating nft custom ranks inElastic', { path: 'NftRarityService.setNftCustomRanksInElastic', @@ -91,13 +113,13 @@ export class NftRarityElasticService { .withMustExistCondition('token') .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withMustCondition(QueryType.Match('token', collectionTicker, QueryOperator.AND)) - .withFields(['nft_custom_ranks_hash']) + .withFields([ELASTIC_NFT_RANK_HASH]) .withPagination({ from: 0, size: 1, }); - await this.elasticService.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { hash = items[0].nft_custom_ranks_hash; return undefined; }); @@ -126,7 +148,7 @@ export class NftRarityElasticService { size: 1, }); - await this.elasticService.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { hasRarities = items.length === 1 ? items[0].nft_hasRarities || false : undefined; return undefined; }); @@ -156,16 +178,16 @@ export class NftRarityElasticService { // ) .withFields([ 'nonce', - 'nft_hasRarity', - 'nft_rank_custom', - 'nft_score_openRarity', - 'nft_rank_openRarity', - 'nft_score_jaccardDistances', - 'nft_rank_jaccardDistances', - 'nft_score_trait', - 'nft_rank_trait', - 'nft_score_statistical', - 'nft_rank_statistical', + ELASTIC_NFT_HASRARITY, + ELASTIC_NFT_RANK_CUSTOM, + ELASTIC_NFT_SCORE_OPENRARITY, + ELASTIC_NFT_RANK_OPENRARITY, + ELASTIC_NFT_SCORE_JACCARD, + ELASTIC_NFT_RANK_JACCARD, + ELASTIC_NFT_SCORE_TRAIT, + ELASTIC_NFT_RANK_TRAIT, + ELASTIC_NFT_SCORE_STATISTICAL, + ELASTIC_NFT_RANK_STATISTICAL, ]) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withSort([{ name: 'nonce', order: ElasticSortOrder.descending }]) @@ -174,7 +196,7 @@ export class NftRarityElasticService { size: constants.getNftsFromElasticBatchSize, }); - await this.elasticService.getScrollableList('tokens', 'identifier', query, async (newNfts) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (newNfts) => { nfts = nfts.concat(NftRarityData.fromElasticNfts(newNfts)); return undefined; }); @@ -197,46 +219,46 @@ export class NftRarityElasticService { async () => { try { await this.elasticService.putMappings( - 'tokens', + ELASTIC_TOKENS_INDEX, this.elasticService.buildPutMultipleMappingsBody([ { - key: 'nft_rank_custom', + key: ELASTIC_NFT_RANK_CUSTOM, value: 'long', }, { - key: 'nft_custom_ranks_hash', + key: ELASTIC_NFT_RANK_HASH, value: 'text', }, { - key: 'nft_score_openRarity', + key: ELASTIC_NFT_SCORE_OPENRARITY, value: 'float', }, { - key: 'nft_rank_openRarity', + key: ELASTIC_NFT_RANK_OPENRARITY, value: 'long', }, { - key: 'nft_score_jaccardDistances', + key: ELASTIC_NFT_SCORE_JACCARD, value: 'float', }, { - key: 'nft_rank_jaccardDistances', + key: ELASTIC_NFT_RANK_JACCARD, value: 'long', }, { - key: 'nft_score_trait', + key: ELASTIC_NFT_SCORE_TRAIT, value: 'float', }, { - key: 'nft_rank_trait', + key: ELASTIC_NFT_RANK_TRAIT, value: 'long', }, { - key: 'nft_score_statistical', + key: ELASTIC_NFT_SCORE_STATISTICAL, value: 'float', }, { - key: 'nft_rank_statistical', + key: ELASTIC_NFT_RANK_STATISTICAL, value: 'long', }, ]), @@ -255,7 +277,7 @@ export class NftRarityElasticService { async getAllCollectionsFromElastic(): Promise<string[]> { const query = this.getAllCollectionsFromElasticQuery(); let collections: string[] = []; - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { collections = collections.concat([...new Set(items.map((i) => i.token))]); }); return collections; @@ -264,7 +286,7 @@ export class NftRarityElasticService { async getAllCollectionsWithRarityFlagsFromElastic(): Promise<CollectionFromElastic[]> { const query = this.getAllCollectionsWithRarityFlagsFromElasticQuery(); let collections: CollectionFromElastic[] = []; - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { const collectionsWithRarityFlags = items.map((collection) => CollectionFromElastic.fromElastic(collection)); collections = collections.concat([...new Set(collectionsWithRarityFlags)]); }); @@ -276,33 +298,66 @@ export class NftRarityElasticService { nfts.forEach((r) => { if (hasRarities) { if (r.rarities.customRank) { - updates.push(this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_rank_custom', r.rarities.customRank)); + updates.push( + this.elasticService.buildBulkUpdate<number>(ELASTIC_TOKENS_INDEX, r.identifier, ELASTIC_NFT_RANK_CUSTOM, r.rarities.customRank), + ); } updates.push( - this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_score_openRarity', r.rarities.openRarityScore), + this.elasticService.buildBulkUpdate<number>( + ELASTIC_TOKENS_INDEX, + r.identifier, + ELASTIC_NFT_SCORE_OPENRARITY, + r.rarities.openRarityScore, + ), + ); + updates.push( + this.elasticService.buildBulkUpdate<number>( + ELASTIC_TOKENS_INDEX, + r.identifier, + ELASTIC_NFT_RANK_OPENRARITY, + r.rarities.openRarityRank, + ), ); - updates.push(this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_rank_openRarity', r.rarities.openRarityRank)); updates.push( this.elasticService.buildBulkUpdate<number>( - 'tokens', + ELASTIC_TOKENS_INDEX, r.identifier, - 'nft_score_jaccardDistances', + ELASTIC_NFT_SCORE_JACCARD, r.rarities.jaccardDistancesScore, ), ); updates.push( - this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_rank_jaccardDistances', r.rarities.jaccardDistancesRank), + this.elasticService.buildBulkUpdate<number>( + ELASTIC_TOKENS_INDEX, + r.identifier, + ELASTIC_NFT_RANK_JACCARD, + r.rarities.jaccardDistancesRank, + ), + ); + updates.push( + this.elasticService.buildBulkUpdate<number>(ELASTIC_TOKENS_INDEX, r.identifier, ELASTIC_NFT_SCORE_TRAIT, r.rarities.traitScore), ); - updates.push(this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_score_trait', r.rarities.traitScore)); - updates.push(this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_rank_trait', r.rarities.traitRank)); updates.push( - this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_score_statistical', r.rarities.statisticalScore), + this.elasticService.buildBulkUpdate<number>(ELASTIC_TOKENS_INDEX, r.identifier, ELASTIC_NFT_RANK_TRAIT, r.rarities.traitRank), ); updates.push( - this.elasticService.buildBulkUpdate<number>('tokens', r.identifier, 'nft_rank_statistical', r.rarities.statisticalRank), + this.elasticService.buildBulkUpdate<number>( + ELASTIC_TOKENS_INDEX, + r.identifier, + ELASTIC_NFT_SCORE_STATISTICAL, + r.rarities.statisticalScore, + ), + ); + updates.push( + this.elasticService.buildBulkUpdate<number>( + ELASTIC_TOKENS_INDEX, + r.identifier, + ELASTIC_NFT_RANK_STATISTICAL, + r.rarities.statisticalRank, + ), ); } - updates.push(this.elasticService.buildBulkUpdate<boolean>('tokens', r.identifier, 'nft_hasRarity', hasRarities)); + updates.push(this.elasticService.buildBulkUpdate<boolean>(ELASTIC_TOKENS_INDEX, r.identifier, ELASTIC_NFT_HASRARITY, hasRarities)); }); return updates; } @@ -310,10 +365,15 @@ export class NftRarityElasticService { buildNftCustomRanksBulkUpdate(collection, customRanks: CustomRank[]): string[] { let updates: string[] = []; customRanks.forEach((cr) => { - updates.push(this.elasticService.buildBulkUpdate<number>('tokens', cr.identifier, 'nft_rank_custom', cr.rank)); + updates.push(this.elasticService.buildBulkUpdate<number>(ELASTIC_TOKENS_INDEX, cr.identifier, ELASTIC_NFT_RANK_CUSTOM, cr.rank)); }); updates.push( - this.elasticService.buildBulkUpdate<string>('tokens', collection, 'nft_custom_ranks_hash', CustomRank.generateHash(customRanks)), + this.elasticService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + collection, + ELASTIC_NFT_RANK_HASH, + CustomRank.generateHash(customRanks), + ), ); return updates; } @@ -345,7 +405,7 @@ export class NftRarityElasticService { getAllNftsWhereRarityNotComputedFromElasticQuery(): ElasticQuery { return ElasticQuery.create() .withMustExistCondition('nonce') - .withMustNotCondition(QueryType.Exists('nft_hasRarity')) + .withMustNotCondition(QueryType.Exists(ELASTIC_NFT_HASRARITY)) .withMustCondition(QueryType.Nested('data', { 'data.nonEmptyURIs': true })) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withFields(['token']) diff --git a/src/modules/nft-traits/nft-traits.elastic.queries.ts b/src/modules/nft-traits/nft-traits.elastic.queries.ts index 298b13951..f2f1f9a3b 100644 --- a/src/modules/nft-traits/nft-traits.elastic.queries.ts +++ b/src/modules/nft-traits/nft-traits.elastic.queries.ts @@ -8,12 +8,13 @@ import { } from '@multiversx/sdk-nestjs-elastic'; import { constants } from 'src/config'; import { NftTypeEnum } from '../assets/models'; +import { ELASTIC_NFT_HASTRAITSUMMARY, ELASTIC_NFT_TRAITS } from 'src/utils/constants'; export const getAllEncodedNftValuesFromElasticQuery = (collection: string, startNonce?: number, endNonce?: number): ElasticQuery => { let query = ElasticQuery.create() .withMustExistCondition('nonce') .withMustCondition(QueryType.Match('token', collection, QueryOperator.AND)) - .withFields(['nft_traitValues', 'nonce']) + .withFields([ELASTIC_NFT_TRAITS, 'nonce']) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withPagination({ from: 0, @@ -28,7 +29,7 @@ export const getAllEncodedNftValuesFromElasticQuery = (collection: string, start export const getAllEncodedNftValuesFromElasticBeforeTimestampQuery = (beforeTimestamp?: number): ElasticQuery => { let query = ElasticQuery.create() .withMustExistCondition('nonce') - .withFields(['nft_traitValues', 'timestamp', 'identifier']) + .withFields([ELASTIC_NFT_TRAITS, 'timestamp', 'identifier']) .withRangeFilter('timestamp', new RangeLowerThanOrEqual(beforeTimestamp)) .withSort([{ name: 'timestamp', order: ElasticSortOrder.descending }]) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) @@ -57,7 +58,7 @@ export const getAllCollectionsWithTraitsFlagFromElasticQuery = (): ElasticQuery .withMustExistCondition('token') .withMustNotExistCondition('nonce') .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) - .withFields(['token', 'nft_hasTraitSummary']) + .withFields(['token', ELASTIC_NFT_HASTRAITSUMMARY]) .withPagination({ from: 0, size: constants.getCollectionsFromElasticBatchSize, @@ -68,7 +69,7 @@ export const getNftWithTraitValuesFromElasticQuery = (identifier: string): Elast return ElasticQuery.create() .withMustExistCondition('nonce') .withMustCondition(QueryType.Match('identifier', identifier, QueryOperator.AND)) - .withFields(['nft_traitValues']) + .withFields([ELASTIC_NFT_TRAITS]) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withPagination({ from: 0, @@ -80,7 +81,7 @@ export const getCollectionsWhereTraitsFlagNotSetFromElasticQuery = (maxCollectio return ElasticQuery.create() .withMustExistCondition('token') .withMustNotExistCondition('nonce') - .withMustNotCondition(QueryType.Match('nft_hasTraitSummary', true)) + .withMustNotCondition(QueryType.Match(ELASTIC_NFT_HASTRAITSUMMARY, true)) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withFields(['token']) .withPagination({ @@ -93,7 +94,7 @@ export const getCollectionsWithTraitSummaryFromElasticQuery = (maxCollectionsToV return ElasticQuery.create() .withMustExistCondition('token') .withMustNotExistCondition('nonce') - .withMustCondition(QueryType.Match('nft_hasTraitSummary', true)) + .withMustCondition(QueryType.Match(ELASTIC_NFT_HASTRAITSUMMARY, true)) .withMustMultiShouldCondition([NftTypeEnum.NonFungibleESDT, NftTypeEnum.SemiFungibleESDT], (type) => QueryType.Match('type', type)) .withPagination({ from: 0, diff --git a/src/modules/nft-traits/nft-traits.elastic.service.ts b/src/modules/nft-traits/nft-traits.elastic.service.ts index 5ec4b4b39..2d0c20dca 100644 --- a/src/modules/nft-traits/nft-traits.elastic.service.ts +++ b/src/modules/nft-traits/nft-traits.elastic.service.ts @@ -9,6 +9,7 @@ import { getAllEncodedNftValuesFromElasticQuery, getNftWithTraitValuesFromElasticQuery, } from './nft-traits.elastic.queries'; +import { ELASTIC_NFT_HASTRAITSUMMARY, ELASTIC_NFT_TRAITS, ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class NftTraitsElasticService { @@ -17,7 +18,7 @@ export class NftTraitsElasticService { async setNftsTraitsInElastic(nfts: NftTraits[]): Promise<void> { if (nfts.length > 0) { try { - await this.elasticService.bulkRequest('tokens', this.buildNftTraitsBulkUpdate(nfts), '?timeout=1m'); + await this.elasticService.bulkRequest(ELASTIC_TOKENS_INDEX, this.buildNftTraitsBulkUpdate(nfts), '?timeout=1m'); } catch (error) { this.logger.error('Error when bulk updating nft traits in Elastic', { path: `${NftTraitsElasticService.name}.${this.setNftsTraitsInElastic.name}`, @@ -30,7 +31,7 @@ export class NftTraitsElasticService { async setNftsValuesInElastic(encodedNftValues: EncodedNftValues[]): Promise<void> { if (encodedNftValues.length > 0) { try { - await this.elasticService.bulkRequest('tokens', this.buildNftEncodedValuesBulkUpdate(encodedNftValues), '?timeout=1m'); + await this.elasticService.bulkRequest(ELASTIC_TOKENS_INDEX, this.buildNftEncodedValuesBulkUpdate(encodedNftValues), '?timeout=1m'); } catch (error) { this.logger.error('Error when bulk updating nft traits in Elastic', { path: `${NftTraitsElasticService.name}.${this.setNftsValuesInElastic.name}`, @@ -46,7 +47,7 @@ export class NftTraitsElasticService { try { const query = getNftWithTraitValuesFromElasticQuery(identifier); - await this.elasticService.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { nftValues = items[0]?.nft_traitValues ?? []; return undefined; }); @@ -70,7 +71,7 @@ export class NftTraitsElasticService { let maxNonce: number = 0; let minNonce: number = Number.POSITIVE_INFINITY; - await this.elasticService.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { const nonces: number[] = items.map((nft) => Number(nft.nonce)); maxNonce = Math.max(...nonces.concat([maxNonce])); minNonce = Math.min(...nonces.concat([maxNonce])); @@ -100,8 +101,8 @@ export class NftTraitsElasticService { async setCollectionTraitsFlagInElastic(collection: string): Promise<void> { try { let updates: string[] = []; - updates.push(this.elasticService.buildBulkUpdate<boolean>('tokens', collection, 'nft_hasTraitSummary', true)); - await this.elasticService.bulkRequest('tokens', updates, '?timeout=1m'); + updates.push(this.elasticService.buildBulkUpdate<boolean>(ELASTIC_TOKENS_INDEX, collection, ELASTIC_NFT_HASTRAITSUMMARY, true)); + await this.elasticService.bulkRequest(ELASTIC_TOKENS_INDEX, updates, '?timeout=1m'); } catch (error) { this.logger.error('Error when setting collection traits flag', { path: `${NftTraitsElasticService.name}.${this.setCollectionTraitsFlagInElastic.name}`, @@ -117,7 +118,7 @@ export class NftTraitsElasticService { const query = getAllEncodedNftValuesFromElasticBeforeTimestampQuery(beforeTimestamp); await this.elasticService.getScrollableList( - 'tokens', + ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { @@ -137,7 +138,7 @@ export class NftTraitsElasticService { async getAllCollectionsFromElastic(): Promise<string[]> { const query = getAllCollectionsFromElasticQuery(); let collections: string[] = []; - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { collections = collections.concat([...new Set(items.map((i) => i.token))]); }); return collections; @@ -146,7 +147,7 @@ export class NftTraitsElasticService { async getAllCollectionsWithTraitsFlagFromElastic(): Promise<CollectionWithTraitsFlag[]> { const query = getAllCollectionsWithTraitsFlagFromElasticQuery(); let collections: CollectionWithTraitsFlag[] = []; - await this.elasticService.getScrollableList('tokens', 'token', query, async (items) => { + await this.elasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { collections = collections.concat([ ...new Set( items.map( @@ -166,9 +167,9 @@ export class NftTraitsElasticService { let updates: string[] = []; nfts.forEach((nft) => { const payload = this.elasticService.buildBulkUpdate<string[]>( - 'tokens', + ELASTIC_TOKENS_INDEX, nft.identifier, - 'nft_traitValues', + ELASTIC_NFT_TRAITS, nft.traits.map((t) => EncodedNftValues.encode(t)), ); updates.push(payload); @@ -179,7 +180,12 @@ export class NftTraitsElasticService { private buildNftEncodedValuesBulkUpdate(encodedNftValues: EncodedNftValues[]): string[] { let updates: string[] = []; encodedNftValues.forEach((nft) => { - const payload = this.elasticService.buildBulkUpdate<string[]>('tokens', nft.identifier, 'nft_traitValues', nft.encodedValues ?? []); + const payload = this.elasticService.buildBulkUpdate<string[]>( + ELASTIC_TOKENS_INDEX, + nft.identifier, + ELASTIC_NFT_TRAITS, + nft.encodedValues ?? [], + ); updates.push(payload); }); return updates; diff --git a/src/modules/primary-sale-sc/models/BuyTicketArgs.ts b/src/modules/primary-sale-sc/models/BuyTicketArgs.ts deleted file mode 100644 index c3532759f..000000000 --- a/src/modules/primary-sale-sc/models/BuyTicketArgs.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Field, InputType, Int } from '@nestjs/graphql'; -import { Matches } from 'class-validator'; -import { COLLECTION_IDENTIFIER_ERROR, COLLECTION_IDENTIFIER_RGX, NUMERIC_ERROR, NUMERIC_RGX } from 'src/utils/constants'; - -@InputType() -export class BuyTicketsArgs { - @Field(() => String) - @Matches(RegExp(COLLECTION_IDENTIFIER_RGX), { - message: COLLECTION_IDENTIFIER_ERROR, - }) - collectionIdentifier: string; - @Field(() => Int) - ticketsNumber: number; - - @Field(() => String) - @Matches(RegExp(NUMERIC_RGX), { message: `Price ${NUMERIC_ERROR}` }) - price: string; -} diff --git a/src/modules/primary-sale-sc/models/ClaimTicketArgs.ts b/src/modules/primary-sale-sc/models/ClaimTicketArgs.ts deleted file mode 100644 index 36cfb04da..000000000 --- a/src/modules/primary-sale-sc/models/ClaimTicketArgs.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Field, InputType } from '@nestjs/graphql'; -import { Matches, MaxLength, MinLength } from 'class-validator'; -import { COLLECTION_IDENTIFIER_RGX, COLLECTION_IDENTIFIER_ERROR } from 'src/utils/constants'; - -@InputType() -export class ClaimTicketsArgs { - @Field(() => String) - @Matches(RegExp(COLLECTION_IDENTIFIER_RGX), { - message: COLLECTION_IDENTIFIER_ERROR, - }) - collectionIdentifier: string; -} diff --git a/src/modules/primary-sale-sc/models/Primary-sale.Filter.ts b/src/modules/primary-sale-sc/models/Primary-sale.Filter.ts deleted file mode 100644 index cf7d49d5d..000000000 --- a/src/modules/primary-sale-sc/models/Primary-sale.Filter.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Field, InputType } from '@nestjs/graphql'; -import { Matches } from 'class-validator'; -import { COLLECTION_IDENTIFIER_ERROR, COLLECTION_IDENTIFIER_RGX } from 'src/utils/constants'; - -@InputType() -export class PrimarySaleFilter { - @Field(() => String) - @Matches(RegExp(COLLECTION_IDENTIFIER_RGX), { - message: COLLECTION_IDENTIFIER_ERROR, - }) - collectionName: string; - - constructor(init?: Partial<PrimarySaleFilter>) { - Object.assign(this, init); - } -} diff --git a/src/modules/primary-sale-sc/models/PrimarySale.dto.ts b/src/modules/primary-sale-sc/models/PrimarySale.dto.ts deleted file mode 100644 index c8f2b6094..000000000 --- a/src/modules/primary-sale-sc/models/PrimarySale.dto.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Field, ID, Int, ObjectType, registerEnumType } from '@nestjs/graphql'; -import { PrimarySaleTime } from './PrimarySaleTime'; - -@ObjectType() -export class PrimarySale { - @Field(() => ID, { nullable: true }) - collectionIdentifier: string; - @Field(() => PrimarySaleStatusEnum) - status: PrimarySaleStatusEnum; - @Field({ nullable: true }) - frozen: boolean; - @Field(() => String, { nullable: true }) - price: string; - @Field() - paymentToken: string; - @Field(() => Int) - maxUnitsPerWallet: number; - @Field(() => PrimarySaleTime) - saleTime: PrimarySaleTime; - - constructor(init?: Partial<PrimarySale>) { - Object.assign(this, init); - } -} - -export enum PrimarySaleStatusEnum { - ClaimPeriod = 'ClaimPeriod', - SalePeriod = 'SalePeriod', - EndedPeriod = 'EndedPeriod', - BetweenPeriod = 'BetweenPeriod', - NotStarted = 'NotStarted', - NonePeriod = 'NonePeriod', -} -registerEnumType(PrimarySaleStatusEnum, { - name: 'PrimarySaleStatusEnum', -}); diff --git a/src/modules/primary-sale-sc/models/PrimarySaleTime.ts b/src/modules/primary-sale-sc/models/PrimarySaleTime.ts deleted file mode 100644 index 90ccd0955..000000000 --- a/src/modules/primary-sale-sc/models/PrimarySaleTime.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Field, ID, Int, ObjectType } from '@nestjs/graphql'; -import { PrimarySaleTimeAbi } from './PrimarySaleTimestamp.abi'; - -@ObjectType() -export class PrimarySaleTime { - @Field(() => Int) - startSale: number; - @Field(() => Int) - endSale: number; - @Field(() => Int, { nullable: true }) - startClaim: number; - @Field(() => Int, { nullable: true }) - endClaim: number; - - constructor(init?: Partial<PrimarySaleTime>) { - Object.assign(this, init); - } - - static fromAbi(abi: PrimarySaleTimeAbi): PrimarySaleTime | undefined { - return abi - ? new PrimarySaleTime({ - startSale: parseInt(abi.start_sale.valueOf().toString()), - endSale: parseInt(abi.end_sale.valueOf().toString()), - startClaim: parseInt(abi.start_claim.valueOf().toString()), - endClaim: parseInt(abi.end_claim.valueOf().toString()), - }) - : undefined; - } -} diff --git a/src/modules/primary-sale-sc/models/PrimarySaleTimestamp.abi.ts b/src/modules/primary-sale-sc/models/PrimarySaleTimestamp.abi.ts deleted file mode 100644 index 71ba30dd2..000000000 --- a/src/modules/primary-sale-sc/models/PrimarySaleTimestamp.abi.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { AddressType, BigUIntValue, U32Type, U64Type } from '@multiversx/sdk-core'; - -export interface PrimarySaleTimeAbi { - start_sale: U64Type; - end_sale: U64Type; - start_claim: U64Type; - end_claim: U64Type; -} - -export interface TicketInfoAbi { - buyer: AddressType; - ticket_number: U32Type; - winner_nonce: U64Type; - price: BigUIntValue; -} diff --git a/src/modules/primary-sale-sc/models/TicketInfo.ts b/src/modules/primary-sale-sc/models/TicketInfo.ts deleted file mode 100644 index b02017440..000000000 --- a/src/modules/primary-sale-sc/models/TicketInfo.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Field, Int, ObjectType } from '@nestjs/graphql'; -import { TicketInfoAbi } from './PrimarySaleTimestamp.abi'; - -@ObjectType() -export class TicketInfo { - @Field(() => String) - buyer: string; - @Field(() => Int) - ticketNumber: number; - @Field(() => String) - winningNonce: string; - - constructor(init?: Partial<TicketInfo>) { - Object.assign(this, init); - } - - static fromAbi(abi: TicketInfoAbi): TicketInfo | undefined { - return abi - ? new TicketInfo({ - buyer: abi.buyer.valueOf().toString(), - ticketNumber: parseInt(abi.ticket_number.valueOf().toString()), - winningNonce: abi.winner_nonce.valueOf().toString(), - }) - : undefined; - } -} - -@ObjectType() -export class WhitelistedInfo { - @Field(() => Boolean) - isWhitelisted: boolean; - @Field(() => String, { nullable: true }) - message: string; - - constructor(init?: Partial<TicketInfo>) { - Object.assign(this, init); - } -} diff --git a/src/modules/primary-sale-sc/models/index.ts b/src/modules/primary-sale-sc/models/index.ts deleted file mode 100644 index 12e50930b..000000000 --- a/src/modules/primary-sale-sc/models/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './BuyTicketArgs'; -export * from './ClaimTicketArgs'; diff --git a/src/modules/primary-sale-sc/primary-sale.module.ts b/src/modules/primary-sale-sc/primary-sale.module.ts deleted file mode 100644 index e7851e46f..000000000 --- a/src/modules/primary-sale-sc/primary-sale.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { forwardRef, Module } from '@nestjs/common'; -import { PrimarySaleResolver } from './primary-sale.resolver'; -import { MxCommunicationModule } from 'src/common/services/mx-communication/mx-communication.module'; -import { PrimarySaleService } from './primary-sale.service'; -import { CommonModule } from 'src/common.module'; -import { AuthModule } from '../auth/auth.module'; - -@Module({ - providers: [PrimarySaleService, PrimarySaleResolver], - imports: [forwardRef(() => MxCommunicationModule), forwardRef(() => CommonModule), forwardRef(() => AuthModule)], - exports: [PrimarySaleService], -}) -export class PrimarySaleModuleGraph {} diff --git a/src/modules/primary-sale-sc/primary-sale.resolver.ts b/src/modules/primary-sale-sc/primary-sale.resolver.ts deleted file mode 100644 index 36a256d1a..000000000 --- a/src/modules/primary-sale-sc/primary-sale.resolver.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Resolver, Args, Mutation, Query, ResolveField, Parent, Int } from '@nestjs/graphql'; -import { BaseResolver } from '../common/base.resolver'; -import { BuyTicketsArgs, ClaimTicketsArgs } from './models'; -import { PrimarySaleService } from './primary-sale.service'; -import { UseGuards } from '@nestjs/common'; -import { TransactionNode } from '../common/transaction'; -import { PrimarySale } from './models/PrimarySale.dto'; -import { PrimarySaleFilter } from './models/Primary-sale.Filter'; -import { PrimarySaleTime } from './models/PrimarySaleTime'; -import { TicketInfo, WhitelistedInfo } from './models/TicketInfo'; -import { UserAuthResult } from '../auth/userAuthResult'; -import { JwtOrNativeAuthGuard } from '../auth/jwt.or.native.auth-guard'; -import { AuthUser } from '../auth/authUser'; - -@Resolver(() => PrimarySale) -export class PrimarySaleResolver extends BaseResolver(PrimarySale) { - constructor(private primarySaleService: PrimarySaleService) { - super(); - } - - @Query(() => PrimarySale) - async primarySale( - @Args({ name: 'filters', type: () => PrimarySaleFilter }) - filters: PrimarySaleFilter, - ): Promise<PrimarySale> { - return await this.primarySaleService.getStatus(filters.collectionName); - } - - @Query(() => [TicketInfo]) - @UseGuards(JwtOrNativeAuthGuard) - async myTickets( - @Args({ name: 'collectionIdentifier', type: () => String }) - collectionIdentifier: string, - @AuthUser() user: UserAuthResult, - ): Promise<TicketInfo[]> { - return await this.primarySaleService.getMyTickets(collectionIdentifier, user.address); - } - - @Query(() => Boolean) - @UseGuards(JwtOrNativeAuthGuard) - async hasClaimedTickets( - @Args({ name: 'collectionIdentifier', type: () => String }) - collectionIdentifier: string, - @AuthUser() user: UserAuthResult, - ): Promise<boolean> { - return await this.primarySaleService.hasClaimedTickets(collectionIdentifier, user.address); - } - - @Query(() => WhitelistedInfo) - @UseGuards(JwtOrNativeAuthGuard) - async isWhitelisted(@AuthUser() user: UserAuthResult): Promise<{ isWhitelisted: boolean; message?: string }> { - return await this.primarySaleService.isWhitelisted(user.address); - } - - @ResolveField('price', () => String) - async price(@Parent() sale: PrimarySale) { - const { collectionIdentifier } = sale; - const pricePerTicket = await this.primarySaleService.getPricePerTicket(collectionIdentifier); - return pricePerTicket || 0; - } - - @ResolveField(() => Int) - async maxUnitsPerWallet(@Parent() sale: PrimarySale) { - const { collectionIdentifier } = sale; - - const maxNftsPerWallet = await this.primarySaleService.getMaxNftPerWallet(collectionIdentifier); - return maxNftsPerWallet || 0; - } - - @ResolveField(() => String) - async paymentToken(@Parent() sale: PrimarySale) { - return process.env.HOLORIDE_PAYMENT_TOKEN; - } - - @ResolveField(() => PrimarySaleTime) - async saleTime(@Parent() sale: PrimarySale) { - const { collectionIdentifier } = sale; - return await this.primarySaleService.getTimestamps(collectionIdentifier); - } - - @Mutation(() => TransactionNode) - @UseGuards(JwtOrNativeAuthGuard) - async buyTickets( - @Args('input', { type: () => BuyTicketsArgs }) - input: BuyTicketsArgs, - @AuthUser() user: UserAuthResult, - ): Promise<TransactionNode> { - return await this.primarySaleService.buyTicket(user.address, input); - } - - @Mutation(() => TransactionNode) - @UseGuards(JwtOrNativeAuthGuard) - async claimTicket( - @Args('input', { type: () => ClaimTicketsArgs }) - input: ClaimTicketsArgs, - @AuthUser() user: UserAuthResult, - ): Promise<TransactionNode> { - return await this.primarySaleService.claim(user.address, input); - } -} diff --git a/src/modules/primary-sale-sc/primary-sale.service.ts b/src/modules/primary-sale-sc/primary-sale.service.ts deleted file mode 100644 index d7e953b8a..000000000 --- a/src/modules/primary-sale-sc/primary-sale.service.ts +++ /dev/null @@ -1,286 +0,0 @@ -import { Injectable, Logger } from '@nestjs/common'; -import '../../utils/extensions'; -import BigNumber from 'bignumber.js'; -import { - Address, - AddressValue, - BytesValue, - ContractFunction, - Interaction, - ResultsParser, - TokenIdentifierValue, - TokenTransfer, - U32Value, -} from '@multiversx/sdk-core'; -import { mxConfig, gas } from '../../config'; -import { TransactionNode } from '../common/transaction'; -import { BuyTicketsArgs, ClaimTicketsArgs } from './models'; -import { MxProxyService, getSmartContract } from 'src/common'; -import { PrimarySaleTimeAbi, TicketInfoAbi } from './models/PrimarySaleTimestamp.abi'; -import { generateCacheKeyFromParams } from 'src/utils/generate-cache-key'; -import { PrimarySale, PrimarySaleStatusEnum } from './models/PrimarySale.dto'; -import { PrimarySaleTime } from './models/PrimarySaleTime'; -import { TicketInfo } from './models/TicketInfo'; -import { DateUtils } from 'src/utils/date-utils'; -import { Constants } from '@multiversx/sdk-nestjs-common'; -import { RedisCacheService } from '@multiversx/sdk-nestjs-cache'; -import { ContractLoader } from '../auctions/contractLoader'; - -@Injectable() -export class PrimarySaleService { - private contract = new ContractLoader('./src/abis/primary-sales-sc.abi.json'); - private readonly parser: ResultsParser; - - constructor(private mxProxyService: MxProxyService, private redisCacheService: RedisCacheService, private logger: Logger) { - this.parser = new ResultsParser(); - } - - async getStatus(collectionIdentifier: string): Promise<PrimarySale> { - try { - const saleTime = await this.getTimestamps(collectionIdentifier); - return await this.getStatusMap(collectionIdentifier, saleTime); - } catch (err) { - this.logger.error('An error occurred while getting the status.', { - path: this.getStatus.name, - collectionIdentifier, - exception: err, - }); - } - } - - async getStatusMap(collectionIdentifier: string, saleTime: PrimarySaleTime): Promise<PrimarySale> { - if (saleTime.startSale > DateUtils.getCurrentTimestamp()) { - return new PrimarySale({ - status: PrimarySaleStatusEnum.NotStarted, - collectionIdentifier: collectionIdentifier, - }); - } - if (saleTime.startSale <= DateUtils.getCurrentTimestamp() && saleTime.endSale > DateUtils.getCurrentTimestamp()) { - return new PrimarySale({ - status: PrimarySaleStatusEnum.SalePeriod, - collectionIdentifier: collectionIdentifier, - }); - } - - if (saleTime.endSale <= DateUtils.getCurrentTimestamp() && saleTime.startClaim > DateUtils.getCurrentTimestamp()) { - return new PrimarySale({ - status: PrimarySaleStatusEnum.BetweenPeriod, - collectionIdentifier: collectionIdentifier, - }); - } - if (saleTime.startClaim <= DateUtils.getCurrentTimestamp() && saleTime.endClaim > DateUtils.getCurrentTimestamp()) { - return new PrimarySale({ - status: PrimarySaleStatusEnum.ClaimPeriod, - collectionIdentifier: collectionIdentifier, - }); - } - if (saleTime.endClaim <= DateUtils.getCurrentTimestamp()) { - return new PrimarySale({ - status: PrimarySaleStatusEnum.EndedPeriod, - collectionIdentifier: collectionIdentifier, - }); - } - return new PrimarySale({ - status: PrimarySaleStatusEnum.NonePeriod, - collectionIdentifier: collectionIdentifier, - }); - } - - async getPricePerTicket(collectionIdentifier: string): Promise<string> { - try { - const cacheKey = generateCacheKeyFromParams('primarySaleCollectionPrice', collectionIdentifier); - return await this.redisCacheService.getOrSet( - cacheKey, - () => this.getPricePerTicketMap(collectionIdentifier), - 5 * Constants.oneSecond(), - ); - } catch (err) { - this.logger.error('An error occurred while getting price per ticket.', { - path: this.getPricePerTicket.name, - collectionIdentifier, - exception: err, - }); - } - } - - async getPricePerTicketMap(collectionIdentifier: string): Promise<string> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - let price = <Interaction>contract.methodsExplicit.price([BytesValue.fromUTF8(collectionIdentifier)]); - - const response = await this.getFirstQueryResult(price); - return response.firstValue.valueOf(); - } - - async getMaxNftPerWallet(collectionIdentifier: string): Promise<string> { - try { - const cacheKey = generateCacheKeyFromParams('primarySaleMaxNftWallet', collectionIdentifier); - return await this.redisCacheService.getOrSet( - cacheKey, - () => this.getMaxNftPerWalletMap(collectionIdentifier), - 5 * Constants.oneSecond(), - ); - } catch (err) { - this.logger.error('An error occurred while getting the max nfts per wallet.', { - path: this.getMaxNftPerWallet.name, - collectionIdentifier, - exception: err, - }); - } - } - - async getMaxNftPerWalletMap(collectionIdentifier: string): Promise<string> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - let maxNftPerWalletInteraction = <Interaction>( - contract.methodsExplicit.max_units_per_wallet([BytesValue.fromUTF8(collectionIdentifier)]) - ); - - const response = await this.getFirstQueryResult(maxNftPerWalletInteraction); - return response.firstValue.valueOf().toFixed(); - } - - async getTimestamps(collectionIdentifier: string): Promise<PrimarySaleTime> { - try { - const cacheKey = generateCacheKeyFromParams('primarySaleTimestamp', collectionIdentifier); - return await this.redisCacheService.getOrSet(cacheKey, () => this.getTimestampsMap(collectionIdentifier), 5 * Constants.oneSecond()); - } catch (err) { - this.logger.error('An error occurred while getting timestamp.', { - path: this.getTimestampsMap.name, - collectionIdentifier, - exception: err, - }); - } - } - - async getMyTickets(collectionIdentifier: string, address: string): Promise<TicketInfo[]> { - try { - const cacheKey = generateCacheKeyFromParams('myTickets', address, collectionIdentifier); - return await this.redisCacheService.getOrSet( - cacheKey, - () => this.getMyTicketsMap(collectionIdentifier, address), - 5 * Constants.oneSecond(), - ); - } catch (err) { - this.logger.error('An error occurred while getting timestamp.', { - path: this.getMyTickets.name, - collectionIdentifier, - exception: err, - }); - } - } - - async getClaimStatus(collectionIdentifier: string, address: string): Promise<[boolean, number]> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - let myTicketsInteraction = <Interaction>contract.methodsExplicit.claimers([new TokenIdentifierValue(collectionIdentifier)]); - - const response = await this.getFirstQueryResult(myTicketsInteraction); - const addresses: Address[] = response?.firstValue?.valueOf(); - const claimmers = addresses.map((x) => x.bech32()); - if (claimmers.includes(address)) { - return [true, Constants.oneHour()]; - } - return [false, Constants.oneSecond()]; - } - - async getMyTicketsMap(collectionIdentifier: string, address: string): Promise<TicketInfo[]> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - let myTicketsInteraction = <Interaction>( - contract.methodsExplicit.all_tickets([new AddressValue(new Address(address)), new TokenIdentifierValue(collectionIdentifier)]) - ); - - const response = await this.getFirstQueryResult(myTicketsInteraction); - const myTickets: TicketInfoAbi[] = response?.firstValue?.valueOf(); - return myTickets?.map((t) => TicketInfo.fromAbi(t)); - } - - async isWhitelisted(address: string): Promise<{ isWhitelisted: boolean; message?: string }> { - try { - const cacheKey = generateCacheKeyFromParams('isWhitelisted', address); - return await this.redisCacheService.getOrSet(cacheKey, () => this.isWhitelistedMap(address), 5 * Constants.oneSecond()); - } catch (err) { - this.logger.error('An error occurred while getting is whitelisted.', { - path: this.isWhitelisted.name, - exception: err, - }); - } - } - - async hasClaimedTickets(collectionIdentifier: string, address: string): Promise<boolean> { - try { - const cacheKey = generateCacheKeyFromParams('hasClaimedTickets', address, collectionIdentifier); - const cachedValue = await this.redisCacheService.get<boolean>(cacheKey); - if (cachedValue) { - return cachedValue; - } - const [value, ttl] = await this.getClaimStatus(collectionIdentifier, address); - await this.redisCacheService.set(cacheKey, value, ttl); - return value; - } catch (err) { - this.logger.error('An error occurred while getting has claimed status.', { - path: this.hasClaimedTickets.name, - exception: err, - }); - } - } - - async isWhitelistedMap(address: string): Promise<{ isWhitelisted: boolean; message?: string }> { - const contract = getSmartContract(process.env.HOLORIDE_WHITELIST_SC); - const func = new ContractFunction('in_whitelist'); - const args = [new AddressValue(new Address(address))]; - const query = new Interaction(contract, func, args).withQuerent(new Address(address)).buildQuery(); - - const queryResponse = await this.mxProxyService.getService().queryContract(query); - - const value = - queryResponse?.returnData && queryResponse.returnData.length > 0 - ? new Boolean(queryResponse.returnData[0].base64ToHex()).valueOf() - : false; - if (value === false) { - return { - isWhitelisted: false, - message: process.env.HOLORIDE_WHITELIST_MSG, - }; - } - return { - isWhitelisted: true, - }; - } - - async getTimestampsMap(collectionIdentifier: string): Promise<PrimarySaleTime> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - let price = <Interaction>contract.methodsExplicit.timestamps([BytesValue.fromUTF8(collectionIdentifier)]); - - const response = await this.getFirstQueryResult(price); - const saleTime: PrimarySaleTimeAbi = response?.firstValue?.valueOf(); - return PrimarySaleTime.fromAbi(saleTime); - } - - async buyTicket(ownerAddress: string, request: BuyTicketsArgs): Promise<TransactionNode> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - - return contract.methodsExplicit - .buy_tickets([BytesValue.fromUTF8(request.collectionIdentifier), new U32Value(new BigNumber(request.ticketsNumber))]) - .withSingleESDTTransfer(TokenTransfer.fungibleFromBigInteger(process.env.HOLORIDE_PAYMENT_TOKEN, new BigNumber(request.price))) - .withChainID(mxConfig.chainID) - .withGasLimit(gas.buyTickets) - .withSender(Address.fromString(ownerAddress)) - .buildTransaction() - .toPlainObject(); - } - - async claim(ownerAddress: string, request: ClaimTicketsArgs): Promise<TransactionNode> { - const contract = await this.contract.getContract(process.env.HOLORIDE_PRIMARY_SC); - return contract.methodsExplicit - .claim([new TokenIdentifierValue(request.collectionIdentifier)]) - .withChainID(mxConfig.chainID) - .withGasLimit(gas.withdraw) - .withSender(Address.fromString(ownerAddress)) - .buildTransaction() - .toPlainObject(); - } - - private async getFirstQueryResult(interaction: Interaction) { - let queryResponse = await this.mxProxyService.getService().queryContract(interaction.buildQuery()); - let result = this.parser.parseQueryResponse(queryResponse, interaction.getEndpoint()); - return result; - } -} diff --git a/src/modules/rabbitmq/cache-invalidation/cache-events.module.ts b/src/modules/rabbitmq/cache-invalidation/cache-events.module.ts index deea30890..46db42104 100644 --- a/src/modules/rabbitmq/cache-invalidation/cache-events.module.ts +++ b/src/modules/rabbitmq/cache-invalidation/cache-events.module.ts @@ -17,9 +17,11 @@ import { MarketplacesCachingService } from 'src/modules/marketplaces/marketplace import { CampaignsCachingService } from 'src/modules/campaigns/campaigns-caching.service'; import { MarketplaceRedisHandler } from 'src/modules/marketplaces/loaders/marketplace.redis-handler'; import { AssetsSupplyRedisHandler } from 'src/modules/assets/loaders/assets-supply.redis-handler'; +import { PubSubListenerModule } from 'src/pubsub/pub.sub.listener.module'; @Module({ imports: [ + PubSubListenerModule, CommonModule, CacheInvalidationEventsModule, CacheAdminEventsModule, diff --git a/src/modules/s3/s3.service.ts b/src/modules/s3/s3.service.ts index a6ae3bb6d..48c58f3a6 100644 --- a/src/modules/s3/s3.service.ts +++ b/src/modules/s3/s3.service.ts @@ -1,5 +1,6 @@ import { Injectable, Logger } from '@nestjs/common'; -import { S3 } from 'aws-sdk'; +import { S3Client } from '@aws-sdk/client-s3'; +const { Upload } = require('@aws-sdk/lib-storage'); import { Readable } from 'stream'; @Injectable() @@ -30,9 +31,13 @@ export class S3Service { ContentType: mimetype, }; - const s3 = this.getS3(); + const s3Client = this.getS3(); + const parallelUploads3 = new Upload({ + client: s3Client, + params, + }); try { - await s3.upload(params).promise(); + await parallelUploads3.done(); return true; } catch (e) { this.logger.error('An error occurred while trying to upload file to s3', { @@ -44,9 +49,11 @@ export class S3Service { } getS3() { - return new S3({ - accessKeyId: process.env.AWS_ACCESS_KEY_ID, - secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + return new S3Client({ + credentials: { + accessKeyId: process.env.AWS_ACCESS_KEY_ID, + secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, + }, }); } } diff --git a/src/modules/scam/nft-scam.elastic.service.ts b/src/modules/scam/nft-scam.elastic.service.ts index 0a59fb5d6..d89682eaa 100644 --- a/src/modules/scam/nft-scam.elastic.service.ts +++ b/src/modules/scam/nft-scam.elastic.service.ts @@ -5,6 +5,7 @@ import { Asset } from '../assets/models'; import { ScamInfo } from '../assets/models/ScamInfo.dto'; import { NftScamInfoModel } from './models/nft-scam-info.model'; import { getAllCollectionsFromElasticQuery, getNftWithScamInfoFromElasticQuery } from './nft-scam.queries'; +import { ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class NftScamElasticService { @@ -15,7 +16,7 @@ export class NftScamElasticService { try { const query = getNftWithScamInfoFromElasticQuery(identifier); - await this.mxService.getScrollableList('tokens', 'identifier', query, async (items) => { + await this.mxService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', query, async (items) => { nft = items[0]; return undefined; }); @@ -32,7 +33,7 @@ export class NftScamElasticService { async setBulkNftScamInfoInElastic(nfts: Asset[], clearScamInfoIfEmpty?: boolean): Promise<void> { if (nfts.length > 0) { try { - await this.mxService.bulkRequest('tokens', this.buildNftScamInfoBulkUpdate(nfts, clearScamInfoIfEmpty)); + await this.mxService.bulkRequest(ELASTIC_TOKENS_INDEX, this.buildNftScamInfoBulkUpdate(nfts, clearScamInfoIfEmpty)); } catch (error) { this.logger.error('Error when bulk updating nft scam info in Elastic', { path: `${NftScamElasticService.name}.${this.setBulkNftScamInfoInElastic.name}`, @@ -45,7 +46,7 @@ export class NftScamElasticService { async updateBulkNftScamInfoInElastic(updates: string[]): Promise<void> { if (updates.length > 0) { try { - await this.mxService.bulkRequest('tokens', updates, '?timeout=1m'); + await this.mxService.bulkRequest(ELASTIC_TOKENS_INDEX, updates, '?timeout=1m'); } catch (error) { this.logger.error('Error when bulk updating nft scam info in Elastic', { path: `${NftScamElasticService.name}.${this.updateBulkNftScamInfoInElastic.name}`, @@ -58,10 +59,20 @@ export class NftScamElasticService { async setNftScamInfoManuallyInElastic(identifier: string, scamInfo: ScamInfo): Promise<void> { try { const updates = [ - this.mxService.buildBulkUpdate<string>('tokens', identifier, elasticDictionary.scamInfo.typeKey, scamInfo?.type ?? null), - this.mxService.buildBulkUpdate<string>('tokens', identifier, elasticDictionary.scamInfo.infoKey, scamInfo?.info ?? null), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + identifier, + elasticDictionary.scamInfo.typeKey, + scamInfo?.type ?? null, + ), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + identifier, + elasticDictionary.scamInfo.infoKey, + scamInfo?.info ?? null, + ), ]; - await this.mxService.bulkRequest('tokens', updates); + await this.mxService.bulkRequest(ELASTIC_TOKENS_INDEX, updates); } catch (error) { this.logger.error('Error when manually setting nft scam info in Elastic', { path: `${NftScamElasticService.name}.${this.setNftScamInfoManuallyInElastic.name}`, @@ -73,10 +84,20 @@ export class NftScamElasticService { async setCollectionScamInfoManuallyInElastic(collection: string, scamInfo: ScamInfo): Promise<void> { try { const updates = [ - this.mxService.buildBulkUpdate<string>('tokens', collection, elasticDictionary.scamInfo.typeKey, scamInfo?.type ?? null), - this.mxService.buildBulkUpdate<string>('tokens', collection, elasticDictionary.scamInfo.infoKey, scamInfo?.info ?? null), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + collection, + elasticDictionary.scamInfo.typeKey, + scamInfo?.type ?? null, + ), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + collection, + elasticDictionary.scamInfo.infoKey, + scamInfo?.info ?? null, + ), ]; - await this.mxService.bulkRequest('tokens', updates); + await this.mxService.bulkRequest(ELASTIC_TOKENS_INDEX, updates); } catch (error) { this.logger.error('Error when manually setting collection scam info in Elastic', { path: `${NftScamElasticService.name}.${this.setCollectionScamInfoManuallyInElastic.name}`, @@ -88,7 +109,7 @@ export class NftScamElasticService { async getAllCollectionsFromElastic(): Promise<string[]> { const query = getAllCollectionsFromElasticQuery(); let collections: string[] = []; - await this.mxService.getScrollableList('tokens', 'token', query, async (items) => { + await this.mxService.getScrollableList(ELASTIC_TOKENS_INDEX, 'token', query, async (items) => { collections = collections.concat([...new Set(items.map((i) => i.token))]); }); return collections; @@ -99,14 +120,28 @@ export class NftScamElasticService { for (const nft of nfts) { if (nft.scamInfo) { updates.push( - this.mxService.buildBulkUpdate<string>('tokens', nft.identifier, elasticDictionary.scamInfo.typeKey, nft.scamInfo.type), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + nft.identifier, + elasticDictionary.scamInfo.typeKey, + nft.scamInfo.type, + ), ); updates.push( - this.mxService.buildBulkUpdate<string>('tokens', nft.identifier, elasticDictionary.scamInfo.infoKey, nft.scamInfo.info), + this.mxService.buildBulkUpdate<string>( + ELASTIC_TOKENS_INDEX, + nft.identifier, + elasticDictionary.scamInfo.infoKey, + nft.scamInfo.info, + ), ); } else if (clearScamInfo) { - updates.push(this.mxService.buildBulkUpdate<string>('tokens', nft.identifier, elasticDictionary.scamInfo.typeKey, null)); - updates.push(this.mxService.buildBulkUpdate<string>('tokens', nft.identifier, elasticDictionary.scamInfo.infoKey, null)); + updates.push( + this.mxService.buildBulkUpdate<string>(ELASTIC_TOKENS_INDEX, nft.identifier, elasticDictionary.scamInfo.typeKey, null), + ); + updates.push( + this.mxService.buildBulkUpdate<string>(ELASTIC_TOKENS_INDEX, nft.identifier, elasticDictionary.scamInfo.infoKey, null), + ); } } return updates; @@ -117,12 +152,16 @@ export class NftScamElasticService { for (let i = 0; i < nftsFromDb.length; i++) { const nftFromElastic = nftsFromElastic.find((nft) => nft.identifier === nftsFromDb[i].identifier); if (!nftsFromDb[i] && nftFromElastic?.[elasticDictionary.scamInfo.typeKey]) { - updates.push(this.mxService.buildBulkUpdate<string>('tokens', nftsFromDb[i].identifier, elasticDictionary.scamInfo.typeKey, null)); - updates.push(this.mxService.buildBulkUpdate<string>('tokens', nftsFromDb[i].identifier, elasticDictionary.scamInfo.infoKey, null)); + updates.push( + this.mxService.buildBulkUpdate<string>(ELASTIC_TOKENS_INDEX, nftsFromDb[i].identifier, elasticDictionary.scamInfo.typeKey, null), + ); + updates.push( + this.mxService.buildBulkUpdate<string>(ELASTIC_TOKENS_INDEX, nftsFromDb[i].identifier, elasticDictionary.scamInfo.infoKey, null), + ); } else { updates.push( this.mxService.buildBulkUpdate<string>( - 'tokens', + ELASTIC_TOKENS_INDEX, nftsFromDb[i].identifier, elasticDictionary.scamInfo.typeKey, nftsFromDb[i].type, @@ -130,7 +169,7 @@ export class NftScamElasticService { ); updates.push( this.mxService.buildBulkUpdate<string>( - 'tokens', + ELASTIC_TOKENS_INDEX, nftsFromDb[i].identifier, elasticDictionary.scamInfo.infoKey, nftsFromDb[i].info, diff --git a/src/modules/scam/nft-scam.service.ts b/src/modules/scam/nft-scam.service.ts index 9b05e9618..76723b7c9 100644 --- a/src/modules/scam/nft-scam.service.ts +++ b/src/modules/scam/nft-scam.service.ts @@ -13,6 +13,7 @@ import { getCollectionNftsQuery } from './nft-scam.queries'; import { AssetByIdentifierService } from '../assets'; import { Locker } from '@multiversx/sdk-nestjs-common'; import { PluginService } from 'src/common/pluggins/plugin.service'; +import { ELASTIC_TOKENS_INDEX } from 'src/utils/constants'; @Injectable() export class NftScamService { @@ -73,7 +74,7 @@ export class NftScamService { async validateOrUpdateAllNftsScamInfoForCollection(collection: string, scamEngineVersion: string): Promise<void> { this.logger.log(`Processing scamInfo for ${collection}...`); const nftsQuery = getCollectionNftsQuery(collection); - await this.mxElasticService.getScrollableList('tokens', 'identifier', nftsQuery, async (nftsBatch) => { + await this.mxElasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', nftsQuery, async (nftsBatch) => { await this.validateOrUpdateNftsScamInfoBatch(nftsBatch, scamEngineVersion); }); } @@ -81,7 +82,7 @@ export class NftScamService { async markAllNftsForCollection(collection: string, scamEngineVersion: string, scamInfo: ScamInfo): Promise<void> { this.logger.log(`Processing scamInfo for ${collection}...`); const nftsQuery = getCollectionNftsQuery(collection); - await this.mxElasticService.getScrollableList('tokens', 'identifier', nftsQuery, async (nftsBatch) => { + await this.mxElasticService.getScrollableList(ELASTIC_TOKENS_INDEX, 'identifier', nftsQuery, async (nftsBatch) => { await this.markNftsScamInfoBatch(nftsBatch, scamEngineVersion, scamInfo); }); } diff --git a/src/utils/constants/index.ts b/src/utils/constants/index.ts index 0cfff384d..ddff0c011 100644 --- a/src/utils/constants/index.ts +++ b/src/utils/constants/index.ts @@ -18,3 +18,19 @@ export const ELRONDNFTSWAP_KEY = 'elrondnftswap'; export const ENEFTOR_KEY = 'eneftor'; export const FRAMEIT_KEY = 'frameit'; export const ICI_KEY = 'ici'; + +export const ELASTIC_TOKENS_INDEX = 'tokens'; +export const ELASTIC_NFT_NSFW = 'nft_nsfw_mark'; +export const ELASTIC_NFT_RANK_CUSTOM = 'nft_rank_custom'; +export const ELASTIC_NFT_RANK_HASH = 'nft_custom_ranks_hash'; +export const ELASTIC_NFT_HASRARITY = 'nft_hasRarity'; +export const ELASTIC_NFT_SCORE_OPENRARITY = 'nft_score_openRarity'; +export const ELASTIC_NFT_RANK_OPENRARITY = 'nft_rank_openRarity'; +export const ELASTIC_NFT_SCORE_JACCARD = 'nft_score_jaccardDistances'; +export const ELASTIC_NFT_RANK_JACCARD = 'nft_rank_jaccardDistances'; +export const ELASTIC_NFT_SCORE_TRAIT = 'nft_score_trait'; +export const ELASTIC_NFT_RANK_TRAIT = 'nft_rank_trait'; +export const ELASTIC_NFT_SCORE_STATISTICAL = 'nft_score_statistical'; +export const ELASTIC_NFT_RANK_STATISTICAL = 'nft_rank_statistical'; +export const ELASTIC_NFT_TRAITS = 'nft_traitValues'; +export const ELASTIC_NFT_HASTRAITSUMMARY = 'nft_hasTraitSummary';