From 52e783ce54fa2e5589b0ed43a962ab7ac945497e Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 1 Aug 2023 09:48:14 +0200 Subject: [PATCH 01/63] Scaffold attestations page --- .../pages/PeriodDetails/PeriodDetailsPage.tsx | 13 ++++++++++ .../PeriodDetails/components/Attestations.tsx | 24 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx diff --git a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx index c1d6db98e..00439be3e 100644 --- a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx +++ b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx @@ -33,6 +33,7 @@ import { QuantifierMessage } from './components/QuantifierMessage'; import { Box } from '@/components/ui/Box'; import { LoadPlaceholder } from '@/components/LoadPlaceholder'; import { PeriodStatusType } from '@/model/periods/enums/period-status-type.enum'; +import Attestations from './components/Attestations'; const QuantifierTable = React.lazy( () => import('./components/QuantifierTable') @@ -117,6 +118,13 @@ export const PeriodDetailsPage = (): JSX.Element | null => { replace rounded /> + @@ -124,6 +132,11 @@ export const PeriodDetailsPage = (): JSX.Element | null => { + + + + + diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx new file mode 100644 index 000000000..dfef8ad47 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -0,0 +1,24 @@ +import { useParams } from 'react-router-dom'; +import { useRecoilValue } from 'recoil'; +import { PeriodPageParams, SinglePeriod } from '@/model/periods/periods'; +import { PeriodStatusType } from '@/model/periods/enums/period-status-type.enum'; + +const Attestations = (): JSX.Element => { + const { periodId } = useParams(); + const period = useRecoilValue(SinglePeriod(periodId)); + if (!period || period.status !== PeriodStatusType.CLOSED) { + return ( +
+ Analytics are available after quantification when the period is closed. +
+ ); + } + return ( +
+

Attestations

+
+ ); +}; + +// eslint-disable-next-line import/no-default-export +export default Attestations; From 1cd6c16f6c39397548991e9f1d86cd04c8e19458 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Wed, 2 Aug 2023 07:56:29 +0200 Subject: [PATCH 02/63] Setup dependencies --- packages/frontend/craco.config.js | 8 +- packages/frontend/package.json | 6 + yarn.lock | 3403 ++++++++++++++++++++++++++++- 3 files changed, 3294 insertions(+), 123 deletions(-) diff --git a/packages/frontend/craco.config.js b/packages/frontend/craco.config.js index de13b0bfb..ed7ac1f89 100644 --- a/packages/frontend/craco.config.js +++ b/packages/frontend/craco.config.js @@ -29,13 +29,15 @@ module.exports = { * Possible alternatives: react-app-rewired or ejecting from CRA */ fallback: { - 'util': require.resolve("util/"), + util: require.resolve('util/'), + stream: require.resolve('stream-browserify'), + assert: require.resolve('assert/'), }, }, // with CRA 5 (webpack5), sourceMapLoader now complains about every third-party app that was compiled from // typescript but doesn't have 'ts' files. This line ignores them. // See: https://github.com/facebook/create-react-app/issues/11924 ignoreWarnings: [/to parse source map/i], - } - } + }, + }, }; diff --git a/packages/frontend/package.json b/packages/frontend/package.json index d584b2982..1fde0ced0 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -13,6 +13,7 @@ "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@endo/static-module-record": "^0.7.16", + "@ethereum-attestation-service/eas-sdk": "^0.29.1", "@ethersproject/providers": "^5.5.3", "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", @@ -23,6 +24,9 @@ "@mui/material": "^5.3.0", "@observablehq/plot": "^0.6.5", "@rainbow-me/rainbowkit": "^1.0.7", + "@safe-global/api-kit": "^1.3.0", + "@safe-global/protocol-kit": "^1.2.0", + "@safe-global/safe-core-sdk-types": "^2.2.0", "@sgratzl/chartjs-chart-boxplot": "^4.1.1", "@tailwindcss/container-queries": "^0.1.1", "@tailwindcss/forms": "latest", @@ -31,6 +35,7 @@ "@typescript-eslint/parser": "^5.18.0", "@ukstv/jazzicon-react": "^1.0.0", "api-types": "0.1.0", + "assert": "^2.0.0", "autoprefixer": "^10.4.7", "axios": "^0.22.0", "chart.js": "^4.2.0", @@ -62,6 +67,7 @@ "recoil-persist": "^4.2.0", "ses": "^0.18.1", "source-map-explorer": "^2.5.2", + "stream-browserify": "^3.0.0", "tailwindcss": "^3.0.24", "use-error-boundary": "^2.0.6", "util": "^0.12.4", diff --git a/yarn.lock b/yarn.lock index ecb44ee04..2c7586ed0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2450,6 +2450,52 @@ __metadata: languageName: node linkType: hard +"@chainsafe/as-sha256@npm:^0.3.1": + version: 0.3.1 + resolution: "@chainsafe/as-sha256@npm:0.3.1" + checksum: 58ea733be1657b0e31dbf48b0dba862da0833df34a81c1460c7352f04ce90874f70003cbf34d0afb9e5e53a33ee2d63a261a8b12462be85b2ba0a6f7f13d6150 + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.4.2": + version: 0.4.2 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.4.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: f9cfcb2132a243992709715dbd28186ab48c7c0c696f29d30857693cca5526bf753974a505ef68ffd5623bbdbcaa10f9083f4dd40bf99eb6408e451cc26a1a9e + languageName: node + linkType: hard + +"@chainsafe/persistent-merkle-tree@npm:^0.5.0": + version: 0.5.0 + resolution: "@chainsafe/persistent-merkle-tree@npm:0.5.0" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + checksum: 2c67203da776c79cd3a6132e2d672fe132393b2e63dc71604e3134acc8c0ec25cc5e431051545939ea0f7c5ff2066fb806b9e5cab974ca085d046226a1671f7d + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.10.0": + version: 0.10.2 + resolution: "@chainsafe/ssz@npm:0.10.2" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.5.0 + checksum: 6bb70cf741d0a19dd0b28b3f6f067b96fa39f556e2eefa6ac745b21db9c3b3a8393dc3cca8ff4a6ce065ed71ddc3fb1b2b390a92004b9d01067c26e2558e5503 + languageName: node + linkType: hard + +"@chainsafe/ssz@npm:^0.9.2": + version: 0.9.4 + resolution: "@chainsafe/ssz@npm:0.9.4" + dependencies: + "@chainsafe/as-sha256": ^0.3.1 + "@chainsafe/persistent-merkle-tree": ^0.4.2 + case: ^1.6.3 + checksum: c6eaedeae9e5618b3c666ff4507a27647f665a8dcf17d5ca86da4ed4788c5a93868f256d0005467d184fdf35ec03f323517ec2e55ec42492d769540a2ec396bc + languageName: node + linkType: hard + "@coinbase/wallet-sdk@npm:^3.6.6": version: 3.7.1 resolution: "@coinbase/wallet-sdk@npm:3.7.1" @@ -2981,7 +3027,62 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.7.0": +"@ethereum-attestation-service/eas-contracts@npm:^0.27.1": + version: 0.27.1 + resolution: "@ethereum-attestation-service/eas-contracts@npm:0.27.1" + dependencies: + "@typechain/ethers-v5": ^10.2.0 + "@typechain/hardhat": ^6.1.5 + hardhat: 2.13.1 + typechain: ^8.1.1 + checksum: a43b57af246bd0e5e8a6ecf627d050067f8164db7d61de3fa071459af1aa7ddcf8e5b814df4c346c1449556e0f54c3f9b2a151bedb7f275270ea9e125a1f6e6e + languageName: node + linkType: hard + +"@ethereum-attestation-service/eas-sdk@npm:^0.29.1": + version: 0.29.1 + resolution: "@ethereum-attestation-service/eas-sdk@npm:0.29.1" + dependencies: + "@ethereum-attestation-service/eas-contracts": ^0.27.1 + ethers: ^5.7.2 + js-base64: ^3.7.5 + multiformats: 9.9.0 + pako: ^2.1.0 + checksum: fae314cd10145c7f64785c5d85c1b4d471b163470236e196bd29c21bfc1fb5d1a254e4ca463e5e8462532f05f17e66f24846366becc6004462ee87e2bd5e8d43 + languageName: node + linkType: hard + +"@ethereumjs/common@npm:2.5.0": + version: 2.5.0 + resolution: "@ethereumjs/common@npm:2.5.0" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.1 + checksum: f08830c5b86f215e5bd9b80c7202beeeacfcd6094e493efb1cad75dd9d4605bae6c3d4a991447fc14e494c6c4ce99ea41f77e2032f3a9e1976f44308d3757ea7 + languageName: node + linkType: hard + +"@ethereumjs/common@npm:^2.5.0": + version: 2.6.5 + resolution: "@ethereumjs/common@npm:2.6.5" + dependencies: + crc-32: ^1.2.0 + ethereumjs-util: ^7.1.5 + checksum: 0143386f267ef01b7a8bb1847596f964ad58643c084e5fd8e3a0271a7bf8428605dbf38cbb92c84f6622080ad095abeb765f178c02d86ec52abf9e8a4c0e4ecf + languageName: node + linkType: hard + +"@ethereumjs/tx@npm:3.3.2": + version: 3.3.2 + resolution: "@ethereumjs/tx@npm:3.3.2" + dependencies: + "@ethereumjs/common": ^2.5.0 + ethereumjs-util: ^7.1.2 + checksum: e18c871fa223fcb23af1c3dde0ff9c82c91e962556fd531e1c75df63afb3941dd71e3def733d8c442a80224c6dcefb256f169cc286176e6ffb33c19349189c53 + languageName: node + linkType: hard + +"@ethersproject/abi@npm:5.7.0, @ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.6.3, @ethersproject/abi@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/abi@npm:5.7.0" dependencies: @@ -3087,7 +3188,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/contracts@npm:5.7.0": +"@ethersproject/contracts@npm:5.7.0, @ethersproject/contracts@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/contracts@npm:5.7.0" dependencies: @@ -3208,7 +3309,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.5.3": +"@ethersproject/providers@npm:5.7.2, @ethersproject/providers@npm:^5.5.3, @ethersproject/providers@npm:^5.7.1, @ethersproject/providers@npm:^5.7.2": version: 5.7.2 resolution: "@ethersproject/providers@npm:5.7.2" dependencies: @@ -3281,7 +3382,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/solidity@npm:5.7.0": +"@ethersproject/solidity@npm:5.7.0, @ethersproject/solidity@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/solidity@npm:5.7.0" dependencies: @@ -3306,7 +3407,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.7.0": +"@ethersproject/transactions@npm:5.7.0, @ethersproject/transactions@npm:^5.6.2, @ethersproject/transactions@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/transactions@npm:5.7.0" dependencies: @@ -4177,6 +4278,19 @@ __metadata: languageName: node linkType: hard +"@metamask/eth-sig-util@npm:^4.0.0": + version: 4.0.1 + resolution: "@metamask/eth-sig-util@npm:4.0.1" + dependencies: + ethereumjs-abi: ^0.6.8 + ethereumjs-util: ^6.2.1 + ethjs-util: ^0.1.6 + tweetnacl: ^1.0.3 + tweetnacl-util: ^0.15.1 + checksum: 740df4c92a1282e6be4c00c86c1a8ccfb93e767596e43f6da895aa5bab4a28fc3c2209f0327db34924a4a1e9db72bc4d3dddfcfc45cca0b218c9ccbf7d1b1445 + languageName: node + linkType: hard + "@metamask/safe-event-emitter@npm:2.0.0, @metamask/safe-event-emitter@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/safe-event-emitter@npm:2.0.0" @@ -4698,6 +4812,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": + version: 1.2.0 + resolution: "@noble/hashes@npm:1.2.0" + checksum: 8ca080ce557b8f40fb2f78d3aedffd95825a415ac8e13d7ffe3643f8626a8c2d99a3e5975b555027ac24316d8b3c02a35b8358567c0c23af681e6573602aa434 + languageName: node + linkType: hard + "@noble/hashes@npm:1.3.0, @noble/hashes@npm:^1.3.0, @noble/hashes@npm:~1.3.0": version: 1.3.0 resolution: "@noble/hashes@npm:1.3.0" @@ -4705,6 +4826,13 @@ __metadata: languageName: node linkType: hard +"@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": + version: 1.7.1 + resolution: "@noble/secp256k1@npm:1.7.1" + checksum: d2301f1f7690368d8409a3152450458f27e54df47e3f917292de3de82c298770890c2de7c967d237eff9c95b70af485389a9695f73eb05a43e2bd562d18b18cb + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4732,6 +4860,273 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ethereumjs-block@npm:5.0.0": + version: 5.0.0 + resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.0" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-trie": 6.0.0 + "@nomicfoundation/ethereumjs-tx": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + checksum: c507d9c2160e6af9b317f434f2e1bc4ba2541e08382e49b4a295c87d05dfaf299326acb5b0cb735892349987d74557fea4c155909029b04f9bd76d20a45b48eb + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-blockchain@npm:7.0.0": + version: 7.0.0 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-ethash": 3.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-trie": 6.0.0 + "@nomicfoundation/ethereumjs-tx": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + abstract-level: ^1.0.3 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + level: ^8.0.0 + lru-cache: ^5.1.1 + memory-level: ^1.0.0 + checksum: 890eb8bd8b5fc3c50895a72ed81b71fa0a1c17ccb2ca50eab4e594cef3caec42571ee645877fa6aa7ec3b0413db0a78210fc91e5b6f4fbce86c1cd16a2e85a54 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-common@npm:4.0.0": + version: 4.0.0 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.0" + dependencies: + "@nomicfoundation/ethereumjs-util": 9.0.0 + crc-32: ^1.2.0 + checksum: fa591cdf0972e207e13a6f190942a4402d0100a3f77a930d528aff78edaf1c9f5ab14d7b5b8c313f8ca0fa03fd9111eb1a1d2d3348d056c041d4e16b0bfb425d + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-ethash@npm:3.0.0": + version: 3.0.0 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + abstract-level: ^1.0.3 + bigint-crypto-utils: ^3.0.23 + ethereum-cryptography: 0.1.3 + checksum: 659c73b4fabaf56da0c3d85e04d441ba2d8ce55061249bd3945ef9e8a808bd16d2af7b221277e118c2ba03434b471e872c3ef45089b440fc502b2a78ea4fc334 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-evm@npm:2.0.0": + version: 2.0.0 + resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.0" + dependencies: + "@ethersproject/providers": ^5.7.1 + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-tx": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 0d869db94ac9d29ee710913840f33ffdf91525423a0e7a7ee8cdea546c1c5cf3804af9f646efa83232c49546d655e504612f26e46fefbe9ac9d7f7166704789e + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-rlp@npm:5.0.0": + version: 5.0.0 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.0" + bin: + rlp: bin/rlp + checksum: fbf353e77d55f40bbd05837498f208ac78a344b1917aafd8cc46f582b193d85eb6f61f71c2ef26a21084a98f53704675068af65e2ecc58aed5ea982da09d33a0 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-statemanager@npm:2.0.0": + version: 2.0.0 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.0" + dependencies: + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + ethers: ^5.7.1 + js-sdsl: ^4.1.4 + checksum: 3cf4e4c7765cf0c53392fdf2961e5d3e22a2f36ae97c762b5ffebbdce5316b70c7ea678983244d703929f6b1208849249e1bc1e54f7aa1414bc3e812b202aadf + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-trie@npm:6.0.0": + version: 6.0.0 + resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.0" + dependencies: + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + "@types/readable-stream": ^2.3.13 + ethereum-cryptography: 0.1.3 + readable-stream: ^3.6.0 + checksum: 0221250e323e5a92e6a5bcf60e47fa3893e965493e2342b61706a7e7c4a6779d101a515c2e59aa6f2f3080b12937e29b491aa20b3f24c59d4ebd847df51b9718 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-tx@npm:5.0.0": + version: 5.0.0 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.0" + dependencies: + "@chainsafe/ssz": ^0.9.2 + "@ethersproject/providers": ^5.7.2 + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + ethereum-cryptography: 0.1.3 + checksum: 3549e2cc85229d598d313bc3c298182f2154db4260bf3c4a933b40a69aa79c99f636d77b3af2d89882c95398b673feadc69e38ba48e475d567dde864f47d72a8 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-util@npm:9.0.0": + version: 9.0.0 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.0" + dependencies: + "@chainsafe/ssz": ^0.10.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + ethereum-cryptography: 0.1.3 + checksum: f12a23cc6e1fa404124249a02834dc459c885962bd8da19987cbc3df043d6e3476dd41351f3edafe7e0dd3c1b6f897a31a613ca3db6427b7fc9104329e8e90b0 + languageName: node + linkType: hard + +"@nomicfoundation/ethereumjs-vm@npm:7.0.0": + version: 7.0.0 + resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.0" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.0 + "@nomicfoundation/ethereumjs-blockchain": 7.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-evm": 2.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-statemanager": 2.0.0 + "@nomicfoundation/ethereumjs-trie": 6.0.0 + "@nomicfoundation/ethereumjs-tx": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + debug: ^4.3.3 + ethereum-cryptography: 0.1.3 + mcl-wasm: ^0.7.1 + rustbn.js: ~0.2.0 + checksum: 46ac42dec660f741eee211992e5eeb101b88ef557100cf80aa2529761e8da9ed9c066ed5601872a1db3ab9af1f9b84709acbb9504b00614851f9774bcbbd638d + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-darwin-x64@npm:0.1.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-freebsd-x64@npm:0.1.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-gnu@npm:0.1.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-arm64-musl@npm:0.1.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-gnu@npm:0.1.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-linux-x64-musl@npm:0.1.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-arm64-msvc@npm:0.1.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-ia32-msvc@npm:0.1.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer-win32-x64-msvc@npm:0.1.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@nomicfoundation/solidity-analyzer@npm:^0.1.0": + version: 0.1.1 + resolution: "@nomicfoundation/solidity-analyzer@npm:0.1.1" + dependencies: + "@nomicfoundation/solidity-analyzer-darwin-arm64": 0.1.1 + "@nomicfoundation/solidity-analyzer-darwin-x64": 0.1.1 + "@nomicfoundation/solidity-analyzer-freebsd-x64": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": 0.1.1 + "@nomicfoundation/solidity-analyzer-linux-x64-musl": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": 0.1.1 + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": 0.1.1 + dependenciesMeta: + "@nomicfoundation/solidity-analyzer-darwin-arm64": + optional: true + "@nomicfoundation/solidity-analyzer-darwin-x64": + optional: true + "@nomicfoundation/solidity-analyzer-freebsd-x64": + optional: true + "@nomicfoundation/solidity-analyzer-linux-arm64-gnu": + optional: true + "@nomicfoundation/solidity-analyzer-linux-arm64-musl": + optional: true + "@nomicfoundation/solidity-analyzer-linux-x64-gnu": + optional: true + "@nomicfoundation/solidity-analyzer-linux-x64-musl": + optional: true + "@nomicfoundation/solidity-analyzer-win32-arm64-msvc": + optional: true + "@nomicfoundation/solidity-analyzer-win32-ia32-msvc": + optional: true + "@nomicfoundation/solidity-analyzer-win32-x64-msvc": + optional: true + checksum: 038cffafd5769e25256b5b8bef88d95cc1c021274a65c020cf84aceb3237752a3b51645fdb0687f5516a2bdfebf166fcf50b08ab64857925100213e0654b266b + languageName: node + linkType: hard + "@npmcli/fs@npm:^2.1.0": version: 2.1.2 resolution: "@npmcli/fs@npm:2.1.2" @@ -5078,6 +5473,34 @@ __metadata: languageName: node linkType: hard +"@safe-global/api-kit@npm:^1.3.0": + version: 1.3.0 + resolution: "@safe-global/api-kit@npm:1.3.0" + dependencies: + "@ethersproject/abstract-signer": ^5.7.0 + "@safe-global/safe-core-sdk-types": ^2.2.0 + node-fetch: ^2.6.6 + checksum: 24937a39304926d5c30ad7a687ae71efece5bca2d92a41dc716c442056c3dcb6f0b1fd50f59bb4bc57567daba23a72cb19ce8bbba68729ea97af4d720fc19651 + languageName: node + linkType: hard + +"@safe-global/protocol-kit@npm:^1.2.0": + version: 1.2.0 + resolution: "@safe-global/protocol-kit@npm:1.2.0" + dependencies: + "@ethersproject/address": ^5.7.0 + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/solidity": ^5.7.0 + "@safe-global/safe-deployments": ^1.26.0 + ethereumjs-util: ^7.1.5 + semver: ^7.5.4 + web3: ^1.8.1 + web3-core: ^1.8.1 + web3-utils: ^1.8.1 + checksum: 5fbba720c7b1d8b437d373c88275452a25751d1420f103bcf528ad23fa3f808c6e8734e863d921d072275f75d0523976cc745ae43edc241f492328c9c800b57b + languageName: node + linkType: hard + "@safe-global/safe-apps-provider@npm:^0.15.2": version: 0.15.2 resolution: "@safe-global/safe-apps-provider@npm:0.15.2" @@ -5108,6 +5531,28 @@ __metadata: languageName: node linkType: hard +"@safe-global/safe-core-sdk-types@npm:^2.2.0": + version: 2.2.0 + resolution: "@safe-global/safe-core-sdk-types@npm:2.2.0" + dependencies: + "@ethersproject/bignumber": ^5.7.0 + "@ethersproject/contracts": ^5.7.0 + "@safe-global/safe-deployments": ^1.26.0 + web3-core: ^1.8.1 + web3-utils: ^1.8.1 + checksum: f1b725c376ce9d409ef5b6f567ce3e5922794f8d47d1ba8964971fa91f975a707e8b7dcd57240963fa54093cb2967f86bb75cf99190eb8f844802434f05650b7 + languageName: node + linkType: hard + +"@safe-global/safe-deployments@npm:^1.26.0": + version: 1.26.0 + resolution: "@safe-global/safe-deployments@npm:1.26.0" + dependencies: + semver: ^7.3.7 + checksum: ea36c04c42f33f679248b4be9477a608b3ad2b4ac87da7c943bac2720ad556fc4d1f87b9ba43b0737fc0a9217bfc232c27042c3720a02cbf7cd90af286d5cb62 + languageName: node + linkType: hard + "@safe-global/safe-gateway-typescript-sdk@npm:^3.5.3": version: 3.7.3 resolution: "@safe-global/safe-gateway-typescript-sdk@npm:3.7.3" @@ -5148,6 +5593,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.1.5": + version: 1.1.5 + resolution: "@scure/bip32@npm:1.1.5" + dependencies: + "@noble/hashes": ~1.2.0 + "@noble/secp256k1": ~1.7.0 + "@scure/base": ~1.1.0 + checksum: b08494ab0d2b1efee7226d1b5100db5157ebea22a78bb87126982a76a186cb3048413e8be0ba2622d00d048a20acbba527af730de86c132a77de616eb9907a3b + languageName: node + linkType: hard + "@scure/bip32@npm:1.3.0": version: 1.3.0 resolution: "@scure/bip32@npm:1.3.0" @@ -5159,6 +5615,16 @@ __metadata: languageName: node linkType: hard +"@scure/bip39@npm:1.1.1": + version: 1.1.1 + resolution: "@scure/bip39@npm:1.1.1" + dependencies: + "@noble/hashes": ~1.2.0 + "@scure/base": ~1.1.0 + checksum: fbb594c50696fa9c14e891d872f382e50a3f919b6c96c55ef2fb10c7102c546dafb8f099a62bd114c12a00525b595dcf7381846f383f0ddcedeaa6e210747d2f + languageName: node + linkType: hard + "@scure/bip39@npm:1.2.0": version: 1.2.0 resolution: "@scure/bip39@npm:1.2.0" @@ -5169,6 +5635,88 @@ __metadata: languageName: node linkType: hard +"@sentry/core@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/core@npm:5.30.0" + dependencies: + "@sentry/hub": 5.30.0 + "@sentry/minimal": 5.30.0 + "@sentry/types": 5.30.0 + "@sentry/utils": 5.30.0 + tslib: ^1.9.3 + checksum: 8a2b22687e70d76fa4381bce215d770b6c08561c5ff5d6afe39c8c3c509c18ee7384ad0be3aee18d3a858a3c88e1d2821cf10eb5e05646376a33200903b56da2 + languageName: node + linkType: hard + +"@sentry/hub@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/hub@npm:5.30.0" + dependencies: + "@sentry/types": 5.30.0 + "@sentry/utils": 5.30.0 + tslib: ^1.9.3 + checksum: 09f778cc78765213f1e35a3ee6da3a8e02a706e8a7e5b7f84614707f4b665c7297b700a1849ab2ca1f02ede5884fd9ae893e58dc65f04f35ccdfee17e99ee93d + languageName: node + linkType: hard + +"@sentry/minimal@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/minimal@npm:5.30.0" + dependencies: + "@sentry/hub": 5.30.0 + "@sentry/types": 5.30.0 + tslib: ^1.9.3 + checksum: 934650f6989ce51f425c7c4b4d4d9bfecface8162a36d21df8a241f780ab1716dd47b81e2170e4cc624797ed1eebe10f71e4876c1e25b787860daaef75ca7a0c + languageName: node + linkType: hard + +"@sentry/node@npm:^5.18.1": + version: 5.30.0 + resolution: "@sentry/node@npm:5.30.0" + dependencies: + "@sentry/core": 5.30.0 + "@sentry/hub": 5.30.0 + "@sentry/tracing": 5.30.0 + "@sentry/types": 5.30.0 + "@sentry/utils": 5.30.0 + cookie: ^0.4.1 + https-proxy-agent: ^5.0.0 + lru_map: ^0.3.3 + tslib: ^1.9.3 + checksum: 5f0367cc52f9d716c64ba727e2a5c8592364494c8fdadfb3df2d0ee9d7956b886fb3ec674370292d2a7b7e1d9a8e1b84c69c06e8a4a064be8d4687698df0090c + languageName: node + linkType: hard + +"@sentry/tracing@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/tracing@npm:5.30.0" + dependencies: + "@sentry/hub": 5.30.0 + "@sentry/minimal": 5.30.0 + "@sentry/types": 5.30.0 + "@sentry/utils": 5.30.0 + tslib: ^1.9.3 + checksum: 720c07b111e8128e70a939ab4e9f9cfd13dc23303b27575afddabab08d08f9b94499017c76a9ffe253bf3ca40833e8f9262cf6dc546ba24da6eb74fedae5f92b + languageName: node + linkType: hard + +"@sentry/types@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/types@npm:5.30.0" + checksum: de7df777824c8e311f143c6fd7de220b24f25b5018312fe8f67d93bebf0f3cdd32bbca9f155846f5c31441d940eebe27c8338000321559a743264c7e41dda560 + languageName: node + linkType: hard + +"@sentry/utils@npm:5.30.0": + version: 5.30.0 + resolution: "@sentry/utils@npm:5.30.0" + dependencies: + "@sentry/types": 5.30.0 + tslib: ^1.9.3 + checksum: 27b259a136c664427641dd32ee3dc490553f3b5e92986accfa829d14063ebc69b191e92209ac9c40fbc367f74cfa17dc93b4c40981d666711fd57b4d51a82062 + languageName: node + linkType: hard + "@sgratzl/boxplots@npm:^1.3.0": version: 1.3.0 resolution: "@sgratzl/boxplots@npm:1.3.0" @@ -5206,6 +5754,13 @@ __metadata: languageName: node linkType: hard +"@sindresorhus/is@npm:^4.0.0, @sindresorhus/is@npm:^4.6.0": + version: 4.6.0 + resolution: "@sindresorhus/is@npm:4.6.0" + checksum: 83839f13da2c29d55c97abc3bc2c55b250d33a0447554997a85c539e058e57b8da092da396e252b11ec24a0279a0bed1f537fa26302209327060643e327f81d2 + languageName: node + linkType: hard + "@sinonjs/commons@npm:^1.7.0": version: 1.8.6 resolution: "@sinonjs/commons@npm:1.8.6" @@ -5613,6 +6168,24 @@ __metadata: languageName: node linkType: hard +"@szmarczak/http-timer@npm:^4.0.5": + version: 4.0.6 + resolution: "@szmarczak/http-timer@npm:4.0.6" + dependencies: + defer-to-connect: ^2.0.0 + checksum: c29df3bcec6fc3bdec2b17981d89d9c9fc9bd7d0c9bcfe92821dc533f4440bc890ccde79971838b4ceed1921d456973c4180d7175ee1d0023ad0562240a58d95 + languageName: node + linkType: hard + +"@szmarczak/http-timer@npm:^5.0.1": + version: 5.0.1 + resolution: "@szmarczak/http-timer@npm:5.0.1" + dependencies: + defer-to-connect: ^2.0.1 + checksum: fc9cb993e808806692e4a3337c90ece0ec00c89f4b67e3652a356b89730da98bc824273a6d67ca84d5f33cd85f317dcd5ce39d8cc0a2f060145a608a7cb8ce92 + languageName: node + linkType: hard + "@tailwindcss/container-queries@npm:^0.1.1": version: 0.1.1 resolution: "@tailwindcss/container-queries@npm:0.1.1" @@ -5761,11 +6334,43 @@ __metadata: languageName: node linkType: hard -"@types/argparse@npm:1.0.38": - version: 1.0.38 - resolution: "@types/argparse@npm:1.0.38" - checksum: 26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb - languageName: node +"@typechain/ethers-v5@npm:^10.2.0": + version: 10.2.1 + resolution: "@typechain/ethers-v5@npm:10.2.1" + dependencies: + lodash: ^4.17.15 + ts-essentials: ^7.0.1 + peerDependencies: + "@ethersproject/abi": ^5.0.0 + "@ethersproject/providers": ^5.0.0 + ethers: ^5.1.3 + typechain: ^8.1.1 + typescript: ">=4.3.0" + checksum: 852da4b1ff368ef87251111a5d50077de3d0fc12c519529269a74223740f8bda89297e67a5eb6c1f5b04ee23119566d6cbccf58264d32a83132be0f328a58d22 + languageName: node + linkType: hard + +"@typechain/hardhat@npm:^6.1.5": + version: 6.1.6 + resolution: "@typechain/hardhat@npm:6.1.6" + dependencies: + fs-extra: ^9.1.0 + peerDependencies: + "@ethersproject/abi": ^5.4.7 + "@ethersproject/providers": ^5.4.7 + "@typechain/ethers-v5": ^10.2.1 + ethers: ^5.4.7 + hardhat: ^2.9.9 + typechain: ^8.1.1 + checksum: f214bebf7860956230478cb92696ba757829cfd9dc65ac99c3bc7e539378310318d92b009054186f446595c8ffc1a81e9c6d028da0eb04253253049ea1b6e8d3 + languageName: node + linkType: hard + +"@types/argparse@npm:1.0.38": + version: 1.0.38 + resolution: "@types/argparse@npm:1.0.38" + checksum: 26ed7e3f1e3595efdb883a852f5205f971b798e4c28b7e30a32c5298eee596e8b45834ce831f014d250b9730819ab05acff5b31229666d3af4ba465b4697d0eb + languageName: node linkType: hard "@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": @@ -5818,6 +6423,24 @@ __metadata: languageName: node linkType: hard +"@types/bn.js@npm:^4.11.3": + version: 4.11.6 + resolution: "@types/bn.js@npm:4.11.6" + dependencies: + "@types/node": "*" + checksum: 7f66f2c7b7b9303b3205a57184261974b114495736b77853af5b18d857c0b33e82ce7146911e86e87a87837de8acae28986716fd381ac7c301fd6e8d8b6c811f + languageName: node + linkType: hard + +"@types/bn.js@npm:^5.1.0, @types/bn.js@npm:^5.1.1": + version: 5.1.1 + resolution: "@types/bn.js@npm:5.1.1" + dependencies: + "@types/node": "*" + checksum: e50ed2dd3abe997e047caf90e0352c71e54fc388679735217978b4ceb7e336e51477791b715f49fd77195ac26dd296c7bad08a3be9750e235f9b2e1edb1b51c2 + languageName: node + linkType: hard + "@types/body-parser@npm:*": version: 1.19.2 resolution: "@types/body-parser@npm:1.19.2" @@ -5846,6 +6469,18 @@ __metadata: languageName: node linkType: hard +"@types/cacheable-request@npm:^6.0.1, @types/cacheable-request@npm:^6.0.2": + version: 6.0.3 + resolution: "@types/cacheable-request@npm:6.0.3" + dependencies: + "@types/http-cache-semantics": "*" + "@types/keyv": ^3.1.4 + "@types/node": "*" + "@types/responselike": ^1.0.0 + checksum: d9b26403fe65ce6b0cb3720b7030104c352bcb37e4fac2a7089a25a97de59c355fa08940658751f2f347a8512aa9d18fdb66ab3ade835975b2f454f2d5befbd9 + languageName: node + linkType: hard + "@types/command-line-args@npm:5.2.0": version: 5.2.0 resolution: "@types/command-line-args@npm:5.2.0" @@ -5993,6 +6628,13 @@ __metadata: languageName: node linkType: hard +"@types/http-cache-semantics@npm:*": + version: 4.0.1 + resolution: "@types/http-cache-semantics@npm:4.0.1" + checksum: 1048aacf627829f0d5f00184e16548205cd9f964bf0841c29b36bc504509230c40bc57c39778703a1c965a6f5b416ae2cbf4c1d4589c889d2838dd9dbfccf6e9 + languageName: node + linkType: hard + "@types/http-proxy@npm:^1.17.8": version: 1.17.11 resolution: "@types/http-proxy@npm:1.17.11" @@ -6080,6 +6722,15 @@ __metadata: languageName: node linkType: hard +"@types/keyv@npm:^3.1.4": + version: 3.1.4 + resolution: "@types/keyv@npm:3.1.4" + dependencies: + "@types/node": "*" + checksum: e009a2bfb50e90ca9b7c6e8f648f8464067271fd99116f881073fa6fa76dc8d0133181dd65e6614d5fb1220d671d67b0124aef7d97dc02d7e342ab143a47779d + languageName: node + linkType: hard + "@types/lodash@npm:^4.14.179": version: 4.14.195 resolution: "@types/lodash@npm:4.14.195" @@ -6087,6 +6738,13 @@ __metadata: languageName: node linkType: hard +"@types/lru-cache@npm:^5.1.0": + version: 5.1.1 + resolution: "@types/lru-cache@npm:5.1.1" + checksum: e1d6c0085f61b16ec5b3073ec76ad1be4844ea036561c3f145fc19f71f084b58a6eb600b14128aa95809d057d28f1d147c910186ae51219f58366ffd2ff2e118 + languageName: node + linkType: hard + "@types/mime-types@npm:^2.1.1": version: 2.1.1 resolution: "@types/mime-types@npm:2.1.1" @@ -6138,7 +6796,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^12.12.54": +"@types/node@npm:^12.12.54, @types/node@npm:^12.12.6": version: 12.20.55 resolution: "@types/node@npm:12.20.55" checksum: e4f86785f4092706e0d3b0edff8dca5a13b45627e4b36700acd8dfe6ad53db71928c8dee914d4276c7fd3b6ccd829aa919811c9eb708a2c8e4c6eb3701178c37 @@ -6173,6 +6831,22 @@ __metadata: languageName: node linkType: hard +"@types/pbkdf2@npm:^3.0.0": + version: 3.1.0 + resolution: "@types/pbkdf2@npm:3.1.0" + dependencies: + "@types/node": "*" + checksum: d15024b1957c21cf3b8887329d9bd8dfde754cf13a09d76ae25f1391cfc62bb8b8d7b760773c5dbaa748172fba8b3e0c3dbe962af6ccbd69b76df12a48dfba40 + languageName: node + linkType: hard + +"@types/prettier@npm:^2.1.1": + version: 2.7.3 + resolution: "@types/prettier@npm:2.7.3" + checksum: 705384209cea6d1433ff6c187c80dcc0b95d99d5c5ce21a46a9a58060c527973506822e428789d842761e0280d25e3359300f017fbe77b9755bc772ab3dc2f83 + languageName: node + linkType: hard + "@types/prettier@npm:^2.1.5": version: 2.7.2 resolution: "@types/prettier@npm:2.7.2" @@ -6292,6 +6966,16 @@ __metadata: languageName: node linkType: hard +"@types/readable-stream@npm:^2.3.13": + version: 2.3.15 + resolution: "@types/readable-stream@npm:2.3.15" + dependencies: + "@types/node": "*" + safe-buffer: ~5.1.1 + checksum: ec36f525cad09b6c65a1dafcb5ad99b9e2ed824ec49b7aa23180ac427e5d35b8a0706193ecd79ab4253a283ad485ba03d5917a98daaaa144f0ea34f4823e9d82 + languageName: node + linkType: hard + "@types/resolve@npm:1.17.1": version: 1.17.1 resolution: "@types/resolve@npm:1.17.1" @@ -6301,6 +6985,15 @@ __metadata: languageName: node linkType: hard +"@types/responselike@npm:^1.0.0": + version: 1.0.0 + resolution: "@types/responselike@npm:1.0.0" + dependencies: + "@types/node": "*" + checksum: e99fc7cc6265407987b30deda54c1c24bb1478803faf6037557a774b2f034c5b097ffd65847daa87e82a61a250d919f35c3588654b0fdaa816906650f596d1b0 + languageName: node + linkType: hard + "@types/retry@npm:0.12.0": version: 0.12.0 resolution: "@types/retry@npm:0.12.0" @@ -6315,6 +7008,15 @@ __metadata: languageName: node linkType: hard +"@types/secp256k1@npm:^4.0.1": + version: 4.0.3 + resolution: "@types/secp256k1@npm:4.0.3" + dependencies: + "@types/node": "*" + checksum: 1bd10b9afa724084b655dc81b7b315def3d2d0e272014ef16009fa76e17537411c07c0695fdea412bc7b36d2a02687f5fea33522d55b8ef29eda42992f812913 + languageName: node + linkType: hard + "@types/semver@npm:^7.3.12": version: 7.5.0 resolution: "@types/semver@npm:7.5.0" @@ -7386,6 +8088,37 @@ __metadata: languageName: node linkType: hard +"abort-controller@npm:^3.0.0": + version: 3.0.0 + resolution: "abort-controller@npm:3.0.0" + dependencies: + event-target-shim: ^5.0.0 + checksum: 170bdba9b47b7e65906a28c8ce4f38a7a369d78e2271706f020849c1bfe0ee2067d4261df8bbb66eb84f79208fd5b710df759d64191db58cfba7ce8ef9c54b75 + languageName: node + linkType: hard + +"abortcontroller-polyfill@npm:^1.7.3": + version: 1.7.5 + resolution: "abortcontroller-polyfill@npm:1.7.5" + checksum: daf4169f4228ae0e4f4dbcfa782e501b923667f2666b7c55bd3b7664e5d6b100e333a93371173985fdf21f65d7dfba15bdb2e6031bdc9e57e4ce0297147da3aa + languageName: node + linkType: hard + +"abstract-level@npm:^1.0.0, abstract-level@npm:^1.0.2, abstract-level@npm:^1.0.3": + version: 1.0.3 + resolution: "abstract-level@npm:1.0.3" + dependencies: + buffer: ^6.0.3 + catering: ^2.1.0 + is-buffer: ^2.0.5 + level-supports: ^4.0.0 + level-transcoder: ^1.0.1 + module-error: ^1.0.1 + queue-microtask: ^1.2.3 + checksum: 70d61a3924526ebc257b138992052f9ff571a6cee5a7660836e37a1cc7081273c3acf465dd2f5e1897b38dc743a6fd9dba14a5d8a2a9d39e5787cd3da99f301d + languageName: node + linkType: hard + "accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" @@ -7473,6 +8206,13 @@ __metadata: languageName: node linkType: hard +"adm-zip@npm:^0.4.16": + version: 0.4.16 + resolution: "adm-zip@npm:0.4.16" + checksum: 5ea46664d8b3b073fffeb7f934705fea288708745e708cffc1dd732ce3d2672cecd476b243f9d051892fd12952db2b6bd061975e1ff40057246f6d0cb6534a50 + languageName: node + linkType: hard + "aes-js@npm:3.0.0": version: 3.0.0 resolution: "aes-js@npm:3.0.0" @@ -7570,7 +8310,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5": +"ajv@npm:^6.10.0, ajv@npm:^6.12.2, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -7582,14 +8322,21 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.3, ansi-colors@npm:^4.1.3": +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 + languageName: node + linkType: hard + +"ansi-colors@npm:4.1.3, ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e languageName: node linkType: hard -"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.1": +"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.0, ansi-escapes@npm:^4.3.1": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -7964,6 +8711,34 @@ __metadata: languageName: node linkType: hard +"asn1@npm:~0.2.3": + version: 0.2.6 + resolution: "asn1@npm:0.2.6" + dependencies: + safer-buffer: ~2.1.0 + checksum: 39f2ae343b03c15ad4f238ba561e626602a3de8d94ae536c46a4a93e69578826305366dc09fbb9b56aec39b4982a463682f259c38e59f6fa380cd72cd61e493d + languageName: node + linkType: hard + +"assert-plus@npm:1.0.0, assert-plus@npm:^1.0.0": + version: 1.0.0 + resolution: "assert-plus@npm:1.0.0" + checksum: 19b4340cb8f0e6a981c07225eacac0e9d52c2644c080198765d63398f0075f83bbc0c8e95474d54224e297555ad0d631c1dcd058adb1ddc2437b41a6b424ac64 + languageName: node + linkType: hard + +"assert@npm:^2.0.0": + version: 2.0.0 + resolution: "assert@npm:2.0.0" + dependencies: + es6-object-assign: ^1.1.0 + is-nan: ^1.2.1 + object-is: ^1.0.1 + util: ^0.12.0 + checksum: bb91f181a86d10588ee16c5e09c280f9811373974c29974cbe401987ea34e966699d7989a812b0e19377b511ea0bc627f5905647ce569311824848ede382cae8 + languageName: node + linkType: hard + "ast-types-flow@npm:^0.0.7": version: 0.0.7 resolution: "ast-types-flow@npm:0.0.7" @@ -7971,6 +8746,13 @@ __metadata: languageName: node linkType: hard +"async-limiter@npm:~1.0.0": + version: 1.0.1 + resolution: "async-limiter@npm:1.0.1" + checksum: 2b849695b465d93ad44c116220dee29a5aeb63adac16c1088983c339b0de57d76e82533e8e364a93a9f997f28bbfc6a92948cefc120652bd07f3b59f8d75cf2b + languageName: node + linkType: hard + "async-mutex@npm:^0.2.6": version: 0.2.6 resolution: "async-mutex@npm:0.2.6" @@ -8033,6 +8815,20 @@ __metadata: languageName: node linkType: hard +"aws-sign2@npm:~0.7.0": + version: 0.7.0 + resolution: "aws-sign2@npm:0.7.0" + checksum: b148b0bb0778098ad8cf7e5fc619768bcb51236707ca1d3e5b49e41b171166d8be9fdc2ea2ae43d7decf02989d0aaa3a9c4caa6f320af95d684de9b548a71525 + languageName: node + linkType: hard + +"aws4@npm:^1.8.0": + version: 1.12.0 + resolution: "aws4@npm:1.12.0" + checksum: 68f79708ac7c335992730bf638286a3ee0a645cf12575d557860100767c500c08b30e24726b9f03265d74116417f628af78509e1333575e9f8d52a80edfe8cbc + languageName: node + linkType: hard + "axe-core@npm:^4.6.2": version: 4.7.2 resolution: "axe-core@npm:4.7.2" @@ -8305,7 +9101,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:^3.0.2": +"base-x@npm:^3.0.2, base-x@npm:^3.0.8": version: 3.0.9 resolution: "base-x@npm:3.0.9" dependencies: @@ -8328,6 +9124,15 @@ __metadata: languageName: node linkType: hard +"bcrypt-pbkdf@npm:^1.0.0": + version: 1.0.2 + resolution: "bcrypt-pbkdf@npm:1.0.2" + dependencies: + tweetnacl: ^0.14.3 + checksum: 4edfc9fe7d07019609ccf797a2af28351736e9d012c8402a07120c4453a3b789a15f2ee1530dc49eee8f7eb9379331a8dd4b3766042b9e502f74a68e7f662291 + languageName: node + linkType: hard + "bcrypt@npm:^5.1.0": version: 5.1.0 resolution: "bcrypt@npm:5.1.0" @@ -8388,6 +9193,20 @@ __metadata: languageName: node linkType: hard +"bigint-crypto-utils@npm:^3.0.23": + version: 3.3.0 + resolution: "bigint-crypto-utils@npm:3.3.0" + checksum: 9598ce57b23f776c8936d44114c9f051e62b5fa654915b664784cbcbacc5aa0485f4479571c51ff58008abb1210c0d6a234853742f07cf84bda890f2a1e01000 + languageName: node + linkType: hard + +"bignumber.js@npm:^9.0.0": + version: 9.1.1 + resolution: "bignumber.js@npm:9.1.1" + checksum: ad243b7e2f9120b112d670bb3d674128f0bd2ca1745b0a6c9df0433bd2c0252c43e6315d944c2ac07b4c639e7496b425e46842773cf89c6a2dcd4f31e5c4b11e + languageName: node + linkType: hard + "bin-packer@npm:^1.7.0": version: 1.7.0 resolution: "bin-packer@npm:1.7.0" @@ -8436,21 +9255,35 @@ __metadata: languageName: node linkType: hard -"bluebird@npm:^3.5.5": +"blakejs@npm:^1.1.0": + version: 1.2.1 + resolution: "blakejs@npm:1.2.1" + checksum: d699ba116cfa21d0b01d12014a03e484dd76d483133e6dc9eb415aa70a119f08beb3bcefb8c71840106a00b542cba77383f8be60cd1f0d4589cb8afb922eefbe + languageName: node + linkType: hard + +"bluebird@npm:^3.5.0, bluebird@npm:^3.5.5": version: 3.7.2 resolution: "bluebird@npm:3.7.2" checksum: 869417503c722e7dc54ca46715f70e15f4d9c602a423a02c825570862d12935be59ed9c7ba34a9b31f186c017c23cac6b54e35446f8353059c101da73eac22ef languageName: node linkType: hard -"bn.js@npm:^4.11.9": +"bn.js@npm:4.11.6": + version: 4.11.6 + resolution: "bn.js@npm:4.11.6" + checksum: db23047bf06fdf9cf74401c8e76bca9f55313c81df382247d2c753868b368562e69171716b81b7038ada8860af18346fd4bcd1cf9d4963f923fe8e54e61cb58a + languageName: node + linkType: hard + +"bn.js@npm:^4.11.0, bn.js@npm:^4.11.6, bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 39afb4f15f4ea537b55eaf1446c896af28ac948fdcf47171961475724d1bb65118cca49fa6e3d67706e4790955ec0e74de584e45c8f1ef89f46c812bee5b5a12 languageName: node linkType: hard -"bn.js@npm:^5.0.0, bn.js@npm:^5.1.1, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": +"bn.js@npm:^5.0.0, bn.js@npm:^5.1.1, bn.js@npm:^5.1.2, bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" checksum: 3dd8c8d38055fedfa95c1d5fc3c99f8dd547b36287b37768db0abab3c239711f88ff58d18d155dd8ad902b0b0cee973747b7ae20ea12a09473272b0201c9edd3 @@ -8477,7 +9310,7 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2": +"body-parser@npm:1.20.2, body-parser@npm:^1.16.0": version: 1.20.2 resolution: "body-parser@npm:1.20.2" dependencies: @@ -8578,6 +9411,18 @@ __metadata: languageName: node linkType: hard +"browser-level@npm:^1.0.1": + version: 1.0.1 + resolution: "browser-level@npm:1.0.1" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.1 + module-error: ^1.0.2 + run-parallel-limit: ^1.1.0 + checksum: 67fbc77ce832940bfa25073eccff279f512ad56f545deb996a5b23b02316f5e76f4a79d381acc27eda983f5c9a2566aaf9c97e4fdd0748288c4407307537a29b + languageName: node + linkType: hard + "browser-process-hrtime@npm:^1.0.0": version: 1.0.0 resolution: "browser-process-hrtime@npm:1.0.0" @@ -8585,6 +9430,27 @@ __metadata: languageName: node linkType: hard +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: b717b19b25952dd6af483e368f9bcd6b14b87740c3d226c2977a65e84666ffd67000bddea7d911f111a9b6ddc822b234de42d52ab6507bce4119a4cc003ef7b3 + languageName: node + linkType: hard + +"browserify-aes@npm:^1.2.0": + version: 1.2.0 + resolution: "browserify-aes@npm:1.2.0" + dependencies: + buffer-xor: ^1.0.3 + cipher-base: ^1.0.0 + create-hash: ^1.1.0 + evp_bytestokey: ^1.0.3 + inherits: ^2.0.1 + safe-buffer: ^5.0.1 + checksum: 4a17c3eb55a2aa61c934c286f34921933086bf6d67f02d4adb09fcc6f2fc93977b47d9d884c25619144fccd47b3b3a399e1ad8b3ff5a346be47270114bcf7104 + languageName: node + linkType: hard + "browserslist@npm:^4.0.0, browserslist@npm:^4.14.5, browserslist@npm:^4.18.1, browserslist@npm:^4.21.3, browserslist@npm:^4.21.4, browserslist@npm:^4.21.5": version: 4.21.5 resolution: "browserslist@npm:4.21.5" @@ -8617,6 +9483,17 @@ __metadata: languageName: node linkType: hard +"bs58check@npm:^2.1.2": + version: 2.1.2 + resolution: "bs58check@npm:2.1.2" + dependencies: + bs58: ^4.0.0 + create-hash: ^1.1.0 + safe-buffer: ^5.1.2 + checksum: 43bdf08a5dd04581b78f040bc4169480e17008da482ffe2a6507327bbc4fc5c28de0501f7faf22901cfe57fbca79cbb202ca529003fedb4cb8dccd265b38e54d + languageName: node + linkType: hard + "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -8658,6 +9535,20 @@ __metadata: languageName: node linkType: hard +"buffer-to-arraybuffer@npm:^0.0.5": + version: 0.0.5 + resolution: "buffer-to-arraybuffer@npm:0.0.5" + checksum: b2e6493a6679e03d0e0e146b4258b9a6d92649d528d8fc4a74423b77f0d4f9398c9f965f3378d1683a91738054bae2761196cfe233f41ab3695126cb58cb25f9 + languageName: node + linkType: hard + +"buffer-xor@npm:^1.0.3": + version: 1.0.3 + resolution: "buffer-xor@npm:1.0.3" + checksum: 10c520df29d62fa6e785e2800e586a20fc4f6dfad84bcdbd12e1e8a83856de1cb75c7ebd7abe6d036bbfab738a6cf18a3ae9c8e5a2e2eb3167ca7399ce65373a + languageName: node + linkType: hard + "buffer@npm:6.0.3, buffer@npm:^6.0.3, buffer@npm:~6.0.3": version: 6.0.3 resolution: "buffer@npm:6.0.3" @@ -8668,7 +9559,7 @@ __metadata: languageName: node linkType: hard -"buffer@npm:^5.5.0, buffer@npm:^5.6.0": +"buffer@npm:^5.0.5, buffer@npm:^5.5.0, buffer@npm:^5.6.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" dependencies: @@ -8763,6 +9654,35 @@ __metadata: languageName: node linkType: hard +"cacheable-lookup@npm:^5.0.3": + version: 5.0.4 + resolution: "cacheable-lookup@npm:5.0.4" + checksum: 763e02cf9196bc9afccacd8c418d942fc2677f22261969a4c2c2e760fa44a2351a81557bd908291c3921fe9beb10b976ba8fa50c5ca837c5a0dd945f16468f2d + languageName: node + linkType: hard + +"cacheable-lookup@npm:^6.0.4": + version: 6.1.0 + resolution: "cacheable-lookup@npm:6.1.0" + checksum: 4e37afe897219b1035335b0765106a2c970ffa930497b43cac5000b860f3b17f48d004187279fae97e2e4cbf6a3693709b6d64af65279c7d6c8453321d36d118 + languageName: node + linkType: hard + +"cacheable-request@npm:^7.0.2": + version: 7.0.4 + resolution: "cacheable-request@npm:7.0.4" + dependencies: + clone-response: ^1.0.2 + get-stream: ^5.1.0 + http-cache-semantics: ^4.0.0 + keyv: ^4.0.0 + lowercase-keys: ^2.0.0 + normalize-url: ^6.0.1 + responselike: ^2.0.0 + checksum: 0de9df773fd4e7dd9bd118959878f8f2163867e2e1ab3575ffbecbe6e75e80513dd0c68ba30005e5e5a7b377cc6162bbc00ab1db019bb4e9cb3c2f3f7a6f1ee4 + languageName: node + linkType: hard + "call-bind@npm:^1.0.0, call-bind@npm:^1.0.2": version: 1.0.2 resolution: "call-bind@npm:1.0.2" @@ -8804,7 +9724,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0, camelcase@npm:^6.2.1": +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0, camelcase@npm:^6.2.1": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -8837,6 +9757,27 @@ __metadata: languageName: node linkType: hard +"case@npm:^1.6.3": + version: 1.6.3 + resolution: "case@npm:1.6.3" + checksum: febe73278f910b0d28aab7efd6f51c235f9aa9e296148edb56dfb83fd58faa88308c30ce9a0122b6e53e0362c44f4407105bd5ef89c46860fc2b184e540fd68d + languageName: node + linkType: hard + +"caseless@npm:~0.12.0": + version: 0.12.0 + resolution: "caseless@npm:0.12.0" + checksum: b43bd4c440aa1e8ee6baefee8063b4850fd0d7b378f6aabc796c9ec8cb26d27fb30b46885350777d9bd079c5256c0e1329ad0dc7c2817e0bb466810ebb353751 + languageName: node + linkType: hard + +"catering@npm:^2.1.0, catering@npm:^2.1.1": + version: 2.1.1 + resolution: "catering@npm:2.1.1" + checksum: 205daefa69c935b0c19f3d8f2e0a520dd69aebe9bda55902958003f7c9cff8f967dfb90071b421bd6eb618576f657a89d2bc0986872c9bc04bbd66655e9d4bd6 + languageName: node + linkType: hard + "chalk@npm:4.1.2, chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": version: 4.1.2 resolution: "chalk@npm:4.1.2" @@ -8921,7 +9862,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:3.5.3, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": +"chokidar@npm:3.5.3, chokidar@npm:^3.4.0, chokidar@npm:^3.4.2, chokidar@npm:^3.5.2, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -8940,6 +9881,13 @@ __metadata: languageName: node linkType: hard +"chownr@npm:^1.1.4": + version: 1.1.4 + resolution: "chownr@npm:1.1.4" + checksum: 115648f8eb38bac5e41c3857f3e663f9c39ed6480d1349977c4d96c95a47266fcacc5a5aabf3cb6c481e22d72f41992827db47301851766c4fd77ac21a4f081d + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -8954,6 +9902,13 @@ __metadata: languageName: node linkType: hard +"ci-info@npm:^2.0.0": + version: 2.0.0 + resolution: "ci-info@npm:2.0.0" + checksum: 3b374666a85ea3ca43fa49aa3a048d21c9b475c96eb13c133505d2324e7ae5efd6a454f41efe46a152269e9b6a00c9edbe63ec7fa1921957165aae16625acd67 + languageName: node + linkType: hard + "ci-info@npm:^3.2.0": version: 3.8.0 resolution: "ci-info@npm:3.8.0" @@ -8961,6 +9916,29 @@ __metadata: languageName: node linkType: hard +"cids@npm:^0.7.1": + version: 0.7.5 + resolution: "cids@npm:0.7.5" + dependencies: + buffer: ^5.5.0 + class-is: ^1.1.0 + multibase: ~0.6.0 + multicodec: ^1.0.0 + multihashes: ~0.4.15 + checksum: 54aa031bef76b08a2c934237696a4af2cfc8afb5d2727cb39ab69f6ac142ef312b9a0c6070dc2b4be0a43076d8961339d8bf85287773c647b3d1d25ce203f325 + languageName: node + linkType: hard + +"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": + version: 1.0.4 + resolution: "cipher-base@npm:1.0.4" + dependencies: + inherits: ^2.0.1 + safe-buffer: ^5.0.1 + checksum: 47d3568dbc17431a339bad1fe7dff83ac0891be8206911ace3d3b818fc695f376df809bea406e759cdea07fff4b454fa25f1013e648851bec790c1d75763032e + languageName: node + linkType: hard + "cjs-module-lexer@npm:^1.0.0": version: 1.2.2 resolution: "cjs-module-lexer@npm:1.2.2" @@ -8968,6 +9946,13 @@ __metadata: languageName: node linkType: hard +"class-is@npm:^1.1.0": + version: 1.1.0 + resolution: "class-is@npm:1.1.0" + checksum: 49024de3b264fc501a38dd59d8668f1a2b4973fa6fcef6b83d80fe6fe99a2000a8fbea5b50d4607169c65014843c9f6b41a4f8473df806c1b4787b4d47521880 + languageName: node + linkType: hard + "class-transformer@npm:^0.5.1": version: 0.5.1 resolution: "class-transformer@npm:0.5.1" @@ -8986,6 +9971,20 @@ __metadata: languageName: node linkType: hard +"classic-level@npm:^1.2.0": + version: 1.3.0 + resolution: "classic-level@npm:1.3.0" + dependencies: + abstract-level: ^1.0.2 + catering: ^2.1.0 + module-error: ^1.0.1 + napi-macros: ^2.2.2 + node-gyp: latest + node-gyp-build: ^4.3.0 + checksum: 773da48aef52a041115d413fee8340b357a4da2eb505764f327183b155edd7cc9d24819eb4f707c83dbdae8588024f5dddeb322125567c59d5d1f6f16334cdb9 + languageName: node + linkType: hard + "clean-css@npm:^5.2.2": version: 5.3.2 resolution: "clean-css@npm:5.3.2" @@ -9078,6 +10077,15 @@ __metadata: languageName: node linkType: hard +"clone-response@npm:^1.0.2": + version: 1.0.3 + resolution: "clone-response@npm:1.0.3" + dependencies: + mimic-response: ^1.0.0 + checksum: 4e671cac39b11c60aa8ba0a450657194a5d6504df51bca3fac5b3bd0145c4f8e8464898f87c8406b83232e3bc5cca555f51c1f9c8ac023969ebfbf7f6bdabb2e + languageName: node + linkType: hard + "clone@npm:^1.0.2": version: 1.0.4 resolution: "clone@npm:1.0.4" @@ -9216,7 +10224,7 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8": +"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8, combined-stream@npm:~1.0.6": version: 1.0.8 resolution: "combined-stream@npm:1.0.8" dependencies: @@ -9225,7 +10233,14 @@ __metadata: languageName: node linkType: hard -"command-line-args@npm:5.2.1": +"command-exists@npm:^1.2.8": + version: 1.2.9 + resolution: "command-exists@npm:1.2.9" + checksum: 729ae3d88a2058c93c58840f30341b7f82688a573019535d198b57a4d8cb0135ced0ad7f52b591e5b28a90feb2c675080ce916e56254a0f7c15cb2395277cac3 + languageName: node + linkType: hard + +"command-line-args@npm:5.2.1, command-line-args@npm:^5.1.1": version: 5.2.1 resolution: "command-line-args@npm:5.2.1" dependencies: @@ -9237,7 +10252,7 @@ __metadata: languageName: node linkType: hard -"command-line-usage@npm:6.1.3": +"command-line-usage@npm:6.1.3, command-line-usage@npm:^6.1.0": version: 6.1.3 resolution: "command-line-usage@npm:6.1.3" dependencies: @@ -9249,6 +10264,13 @@ __metadata: languageName: node linkType: hard +"commander@npm:3.0.2": + version: 3.0.2 + resolution: "commander@npm:3.0.2" + checksum: 6d14ad030d1904428139487ed31febcb04c1604db2b8d9fae711f60ee6718828dc0e11602249e91c8a97b0e721e9c6d53edbc166bad3cde1596851d59a8f824d + languageName: node + linkType: hard + "commander@npm:4.1.1, commander@npm:^4.0.0": version: 4.1.1 resolution: "commander@npm:4.1.1" @@ -9399,6 +10421,17 @@ __metadata: languageName: node linkType: hard +"content-hash@npm:^2.5.2": + version: 2.5.2 + resolution: "content-hash@npm:2.5.2" + dependencies: + cids: ^0.7.1 + multicodec: ^0.5.5 + multihashes: ^0.4.15 + checksum: 31869e4d137b59d02003df0c0f0ad080744d878ed12a57f7d20b2cfd526d59d6317e9f52fa6e49cba59df7f9ab49ceb96d6a832685b85bae442e0c906f7193be + languageName: node + linkType: hard + "content-type@npm:~1.0.4, content-type@npm:~1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" @@ -9434,6 +10467,13 @@ __metadata: languageName: node linkType: hard +"cookie@npm:^0.4.1": + version: 0.4.2 + resolution: "cookie@npm:0.4.2" + checksum: a00833c998bedf8e787b4c342defe5fa419abd96b32f4464f718b91022586b8f1bafbddd499288e75c037642493c83083da426c6a9080d309e3bd90fd11baa9b + languageName: node + linkType: hard + "cookiejar@npm:^2.1.4": version: 2.1.4 resolution: "cookiejar@npm:2.1.4" @@ -9473,6 +10513,13 @@ __metadata: languageName: node linkType: hard +"core-util-is@npm:1.0.2": + version: 1.0.2 + resolution: "core-util-is@npm:1.0.2" + checksum: 7a4c925b497a2c91421e25bf76d6d8190f0b2359a9200dbeed136e63b2931d6294d3b1893eda378883ed363cd950f44a12a401384c609839ea616befb7927dab + languageName: node + linkType: hard + "core-util-is@npm:~1.0.0": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" @@ -9480,7 +10527,7 @@ __metadata: languageName: node linkType: hard -"cors@npm:2.8.5": +"cors@npm:2.8.5, cors@npm:^2.8.1": version: 2.8.5 resolution: "cors@npm:2.8.5" dependencies: @@ -9537,10 +10584,46 @@ __metadata: languageName: node linkType: hard -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff +"crc-32@npm:^1.2.0": + version: 1.2.2 + resolution: "crc-32@npm:1.2.2" + bin: + crc32: bin/crc32.njs + checksum: ad2d0ad0cbd465b75dcaeeff0600f8195b686816ab5f3ba4c6e052a07f728c3e70df2e3ca9fd3d4484dc4ba70586e161ca5a2334ec8bf5a41bf022a6103ff243 + languageName: node + linkType: hard + +"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": + version: 1.2.0 + resolution: "create-hash@npm:1.2.0" + dependencies: + cipher-base: ^1.0.1 + inherits: ^2.0.1 + md5.js: ^1.3.4 + ripemd160: ^2.0.1 + sha.js: ^2.4.0 + checksum: 02a6ae3bb9cd4afee3fabd846c1d8426a0e6b495560a977ba46120c473cb283be6aa1cace76b5f927cf4e499c6146fb798253e48e83d522feba807d6b722eaa9 + languageName: node + linkType: hard + +"create-hmac@npm:^1.1.4, create-hmac@npm:^1.1.7": + version: 1.1.7 + resolution: "create-hmac@npm:1.1.7" + dependencies: + cipher-base: ^1.0.3 + create-hash: ^1.1.0 + inherits: ^2.0.1 + ripemd160: ^2.0.0 + safe-buffer: ^5.0.1 + sha.js: ^2.4.8 + checksum: ba12bb2257b585a0396108c72830e85f882ab659c3320c83584b1037f8ab72415095167ced80dc4ce8e446a8ecc4b2acf36d87befe0707d73b26cf9dc77440ed + languageName: node + linkType: hard + +"create-require@npm:^1.1.0": + version: 1.1.1 + resolution: "create-require@npm:1.1.1" + checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff languageName: node linkType: hard @@ -10181,6 +11264,16 @@ __metadata: languageName: node linkType: hard +"d@npm:1, d@npm:^1.0.1": + version: 1.0.1 + resolution: "d@npm:1.0.1" + dependencies: + es5-ext: ^0.10.50 + type: ^1.0.1 + checksum: 49ca0639c7b822db670de93d4fbce44b4aa072cd848c76292c9978a8cd0fff1028763020ff4b0f147bd77bfe29b4c7f82e0f71ade76b2a06100543cdfd948d19 + languageName: node + linkType: hard + "damerau-levenshtein@npm:^1.0.8": version: 1.0.8 resolution: "damerau-levenshtein@npm:1.0.8" @@ -10188,6 +11281,15 @@ __metadata: languageName: node linkType: hard +"dashdash@npm:^1.12.0": + version: 1.14.1 + resolution: "dashdash@npm:1.14.1" + dependencies: + assert-plus: ^1.0.0 + checksum: 3634c249570f7f34e3d34f866c93f866c5b417f0dd616275decae08147dcdf8fccfaa5947380ccfb0473998ea3a8057c0b4cd90c875740ee685d0624b2983598 + languageName: node + linkType: hard + "data-urls@npm:^2.0.0": version: 2.0.0 resolution: "data-urls@npm:2.0.0" @@ -10217,7 +11319,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:2.6.9, debug@npm:^2.6.0": +"debug@npm:2.6.9, debug@npm:^2.2.0, debug@npm:^2.6.0": version: 2.6.9 resolution: "debug@npm:2.6.9" dependencies: @@ -10226,7 +11328,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.x, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:4.x, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -10254,6 +11356,13 @@ __metadata: languageName: node linkType: hard +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + "decimal.js@npm:^10.2.1": version: 10.4.3 resolution: "decimal.js@npm:10.4.3" @@ -10268,6 +11377,24 @@ __metadata: languageName: node linkType: hard +"decompress-response@npm:^3.3.0": + version: 3.3.0 + resolution: "decompress-response@npm:3.3.0" + dependencies: + mimic-response: ^1.0.0 + checksum: 952552ac3bd7de2fc18015086b09468645c9638d98a551305e485230ada278c039c91116e946d07894b39ee53c0f0d5b6473f25a224029344354513b412d7380 + languageName: node + linkType: hard + +"decompress-response@npm:^6.0.0": + version: 6.0.0 + resolution: "decompress-response@npm:6.0.0" + dependencies: + mimic-response: ^3.1.0 + checksum: d377cf47e02d805e283866c3f50d3d21578b779731e8c5072d6ce8c13cc31493db1c2f6784da9d1d5250822120cefa44f1deab112d5981015f2e17444b763812 + languageName: node + linkType: hard + "dedent@npm:^0.7.0": version: 0.7.0 resolution: "dedent@npm:0.7.0" @@ -10369,6 +11496,13 @@ __metadata: languageName: node linkType: hard +"defer-to-connect@npm:^2.0.0, defer-to-connect@npm:^2.0.1": + version: 2.0.1 + resolution: "defer-to-connect@npm:2.0.1" + checksum: 8a9b50d2f25446c0bfefb55a48e90afd58f85b21bcf78e9207cd7b804354f6409032a1705c2491686e202e64fc05f147aa5aa45f9aa82627563f045937f5791b + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -10530,6 +11664,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -10706,6 +11847,13 @@ __metadata: languageName: node linkType: hard +"dom-walk@npm:^0.1.0": + version: 0.1.2 + resolution: "dom-walk@npm:0.1.2" + checksum: 19eb0ce9c6de39d5e231530685248545d9cd2bd97b2cb3486e0bfc0f2a393a9addddfd5557463a932b52fdfcf68ad2a619020cd2c74a5fe46fbecaa8e80872f3 + languageName: node + linkType: hard + "domelementtype@npm:1": version: 1.3.1 resolution: "domelementtype@npm:1.3.1" @@ -10842,6 +11990,16 @@ __metadata: languageName: node linkType: hard +"ecc-jsbn@npm:~0.1.1": + version: 0.1.2 + resolution: "ecc-jsbn@npm:0.1.2" + dependencies: + jsbn: ~0.1.0 + safer-buffer: ^2.1.0 + checksum: 22fef4b6203e5f31d425f5b711eb389e4c6c2723402e389af394f8411b76a488fa414d309d866e2b577ce3e8462d344205545c88a8143cc21752a5172818888a + languageName: node + linkType: hard + "ecdsa-sig-formatter@npm:1.0.11": version: 1.0.11 resolution: "ecdsa-sig-formatter@npm:1.0.11" @@ -10885,7 +12043,7 @@ __metadata: languageName: node linkType: hard -"elliptic@npm:6.5.4": +"elliptic@npm:6.5.4, elliptic@npm:^6.4.0, elliptic@npm:^6.5.2, elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" dependencies: @@ -10998,6 +12156,16 @@ __metadata: languageName: node linkType: hard +"enquirer@npm:^2.3.0": + version: 2.4.1 + resolution: "enquirer@npm:2.4.1" + dependencies: + ansi-colors: ^4.1.1 + strip-ansi: ^6.0.1 + checksum: f080f11a74209647dbf347a7c6a83c8a47ae1ebf1e75073a808bc1088eb780aa54075bfecd1bcdb3e3c724520edb8e6ee05da031529436b421b71066fcc48cb5 + languageName: node + linkType: hard + "entities@npm:^2.0.0": version: 2.2.0 resolution: "entities@npm:2.2.0" @@ -11153,7 +12321,36 @@ __metadata: languageName: node linkType: hard -"es6-promise@npm:^4.0.3": +"es5-ext@npm:^0.10.35, es5-ext@npm:^0.10.50": + version: 0.10.62 + resolution: "es5-ext@npm:0.10.62" + dependencies: + es6-iterator: ^2.0.3 + es6-symbol: ^3.1.3 + next-tick: ^1.1.0 + checksum: 25f42f6068cfc6e393cf670bc5bba249132c5f5ec2dd0ed6e200e6274aca2fed8e9aec8a31c76031744c78ca283c57f0b41c7e737804c6328c7b8d3fbcba7983 + languageName: node + linkType: hard + +"es6-iterator@npm:^2.0.3": + version: 2.0.3 + resolution: "es6-iterator@npm:2.0.3" + dependencies: + d: 1 + es5-ext: ^0.10.35 + es6-symbol: ^3.1.1 + checksum: 6e48b1c2d962c21dee604b3d9f0bc3889f11ed5a8b33689155a2065d20e3107e2a69cc63a71bd125aeee3a589182f8bbcb5c8a05b6a8f38fa4205671b6d09697 + languageName: node + linkType: hard + +"es6-object-assign@npm:^1.1.0": + version: 1.1.0 + resolution: "es6-object-assign@npm:1.1.0" + checksum: 8d4fdf63484d78b5c64cacc2c2e1165bc7b6a64b739d2a9db6a4dc8641d99cc9efb433cdd4dc3d3d6b00bfa6ce959694e4665e3255190339945c5f33b692b5d8 + languageName: node + linkType: hard + +"es6-promise@npm:^4.0.3, es6-promise@npm:^4.2.8": version: 4.2.8 resolution: "es6-promise@npm:4.2.8" checksum: 95614a88873611cb9165a85d36afa7268af5c03a378b35ca7bda9508e1d4f1f6f19a788d4bc755b3fd37c8ebba40782018e02034564ff24c9d6fa37e959ad57d @@ -11169,6 +12366,16 @@ __metadata: languageName: node linkType: hard +"es6-symbol@npm:^3.1.1, es6-symbol@npm:^3.1.3": + version: 3.1.3 + resolution: "es6-symbol@npm:3.1.3" + dependencies: + d: ^1.0.1 + ext: ^1.1.2 + checksum: cd49722c2a70f011eb02143ef1c8c70658d2660dead6641e160b94619f408b9cf66425515787ffe338affdf0285ad54f4eae30ea5bd510e33f8659ec53bcaa70 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -11183,6 +12390,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -11197,13 +12411,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 - languageName: node - linkType: hard - "escodegen@npm:^2.0.0": version: 2.0.0 resolution: "escodegen@npm:2.0.0" @@ -11682,6 +12889,16 @@ __metadata: languageName: node linkType: hard +"eth-ens-namehash@npm:2.0.8": + version: 2.0.8 + resolution: "eth-ens-namehash@npm:2.0.8" + dependencies: + idna-uts46-hx: ^2.3.1 + js-sha3: ^0.5.7 + checksum: 40ce4aeedaa4e7eb4485c8d8857457ecc46a4652396981d21b7e3a5f922d5beff63c71cb4b283c935293e530eba50b329d9248be3c433949c6bc40c850c202a3 + languageName: node + linkType: hard + "eth-json-rpc-filters@npm:5.1.0": version: 5.1.0 resolution: "eth-json-rpc-filters@npm:5.1.0" @@ -11695,6 +12912,31 @@ __metadata: languageName: node linkType: hard +"eth-lib@npm:0.2.8": + version: 0.2.8 + resolution: "eth-lib@npm:0.2.8" + dependencies: + bn.js: ^4.11.6 + elliptic: ^6.4.0 + xhr-request-promise: ^0.1.2 + checksum: be7efb0b08a78e20d12d2892363ecbbc557a367573ac82fc26a549a77a1b13c7747e6eadbb88026634828fcf9278884b555035787b575b1cab5e6958faad0fad + languageName: node + linkType: hard + +"eth-lib@npm:^0.1.26": + version: 0.1.29 + resolution: "eth-lib@npm:0.1.29" + dependencies: + bn.js: ^4.11.6 + elliptic: ^6.4.0 + nano-json-stream-parser: ^0.1.2 + servify: ^0.1.12 + ws: ^3.0.0 + xhr-request-promise: ^0.1.2 + checksum: d1494fc0af372d46d1c9e7506cfbfa81b9073d98081cf4cbe518932f88bee40cf46a764590f1f8aba03d4a534fa2b1cd794fa2a4f235f656d82b8ab185b5cb9d + languageName: node + linkType: hard + "eth-query@npm:^2.1.2": version: 2.1.2 resolution: "eth-query@npm:2.1.2" @@ -11723,7 +12965,89 @@ __metadata: languageName: node linkType: hard -"ethers@npm:^5.7.2": +"ethereum-bloom-filters@npm:^1.0.6": + version: 1.0.10 + resolution: "ethereum-bloom-filters@npm:1.0.10" + dependencies: + js-sha3: ^0.8.0 + checksum: 4019cc6f9274ae271a52959194a72f6e9b013366f168f922dc3b349319faf7426bf1010125ee0676b4f75714fe4a440edd4e7e62342c121a046409f4cd4c0af9 + languageName: node + linkType: hard + +"ethereum-cryptography@npm:0.1.3, ethereum-cryptography@npm:^0.1.3": + version: 0.1.3 + resolution: "ethereum-cryptography@npm:0.1.3" + dependencies: + "@types/pbkdf2": ^3.0.0 + "@types/secp256k1": ^4.0.1 + blakejs: ^1.1.0 + browserify-aes: ^1.2.0 + bs58check: ^2.1.2 + create-hash: ^1.2.0 + create-hmac: ^1.1.7 + hash.js: ^1.1.7 + keccak: ^3.0.0 + pbkdf2: ^3.0.17 + randombytes: ^2.1.0 + safe-buffer: ^5.1.2 + scrypt-js: ^3.0.0 + secp256k1: ^4.0.1 + setimmediate: ^1.0.5 + checksum: 54bae7a4a96bd81398cdc35c91cfcc74339f71a95ed1b5b694663782e69e8e3afd21357de3b8bac9ff4877fd6f043601e200a7ad9133d94be6fd7d898ee0a449 + languageName: node + linkType: hard + +"ethereum-cryptography@npm:^1.0.3": + version: 1.2.0 + resolution: "ethereum-cryptography@npm:1.2.0" + dependencies: + "@noble/hashes": 1.2.0 + "@noble/secp256k1": 1.7.1 + "@scure/bip32": 1.1.5 + "@scure/bip39": 1.1.1 + checksum: 97e8e8253cb9f5a9271bd0201c37609c451c890eb85883b9c564f14743c3d7c673287406c93bf5604307593ee298ad9a03983388b85c11ca61461b9fc1a4f2c7 + languageName: node + linkType: hard + +"ethereumjs-abi@npm:^0.6.8": + version: 0.6.8 + resolution: "ethereumjs-abi@npm:0.6.8" + dependencies: + bn.js: ^4.11.8 + ethereumjs-util: ^6.0.0 + checksum: cede2a8ae7c7e04eeaec079c2f925601a25b2ef75cf9230e7c5da63b4ea27883b35447365a47e35c1e831af520973a2252af89022c292c18a09a4607821a366b + languageName: node + linkType: hard + +"ethereumjs-util@npm:^6.0.0, ethereumjs-util@npm:^6.2.1": + version: 6.2.1 + resolution: "ethereumjs-util@npm:6.2.1" + dependencies: + "@types/bn.js": ^4.11.3 + bn.js: ^4.11.0 + create-hash: ^1.1.2 + elliptic: ^6.5.2 + ethereum-cryptography: ^0.1.3 + ethjs-util: 0.1.6 + rlp: ^2.2.3 + checksum: e3cb4a2c034a2529281fdfc21a2126fe032fdc3038863f5720352daa65ddcc50fc8c67dbedf381a882dc3802e05d979287126d7ecf781504bde1fd8218693bde + languageName: node + linkType: hard + +"ethereumjs-util@npm:^7.1.0, ethereumjs-util@npm:^7.1.1, ethereumjs-util@npm:^7.1.2, ethereumjs-util@npm:^7.1.5": + version: 7.1.5 + resolution: "ethereumjs-util@npm:7.1.5" + dependencies: + "@types/bn.js": ^5.1.0 + bn.js: ^5.1.2 + create-hash: ^1.1.2 + ethereum-cryptography: ^0.1.3 + rlp: ^2.2.4 + checksum: 27a3c79d6e06b2df34b80d478ce465b371c8458b58f5afc14d91c8564c13363ad336e6e83f57eb0bd719fde94d10ee5697ceef78b5aa932087150c5287b286d1 + languageName: node + linkType: hard + +"ethers@npm:^5.7.1, ethers@npm:^5.7.2": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -11761,6 +13085,40 @@ __metadata: languageName: node linkType: hard +"ethjs-unit@npm:0.1.6": + version: 0.1.6 + resolution: "ethjs-unit@npm:0.1.6" + dependencies: + bn.js: 4.11.6 + number-to-bn: 1.7.0 + checksum: df6b4752ff7461a59a20219f4b1684c631ea601241c39660e3f6c6bd63c950189723841c22b3c6c0ebeb3c9fc99e0e803e3c613101206132603705fcbcf4def5 + languageName: node + linkType: hard + +"ethjs-util@npm:0.1.6, ethjs-util@npm:^0.1.6": + version: 0.1.6 + resolution: "ethjs-util@npm:0.1.6" + dependencies: + is-hex-prefixed: 1.0.0 + strip-hex-prefix: 1.0.0 + checksum: 1f42959e78ec6f49889c49c8a98639e06f52a15966387dd39faf2930db48663d026efb7db2702dcffe7f2a99c4a0144b7ce784efdbf733f4077aae95de76d65f + languageName: node + linkType: hard + +"event-target-shim@npm:^5.0.0": + version: 5.0.1 + resolution: "event-target-shim@npm:5.0.1" + checksum: 1ffe3bb22a6d51bdeb6bf6f7cf97d2ff4a74b017ad12284cc9e6a279e727dc30a5de6bb613e5596ff4dc3e517841339ad09a7eec44266eccb1aa201a30448166 + languageName: node + linkType: hard + +"eventemitter3@npm:4.0.4": + version: 4.0.4 + resolution: "eventemitter3@npm:4.0.4" + checksum: 7afb1cd851d19898bc99cc55ca894fe18cb1f8a07b0758652830a09bd6f36082879a25345be6219b81d74764140688b1a8fa75bcd1073d96b9a6661e444bc2ea + languageName: node + linkType: hard + "eventemitter3@npm:^4.0.0, eventemitter3@npm:^4.0.7": version: 4.0.7 resolution: "eventemitter3@npm:4.0.7" @@ -11775,6 +13133,17 @@ __metadata: languageName: node linkType: hard +"evp_bytestokey@npm:^1.0.3": + version: 1.0.3 + resolution: "evp_bytestokey@npm:1.0.3" + dependencies: + md5.js: ^1.3.4 + node-gyp: latest + safe-buffer: ^5.1.1 + checksum: ad4e1577f1a6b721c7800dcc7c733fe01f6c310732bb5bf2240245c2a5b45a38518b91d8be2c610611623160b9d1c0e91f1ce96d639f8b53e8894625cf20fa45 + languageName: node + linkType: hard + "execa@npm:^4.0.2": version: 4.1.0 resolution: "execa@npm:4.1.0" @@ -11867,7 +13236,7 @@ __metadata: languageName: node linkType: hard -"express@npm:4.18.2, express@npm:^4.17.3": +"express@npm:4.18.2, express@npm:^4.14.0, express@npm:^4.17.3": version: 4.18.2 resolution: "express@npm:4.18.2" dependencies: @@ -11906,6 +13275,22 @@ __metadata: languageName: node linkType: hard +"ext@npm:^1.1.2": + version: 1.7.0 + resolution: "ext@npm:1.7.0" + dependencies: + type: ^2.7.2 + checksum: ef481f9ef45434d8c867cfd09d0393b60945b7c8a1798bedc4514cb35aac342ccb8d8ecb66a513e6a2b4ec1e294a338e3124c49b29736f8e7c735721af352c31 + languageName: node + linkType: hard + +"extend@npm:~3.0.2": + version: 3.0.2 + resolution: "extend@npm:3.0.2" + checksum: a50a8309ca65ea5d426382ff09f33586527882cf532931cb08ca786ea3146c0553310bda688710ff61d7668eba9f96b923fe1420cdf56a2c3eaf30fcab87b515 + languageName: node + linkType: hard + "external-editor@npm:^3.0.3": version: 3.1.0 resolution: "external-editor@npm:3.1.0" @@ -11917,6 +13302,20 @@ __metadata: languageName: node linkType: hard +"extsprintf@npm:1.3.0": + version: 1.3.0 + resolution: "extsprintf@npm:1.3.0" + checksum: cee7a4a1e34cffeeec18559109de92c27517e5641991ec6bab849aa64e3081022903dd53084f2080d0d2530803aa5ee84f1e9de642c365452f9e67be8f958ce2 + languageName: node + linkType: hard + +"extsprintf@npm:^1.2.0": + version: 1.4.1 + resolution: "extsprintf@npm:1.4.1" + checksum: a2f29b241914a8d2bad64363de684821b6b1609d06ae68d5b539e4de6b28659715b5bea94a7265201603713b7027d35399d10b0548f09071c5513e65e8323d33 + languageName: node + linkType: hard + "eyes@npm:^0.1.8": version: 0.1.8 resolution: "eyes@npm:0.1.8" @@ -12171,6 +13570,25 @@ __metadata: languageName: node linkType: hard +"find-up@npm:5.0.0, find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + +"find-up@npm:^2.1.0": + version: 2.1.0 + resolution: "find-up@npm:2.1.0" + dependencies: + locate-path: ^2.0.0 + checksum: 43284fe4da09f89011f08e3c32cd38401e786b19226ea440b75386c1b12a4cb738c94969808d53a84f564ede22f732c8409e3cfc3f7fb5b5c32378ad0bbf28bd + languageName: node + linkType: hard + "find-up@npm:^3.0.0": version: 3.0.0 resolution: "find-up@npm:3.0.0" @@ -12190,16 +13608,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: ^6.0.0 - path-exists: ^4.0.0 - checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 - languageName: node - linkType: hard - "flat-cache@npm:^3.0.4": version: 3.0.4 resolution: "flat-cache@npm:3.0.4" @@ -12210,6 +13618,15 @@ __metadata: languageName: node linkType: hard +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 12a1536ac746db74881316a181499a78ef953632ddd28050b7a3a43c62ef5462e3357c8c29d76072bb635f147f7a9a1f0c02efef6b4be28f8db62ceb3d5c7f5d + languageName: node + linkType: hard + "flatbuffers@npm:2.0.4": version: 2.0.4 resolution: "flatbuffers@npm:2.0.4" @@ -12231,7 +13648,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.4, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.4, follow-redirects@npm:^1.15.0": version: 1.15.2 resolution: "follow-redirects@npm:1.15.2" peerDependenciesMeta: @@ -12250,6 +13667,13 @@ __metadata: languageName: node linkType: hard +"forever-agent@npm:~0.6.1": + version: 0.6.1 + resolution: "forever-agent@npm:0.6.1" + checksum: 766ae6e220f5fe23676bb4c6a99387cec5b7b62ceb99e10923376e27bfea72f3c3aeec2ba5f45f3f7ba65d6616965aa7c20b15002b6860833bb6e394dea546a8 + languageName: node + linkType: hard + "fork-ts-checker-webpack-plugin@npm:8.0.0": version: 8.0.0 resolution: "fork-ts-checker-webpack-plugin@npm:8.0.0" @@ -12304,6 +13728,13 @@ __metadata: languageName: node linkType: hard +"form-data-encoder@npm:1.7.1": + version: 1.7.1 + resolution: "form-data-encoder@npm:1.7.1" + checksum: a2a360d5588a70d323c12a140c3db23a503a38f0a5d141af1efad579dde9f9fff2e49e5f31f378cb4631518c1ab4a826452c92f0d2869e954b6b2d77b05613e1 + languageName: node + linkType: hard + "form-data@npm:^3.0.0": version: 3.0.1 resolution: "form-data@npm:3.0.1" @@ -12326,6 +13757,17 @@ __metadata: languageName: node linkType: hard +"form-data@npm:~2.3.2": + version: 2.3.3 + resolution: "form-data@npm:2.3.3" + dependencies: + asynckit: ^0.4.0 + combined-stream: ^1.0.6 + mime-types: ^2.1.12 + checksum: 10c1780fa13dbe1ff3100114c2ce1f9307f8be10b14bf16e103815356ff567b6be39d70fc4a40f8990b9660012dc24b0f5e1dde1b6426166eb23a445ba068ca3 + languageName: node + linkType: hard + "formidable@npm:^2.1.2": version: 2.1.2 resolution: "formidable@npm:2.1.2" @@ -12345,6 +13787,20 @@ __metadata: languageName: node linkType: hard +"fp-ts@npm:1.19.3": + version: 1.19.3 + resolution: "fp-ts@npm:1.19.3" + checksum: eb0d4766ad561e9c5c01bfdd3d0ae589af135556921c733d26cf5289aad9f400110defdd93e6ac1d71f626697bb44d9d95ed2879c53dfd868f7cac3cf5c5553c + languageName: node + linkType: hard + +"fp-ts@npm:^1.0.0": + version: 1.19.5 + resolution: "fp-ts@npm:1.19.5" + checksum: 67d2d9c3855d211ca2592b1ef805f98b618157e7681791a776d9d0f7f3e52fcca2122ebf5bc215908c9099fad69756d40e37210cf46cb4075dae1b61efe69e40 + languageName: node + linkType: hard + "fraction.js@npm:^4.2.0": version: 4.2.0 resolution: "fraction.js@npm:4.2.0" @@ -12368,6 +13824,7 @@ __metadata: "@emotion/react": ^11.7.1 "@emotion/styled": ^11.6.0 "@endo/static-module-record": ^0.7.16 + "@ethereum-attestation-service/eas-sdk": ^0.29.1 "@ethersproject/providers": ^5.5.3 "@fortawesome/fontawesome-svg-core": ^6.1.1 "@fortawesome/free-brands-svg-icons": ^6.1.1 @@ -12378,6 +13835,9 @@ __metadata: "@mui/material": ^5.3.0 "@observablehq/plot": ^0.6.5 "@rainbow-me/rainbowkit": ^1.0.7 + "@safe-global/api-kit": ^1.3.0 + "@safe-global/protocol-kit": ^1.2.0 + "@safe-global/safe-core-sdk-types": ^2.2.0 "@sgratzl/chartjs-chart-boxplot": ^4.1.1 "@tailwindcss/container-queries": ^0.1.1 "@tailwindcss/forms": latest @@ -12390,6 +13850,7 @@ __metadata: "@typescript-eslint/parser": ^5.18.0 "@ukstv/jazzicon-react": ^1.0.0 api-types: 0.1.0 + assert: ^2.0.0 autoprefixer: ^10.4.7 axios: ^0.22.0 chart.js: ^4.2.0 @@ -12428,6 +13889,7 @@ __metadata: recoil-persist: ^4.2.0 ses: ^0.18.1 source-map-explorer: ^2.5.2 + stream-browserify: ^3.0.0 tailwindcss: ^3.0.24 typescript: ^4.5.5 use-error-boundary: ^2.0.6 @@ -12438,6 +13900,19 @@ __metadata: languageName: unknown linkType: soft +"fs-extra@npm:^0.30.0": + version: 0.30.0 + resolution: "fs-extra@npm:0.30.0" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^2.1.0 + klaw: ^1.0.0 + path-is-absolute: ^1.0.0 + rimraf: ^2.2.8 + checksum: 6edfd65fc813baa27f1603778c0f5ec11f8c5006a20b920437813ee2023eba18aeec8bef1c89b2e6c84f9fc90fdc7c916f4a700466c8c69d22a35d018f2570f0 + languageName: node + linkType: hard + "fs-extra@npm:^10.0.0": version: 10.1.0 resolution: "fs-extra@npm:10.1.0" @@ -12449,7 +13924,29 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1": +"fs-extra@npm:^4.0.2": + version: 4.0.3 + resolution: "fs-extra@npm:4.0.3" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: c5ae3c7043ad7187128e619c0371da01b58694c1ffa02c36fb3f5b459925d9c27c3cb1e095d9df0a34a85ca993d8b8ff6f6ecef868fd5ebb243548afa7fc0936 + languageName: node + linkType: hard + +"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": + version: 7.0.1 + resolution: "fs-extra@npm:7.0.1" + dependencies: + graceful-fs: ^4.1.2 + jsonfile: ^4.0.0 + universalify: ^0.1.0 + checksum: 141b9dccb23b66a66cefdd81f4cda959ff89282b1d721b98cea19ba08db3dcbe6f862f28841f3cf24bb299e0b7e6c42303908f65093cb7e201708e86ea5a8dcf + languageName: node + linkType: hard + +"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" dependencies: @@ -12471,6 +13968,15 @@ __metadata: languageName: node linkType: hard +"fs-minipass@npm:^1.2.7": + version: 1.2.7 + resolution: "fs-minipass@npm:1.2.7" + dependencies: + minipass: ^2.6.0 + checksum: 40fd46a2b5dcb74b3a580269f9a0c36f9098c2ebd22cef2e1a004f375b7b665c11f1507ec3f66ee6efab5664109f72d0a74ea19c3370842214c3da5168d6fdd7 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -12532,6 +14038,13 @@ __metadata: languageName: node linkType: hard +"functional-red-black-tree@npm:^1.0.1": + version: 1.0.1 + resolution: "functional-red-black-tree@npm:1.0.1" + checksum: ca6c170f37640e2d94297da8bb4bf27a1d12bea3e00e6a3e007fd7aa32e37e000f5772acf941b4e4f3cf1c95c3752033d0c509af157ad8f526e7f00723b9eb9f + languageName: node + linkType: hard + "functions-have-names@npm:^1.2.2, functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -12619,7 +14132,7 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^5.0.0": +"get-stream@npm:^5.0.0, get-stream@npm:^5.1.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" dependencies: @@ -12652,7 +14165,16 @@ __metadata: languageName: node linkType: hard -"git-branch-is@npm:^4.0.0": +"getpass@npm:^0.1.1": + version: 0.1.7 + resolution: "getpass@npm:0.1.7" + dependencies: + assert-plus: ^1.0.0 + checksum: ab18d55661db264e3eac6012c2d3daeafaab7a501c035ae0ccb193c3c23e9849c6e29b6ac762b9c2adae460266f925d55a3a2a3a3c8b94be2f222df94d70c046 + languageName: node + linkType: hard + +"git-branch-is@npm:^4.0.0": version: 4.0.0 resolution: "git-branch-is@npm:4.0.0" dependencies: @@ -12702,6 +14224,34 @@ __metadata: languageName: node linkType: hard +"glob@npm:7.1.7": + version: 7.1.7 + resolution: "glob@npm:7.1.7" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: b61f48973bbdcf5159997b0874a2165db572b368b931135832599875919c237fc05c12984e38fe828e69aa8a921eb0e8a4997266211c517c9cfaae8a93988bb8 + languageName: node + linkType: hard + +"glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + dependencies: + fs.realpath: ^1.0.0 + inflight: ^1.0.4 + inherits: 2 + minimatch: ^3.0.4 + once: ^1.3.0 + path-is-absolute: ^1.0.0 + checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134 + languageName: node + linkType: hard + "glob@npm:^7.0.0, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -12761,6 +14311,16 @@ __metadata: languageName: node linkType: hard +"global@npm:~4.4.0": + version: 4.4.0 + resolution: "global@npm:4.4.0" + dependencies: + min-document: ^2.19.0 + process: ^0.11.10 + checksum: 9c057557c8f5a5bcfbeb9378ba4fe2255d04679452be504608dd5f13b54edf79f7be1db1031ea06a4ec6edd3b9f5f17d2d172fb47e6c69dae57fd84b7e72b77f + languageName: node + linkType: hard + "globals@npm:^11.1.0": version: 11.12.0 resolution: "globals@npm:11.12.0" @@ -12831,7 +14391,47 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"got@npm:12.1.0": + version: 12.1.0 + resolution: "got@npm:12.1.0" + dependencies: + "@sindresorhus/is": ^4.6.0 + "@szmarczak/http-timer": ^5.0.1 + "@types/cacheable-request": ^6.0.2 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^6.0.4 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + form-data-encoder: 1.7.1 + get-stream: ^6.0.1 + http2-wrapper: ^2.1.10 + lowercase-keys: ^3.0.0 + p-cancelable: ^3.0.0 + responselike: ^2.0.0 + checksum: 1cc9af6ca511338a7f1bbb0943999e6ac324ea3c7d826066c02e530b4ac41147b1a4cadad21b28c3938de82185ac99c33d64a3a4560c6e0b0b125191ba6ee619 + languageName: node + linkType: hard + +"got@npm:^11.8.5": + version: 11.8.6 + resolution: "got@npm:11.8.6" + dependencies: + "@sindresorhus/is": ^4.0.0 + "@szmarczak/http-timer": ^4.0.5 + "@types/cacheable-request": ^6.0.1 + "@types/responselike": ^1.0.0 + cacheable-lookup: ^5.0.3 + cacheable-request: ^7.0.2 + decompress-response: ^6.0.0 + http2-wrapper: ^1.0.0-beta.5.2 + lowercase-keys: ^2.0.0 + p-cancelable: ^2.0.0 + responselike: ^2.0.0 + checksum: bbc783578a8d5030c8164ef7f57ce41b5ad7db2ed13371e1944bef157eeca5a7475530e07c0aaa71610d7085474d0d96222c9f4268d41db333a17e39b463f45d + languageName: node + linkType: hard + +"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -12882,6 +14482,91 @@ __metadata: languageName: node linkType: hard +"har-schema@npm:^2.0.0": + version: 2.0.0 + resolution: "har-schema@npm:2.0.0" + checksum: d8946348f333fb09e2bf24cc4c67eabb47c8e1d1aa1c14184c7ffec1140a49ec8aa78aa93677ae452d71d5fc0fdeec20f0c8c1237291fc2bcb3f502a5d204f9b + languageName: node + linkType: hard + +"har-validator@npm:~5.1.3": + version: 5.1.5 + resolution: "har-validator@npm:5.1.5" + dependencies: + ajv: ^6.12.3 + har-schema: ^2.0.0 + checksum: b998a7269ca560d7f219eedc53e2c664cd87d487e428ae854a6af4573fc94f182fe9d2e3b92ab968249baec7ebaf9ead69cf975c931dc2ab282ec182ee988280 + languageName: node + linkType: hard + +"hardhat@npm:2.13.1": + version: 2.13.1 + resolution: "hardhat@npm:2.13.1" + dependencies: + "@ethersproject/abi": ^5.1.2 + "@metamask/eth-sig-util": ^4.0.0 + "@nomicfoundation/ethereumjs-block": 5.0.0 + "@nomicfoundation/ethereumjs-blockchain": 7.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.0 + "@nomicfoundation/ethereumjs-evm": 2.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-statemanager": 2.0.0 + "@nomicfoundation/ethereumjs-trie": 6.0.0 + "@nomicfoundation/ethereumjs-tx": 5.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-vm": 7.0.0 + "@nomicfoundation/solidity-analyzer": ^0.1.0 + "@sentry/node": ^5.18.1 + "@types/bn.js": ^5.1.0 + "@types/lru-cache": ^5.1.0 + abort-controller: ^3.0.0 + adm-zip: ^0.4.16 + aggregate-error: ^3.0.0 + ansi-escapes: ^4.3.0 + chalk: ^2.4.2 + chokidar: ^3.4.0 + ci-info: ^2.0.0 + debug: ^4.1.1 + enquirer: ^2.3.0 + env-paths: ^2.2.0 + ethereum-cryptography: ^1.0.3 + ethereumjs-abi: ^0.6.8 + find-up: ^2.1.0 + fp-ts: 1.19.3 + fs-extra: ^7.0.1 + glob: 7.2.0 + immutable: ^4.0.0-rc.12 + io-ts: 1.10.4 + keccak: ^3.0.2 + lodash: ^4.17.11 + mnemonist: ^0.38.0 + mocha: ^10.0.0 + p-map: ^4.0.0 + qs: ^6.7.0 + raw-body: ^2.4.1 + resolve: 1.17.0 + semver: ^6.3.0 + solc: 0.7.3 + source-map-support: ^0.5.13 + stacktrace-parser: ^0.1.10 + tsort: 0.0.1 + undici: ^5.14.0 + uuid: ^8.3.2 + ws: ^7.4.6 + peerDependencies: + ts-node: "*" + typescript: "*" + peerDependenciesMeta: + ts-node: + optional: true + typescript: + optional: true + bin: + hardhat: internal/cli/bootstrap.js + checksum: 7e2103a878fd2f397a14a0ad9489f26deedf9beb0e777640f4912605450c527c434834ff99c52a51030ea18c1ba7c9b0efa86a212ee5adb3733c5642b61fcd65 + languageName: node + linkType: hard + "harmony-reflect@npm:^1.4.6": version: 1.6.2 resolution: "harmony-reflect@npm:1.6.2" @@ -12958,6 +14643,17 @@ __metadata: languageName: node linkType: hard +"hash-base@npm:^3.0.0": + version: 3.1.0 + resolution: "hash-base@npm:3.1.0" + dependencies: + inherits: ^2.0.4 + readable-stream: ^3.6.0 + safe-buffer: ^5.2.0 + checksum: 26b7e97ac3de13cb23fc3145e7e3450b0530274a9562144fc2bf5c1e2983afd0e09ed7cc3b20974ba66039fad316db463da80eb452e7373e780cbee9a0d2f2dc + languageName: node + linkType: hard + "hash.js@npm:1.1.7, hash.js@npm:^1.0.0, hash.js@npm:^1.0.3, hash.js@npm:^1.1.7": version: 1.1.7 resolution: "hash.js@npm:1.1.7" @@ -12968,7 +14664,7 @@ __metadata: languageName: node linkType: hard -"he@npm:^1.2.0": +"he@npm:1.2.0, he@npm:^1.2.0": version: 1.2.0 resolution: "he@npm:1.2.0" bin: @@ -13118,7 +14814,7 @@ __metadata: languageName: node linkType: hard -"http-cache-semantics@npm:^4.1.0": +"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" checksum: 83ac0bc60b17a3a36f9953e7be55e5c8f41acc61b22583060e8dedc9dd5e3607c823a88d0926f9150e571f90946835c7fe150732801010845c72cd8bbff1a236 @@ -13157,6 +14853,13 @@ __metadata: languageName: node linkType: hard +"http-https@npm:^1.0.0": + version: 1.0.0 + resolution: "http-https@npm:1.0.0" + checksum: 82fc4d2e512c64b35680944d1ae13e68220acfa05b06329832e271fd199c5c7fcff1f53fc1f91a1cd65a737ee4de14004dd3ba9a73cce33da970940c6e6ca774 + languageName: node + linkType: hard + "http-parser-js@npm:>=0.5.1": version: 0.5.8 resolution: "http-parser-js@npm:0.5.8" @@ -13215,6 +14918,37 @@ __metadata: languageName: node linkType: hard +"http-signature@npm:~1.2.0": + version: 1.2.0 + resolution: "http-signature@npm:1.2.0" + dependencies: + assert-plus: ^1.0.0 + jsprim: ^1.2.2 + sshpk: ^1.7.0 + checksum: 3324598712266a9683585bb84a75dec4fd550567d5e0dd4a0fff6ff3f74348793404d3eeac4918fa0902c810eeee1a86419e4a2e92a164132dfe6b26743fb47c + languageName: node + linkType: hard + +"http2-wrapper@npm:^1.0.0-beta.5.2": + version: 1.0.3 + resolution: "http2-wrapper@npm:1.0.3" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.0.0 + checksum: 74160b862ec699e3f859739101ff592d52ce1cb207b7950295bf7962e4aa1597ef709b4292c673bece9c9b300efad0559fc86c71b1409c7a1e02b7229456003e + languageName: node + linkType: hard + +"http2-wrapper@npm:^2.1.10": + version: 2.2.0 + resolution: "http2-wrapper@npm:2.2.0" + dependencies: + quick-lru: ^5.1.1 + resolve-alpn: ^1.2.0 + checksum: 6fd20e5cb6a58151715b3581e06a62a47df943187d2d1f69e538a50cccb7175dd334ecfde7900a37d18f3e13a1a199518a2c211f39860e81e9a16210c199cfaa + languageName: node + linkType: hard + "https-proxy-agent@npm:^5.0.0": version: 5.0.1 resolution: "https-proxy-agent@npm:5.0.1" @@ -13307,6 +15041,15 @@ __metadata: languageName: node linkType: hard +"idna-uts46-hx@npm:^2.3.1": + version: 2.3.1 + resolution: "idna-uts46-hx@npm:2.3.1" + dependencies: + punycode: 2.1.0 + checksum: d434c3558d2bc1090eb90f978f995101f469cb26593414ac57aa082c9352e49972b332c6e4188b9b15538172ccfeae3121e5a19b96972a97e6aeb0676d86639c + languageName: node + linkType: hard + "ieee754@npm:^1.1.13, ieee754@npm:^1.2.1": version: 1.2.1 resolution: "ieee754@npm:1.2.1" @@ -13335,6 +15078,13 @@ __metadata: languageName: node linkType: hard +"immutable@npm:^4.0.0-rc.12": + version: 4.3.1 + resolution: "immutable@npm:4.3.1" + checksum: a3a5ba29bd43f3f9a2e4d599763d7455d11a0ea57e50bf43f2836672fc80003e90d69f2a4f5b589f1f3d6986faf97f08ce1e253583740dd33c00adebab88b217 + languageName: node + linkType: hard + "import-fresh@npm:^3.0.0, import-fresh@npm:^3.1.0, import-fresh@npm:^3.2.1": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -13498,6 +15248,15 @@ __metadata: languageName: node linkType: hard +"io-ts@npm:1.10.4": + version: 1.10.4 + resolution: "io-ts@npm:1.10.4" + dependencies: + fp-ts: ^1.0.0 + checksum: 619134006778f7ca42693716ade7fc1a383079e7848bbeabc67a0e4ac9139cda6b2a88a052d539ab7d554033ee2ffe4dab5cb96b958c83fee2dff73d23f03e88 + languageName: node + linkType: hard + "ip@npm:^2.0.0": version: 2.0.0 resolution: "ip@npm:2.0.0" @@ -13582,6 +15341,13 @@ __metadata: languageName: node linkType: hard +"is-buffer@npm:^2.0.5": + version: 2.0.5 + resolution: "is-buffer@npm:2.0.5" + checksum: 764c9ad8b523a9f5a32af29bdf772b08eb48c04d2ad0a7240916ac2688c983bf5f8504bf25b35e66240edeb9d9085461f9b5dae1f3d2861c6b06a65fe983de42 + languageName: node + linkType: hard + "is-buffer@npm:~1.1.6": version: 1.1.6 resolution: "is-buffer@npm:1.1.6" @@ -13646,6 +15412,13 @@ __metadata: languageName: node linkType: hard +"is-function@npm:^1.0.1": + version: 1.0.2 + resolution: "is-function@npm:1.0.2" + checksum: 7d564562e07b4b51359547d3ccc10fb93bb392fd1b8177ae2601ee4982a0ece86d952323fc172a9000743a3971f09689495ab78a1d49a9b14fc97a7e28521dc0 + languageName: node + linkType: hard + "is-generator-fn@npm:^2.0.0": version: 2.1.0 resolution: "is-generator-fn@npm:2.1.0" @@ -13671,6 +15444,13 @@ __metadata: languageName: node linkType: hard +"is-hex-prefixed@npm:1.0.0": + version: 1.0.0 + resolution: "is-hex-prefixed@npm:1.0.0" + checksum: 5ac58e6e528fb029cc43140f6eeb380fad23d0041cc23154b87f7c9a1b728bcf05909974e47248fd0b7fcc11ba33cf7e58d64804883056fabd23e2b898be41de + languageName: node + linkType: hard + "is-inside-container@npm:^1.0.0": version: 1.0.0 resolution: "is-inside-container@npm:1.0.0" @@ -13710,6 +15490,16 @@ __metadata: languageName: node linkType: hard +"is-nan@npm:^1.2.1": + version: 1.3.2 + resolution: "is-nan@npm:1.3.2" + dependencies: + call-bind: ^1.0.0 + define-properties: ^1.1.3 + checksum: 5dfadcef6ad12d3029d43643d9800adbba21cf3ce2ec849f734b0e14ee8da4070d82b15fdb35138716d02587c6578225b9a22779cab34888a139cc43e4e3610a + languageName: node + linkType: hard + "is-negative-zero@npm:^2.0.2": version: 2.0.2 resolution: "is-negative-zero@npm:2.0.2" @@ -13747,6 +15537,13 @@ __metadata: languageName: node linkType: hard +"is-plain-obj@npm:^2.1.0": + version: 2.1.0 + resolution: "is-plain-obj@npm:2.1.0" + checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa + languageName: node + linkType: hard + "is-plain-obj@npm:^3.0.0": version: 3.0.0 resolution: "is-plain-obj@npm:3.0.0" @@ -13853,7 +15650,7 @@ __metadata: languageName: node linkType: hard -"is-typedarray@npm:1.0.0, is-typedarray@npm:^1.0.0": +"is-typedarray@npm:1.0.0, is-typedarray@npm:^1.0.0, is-typedarray@npm:~1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" checksum: 3508c6cd0a9ee2e0df2fa2e9baabcdc89e911c7bd5cf64604586697212feec525aa21050e48affb5ffc3df20f0f5d2e2cf79b08caa64e1ccc9578e251763aef7 @@ -13955,6 +15752,13 @@ __metadata: languageName: node linkType: hard +"isstream@npm:~0.1.2": + version: 0.1.2 + resolution: "isstream@npm:0.1.2" + checksum: 1eb2fe63a729f7bdd8a559ab552c69055f4f48eb5c2f03724430587c6f450783c8f1cd936c1c952d0a927925180fcc892ebd5b174236cf1065d4bd5bdb37e963 + languageName: node + linkType: hard + "istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": version: 3.2.0 resolution: "istanbul-lib-coverage@npm:3.2.0" @@ -15087,13 +16891,34 @@ __metadata: languageName: node linkType: hard -"js-sha3@npm:0.8.0": +"js-base64@npm:^3.7.5": + version: 3.7.5 + resolution: "js-base64@npm:3.7.5" + checksum: 67a78c8b1c47b73f1c6fba1957e9fe6fd9dc78ac93ac46cc2e43472dcb9cf150d126fb0e593192e88e0497354fa634d17d255add7cc6ee3c7b4d29870faa8e18 + languageName: node + linkType: hard + +"js-sdsl@npm:^4.1.4": + version: 4.4.2 + resolution: "js-sdsl@npm:4.4.2" + checksum: ba705adc1788bf3c6f6c8e5077824f2bb4f0acab5a984420ce5cc492c7fff3daddc26335ad2c9a67d4f5e3241ec790f9e5b72a625adcf20cf321d2fd85e62b8b + languageName: node + linkType: hard + +"js-sha3@npm:0.8.0, js-sha3@npm:^0.8.0": version: 0.8.0 resolution: "js-sha3@npm:0.8.0" checksum: 75df77c1fc266973f06cce8309ce010e9e9f07ec35ab12022ed29b7f0d9c8757f5a73e1b35aa24840dced0dea7059085aa143d817aea9e188e2a80d569d9adce languageName: node linkType: hard +"js-sha3@npm:^0.5.7": + version: 0.5.7 + resolution: "js-sha3@npm:0.5.7" + checksum: 973a28ea4b26cc7f12d2ab24f796e24ee4a71eef45a6634a052f6eb38cf8b2333db798e896e6e094ea6fa4dfe8e42a2a7942b425cf40da3f866623fd05bb91ea + languageName: node + linkType: hard + "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -15124,6 +16949,13 @@ __metadata: languageName: node linkType: hard +"jsbn@npm:~0.1.0": + version: 0.1.1 + resolution: "jsbn@npm:0.1.1" + checksum: e5ff29c1b8d965017ef3f9c219dacd6e40ad355c664e277d31246c90545a02e6047018c16c60a00f36d561b3647215c41894f5d869ada6908a2e0ce4200c88f2 + languageName: node + linkType: hard + "jsdom@npm:^16.6.0": version: 16.7.0 resolution: "jsdom@npm:16.7.0" @@ -15234,7 +17066,7 @@ __metadata: languageName: node linkType: hard -"json-schema@npm:^0.4.0": +"json-schema@npm:0.4.0, json-schema@npm:^0.4.0": version: 0.4.0 resolution: "json-schema@npm:0.4.0" checksum: 66389434c3469e698da0df2e7ac5a3281bcff75e797a5c127db7c5b56270e01ae13d9afa3c03344f76e32e81678337a8c912bdbb75101c62e487dc3778461d72 @@ -15248,7 +17080,7 @@ __metadata: languageName: node linkType: hard -"json-stringify-safe@npm:^5.0.1": +"json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" checksum: 48ec0adad5280b8a96bb93f4563aa1667fd7a36334f79149abd42446d0989f2ddc58274b479f4819f1f00617957e6344c886c55d05a4e15ebb4ab931e4a6a8ee @@ -15282,6 +17114,30 @@ __metadata: languageName: node linkType: hard +"jsonfile@npm:^2.1.0": + version: 2.4.0 + resolution: "jsonfile@npm:2.4.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: f5064aabbc9e35530dc471d8b203ae1f40dbe949ddde4391c6f6a6d310619a15f0efdae5587df594d1d70c555193aaeee9d2ed4aec9ffd5767bd5e4e62d49c3d + languageName: node + linkType: hard + +"jsonfile@npm:^4.0.0": + version: 4.0.0 + resolution: "jsonfile@npm:4.0.0" + dependencies: + graceful-fs: ^4.1.6 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 6447d6224f0d31623eef9b51185af03ac328a7553efcee30fa423d98a9e276ca08db87d71e17f2310b0263fd3ffa6c2a90a6308367f661dc21580f9469897c9e + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -15321,6 +17177,18 @@ __metadata: languageName: node linkType: hard +"jsprim@npm:^1.2.2": + version: 1.4.2 + resolution: "jsprim@npm:1.4.2" + dependencies: + assert-plus: 1.0.0 + extsprintf: 1.3.0 + json-schema: 0.4.0 + verror: 1.10.0 + checksum: 2ad1b9fdcccae8b3d580fa6ced25de930eaa1ad154db21bbf8478a4d30bbbec7925b5f5ff29b933fba9412b16a17bd484a8da4fdb3663b5e27af95dd693bab2a + languageName: node + linkType: hard + "jstz@npm:^2.1.1": version: 2.1.1 resolution: "jstz@npm:2.1.1" @@ -15373,7 +17241,7 @@ __metadata: languageName: node linkType: hard -"keccak@npm:^3.0.1": +"keccak@npm:^3.0.0, keccak@npm:^3.0.1, keccak@npm:^3.0.2": version: 3.0.3 resolution: "keccak@npm:3.0.3" dependencies: @@ -15385,6 +17253,15 @@ __metadata: languageName: node linkType: hard +"keyv@npm:^4.0.0": + version: 4.5.3 + resolution: "keyv@npm:4.5.3" + dependencies: + json-buffer: 3.0.1 + checksum: 3ffb4d5b72b6b4b4af443bbb75ca2526b23c750fccb5ac4c267c6116888b4b65681015c2833cb20d26cf3e6e32dac6b988c77f7f022e1a571b7d90f1442257da + languageName: node + linkType: hard + "keyv@npm:^4.5.2": version: 4.5.2 resolution: "keyv@npm:4.5.2" @@ -15408,6 +17285,18 @@ __metadata: languageName: node linkType: hard +"klaw@npm:^1.0.0": + version: 1.3.1 + resolution: "klaw@npm:1.3.1" + dependencies: + graceful-fs: ^4.1.9 + dependenciesMeta: + graceful-fs: + optional: true + checksum: 8f69e4797c26e7c3f2426bfa85f38a3da3c2cb1b4c6bd850d2377aed440d41ce9d806f2885c2e2e224372c56af4b1d43b8a499adecf9a05e7373dc6b8b7c52e4 + languageName: node + linkType: hard + "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" @@ -15455,6 +17344,33 @@ __metadata: languageName: node linkType: hard +"level-supports@npm:^4.0.0": + version: 4.0.1 + resolution: "level-supports@npm:4.0.1" + checksum: d4552b42bb8cdeada07b0f6356c7a90fefe76279147331f291aceae26e3e56d5f927b09ce921647c0230bfe03ddfbdcef332be921e5c2194421ae2bfa3cf6368 + languageName: node + linkType: hard + +"level-transcoder@npm:^1.0.1": + version: 1.0.1 + resolution: "level-transcoder@npm:1.0.1" + dependencies: + buffer: ^6.0.3 + module-error: ^1.0.1 + checksum: 304f08d802faf3491a533b6d87ad8be3cabfd27f2713bbe9d4c633bf50fcb9460eab5a6776bf015e101ead7ba1c1853e05e7f341112f17a9d0cb37ee5a421a25 + languageName: node + linkType: hard + +"level@npm:^8.0.0": + version: 8.0.0 + resolution: "level@npm:8.0.0" + dependencies: + browser-level: ^1.0.1 + classic-level: ^1.2.0 + checksum: 13eb25bd71bfdca6cd714d1233adf9da97de9a8a4bf9f28d62a390b5c96d0250abaf983eb90eb8c4e89c7a985bb330750683d106f12670e5ea8fba1d7e608a1f + languageName: node + linkType: hard + "leven@npm:^3.1.0": version: 3.1.0 resolution: "leven@npm:3.1.0" @@ -15559,6 +17475,16 @@ __metadata: languageName: node linkType: hard +"locate-path@npm:^2.0.0": + version: 2.0.0 + resolution: "locate-path@npm:2.0.0" + dependencies: + p-locate: ^2.0.0 + path-exists: ^3.0.0 + checksum: 02d581edbbbb0fa292e28d96b7de36b5b62c2fa8b5a7e82638ebb33afa74284acf022d3b1e9ae10e3ffb7658fbc49163fcd5e76e7d1baaa7801c3e05a81da755 + languageName: node + linkType: hard + "locate-path@npm:^3.0.0": version: 3.0.0 resolution: "locate-path@npm:3.0.0" @@ -15657,14 +17583,14 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": +"lodash@npm:4.17.21, lodash@npm:^4.17.11, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 languageName: node linkType: hard -"log-symbols@npm:^4.1.0": +"log-symbols@npm:4.1.0, log-symbols@npm:^4.1.0": version: 4.1.0 resolution: "log-symbols@npm:4.1.0" dependencies: @@ -15708,6 +17634,20 @@ __metadata: languageName: node linkType: hard +"lowercase-keys@npm:^2.0.0": + version: 2.0.0 + resolution: "lowercase-keys@npm:2.0.0" + checksum: 24d7ebd56ccdf15ff529ca9e08863f3c54b0b9d1edb97a3ae1af34940ae666c01a1e6d200707bce730a8ef76cb57cc10e65f245ecaaf7e6bc8639f2fb460ac23 + languageName: node + linkType: hard + +"lowercase-keys@npm:^3.0.0": + version: 3.0.0 + resolution: "lowercase-keys@npm:3.0.0" + checksum: 67a3f81409af969bc0c4ca0e76cd7d16adb1e25aa1c197229587eaf8671275c8c067cd421795dbca4c81be0098e4c426a086a05e30de8a9c587b7a13c0c7ccc5 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -15740,6 +17680,13 @@ __metadata: languageName: node linkType: hard +"lru_map@npm:^0.3.3": + version: 0.3.3 + resolution: "lru_map@npm:0.3.3" + checksum: ca9dd43c65ed7a4f117c548028101c5b6855e10923ea9d1f635af53ad20c5868ff428c364d454a7b57fe391b89c704982275410c3c5099cca5aeee00d76e169a + languageName: node + linkType: hard + "macos-release@npm:^2.5.0": version: 2.5.1 resolution: "macos-release@npm:2.5.1" @@ -15814,6 +17761,24 @@ __metadata: languageName: node linkType: hard +"mcl-wasm@npm:^0.7.1": + version: 0.7.9 + resolution: "mcl-wasm@npm:0.7.9" + checksum: 6b6ed5084156b98b2db70b223e1ba2c01953970b48a2e0c4ea3eeb9296610e6b3bfb2a2cce9e92e2d7ad61778b5f5a630e705e663835e915ba188c174a0a37fa + languageName: node + linkType: hard + +"md5.js@npm:^1.3.4": + version: 1.3.5 + resolution: "md5.js@npm:1.3.5" + dependencies: + hash-base: ^3.0.0 + inherits: ^2.0.1 + safe-buffer: ^5.1.2 + checksum: 098494d885684bcc4f92294b18ba61b7bd353c23147fbc4688c75b45cb8590f5a95fd4584d742415dcc52487f7a1ef6ea611cfa1543b0dc4492fe026357f3f0c + languageName: node + linkType: hard + "md5@npm:^2.2.1": version: 2.3.0 resolution: "md5@npm:2.3.0" @@ -15864,6 +17829,17 @@ __metadata: languageName: node linkType: hard +"memory-level@npm:^1.0.0": + version: 1.0.0 + resolution: "memory-level@npm:1.0.0" + dependencies: + abstract-level: ^1.0.0 + functional-red-black-tree: ^1.0.1 + module-error: ^1.0.1 + checksum: 80b1b7aedaf936e754adbcd7b9303018c3684fb32f9992fd967c448f145d177f16c724fbba9ed3c3590a9475fd563151eae664d69b83d2ad48714852e9fc5c72 + languageName: node + linkType: hard + "memory-pager@npm:^1.0.2": version: 1.5.0 resolution: "memory-pager@npm:1.5.0" @@ -15871,6 +17847,13 @@ __metadata: languageName: node linkType: hard +"memorystream@npm:^0.3.1": + version: 0.3.1 + resolution: "memorystream@npm:0.3.1" + checksum: f18b42440d24d09516d01466c06adf797df7873f0d40aa7db02e5fb9ed83074e5e65412d0720901d7069363465f82dc4f8bcb44f0cde271567a61426ce6ca2e9 + languageName: node + linkType: hard + "merge-descriptors@npm:1.0.1": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -15923,7 +17906,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:^2.1.34, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.16, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:^2.1.34, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -15964,6 +17947,29 @@ __metadata: languageName: node linkType: hard +"mimic-response@npm:^1.0.0": + version: 1.0.1 + resolution: "mimic-response@npm:1.0.1" + checksum: 034c78753b0e622bc03c983663b1cdf66d03861050e0c8606563d149bc2b02d63f62ce4d32be4ab50d0553ae0ffe647fc34d1f5281184c6e1e8cf4d85e8d9823 + languageName: node + linkType: hard + +"mimic-response@npm:^3.1.0": + version: 3.1.0 + resolution: "mimic-response@npm:3.1.0" + checksum: 25739fee32c17f433626bf19f016df9036b75b3d84a3046c7d156e72ec963dd29d7fc8a302f55a3d6c5a4ff24259676b15d915aad6480815a969ff2ec0836867 + languageName: node + linkType: hard + +"min-document@npm:^2.19.0": + version: 2.19.0 + resolution: "min-document@npm:2.19.0" + dependencies: + dom-walk: ^0.1.0 + checksum: da6437562ea2228041542a2384528e74e22d1daa1a4ec439c165abf0b9d8a63e17e3b8a6dc6e0c731845e85301198730426932a0e813d23f932ca668340c9623 + languageName: node + linkType: hard + "min-indent@npm:^1.0.0": version: 1.0.1 resolution: "min-indent@npm:1.0.1" @@ -16005,6 +18011,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:5.0.1": + version: 5.0.1 + resolution: "minimatch@npm:5.0.1" + dependencies: + brace-expansion: ^2.0.1 + checksum: b34b98463da4754bc526b244d680c69d4d6089451ebe512edaf6dd9eeed0279399cfa3edb19233513b8f830bf4bfcad911dddcdf125e75074100d52f724774f0 + languageName: node + linkType: hard + "minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -16090,6 +18105,16 @@ __metadata: languageName: node linkType: hard +"minipass@npm:^2.6.0, minipass@npm:^2.9.0": + version: 2.9.0 + resolution: "minipass@npm:2.9.0" + dependencies: + safe-buffer: ^5.1.2 + yallist: ^3.0.0 + checksum: 077b66f31ba44fd5a0d27d12a9e6a86bff8f97a4978dedb0373167156b5599fadb6920fdde0d9f803374164d810e05e8462ce28e86abbf7f0bea293a93711fc6 + languageName: node + linkType: hard + "minipass@npm:^3.0.0, minipass@npm:^3.1.1, minipass@npm:^3.1.6": version: 3.3.6 resolution: "minipass@npm:3.3.6" @@ -16120,9 +18145,18 @@ __metadata: languageName: node linkType: hard -"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" +"minizlib@npm:^1.3.3": + version: 1.3.3 + resolution: "minizlib@npm:1.3.3" + dependencies: + minipass: ^2.9.0 + checksum: b0425c04d2ae6aad5027462665f07cc0d52075f7fa16e942b4611115f9b31f02924073b7221be6f75929d3c47ab93750c63f6dc2bbe8619ceacb3de1f77732c0 + languageName: node + linkType: hard + +"minizlib@npm:^2.1.1, minizlib@npm:^2.1.2": + version: 2.1.2 + resolution: "minizlib@npm:2.1.2" dependencies: minipass: ^3.0.0 yallist: ^4.0.0 @@ -16130,7 +18164,25 @@ __metadata: languageName: node linkType: hard -"mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.4, mkdirp@npm:~0.5.1": +"mkdirp-promise@npm:^5.0.1": + version: 5.0.1 + resolution: "mkdirp-promise@npm:5.0.1" + dependencies: + mkdirp: "*" + checksum: 31ddc9478216adf6d6bee9ea7ce9ccfe90356d9fcd1dfb18128eac075390b4161356d64c3a7b0a75f9de01a90aadd990a0ec8c7434036563985c4b853a053ee2 + languageName: node + linkType: hard + +"mkdirp@npm:*": + version: 3.0.1 + resolution: "mkdirp@npm:3.0.1" + bin: + mkdirp: dist/cjs/src/bin.js + checksum: 972deb188e8fb55547f1e58d66bd6b4a3623bf0c7137802582602d73e6480c1c2268dcbafbfb1be466e00cc7e56ac514d7fd9334b7cf33e3e2ab547c16f83a8d + languageName: node + linkType: hard + +"mkdirp@npm:^0.5.1, mkdirp@npm:^0.5.4, mkdirp@npm:^0.5.5, mkdirp@npm:~0.5.1": version: 0.5.6 resolution: "mkdirp@npm:0.5.6" dependencies: @@ -16150,6 +18202,61 @@ __metadata: languageName: node linkType: hard +"mnemonist@npm:^0.38.0": + version: 0.38.5 + resolution: "mnemonist@npm:0.38.5" + dependencies: + obliterator: ^2.0.0 + checksum: 66080afc1616866beb164e230c432964d6eed467cf37ad00e9c10161b8267928124ca8f1d0ecfea86c85568acfa62d54faaf646a86968d1135189a0fdfdd6b78 + languageName: node + linkType: hard + +"mocha@npm:^10.0.0": + version: 10.2.0 + resolution: "mocha@npm:10.2.0" + dependencies: + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.3 + debug: 4.3.4 + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 5.0.1 + ms: 2.1.3 + nanoid: 3.3.3 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + workerpool: 6.2.1 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + bin: + _mocha: bin/_mocha + mocha: bin/mocha.js + checksum: 406c45eab122ffd6ea2003c2f108b2bc35ba036225eee78e0c784b6fa2c7f34e2b13f1dbacef55a4fdf523255d76e4f22d1b5aacda2394bd11666febec17c719 + languageName: node + linkType: hard + +"mock-fs@npm:^4.1.0": + version: 4.14.0 + resolution: "mock-fs@npm:4.14.0" + checksum: dccd976a8d753e19d3c7602ea422d1f7137def3c1128c177e1f5500fe8c50ec15fe0937cfc3a15c4577fe7adb9a37628b92da9294d13d90f08be4b669b0fca76 + languageName: node + linkType: hard + +"module-error@npm:^1.0.1, module-error@npm:^1.0.2": + version: 1.0.2 + resolution: "module-error@npm:1.0.2" + checksum: 5d653e35bd55b3e95f8aee2cdac108082ea892e71b8f651be92cde43e4ee86abee4fa8bd7fc3fe5e68b63926d42f63c54cd17b87a560c31f18739295575a3962 + languageName: node + linkType: hard + "moment@npm:^2.29.1": version: 2.29.4 resolution: "moment@npm:2.29.4" @@ -16279,6 +18386,26 @@ __metadata: languageName: node linkType: hard +"multibase@npm:^0.7.0": + version: 0.7.0 + resolution: "multibase@npm:0.7.0" + dependencies: + base-x: ^3.0.8 + buffer: ^5.5.0 + checksum: 3a520897d706b3064b59ddee286a9e1a5b35bb19bd830f93d7ddecdbf69fa46648c8fda0fec49a5d4640b8b7ac9d5fe360417d6de2906599aa535f55bf6b8e58 + languageName: node + linkType: hard + +"multibase@npm:~0.6.0": + version: 0.6.1 + resolution: "multibase@npm:0.6.1" + dependencies: + base-x: ^3.0.8 + buffer: ^5.5.0 + checksum: 0e25a978d2b5cf73e4cce31d032bad85230ea99e9394d259210f676a76539316e7c51bd7dcc9d83523ec7ea1f0e7a3353c5f69397639d78be9acbefa29431faa + languageName: node + linkType: hard + "multicast-dns@npm:^7.2.5": version: 7.2.5 resolution: "multicast-dns@npm:7.2.5" @@ -16291,13 +18418,43 @@ __metadata: languageName: node linkType: hard -"multiformats@npm:^9.4.2": +"multicodec@npm:^0.5.5": + version: 0.5.7 + resolution: "multicodec@npm:0.5.7" + dependencies: + varint: ^5.0.0 + checksum: 5af1febc3bb5381c303c964a4c3bacb9d0d16615599426d58c68722c46e66a7085082995479943084322028324ad692cd70ea14b5eefb2791d325fa00ead04a3 + languageName: node + linkType: hard + +"multicodec@npm:^1.0.0": + version: 1.0.4 + resolution: "multicodec@npm:1.0.4" + dependencies: + buffer: ^5.6.0 + varint: ^5.0.0 + checksum: e6a2916fa76c023b1c90b32ae74f8a781cf0727f71660b245a5ed1db46add6f2ce1586bee5713b16caf0a724e81bfe0678d89910c20d3bb5fd9649dacb2be79e + languageName: node + linkType: hard + +"multiformats@npm:9.9.0, multiformats@npm:^9.4.2": version: 9.9.0 resolution: "multiformats@npm:9.9.0" checksum: d3e8c1be400c09a014f557ea02251a2710dbc9fca5aa32cc702ff29f636c5471e17979f30bdcb0a9cbb556f162a8591dc2e1219c24fc21394a56115b820bb84e languageName: node linkType: hard +"multihashes@npm:^0.4.15, multihashes@npm:~0.4.15": + version: 0.4.21 + resolution: "multihashes@npm:0.4.21" + dependencies: + buffer: ^5.5.0 + multibase: ^0.7.0 + varint: ^5.0.0 + checksum: 688731560cf7384e899dc75c0da51e426eb7d058c5ea5eb57b224720a1108deb8797f1cd7f45599344d512d2877de99dd6a7b7773a095812365dea4ffe6ebd4c + languageName: node + linkType: hard + "mute-stream@npm:0.0.8": version: 0.0.8 resolution: "mute-stream@npm:0.0.8" @@ -16316,6 +18473,22 @@ __metadata: languageName: node linkType: hard +"nano-json-stream-parser@npm:^0.1.2": + version: 0.1.2 + resolution: "nano-json-stream-parser@npm:0.1.2" + checksum: 5bfe146358c659e0aa7d5e0003416be929c9bd02ba11b1e022b78dddf25be655e33d810249c1687d2c9abdcee5cd4d00856afd1b266a5a127236c0d16416d33a + languageName: node + linkType: hard + +"nanoid@npm:3.3.3": + version: 3.3.3 + resolution: "nanoid@npm:3.3.3" + bin: + nanoid: bin/nanoid.cjs + checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 + languageName: node + linkType: hard + "nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -16325,6 +18498,13 @@ __metadata: languageName: node linkType: hard +"napi-macros@npm:^2.2.2": + version: 2.2.2 + resolution: "napi-macros@npm:2.2.2" + checksum: c6f9bd71cdbbc37ddc3535aa5be481238641d89585b8a3f4d301cb89abf459e2d294810432bb7d12056d1f9350b1a0899a5afcf460237a3da6c398cf0fec7629 + languageName: node + linkType: hard + "natural-compare-lite@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare-lite@npm:1.4.0" @@ -16374,6 +18554,13 @@ __metadata: languageName: node linkType: hard +"next-tick@npm:^1.1.0": + version: 1.1.0 + resolution: "next-tick@npm:1.1.0" + checksum: 83b5cf36027a53ee6d8b7f9c0782f2ba87f4858d977342bfc3c20c21629290a2111f8374d13a81221179603ffc4364f38374b5655d17b6a8f8a8c77bdea4fe8b + languageName: node + linkType: hard + "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4" @@ -16441,6 +18628,20 @@ __metadata: languageName: node linkType: hard +"node-fetch@npm:^2.6.6": + version: 2.6.12 + resolution: "node-fetch@npm:2.6.12" + dependencies: + whatwg-url: ^5.0.0 + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + checksum: 3bc1655203d47ee8e313c0d96664b9673a3d4dd8002740318e9d27d14ef306693a4b2ef8d6525775056fd912a19e23f3ac0d7111ad8925877b7567b29a625592 + languageName: node + linkType: hard + "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -16627,6 +18828,16 @@ __metadata: languageName: node linkType: hard +"number-to-bn@npm:1.7.0": + version: 1.7.0 + resolution: "number-to-bn@npm:1.7.0" + dependencies: + bn.js: 4.11.6 + strip-hex-prefix: 1.0.0 + checksum: 5b8c9dbe7b49dc7a069e5f0ba4e197257c89db11463478cb002fee7a34dc8868636952bd9f6310e5fdf22b266e0e6dffb5f9537c741734718107e90ae59b3de4 + languageName: node + linkType: hard + "nwsapi@npm:^2.2.0": version: 2.2.4 resolution: "nwsapi@npm:2.2.4" @@ -16634,7 +18845,14 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4, object-assign@npm:^4.0.1, object-assign@npm:^4.1.1": +"oauth-sign@npm:~0.9.0": + version: 0.9.0 + resolution: "oauth-sign@npm:0.9.0" + checksum: 8f5497a127967866a3c67094c21efd295e46013a94e6e828573c62220e9af568cc1d2d04b16865ba583e430510fa168baf821ea78f355146d8ed7e350fc44c64 + languageName: node + linkType: hard + +"object-assign@npm:^4, object-assign@npm:^4.0.1, object-assign@npm:^4.1.0, object-assign@npm:^4.1.1": version: 4.1.1 resolution: "object-assign@npm:4.1.1" checksum: fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f @@ -16662,7 +18880,7 @@ __metadata: languageName: node linkType: hard -"object-is@npm:^1.1.5": +"object-is@npm:^1.0.1, object-is@npm:^1.1.5": version: 1.1.5 resolution: "object-is@npm:1.1.5" dependencies: @@ -16747,6 +18965,22 @@ __metadata: languageName: node linkType: hard +"obliterator@npm:^2.0.0": + version: 2.0.4 + resolution: "obliterator@npm:2.0.4" + checksum: f28ad35b6d812089315f375dc3e6e5f9bebf958ebe4b10ccd471c7115cbcf595e74bdac4783ae758e5b1f47e3096427fdb37cfa7bed566b132df92ff317b9a7c + languageName: node + linkType: hard + +"oboe@npm:2.1.5": + version: 2.1.5 + resolution: "oboe@npm:2.1.5" + dependencies: + http-https: ^1.0.0 + checksum: e6171b33645ffc3559688a824a461952380d0b8f6a203b2daf6767647f277554a73fd7ad795629d88cd8eab68c0460aabb1e1b8b52ef80e3ff7621ac39f832ed + languageName: node + linkType: hard + "obuf@npm:^1.0.0, obuf@npm:^1.1.2": version: 1.1.2 resolution: "obuf@npm:1.1.2" @@ -16931,6 +19165,29 @@ __metadata: languageName: node linkType: hard +"p-cancelable@npm:^2.0.0": + version: 2.1.1 + resolution: "p-cancelable@npm:2.1.1" + checksum: 3dba12b4fb4a1e3e34524535c7858fc82381bbbd0f247cc32dedc4018592a3950ce66b106d0880b4ec4c2d8d6576f98ca885dc1d7d0f274d1370be20e9523ddf + languageName: node + linkType: hard + +"p-cancelable@npm:^3.0.0": + version: 3.0.0 + resolution: "p-cancelable@npm:3.0.0" + checksum: 2b5ae34218f9c2cf7a7c18e5d9a726ef9b165ef07e6c959f6738371509e747334b5f78f3bcdeb03d8a12dcb978faf641fd87eb21486ed7d36fb823b8ddef3219 + languageName: node + linkType: hard + +"p-limit@npm:^1.1.0": + version: 1.3.0 + resolution: "p-limit@npm:1.3.0" + dependencies: + p-try: ^1.0.0 + checksum: 281c1c0b8c82e1ac9f81acd72a2e35d402bf572e09721ce5520164e9de07d8274451378a3470707179ad13240535558f4b277f02405ad752e08c7d5b0d54fbfd + languageName: node + linkType: hard + "p-limit@npm:^2.0.0, p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" @@ -16949,6 +19206,15 @@ __metadata: languageName: node linkType: hard +"p-locate@npm:^2.0.0": + version: 2.0.0 + resolution: "p-locate@npm:2.0.0" + dependencies: + p-limit: ^1.1.0 + checksum: e2dceb9b49b96d5513d90f715780f6f4972f46987dc32a0e18bc6c3fc74a1a5d73ec5f81b1398af5e58b99ea1ad03fd41e9181c01fa81b4af2833958696e3081 + languageName: node + linkType: hard + "p-locate@npm:^3.0.0": version: 3.0.0 resolution: "p-locate@npm:3.0.0" @@ -16995,6 +19261,13 @@ __metadata: languageName: node linkType: hard +"p-try@npm:^1.0.0": + version: 1.0.0 + resolution: "p-try@npm:1.0.0" + checksum: 3b5303f77eb7722144154288bfd96f799f8ff3e2b2b39330efe38db5dd359e4fb27012464cd85cb0a76e9b7edd1b443568cb3192c22e7cffc34989df0bafd605 + languageName: node + linkType: hard + "p-try@npm:^2.0.0": version: 2.2.0 resolution: "p-try@npm:2.2.0" @@ -17011,6 +19284,13 @@ __metadata: languageName: node linkType: hard +"pako@npm:^2.1.0": + version: 2.1.0 + resolution: "pako@npm:2.1.0" + checksum: 71666548644c9a4d056bcaba849ca6fd7242c6cf1af0646d3346f3079a1c7f4a66ffec6f7369ee0dc88f61926c10d6ab05da3e1fca44b83551839e89edd75a3e + languageName: node + linkType: hard + "param-case@npm:^3.0.4": version: 3.0.4 resolution: "param-case@npm:3.0.4" @@ -17030,6 +19310,13 @@ __metadata: languageName: node linkType: hard +"parse-headers@npm:^2.0.0": + version: 2.0.5 + resolution: "parse-headers@npm:2.0.5" + checksum: 3e97f01e4c7f960bfbfd0ee489f0bd8d3c72b6c814f1f79b66abec2cca8eaf8e4ecd89deba0b6e61266469aed87350bc932001181c01ff8c29a59e696abe251f + languageName: node + linkType: hard + "parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" @@ -17101,7 +19388,7 @@ __metadata: languageName: node linkType: hard -"path-parse@npm:^1.0.7": +"path-parse@npm:^1.0.6, path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" checksum: 49abf3d81115642938a8700ec580da6e830dde670be21893c62f4e10bd7dd4c3742ddc603fe24f898cba7eb0c6bc1777f8d9ac14185d34540c6d4d80cd9cae8a @@ -17148,6 +19435,19 @@ __metadata: languageName: node linkType: hard +"pbkdf2@npm:^3.0.17": + version: 3.1.2 + resolution: "pbkdf2@npm:3.1.2" + dependencies: + create-hash: ^1.1.2 + create-hmac: ^1.1.4 + ripemd160: ^2.0.1 + safe-buffer: ^5.0.1 + sha.js: ^2.4.8 + checksum: 2c950a100b1da72123449208e231afc188d980177d021d7121e96a2de7f2abbc96ead2b87d03d8fe5c318face097f203270d7e27908af9f471c165a4e8e69c92 + languageName: node + linkType: hard + "peek-readable@npm:^5.0.0": version: 5.0.0 resolution: "peek-readable@npm:5.0.0" @@ -18180,7 +20480,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.3.2, prettier@npm:^2.5.1": +"prettier@npm:^2.3.1, prettier@npm:^2.3.2, prettier@npm:^2.5.1": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -18254,6 +20554,13 @@ __metadata: languageName: node linkType: hard +"process@npm:^0.11.10": + version: 0.11.10 + resolution: "process@npm:0.11.10" + checksum: bfcce49814f7d172a6e6a14d5fa3ac92cc3d0c3b9feb1279774708a719e19acd673995226351a082a9ae99978254e320ccda4240ddc474ba31a76c79491ca7c3 + languageName: node + linkType: hard + "promise-inflight@npm:^1.0.1": version: 1.0.1 resolution: "promise-inflight@npm:1.0.1" @@ -18325,7 +20632,7 @@ __metadata: languageName: node linkType: hard -"psl@npm:^1.1.33": +"psl@npm:^1.1.28, psl@npm:^1.1.33": version: 1.9.0 resolution: "psl@npm:1.9.0" checksum: 20c4277f640c93d393130673f392618e9a8044c6c7bf61c53917a0fddb4952790f5f362c6c730a9c32b124813e173733f9895add8d26f566ed0ea0654b2e711d @@ -18349,6 +20656,13 @@ __metadata: languageName: node linkType: hard +"punycode@npm:2.1.0": + version: 2.1.0 + resolution: "punycode@npm:2.1.0" + checksum: d125d8f86cd89303c33bad829388c49ca23197e16ccf8cd398dcbd81b026978f6543f5066c66825b25b1dfea7790a42edbeea82908e103474931789714ab86cd + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": version: 2.3.0 resolution: "punycode@npm:2.3.0" @@ -18407,7 +20721,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.10.3, qs@npm:^6.11.0": +"qs@npm:^6.10.3, qs@npm:^6.11.0, qs@npm:^6.7.0": version: 6.11.2 resolution: "qs@npm:6.11.2" dependencies: @@ -18416,6 +20730,13 @@ __metadata: languageName: node linkType: hard +"qs@npm:~6.5.2": + version: 6.5.3 + resolution: "qs@npm:6.5.3" + checksum: 6f20bf08cabd90c458e50855559539a28d00b2f2e7dddcb66082b16a43188418cb3cb77cbd09268bcef6022935650f0534357b8af9eeb29bf0f27ccb17655692 + languageName: node + linkType: hard + "query-string@npm:7.1.3, query-string@npm:^7.1.0": version: 7.1.3 resolution: "query-string@npm:7.1.3" @@ -18428,6 +20749,17 @@ __metadata: languageName: node linkType: hard +"query-string@npm:^5.0.1": + version: 5.1.1 + resolution: "query-string@npm:5.1.1" + dependencies: + decode-uri-component: ^0.2.0 + object-assign: ^4.1.0 + strict-uri-encode: ^1.0.0 + checksum: 4ac760d9778d413ef5f94f030ed14b1a07a1708dd13fd3bc54f8b9ef7b425942c7577f30de0bf5a7d227ee65a9a0350dfa3a43d1d266880882fb7ce4c434a4dd + languageName: node + linkType: hard + "query-string@npm:^6.13.5": version: 6.14.1 resolution: "query-string@npm:6.14.1" @@ -18447,7 +20779,7 @@ __metadata: languageName: node linkType: hard -"queue-microtask@npm:^1.2.2": +"queue-microtask@npm:^1.2.2, queue-microtask@npm:^1.2.3": version: 1.2.3 resolution: "queue-microtask@npm:1.2.3" checksum: b676f8c040cdc5b12723ad2f91414d267605b26419d5c821ff03befa817ddd10e238d22b25d604920340fd73efd8ba795465a0377c4adf45a4a41e4234e42dc4 @@ -18461,6 +20793,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^5.1.1": + version: 5.1.1 + resolution: "quick-lru@npm:5.1.1" + checksum: a516faa25574be7947969883e6068dbe4aa19e8ef8e8e0fd96cddd6d36485e9106d85c0041a27153286b0770b381328f4072aa40d3b18a19f5f7d2b78b94b5ed + languageName: node + linkType: hard + "raf@npm:^3.4.1": version: 3.4.1 resolution: "raf@npm:3.4.1" @@ -18517,7 +20856,7 @@ __metadata: languageName: node linkType: hard -"raw-body@npm:2.5.2": +"raw-body@npm:2.5.2, raw-body@npm:^2.4.1": version: 2.5.2 resolution: "raw-body@npm:2.5.2" dependencies: @@ -19093,6 +21432,34 @@ __metadata: languageName: node linkType: hard +"request@npm:^2.79.0": + version: 2.88.2 + resolution: "request@npm:2.88.2" + dependencies: + aws-sign2: ~0.7.0 + aws4: ^1.8.0 + caseless: ~0.12.0 + combined-stream: ~1.0.6 + extend: ~3.0.2 + forever-agent: ~0.6.1 + form-data: ~2.3.2 + har-validator: ~5.1.3 + http-signature: ~1.2.0 + is-typedarray: ~1.0.0 + isstream: ~0.1.2 + json-stringify-safe: ~5.0.1 + mime-types: ~2.1.19 + oauth-sign: ~0.9.0 + performance-now: ^2.1.0 + qs: ~6.5.2 + safe-buffer: ^5.1.2 + tough-cookie: ~2.5.0 + tunnel-agent: ^0.6.0 + uuid: ^3.3.2 + checksum: 4e112c087f6eabe7327869da2417e9d28fcd0910419edd2eb17b6acfc4bfa1dad61954525949c228705805882d8a98a86a0ea12d7f739c01ee92af7062996983 + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -19100,7 +21467,7 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.2": +"require-from-string@npm:^2.0.0, require-from-string@npm:^2.0.2": version: 2.0.2 resolution: "require-from-string@npm:2.0.2" checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b @@ -19121,6 +21488,13 @@ __metadata: languageName: node linkType: hard +"resolve-alpn@npm:^1.0.0, resolve-alpn@npm:^1.2.0": + version: 1.2.1 + resolution: "resolve-alpn@npm:1.2.1" + checksum: f558071fcb2c60b04054c99aebd572a2af97ef64128d59bef7ab73bd50d896a222a056de40ffc545b633d99b304c259ea9d0c06830d5c867c34f0bfa60b8eae0 + languageName: node + linkType: hard + "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -19186,6 +21560,15 @@ __metadata: languageName: node linkType: hard +"resolve@npm:1.17.0": + version: 1.17.0 + resolution: "resolve@npm:1.17.0" + dependencies: + path-parse: ^1.0.6 + checksum: 9ceaf83b3429f2d7ff5d0281b8d8f18a1f05b6ca86efea7633e76b8f76547f33800799dfdd24434942dec4fbd9e651ed3aef577d9a6b5ec87ad89c1060e24759 + languageName: node + linkType: hard + "resolve@npm:^1.1.6, resolve@npm:^1.1.7, resolve@npm:^1.10.1, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2": version: 1.22.3 resolution: "resolve@npm:1.22.3" @@ -19212,6 +21595,15 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@1.17.0#~builtin": + version: 1.17.0 + resolution: "resolve@patch:resolve@npm%3A1.17.0#~builtin::version=1.17.0&hash=c3c19d" + dependencies: + path-parse: ^1.0.6 + checksum: 6fd799f282ddf078c4bc20ce863e3af01fa8cb218f0658d9162c57161a2dbafe092b13015b9a4c58d0e1e801cf7aa7a4f13115fea9db98c3f9a0c43e429bad6f + languageName: node + linkType: hard + "resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.1.7#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.2#~builtin": version: 1.22.3 resolution: "resolve@patch:resolve@npm%3A1.22.3#~builtin::version=1.22.3&hash=c3c19d" @@ -19238,6 +21630,15 @@ __metadata: languageName: node linkType: hard +"responselike@npm:^2.0.0": + version: 2.0.1 + resolution: "responselike@npm:2.0.1" + dependencies: + lowercase-keys: ^2.0.0 + checksum: b122535466e9c97b55e69c7f18e2be0ce3823c5d47ee8de0d9c0b114aa55741c6db8bfbfce3766a94d1272e61bfb1ebf0a15e9310ac5629fbb7446a861b4fd3a + languageName: node + linkType: hard + "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -19280,7 +21681,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.6.3": +"rimraf@npm:^2.2.8, rimraf@npm:^2.6.3": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: @@ -19313,6 +21714,27 @@ __metadata: languageName: node linkType: hard +"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": + version: 2.0.2 + resolution: "ripemd160@npm:2.0.2" + dependencies: + hash-base: ^3.0.0 + inherits: ^2.0.1 + checksum: 006accc40578ee2beae382757c4ce2908a826b27e2b079efdcd2959ee544ddf210b7b5d7d5e80467807604244e7388427330f5c6d4cd61e6edaddc5773ccc393 + languageName: node + linkType: hard + +"rlp@npm:^2.2.3, rlp@npm:^2.2.4": + version: 2.2.7 + resolution: "rlp@npm:2.2.7" + dependencies: + bn.js: ^5.2.0 + bin: + rlp: bin/rlp + checksum: 3db4dfe5c793f40ac7e0be689a1f75d05e6f2ca0c66189aeb62adab8c436b857ab4420a419251ee60370d41d957a55698fc5e23ab1e1b41715f33217bc4bb558 + languageName: node + linkType: hard + "robust-predicates@npm:^3.0.0": version: 3.0.2 resolution: "robust-predicates@npm:3.0.2" @@ -19383,6 +21805,15 @@ __metadata: languageName: node linkType: hard +"run-parallel-limit@npm:^1.1.0": + version: 1.1.0 + resolution: "run-parallel-limit@npm:1.1.0" + dependencies: + queue-microtask: ^1.2.2 + checksum: 672c3b87e7f939c684b9965222b361421db0930223ed1e43ebf0e7e48ccc1a022ea4de080bef4d5468434e2577c33b7681e3f03b7593fdc49ad250a55381123c + languageName: node + linkType: hard + "run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" @@ -19392,6 +21823,13 @@ __metadata: languageName: node linkType: hard +"rustbn.js@npm:~0.2.0": + version: 0.2.0 + resolution: "rustbn.js@npm:0.2.0" + checksum: 2148e7ba34e70682907ee29df4784639e6eb025481b2c91249403b7ec57181980161868d9aa24822a5075dd1bb5a180dfedc77309e5f0d27b6301f9b563af99a + languageName: node + linkType: hard + "rw@npm:1": version: 1.3.3 resolution: "rw@npm:1.3.3" @@ -19436,7 +21874,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: b99c4b41fdd67a6aaf280fcd05e9ffb0813654894223afb78a31f14a19ad220bba8aba1cb14eddce1fcfb037155fe6de4e861784eb434f7d11ed58d1e70dd491 @@ -19468,7 +21906,7 @@ __metadata: languageName: node linkType: hard -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": +"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0, safer-buffer@npm:^2.0.2, safer-buffer@npm:^2.1.0, safer-buffer@npm:~2.1.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" checksum: cab8f25ae6f1434abee8d80023d7e72b598cf1327164ddab31003c51215526801e40b66c5e65d658a0af1e9d6478cadcb4c745f4bd6751f97d8644786c0978b0 @@ -19586,13 +22024,25 @@ __metadata: languageName: node linkType: hard -"scrypt-js@npm:3.0.1": +"scrypt-js@npm:3.0.1, scrypt-js@npm:^3.0.0, scrypt-js@npm:^3.0.1": version: 3.0.1 resolution: "scrypt-js@npm:3.0.1" checksum: b7c7d1a68d6ca946f2fbb0778e0c4ec63c65501b54023b2af7d7e9f48fdb6c6580d6f7675cd53bda5944c5ebc057560d5a6365079752546865defb3b79dea454 languageName: node linkType: hard +"secp256k1@npm:^4.0.1": + version: 4.0.3 + resolution: "secp256k1@npm:4.0.3" + dependencies: + elliptic: ^6.5.4 + node-addon-api: ^2.0.0 + node-gyp: latest + node-gyp-build: ^4.2.0 + checksum: 21e219adc0024fbd75021001358780a3cc6ac21273c3fcaef46943af73969729709b03f1df7c012a0baab0830fb9a06ccc6b42f8d50050c665cb98078eab477b + languageName: node + linkType: hard + "select-hose@npm:^2.0.0": version: 2.0.0 resolution: "select-hose@npm:2.0.0" @@ -19620,6 +22070,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^5.5.0": + version: 5.7.2 + resolution: "semver@npm:5.7.2" + bin: + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 + languageName: node + linkType: hard + "semver@npm:^5.7.1": version: 5.7.1 resolution: "semver@npm:5.7.1" @@ -19638,6 +22097,17 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.5.4": + version: 7.5.4 + resolution: "semver@npm:7.5.4" + dependencies: + lru-cache: ^6.0.0 + bin: + semver: bin/semver.js + checksum: 12d8ad952fa353b0995bf180cdac205a4068b759a140e5d3c608317098b3575ac2f1e09182206bf2eb26120e1c0ed8fb92c48c592f6099680de56bb071423ca3 + languageName: node + linkType: hard + "semver@npm:~7.0.0": version: 7.0.0 resolution: "semver@npm:7.0.0" @@ -19668,6 +22138,15 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: ^2.1.0 + checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93 + languageName: node + linkType: hard + "serialize-javascript@npm:^4.0.0": version: 4.0.0 resolution: "serialize-javascript@npm:4.0.0" @@ -19713,6 +22192,19 @@ __metadata: languageName: node linkType: hard +"servify@npm:^0.1.12": + version: 0.1.12 + resolution: "servify@npm:0.1.12" + dependencies: + body-parser: ^1.16.0 + cors: ^2.8.1 + express: ^4.14.0 + request: ^2.79.0 + xhr: ^2.3.3 + checksum: f90e8f4e31b2981b31e3fa8be0b570b0876136b4cf818ba3bfb65e1bfb3c54cb90a0c30898a7c2974b586800bd26ff525c838a8c170148d9e6674c2170f535d8 + languageName: node + linkType: hard + "ses@npm:^0.18.1, ses@npm:^0.18.4": version: 0.18.4 resolution: "ses@npm:0.18.4" @@ -19727,6 +22219,13 @@ __metadata: languageName: node linkType: hard +"setimmediate@npm:^1.0.5": + version: 1.0.5 + resolution: "setimmediate@npm:1.0.5" + checksum: c9a6f2c5b51a2dabdc0247db9c46460152ffc62ee139f3157440bd48e7c59425093f42719ac1d7931f054f153e2d26cf37dfeb8da17a794a58198a2705e527fd + languageName: node + linkType: hard + "setprototypeof@npm:1.1.0": version: 1.1.0 resolution: "setprototypeof@npm:1.1.0" @@ -19756,7 +22255,7 @@ __metadata: languageName: unknown linkType: soft -"sha.js@npm:^2.4.11": +"sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8": version: 2.4.11 resolution: "sha.js@npm:2.4.11" dependencies: @@ -19829,6 +22328,24 @@ __metadata: languageName: node linkType: hard +"simple-concat@npm:^1.0.0": + version: 1.0.1 + resolution: "simple-concat@npm:1.0.1" + checksum: 4d211042cc3d73a718c21ac6c4e7d7a0363e184be6a5ad25c8a1502e49df6d0a0253979e3d50dbdd3f60ef6c6c58d756b5d66ac1e05cda9cacd2e9fc59e3876a + languageName: node + linkType: hard + +"simple-get@npm:^2.7.0": + version: 2.8.2 + resolution: "simple-get@npm:2.8.2" + dependencies: + decompress-response: ^3.3.0 + once: ^1.3.1 + simple-concat: ^1.0.0 + checksum: 230bd931d3198f21a5a1a566687a5ee1ef651b13b61c7a01b547b2a0c2bf72769b5fe14a3b4dd518e99a18ba1002ba8af3901c0e61e8a0d1e7631a3c2eb1f7a9 + languageName: node + linkType: hard + "simple-markdown@npm:^0.7.3": version: 0.7.3 resolution: "simple-markdown@npm:0.7.3" @@ -19916,7 +22433,26 @@ __metadata: languageName: node linkType: hard -"sonic-boom@npm:^2.2.1": +"solc@npm:0.7.3": + version: 0.7.3 + resolution: "solc@npm:0.7.3" + dependencies: + command-exists: ^1.2.8 + commander: 3.0.2 + follow-redirects: ^1.12.1 + fs-extra: ^0.30.0 + js-sha3: 0.8.0 + memorystream: ^0.3.1 + require-from-string: ^2.0.0 + semver: ^5.5.0 + tmp: 0.0.33 + bin: + solcjs: solcjs + checksum: 2d8eb16c6d8f648213c94dc8d977cffe5099cba7d41c82d92d769ef71ae8320a985065ce3d6c306440a85f8e8d2b27fb30bdd3ac38f69e5c1fa0ab8a3fb2f217 + languageName: node + linkType: hard + +"sonic-boom@npm:^2.2.1": version: 2.8.0 resolution: "sonic-boom@npm:2.8.0" dependencies: @@ -19985,7 +22521,7 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.20, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.20": +"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.13, source-map-support@npm:^0.5.20, source-map-support@npm:^0.5.6, source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" dependencies: @@ -20089,6 +22625,27 @@ __metadata: languageName: node linkType: hard +"sshpk@npm:^1.7.0": + version: 1.17.0 + resolution: "sshpk@npm:1.17.0" + dependencies: + asn1: ~0.2.3 + assert-plus: ^1.0.0 + bcrypt-pbkdf: ^1.0.0 + dashdash: ^1.12.0 + ecc-jsbn: ~0.1.1 + getpass: ^0.1.1 + jsbn: ~0.1.0 + safer-buffer: ^2.0.2 + tweetnacl: ~0.14.0 + bin: + sshpk-conv: bin/sshpk-conv + sshpk-sign: bin/sshpk-sign + sshpk-verify: bin/sshpk-verify + checksum: ba109f65c8e6c35133b8e6ed5576abeff8aa8d614824b7275ec3ca308f081fef483607c28d97780c1e235818b0f93ed8c8b56d0a5968d5a23fd6af57718c7597 + languageName: node + linkType: hard + "ssri@npm:^9.0.0": version: 9.0.1 resolution: "ssri@npm:9.0.1" @@ -20128,6 +22685,15 @@ __metadata: languageName: node linkType: hard +"stacktrace-parser@npm:^0.1.10": + version: 0.1.10 + resolution: "stacktrace-parser@npm:0.1.10" + dependencies: + type-fest: ^0.7.1 + checksum: f4fbddfc09121d91e587b60de4beb4941108e967d71ad3a171812dc839b010ca374d064ad0a296295fed13acd103609d99a4224a25b4e67de13cae131f1901ee + languageName: node + linkType: hard + "statuses@npm:2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" @@ -20175,6 +22741,13 @@ __metadata: languageName: node linkType: hard +"strict-uri-encode@npm:^1.0.0": + version: 1.1.0 + resolution: "strict-uri-encode@npm:1.1.0" + checksum: 9466d371f7b36768d43f7803f26137657559e4c8b0161fb9e320efb8edba3ae22f8e99d4b0d91da023b05a13f62ec5412c3f4f764b5788fac11d1fea93720bb3 + languageName: node + linkType: hard + "strict-uri-encode@npm:^2.0.0": version: 2.0.0 resolution: "strict-uri-encode@npm:2.0.0" @@ -20189,6 +22762,13 @@ __metadata: languageName: node linkType: hard +"string-format@npm:^2.0.0": + version: 2.0.0 + resolution: "string-format@npm:2.0.0" + checksum: dada2ef95f6d36c66562c673d95315f80457fa7dce2f3609a2e75d1190b98c88319028cf0a5b6c043d01c18d581b2641579f79480584ba030d6ac6fceb30bc55 + languageName: node + linkType: hard + "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -20358,6 +22938,15 @@ __metadata: languageName: node linkType: hard +"strip-hex-prefix@npm:1.0.0": + version: 1.0.0 + resolution: "strip-hex-prefix@npm:1.0.0" + dependencies: + is-hex-prefixed: 1.0.0 + checksum: 4cafe7caee1d281d3694d14920fd5d3c11adf09371cef7e2ccedd5b83efd9e9bd2219b5d6ce6e809df6e0f437dc9d30db1192116580875698aad164a6d6b285b + languageName: node + linkType: hard + "strip-indent@npm:^3.0.0": version: 3.0.0 resolution: "strip-indent@npm:3.0.0" @@ -20367,7 +22956,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -20479,6 +23068,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:8.1.1, supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + "supports-color@npm:^5.3.0, supports-color@npm:^5.5.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -20497,15 +23095,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: ^4.0.0 - checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 - languageName: node - linkType: hard - "supports-color@npm:^9.3.1": version: 9.3.1 resolution: "supports-color@npm:9.3.1" @@ -20584,6 +23173,25 @@ __metadata: languageName: node linkType: hard +"swarm-js@npm:^0.1.40": + version: 0.1.42 + resolution: "swarm-js@npm:0.1.42" + dependencies: + bluebird: ^3.5.0 + buffer: ^5.0.5 + eth-lib: ^0.1.26 + fs-extra: ^4.0.2 + got: ^11.8.5 + mime-types: ^2.1.16 + mkdirp-promise: ^5.0.1 + mock-fs: ^4.1.0 + setimmediate: ^1.0.5 + tar: ^4.0.2 + xhr-request: ^1.0.1 + checksum: bbb54b84232ef113ee106cf8158d1c827fbf84b309799576f61603f63d7653fde7e71df981d07f9e4c41781bbbbd72be77e5a47e6b694d6a83b96a6a20641475 + languageName: node + linkType: hard + "symbol-observable@npm:4.0.0": version: 4.0.0 resolution: "symbol-observable@npm:4.0.0" @@ -20668,6 +23276,21 @@ __metadata: languageName: node linkType: hard +"tar@npm:^4.0.2": + version: 4.4.19 + resolution: "tar@npm:4.4.19" + dependencies: + chownr: ^1.1.4 + fs-minipass: ^1.2.7 + minipass: ^2.9.0 + minizlib: ^1.3.3 + mkdirp: ^0.5.5 + safe-buffer: ^5.2.1 + yallist: ^3.1.1 + checksum: 423c8259b17f8f612cef9c96805d65f90ba9a28e19be582cd9d0fcb217038219f29b7547198e8fd617da5f436376d6a74b99827acd1238d2f49cf62330f9664e + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.15 resolution: "tar@npm:6.1.15" @@ -20837,6 +23460,13 @@ __metadata: languageName: node linkType: hard +"timed-out@npm:^4.0.1": + version: 4.0.1 + resolution: "timed-out@npm:4.0.1" + checksum: 98efc5d6fc0d2a329277bd4d34f65c1bf44d9ca2b14fd267495df92898f522e6f563c5e9e467c418e0836f5ca1f47a84ca3ee1de79b1cc6fe433834b7f02ec54 + languageName: node + linkType: hard + "tiny-invariant@npm:^1.0.2": version: 1.3.1 resolution: "tiny-invariant@npm:1.3.1" @@ -20858,7 +23488,7 @@ __metadata: languageName: node linkType: hard -"tmp@npm:^0.0.33": +"tmp@npm:0.0.33, tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" dependencies: @@ -20937,6 +23567,16 @@ __metadata: languageName: node linkType: hard +"tough-cookie@npm:~2.5.0": + version: 2.5.0 + resolution: "tough-cookie@npm:2.5.0" + dependencies: + psl: ^1.1.28 + punycode: ^2.1.1 + checksum: 16a8cd090224dd176eee23837cbe7573ca0fa297d7e468ab5e1c02d49a4e9a97bb05fef11320605eac516f91d54c57838a25864e8680e27b069a5231d8264977 + languageName: node + linkType: hard + "tr46@npm:^1.0.1": version: 1.0.1 resolution: "tr46@npm:1.0.1" @@ -20994,6 +23634,29 @@ __metadata: languageName: node linkType: hard +"ts-command-line-args@npm:^2.2.0": + version: 2.5.1 + resolution: "ts-command-line-args@npm:2.5.1" + dependencies: + chalk: ^4.1.0 + command-line-args: ^5.1.1 + command-line-usage: ^6.1.0 + string-format: ^2.0.0 + bin: + write-markdown: dist/write-markdown.js + checksum: 7c0a7582e94f1d2160e3dd379851ec4f1758bc673ccd71bae07f839f83051b6b83e0ae14325c2d04ea728e5bde7b7eacfd2ab060b8fd4b8ab29e0bbf77f6c51e + languageName: node + linkType: hard + +"ts-essentials@npm:^7.0.1": + version: 7.0.3 + resolution: "ts-essentials@npm:7.0.3" + peerDependencies: + typescript: ">=3.7.0" + checksum: 74d75868acf7f8b95e447d8b3b7442ca21738c6894e576df9917a352423fde5eb43c5651da5f78997da6061458160ae1f6b279150b42f47ccc58b73e55acaa2f + languageName: node + linkType: hard + "ts-interface-checker@npm:^0.1.9": version: 0.1.13 resolution: "ts-interface-checker@npm:0.1.13" @@ -21128,7 +23791,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:1.14.1, tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0": +"tslib@npm:1.14.1, tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: dbe628ef87f66691d5d2959b3e41b9ca0045c3ee3c7c7b906cc1e328b39f199bb1ad9e671c39025bd56122ac57dfbf7385a94843b1cc07c60a4db74795829acd @@ -21142,6 +23805,13 @@ __metadata: languageName: node linkType: hard +"tsort@npm:0.0.1": + version: 0.0.1 + resolution: "tsort@npm:0.0.1" + checksum: 581566c248690b9ea7e431e1545affb3d2cab0f5dcd0e45ddef815dfaec4864cb5f0cfd8072924dedbc0de9585ff07e3e65db60f14fab4123737b9bb6e72eacc + languageName: node + linkType: hard + "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -21153,6 +23823,36 @@ __metadata: languageName: node linkType: hard +"tunnel-agent@npm:^0.6.0": + version: 0.6.0 + resolution: "tunnel-agent@npm:0.6.0" + dependencies: + safe-buffer: ^5.0.1 + checksum: 05f6510358f8afc62a057b8b692f05d70c1782b70db86d6a1e0d5e28a32389e52fa6e7707b6c5ecccacc031462e4bc35af85ecfe4bbc341767917b7cf6965711 + languageName: node + linkType: hard + +"tweetnacl-util@npm:^0.15.1": + version: 0.15.1 + resolution: "tweetnacl-util@npm:0.15.1" + checksum: ae6aa8a52cdd21a95103a4cc10657d6a2040b36c7a6da7b9d3ab811c6750a2d5db77e8c36969e75fdee11f511aa2b91c552496c6e8e989b6e490e54aca2864fc + languageName: node + linkType: hard + +"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0": + version: 0.14.5 + resolution: "tweetnacl@npm:0.14.5" + checksum: 6061daba1724f59473d99a7bb82e13f211cdf6e31315510ae9656fefd4779851cb927adad90f3b488c8ed77c106adc0421ea8055f6f976ff21b27c5c4e918487 + languageName: node + linkType: hard + +"tweetnacl@npm:^1.0.3": + version: 1.0.3 + resolution: "tweetnacl@npm:1.0.3" + checksum: e4a57cac188f0c53f24c7a33279e223618a2bfb5fea426231991652a13247bea06b081fd745d71291fcae0f4428d29beba1b984b1f1ce6f66b06a6d1ab90645c + languageName: node + linkType: hard + "type-check@npm:^0.4.0, type-check@npm:~0.4.0": version: 0.4.0 resolution: "type-check@npm:0.4.0" @@ -21199,6 +23899,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.7.1": + version: 0.7.1 + resolution: "type-fest@npm:0.7.1" + checksum: 5b1b113529d59949d97b76977d545989ddc11b81bb0c766b6d2ccc65473cb4b4a5c7d24f5be2c2bb2de302a5d7a13c1732ea1d34c8c59b7e0ec1f890cf7fc424 + languageName: node + linkType: hard + "type-fest@npm:^2.18.0": version: 2.19.0 resolution: "type-fest@npm:2.19.0" @@ -21216,6 +23923,42 @@ __metadata: languageName: node linkType: hard +"type@npm:^1.0.1": + version: 1.2.0 + resolution: "type@npm:1.2.0" + checksum: dae8c64f82c648b985caf321e9dd6e8b7f4f2e2d4f846fc6fd2c8e9dc7769382d8a52369ddbaccd59aeeceb0df7f52fb339c465be5f2e543e81e810e413451ee + languageName: node + linkType: hard + +"type@npm:^2.7.2": + version: 2.7.2 + resolution: "type@npm:2.7.2" + checksum: 0f42379a8adb67fe529add238a3e3d16699d95b42d01adfe7b9a7c5da297f5c1ba93de39265ba30ffeb37dfd0afb3fb66ae09f58d6515da442219c086219f6f4 + languageName: node + linkType: hard + +"typechain@npm:^8.1.1": + version: 8.3.1 + resolution: "typechain@npm:8.3.1" + dependencies: + "@types/prettier": ^2.1.1 + debug: ^4.3.1 + fs-extra: ^7.0.0 + glob: 7.1.7 + js-sha3: ^0.8.0 + lodash: ^4.17.15 + mkdirp: ^1.0.4 + prettier: ^2.3.1 + ts-command-line-args: ^2.2.0 + ts-essentials: ^7.0.1 + peerDependencies: + typescript: ">=4.3.0" + bin: + typechain: dist/cli/cli.js + checksum: c1e11ab1452d0c83be0c34a8b900b156b0c6654b95f7e7bb18dd98c0decd6009ffa1316e393f4e8def187af1bea3e931a13503815cc37155c0c945b7ae5b5215 + languageName: node + linkType: hard + "typed-array-length@npm:^1.0.4": version: 1.0.4 resolution: "typed-array-length@npm:1.0.4" @@ -21295,6 +24038,13 @@ __metadata: languageName: node linkType: hard +"ultron@npm:~1.1.0": + version: 1.1.1 + resolution: "ultron@npm:1.1.1" + checksum: aa7b5ebb1b6e33287b9d873c6756c4b7aa6d1b23d7162ff25b0c0ce5c3c7e26e2ab141a5dc6e96c10ac4d00a372e682ce298d784f06ffcd520936590b4bc0653 + languageName: node + linkType: hard + "umzug@npm:^3.2.1": version: 3.2.1 resolution: "umzug@npm:3.2.1" @@ -21328,7 +24078,7 @@ __metadata: languageName: node linkType: hard -"undici@npm:^5.22.0, undici@npm:^5.22.1": +"undici@npm:^5.14.0, undici@npm:^5.22.0, undici@npm:^5.22.1": version: 5.22.1 resolution: "undici@npm:5.22.1" dependencies: @@ -21402,6 +24152,13 @@ __metadata: languageName: node linkType: hard +"universalify@npm:^0.1.0": + version: 0.1.2 + resolution: "universalify@npm:0.1.2" + checksum: 40cdc60f6e61070fe658ca36016a8f4ec216b29bf04a55dce14e3710cc84c7448538ef4dad3728d0bfe29975ccd7bfb5f414c45e7b78883567fb31b246f02dff + languageName: node + linkType: hard + "universalify@npm:^0.2.0": version: 0.2.0 resolution: "universalify@npm:0.2.0" @@ -21477,6 +24234,13 @@ __metadata: languageName: node linkType: hard +"url-set-query@npm:^1.0.0": + version: 1.0.0 + resolution: "url-set-query@npm:1.0.0" + checksum: 5ad73525e8f3ab55c6bf3ddc70a43912e65ff9ce655d7868fdcefdf79f509cfdddde4b07150797f76186f1a47c0ecd2b7bb3687df8f84757dee4110cf006e12d + languageName: node + linkType: hard + "use-callback-ref@npm:^1.3.0": version: 1.3.0 resolution: "use-callback-ref@npm:1.3.0" @@ -21540,6 +24304,13 @@ __metadata: languageName: node linkType: hard +"utf8@npm:3.0.0": + version: 3.0.0 + resolution: "utf8@npm:3.0.0" + checksum: cb89a69ad9ab393e3eae9b25305b3ff08bebca9adc839191a34f90777eb2942f86a96369d2839925fea58f8f722f7e27031d697f10f5f39690f8c5047303e62d + languageName: node + linkType: hard + "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -21559,7 +24330,7 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.4": +"util@npm:^0.12.0, util@npm:^0.12.4, util@npm:^0.12.5": version: 0.12.5 resolution: "util@npm:0.12.5" dependencies: @@ -21586,7 +24357,7 @@ __metadata: languageName: node linkType: hard -"uuid@npm:9.0.0": +"uuid@npm:9.0.0, uuid@npm:^9.0.0": version: 9.0.0 resolution: "uuid@npm:9.0.0" bin: @@ -21595,6 +24366,15 @@ __metadata: languageName: node linkType: hard +"uuid@npm:^3.3.2": + version: 3.4.0 + resolution: "uuid@npm:3.4.0" + bin: + uuid: ./bin/uuid + checksum: 58de2feed61c59060b40f8203c0e4ed7fd6f99d42534a499f1741218a1dd0c129f4aa1de797bcf822c8ea5da7e4137aa3673431a96dae729047f7aca7b27866f + languageName: node + linkType: hard + "uuid@npm:^8.3.2": version: 8.3.2 resolution: "uuid@npm:8.3.2" @@ -21662,6 +24442,13 @@ __metadata: languageName: node linkType: hard +"varint@npm:^5.0.0": + version: 5.0.2 + resolution: "varint@npm:5.0.2" + checksum: e1a66bf9a6cea96d1f13259170d4d41b845833acf3a9df990ea1e760d279bd70d5b1f4c002a50197efd2168a2fd43eb0b808444600fd4d23651e8d42fe90eb05 + languageName: node + linkType: hard + "vary@npm:^1, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" @@ -21669,6 +24456,17 @@ __metadata: languageName: node linkType: hard +"verror@npm:1.10.0": + version: 1.10.0 + resolution: "verror@npm:1.10.0" + dependencies: + assert-plus: ^1.0.0 + core-util-is: 1.0.2 + extsprintf: ^1.2.0 + checksum: c431df0bedf2088b227a4e051e0ff4ca54df2c114096b0c01e1cbaadb021c30a04d7dd5b41ab277bcd51246ca135bf931d4c4c796ecae7a4fef6d744ecef36ea + languageName: node + linkType: hard + "viem@npm:^0.3.33": version: 0.3.37 resolution: "viem@npm:0.3.37" @@ -21769,6 +24567,277 @@ __metadata: languageName: node linkType: hard +"web3-bzz@npm:1.10.0": + version: 1.10.0 + resolution: "web3-bzz@npm:1.10.0" + dependencies: + "@types/node": ^12.12.6 + got: 12.1.0 + swarm-js: ^0.1.40 + checksum: a4b6766e23ca4b2d37b0390aaf0c7f8a1246e90be843dc7183a04a1960d60998fc9267234aba9989e7e87db837dac58d4dee027071ecce29344611e20f3b9ffc + languageName: node + linkType: hard + +"web3-core-helpers@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-helpers@npm:1.10.0" + dependencies: + web3-eth-iban: 1.10.0 + web3-utils: 1.10.0 + checksum: 3f8b8ed5e3f56c5760452e5d8850d77607cd7046392c7df78a0903611dcbf875acc9bff04bbc397cd967ce27d45b61de19dcf47fada0c958f54a5d69181a40a6 + languageName: node + linkType: hard + +"web3-core-method@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-method@npm:1.10.0" + dependencies: + "@ethersproject/transactions": ^5.6.2 + web3-core-helpers: 1.10.0 + web3-core-promievent: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-utils: 1.10.0 + checksum: 29c42c92f0f6d895245c6d3dba4adffd822787b09bee0d9953a5d50365ae1ab0559085e9d6104e2dfb00b372fbf02ff1d6292c9a9e565ada1a5c531754d654cd + languageName: node + linkType: hard + +"web3-core-promievent@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-promievent@npm:1.10.0" + dependencies: + eventemitter3: 4.0.4 + checksum: 68e9f40f78d92ce1ee9808d04a28a89d20ab4dc36af5ba8405f132044cbb01825f76f35249a9599f9568a95d5e7c9e4a09ada6d4dc2e27e0c1b32c9232c8c973 + languageName: node + linkType: hard + +"web3-core-requestmanager@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-requestmanager@npm:1.10.0" + dependencies: + util: ^0.12.5 + web3-core-helpers: 1.10.0 + web3-providers-http: 1.10.0 + web3-providers-ipc: 1.10.0 + web3-providers-ws: 1.10.0 + checksum: ce63b521b70b4e159510abf9d70e09d0c704b924a83951b350bb1d8f56b03dae21d3ea709a118019d272f754940ad6f6772002e7a8692bf733126fee80c84226 + languageName: node + linkType: hard + +"web3-core-subscriptions@npm:1.10.0": + version: 1.10.0 + resolution: "web3-core-subscriptions@npm:1.10.0" + dependencies: + eventemitter3: 4.0.4 + web3-core-helpers: 1.10.0 + checksum: baca40f4d34da03bf4e6d64a13d9498a3ebfa37544869921671340d83581c87efbe3830998ae99db776fa22f0cdb529f9bb1fe7d516de1f9ce7b9da1c3a63859 + languageName: node + linkType: hard + +"web3-core@npm:1.10.0, web3-core@npm:^1.8.1": + version: 1.10.0 + resolution: "web3-core@npm:1.10.0" + dependencies: + "@types/bn.js": ^5.1.1 + "@types/node": ^12.12.6 + bignumber.js: ^9.0.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-requestmanager: 1.10.0 + web3-utils: 1.10.0 + checksum: 075b6dbf743e8cfad2aa1b9d603a45f0f30998c778af22cd0090d455a027e0658c398721a2a270c218dc2a561cbfd5cdbfe5ca14a6c2f5cd4afc8743e05a2e60 + languageName: node + linkType: hard + +"web3-eth-abi@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-abi@npm:1.10.0" + dependencies: + "@ethersproject/abi": ^5.6.3 + web3-utils: 1.10.0 + checksum: 465a4c19d6d8b41592871cb82e64fc0847093614d9f377939a731a691262a7e01398d8fe9e37f63e8d654707841a532c1161582ddaf87c52a66412a0285805c5 + languageName: node + linkType: hard + +"web3-eth-accounts@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-accounts@npm:1.10.0" + dependencies: + "@ethereumjs/common": 2.5.0 + "@ethereumjs/tx": 3.3.2 + eth-lib: 0.2.8 + ethereumjs-util: ^7.1.5 + scrypt-js: ^3.0.1 + uuid: ^9.0.0 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-utils: 1.10.0 + checksum: 93821129133a30596e3008af31beb2f26d74157f56e5a669e22565dc991f13747d3d9150202860f93709a8a2a6ec80eaf12bee78f4e03d5ab60e28d7ee68d888 + languageName: node + linkType: hard + +"web3-eth-contract@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-contract@npm:1.10.0" + dependencies: + "@types/bn.js": ^5.1.1 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-promievent: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-eth-abi: 1.10.0 + web3-utils: 1.10.0 + checksum: 7a0c24686a128dc08e4d532866feaab28f4d59d95c89a00779e37e956116e90fac27efca0d4911b845739f2fd54cfa1f455c5cdf7e88c27d6e553d5bff86f381 + languageName: node + linkType: hard + +"web3-eth-ens@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-ens@npm:1.10.0" + dependencies: + content-hash: ^2.5.2 + eth-ens-namehash: 2.0.8 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-promievent: 1.10.0 + web3-eth-abi: 1.10.0 + web3-eth-contract: 1.10.0 + web3-utils: 1.10.0 + checksum: 31c1c6c4303ab6a0036362d5bbc5c55c173cc12823a9ccea8df6609e11ae49374944a15c7810f4f425b65ab2f5062960ebb8efe55cdc22aa3232eca2607a0922 + languageName: node + linkType: hard + +"web3-eth-iban@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-iban@npm:1.10.0" + dependencies: + bn.js: ^5.2.1 + web3-utils: 1.10.0 + checksum: ca0921f0a232a343a538f6376e55ef3e29e952fba613ecda09dde82149e8088581d8f93da2ed2d8b7e008abdf6610eecc0f4f25efba0ecf412156fd70e9869c0 + languageName: node + linkType: hard + +"web3-eth-personal@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth-personal@npm:1.10.0" + dependencies: + "@types/node": ^12.12.6 + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-net: 1.10.0 + web3-utils: 1.10.0 + checksum: e6c1f540d763e691d81042ec4d0a27b95345bd3ae338b8dffa36bb1a34ae34ec0193c3f0a9ff324fca2918de0d66b022750ee007cf2c3a65241028e852195356 + languageName: node + linkType: hard + +"web3-eth@npm:1.10.0": + version: 1.10.0 + resolution: "web3-eth@npm:1.10.0" + dependencies: + web3-core: 1.10.0 + web3-core-helpers: 1.10.0 + web3-core-method: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-eth-abi: 1.10.0 + web3-eth-accounts: 1.10.0 + web3-eth-contract: 1.10.0 + web3-eth-ens: 1.10.0 + web3-eth-iban: 1.10.0 + web3-eth-personal: 1.10.0 + web3-net: 1.10.0 + web3-utils: 1.10.0 + checksum: d82332a20508667cf69d216530baa541c69fc44046bb7c57f0f85ba09c0eeaab753146388c66d0313673d0ea93be9325817e34cc69d7f4ddf9e01c43a130a2fe + languageName: node + linkType: hard + +"web3-net@npm:1.10.0": + version: 1.10.0 + resolution: "web3-net@npm:1.10.0" + dependencies: + web3-core: 1.10.0 + web3-core-method: 1.10.0 + web3-utils: 1.10.0 + checksum: 5183d897ccf539adafa60e8372871f8d8ecf4c46a0943aeee1d5f78a54c8faddfcb2406269ab422e57ef871c29496dba1bffbe044693b559a3bcd7957af87363 + languageName: node + linkType: hard + +"web3-providers-http@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-http@npm:1.10.0" + dependencies: + abortcontroller-polyfill: ^1.7.3 + cross-fetch: ^3.1.4 + es6-promise: ^4.2.8 + web3-core-helpers: 1.10.0 + checksum: 2fe7c3485626e5e7cb3dd54d05e74f35aec306afe25ae35047e4db1ad75a01a4490d8abf8caa2648400c597d8a252d8cca9950977af2dc242b0ba1f95ab2d2c2 + languageName: node + linkType: hard + +"web3-providers-ipc@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-ipc@npm:1.10.0" + dependencies: + oboe: 2.1.5 + web3-core-helpers: 1.10.0 + checksum: 103cb6b26ced5c79f76178ae4339e867f09128a8bf5041553966dbc23fb63a4de638a619cadf1f4c4fdff4f352cd63bce54f1fe2eb582fc18cea11ea64067a71 + languageName: node + linkType: hard + +"web3-providers-ws@npm:1.10.0": + version: 1.10.0 + resolution: "web3-providers-ws@npm:1.10.0" + dependencies: + eventemitter3: 4.0.4 + web3-core-helpers: 1.10.0 + websocket: ^1.0.32 + checksum: 0784334a9ad61c209468335bfed4f656e23b4aab8bddf834de29895fde79309bffe90bfbc65b975c6ea4870ef4521b90469aabeb3124b99d905d1a52ca7bcbe3 + languageName: node + linkType: hard + +"web3-shh@npm:1.10.0": + version: 1.10.0 + resolution: "web3-shh@npm:1.10.0" + dependencies: + web3-core: 1.10.0 + web3-core-method: 1.10.0 + web3-core-subscriptions: 1.10.0 + web3-net: 1.10.0 + checksum: 7f4b39ba4b4f6107cb21d00d11821eb68af40d7e59e8fedf385c318954f9d9288bd075014322752e27a1d663a4c40d28bbd46ddb4e336519db9e96c9b0d3821d + languageName: node + linkType: hard + +"web3-utils@npm:1.10.0, web3-utils@npm:^1.8.1": + version: 1.10.0 + resolution: "web3-utils@npm:1.10.0" + dependencies: + bn.js: ^5.2.1 + ethereum-bloom-filters: ^1.0.6 + ethereumjs-util: ^7.1.0 + ethjs-unit: 0.1.6 + number-to-bn: 1.7.0 + randombytes: ^2.1.0 + utf8: 3.0.0 + checksum: c6b7662359c0513b5cbfe02cdcb312ce9152778bb19d94d413d44f74cfaa93b7de97190ab6ba11af25a40855c949d2427dcb751929c6d0f257da268c55a3ba2a + languageName: node + linkType: hard + +"web3@npm:^1.8.1": + version: 1.10.0 + resolution: "web3@npm:1.10.0" + dependencies: + web3-bzz: 1.10.0 + web3-core: 1.10.0 + web3-eth: 1.10.0 + web3-eth-personal: 1.10.0 + web3-net: 1.10.0 + web3-shh: 1.10.0 + web3-utils: 1.10.0 + checksum: 21cce929b71b8de6844eadd6bcf611dfb91f16f2e8b89bec3f3d18b2e2548b4a2a629886962935cc15fac0ce74c9a00d9ca6b53f4be6a81bd68d17689eb134a9 + languageName: node + linkType: hard + "webidl-conversions@npm:^3.0.0": version: 3.0.1 resolution: "webidl-conversions@npm:3.0.1" @@ -22013,6 +25082,20 @@ __metadata: languageName: node linkType: hard +"websocket@npm:^1.0.32": + version: 1.0.34 + resolution: "websocket@npm:1.0.34" + dependencies: + bufferutil: ^4.0.1 + debug: ^2.2.0 + es5-ext: ^0.10.50 + typedarray-to-buffer: ^3.1.5 + utf-8-validate: ^5.0.2 + yaeti: ^0.0.6 + checksum: 8a0ce6d79cc1334bb6ea0d607f0092f3d32700b4dd19e4d5540f2a85f3b50e1f8110da0e4716737056584dde70bbebcb40bbd94bbb437d7468c71abfbfa077d8 + languageName: node + linkType: hard + "whatwg-encoding@npm:^1.0.5": version: 1.0.5 resolution: "whatwg-encoding@npm:1.0.5" @@ -22430,6 +25513,13 @@ __metadata: languageName: node linkType: hard +"workerpool@npm:6.2.1": + version: 6.2.1 + resolution: "workerpool@npm:6.2.1" + checksum: c2c6eebbc5225f10f758d599a5c016fa04798bcc44e4c1dffb34050cd361d7be2e97891aa44419e7afe647b1f767b1dc0b85a5e046c409d890163f655028b09d + languageName: node + linkType: hard + "wrap-ansi@npm:^6.2.0": version: 6.2.0 resolution: "wrap-ansi@npm:6.2.0" @@ -22511,6 +25601,17 @@ __metadata: languageName: node linkType: hard +"ws@npm:^3.0.0": + version: 3.3.3 + resolution: "ws@npm:3.3.3" + dependencies: + async-limiter: ~1.0.0 + safe-buffer: ~5.1.0 + ultron: ~1.1.0 + checksum: 20b7bf34bb88715b9e2d435b76088d770e063641e7ee697b07543815fabdb752335261c507a973955e823229d0af8549f39cc669825e5c8404aa0422615c81d9 + languageName: node + linkType: hard + "ws@npm:^7.4.0, ws@npm:^7.4.5, ws@npm:^7.4.6, ws@npm:^7.5.1": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -22541,6 +25642,42 @@ __metadata: languageName: node linkType: hard +"xhr-request-promise@npm:^0.1.2": + version: 0.1.3 + resolution: "xhr-request-promise@npm:0.1.3" + dependencies: + xhr-request: ^1.1.0 + checksum: 2e127c0de063db0aa704b8d5b805fd34f0f07cac21284a88c81f96727eb71af7d2dfa3ad43e96ed3e851e05a1bd88933048ec183378b48594dfbead1c9043aee + languageName: node + linkType: hard + +"xhr-request@npm:^1.0.1, xhr-request@npm:^1.1.0": + version: 1.1.0 + resolution: "xhr-request@npm:1.1.0" + dependencies: + buffer-to-arraybuffer: ^0.0.5 + object-assign: ^4.1.1 + query-string: ^5.0.1 + simple-get: ^2.7.0 + timed-out: ^4.0.1 + url-set-query: ^1.0.0 + xhr: ^2.0.4 + checksum: fd8186f33e8696dabcd1ad2983f8125366f4cd799c6bf30aa8d942ac481a7e685a5ee8c38eeee6fca715a7084b432a3a326991375557dc4505c928d3f7b0f0a8 + languageName: node + linkType: hard + +"xhr@npm:^2.0.4, xhr@npm:^2.3.3": + version: 2.6.0 + resolution: "xhr@npm:2.6.0" + dependencies: + global: ~4.4.0 + is-function: ^1.0.1 + parse-headers: ^2.0.0 + xtend: ^4.0.0 + checksum: a1db277e37737caf3ed363d2a33ce4b4ea5b5fc190b663a6f70bc252799185b840ccaa166eaeeea4841c9c60b87741f0a24e29cbcf6708dd425986d4df186d2f + languageName: node + linkType: hard + "xml-name-validator@npm:^3.0.0": version: 3.0.0 resolution: "xml-name-validator@npm:3.0.0" @@ -22576,7 +25713,14 @@ __metadata: languageName: node linkType: hard -"yallist@npm:^3.0.2": +"yaeti@npm:^0.0.6": + version: 0.0.6 + resolution: "yaeti@npm:0.0.6" + checksum: 6db12c152f7c363b80071086a3ebf5032e03332604eeda988872be50d6c8469e1f13316175544fa320f72edad696c2d83843ad0ff370659045c1a68bcecfcfea + languageName: node + linkType: hard + +"yallist@npm:^3.0.0, yallist@npm:^3.0.2, yallist@npm:^3.1.1": version: 3.1.1 resolution: "yallist@npm:3.1.1" checksum: 48f7bb00dc19fc635a13a39fe547f527b10c9290e7b3e836b9a8f1ca04d4d342e85714416b3c2ab74949c9c66f9cebb0473e6bc353b79035356103b47641285d @@ -22604,6 +25748,13 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924 + languageName: node + linkType: hard + "yargs-parser@npm:21.1.1, yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" @@ -22628,6 +25779,33 @@ __metadata: languageName: node linkType: hard +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: ^6.0.0 + decamelize: ^4.0.0 + flat: ^5.0.2 + is-plain-obj: ^2.1.0 + checksum: 68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0, yargs@npm:^16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: ^7.0.2 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.0 + y18n: ^5.0.5 + yargs-parser: ^20.2.2 + checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59 + languageName: node + linkType: hard + "yargs@npm:^15.3.1": version: 15.4.1 resolution: "yargs@npm:15.4.1" @@ -22647,21 +25825,6 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^16.2.0": - version: 16.2.0 - resolution: "yargs@npm:16.2.0" - dependencies: - cliui: ^7.0.2 - escalade: ^3.1.1 - get-caller-file: ^2.0.5 - require-directory: ^2.1.1 - string-width: ^4.2.0 - y18n: ^5.0.5 - yargs-parser: ^20.2.2 - checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59 - languageName: node - linkType: hard - "yargs@npm:^17.3.1": version: 17.7.2 resolution: "yargs@npm:17.7.2" From 8a5926e1c2dedb18b8bc2759ae82298bdf1eb347 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Wed, 2 Aug 2023 07:56:47 +0200 Subject: [PATCH 03/63] useSigner utility hook --- packages/frontend/src/hooks/useSigner.ts | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/frontend/src/hooks/useSigner.ts diff --git a/packages/frontend/src/hooks/useSigner.ts b/packages/frontend/src/hooks/useSigner.ts new file mode 100644 index 000000000..8ba9b54f3 --- /dev/null +++ b/packages/frontend/src/hooks/useSigner.ts @@ -0,0 +1,25 @@ +// Convert wagmi/viem `WalletClient` to ethers `Signer` +import { useMemo } from 'react'; +import { useWalletClient } from 'wagmi'; +import { providers } from 'ethers'; +import { JsonRpcSigner } from '@ethersproject/providers'; + +function walletClientToSigner(walletClient): JsonRpcSigner { + const { account, chain, transport } = walletClient; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + const provider = new providers.Web3Provider(transport, network); + const signer = provider.getSigner(account.address); + return signer; +} + +export function useSigner(chainId: number): JsonRpcSigner | undefined { + const { data: walletClient } = useWalletClient({ chainId }); + return useMemo( + () => (walletClient ? walletClientToSigner(walletClient) : undefined), + [walletClient] + ); +} From 0e6d7c794951152e3b58916b0918f1010f6768bb Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Wed, 2 Aug 2023 07:57:06 +0200 Subject: [PATCH 04/63] Make optimism default network --- packages/frontend/src/providers/Web3Provider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/providers/Web3Provider.tsx b/packages/frontend/src/providers/Web3Provider.tsx index 008423c18..ddd5edc3b 100644 --- a/packages/frontend/src/providers/Web3Provider.tsx +++ b/packages/frontend/src/providers/Web3Provider.tsx @@ -9,7 +9,7 @@ import { import merge from 'lodash/merge'; import { WagmiConfig, configureChains, createConfig } from 'wagmi'; import { publicProvider } from 'wagmi/providers/public'; -import { mainnet } from 'wagmi/chains'; +import { optimism } from 'wagmi/chains'; import { alchemyProvider } from 'wagmi/providers/alchemy'; interface WindowWithEnv extends Window { @@ -28,7 +28,7 @@ const REACT_APP_WALLETCONNECT_PROJECT_ID = ''; const { chains, publicClient } = configureChains( - [mainnet], + [optimism], [ alchemyProvider({ apiKey: REACT_APP_ALCHEMY_KEY || '', From 3bd4a2e7c69e3089898aa62a6fbec20752120372 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Wed, 2 Aug 2023 07:57:22 +0200 Subject: [PATCH 05/63] Attestations WIP --- .../PeriodDetails/components/Attestations.tsx | 149 ++++++++++++++++-- 1 file changed, 136 insertions(+), 13 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index dfef8ad47..b0993e983 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -1,21 +1,144 @@ -import { useParams } from 'react-router-dom'; -import { useRecoilValue } from 'recoil'; -import { PeriodPageParams, SinglePeriod } from '@/model/periods/periods'; -import { PeriodStatusType } from '@/model/periods/enums/period-status-type.enum'; +import { ethers } from 'ethers'; + +import { useSigner } from '../../../hooks/useSigner'; +import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; +import SafeApiKit from '@safe-global/api-kit'; +import { + OperationType, + SafeTransactionDataPartial, +} from '@safe-global/safe-core-sdk-types'; +import { useNetwork } from 'wagmi'; +import { EAS } from '@ethereum-attestation-service/eas-sdk'; + +const SAFE_ADDRESS = '0xf6937E015d5337F648fE01a03A74c9FAA4f90d54'; +type UseAttestationsReturn = { + createAttestation: () => Promise; +}; + +function useAttestations(): UseAttestationsReturn { + const signer = useSigner(10); + const eas = new EAS('0x4200000000000000000000000000000000000021'); + console.log('eas', eas); + + const createAttestation = async (): Promise => { + try { + console.log('createAttestation'); + console.log('signer', signer); + if (!signer) { + return; + } + + // // Create EthAdapter instance + const ethAdapter = new EthersAdapter({ + ethers, + signerOrProvider: signer, + }); + + // // Create Safe instance + const safe = await Safe.create({ + ethAdapter, + safeAddress: SAFE_ADDRESS, + }); + + // Create Safe API Kit instance + const safeService = new SafeApiKit({ + txServiceUrl: 'https://safe-transaction-optimism.safe.global', + ethAdapter, + }); + + // Create transaction + // const safeTransactionData: SafeTransactionDataPartial = { + // to: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', + // value: '1', // 1 wei + // data: '0x', + // operation: OperationType.Call, + // }; + + // Create transaction + const safeTransactionData: SafeTransactionDataPartial = { + to: eas.contract.address, + value: '0', // 1 wei + data: eas.contract.interface.encodeFunctionData('attest', [ + { + schema: + '0x85500e806cf1e74844d51a20a6d893fe1ed6f6b0738b50e43d774827d08eca61', + data: { + recipient: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', + expirationTime: 0, + revocable: false, + refUID: + '0x0000000000000000000000000000000000000000000000000000000000000000', + data: '0x0000000000000000000000000000000000000000000000000000000000000001', + value: 0, + }, + }, + ]), + + operation: OperationType.Call, + }; + + const safeTransaction = await safe.createTransaction({ + safeTransactionData, + }); + + const senderAddress = await signer.getAddress(); + const safeTxHash = await safe.getTransactionHash(safeTransaction); + const signature = await safe.signTransactionHash(safeTxHash); + + // Propose transaction to the service + await safeService.proposeTransaction({ + safeAddress: SAFE_ADDRESS, + safeTransactionData: safeTransaction.data, + safeTxHash, + senderAddress, + senderSignature: signature.data, + }); + + console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); + console.log('- safeTxHash:', safeTxHash); + console.log('- Sender:', senderAddress); + console.log('- Sender signature:', signature.data); + + const tx = await safeService.getTransaction(safeTxHash); + console.log('Transaction:', tx); + console.log('Transaction2:', safeTransaction); + + const estimateTx = await safeService.estimateSafeTransaction( + SAFE_ADDRESS, + tx + ); + console.log('estimateTx:', estimateTx); + + const executeTxResponse = await safe.executeTransaction(tx, { + gasLimit: 1000000, + }); + const receipt = await executeTxResponse.transactionResponse?.wait(); + + console.log('Transaction executed:'); + console.log( + `https://optimistic.etherscan.io/tx/${receipt?.transactionHash}` + ); + } catch (e) { + console.log('error', e); + } + }; + return { createAttestation }; +} const Attestations = (): JSX.Element => { - const { periodId } = useParams(); - const period = useRecoilValue(SinglePeriod(periodId)); - if (!period || period.status !== PeriodStatusType.CLOSED) { - return ( -
- Analytics are available after quantification when the period is closed. -
- ); - } + const { createAttestation } = useAttestations(); + const { chain, chains } = useNetwork(); + return (

Attestations

+ {chain &&
Connected to {chain.name}
} + {chains && ( +
Available chains: {chains.map((chain) => chain.name)}
+ )} +
); }; From e94244673ff5e22c1813e74bf1c8cb233f5df3fd Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 08:22:01 +0200 Subject: [PATCH 06/63] Add support for filtering on hostname --- packages/api/src/community/community.controller.ts | 4 ++-- packages/api/src/community/community.service.ts | 7 +++++-- .../community/dto/find-all-communities-input.dto.ts | 13 +++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 packages/api/src/community/dto/find-all-communities-input.dto.ts diff --git a/packages/api/src/community/community.controller.ts b/packages/api/src/community/community.controller.ts index 5a4e241d9..f9fe8a50c 100644 --- a/packages/api/src/community/community.controller.ts +++ b/packages/api/src/community/community.controller.ts @@ -16,7 +16,6 @@ import { Community } from './schemas/community.schema'; import { MongooseClassSerializerInterceptor } from '../shared/interceptors/mongoose-class-serializer.interceptor'; import { ObjectIdPipe } from '../shared/pipes/object-id.pipe'; import { CommunityPaginatedResponseDto } from './dto/community-pagination-model.dto'; -import { PaginatedQueryDto } from '../shared/dto/pagination-query.dto'; import { ObjectId, Types } from 'mongoose'; import { Permissions } from '../auth/decorators/permissions.decorator'; import { CreateCommunityInputDto } from './dto/create-community-input.dto'; @@ -29,6 +28,7 @@ import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto import { IsNameAvailableRequestDto } from './dto/is-name-available-request-dto'; import { EventLogService } from '../event-log/event-log.service'; import { EventLogTypeKey } from '../event-log/enums/event-log-type-key'; +import { FindAllCommunitiesInputDto } from './dto/find-all-communities-input.dto'; @Controller('communities') @ApiTags('Communities') @@ -82,7 +82,7 @@ export class CommunityController { }) @UseInterceptors(MongooseClassSerializerInterceptor(Community)) async findAll( - @Query() options: PaginatedQueryDto, + @Query() options: FindAllCommunitiesInputDto, ): Promise { return this.communityService.findAllPaginated(options); } diff --git a/packages/api/src/community/community.service.ts b/packages/api/src/community/community.service.ts index 484fd1c08..b1e093624 100644 --- a/packages/api/src/community/community.service.ts +++ b/packages/api/src/community/community.service.ts @@ -3,7 +3,6 @@ import { InjectConnection, InjectModel } from '@nestjs/mongoose'; import { Connection, Types } from 'mongoose'; import { ApiException } from '../shared/exceptions/api-exception'; import { Community } from './schemas/community.schema'; -import { PaginatedQueryDto } from '../shared/dto/pagination-query.dto'; import { CommunityPaginatedResponseDto } from './dto/community-pagination-model.dto'; import { CreateCommunityInputDto } from './dto/create-community-input.dto'; import { UpdateCommunityInputDto } from './dto/update-community-input.dto'; @@ -20,6 +19,7 @@ import { databaseExists } from '../database/utils/database-exists'; import { hostNameToDbName } from '../database/utils/host-name-to-db-name'; import { PaginateModel } from '../shared/interfaces/paginate-model.interface'; import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto'; +import { FindAllCommunitiesInputDto } from './dto/find-all-communities-input.dto'; @Injectable() export class CommunityService { @@ -56,10 +56,13 @@ export class CommunityService { * @returns */ async findAllPaginated( - options: PaginatedQueryDto, + options: FindAllCommunitiesInputDto, ): Promise { const { sortColumn, sortType } = options; const query = {} as any; + if (options.hostname) { + query.hostname = options.hostname; + } // Sorting - defaults to descending const sort = diff --git a/packages/api/src/community/dto/find-all-communities-input.dto.ts b/packages/api/src/community/dto/find-all-communities-input.dto.ts new file mode 100644 index 000000000..840f3b2cd --- /dev/null +++ b/packages/api/src/community/dto/find-all-communities-input.dto.ts @@ -0,0 +1,13 @@ +import { ApiProperty } from '@nestjs/swagger'; +import { IsOptional } from 'class-validator'; +import { PaginatedQueryDto } from '../../shared/dto/pagination-query.dto'; + +export class FindAllCommunitiesInputDto extends PaginatedQueryDto { + @ApiProperty({ + required: false, + type: 'string', + example: 'hostname.givepraise.xyz', + }) + @IsOptional() + hostname?: string; +} From f82bd679d278e8ac92b1cdc4caee447e68bd64b3 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 08:48:23 +0200 Subject: [PATCH 07/63] Rename type to FindAllCommunitiesQueryDto --- packages/api-types/out/schema.ts | 716 ++++++++---------- packages/api/openapi.json | 2 +- .../api/src/community/community.controller.ts | 4 +- .../api/src/community/community.service.ts | 4 +- ...o.ts => find-all-communities-query.dto.ts} | 2 +- 5 files changed, 319 insertions(+), 409 deletions(-) rename packages/api/src/community/dto/{find-all-communities-input.dto.ts => find-all-communities-query.dto.ts} (83%) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 999c2278d..00dfc823a 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,253 +3,254 @@ * Do not make direct changes to the file. */ + export interface paths { - '/api/activate': { + "/api/activate": { /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ - post: operations['ActivateController_activate']; + post: operations["ActivateController_activate"]; }; - '/api/users/export/json': { + "/api/users/export/json": { /** Export users document to json */ - get: operations['UsersController_exportJson']; + get: operations["UsersController_exportJson"]; }; - '/api/users/export/csv': { + "/api/users/export/csv": { /** Export users document to csv */ - get: operations['UsersController_exportCsv']; + get: operations["UsersController_exportCsv"]; }; - '/api/users/export/parquet': { + "/api/users/export/parquet": { /** Export users document to parquet */ - get: operations['UsersController_exportParquet']; + get: operations["UsersController_exportParquet"]; }; - '/api/users': { - get: operations['UsersController_findAll']; + "/api/users": { + get: operations["UsersController_findAll"]; }; - '/api/users/{id}': { - get: operations['UsersController_findOne']; + "/api/users/{id}": { + get: operations["UsersController_findOne"]; /** Updates a user */ - patch: operations['UsersController_update']; + patch: operations["UsersController_update"]; }; - '/api/users/{id}/addRole': { - patch: operations['UsersController_addRole']; + "/api/users/{id}/addRole": { + patch: operations["UsersController_addRole"]; }; - '/api/users/{id}/removeRole': { - patch: operations['UsersController_removeRole']; + "/api/users/{id}/removeRole": { + patch: operations["UsersController_removeRole"]; }; - '/api/periods/export/json': { + "/api/periods/export/json": { /** Export periods document to json */ - get: operations['PeriodsController_exportJson']; + get: operations["PeriodsController_exportJson"]; }; - '/api/periods/export/csv': { + "/api/periods/export/csv": { /** Export periods document to csv */ - get: operations['PeriodsController_exportCsv']; + get: operations["PeriodsController_exportCsv"]; }; - '/api/periods/export/parquet': { + "/api/periods/export/parquet": { /** Export periods document to parquet */ - get: operations['PeriodsController_exportParquet']; + get: operations["PeriodsController_exportParquet"]; }; - '/api/periods': { + "/api/periods": { /** List all periods */ - get: operations['PeriodsController_findAllPaginated']; + get: operations["PeriodsController_findAllPaginated"]; /** Create a new period */ - post: operations['PeriodsController_create']; + post: operations["PeriodsController_create"]; }; - '/api/periods/{id}': { + "/api/periods/{id}": { /** Find period by id */ - get: operations['PeriodsController_findOne']; + get: operations["PeriodsController_findOne"]; /** Update a period */ - patch: operations['PeriodsController_update']; + patch: operations["PeriodsController_update"]; }; - '/api/periods/{id}/close': { + "/api/periods/{id}/close": { /** Close a period */ - patch: operations['PeriodsController_close']; + patch: operations["PeriodsController_close"]; }; - '/api/periods/{id}/praise': { + "/api/periods/{id}/praise": { /** Fetch all Praise in a period */ - get: operations['PeriodsController_praise']; + get: operations["PeriodsController_praise"]; }; - '/api/periods/{periodId}/praise/receiver/{receiverId}': { + "/api/periods/{periodId}/praise/receiver/{receiverId}": { /** Fetch all Praise in a period for a given receiver */ - get: operations['PeriodsController_praiseByReceiver']; + get: operations["PeriodsController_praiseByReceiver"]; }; - '/api/periods/{periodId}/praise/giver/{giverId}': { + "/api/periods/{periodId}/praise/giver/{giverId}": { /** Fetch all Praise in a period for a given giver */ - get: operations['PeriodsController_praiseByGiver']; + get: operations["PeriodsController_praiseByGiver"]; }; - '/api/periods/{periodId}/praise/quantifier/{quantifierId}': { + "/api/periods/{periodId}/praise/quantifier/{quantifierId}": { /** Fetch all Praise in a period for a given quantifier */ - get: operations['PeriodsController_praiseByQuantifier']; + get: operations["PeriodsController_praiseByQuantifier"]; }; - '/api/periods/{id}/verifyQuantifierPoolSize': { + "/api/periods/{id}/verifyQuantifierPoolSize": { /** Verify quantifier pool size */ - get: operations['PeriodsController_verifyQuantifierPoolSize']; + get: operations["PeriodsController_verifyQuantifierPoolSize"]; }; - '/api/periods/{id}/assignQuantifiers': { + "/api/periods/{id}/assignQuantifiers": { /** Assign quantifiers to period */ - patch: operations['PeriodsController_assignQuantifiers']; + patch: operations["PeriodsController_assignQuantifiers"]; }; - '/api/periods/{id}/replaceQuantifier': { + "/api/periods/{id}/replaceQuantifier": { /** Replace quantifier in period */ - patch: operations['PeriodsController_replaceQuantifier']; + patch: operations["PeriodsController_replaceQuantifier"]; }; - '/api/event-log': { + "/api/event-log": { /** List event logs, paginated results */ - get: operations['EventLogController_findAllPaginated']; + get: operations["EventLogController_findAllPaginated"]; }; - '/api/event-log/types': { + "/api/event-log/types": { /** List event log types */ - get: operations['EventLogController_types']; + get: operations["EventLogController_types"]; }; - '/api/settings': { + "/api/settings": { /** List all settings. */ - get: operations['SettingsController_findAll']; + get: operations["SettingsController_findAll"]; }; - '/api/settings/{id}': { + "/api/settings/{id}": { /** Get a setting. */ - get: operations['SettingsController_findOne']; + get: operations["SettingsController_findOne"]; /** Set a value for a setting. */ - patch: operations['SettingsController_set']; + patch: operations["SettingsController_set"]; }; - '/api/settings/{id}/upload': { + "/api/settings/{id}/upload": { /** Upload a file for a setting */ - patch: operations['SettingsController_setWithUpload']; + patch: operations["SettingsController_setWithUpload"]; }; - '/api/settings/uploads/{file}': { + "/api/settings/uploads/{file}": { /** Serve an uploaded settings file. */ - get: operations['SettingsController_serveUpload']; + get: operations["SettingsController_serveUpload"]; }; - '/api/periods/{periodId}/settings': { + "/api/periods/{periodId}/settings": { /** List all period settings. */ - get: operations['PeriodSettingsController_findAll']; + get: operations["PeriodSettingsController_findAll"]; }; - '/api/periods/{periodId}/settings/{settingId}': { + "/api/periods/{periodId}/settings/{settingId}": { /** Get a period setting. */ - get: operations['PeriodSettingsController_findOne']; + get: operations["PeriodSettingsController_findOne"]; /** Set value for a period setting. */ - patch: operations['PeriodSettingsController_set']; + patch: operations["PeriodSettingsController_set"]; }; - '/api/praise': { + "/api/praise": { /** List praise items, paginated results */ - get: operations['PraiseController_findAllPaginated']; + get: operations["PraiseController_findAllPaginated"]; /** Create praise item */ - post: operations['PraiseController_praise']; + post: operations["PraiseController_praise"]; }; - '/api/praise/export/json': { + "/api/praise/export/json": { /** Export praise document to json */ - get: operations['PraiseController_exportJson']; + get: operations["PraiseController_exportJson"]; }; - '/api/praise/export/csv': { + "/api/praise/export/csv": { /** Export praise document to csv */ - get: operations['PraiseController_exportCsv']; + get: operations["PraiseController_exportCsv"]; }; - '/api/praise/export/parquet': { + "/api/praise/export/parquet": { /** Export praise document to parquet */ - get: operations['PraiseController_exportParquet']; + get: operations["PraiseController_exportParquet"]; }; - '/api/praise/{id}': { + "/api/praise/{id}": { /** Find praise item by id */ - get: operations['PraiseController_findOne']; + get: operations["PraiseController_findOne"]; }; - '/api/praise/forward': { + "/api/praise/forward": { /** Forward praise item */ - post: operations['PraiseController_forward']; + post: operations["PraiseController_forward"]; }; - '/api/useraccounts': { + "/api/useraccounts": { /** UserAccount list */ - get: operations['UserAccountsController_findAll']; + get: operations["UserAccountsController_findAll"]; /** Create a UserAccount */ - post: operations['UserAccountsController_create']; + post: operations["UserAccountsController_create"]; }; - '/api/useraccounts/export/json': { + "/api/useraccounts/export/json": { /** Export userAccounts document to json */ - get: operations['UserAccountsController_exportJson']; + get: operations["UserAccountsController_exportJson"]; }; - '/api/useraccounts/export/csv': { + "/api/useraccounts/export/csv": { /** Export userAccounts document to csv */ - get: operations['UserAccountsController_exportCsv']; + get: operations["UserAccountsController_exportCsv"]; }; - '/api/useraccounts/export/parquet': { + "/api/useraccounts/export/parquet": { /** Export userAccounts document to parquet */ - get: operations['UserAccountsController_exportParquet']; + get: operations["UserAccountsController_exportParquet"]; }; - '/api/useraccounts/{id}': { + "/api/useraccounts/{id}": { /** Get a UserAccount. */ - get: operations['UserAccountsController_findOne']; + get: operations["UserAccountsController_findOne"]; /** Update UserAccount */ - patch: operations['UserAccountsController_update']; + patch: operations["UserAccountsController_update"]; }; - '/api/api-key': { + "/api/api-key": { /** List all API keys */ - get: operations['ApiKeyController_findAll']; + get: operations["ApiKeyController_findAll"]; /** Create API key */ - post: operations['ApiKeyController_createApiKey']; + post: operations["ApiKeyController_createApiKey"]; }; - '/api/api-key/{id}': { + "/api/api-key/{id}": { /** Get API key by ID */ - get: operations['ApiKeyController_findOne']; + get: operations["ApiKeyController_findOne"]; /** Update API key description */ - put: operations['ApiKeyController_updateApiKeyDescription']; + put: operations["ApiKeyController_updateApiKeyDescription"]; /** Revoke API key */ - delete: operations['ApiKeyController_revokeApiKey']; + delete: operations["ApiKeyController_revokeApiKey"]; }; - '/api/auth/eth-signature/nonce': { + "/api/auth/eth-signature/nonce": { /** Generates a nonce for the user and returns it */ - post: operations['EthSignatureController_nonce']; + post: operations["EthSignatureController_nonce"]; }; - '/api/auth/eth-signature/login': { + "/api/auth/eth-signature/login": { /** Verifies a user's signature and returns a JWT token */ - post: operations['EthSignatureController_login']; + post: operations["EthSignatureController_login"]; }; - '/api/auth/eth-signature/refresh': { + "/api/auth/eth-signature/refresh": { /** Verifies a refreshToken and returns a JWT token */ - post: operations['EthSignatureController_token']; + post: operations["EthSignatureController_token"]; }; - '/api/communities': { - get: operations['CommunityController_findAll']; + "/api/communities": { + get: operations["CommunityController_findAll"]; /** Create a new community */ - post: operations['CommunityController_create']; + post: operations["CommunityController_create"]; }; - '/api/communities/{id}': { - get: operations['CommunityController_findOne']; + "/api/communities/{id}": { + get: operations["CommunityController_findOne"]; /** Update community */ - patch: operations['CommunityController_update']; + patch: operations["CommunityController_update"]; }; - '/api/communities/isNameAvailable': { - get: operations['CommunityController_isNameAvailable']; + "/api/communities/isNameAvailable": { + get: operations["CommunityController_isNameAvailable"]; }; - '/api/communities/{id}/discord/link': { + "/api/communities/{id}/discord/link": { /** Link discord to community */ - patch: operations['CommunityController_linkDiscord']; + patch: operations["CommunityController_linkDiscord"]; }; - '/api/quantifications/export/json': { + "/api/quantifications/export/json": { /** Export quantifications document to json */ - get: operations['QuantificationsController_exportJson']; + get: operations["QuantificationsController_exportJson"]; }; - '/api/quantifications/export/csv': { + "/api/quantifications/export/csv": { /** Export quantifications document to csv */ - get: operations['QuantificationsController_exportCsv']; + get: operations["QuantificationsController_exportCsv"]; }; - '/api/quantifications/export/parquet': { + "/api/quantifications/export/parquet": { /** Export quantifications document to parquet */ - get: operations['QuantificationsController_exportParquet']; + get: operations["QuantificationsController_exportParquet"]; }; - '/api/quantifications/multiple': { + "/api/quantifications/multiple": { /** Quantify multiple praise items */ - patch: operations['QuantificationsController_quantifyMultiple']; + patch: operations["QuantificationsController_quantifyMultiple"]; }; - '/api/quantifications/{id}': { + "/api/quantifications/{id}": { /** Quantify praise item by id */ - patch: operations['QuantificationsController_quantify']; + patch: operations["QuantificationsController_quantify"]; }; - '/api/reports': { + "/api/reports": { /** List all report manifests */ - get: operations['ReportsController_listAllReports']; + get: operations["ReportsController_listAllReports"]; }; - '/api/reports/receiverBio/{userAccountId}': { + "/api/reports/receiverBio/{userAccountId}": { /** Get one AI generated receiver bio */ - get: operations['ReportsController_receiverBio']; + get: operations["ReportsController_receiverBio"]; }; - '/api/reports/receiverLabels/{userAccountId}': { + "/api/reports/receiverLabels/{userAccountId}": { /** AI generated labels describing a praise receiver. */ - get: operations['ReportsController_receiverLabels']; + get: operations["ReportsController_receiverLabels"]; }; } @@ -274,17 +275,7 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -293,7 +284,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -316,18 +307,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -342,18 +323,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -371,16 +342,7 @@ export interface components { }; UpdateUserRoleInputDto: { /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; Period: { /** @example 621f802b813dbdba9eeaf7d7 */ @@ -388,7 +350,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; /** Format: date-time */ @@ -415,7 +377,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Period'][]; + docs: readonly (components["schemas"]["Period"])[]; meta?: Record; }; Quantification: { @@ -434,12 +396,12 @@ export interface components { /** @example 639b178f19296ee0f2d0585d */ praise: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ updatedAt: string; @@ -459,7 +421,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: components['schemas']['Quantification'][]; + quantifications: (components["schemas"]["Quantification"])[]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -489,16 +451,16 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; - quantifiers?: readonly components['schemas']['PeriodDetailsQuantifierDto'][]; - givers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; - receivers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; + quantifiers?: readonly (components["schemas"]["PeriodDetailsQuantifierDto"])[]; + givers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; + receivers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; /** @example 543 */ numberOfPraise: number; }; @@ -543,10 +505,10 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccountWithUserRefDto']; - giver: components['schemas']['UserAccountWithUserRefDto']; - forwarder?: components['schemas']['UserAccountWithUserRefDto']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccountWithUserRefDto"]; + giver: components["schemas"]["UserAccountWithUserRefDto"]; + forwarder?: components["schemas"]["UserAccountWithUserRefDto"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -554,12 +516,12 @@ export interface components { }; VerifyQuantifierPoolSizeDto: { /** - * @description The number of quantifiers in the pool + * @description The number of quantifiers in the pool * @example 10 */ quantifierPoolSize: number; /** - * @description The number of quantifiers needed in the pool + * @description The number of quantifiers needed in the pool * @example 10 */ quantifierPoolSizeNeeded: number; @@ -585,18 +547,18 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccount']; - giver: components['schemas']['UserAccount']; - forwarder?: components['schemas']['UserAccount']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccount"]; + giver: components["schemas"]["UserAccount"]; + forwarder?: components["schemas"]["UserAccount"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; ReplaceQuantifierResponseDto: { - praises: readonly components['schemas']['Praise'][]; - period: components['schemas']['PeriodDetailsDto']; + praises: readonly (components["schemas"]["Praise"])[]; + period: components["schemas"]["PeriodDetailsDto"]; }; UserAccountNoUserId: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -616,15 +578,7 @@ export interface components { }; EventLogType: { /** @enum {string} */ - key: - | 'PERMISSION' - | 'AUTHENTICATION' - | 'PERIOD' - | 'PRAISE' - | 'QUANTIFICATION' - | 'SETTING' - | 'USER_ACCOUNT' - | 'COMMUNITY'; + key: "PERMISSION" | "AUTHENTICATION" | "PERIOD" | "PRAISE" | "QUANTIFICATION" | "SETTING" | "USER_ACCOUNT" | "COMMUNITY"; /** @example An action that changes user permissions */ label: string; /** @example A user's permissions were changed */ @@ -633,22 +587,22 @@ export interface components { EventLog: { /** @example 621f802b813dbdba9eeaf7d7 */ _id: string; - user?: components['schemas']['User']; - useraccount?: components['schemas']['UserAccountNoUserId']; + user?: components["schemas"]["User"]; + useraccount?: components["schemas"]["UserAccountNoUserId"]; /** @example 621f802b813dbdba9eeaf7d7 */ apiKey?: string; /** @example 621f802b813dbdba9eeaf7d7 */ period?: string; - type: components['schemas']['EventLogType']; + type: components["schemas"]["EventLogType"]; /** @example A description of the event */ description: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ updatedAt: string; @@ -672,7 +626,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['EventLog'][]; + docs: readonly (components["schemas"]["EventLog"])[]; meta?: Record; }; Setting: { @@ -683,21 +637,11 @@ export interface components { /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; /** @example 555 */ defaultValue: string; /** @enum {string} */ - type: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example Quantifiers Per Praise */ label: string; /** @example How many redundant quantifications are assigned to each praise? */ @@ -717,12 +661,12 @@ export interface components { PeriodSetting: { /** @example 62291b7ea8b1619f78818524 */ _id: string; - period: components['schemas']['Period']; - setting: components['schemas']['Setting']; + period: components["schemas"]["Period"]; + setting: components["schemas"]["Setting"]; /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; }; SetPeriodSettingDto: { /** @example 666 */ @@ -747,7 +691,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Praise'][]; + docs: readonly (components["schemas"]["Praise"])[]; meta?: Record; }; PraiseCreateInputDto: { @@ -759,8 +703,8 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; }; PraiseForwardInputDto: { /** @example for making edits in the welcome text */ @@ -771,9 +715,9 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; - forwarder: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; + forwarder: components["schemas"]["UserAccount"]; }; CreateUserAccountInputDto: { /** @example 098098098098098 */ @@ -792,7 +736,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -825,7 +769,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -845,16 +789,7 @@ export interface components { /** @example My API Key */ description: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; CreateApiKeyResponseDto: { /** @example 639b178f19296ee0f2d0585d */ @@ -866,16 +801,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -893,16 +819,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -936,7 +853,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components['schemas']['User']; + user: components["schemas"]["User"]; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -957,7 +874,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -978,7 +895,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -986,7 +903,7 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ - discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; + discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; }; UpdateCommunityInputDto: { /** @example banklessdao.givepraise.xyz */ @@ -1001,7 +918,7 @@ export interface components { * "0x345.." * ] */ - owners?: string[]; + owners?: (string)[]; }; CommunityPaginatedResponseDto: { /** @example 1200 */ @@ -1022,7 +939,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Community'][]; + docs: readonly (components["schemas"]["Community"])[]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -1040,7 +957,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components['schemas']['QuantifyInputDto']; + params: components["schemas"]["QuantifyInputDto"]; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -1048,49 +965,49 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: string[]; + praiseIds: (string)[]; }; SettingDto: { /** - * @description Type of the setting - * @example string + * @description Type of the setting + * @example string * @enum {string} */ - type: 'string' | 'number' | 'boolean' | 'array'; + type: "string" | "number" | "boolean" | "array"; /** - * @description Default value for the setting + * @description Default value for the setting * @example Some string */ default: Record; /** - * @description Description of the setting + * @description Description of the setting * @example Description of the string setting */ description: string; /** - * @description Markdown description of the setting + * @description Markdown description of the setting * @example Description of the string setting */ markdownDescription: string; /** - * @description Edit presentation style - * @example multiline + * @description Edit presentation style + * @example multiline * @enum {string} */ - editPresentation?: 'multiline'; + editPresentation?: "multiline"; /** - * @description Order of the setting + * @description Order of the setting * @example 1 */ order: number; /** - * @description Enum values for string type settings + * @description Enum values for string type settings * @example [ * "left", * "right" * ] */ - enum?: string[]; + enum?: (string)[]; items: { type?: Record; }; @@ -1122,16 +1039,16 @@ export interface components { * "Praise receiver reports" * ] */ - categories: string[]; + categories: (string)[]; /** * @example [ * "toplist" * ] */ - keywords: string[]; + keywords: (string)[]; /** @description Configuration settings for the report */ configuration: { - [key: string]: components['schemas']['SettingDto'] | undefined; + [key: string]: components["schemas"]["SettingDto"] | undefined; }; }; }; @@ -1145,23 +1062,24 @@ export interface components { export type external = Record; export interface operations { + /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ ActivateController_activate: { requestBody: { content: { - 'application/json': components['schemas']['ActivateInputDto']; + "application/json": components["schemas"]["ActivateInputDto"]; }; }; responses: { /** @description The created (or updated) user. */ 200: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; 201: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; }; @@ -1171,7 +1089,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1181,7 +1099,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1191,7 +1109,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1201,7 +1119,7 @@ export interface operations { /** @description All users */ 200: { content: { - 'application/json': components['schemas']['User'][]; + "application/json": (components["schemas"]["User"])[]; }; }; }; @@ -1216,7 +1134,7 @@ export interface operations { /** @description A single user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1230,14 +1148,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRequestDto']; + "application/json": components["schemas"]["UpdateUserRequestDto"]; }; }; responses: { /** @description Updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1250,14 +1168,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1270,14 +1188,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1287,7 +1205,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1297,7 +1215,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1307,7 +1225,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1321,14 +1239,14 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; }; }; responses: { /** @description Periods */ 200: { content: { - 'application/json': components['schemas']['PeriodPaginatedResponseDto']; + "application/json": components["schemas"]["PeriodPaginatedResponseDto"]; }; }; }; @@ -1337,19 +1255,19 @@ export interface operations { PeriodsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreatePeriodInputDto']; + "application/json": components["schemas"]["CreatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; 201: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1365,7 +1283,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1379,14 +1297,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdatePeriodInputDto']; + "application/json": components["schemas"]["UpdatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1402,7 +1320,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1418,7 +1336,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1435,7 +1353,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1452,7 +1370,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1469,7 +1387,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1485,7 +1403,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; + "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; }; }; }; @@ -1501,7 +1419,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1515,14 +1433,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['ReplaceQuantifierInputDto']; + "application/json": components["schemas"]["ReplaceQuantifierInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['ReplaceQuantifierResponseDto']; + "application/json": components["schemas"]["ReplaceQuantifierResponseDto"]; }; }; }; @@ -1536,16 +1454,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; search?: string; - types?: string[]; + types?: (string)[]; }; }; responses: { /** @description Paginated event logs */ 200: { content: { - 'application/json': components['schemas']['EventLogPaginatedResponseDto']; + "application/json": components["schemas"]["EventLogPaginatedResponseDto"]; }; }; }; @@ -1556,7 +1474,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - 'application/json': components['schemas']['EventLogType'][]; + "application/json": (components["schemas"]["EventLogType"])[]; }; }; }; @@ -1567,17 +1485,7 @@ export interface operations { query?: { /** @example SETTING_KEY */ key?: string; - type?: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type?: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example 0 */ group?: number; /** @example 0 */ @@ -1588,7 +1496,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - 'application/json': components['schemas']['Setting'][]; + "application/json": (components["schemas"]["Setting"])[]; }; }; }; @@ -1604,7 +1512,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1618,14 +1526,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetSettingDto']; + "application/json": components["schemas"]["SetSettingDto"]; }; }; responses: { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1641,7 +1549,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1656,7 +1564,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': Record; + "application/json": Record; }; }; }; @@ -1672,7 +1580,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting'][]; + "application/json": (components["schemas"]["PeriodSetting"])[]; }; }; }; @@ -1689,7 +1597,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1704,14 +1612,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetPeriodSettingDto']; + "application/json": components["schemas"]["SetPeriodSettingDto"]; }; }; responses: { /** @description Updated period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1725,7 +1633,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; giver?: string; receiver?: string; }; @@ -1734,7 +1642,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - 'application/json': components['schemas']['PraisePaginatedResponseDto']; + "application/json": components["schemas"]["PraisePaginatedResponseDto"]; }; }; }; @@ -1743,19 +1651,19 @@ export interface operations { PraiseController_praise: { requestBody: { content: { - 'application/json': components['schemas']['PraiseCreateInputDto']; + "application/json": components["schemas"]["PraiseCreateInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1771,7 +1679,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1787,7 +1695,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1803,7 +1711,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1819,7 +1727,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; }; @@ -1828,19 +1736,19 @@ export interface operations { PraiseController_forward: { requestBody: { content: { - 'application/json': components['schemas']['PraiseForwardInputDto']; + "application/json": components["schemas"]["PraiseForwardInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1860,7 +1768,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1869,13 +1777,13 @@ export interface operations { UserAccountsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateUserAccountInputDto']; + "application/json": components["schemas"]["CreateUserAccountInputDto"]; }; }; responses: { 201: { content: { - 'application/json': components['schemas']['CreateUserAccountResponseDto']; + "application/json": components["schemas"]["CreateUserAccountResponseDto"]; }; }; }; @@ -1885,7 +1793,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1895,7 +1803,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1905,7 +1813,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1921,7 +1829,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1930,13 +1838,13 @@ export interface operations { UserAccountsController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateUserAccountInputDto']; + "application/json": components["schemas"]["UpdateUserAccountInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['UpdateUserAccountResponseDto']; + "application/json": components["schemas"]["UpdateUserAccountResponseDto"]; }; }; }; @@ -1947,7 +1855,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - 'application/json': components['schemas']['ApiKey'][]; + "application/json": (components["schemas"]["ApiKey"])[]; }; }; }; @@ -1956,14 +1864,14 @@ export interface operations { ApiKeyController_createApiKey: { requestBody: { content: { - 'application/json': components['schemas']['CreateApiKeyInputDto']; + "application/json": components["schemas"]["CreateApiKeyInputDto"]; }; }; responses: { /** @description API key created */ 201: { content: { - 'application/json': components['schemas']['CreateApiKeyResponseDto']; + "application/json": components["schemas"]["CreateApiKeyResponseDto"]; }; }; }; @@ -1979,7 +1887,7 @@ export interface operations { /** @description An API key */ 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -1993,19 +1901,19 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateDescriptionInputDto']; + "application/json": components["schemas"]["UpdateDescriptionInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description API key with updated description */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2020,13 +1928,13 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description Revoked API key */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2036,14 +1944,14 @@ export interface operations { /** @description A request containing the user identityEthAddress */ requestBody: { content: { - 'application/json': components['schemas']['NonceInputDto']; + "application/json": components["schemas"]["NonceInputDto"]; }; }; responses: { /** @description Nonce generated successfully */ 201: { content: { - 'application/json': components['schemas']['NonceResponseDto']; + "application/json": components["schemas"]["NonceResponseDto"]; }; }; }; @@ -2056,20 +1964,20 @@ export interface operations { }; }; /** - * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: - * + * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: + * * ```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\n\nADDRESS:\n[identityEthAddress]\n\nNONCE:\n[nonce]``` */ requestBody: { content: { - 'application/json': components['schemas']['LoginInputDto']; + "application/json": components["schemas"]["LoginInputDto"]; }; }; responses: { /** @description User authenticated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2083,14 +1991,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['GenerateTokenDto']; + "application/json": components["schemas"]["GenerateTokenDto"]; }; }; responses: { /** @description Tokens generated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2103,14 +2011,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; + /** @example hostname.givepraise.xyz */ + hostname?: string; }; }; responses: { /** @description All communities */ 200: { content: { - 'application/json': components['schemas']['CommunityPaginatedResponseDto']; + "application/json": components["schemas"]["CommunityPaginatedResponseDto"]; }; }; }; @@ -2119,19 +2029,19 @@ export interface operations { CommunityController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateCommunityInputDto']; + "application/json": components["schemas"]["CreateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; 201: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2146,7 +2056,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2155,14 +2065,14 @@ export interface operations { CommunityController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateCommunityInputDto']; + "application/json": components["schemas"]["UpdateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2178,7 +2088,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - 'application/json': components['schemas']['IsNameAvailableResponseDto']; + "application/json": components["schemas"]["IsNameAvailableResponseDto"]; }; }; }; @@ -2187,14 +2097,14 @@ export interface operations { CommunityController_linkDiscord: { requestBody: { content: { - 'application/json': components['schemas']['LinkDiscordBotDto']; + "application/json": components["schemas"]["LinkDiscordBotDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2210,7 +2120,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2226,7 +2136,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -2242,7 +2152,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -2251,14 +2161,14 @@ export interface operations { QuantificationsController_quantifyMultiple: { requestBody: { content: { - 'application/json': components['schemas']['QuantifyMultipleInputDto']; + "application/json": components["schemas"]["QuantifyMultipleInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2272,14 +2182,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['QuantifyInputDto']; + "application/json": components["schemas"]["QuantifyInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2290,7 +2200,7 @@ export interface operations { /** @description A list of report manifests */ 200: { content: { - 'application/json': components['schemas']['ReportManifestDto'][]; + "application/json": (components["schemas"]["ReportManifestDto"])[]; }; }; /** @description An error occurred while fetching report manifests */ @@ -2308,7 +2218,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2324,7 +2234,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; diff --git a/packages/api/openapi.json b/packages/api/openapi.json index 77684788b..dc642d373 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/community/community.controller.ts b/packages/api/src/community/community.controller.ts index f9fe8a50c..1fcb73908 100644 --- a/packages/api/src/community/community.controller.ts +++ b/packages/api/src/community/community.controller.ts @@ -28,7 +28,7 @@ import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto import { IsNameAvailableRequestDto } from './dto/is-name-available-request-dto'; import { EventLogService } from '../event-log/event-log.service'; import { EventLogTypeKey } from '../event-log/enums/event-log-type-key'; -import { FindAllCommunitiesInputDto } from './dto/find-all-communities-input.dto'; +import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; @Controller('communities') @ApiTags('Communities') @@ -82,7 +82,7 @@ export class CommunityController { }) @UseInterceptors(MongooseClassSerializerInterceptor(Community)) async findAll( - @Query() options: FindAllCommunitiesInputDto, + @Query() options: FindAllCommunitiesQueryDto, ): Promise { return this.communityService.findAllPaginated(options); } diff --git a/packages/api/src/community/community.service.ts b/packages/api/src/community/community.service.ts index b1e093624..aaea94e59 100644 --- a/packages/api/src/community/community.service.ts +++ b/packages/api/src/community/community.service.ts @@ -19,7 +19,7 @@ import { databaseExists } from '../database/utils/database-exists'; import { hostNameToDbName } from '../database/utils/host-name-to-db-name'; import { PaginateModel } from '../shared/interfaces/paginate-model.interface'; import { IsNameAvailableResponseDto } from './dto/is-name-available-response-dto'; -import { FindAllCommunitiesInputDto } from './dto/find-all-communities-input.dto'; +import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; @Injectable() export class CommunityService { @@ -56,7 +56,7 @@ export class CommunityService { * @returns */ async findAllPaginated( - options: FindAllCommunitiesInputDto, + options: FindAllCommunitiesQueryDto, ): Promise { const { sortColumn, sortType } = options; const query = {} as any; diff --git a/packages/api/src/community/dto/find-all-communities-input.dto.ts b/packages/api/src/community/dto/find-all-communities-query.dto.ts similarity index 83% rename from packages/api/src/community/dto/find-all-communities-input.dto.ts rename to packages/api/src/community/dto/find-all-communities-query.dto.ts index 840f3b2cd..69aceee1c 100644 --- a/packages/api/src/community/dto/find-all-communities-input.dto.ts +++ b/packages/api/src/community/dto/find-all-communities-query.dto.ts @@ -2,7 +2,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsOptional } from 'class-validator'; import { PaginatedQueryDto } from '../../shared/dto/pagination-query.dto'; -export class FindAllCommunitiesInputDto extends PaginatedQueryDto { +export class FindAllCommunitiesQueryDto extends PaginatedQueryDto { @ApiProperty({ required: false, type: 'string', From d0ad3ed17c6acc9ff0ab8e1350972e231a97fddc Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:33:25 +0200 Subject: [PATCH 08/63] Add attestationsTxHash to period schema --- packages/api-types/out/schema.ts | 4 ++++ packages/api/openapi.json | 2 +- packages/api/src/periods/schemas/periods.schema.ts | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 00dfc823a..ec6ca26fd 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -353,6 +353,8 @@ export interface components { status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; + /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ + attestationsTxHash: string; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -454,6 +456,8 @@ export interface components { status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ endDate: string; + /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ + attestationsTxHash: string; /** Format: date-time */ createdAt: string; /** Format: date-time */ diff --git a/packages/api/openapi.json b/packages/api/openapi.json index dc642d373..1fb51750a 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/periods/schemas/periods.schema.ts b/packages/api/src/periods/schemas/periods.schema.ts index bab8aab58..c42d4d6f5 100644 --- a/packages/api/src/periods/schemas/periods.schema.ts +++ b/packages/api/src/periods/schemas/periods.schema.ts @@ -41,6 +41,15 @@ export class Period { }) endDate: Date; + @ApiProperty({ + example: + '0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c', + type: 'string', + }) + @IsString() + @Prop({ required: false }) + attestationsTxHash?: string; + @Prop({ type: Date }) @ApiResponseProperty() createdAt: Date; From 41ebe8757aca53054faf2072eba8acbdbd57582e Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:33:41 +0200 Subject: [PATCH 09/63] EAS logo --- packages/frontend/public/eas-logo.png | Bin 0 -> 29460 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 packages/frontend/public/eas-logo.png diff --git a/packages/frontend/public/eas-logo.png b/packages/frontend/public/eas-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2829d69d4e7984c81f966c70425cba43e14d26e5 GIT binary patch literal 29460 zcmXtfWmFvR&-UQ%?poZfxVw9yKyfJU?(Xhx1&X`7yOrYZP~08f{r#Wwe%RePGjr}q za%YlUSF#bxic(1M`0xM#AjwFJs{#Nx=nyD|g$8}oaY@92ejv?76hr`^E)L<%5DEa` zWh}(Rl$}(iL`h{N#JE^_xVRYEm{IshQ2sDvFw z)hahWgopwd(5EtqoGqJ92QyvJgOo5yvrnUO45U4UH;%$(%X=vsD~5%=1@Zba0TJv z?(1AD^afUA2U5g-fr%1*Wal%eU76||K$-w-lcOIYfW@l4$X@N?@~ zk9`d;|2zDw=W~b$hqk=A$y(qy?_8q(JDBlOr)sHpLE5IRB zIHRh!DCph6(AKqDHTGx%Qk2#9@rdGMB*gDMmUeEJqfVCrEAm<^qE(q(VZ@_NH9?$g zEM*t{#EaeLM&lzS0I231Y#xsQ zkks=WCrl3pOr`zW1AxwBT;1QvIP$}=03e3xS`Hmbru4*vHC^bhM4G8*plm18snt+mG8B3I{1N z3X5S##v6`i6uV454U3Zz3rTJ$&5`K;i}WNMQ-yqJ)bSU1nW$xgo;1Y`qa!9yjIQuY z{MslfTjX10rxa^)K)njYUvL-Uw%;W9k;C~;bIu$ndj6?}R&)4`!~*`!g{5l_7g5F%iOIS+qD1VGI*dM{D z{nml;@lsmyT4KMyoKZBQx5Ive3kqiKrzTJOtVk}zEceR~ zYGe%kBxy?IvBZ5vc(O0?Y%&NkR?=(IjK9==3I0K~$d;!%jkg)w+=s3AuOv-NXo*LO zS4w;x8`y8b&RQ;8VF3V{ubO2eL$0nMQU#>D$mirgBJe)W0yNpe~t1`1% zSQ!R~OXioUENrofUyMZyvzZp=7LPxfPn_G~HiC#H(q_~CSRKQh9GwK+xgjEjA_a{| z8`0od;d$Ye;ZTf}Jfost)UE#>_+pGy z9~vT=A1Ym>Zrn1A7ej_U%w~G6CA#RS3319`m9Ai?+W!w;L7YJuO{YHZdPfQ zV3u>}Fa?G@T(^D2vyv@4O*V}*?ZpVeD8yK|Xjx@evNe=bqPw_t6EeovU4?J*0ijW#*sYyz!~W3EchoJ@U!MoYcL|UC}+xzstqTIg+m| z9I#yRc-E}k##fW^#>ZCa7Oitv!8^avCVsXj4E`*dlPRKZrMd_+-{W-05j3l`BQ&by z*fd?Y;x{z1U|ah&_-kmtn|3PMD$}feu5sRZa&nYmy>hv7>@1dNA=@g~uzRI*?JXvx zSR#8!Hi|21By}~_djcv|A@#8`T~kogL-Ss9sZwT9_mtt(X7QV~GQqbj#4O&diRRx` zSyh9sSvFgkyO?pbe`xR3Y*$&&-p=69GS8sTc^(WOzC74G%n(fyq7yChIrDitI=f7| zTHAM?{@URfC>tyrIQeEyU|!&qbIXZSA{Re_p5~f{qh?bYS!$c-IgxUJf6@M@Y5u+_ zt0QZ@YQ^U7#-zZIPsOVOQx?IP-hjZR$lcYW)~>_kUQTINY5#5f5%Uk%AKE`&yNHz< zvZ-5k`oIprx&rV68X&A7NFXyHi(xpSVxT&pnGprCL=oYTv`HM3?0Ru- z2%e4E*UcF+=di|MbFjV>ys%7C$rCT4#fHwnZlU_xl|0LzOg6)YZ%bK+w~|=kW#Byf zVA9gDl{5WQX;gD|aDHT1tlZarHSdbOjw_39<6EWHa^R0^=~b24R8;8 zlDJMocgCQEJCE2OTpkpN*mD9uvd(1B-p^D|bvCX(STAhDIXs!3$aUk_=G2b&<_<|m zPpcO?2qG0#X2w-ID794}!ng^}3Q>~iE{rKuscUJK5yb+DN~|(n8asWJXV)gtYH*XfsZb z6gK|2Px0(@yM|>QB0pEus9LRzj4jXno8DaqSI50ox=Z@|U-m7tkAKe;2!Yt%UGcTb zt+fryt?t^_+vGhG9oQ66YB+98ta_^LChitje|#o>PSmHqEAMKlYTQ_Qtlz|{2K^~6 z7NZaR#*tE%JT_rlefPc17|SrlMB~yjZ9zxVj}9kAztX<)clA@PWb5JXH%0vg?|ToM z)zwYemhtmb>C<1Qwv~_CJvFjjmLdzYp;t&%1lKVK1o}3zo6ZHEmiMt!jZ@=O5S)gb z=Q@+km1{QzTtyF_IevN*n(tK=E!`_rtBXAwZeF*@K}1-5o0rLFolW%a->kYMeC}=k zTm){!;TsXO_Z<3ev`V=t4dupp6??%vNL-#;I@?*V*Yxz%!`Y~E#SlyL+8<>3+pT7u zXSy}nf2Tw47dhyo-YW6-+EYF*m>yUknA*zlYq^I#mG+?j!`tIh$yj8QFHq2Rc^qAo zL-d14s=MXW_mXwb*kyz>?ptnt4voO|^L}8`Ua3iGZjPdmz~78@k4O2p3@beqy)JXH znOq?p=L`83{l~G}&7(NIt4{kn@<*e!FD-Ia0@VUizV`1s(lt7Er>2h+=im6No$nM* z`Q|R?{a!447o3)!mYDSNJi0E2&j?y!xjvlZxWQk@uj_fnx!1gPufG3- zc|rN-*Z5Iq+H14@WYB9cGoX!fi3}H(`;q)PAGY&HYEo)}LXsjTE{BAK013bA#$-Ba zr?kElV`kh}^V8$hsp4qsefL#vM(b_)3gJ0wrl;DY?AGzJqO68@gkprGbJ|1Ty5y~D zdd=su^|F0yq>Chj=1urR`F8Hbc%*bz=~3{=`{RxIG5GeCQHpy8RAiDGORFjXfF~6I z_y+^P3+R;pF#x!*0Kh*30N_mr037@5b`^fm1vqBl&SB%=O`1 z&7%Smws@BdA*q#Hn|>lY)r0?uB)OAu2cF;cmDTjLd$#Qh6VK(`XBc@Df8aI4zbuM0 z><8KZnGrKph8g&wv*jdrB%IlhfuKJhu9`nuw!Lu<@zrL7NEzN&}dKtysrDdO`chHDr(Yc_Ncr*Coi^tP=kJAF2wN zXw<7y`wRY<|0H9eBJTTH!dCH5Ze#)Ve+EZnJAv%&e)xG(^0EyzG+l@C!H3yEp5MkC z;=%`gL1d=`k}0T(>UFRWk=SC|0lU*{~(@B zoS2i8{OSsB_lgZ#pF;e~Cks1u$|2;9C1Ki;Bq8Fz5tK|4Q6P`(D z3=d>11ZBd=+S*Ia|JM;0&Uj7g5fWCM{YX3!KXPO5+xz8DW%yP`bY4%jTY~R}o-)v#oac^~O8D-Yl~g=z#X5AzTJ@2O(~kc$o6~DryTQ}O$%?+Pj=P+0 z91U4YdH->*@!1JbK5oCJO(7-pIo{?*=AR+Mgb&)|;oxe{_cH*9;|Ta?f-oQ{jT|VG zXqT-u#S2yL?jHwsYAG<`iyD7Hj)|kIm8er>NDH&l9-o}juhkVzSDc!R8L*J*xo@t> zeYIPu9>j<+UUj4sh81BT9-$WWysSxO`rgWgi%8_;7dO)Nxs`OtytJO7RTlmhOz;*~ zrvt_DNEx~2WxO<*`R{4Kea(qYI2>67b=#qBRtOiB0H46_cg2>IF9UWSni3`U;GRrE zU|<$3Eg3c5m^yxnX>pU9Re4XM!jZ^~BO!EA#DUs(&Q7*&BaWyF06j)Z~l*Oc-CcCd-=#`}MpW_RDk8o3UyC%;aL?A_!51SHbLa zP{tVhyPnhGx|D{Ar30z*6gRQ6-ZLX^vdqx10x6M78c9w*mrlPq&(~5^@ftmxx@aVO zd^4SE%Sx=2y(okl&#Az7;P**K1`913E@^bBJlmwLL3CZ0BntffDrI(I5mkM|H*(a+ ziVhhd#$9GKak0ICQ%z?Mz70th+-up?dwILlrI01~GNJ!|G1rvUoLW+Jy^c%>le7U( zydLb6uVAK{0Go(#_?n{#gFZG0mlt>BaaO(-q*K#_ZPozincE336{PCF=Rs2s*|PD#YIt0XCzUYvYs0^+T9BRY;YG&IxyUw)W0y24d{)v>FA9j7uN=7 zKJ1joVEi~%=8g@LgblCGl8>zSd~a8%@Ov#iy3pfxd)SN1*SaVjXEs;6d$_b!S#{cE zPNvIK9S4sp3BFH8ZGG+};RODp$y0?IyM)LgMX5>3NS6tnw}_*QL=;uDu08Z1-stk- zKAlW?>K!^d8tWgxBZieX!-$OXhK1~hg${Ds@^pKL>acXvZ!RskzAJe^Hm4+n0%#(^ zf9xA-U}Ac8ZM*lLI$Q|pyC`V%SrgHF|M;3XM!D&^my^MFO7P+PN!0Rjk(yQAF=EXX zcgpsq7&92PRZnr*8XFN2`Q`Dj($>dp^-CzHO^%*225mZ#EBBe^6F-yv+bjD! zL{F(2k;cMY7KS7oG9jelzFZ;5RnDy9^uMkeOVQ&>?rAu#iT`aL-mkh3uqvOhQHs78 zFJ)SveJSrnprL(GdR=|=y}_Tm`&U>`zFet!EN&k3Nh!YIV$wi&(eWy_?IC#C;3o>} zo*OiA0$z-nqqi~f`LWw`vEE$ukoXW=4YDoq&oNAETO2}H`f=H)8_)L$#9~O0E6tlt z34a=(Zap6^2|aBd+Ejc#W>9Ow1ptkMKbM%JT7=t~S>!e5GajQcW>biDPPR z1k-2~!jXcO7L-zEy^!ZqtrPc@N7Mt2HS6;R2y@Iyz`4yj@suOT`a@uY7{DM_8ljl3`HhfgRu9OBr$&fDWQVZ%eTs6i__<<+&NURT8V;dNdGL*jRXv$gSd!RM+pgqb{@ z(V)NGaCs8Ua(0=X`NV5&I=9B zN&~%zJQW$fsf=!Cd)5{W2N*+wll{HebeeAQdm7ZMzRA4i3UdgwCkz8+$4cFH+_WE# zeQ+>VDzXKqypd6Fs1j&BukU$1*KvN`Hwh&V(}h1tqYD$s|4wF4r$)y1)xy@MP4<54 zdDZ`#=XbHPMaRrs6*IIqB9sonR)#1mC#$T!4}mww&eO7}ukr(#*!w<>`1OIr_kBXY zY9EunWJi??6@fh@;uRIa-E)57mfDCj#<7(Fo(ZTTwo%2Q^cWN3{l5iW(JhZ*E2p zK?GIt=YtY#$XKO;ti~71)5rC@Gm>1dGdsWMSL-=535x_0;!=#{`aTm%W!de=_Bq`a zqM6UzgE)b^2$%~LXt9x;KTg~6V`c>yY{{N()?mW4P%{xU^z=hnc0FF_kDsSUGZ(8* zxvE?~*z%G6zFW^n`!@ihB%3+(o;IdeH0LK-uqe7acQ!VvkvCPo1#cxb6jLeIj`W{+ z5d4dh5uP!4$^PhT>=-rYb=80#_T8-;OmrdOnrTQ=uMHcZ4BO+rd$`}J)S$ONEXOL! zeaDam<-o|OcWJ7m3!#q#lC9^5J*D+Dq)=r}C+NX~CseMzuc3<0!mb8V=NEiI1+!v= zBgKt-upFYWl-hwar+9O>T9}aBgs#?Wb*F`Ec0HFh+y0pz2*Na`qE#%o4}ko!YA@eo zh|qRzcqqlQhCVh?=uzAAWYf?y4!0u_khGn4D>d>zG+l0)vuCl|Z0g$c zk3c747egSjAH7*bMM<>j3zw8X}EYBq@mV)s~Z;f)s?Ewoww?59V~l0oUN z%XJJ*{u$>?+#nG!Vk*X+7@R-@DN8FW0Po5rsoCA)WY9Mb^^sG=wT~&fbcY^Jo<%0_ z=pHMkWJeeM1~niYT!Ag-ss}Y^t@b3^8DDoq<@30l!KDB0IsmK{GK2s zI}v%kj_`@T`J)9aqbS+?(47=Fw%4#>@2o)+0#H9cUO2?m9PEM;mxn~2yYoNk6M?gTU%MpsHV_#Iv>N8nYIx#rWNNCghc0)?&W^Bes zK#-+ZDW``pS(z({0Z61YBE?k|OITLvq0c?4^O}(KzU|lw+&Yq=#1^oG_Fp?0EMZ(@ z5!O)Mi6vP@FVRxEM&0Klx)(HXR|jV+pR&3BN!_78)EzTe#og zeBQ3<*mb;Sm6>Gb3A!;a9^Al9ZU0}RB%+%~VX`Q?hZf`b@9(>yt~fRqKR5fhbDavbj2JmI|!j^TmgUg+>ta1FivnBmz&WYFuhAN;SXAY`JBd=q^8 z_qFHsBkA-03FchFSH7$|c--tA3KTfP`B6l;Zx%P^<0hDRVdhI0NR!4cYWDoLCBsr} zbKmE;x;t*WzPA2rlUw;uHha1M2$60Zqyo7p!o;1w1(oG}h7G-zoMHr~cb^5yvOCWE z{P2=!62v|Q9N*iGN+GneaDs57;owIcU_;4UpZafsX#Sfm5OhgVe7)%YO!9laXU^qW z)6s^YM!3sDwI_^MpkgU52XC*YNRTId(4`9QKXou(i`6sV@?DZ5X@0gM1q`0?F!JDz zz{0=$J*e`btynP8&H9NSFk>Ee0$KQpBB8lxCQ!GN9Au`~JLAp>{GD{!6Bvg%e@R5arET z=_yvV_?a2%%**Kge7g0HAcLI$s}h!1r#=Hyo*S&Th0)c6t%3l#lOnkHm$ZFH+1>{qhTh&jnGRE;PUNWQXCe_M1}*<4-qD_XMUe-z4@+rD2mXwkXxh4{xSqLP3? z)c|S4(%fs9Qdi2()On>j^6tSI*_SR12`<8*Uk@B*`%uvo&pN;V&MLQfotPGUI49wM zJyGI!Pit|+#?&_J^Tmi>d{ESNoNG%Lu!81BuGM0Mv9V3VARO6Q5&Aes*k(YLOkf=v zMIlU+gW%Wn2^HI`q*6!pmqBN$u!?!1^Bz|1qbc6@Ko+clc)QXki~C&;owa~iIv*I& zhbte6wjpk)25DV}^23SwN;+4;m}Qs<6n;?=cY|6sfr_C(X-ZFLCA_I~J5|iiheJL$ zpYypeySg;Run7xus}GFmb$_tdY~;qqrXo<~N$9rS5LXDY76F%C*L?`ik7}Ac)+EM_ zXqW*A;t@3DFqE4SBaqQzI-u>OD?Tb z?ru7tMDhTOB3EGo&EaH5#GiU}N;O*4S&AjfqPFl)VN!M1y(+gFIYd|Em;NE^Dfd7S z(p1*a3^bL)={s=jcN9)w8V94&7BN4)|x|yYe#DrkjEw4W-4tA8(FwD+BsJox-Dgq>>P$yoh&I z+@yfL4_uyDF&e_Y4Ej{DR7!vFME76)D?Adt0Rt$$FZ=8|i#>wvx> z*X&BP#Vt-;8IF_&r?Mz1{qWw9;*Z}u*WUe*U|eoP%=6BUovDAr3ar|W{qmL)(sqTU zdSa2IhJwlSF#gfhBW81<5e1b+3NY?`fntesK;({v`GOf?0xwP-R%y%@+s8^mLpVZ~ zq9~R~Ihn;rkXeFc^Up8~#41t3c|CIK-2{;cK7%O@Rl=!|_&#lh5AGfxpNU9$eeK`D zZEt_cFXwr!x2*mIgoZ=P#YMy!QhNSp2CYd1-%65uqBDq&A`YAt~bp@ zfgEtT)?-bA1#liLc%BCI7U2hwYl0FFCL@KmTrdEkGU?MVPKC$|vBC zTmloZ<8xjc>B|rk_nDaqTSyhZ1guEHR=`CrDJ)rNDuhYGh%ime!{#79kOgo4Wlx#y zgyYSZ+04E4N1c_MSc5dI3ATeEdh9xp8LTKQG<1;r_646Zy9@m8^&pxAcQGV(6jXuo zvey929_yER6~V%vd9oL@UVUd zVRC#a2@M{)aapvOLFDfXb>A6}|6Tm(ZmCSpxu}@)~9vUT++N5$Rs|aj?H?BnZfM8ncZhG!e8QW91v7 z#LSULlK=bnxSNPD-KX$XH%N;i)S3(70=7^K6%xcc@;}5}z8fD6w=m3OSFQ_n5X(XS z5au8rF_3~WDJ7`*#&pU|d)=dBZ08>(5h#XSz`P?tf19xP5Z-V&n7u7&G0b# zgy!K@xalcx{UW*fY-Jw55dRXdK62Rg0Z6y=@D4G37%~S`?oi0r&?^x zFJLYm1ZFKQF8Sr{^`u;|o&L&{fd)z>#P5HOa{pr_^%F5^38TLBIRihEeRF=byr$s0amS+d||M#5yp7(_vD% zfu{9w7@CVP!_##q1jUlz0LdK-p#oP}r*$%U!kHjW9)hIf+Pmi}nn-yF#}ZBodwg~w zGWFMT-Q|@roEja3nx%BVlO^|_I~v_Co+I>p4&>#YROGse+O)^8S*s~+0c;7dsK_ttN-ma4piYbo5*}iYtbcwmIPpQUOKG)>dbrmmS9Yl`^+AIYEcfwO}#Fb_H z@a)9hjk)hzD}d} zTK5&q8?tebP<+%!%bI*V7GB2PGDq&L3wVV_0K+wDFn+n#Z)xy$F}S}i;&w*h2GKi? z;7qyFMh|BvsN!IJ{~r9o<1=7!S@~xuFe8Lf-Mx3%^Mp-Jp#lq72$4t79*=ta3|scv z{N8S1l#A?_OX9Q}TWP|NPY8tB@CVwCs$v)A%UNmws2v8tJ2!&g6dLx-tsR=hW!SeRl+g^p7d9vl3N?)PEyX`!RanOkrYS;{0(00t++O`){wMQR@zW-CEoE?-C1PBgw7CwD!+L=AZ-jNpuyt<9 zs85=DSWrphf~Xf6tV~0NrWl47V1Ou@r2M9c*EBU(_?7Gahu@LL{AUZPBwOsbeca1W z%1}H`wf|ZYrcy-f$S^v{+{lGAMsDvvvfUmsxSbA8j?exPJN6J;_!olQohm8t)8}DE z2wbMmj1{MIx~CW6_<}^(Gaq4T)BChJOweJ==fuQQO~)LkUK@)_BG=y5SOsopaGs0FPit>FZ`Z(vuKO?pm`O(ROo z4r8GZPxa-oMtMYL4Z5}KpG6|h;5BQp)7AMqra&x&5iL@m^n)WH4@6^ts{Nd4gT79l zct|)tOE(Ar158Q;71H_s&S*0`qxE%qjf|F!P?4{-$P`@-zGf!qv-9OJEbslCgkG*> zhUsaWIRZU1^ZU+q`_;+_@#~3zo6l8J-A}}TD5Gg10Il&2d4R z11#0mwkoJ(5g@GlO6+=8E=Kq6i%L2IhTNfWOn}RfkX_xW&zCcnZ}P&h%#ixk((STu z+W^S-CxxrkW=L1n4shmz=>G#Kr8{5&Iqzi^-(S^!)3V0VfdHtJD5|?jgRvKdNdrD1 zGD4><{R@mSONQhHbP?v&s_B_6GBb02MD$*-10jck7@b6&!H2a!1efi~SSmy;FybIh znS=_3M$&#xMH3nA^NLSKNbyx~+XH~?c^}9VQe42Tq*4=c8v3Flx>s$Z<#O?SLhbjK zlTu!O9xl0uiwH>_o%N{<3SNGsuzE|^RW;tkQ8>)PZf=*Y)1cOlmb@}2meA9fTH9R@ z1o14SKY7I8U!y0gJ(r_>B-B6wCUS%J<;m%}y!jt7uyiqzNM{wO3ZbXdYxpU#dm&-Hu@{8L!?A0da8&1Lrx zkDB3*IP;NfpQv_3=lR z-h?nwLzUh47hbFy8Yl$&7!i<~40?ecPUd8o(Eug*9RKw#!1F_x3m=Ml%-%B_7A2Ha zM`62nfN}y=f|zh-pppg(u96>p?;#mMg1x!@@Jd2(?RfoDFph{SDcaiAJ2U(zZ@^Hw zFt*2lM1XjLl$8?rSfj51Km`oriNdO$aFo+c*gwNe!$_g{ZRS`@*9U{zm~LFw5?o0l z9u{*S+ieg#9>jh2kfl=@G3Dd3)?3<9)|x|eYwri}pP=5_?u?(;N5TtHllOh4h13O7 zeB2C~?9cTLf76PY6R&^NTRn3|Ts1b9wjt{N+l}6=**W=WNO8V9Nm`9p9H1^KAw{my z8C*ya4KscJ=le@p(K&gJ$H#%uUN^S7M%vN+>W)38+~Lf@MeDgFZHl~@kjY6nj-v)F zMg*m8_cdK`KU#VU95I$OSj;gE(+yeDbbebG1iMv9VMhx}c{y2zEE!=0SLVK40})%g@l_=bqy!(N?+LQ-=|m zT1rshvmIX8I-ka^mOD+U|F5fbc{%J9{slchdH3+NCSc_kDJm@Sqlk&BeE87bpRFJ6 zCrR-p_S+%}pI@**0kg9PFZT~Q|L4(GH3K89?fJz?2r2BS85@S`5L~B!pD=15>GrAq z8wWO1dR(;w@)I9ARReh8sr&tX%eHF=@{2%tVz@l7m}*(FZ8O2lChtWP7SxG+rtM07 z&hT!;z$SHY?}=mof%9&A1rxm%L~EyLfHQB*Ld7>j0|UVCX=2OamGNtSaTC&tH8zo+ zz?H{3OV-qKmm70`->9;`Bco^nOJE-j+X|w%NbrPVkP+K~X@=uEq_B_EU8srXSHkxi z3tmDl_H5+SRxWf9&5Y^p&X0U|7gs1zt1~qX^|+@}W-U-P19osJ>bSbi`$VeIw?iXW_8 z8iOb)?qqQ>k<|kVeAqy&+ftX?{EORHnuCQDsEATjcd!6uTuOoPt@nQ`FmiH{I$-&g zjgZ$`gvqKV>??3sPiYlbIFi5o0DYe`1g*xOV5@6<4>*k((%k2ozcXV`g`Ut%G_cme zu8Bc`L$>h3rQ>J9QqCiMB`6j48Kg&zV2GzunxK^7TQq&Ib$y4HuPF2309{I=@SMb+|ltkAvm)_7OVqmMiCU2l)c+Y%%b3;uo?X)Y)2M} z_~!opi3Qy_RYml3V+m3@64Zi~u8*E;zQ@A>V?mWyT5IKV*G`ykebrxpUAHB`ln|wJ znN&T13fTiR77SZ53{_2zc>@d#HYCwKDCZ$hn~{9e;ry>Da;5Wsk48yEDMFB8p2#02 z!!Z>m8yT>`%3#(S4XIA%@F7?&*$k!eBc5Ijyv!Qz%moL!j@lJ_(U z=K=Y%5Uwy)($IjuJ1l)FqlCHnQgH3Lv`GUmrA#kY+7F;XhG!H4l$9_gcDU@;#yFds zLG<3?f4M(?+$05IT4+RH^$cam2yV6jdtS2wDv`3Fr~%>H{q3FVt49;*Ct(>GN-?I% zZ+RXv$P;7JETf#H0Jb#tWB%>jLM~<`!0$n~VwD3&rSGw6Qi+EZs&J?S>9V~v+glE62#3<1TRQeb}jFUJU z&+W|T(-G7|Vn5;sICH*-8&P$~!NW$J_d^niER~vcG5f2)M|*WqVIg5Bslmwf_g`!$ z1y7;ZcvPS?yd@0!vqnyhVD$Xqj0A|0hb6;!@Rci3y~@;mI+nT+m2qI*y?#Uhy9P&T zSqqsFyh-o0c$efh`@4U?YSw_4bFK#)Mlo+bo!w|1Eu(^73N}E} z`HBJ+Vvihfy+G2xsFNXu_KP1F@?$U?x@uSAtr$3oulwE4{+ICZ{m~>rild;gOaMBU z#N*@K{(Izv>5y=*yB$y=BR(RGf3J`rhckUc%()tx;0JoVtZZbh^B6gZFO}zFHzXN0 z2AgpjE!PIktB7GjReoBVMy9ebspI`oL-6T)AA@pMVJCjySRS}sUQQ=G z-}*Sv;)eo&$OaLW`CwIXW7bw(#q4e)+8@3LoZ`C<=?caqG+g|*aWH{TH)%pqP^D91 zQsy}R*HgDb#Ptm1DT>CA7to;D2})$Gs3Q+#r`C2R>W%SM=2{4A2z z!}5tAH?N)Xrg%2z=gWFqK-d(tA>m%nFhcB}uyf++6l%nP{#n@4dB4QbMnpwTJE7H5 zPgqP=v(dl5mg!R^X!q;5PGDDYOKX~E7ID+e#2VKmND{u(4A?{VFZ#T4EG?sf&kcm( z)X2Fh(&%yWl2S9m@N=#362#9aYSfTSrBL;hxYN+vt=TLm_|i4ty^y`Qy-tLMpe>B_ z)~a_0bJi0&fcba4RRnMJRs%Vx8%VAMTL|`RD^w zwHUBbVJ6i%246YzStAk)T5p6x9C-6o(2`3mE3IU;!bhh6F8>8@;Hfnb9P zrylRVwy{@@DEBBqzL+$Ee4UAUbhg*8aXjk}SkhmRfz}8_(-4YUwbeC(=50gQY>39i zhQiXhTJ1iJ)~I>7yYD-2Cgx*GIAp`%xBaSFtre+|)k2mcFQOv< z8YJL^hXxSws+iHBa^QT6$KcGUgeQ&3-3&lm$y6vIr9tn$T8T62du#id2Wk5Ws$-FP z$&OD6gh_Gx3r^g@N5oQp*=|}hN%I*fEU@@2I-jjJBP^}o?6~QBUC+psF37K7#Zi-@ z+&ghEqyq4L>G1xk)5nc5_k9xru6q)^Ac$EWse7Gg;XO6QxU4 z^t1yqX*FOa$*-O};|Gh<8Uz*!l0~O}U$yGe+<1t@?t!t;QgLv#Fj!gJVw`!zBEkR~ z^T0}=PIb?VPJjVwf;1-oSGG7E2JEnbo!;@3iMhEsC=t|NCvV#^P+SS)2M6(ur`P^R z9@$*x*y;+PF@YKh4-eXl_M@U&UP)~CRM`?`4ebC>pTNMtz`pe*CRjGLU z-jg((A6fl7R|S@7adA)~rN1)oIAx=8ktLm_nWB`HSD5p870IT@PMg)o*7$*3o@&Ft zA2Nyk$YBtmIl>c@azKOX2B8=;!x{g}kna^gOx8l=pG0&@3|h*>F^7(?!|H(bI#z3a z6LUlvw9Y5GXu&8ssJL<7SpKE}OL|54W;@R+kX|ln$SHTljn(KpL^km!TmTHzGU1}P z@309UREdk8R#f5Fxvj%lq1ia6rR<2)>NfN`@weYyC$vD#ND!lro9^GO`M7_XZ!kb;5$mKL zOW2e5rn$~4U%Y}j5)lb}7#VUgTXT~eY1UN#fveaykGN6Ydyw(vLaszessd-B@zZH~KVcZLOyiEH|=X#W`9YkA|uU_7JHl{W=qd|2jKyv7f z@SSpzW+*mMC!S3AyuXK}GmP;uU^_(_v7O(0uIGG^3xW4-r*F_3(*ezAa2pKKh4(e( z7WRBqwb}|rupjd(XY56dqtSP)lcuA=IJs#*a;f|!ONc}pIh>3y-Eqs^2FMb?vLtcrE;MwjqyE%uXFb|p} z!IW6d3qwNm5cp{u;lR!Kch7~Q!fbAS&1%_96i`?ql|%O*J7`Wd!8_O6*pAnMCWC=Y zQ4v+qJ-gIzupCO&BUoZQiu8uE$}c{_myPP&j(iUv+&d_H2fz?$9Rx2S} zKPwg$#R|Y1Ad^5A(XXuQkCvuryJdsaXO#ia5DuVS1fxzJ-3mLW6!Fh=O;Y2HXw2JO z!4$x7mWU5;&aW%k!(0rLQek3_Xj==VcoHIa}%Bc57 zZU5({?l@P5HekUza3Q+_!k9B_+d+v9y- zoaY|<;mG19_R^(JEmhSwf|`*oYE;Jpuiqxlf^xcX8Njk8NxKJUfAP%Qu&IQ;fD z^4orvwvr0XH!ko@d1c4A;M9MNy!VpxpdM^Lfqp_aOcYA71L{2hcM@8iwipxZ2ULen zVa4M4ah~6Bf8i<`$)o`$tSpUq7=mUNmW>TjTlbk%pNXn4O_imkMV6ss$Bk_isAurf zsnxjM=$AD~^~68o#G|G>-e<%L8m2DnHe~jEg*IqTCxbOUjU~YbODGkoad}w~*Ul27JEN^CVDjuwy{5+%2YCeq_ zgk6UN0{q)ciW&O@zSZE+(Z{Z7W;%FN%81`5TPn-O%TrzVBQWPZ{L8u& ztTQ|KgRZAPl`-h)K6CWqx*NKiE9cN}>#U!b9R$rFl% z-a_@cbmZ-qZH~`Lgc+F{lp*IExBFR7W9AKzw#QPrMdGtQ>Rq zwvLdO<->i@4$C^lWTF9K*3K8KhLzyV6SerU@~4^8%j)G;n}6gdD-1Z@++K1GdJaw_Zd| ziZF6C&iz1S-dU@X>d6PWu^9yy9aQtW(P{Ot+aH)(73OBjN?kokvEYV)W@g)U@@24dCey1ZsKB`MLv9>YhJ?URR00!L0m*A5`RK=Q}Iu|J`(XNdbx zSb#kp@ZW?glAo34tFi-K|K8bR8O`LpuJC_dj!A-xqi0 zykMAN=GkYn_kO->tZE>H)>Mf3FKu^)QxR zt`veDqI7{m)KzWl_{ZbhOJGtK8ToD0k*1}R;B6?n$A1pO3Yb3Z%N`L^`1!S#{CQ0| zVY)KGop`IsWoPl`;#Dd$$xdMtp+;(tWvZH?sq9h*m-%;ztd;x%3B!2m#L}7qi4-WY zIN|dAwEs2nZBR+JKyTe}^$GT?94-X{CWRiOT<<4G6-xm!r#q4X;_;NWGmh_wjGUJb z5HACeWqDGU39!TQemrgq;YKPExMxuput_0MJVkT#+ruM;%W%8T79|4%AuOLqQr<}5 z*EkvxLa1u6Xa!SF&WE<)Zc7V$%eLOv*Q6lmn}w$=D9&gRgRMM+sMj^gcB9Dg`m@^) z(9V_HV=Hk#KlK{_@+a|H-6#N!>e|GOJ{bnORhuE@zI!zNB|IEV00f;VG$lbw)1L31 z$yOFwH;=^(Oqb@{1(?`rPL>kz+gUyl(KDTWN7)pL0U7Y@!IAaBfkE>^=rY7V;ybWp zOEOVRnj_P2GXDPkZoM<-Bg^&uV6JHCi4sd8eX8Q>r@gAap2@91Xu_9Bku!LTzOnHk zIlp=uvc4a!`;=h78_eYIA&etDb#v_IIxO(p2@i+#le_3WG-OH7C5|1tr+LOZDFLJ~ zr3`NhcZcP}o70(&*4>jM-+R~ig?6tm+iazftIL+k*O&DJwy)ma$*~f-my<)s7;O>8 zm=YxtHClmeE`6P4eQkW8p$h+SP z(gNkC7e9B?g)I~--*K}nv)_0gi+XgqNL0R@lDWYqE|T@UP8F=aXphxy|8uTi(k0Cz zLp2yk5VSj4+;O=%NaG8*<@>dMfdvNnq`oyI%%S6z2FnX2zN5-*+WUDA0R#8%p&XL< z42+SI&#iI#aYWFnFjzE(P+#-o${l+zYVM#Sd%oir4AA^En=lghFfi%b^(CT|twDmf z4VK?)$=kj6jZviM2Dw)a)03JY^CQ6r! zBTnW^Q&Mw-oZ7OU=y31O~iinuquR0H5RxX*RhFO z(IdY9H=jYgrBZs5uSv`yUD=W;4D~UR&pIw_bu(Z!Oqy`>3}1@NcAD?*Z>Uzal`68i zP8j>JT1v2Bvceo^kKcWCZnpn0_2qQK;W8}Iidt|GD)qF?YOK5S;bhRu=wa*95azP> z;xe16sa>@j)@6I-HunBNp@K|#&q#ySN%&_1(@7rgJH|k@uJ>u-nWtnO=aS|c)b6dY zRt>4?ymU3Ns|rWCP>&$XL4(m~1JaU28jXhxC4iCw5#LCToy?7m5?cHoWV>jpNJ)~( zcYoGAhpGs;3?mVh6(2sfs=$bJf=J?5ca0teF8yW0=+MLMMaQIP+#(7B9&frE9h}ls zI#J;{g#4F9UKsoa8n>>_=O*59y~(M6e(G;{tEBSIX56jTUnC*Om+^Mq>=Hc5 zx=pL^IO&OMnYz|%$VXS0LwYLEkG+Yk=ObH@`D1%bQq|UY8M9ydaRwq!xIvQ@!a&Gc zlh>UcC{(Wp!fp_uRrWhM_KPm4>l?wPuskBaPFmcogDv?@=i3~}=aC1But_g%KT zyL^0jLQS0wiK8v)I$O-~@4PCJr3Gp0WxM}YVkz4q&`?xpuBsprhB)V&bIza^;6e2clSX;J_Xyu z2Xre-(vW9)F(=7mlA($iY?~(E(ih5s z5f>#|UxA8A&U!?_JJK)p6w^-AcFa=`8KPN7{yk9q?u65S(2DkE*14T#Y~Q+#VGd443@#9~ z7;?$mk)LWSF&d5iu;iaTAZhxni48O3dOGk)nkaJcLaZCl_xO}znjzi!2Ln1380Vsi zEn-v{V^Ocn5Nr~v(>0Hff)g^`g?UbjxNb64bo$bCZbJCo9OucZh(qw;dRXy$IbvuM zQ$bY~t?1ZlxA&2L&2fFRs@VNwPJ5%5BV$>yYUt2eSa2ITV=w{KTLGuzcAd4V<6w(& z3y7Uf;;D+%7Y5+KKzfHGzKB2Nj72)JIbGF->nk)i^WCZ6Hgbe-|2QjK=5r7W=Dtp3 zLP|luT3^ZW4|sC}kqj(MW5o~I5T(<6{Xoeci<&zadqCNU$bx%P!5>Cv=+S$)(`>wQ z6K zq;>BJwk$nhE;1fcBw2-{N=63=Rqw}o-1Y==`p=-IHNm&m8~0Tm&F;rR#g!rLeYW~F zHWZ;tmO)I>@+GefyTji|AYQ&p(WO77dc)L-S7FC8quDfME2ZZ_pm{cwhV;Ms>WHb- zGy4ibND+}kd5FPnPf7fM1M0fD6cI{9$&L`WI@M+h)UpmmKJ4TUZZuF3de%*wFM6C0 zT$s)Ci}M~E?ysbuy{8LRTJKf&1RQRD3_p6E&2Mc9pckOW529pE{rrS_8Zu`G{q=;e zvB99)X7jX>F)>(d!i)4%&6ftgBmt7YxErV<3Tp`G1qqzuhxZhrBMdzUKinRMFYQ7Z z1Svgc&8>yGb8w6`5$-xTZp>5zCd3nB>4s`6L>VSm#;A;{N^2A%F`|Wg6hEv+y8%## z8ytv;fOT=T(a~jnFZkMwV_E)wumt|l<<@ySMfkj``80`E-*frTN7+x~`kiRm2EOuE zwI~lvtnd^9iQ2Vqf-Co25Kpn3;N`K_oaIT1_E{4G95~l6avbq^9EUWVxr!RUUpmU+ zGlg9h=&bMVkF>3IN3rsTpy=G1t|9nA44s5xzV!G~xa9+`>=jV~(+@<`NBf-?qkP*l za%LjyPHZC@X}r$_RGHC>2nYWDOxGs5^_gusd~vtG{TN&2du<}k02%W7P=L%0xTeCU zChOimyjl*WUn}qKjOjf4k2kazJ3uwO}87e@R{lx0F%33*& z!i$^VR7=I#e){qHPz;BZL#GJ=N9#xf`J~fU16!Lc#**vof#^rI?5@2ANg^-vI#e?> zbcDzA1Q<;QbSit)((P&yvyB5K7_WhJ$EoD@X=h#_y_$g!3 z=E3Zn?nNg!?(tvbt(Ck912H`1^mqZqyVVOL&GXl&Zy))ntJ7stu13^wruPLuQisdR zd|e4Sd|+aa;#$K*1871}fN3XTx7ykj8kMVErC`_S*72HhE2`!T_(Vnzh<1yC-q|)weH+~7++j0o86zzY+NzaB8+?0Y+Kb< zalZ7Ivd@|w_dNkD%!vw39lyG&871FI=IK+8%$HnbO~)f1f=Wk6lzqPeP@h5~^Am)2 z>pV{`ZgA3!TvokYoSi2gzNNO^Zw9T#?2Y_~?9ue%4Ts!JS4~-2;p|b!oGA~{-Jr9? zv%>t^KFl5 z>b^O3I&`S%30-49%-VOdS9hcx zQI6sl=$2!dktXnoe79{?m=wm^3GAJ+G_Wh5rAl#;NwE6L8!o z$*8C#jJrUPLe+cg8vb~cwQ@T#_V94Ka%Zz#k20M1^_mo7DJ$u51kqg({+)nD0Oku~l*A1)mg~#HEZOqC41lee1t++>c_ktp2{zs#Bu_LoaDs&4q5@<$tOd zl&W=!N(-&;_4avtEfW){`}1sw;wUju&(nYv@IanAKNW!0ZLi5#NZ?{Ln zhqt>`{m;cJ#Mh}7Jr@9?FQB4TfYDB#CoU`0Xln9xT$l zmTTqo}l;z__JVwthQL-xZ6veF|M0?@EQ50 z#dq%JO8Nz;f&bbzE|86ehc#Nz-e|!H%kmvOy3~w6kHB)rFh&r@WqZxjo$jsJ%9O2q z_=-sC8wgjnaaWrrwge^s2fN4GbUDw-*g3|qFHPW!&Rk8zn6MR9r;m)gQBw*yNIiBz z*e%bVK8OAzrD*zP{QzUH^>Bu2`0<)w`)5>sCUMN$U>P2y_~Fp3%1#0p)ocO4k)=thiV&;uP9z zclS<5BYb5qV9G}7hr~G?V*W1ZO(VHL9l9Gf3ItLr3=kGrxk6BJtSDu`de~c<7hF#Z zR)L7lp4TiGdg+d>U*q&?J9c7z%+m-4D5VO$PNecNZH(NpaBcRFKQ`J3lWa9N-Ml3w zY988^J$F~C%sdQ`Ws-wY4n4IPx{UJ z^-3B4`0ND;0MFf2!937&`4@{kt@EAQrFc*s+z$n=|z(LM332{a7{@B zLz=M0F3aq%wTOmDC8}6;orp?&cp7YiW1QVUge_X=52a1S| zZP(&+?Hl&RT~AC0rtT`)($8qMs8a@BCIyLN34mz55|Bo?Jw5iesJ~=dt&U*CP5Q+L zBB8L7rJx6i-<|>iZwHE7y4;4{@%;RD^^H~;X;n?bWF?+u4{ZIn0Cw_4z=Iy=JNR;e z>NHd|mj0h5zEri_f=XMnyV&wVHE{uhnW8d(&jcG!2A{dY53w&QJ!m|=LW$Z?S!UU$ zhq7UAGIT1BEtU79dpd@O*nynVEahvC{~ef%tJR|x!beY3z|;lepN`|&(Z&#`IaxdV z7)|E48_yvA{65eDNzm3Lkb$qtRQ*Bg#nxyBFf3VB-D=dkL3o^Lfk3;_gwXJMYyrXi z1n57AP<;!2nt%ef1oJ1t^z8Tv;4&Ydo`?;HyTOZ9v!dpgysF=lUf}z@fQK@Iqt1Zoeu}sc{K5}fopB^#sV1$@+?be z9qv-lyl*0h3mt+!3N>%J`L2*(UOrk!JwgJ?p1e!bGvSSvFCH+206g~lAGQl!#ASMd zymi8tL{8)#ioiJrX@U>FC^3C1=%Vp5x`UsV0&S<+UzkGa@bLc?8G*K!Ay(3PZPrK%s-NP?ViObX3%@d*sK!9#*YZsUWt9yc90ZuBR%`lEY@!d-_RpJ$kka zfN1G?ilF|NYd3Wmn2nk$w!TYU% zsN8d~9h{oc4~*s%#uF232Qx;vmnuvWLLZ`PRR_I-60?bHWU{)Zx`FPf`5E%Y)a#hW z2NcLHThwDI7=qYMbyKP5g#=vGH88U@WRw9w(Y)CvEUQ_2s_CldD!>P=Q;yA5 z%D8~2fKFo4tuzB$NCCR(<&>P~R=w|3&|t#Za8x1dZG~o9!z84bPdn}ef@eaX-Nm@b zoSuz}Ry`uiTTE7Kv!gX904XOq~LbYrffkxF`erIK+GAXDwn&ZV+=At&6gERQ`oSa9^NSL z98w3Ytc!nNdPMusw(^3W$TB&|?iC9CPb{Zr0HPD62_IbV%cgC^5FMj5Y!J)eJEQ7D zj#`&*Lw}!?di)87WSE8pTupp*vyqIF!iq0MU*FkuvPvW|_nBd=tgDJL5*NrckJtgB z9E2BjjBuXYF-m!&5VsClJ7 zx!`EUNTJJ`$=!WXL}Lme`l7)y<_wOw-S__E+t(tx3nCMJ_KMf(WgngV9l zg^N%h6S+P!So1t*)nCu%e)+_cCe}O4X^gsYtzxQtd~$N|m$Y0Y9Xi){9)?vm&;_I5 z{6t@c^|K0^Vs!MAI2n%eswFd*S$nTe0oG%>7Waf!uird{oCz)U-&l9q+~W&A2^SrI z+{cHRC@Eg4$N*Vj#3pF+eRr4fPc?AQ;ZhL&li4GP+M5wB#=&er$2&-*kR;R&sr1Ok zXL|cy-}B*R(BP(wXhzVK>8p_xn}1DDRyo)3cdF%6Az+*P1qCTng)YV!{$b#X zAZmcyet=Kk`>#cWOu@SS=odNe4E*@Pld-hN*yo(BFuzXHudb*nCCF7Be@9372!oh5 zAH9fn_6M%5vYpj3y4A6OCA_nl_$7)b*R<(x)pw@e%~}eM2V{sV+t#uTi3xx75K*3U zk9>^|XqZaSi{h$=K{hNk3x;|RYV)gBz(Z$&!^Fe3!d&(BMgcDgshHyxj1a$Zm_8At zgRHj31@XJQtg15Vj2{-oK%}*`gfxk*z~2~uoKH;(Yt2`PoXo-M#dCt+GMJEP6d?_; zJ^3&8KhNU_5pKs(yZUb)WY7Etgs7y@D>Nx@P@&q5euUE%;-D|12!!w#WL59(v`AZi z*kbaKufm?xvQvLSykZ7X7#en8Z`;SIO~Zfu+=oXk;%4KT^aK^kXkbtWj`6R)Ka7w} zymH2Yy<#zt79A)r#kK8PkK z=jbeR1oLKL;rJ%&=(GC9rP$2x#VGjw-y`h?*C%Zbq+A#`k@12d_~|M7>|NU4NMVe9 zZ!@qfNY2s?Jla-;Xk=!d#Iho)buO)JVwiVbDR6Ts(+od8d5)echfeP_d$6;=8(8_I zzTw+z53%F%PJ(W_;;}3&jbVRg30xTel*TQtkNrExuV z>O%WomMALpe2~w8GLvcXXYL&j_I}y;bsbYsCR`yv*k&jK@&MQv5XGldnivZdJu`d_ za<5CYUVg-;QV+iM8v zXOfO(<^E&{F_;7!S%mAnk+uEN^7>yP*4Gy^rQje_2w)8AKPxj@*b@~$XDJmA{(jAj z&H#M$fhCWnpt?~ZYHEWeyNg^_m}CG`WIEiDgh`>^Z|j4R?>F~h+z!jp{UGdz6txIV zN-Fo;Psm2JsgP2~$YqJICp-SildJVvCUu!|?H6z#vFP_}P4sfSSIE*&D_~%J>GdTF z&==_HI1KsP%=3KM_thYk%XK65pot&0IgRDo}(XY~F08&`B1SKHkv8w>0EL|A5M@BjkV z;5*WEaZ~QJ{L=R;{5^+F0c;s% zjf~*zB)q6-$iyNZ`yJ=E@Q-V@Rgc>vNk4YqVv$&9{WJ$Pe%(ix|G|&ldI9usaDO&4 zg*y7*aVGY2Ck;lfET*B_2-nQ!{^qW(8~M{SL6iWYO?b*45dRy=MO1#9CcV@`^{@DORekKg zfpZ21?NiDx4%B#clrl2(uGxRzi_R_w0xkOO_GX%4+kMvz4pxBgLCy08v^VKG4%DGo zaXps&HTrAF<9yVb(HNTL7~N_;Y66g=fI)`*8nF%^uFvkb`o#)j2_u>O?Ms{0^vN0~ zJh2R|8)VpNjsI1!$ueXN9JVX-PPd;eW25)<^IEFP2@Jz_pA3O%9%8(B(}E=$uPypd z76(HRW{TQ==~8f1R8sOQ*naNyk$n$Jntp()?>-~2rE27fpzsSC)q=h1Is2EAej5hU zkgI`o3Vwx}g$nero~vmvJWQCPc;c$G68HOY!qnM!#MqCa61C~-ynnx$^C*Zp%sgCT zvwjfp==&5c9q9QAjA|rx(D*^_vYp3dVnsG4g@Ca=vZ*&gBMf;W=?(VfcsWLpvw@Uf zYil@$RcQm5^&Id!!a7|gCtJTeODkLbhSlsX}bOsGztzqvns6n z@GHCn;t5Ao{nt$WT(hdr*JA~c3$ae@n9CBq)ot@k=tEz4$N6zY(_Xs>n`6aCnac=>I%@l+ru|y1&By*mVoq7?`~!@>?H$g-$*<=$Ec=klJ!8)ve3O* zPvbxM79Y$C0>hwKWvHwrUtSM1-x%~vx93NDqrJVhr{y0|%6=27@jUGwE5$2utd zinu&3DpnM0(W%xf1ehSp%ZrzEklw_+j0)8FVa&AQC?%H1r?{-hEh>n!Ig>X`J1yMy z2Mw>ScjUDjextIuNvLRf;DHRzRaR6+9XCF9eB;X)3?&s+_iVcQ;vC zpw@l6rH+k)}{m!LbGR`KO$)!yLckLPuww;*G_J?54Y@*T<=H z;yB3+j8wRF-MNXRGLn79dSc>#yTVrtn@x8=>Ljk7dEw4m^?B%O`Jc|m1@b9HaW|$^ zzD*~>PzguLe5FkvS;+Mny5mAIR+&e1EW-R-Kz91~0nP|VOlT-8RU93Os`15sMkmZs z_^aM2&nfcQnS381*gpuaIN^|Reh$AFt;Bdi6K-z{hWawzPwNlfM-nVqvO-iQ4*stU z!TIw=MpkPhZaOI5gOkJ!Bq&%VjL_@{(w-8^)^3BD?3ts;_Pd*nxB-2{qcj)XlLC>wqft`JZ66|%{JN+LB>+;QP#eGLk(Px|(q3ll9e_}Ys z8V$^3brdi@M7nB5%bLK+!itd%rJ8?N0fRL)Qsoc&%o>n|CjFK3wV;r_Y47$Y%K% zQ`2WjGO?Ik{jb*9q0OEgM|4aQ-*bnl@#1lo6z)+zrxkiJ>Tr=@9uuLjBtd1v5^Y=6 z1Ov*IXbAbj<1i_$xzll9r`d5vNC1@z%pI+o~H~mgK;H z!2{n%ce=s$TU`;eA`wc)?OUo}C+-$8yZ{{FkMgBXRCo%Bs0`i_W~2Y-MX+%$Twi%~ z-bnK=#=5fb(p$R3M2g;Dr8_H8YbZuQByJJt z7aAzO8GjjjFcG?LAFs}55MI0oo-&!0^fdA79j!-Ki}th+L(7K)Ehhr;+>zkYsjHNF5W z#Ap0z=n|8$nZa?{NyDZLfS)Ivh@uKy#m^C9XJsWCIQ0j%s9fBWtz?Apt5JcqY^#+E zjspcKA10R7XN8e&TW|Oq5c_8{h)G(1NMy6Wg2~f22|M4vj5Aw67jS~S>=vMO2oE{9?ZNs((VJW*jYxc; z38JF|ce5OM+{Lqey-(Txt6stO-WS*hV=|EStF{%12*gb}=ips4@5J1k-uP`vdlA;Q zp_734StMHClUSUGm^KDXP*O}Ld@;RRyx>rFzZ>7t{M&}-0NJ=S?5Fx!dBY(Mk-%>h zP7b%{&5P&iQVDwE3B*qz9_d&?C*rjX5>&EfoB3=6@t(SaVe{S0XT`0C!@=*@F~`o( zWf_KSbZ@J2AF3uhKy_E!HNcZyKb4r0EOLy#nRc~9gX?;&znzmaN^C|Wob&})3Aw19! zP*;MNVNJAc;NiQ|0RKHTRp?I_F~@5~2H&1oj$r*=hsvO%^rGf-!bA|A z#FVS+-w>4@(Gn;yKB0KY4CEXrK5QIW5lb%;UxV|1wx#TmO+f|1A*g_>3HqK@z?m}a692(3AQ0r{{alfW9V8W(~U@`n!ZM$D*SZ(atwZ15x#x`6Bces zP%M!cYL?GoZIn0_G;b$swA z0Ah~%@#D1fe&crK^Znx4~~e<;u~_^JUjz^?E~A z74rRkZjISC4M6`XJFLQxA9OGIjKA+bKdy=QA^U2cG;&AI3L88DyHDRh{MvkosD(un zD0F#nn?ZAYuyNDaEN*G}_=T7Jou=mJgvP6g|I<_dT5uXgi?lUWJvW_uSxx9C!}JkZ z)9z?_vA=!Wf8SX_jBwiv8yiM9?6N=&{%ym`IUc(*J*F!=PmBCJo&E2ZS@d`^LPku2 zCv7ZD1DwfvbN>AoXE`>ZQauD3{KWy|K94JnBF6kei}M3B>DqFuIJ$;L_>bEhQKT{| z+{;#~UH*YcX$)C^t`Ju`SoBITZyM*JPP@zX;|JmWs#s z*+g+yax6gKfm@6{Jq;h~TN*()arV3ceIlRGq4UM{M;2$Qa5W+9@X5dhhi2T)$FmQ! z9p!#9!$_i#A1BsJlK~$%glTiVcO?4=F+!x8tsi~ngzmiDlFE}5PW2N))i9-8@fjrG z8{U&{pc;kh&?8@Z@K4CbzHlT=m7YFD3UPgZDF=31EQJgdn8-npxeDXu7z+0G)ju=k z<7 z)pO}P8zf*+S|8yF%9UVJCV+=VoP)+DO+(Ea-n#F6-@di47ubu~%$%S9tx_zRZz;2r6tcZSPt^{vyhlKm>N@xFXQ0seqok%&7J)HtKADPP1e*Vb-s)|J421Z z&&D503aKcQ94P~x-rbgU1E9Rws%l|VU&Q0$=Rq`S&PC?rs`U!^f;>e7FXB|dnK%~B zy|kJ#fg+k`<~j5lpL3NjmRCpIE8rFd^s<{u+aDJ1L^t74?3ySPGZ{FVN6}hm%0Ree2&JuQ{)1 z`wOb$vIm*dkhWcfcy4udZ=MY+t~$S5FDpii@>yQO+8SGslL#(imaW#U*x5OhVx#)L zXZI-Y6y8$iciMVW@_5_->9#mcHyt8`0SdKZA=~U6H$O-ZGah448p8j*HiIy@*L-1~ zI#?^Md2avF9Bd$+sQRbFjHmwh^%XIZy(Wp2Ut=t5(zS1Xe20yFkhgNXDB=O{XBBqxH Date: Thu, 3 Aug 2023 13:34:10 +0200 Subject: [PATCH 10/63] objectToQs: Turn obj to qs --- packages/frontend/src/utils/querystring.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/frontend/src/utils/querystring.ts b/packages/frontend/src/utils/querystring.ts index f8c14979b..b7b7d0416 100644 --- a/packages/frontend/src/utils/querystring.ts +++ b/packages/frontend/src/utils/querystring.ts @@ -6,3 +6,15 @@ export function qsToObject(qs: URLSearchParams): Record { } return result; } + +type QueryType = { + [key: string]: number | string | boolean; +}; + +export function objectToQs(query: QueryType): URLSearchParams { + const stringifiedQuery: { [key: string]: string } = {}; + for (const [key, value] of Object.entries(query)) { + stringifiedQuery[key] = String(value); + } + return new URLSearchParams(stringifiedQuery); +} From 7e49bda0d752cc025af9a8de1a2eef506b7842a1 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:34:41 +0200 Subject: [PATCH 11/63] Hook to interact with Safe --- .../frontend/src/model/safe/hooks/useSafe.ts | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 packages/frontend/src/model/safe/hooks/useSafe.ts diff --git a/packages/frontend/src/model/safe/hooks/useSafe.ts b/packages/frontend/src/model/safe/hooks/useSafe.ts new file mode 100644 index 000000000..71ccfa03e --- /dev/null +++ b/packages/frontend/src/model/safe/hooks/useSafe.ts @@ -0,0 +1,61 @@ +import { useSigner } from '../../ethers/hooks/useSigner'; +import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; +import { useEffect, useState } from 'react'; +import { ethers } from 'ethers'; +import SafeApiKit from '@safe-global/api-kit'; + +// These constants might later be replaced with community settings, allowing +// each community to select which chain etc. to use. +const CHAIN_ID = 10; // Optimism +const SAFE_TX_SERVICE_URL = 'https://safe-transaction-optimism.safe.global'; + +type useSafeReturn = { + ethersAdapter: EthersAdapter | undefined; + safe: Safe | undefined; + safeApiKit: SafeApiKit | undefined; +}; + +export function useSafe(safeAddress: string | undefined): useSafeReturn { + const signer = useSigner(CHAIN_ID); + const [ethersAdapter, setEthersAdapter] = useState( + undefined + ); + const [safe, setSafe] = useState(undefined); + const [safeApiKit, setSafeApiKit] = useState( + undefined + ); + + useEffect(() => { + if (!signer) return; + setEthersAdapter( + new EthersAdapter({ + ethers, + signerOrProvider: signer, + }) + ); + }, [signer]); + + useEffect(() => { + if (!ethersAdapter || !safeAddress) return; + const createSafe = async (): Promise => { + const safe = await Safe.create({ + ethAdapter: ethersAdapter, + safeAddress, + }); + setSafe(safe); + }; + void createSafe(); + }, [ethersAdapter, safeAddress]); + + useEffect(() => { + if (!ethersAdapter) return; + setSafeApiKit( + new SafeApiKit({ + txServiceUrl: SAFE_TX_SERVICE_URL, + ethAdapter: ethersAdapter, + }) + ); + }, [ethersAdapter]); + + return { ethersAdapter, safe, safeApiKit }; +} From 90a663a373b10a4c2e9ac4ab6036fc139937d329 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:35:29 +0200 Subject: [PATCH 12/63] Export PeriodDates type --- .../frontend/src/model/report/util/get-period-dates-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/model/report/util/get-period-dates-config.ts b/packages/frontend/src/model/report/util/get-period-dates-config.ts index 6414dc9e1..828a3ba24 100644 --- a/packages/frontend/src/model/report/util/get-period-dates-config.ts +++ b/packages/frontend/src/model/report/util/get-period-dates-config.ts @@ -1,10 +1,10 @@ import { PeriodDetailsDto } from '@/model/periods/dto/period-details.dto'; import { getPreviousPeriod } from '@/utils/periods'; -interface PeriodDates { +export type PeriodDates = { startDate: string; endDate: string; -} +}; /** * getPeriodDatesConfig function. From c1ac2df06702c93b22a50a4ff9f632dd003049cd Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:36:09 +0200 Subject: [PATCH 13/63] Community selectors and dtos --- .../src/model/communitites/communities.ts | 75 +++++++++++++++++++ .../model/communitites/dto/community.dto.ts | 3 + .../dto/find-all-communities-query.dto.ts | 4 + .../dto/find-all-communities-response.dto.ts | 4 + 4 files changed, 86 insertions(+) create mode 100644 packages/frontend/src/model/communitites/communities.ts create mode 100644 packages/frontend/src/model/communitites/dto/community.dto.ts create mode 100644 packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts create mode 100644 packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts diff --git a/packages/frontend/src/model/communitites/communities.ts b/packages/frontend/src/model/communitites/communities.ts new file mode 100644 index 000000000..133858264 --- /dev/null +++ b/packages/frontend/src/model/communitites/communities.ts @@ -0,0 +1,75 @@ +import { AxiosResponse, AxiosError } from 'axios'; +import { selectorFamily } from 'recoil'; +import { ApiGet, isResponseOk } from '../api'; +import { Community } from './dto/community.dto'; +import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; +import { FindAllCommunitiesResponseDto } from './dto/find-all-communities-response.dto'; +import { objectToQs } from '../../utils/querystring'; + +/** + * Fetch a single community. + * @returns Full response/error returned by server. + */ +export const CommunityQuery = selectorFamily({ + key: 'CommunityQuery', + get: + (id: string) => + ({ get }): AxiosResponse | AxiosError => { + return get( + ApiGet({ + url: `/communities/${id}`, + }) + ) as AxiosResponse | AxiosError; + }, +}); + +/** + * Fetch a single community. + * @returns Community object or undefined if not found. + */ +export const SingleCommunity = selectorFamily({ + key: 'SingleCommunity', + get: + (id: string) => + ({ get }): Community | undefined => { + const response = get(CommunityQuery(id)); + if (isResponseOk(response)) { + return response.data; + } + }, +}); + +/** + * Fetch all communities. + * @returns Full response/error returned by server. + */ +export const AllCommunitiesQuery = selectorFamily({ + key: 'AllCommunitiesQuery', + get: + (query: FindAllCommunitiesQueryDto) => + ({ get }): AxiosResponse | AxiosError => { + return get( + ApiGet({ + url: `/communities?${objectToQs(query)}`, + }) + ) as AxiosResponse | AxiosError; + }, +}); + +/** + * Fetch a single community based on hostname. + * @returns Array of community objects or undefined if not found. + */ +export const CommunityByHostname = selectorFamily({ + key: 'CommunityByHostname', + get: + (hostname: string) => + ({ get }): Community | undefined => { + const response = get( + AllCommunitiesQuery({ hostname, limit: 1, page: 1 }) + ); + if (isResponseOk(response)) { + return response.data.docs[0]; + } + }, +}); diff --git a/packages/frontend/src/model/communitites/dto/community.dto.ts b/packages/frontend/src/model/communitites/dto/community.dto.ts new file mode 100644 index 000000000..1a2898b44 --- /dev/null +++ b/packages/frontend/src/model/communitites/dto/community.dto.ts @@ -0,0 +1,3 @@ +import { components } from 'api-types'; + +export type Community = components['schemas']['Community']; diff --git a/packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts b/packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts new file mode 100644 index 000000000..25ddcedff --- /dev/null +++ b/packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts @@ -0,0 +1,4 @@ +import { paths } from 'api-types'; + +export type FindAllCommunitiesQueryDto = + paths['/api/communities']['get']['parameters']['query']; diff --git a/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts b/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts new file mode 100644 index 000000000..4e7f11f45 --- /dev/null +++ b/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts @@ -0,0 +1,4 @@ +import { components } from 'api-types'; + +export type FindAllCommunitiesResponseDto = + components['schemas']['CommunityPaginatedResponseDto']; From b66f52c2f4f4446372666fb8f449bca51952684f Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:36:42 +0200 Subject: [PATCH 14/63] Move useSigners to ethers folder --- packages/frontend/src/{ => model/ethers}/hooks/useSigner.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/frontend/src/{ => model/ethers}/hooks/useSigner.ts (100%) diff --git a/packages/frontend/src/hooks/useSigner.ts b/packages/frontend/src/model/ethers/hooks/useSigner.ts similarity index 100% rename from packages/frontend/src/hooks/useSigner.ts rename to packages/frontend/src/model/ethers/hooks/useSigner.ts From 8ae71194dba31beb520e57200cad4efe6e461c89 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Thu, 3 Aug 2023 13:36:53 +0200 Subject: [PATCH 15/63] WIP --- .../PeriodDetails/components/Attestations.tsx | 71 ++++++-- .../components/CreateAttestationsButton.tsx | 46 +++++ .../components/CreateAttestationsDialog.tsx | 171 ++++++++++++++++++ 3 files changed, 274 insertions(+), 14 deletions(-) create mode 100644 packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx create mode 100644 packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index b0993e983..3c76835e2 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -1,14 +1,21 @@ import { ethers } from 'ethers'; -import { useSigner } from '../../../hooks/useSigner'; +import { useSigner } from '../../../model/ethers/hooks/useSigner'; import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; import SafeApiKit from '@safe-global/api-kit'; import { OperationType, SafeTransactionDataPartial, } from '@safe-global/safe-core-sdk-types'; -import { useNetwork } from 'wagmi'; import { EAS } from '@ethereum-attestation-service/eas-sdk'; +import { useRecoilValue } from 'recoil'; +import { useParams } from 'react-router-dom'; +import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; +import { CreateAttestationsButton } from './CreateAttestationsButton'; +import { CreateAttestationsDialog } from './CreateAttestationsDialog'; +import { useRef, useState } from 'react'; +import { Dialog } from '@headlessui/react'; +import { AllReports } from '../../../model/report/reports'; const SAFE_ADDRESS = '0xf6937E015d5337F648fE01a03A74c9FAA4f90d54'; type UseAttestationsReturn = { @@ -126,20 +133,56 @@ function useAttestations(): UseAttestationsReturn { } const Attestations = (): JSX.Element => { - const { createAttestation } = useAttestations(); - const { chain, chains } = useNetwork(); + const { periodId } = useParams(); + const period = useRecoilValue(SinglePeriod(periodId)); + const dialogRef = useRef(null); + const [dialogOpen, setDialogOpen] = useState(false); + + if (period?.status !== 'CLOSED') { + return ( +
+
+ Ethereum Attestation Service + Attestations can be generated once praise has been quantified and the + period has been closed. +
+
+ ); + } return ( -
-

Attestations

- {chain &&
Connected to {chain.name}
} - {chains && ( -
Available chains: {chains.map((chain) => chain.name)}
- )} - -
+ <> +
+
+

Attestations

+ Ethereum Attestation Service +
+ {period?.attestationsTxHash && ( +
No attestations have yet been created for this period.
+ )} + setDialogOpen(true)} /> +
+ setDialogOpen(false)} + className="fixed inset-0 z-10 overflow-y-auto" + initialFocus={dialogRef} + > +
+ setDialogOpen(false)} + /> +
+
+ ); }; diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx new file mode 100644 index 000000000..cde736621 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -0,0 +1,46 @@ +import { useRecoilValue } from 'recoil'; +import { useAccount } from 'wagmi'; +import { Button } from '../../../components/ui/Button'; +import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; +import { useParams } from 'react-router-dom'; +import { CommunityByHostname } from '../../../model/communitites/communities'; +import { useSafe } from '../../../model/safe/hooks/useSafe'; +import { useEffect, useState } from 'react'; + +type CreateAttestationsButtonProps = { + onClick: () => void; +}; + +export function CreateAttestationsButton({ + onClick, +}: CreateAttestationsButtonProps): JSX.Element | null { + const { periodId } = useParams(); + const period = useRecoilValue(SinglePeriod(periodId)); + const community = useRecoilValue( + CommunityByHostname(window.location.hostname) + ); + const { address } = useAccount(); + const { safe } = useSafe(community?.creator); + const [isOwner, setIsOwner] = useState(false); + + useEffect(() => { + if (!safe || !address) return; + const isOwner = async (): Promise => { + setIsOwner(await safe.isOwner(address)); + }; + void isOwner(); + }, [safe, address]); + + // Not connected: return null + // No period: return null + // Attestations already created: return null + if (!address || !period || period.attestationsTxHash || !isOwner) { + return null; + } + + return ( +
+ +
+ ); +} diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx new file mode 100644 index 000000000..6ab0743e7 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx @@ -0,0 +1,171 @@ +import { faTimes, faUsers } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Dialog } from '@headlessui/react'; +import React, { useEffect, useState } from 'react'; +import { Button } from '@/components/ui/Button'; +import { useReport } from '../../../model/report/hooks/use-report.hook'; +import { useParams } from 'react-router-dom'; +import { AllPeriods, PeriodPageParams } from '../../../model/periods/periods'; +import { useRecoilValue } from 'recoil'; +import { + getPeriodDatesConfig, + PeriodDates, +} from '../../../model/report/util/get-period-dates-config'; +import { ReportManifestDto } from '../../../model/report/dto/report-manifest.dto'; +import { useReportRunReturn } from '../../../model/report/types/use-report-run-return.type'; +import { set } from 'lodash'; +import { AllReports } from '../../../model/report/reports'; + +type GenerateAttestationsDataProps = { + periodId: string; + periodDates: PeriodDates; + manifestUrl: string; + done: (result: useReportRunReturn | undefined) => void; +}; + +// type AttestationsData = { +// manifest: ReportManifestDto; +// result: useReportRunReturn | undefined; +// }; + +// function GenerateAttestationsData({ +// periodId, +// periodDates, +// }: GenerateAttestationsDataProps): JSX.Element { +// const [data, setData] = useState>( +// new Map() +// ); +// const [running, setRunning] = useState(false); + +// const report = useReport({ +// manifestUrl: +// 'https://raw.githubusercontent.com/givepraise/reports/main/reports/top-givers/manifest.json', +// periodId, +// startDate: periodDates.startDate, +// endDate: periodDates.endDate, +// }); + +// useEffect(() => { +// if (!report.ready || running) return; + +// setRunning(true); + +// console.log('running report', report); +// data.set(report.manifest.name, undefined); +// setData(data); + +// const runReport = async (): Promise => { +// const result = await report.run({ format: 'json' }); +// data.set(report.manifest.name, result); +// setData(data); +// console.log(result); +// }; +// void runReport(); +// }, [report, data, running]); + +// return ( +//
+// Genweerating... +//
+//         {data
+//           ? Array.from(
+//               data,
+//               ([key, value]) => `${key}: ${value?.rows.length}`
+//             ).join(', ')
+//           : '...'}
+//       
+//
+// ); +// } + +function GenerateAttestationsData({ + periodId, + periodDates, + manifestUrl, + done, +}: GenerateAttestationsDataProps): JSX.Element { + const report = useReport({ + manifestUrl, + periodId, + startDate: periodDates.startDate, + endDate: periodDates.endDate, + }); + const [data, setData] = useState(undefined); + + useEffect(() => { + if (!report.ready || data) return; + console.log('running report', report); + const runReport = async (): Promise => { + const result = await report.run({ format: 'json' }); + setData(result); + done(result); + }; + void runReport(); + }, [report, data, done]); + + if (!report.ready) return
loading...
; + + if (!data) return
running...
; + + return
{data.rows.length}
; +} + +interface CreateAttestationsDialogProps { + onClose(): void; +} + +export function CreateAttestationsDialog({ + onClose, +}: CreateAttestationsDialogProps): JSX.Element | null { + const { periodId } = useParams(); + const periods = useRecoilValue(AllPeriods); + const [periodDates, setPeriodDates] = useState( + undefined + ); + const reports = useRecoilValue(AllReports); + + useEffect(() => { + if (!periods) return; + setPeriodDates(getPeriodDatesConfig(periods, periodId)); + }, [periods, periodId]); + + if (!periodDates) return null; + + return ( +
+ +
+
+ +
+
+
+ +
+ + Create Attestations +
+ Generating... +
+                {reports?.map((report) => (
+                   {
+                      console.log('done', result);
+                    }}
+                  />
+                ))}
+              
+
+
+ content +
+
+
+ ); +} From b328d1d56db5b3152a557eedde888d47cdf52ac8 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:19:04 +0200 Subject: [PATCH 16/63] Make communities GET routes public --- packages/api/src/auth/role-permissions.ts | 11 +---------- packages/api/src/community/community.controller.ts | 5 +++-- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/packages/api/src/auth/role-permissions.ts b/packages/api/src/auth/role-permissions.ts index 25a32d02a..7e55dacd1 100644 --- a/packages/api/src/auth/role-permissions.ts +++ b/packages/api/src/auth/role-permissions.ts @@ -53,16 +53,7 @@ const PERMISSIONS_ADMIN = [ Permission.PeriodAssign, ]; -/** - * Root users are users that are allowed to manage the system. - * In addition to the admin permissions, they can also manage communities. - */ -const PERMISSIONS_ROOT = [ - ...PERMISSIONS_ADMIN, - Permission.CommunitiesCreate, - Permission.CommunitiesView, - Permission.CommunitiesUpdate, -]; +const PERMISSIONS_ROOT = [...PERMISSIONS_ADMIN]; /** * API keys can be used to access the API. They can be created with different diff --git a/packages/api/src/community/community.controller.ts b/packages/api/src/community/community.controller.ts index 1fcb73908..72887b7f6 100644 --- a/packages/api/src/community/community.controller.ts +++ b/packages/api/src/community/community.controller.ts @@ -29,6 +29,7 @@ import { IsNameAvailableRequestDto } from './dto/is-name-available-request-dto'; import { EventLogService } from '../event-log/event-log.service'; import { EventLogTypeKey } from '../event-log/enums/event-log-type-key'; import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; +import { Public } from '../shared/decorators/public.decorator'; @Controller('communities') @ApiTags('Communities') @@ -74,7 +75,7 @@ export class CommunityController { } @Get() - @Permissions(Permission.CommunitiesView) + @Public() // Public access, no auth required @ApiResponse({ status: 200, description: 'All communities', @@ -100,7 +101,7 @@ export class CommunityController { } @Get(':id') - @Permissions(Permission.CommunitiesView) + @Public() // Public access, no auth required @ApiResponse({ status: 200, description: 'A single Community', From 9fb24193987fd0bbaf904978c4998d732506b1b4 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:19:37 +0200 Subject: [PATCH 17/63] EAS, Safe and ETH constants --- packages/frontend/src/model/eas/eas.constants.ts | 10 ++++++++++ packages/frontend/src/model/eth/eth.constants.ts | 1 + packages/frontend/src/model/safe/safe.constants.ts | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 packages/frontend/src/model/eas/eas.constants.ts create mode 100644 packages/frontend/src/model/eth/eth.constants.ts create mode 100644 packages/frontend/src/model/safe/safe.constants.ts diff --git a/packages/frontend/src/model/eas/eas.constants.ts b/packages/frontend/src/model/eas/eas.constants.ts new file mode 100644 index 000000000..be195a6f8 --- /dev/null +++ b/packages/frontend/src/model/eas/eas.constants.ts @@ -0,0 +1,10 @@ +export const EAS_ADDRESS = '0x4200000000000000000000000000000000000021'; + +export const ATTESTATION_SCHEMA_UID = + '0x569cab01c87d76b5e85706a4eca2a10a7499758a3e7aa0e81feeb3aaf95255be'; + +export const ATTESTATION_SCHEMA = + 'string period,uint16 received_score,uint16 given_score,bool top_10_receiver,bool top_50_receiver,bool top_100_receiver,bool top_10_giver,bool top_50_giver,bool top_100_giver'; + +export const ATTESTATION_REPORT_MANIFEST_URL = + 'https://raw.githubusercontent.com/givepraise/reports/main/reports/attestations/manifest.json'; diff --git a/packages/frontend/src/model/eth/eth.constants.ts b/packages/frontend/src/model/eth/eth.constants.ts new file mode 100644 index 000000000..a8d4b9bfa --- /dev/null +++ b/packages/frontend/src/model/eth/eth.constants.ts @@ -0,0 +1 @@ +export const ETH_CHAIN_ID = 10; // Optimism diff --git a/packages/frontend/src/model/safe/safe.constants.ts b/packages/frontend/src/model/safe/safe.constants.ts new file mode 100644 index 000000000..681737228 --- /dev/null +++ b/packages/frontend/src/model/safe/safe.constants.ts @@ -0,0 +1,2 @@ +export const SAFE_TX_SERVICE_URL = + 'https://safe-transaction-optimism.safe.global'; From eda74d93ecd94317c9bddee4cfccd26889374e42 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:20:34 +0200 Subject: [PATCH 18/63] useAttestations hook WIP --- .../src/model/eas/hooks/useAttestations.ts | 186 ++++++++++++++ .../src/model/eas/types/attestation.type.ts | 12 + .../PeriodDetails/components/Attestations.tsx | 238 ++++++++---------- 3 files changed, 309 insertions(+), 127 deletions(-) create mode 100644 packages/frontend/src/model/eas/hooks/useAttestations.ts create mode 100644 packages/frontend/src/model/eas/types/attestation.type.ts diff --git a/packages/frontend/src/model/eas/hooks/useAttestations.ts b/packages/frontend/src/model/eas/hooks/useAttestations.ts new file mode 100644 index 000000000..9f1d89ec4 --- /dev/null +++ b/packages/frontend/src/model/eas/hooks/useAttestations.ts @@ -0,0 +1,186 @@ +import { EAS, SchemaEncoder } from '@ethereum-attestation-service/eas-sdk'; +import { + MetaTransactionData, + SafeTransactionDataPartial, + OperationType, +} from '@safe-global/safe-core-sdk-types'; +import { useState } from 'react'; +import toast from 'react-hot-toast'; +import { useRecoilValue } from 'recoil'; +import { CommunityByHostname } from '../../communitites/communities'; +import { ETH_CHAIN_ID } from '../../eth/eth.constants'; +import { useSigner } from '../../eth/hooks/useSigner'; +import { useReportRunReturn } from '../../report/types/use-report-run-return.type'; +import { useSafe } from '../../safe/hooks/useSafe'; +import { + EAS_ADDRESS, + ATTESTATION_SCHEMA, + ATTESTATION_SCHEMA_UID, +} from '../eas.constants'; +import { Attestation } from '../types/attestation.type'; + +const eas = new EAS(EAS_ADDRESS); +const schemaEncoder = new SchemaEncoder(ATTESTATION_SCHEMA); + +type UseAttestationsInput = { + hostname: string; +}; + +type UseAttestationsReturn = { + creating: boolean | undefined; + createAttestations: ( + data: useReportRunReturn, + period: string + ) => Promise; + isOwnerValidSafeAddress: () => Promise; +}; + +export function useAttestations({ + hostname, +}: UseAttestationsInput): UseAttestationsReturn { + // Convert wagmi/viem `WalletClient` to ethers `Signer`, required by Safe + const signer = useSigner(ETH_CHAIN_ID); + + // Load community details + const community = useRecoilValue(CommunityByHostname(hostname)); + + // Current requirement is that the community creator is the community Safe address + const SAFE_ADDRESS = community?.creator || ''; + + // Initialize Safe SDK + const { safe, safeApiKit, ethersAdapter } = useSafe(SAFE_ADDRESS); + + const isOwnerValidSafeAddress = async (): Promise => { + if (!safeApiKit) { + throw new Error('Missing safeApiKit'); + } + const info = await safeApiKit.getSafeInfo(SAFE_ADDRESS); + console.log('info', info); + return true; + }; + + const [creating, setCreating] = useState(undefined); + + const createAttestations = async ( + data: useReportRunReturn, + period: string + ): Promise => { + try { + if (!signer || !safe || !safeApiKit || !ethersAdapter) { + throw new Error('Missing signer, safe, safeApiKit or ethersAdapter'); + } + + setCreating(true); + + const safeTransactionData: MetaTransactionData[] = []; + const attestationRows = data.rows as unknown as Attestation[]; + + for (const att of attestationRows) { + // Only attest if the user has an identity + if (!att.users_identityEthAddress) { + continue; + } + + // Encode the data + const encodedData = schemaEncoder.encodeData([ + { name: 'period', value: period, type: 'string' }, + { + name: 'received_score', + value: att.total_received_praise_score, + type: 'uint16', + }, + { + name: 'given_score', + value: att.total_given_praise_score, + type: 'uint16', + }, + { + name: 'top_10_receiver', + value: att.top_10_receiver, + type: 'bool', + }, + { + name: 'top_50_receiver', + value: att.top_50_receiver, + type: 'bool', + }, + { + name: 'top_100_receiver', + value: att.top_100_receiver, + type: 'bool', + }, + { + name: 'top_10_giver', + value: att.top_10_giver, + type: 'bool', + }, + { + name: 'top_50_giver', + value: att.top_50_giver, + type: 'bool', + }, + { + name: 'top_100_giver', + value: att.top_100_giver, + type: 'bool', + }, + ]); + + // Create the transaction data + const txData: SafeTransactionDataPartial = { + to: eas.contract.address, + value: '0', + data: eas.contract.interface.encodeFunctionData('attest', [ + { + schema: ATTESTATION_SCHEMA_UID, + data: { + recipient: att.users_identityEthAddress, + expirationTime: 0, + revocable: false, + refUID: + '0x0000000000000000000000000000000000000000000000000000000000000000', + data: encodedData, + value: 0, + }, + }, + ]), + operation: OperationType.Call, + }; + + // Add the transaction data to the list + safeTransactionData.push(txData); + } + + const safeTransaction = await safe.createTransaction({ + safeTransactionData, + options: { + nonce: await safeApiKit.getNextNonce(SAFE_ADDRESS), + }, + }); + + const senderAddress = await signer.getAddress(); + const safeTxHash = await safe.getTransactionHash(safeTransaction); + const signature = await safe.signTransactionHash(safeTxHash); + + // Propose transaction to the service + await safeApiKit.proposeTransaction({ + safeAddress: SAFE_ADDRESS, + safeTransactionData: safeTransaction.data, + safeTxHash, + senderAddress, + senderSignature: signature.data, + }); + + console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); + console.log('- safeTxHash:', safeTxHash); + console.log('- Sender:', senderAddress); + console.log('- Sender signature:', signature.data); + } catch (e) { + console.error('Error creating attestations', e); + toast.error((e as Error).message); + } finally { + setCreating(false); + } + }; + return { creating, createAttestations, isOwnerValidSafeAddress }; +} diff --git a/packages/frontend/src/model/eas/types/attestation.type.ts b/packages/frontend/src/model/eas/types/attestation.type.ts new file mode 100644 index 000000000..ad3628ae0 --- /dev/null +++ b/packages/frontend/src/model/eas/types/attestation.type.ts @@ -0,0 +1,12 @@ +export type Attestation = { + useraccounts_name: string; + users_identityEthAddress: string; + total_received_praise_score: number; + top_10_receiver: boolean; + top_50_receiver: boolean; + top_100_receiver: boolean; + total_given_praise_score: number; + top_10_giver: boolean; + top_50_giver: boolean; + top_100_giver: boolean; +}; diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 3c76835e2..a5c7f8d04 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -1,13 +1,3 @@ -import { ethers } from 'ethers'; - -import { useSigner } from '../../../model/ethers/hooks/useSigner'; -import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; -import SafeApiKit from '@safe-global/api-kit'; -import { - OperationType, - SafeTransactionDataPartial, -} from '@safe-global/safe-core-sdk-types'; -import { EAS } from '@ethereum-attestation-service/eas-sdk'; import { useRecoilValue } from 'recoil'; import { useParams } from 'react-router-dom'; import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; @@ -15,122 +5,6 @@ import { CreateAttestationsButton } from './CreateAttestationsButton'; import { CreateAttestationsDialog } from './CreateAttestationsDialog'; import { useRef, useState } from 'react'; import { Dialog } from '@headlessui/react'; -import { AllReports } from '../../../model/report/reports'; - -const SAFE_ADDRESS = '0xf6937E015d5337F648fE01a03A74c9FAA4f90d54'; -type UseAttestationsReturn = { - createAttestation: () => Promise; -}; - -function useAttestations(): UseAttestationsReturn { - const signer = useSigner(10); - const eas = new EAS('0x4200000000000000000000000000000000000021'); - console.log('eas', eas); - - const createAttestation = async (): Promise => { - try { - console.log('createAttestation'); - console.log('signer', signer); - if (!signer) { - return; - } - - // // Create EthAdapter instance - const ethAdapter = new EthersAdapter({ - ethers, - signerOrProvider: signer, - }); - - // // Create Safe instance - const safe = await Safe.create({ - ethAdapter, - safeAddress: SAFE_ADDRESS, - }); - - // Create Safe API Kit instance - const safeService = new SafeApiKit({ - txServiceUrl: 'https://safe-transaction-optimism.safe.global', - ethAdapter, - }); - - // Create transaction - // const safeTransactionData: SafeTransactionDataPartial = { - // to: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', - // value: '1', // 1 wei - // data: '0x', - // operation: OperationType.Call, - // }; - - // Create transaction - const safeTransactionData: SafeTransactionDataPartial = { - to: eas.contract.address, - value: '0', // 1 wei - data: eas.contract.interface.encodeFunctionData('attest', [ - { - schema: - '0x85500e806cf1e74844d51a20a6d893fe1ed6f6b0738b50e43d774827d08eca61', - data: { - recipient: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', - expirationTime: 0, - revocable: false, - refUID: - '0x0000000000000000000000000000000000000000000000000000000000000000', - data: '0x0000000000000000000000000000000000000000000000000000000000000001', - value: 0, - }, - }, - ]), - - operation: OperationType.Call, - }; - - const safeTransaction = await safe.createTransaction({ - safeTransactionData, - }); - - const senderAddress = await signer.getAddress(); - const safeTxHash = await safe.getTransactionHash(safeTransaction); - const signature = await safe.signTransactionHash(safeTxHash); - - // Propose transaction to the service - await safeService.proposeTransaction({ - safeAddress: SAFE_ADDRESS, - safeTransactionData: safeTransaction.data, - safeTxHash, - senderAddress, - senderSignature: signature.data, - }); - - console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); - console.log('- safeTxHash:', safeTxHash); - console.log('- Sender:', senderAddress); - console.log('- Sender signature:', signature.data); - - const tx = await safeService.getTransaction(safeTxHash); - console.log('Transaction:', tx); - console.log('Transaction2:', safeTransaction); - - const estimateTx = await safeService.estimateSafeTransaction( - SAFE_ADDRESS, - tx - ); - console.log('estimateTx:', estimateTx); - - const executeTxResponse = await safe.executeTransaction(tx, { - gasLimit: 1000000, - }); - const receipt = await executeTxResponse.transactionResponse?.wait(); - - console.log('Transaction executed:'); - console.log( - `https://optimistic.etherscan.io/tx/${receipt?.transactionHash}` - ); - } catch (e) { - console.log('error', e); - } - }; - return { createAttestation }; -} const Attestations = (): JSX.Element => { const { periodId } = useParams(); @@ -165,7 +39,7 @@ const Attestations = (): JSX.Element => { className="object-contain w-16" /> - {period?.attestationsTxHash && ( + {!period?.attestationsTxHash && (
No attestations have yet been created for this period.
)} setDialogOpen(true)} /> @@ -188,3 +62,113 @@ const Attestations = (): JSX.Element => { // eslint-disable-next-line import/no-default-export export default Attestations; + +// function useAttestations(): UseAttestationsReturn { +// const signer = useSigner(10); +// const eas = new EAS('0x4200000000000000000000000000000000000021'); +// console.log('eas', eas); + +// const createAttestation = async (): Promise => { +// try { +// console.log('createAttestation'); +// console.log('signer', signer); +// if (!signer) { +// return; +// } + +// // // Create EthAdapter instance +// const ethAdapter = new EthersAdapter({ +// ethers, +// signerOrProvider: signer, +// }); + +// // // Create Safe instance +// const safe = await Safe.create({ +// ethAdapter, +// safeAddress: SAFE_ADDRESS, +// }); + +// // Create Safe API Kit instance +// const safeService = new SafeApiKit({ +// txServiceUrl: 'https://safe-transaction-optimism.safe.global', +// ethAdapter, +// }); + +// // Create transaction +// // const safeTransactionData: SafeTransactionDataPartial = { +// // to: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', +// // value: '1', // 1 wei +// // data: '0x', +// // operation: OperationType.Call, +// // }; + +// // Create transaction +// const safeTransactionData: SafeTransactionDataPartial = { +// to: eas.contract.address, +// value: '0', // 1 wei +// data: eas.contract.interface.encodeFunctionData('attest', [ +// { +// schema: +// '0x85500e806cf1e74844d51a20a6d893fe1ed6f6b0738b50e43d774827d08eca61', +// data: { +// recipient: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', +// expirationTime: 0, +// revocable: false, +// refUID: +// '0x0000000000000000000000000000000000000000000000000000000000000000', +// data: '0x0000000000000000000000000000000000000000000000000000000000000001', +// value: 0, +// }, +// }, +// ]), + +// operation: OperationType.Call, +// }; + +// const safeTransaction = await safe.createTransaction({ +// safeTransactionData, +// }); + +// const senderAddress = await signer.getAddress(); +// const safeTxHash = await safe.getTransactionHash(safeTransaction); +// const signature = await safe.signTransactionHash(safeTxHash); + +// // Propose transaction to the service +// await safeService.proposeTransaction({ +// safeAddress: SAFE_ADDRESS, +// safeTransactionData: safeTransaction.data, +// safeTxHash, +// senderAddress, +// senderSignature: signature.data, +// }); + +// console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); +// console.log('- safeTxHash:', safeTxHash); +// console.log('- Sender:', senderAddress); +// console.log('- Sender signature:', signature.data); + +// const tx = await safeService.getTransaction(safeTxHash); +// console.log('Transaction:', tx); +// console.log('Transaction2:', safeTransaction); + +// const estimateTx = await safeService.estimateSafeTransaction( +// SAFE_ADDRESS, +// tx +// ); +// console.log('estimateTx:', estimateTx); + +// const executeTxResponse = await safe.executeTransaction(tx, { +// gasLimit: 1000000, +// }); +// const receipt = await executeTxResponse.transactionResponse?.wait(); + +// console.log('Transaction executed:'); +// console.log( +// `https://optimistic.etherscan.io/tx/${receipt?.transactionHash}` +// ); +// } catch (e) { +// console.log('error', e); +// } +// }; +// return { createAttestation }; +// } From 6aa57d4439f57e32634ca32bbebc8906ca55a413 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:21:04 +0200 Subject: [PATCH 19/63] Move useSigner to eth folder --- packages/frontend/src/model/{ethers => eth}/hooks/useSigner.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/frontend/src/model/{ethers => eth}/hooks/useSigner.ts (100%) diff --git a/packages/frontend/src/model/ethers/hooks/useSigner.ts b/packages/frontend/src/model/eth/hooks/useSigner.ts similarity index 100% rename from packages/frontend/src/model/ethers/hooks/useSigner.ts rename to packages/frontend/src/model/eth/hooks/useSigner.ts From 01e33ed3e4b7b75b4b74cd4ab02cca199e352c95 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:21:29 +0200 Subject: [PATCH 20/63] Format report fields --- .../Reports/components/presentations/ReportsTable.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/frontend/src/pages/Reports/components/presentations/ReportsTable.tsx b/packages/frontend/src/pages/Reports/components/presentations/ReportsTable.tsx index 143a3f0e6..cb9ea2481 100644 --- a/packages/frontend/src/pages/Reports/components/presentations/ReportsTable.tsx +++ b/packages/frontend/src/pages/Reports/components/presentations/ReportsTable.tsx @@ -8,6 +8,13 @@ type ReportsTableProps = { data: row[]; }; +function formatValue(value: unknown): string { + if (typeof value === 'boolean') return value ? 'true' : 'false'; + if (typeof value === 'number') return value.toLocaleString(); + if (typeof value === 'string') return value; + return ''; +} + export const ReportsTable = ({ data }: ReportsTableProps): JSX.Element => { const columns = React.useMemo( () => @@ -15,6 +22,10 @@ export const ReportsTable = ({ data }: ReportsTableProps): JSX.Element => { Header: key, accessor: key, className: 'px-5 text-left', + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Cell: (data: any): JSX.Element => { + return
{formatValue(data.value)}
; + }, })), [data] ); From 471a5cf96bba069b7efc3a647236b0aaba8057ec Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:21:41 +0200 Subject: [PATCH 21/63] UI fix --- .../Settings/components/ApplicationSettingsApiKeyForm.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/pages/Settings/components/ApplicationSettingsApiKeyForm.tsx b/packages/frontend/src/pages/Settings/components/ApplicationSettingsApiKeyForm.tsx index 4948e4d0f..5e39889a3 100644 --- a/packages/frontend/src/pages/Settings/components/ApplicationSettingsApiKeyForm.tsx +++ b/packages/frontend/src/pages/Settings/components/ApplicationSettingsApiKeyForm.tsx @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-misused-promises */ import { - faSpinner, faKey, faTimes, faCheck, + faPrayingHands, } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Dialog } from '@headlessui/react'; @@ -115,9 +115,8 @@ const ApplicationSettingsApiKeyForm = ({ disabled={loading} > {loading ? 'Saving' : 'Save'} From 3af30eb73a6f7756d3085d67d27eb6a858bf55e2 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:22:19 +0200 Subject: [PATCH 22/63] New icon --- .../frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx index 00439be3e..ec17fa723 100644 --- a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx +++ b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx @@ -17,6 +17,7 @@ import { faBalanceScaleLeft, faCog, faChartBar, + faReceipt, } from '@fortawesome/free-solid-svg-icons'; import React, { Suspense } from 'react'; import { @@ -121,7 +122,7 @@ export const PeriodDetailsPage = (): JSX.Element | null => { From 1b8fad3894564a740c06ecb574f6c9a1c5ce4e20 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:22:32 +0200 Subject: [PATCH 23/63] USe constants --- packages/frontend/src/model/safe/hooks/useSafe.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/frontend/src/model/safe/hooks/useSafe.ts b/packages/frontend/src/model/safe/hooks/useSafe.ts index 71ccfa03e..9f64b41fa 100644 --- a/packages/frontend/src/model/safe/hooks/useSafe.ts +++ b/packages/frontend/src/model/safe/hooks/useSafe.ts @@ -1,13 +1,10 @@ -import { useSigner } from '../../ethers/hooks/useSigner'; +import { useSigner } from '../../eth/hooks/useSigner'; import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; import { useEffect, useState } from 'react'; import { ethers } from 'ethers'; import SafeApiKit from '@safe-global/api-kit'; - -// These constants might later be replaced with community settings, allowing -// each community to select which chain etc. to use. -const CHAIN_ID = 10; // Optimism -const SAFE_TX_SERVICE_URL = 'https://safe-transaction-optimism.safe.global'; +import { ETH_CHAIN_ID } from '../../eth/eth.constants'; +import { SAFE_TX_SERVICE_URL } from '../safe.constants'; type useSafeReturn = { ethersAdapter: EthersAdapter | undefined; @@ -16,7 +13,7 @@ type useSafeReturn = { }; export function useSafe(safeAddress: string | undefined): useSafeReturn { - const signer = useSigner(CHAIN_ID); + const signer = useSigner(ETH_CHAIN_ID); const [ethersAdapter, setEthersAdapter] = useState( undefined ); From 70a0ea0d5c02f597e507c8465a83f9c27a78ca09 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 00:22:45 +0200 Subject: [PATCH 24/63] AttestationDialog WIP --- .../components/CreateAttestationsButton.tsx | 36 ++- .../components/CreateAttestationsDialog.tsx | 229 ++++++++---------- .../components/GenerateAttestationsData.tsx | 79 ++++++ 3 files changed, 206 insertions(+), 138 deletions(-) create mode 100644 packages/frontend/src/pages/PeriodDetails/components/GenerateAttestationsData.tsx diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index cde736621..c2d7944c8 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -6,6 +6,9 @@ import { useParams } from 'react-router-dom'; import { CommunityByHostname } from '../../../model/communitites/communities'; import { useSafe } from '../../../model/safe/hooks/useSafe'; import { useEffect, useState } from 'react'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faPrayingHands } from '@fortawesome/free-solid-svg-icons'; +import { ActiveUserId } from '../../../model/auth/auth'; type CreateAttestationsButtonProps = { onClick: () => void; @@ -20,8 +23,9 @@ export function CreateAttestationsButton({ CommunityByHostname(window.location.hostname) ); const { address } = useAccount(); + const userId = useRecoilValue(ActiveUserId); const { safe } = useSafe(community?.creator); - const [isOwner, setIsOwner] = useState(false); + const [isOwner, setIsOwner] = useState(undefined); useEffect(() => { if (!safe || !address) return; @@ -31,16 +35,28 @@ export function CreateAttestationsButton({ void isOwner(); }, [safe, address]); - // Not connected: return null - // No period: return null - // Attestations already created: return null - if (!address || !period || period.attestationsTxHash || !isOwner) { + if (!address || !userId || !period || period.attestationsTxHash) { return null; } - return ( -
- -
- ); + if (address && typeof isOwner === 'undefined') { + return ( +
+ +
+ ); + } + + if (isOwner) { + return ( +
+ +
+ ); + } + + return
Only Safe owners can create attestations.
; } diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx index 6ab0743e7..a279f9193 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx @@ -1,118 +1,29 @@ -import { faTimes, faUsers } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Dialog } from '@headlessui/react'; -import React, { useEffect, useState } from 'react'; -import { Button } from '@/components/ui/Button'; -import { useReport } from '../../../model/report/hooks/use-report.hook'; +import { useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; -import { AllPeriods, PeriodPageParams } from '../../../model/periods/periods'; import { useRecoilValue } from 'recoil'; +import { Dialog } from '@headlessui/react'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { + faPrayingHands, + faReceipt, + faTimes, +} from '@fortawesome/free-solid-svg-icons'; +import { Button } from '@/components/ui/Button'; +import { useSafe } from '../../../model/safe/hooks/useSafe'; +import { useAttestations } from '../../../model/eas/hooks/useAttestations'; import { getPeriodDatesConfig, PeriodDates, } from '../../../model/report/util/get-period-dates-config'; -import { ReportManifestDto } from '../../../model/report/dto/report-manifest.dto'; +import { AllPeriods, PeriodPageParams } from '../../../model/periods/periods'; +import { CommunityByHostname } from '../../../model/communitites/communities'; import { useReportRunReturn } from '../../../model/report/types/use-report-run-return.type'; -import { set } from 'lodash'; -import { AllReports } from '../../../model/report/reports'; - -type GenerateAttestationsDataProps = { - periodId: string; - periodDates: PeriodDates; - manifestUrl: string; - done: (result: useReportRunReturn | undefined) => void; -}; - -// type AttestationsData = { -// manifest: ReportManifestDto; -// result: useReportRunReturn | undefined; -// }; - -// function GenerateAttestationsData({ -// periodId, -// periodDates, -// }: GenerateAttestationsDataProps): JSX.Element { -// const [data, setData] = useState>( -// new Map() -// ); -// const [running, setRunning] = useState(false); - -// const report = useReport({ -// manifestUrl: -// 'https://raw.githubusercontent.com/givepraise/reports/main/reports/top-givers/manifest.json', -// periodId, -// startDate: periodDates.startDate, -// endDate: periodDates.endDate, -// }); - -// useEffect(() => { -// if (!report.ready || running) return; - -// setRunning(true); - -// console.log('running report', report); -// data.set(report.manifest.name, undefined); -// setData(data); - -// const runReport = async (): Promise => { -// const result = await report.run({ format: 'json' }); -// data.set(report.manifest.name, result); -// setData(data); -// console.log(result); -// }; -// void runReport(); -// }, [report, data, running]); - -// return ( -//
-// Genweerating... -//
-//         {data
-//           ? Array.from(
-//               data,
-//               ([key, value]) => `${key}: ${value?.rows.length}`
-//             ).join(', ')
-//           : '...'}
-//       
-//
-// ); -// } - -function GenerateAttestationsData({ - periodId, - periodDates, - manifestUrl, - done, -}: GenerateAttestationsDataProps): JSX.Element { - const report = useReport({ - manifestUrl, - periodId, - startDate: periodDates.startDate, - endDate: periodDates.endDate, - }); - const [data, setData] = useState(undefined); - - useEffect(() => { - if (!report.ready || data) return; - console.log('running report', report); - const runReport = async (): Promise => { - const result = await report.run({ format: 'json' }); - setData(result); - done(result); - }; - void runReport(); - }, [report, data, done]); - - if (!report.ready) return
loading...
; - - if (!data) return
running...
; +import { ATTESTATION_REPORT_MANIFEST_URL } from '../../../model/eas/eas.constants'; +import { GenerateAttestationsData } from './GenerateAttestationsData'; - return
{data.rows.length}
; -} - -interface CreateAttestationsDialogProps { +type CreateAttestationsDialogProps = { onClose(): void; -} +}; export function CreateAttestationsDialog({ onClose, @@ -122,19 +33,44 @@ export function CreateAttestationsDialog({ const [periodDates, setPeriodDates] = useState( undefined ); - const reports = useRecoilValue(AllReports); + const community = useRecoilValue( + CommunityByHostname(window.location.hostname) + ); + const { safe } = useSafe(community?.creator); + const [owners, setOwners] = useState([]); + const [treshold, setTreshold] = useState(0); + const [attestationData, setAttestationData] = useState< + useReportRunReturn | undefined + >(undefined); + const { createAttestations, creating } = useAttestations({ + hostname: window.location.hostname, + }); - useEffect(() => { + function loadPeriodDates(): void { if (!periods) return; setPeriodDates(getPeriodDatesConfig(periods, periodId)); - }, [periods, periodId]); + } + + function loadSignersAndThreshold(): void { + if (!safe) return; + const loadSigners = async (): Promise => { + const owners = await safe.getOwners(); + const treshold = await safe.getThreshold(); + setOwners(owners); + setTreshold(treshold); + }; + void loadSigners(); + } + + useEffect(loadPeriodDates, [periods, periodId]); + useEffect(loadSignersAndThreshold, [safe]); if (!periodDates) return null; return (
-
+
- +
+ Create Attestations -
- Generating... -
-                {reports?.map((report) => (
-                   {
-                      console.log('done', result);
-                    }}
-                  />
-                ))}
-              
-
- content + +
+
+ { + if (!result) return; + setAttestationData(result); + }} + /> +
+ + {attestationData && ( + <> +
+ This transaction requires the signature of: +
+ {treshold} out of{' '} + {owners.length} owners. +
+
+ Submit to create and sign this transaction. +
+ + )} +
+ + +
+
diff --git a/packages/frontend/src/pages/PeriodDetails/components/GenerateAttestationsData.tsx b/packages/frontend/src/pages/PeriodDetails/components/GenerateAttestationsData.tsx new file mode 100644 index 000000000..d4fc70713 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/GenerateAttestationsData.tsx @@ -0,0 +1,79 @@ +import { + faCheckCircle, + faExternalLink, + faPrayingHands, +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { useEffect, useState } from 'react'; +import { useReport } from '../../../model/report/hooks/use-report.hook'; +import { PeriodDates } from '../../../model/report/util/get-period-dates-config'; +import { useReportRunReturn } from '../../../model/report/types/use-report-run-return.type'; +import { objectToQs } from '../../../utils/querystring'; +import { Link } from 'react-router-dom'; + +type GenerateAttestationsDataProps = { + periodId: string; + periodDates: PeriodDates; + manifestUrl: string; + done: (result: useReportRunReturn | undefined) => void; +}; + +export function GenerateAttestationsData({ + periodId, + periodDates, + manifestUrl, + done, +}: GenerateAttestationsDataProps): JSX.Element { + const report = useReport({ + manifestUrl, + periodId, + startDate: periodDates.startDate, + endDate: periodDates.endDate, + }); + const [data, setData] = useState(undefined); + + useEffect(() => { + if (!report.ready || data) return; + const runReport = async (): Promise => { + const result = await report.run({ format: 'json' }); + setData(result); + done(result); + }; + void runReport(); + }, [report, data, done]); + + if (!report.ready) + return ( + <> + +
Loading attestation report…
+ + ); + + if (!data) + return ( + <> + +
Running attestation report…
+ + ); + + const reportUrl = `/reports/run?${objectToQs({ + manifestUrl, + startDate: periodDates.startDate, + endDate: periodDates.endDate, + })}`; + + return ( + <> + +
+ Finished generating attestation data.{' '} + + + +
+
{data.rows.length} rows returned.
+ + ); +} From 3ceb3754f731f1f4cb45ebb0ca0ba06672181a15 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 09:45:32 +0200 Subject: [PATCH 25/63] Show attestations button only on correct chain --- .../src/pages/PeriodDetails/components/Attestations.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index a5c7f8d04..682f7d471 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -5,12 +5,15 @@ import { CreateAttestationsButton } from './CreateAttestationsButton'; import { CreateAttestationsDialog } from './CreateAttestationsDialog'; import { useRef, useState } from 'react'; import { Dialog } from '@headlessui/react'; +import { useNetwork } from 'wagmi'; +import { ETH_CHAIN_ID } from '../../../model/eth/eth.constants'; const Attestations = (): JSX.Element => { const { periodId } = useParams(); const period = useRecoilValue(SinglePeriod(periodId)); const dialogRef = useRef(null); const [dialogOpen, setDialogOpen] = useState(false); + const { chain } = useNetwork(); if (period?.status !== 'CLOSED') { return ( @@ -39,10 +42,14 @@ const Attestations = (): JSX.Element => { className="object-contain w-16" />
+ {!period?.attestationsTxHash && (
No attestations have yet been created for this period.
)} - setDialogOpen(true)} /> + + {chain?.id === ETH_CHAIN_ID && ( + setDialogOpen(true)} /> + )} Date: Fri, 4 Aug 2023 10:52:58 +0200 Subject: [PATCH 26/63] Allow period.attestationsTxHash to be updated --- packages/api-types/out/schema.ts | 4 +++- packages/api/openapi.json | 2 +- .../api/src/periods/dto/update-period-input.dto.ts | 13 ++++++++++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index ec6ca26fd..2752066af 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -476,7 +476,9 @@ export interface components { UpdatePeriodInputDto: { /** @example June 2021 */ name?: string; - endDate?: string; + /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ + attestationsTxHash?: string; + endDate: string; }; UserAccountWithUserRefDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ diff --git a/packages/api/openapi.json b/packages/api/openapi.json index 1fb51750a..d44e31465 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}},"required":["endDate"]},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/periods/dto/update-period-input.dto.ts b/packages/api/src/periods/dto/update-period-input.dto.ts index 39211e218..1707aeac7 100644 --- a/packages/api/src/periods/dto/update-period-input.dto.ts +++ b/packages/api/src/periods/dto/update-period-input.dto.ts @@ -1,4 +1,11 @@ -import { PartialType } from '@nestjs/swagger'; -import { CreatePeriodInputDto } from './create-period-input.dto'; +import { ApiProperty, PartialType, PickType } from '@nestjs/swagger'; +import { Period } from '../schemas/periods.schema'; +import { IsDateString } from 'class-validator'; -export class UpdatePeriodInputDto extends PartialType(CreatePeriodInputDto) {} +export class UpdatePeriodInputDto extends PartialType( + PickType(Period, ['name', 'attestationsTxHash'] as const), +) { + @ApiProperty({ type: 'string' }) + @IsDateString() + endDate: string; +} From fc228932b7f9675a419ff8be61de23fa09ed44f0 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 11:06:37 +0200 Subject: [PATCH 27/63] Make endDate optional --- packages/api-types/out/schema.ts | 2 +- packages/api/openapi.json | 2 +- packages/api/src/periods/dto/update-period-input.dto.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 2752066af..4351416aa 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -478,7 +478,7 @@ export interface components { name?: string; /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ attestationsTxHash?: string; - endDate: string; + endDate?: string; }; UserAccountWithUserRefDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ diff --git a/packages/api/openapi.json b/packages/api/openapi.json index d44e31465..c819f2e67 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}},"required":["endDate"]},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/periods/dto/update-period-input.dto.ts b/packages/api/src/periods/dto/update-period-input.dto.ts index 1707aeac7..ad3bca8c9 100644 --- a/packages/api/src/periods/dto/update-period-input.dto.ts +++ b/packages/api/src/periods/dto/update-period-input.dto.ts @@ -5,7 +5,7 @@ import { IsDateString } from 'class-validator'; export class UpdatePeriodInputDto extends PartialType( PickType(Period, ['name', 'attestationsTxHash'] as const), ) { - @ApiProperty({ type: 'string' }) + @ApiProperty({ type: 'string', required: false }) @IsDateString() - endDate: string; + endDate?: string; } From 2187c0b11e35cc3c40aef891d1255e0475c663d0 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 11:23:07 +0200 Subject: [PATCH 28/63] Add attestationsTxHash handling to period/PUT --- .../api/src/periods/dto/update-period-input.dto.ts | 3 ++- packages/api/src/periods/services/periods.service.ts | 12 ++++++++++-- packages/api/src/shared/exceptions/error-messages.ts | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/api/src/periods/dto/update-period-input.dto.ts b/packages/api/src/periods/dto/update-period-input.dto.ts index ad3bca8c9..da5415e1a 100644 --- a/packages/api/src/periods/dto/update-period-input.dto.ts +++ b/packages/api/src/periods/dto/update-period-input.dto.ts @@ -1,11 +1,12 @@ import { ApiProperty, PartialType, PickType } from '@nestjs/swagger'; import { Period } from '../schemas/periods.schema'; -import { IsDateString } from 'class-validator'; +import { IsDateString, IsOptional } from 'class-validator'; export class UpdatePeriodInputDto extends PartialType( PickType(Period, ['name', 'attestationsTxHash'] as const), ) { @ApiProperty({ type: 'string', required: false }) @IsDateString() + @IsOptional() endDate?: string; } diff --git a/packages/api/src/periods/services/periods.service.ts b/packages/api/src/periods/services/periods.service.ts index ff7acc1c9..64040487f 100644 --- a/packages/api/src/periods/services/periods.service.ts +++ b/packages/api/src/periods/services/periods.service.ts @@ -168,9 +168,9 @@ export class PeriodsService { const period = await this.periodModel.findById(_id); if (!period) throw new ApiException(errorMessages.PERIOD_NOT_FOUND); - const { name, endDate } = data; + const { name, endDate, attestationsTxHash } = data; - if (!name && !endDate) + if (!name && !endDate && !attestationsTxHash) throw new ApiException( errorMessages.UPDATE_PERIOD_NAME_OR_END_DATE_MUST_BE_SPECIFIED, ); @@ -206,6 +206,14 @@ export class PeriodsService { period.endDate = newEndDate; } + if (attestationsTxHash) { + eventLogMessages.push( + `Updated the transaction hash of period "${period.name}" to "${attestationsTxHash}"`, + ); + + period.attestationsTxHash = attestationsTxHash; + } + await period.save(); logger.info(eventLogMessages.join(', ')); diff --git a/packages/api/src/shared/exceptions/error-messages.ts b/packages/api/src/shared/exceptions/error-messages.ts index 7ab5d7681..6f59d5fa1 100644 --- a/packages/api/src/shared/exceptions/error-messages.ts +++ b/packages/api/src/shared/exceptions/error-messages.ts @@ -73,8 +73,8 @@ export const errorMessages: { [key: string]: ErrorMessage } = { httpStatusCode: 500, code: 1013, }, - UPDATE_PERIOD_NAME_OR_END_DATE_MUST_BE_SPECIFIED: { - message: 'Updated name or endDate to must be specified', + UPDATE_PERIOD_SOME_PROP_MUST_BE_SPECIFIED: { + message: 'At least one property must be specified', httpStatusCode: 400, code: 1013, }, From 4f9699f59c4c7875c45fad28a95e380baab37620 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 13:43:57 +0200 Subject: [PATCH 29/63] Include txHash and signature in return --- .../src/model/eas/hooks/useAttestations.ts | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/model/eas/hooks/useAttestations.ts b/packages/frontend/src/model/eas/hooks/useAttestations.ts index 9f1d89ec4..4a622e322 100644 --- a/packages/frontend/src/model/eas/hooks/useAttestations.ts +++ b/packages/frontend/src/model/eas/hooks/useAttestations.ts @@ -3,6 +3,7 @@ import { MetaTransactionData, SafeTransactionDataPartial, OperationType, + SafeSignature, } from '@safe-global/safe-core-sdk-types'; import { useState } from 'react'; import toast from 'react-hot-toast'; @@ -28,6 +29,8 @@ type UseAttestationsInput = { type UseAttestationsReturn = { creating: boolean | undefined; + txHash: string | undefined; + signature: SafeSignature | undefined; createAttestations: ( data: useReportRunReturn, period: string @@ -60,6 +63,10 @@ export function useAttestations({ }; const [creating, setCreating] = useState(undefined); + const [txHash, setTxHash] = useState(undefined); + const [signature, setSignature] = useState( + undefined + ); const createAttestations = async ( data: useReportRunReturn, @@ -158,23 +165,26 @@ export function useAttestations({ }, }); - const senderAddress = await signer.getAddress(); - const safeTxHash = await safe.getTransactionHash(safeTransaction); - const signature = await safe.signTransactionHash(safeTxHash); + const signerAddress = await signer.getAddress(); + const txHash = await safe.getTransactionHash(safeTransaction); + const signature = await safe.signTransactionHash(txHash); // Propose transaction to the service await safeApiKit.proposeTransaction({ safeAddress: SAFE_ADDRESS, safeTransactionData: safeTransaction.data, - safeTxHash, - senderAddress, + safeTxHash: txHash, + senderAddress: signerAddress, senderSignature: signature.data, }); console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); - console.log('- safeTxHash:', safeTxHash); - console.log('- Sender:', senderAddress); - console.log('- Sender signature:', signature.data); + console.log('- Transaction hash:', txHash); + console.log('- Signer address:', signerAddress); + console.log('- Signature:', signature.data); + + setTxHash(txHash); + setSignature(signature); } catch (e) { console.error('Error creating attestations', e); toast.error((e as Error).message); @@ -182,5 +192,11 @@ export function useAttestations({ setCreating(false); } }; - return { creating, createAttestations, isOwnerValidSafeAddress }; + return { + creating, + txHash, + signature, + createAttestations, + isOwnerValidSafeAddress, + }; } From 55c0c4027e802139962835890bca87f4ccbec691 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 13:44:33 +0200 Subject: [PATCH 30/63] Update period when transaction signed --- .../components/CreateAttestationsDialog.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx index a279f9193..0a72b5d91 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx @@ -15,7 +15,11 @@ import { getPeriodDatesConfig, PeriodDates, } from '../../../model/report/util/get-period-dates-config'; -import { AllPeriods, PeriodPageParams } from '../../../model/periods/periods'; +import { + AllPeriods, + PeriodPageParams, + useUpdatePeriod, +} from '../../../model/periods/periods'; import { CommunityByHostname } from '../../../model/communitites/communities'; import { useReportRunReturn } from '../../../model/report/types/use-report-run-return.type'; import { ATTESTATION_REPORT_MANIFEST_URL } from '../../../model/eas/eas.constants'; @@ -42,7 +46,7 @@ export function CreateAttestationsDialog({ const [attestationData, setAttestationData] = useState< useReportRunReturn | undefined >(undefined); - const { createAttestations, creating } = useAttestations({ + const { createAttestations, creating, txHash } = useAttestations({ hostname: window.location.hostname, }); @@ -62,8 +66,16 @@ export function CreateAttestationsDialog({ void loadSigners(); } + const { updatePeriod } = useUpdatePeriod(); + function saveTransactionHash(): void { + if (!txHash) return; + void updatePeriod(periodId, { attestationsTxHash: txHash }); + onClose(); + } + useEffect(loadPeriodDates, [periods, periodId]); useEffect(loadSignersAndThreshold, [safe]); + useEffect(saveTransactionHash, [txHash, periodId, updatePeriod, onClose]); if (!periodDates) return null; From c5c717330ae9ccedb2ce196b790ce49f56d07d40 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Fri, 4 Aug 2023 13:44:41 +0200 Subject: [PATCH 31/63] AttestationsDetailBox WIP --- .../PeriodDetails/components/Attestations.tsx | 9 +++ .../components/AttestationsDetailBox.tsx | 62 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 682f7d471..bfe659c35 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -3,6 +3,7 @@ import { useParams } from 'react-router-dom'; import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; import { CreateAttestationsButton } from './CreateAttestationsButton'; import { CreateAttestationsDialog } from './CreateAttestationsDialog'; +import { AttestationsDetailBox } from './AttestationsDetailBox'; import { useRef, useState } from 'react'; import { Dialog } from '@headlessui/react'; import { useNetwork } from 'wagmi'; @@ -50,6 +51,14 @@ const Attestations = (): JSX.Element => { {chain?.id === ETH_CHAIN_ID && ( setDialogOpen(true)} /> )} + + {period?.attestationsTxHash && chain?.id === ETH_CHAIN_ID && ( + + )} + + {period?.attestationsTxHash && chain?.id !== ETH_CHAIN_ID && ( +
Connect to Optimism to view attestation information.
+ )} (); + const period = useRecoilValue(SinglePeriod(periodId)); + const community = useRecoilValue( + CommunityByHostname(window.location.hostname) + ); + const SAFE_ADDRESS = community?.creator; + + const { chain } = useNetwork(); + const { safeApiKit } = useSafe(SAFE_ADDRESS); + + const [safeMultisigTransactionResponse, setSafeMultisigTransactionResponse] = + useState(undefined); + + function loadTransaction(): void { + if (!safeApiKit || !period?.attestationsTxHash) return; + const loadTransaction = async (): Promise => + setSafeMultisigTransactionResponse( + await safeApiKit.getTransaction(period.attestationsTxHash) + ); + void loadTransaction(); + } + + useEffect(loadTransaction, [safeApiKit, period]); + + return ( +
+
Attestation data generated
+
Transaction created
+
Link to report
+
Transaction hash
+ +
+ {safeMultisigTransactionResponse?.confirmations?.map((c) => ( +
{c.owner}
+ ))} +
+
+ ); +} From af216c6ab14b852f53cf8bb1c84fe240e79839c6 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Sun, 6 Aug 2023 23:41:28 +0200 Subject: [PATCH 32/63] Add startDate to period API responses --- packages/api-types/out/schema.ts | 4 ++++ packages/api/openapi.json | 2 +- .../api/src/periods/schemas/periods.schema.ts | 3 +++ .../src/periods/services/periods.service.ts | 19 ++++++++++++++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 4351416aa..f518de5a1 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -352,6 +352,8 @@ export interface components { /** @enum {string} */ status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ + startDate: string; + /** Format: date-time */ endDate: string; /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ attestationsTxHash: string; @@ -455,6 +457,8 @@ export interface components { /** @enum {string} */ status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ + startDate: string; + /** Format: date-time */ endDate: string; /** @example 0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c */ attestationsTxHash: string; diff --git a/packages/api/openapi.json b/packages/api/openapi.json index c819f2e67..0628b82b0 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1 +1 @@ -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/api/src/periods/schemas/periods.schema.ts b/packages/api/src/periods/schemas/periods.schema.ts index c42d4d6f5..12380e7da 100644 --- a/packages/api/src/periods/schemas/periods.schema.ts +++ b/packages/api/src/periods/schemas/periods.schema.ts @@ -34,6 +34,9 @@ export class Period { }) status: PeriodStatusType; + @ApiResponseProperty() + startDate?: Date; + @ApiResponseProperty() @Prop({ required: true, diff --git a/packages/api/src/periods/services/periods.service.ts b/packages/api/src/periods/services/periods.service.ts index 64040487f..bf50be0f7 100644 --- a/packages/api/src/periods/services/periods.service.ts +++ b/packages/api/src/periods/services/periods.service.ts @@ -27,6 +27,7 @@ import { UserAccount, UserAccountSchema, } from '../../useraccounts/schemas/useraccounts.schema'; +import { forEach } from 'lodash'; @Injectable({ scope: Scope.REQUEST }) export class PeriodsService { @@ -66,7 +67,7 @@ export class PeriodsService { options: PaginatedQueryDto, ): Promise { const { - sortColumn = 'createdAt', + sortColumn = 'endDate', sortType = 'desc', page = 1, limit = 100, @@ -77,11 +78,26 @@ export class PeriodsService { page, limit, sort: sortColumn && sortType ? { [sortColumn]: sortType } : undefined, + lean: true, }); if (!periodPagination) throw new ApiException(errorMessages.FAILED_TO_PAGINATE_PERIOD_DATA); + const periods = periodPagination.docs; + + // Sort the periods by endDate in ascending order + periods.sort((a, b) => a.endDate.getTime() - b.endDate.getTime()); + + // Iterate through the periods and set the startDate based on the previous period's endDate + for (let i = 1; i < periods.length; i++) { + periods[i].startDate = periods[i - 1].endDate; + } + + // Set the startDate for the first period, if needed + if (periods.length > 0 && !periods[0].startDate) { + periods[0].startDate = new Date('2000-01-01T00:00:00.000Z'); + } return periodPagination; } @@ -422,6 +438,7 @@ export class PeriodsService { const periodDetails = { ...period, + startDate: previousPeriodEndDate, numberOfPraise, receivers, givers, From 45061e6bdf1e3fcabaeb1f6516892b01ccb57a46 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Mon, 7 Aug 2023 17:35:14 +0200 Subject: [PATCH 33/63] SafeProvider and hooks --- packages/frontend/src/index.tsx | 41 +++---- .../model/safe/components/SafeProvider.tsx | 22 ++++ .../frontend/src/model/safe/hooks/useSafe.ts | 67 ++--------- .../src/model/safe/hooks/useSafeInit.ts | 106 ++++++++++++++++++ .../model/safe/hooks/useSafeTransaction.ts | 99 ++++++++++++++++ .../types/sign-safe-transaction-state.type.ts | 4 + .../src/model/safe/types/use-safe-return.ts | 12 ++ 7 files changed, 275 insertions(+), 76 deletions(-) create mode 100644 packages/frontend/src/model/safe/components/SafeProvider.tsx create mode 100644 packages/frontend/src/model/safe/hooks/useSafeInit.ts create mode 100644 packages/frontend/src/model/safe/hooks/useSafeTransaction.ts create mode 100644 packages/frontend/src/model/safe/types/sign-safe-transaction-state.type.ts create mode 100644 packages/frontend/src/model/safe/types/use-safe-return.ts diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index dee0f77c9..b394ae132 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -15,6 +15,7 @@ import { AwaitMetamaskInit } from './components/AwaitMetaMaskInit'; import { LightDarkTheme } from './components/LightDarkTheme'; import { ErrorBoundaryTopLevel } from './components/ErrorBoundaryTopLevel'; import PlausibleAnalytics from '@/components/PlausibleAnalytics'; +import { SafeProvider } from './model/safe/components/SafeProvider'; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const root = createRoot(document.getElementById('root')!); @@ -23,25 +24,27 @@ root.render( - -
- - - }> - - - - - - - - -
-
+ + +
+ + + }> + + + + + + + + +
+
+
diff --git a/packages/frontend/src/model/safe/components/SafeProvider.tsx b/packages/frontend/src/model/safe/components/SafeProvider.tsx new file mode 100644 index 000000000..e7aeaab2b --- /dev/null +++ b/packages/frontend/src/model/safe/components/SafeProvider.tsx @@ -0,0 +1,22 @@ +import React, { ReactNode } from 'react'; +import { UseSafeReturn } from '../types/use-safe-return'; +import { useSafeInit } from '../hooks/useSafeInit'; + +// Define the context shape +type SafeContextType = UseSafeReturn | undefined; + +export const SafeContext = React.createContext(undefined); + +type SafeProviderProps = { + children: ReactNode; +}; + +export const SafeProvider: React.FC = ({ + children, +}: SafeProviderProps) => { + const safeData = useSafeInit(); + + return ( + {children} + ); +}; diff --git a/packages/frontend/src/model/safe/hooks/useSafe.ts b/packages/frontend/src/model/safe/hooks/useSafe.ts index 9f64b41fa..c8f52c15d 100644 --- a/packages/frontend/src/model/safe/hooks/useSafe.ts +++ b/packages/frontend/src/model/safe/hooks/useSafe.ts @@ -1,58 +1,11 @@ -import { useSigner } from '../../eth/hooks/useSigner'; -import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; -import { useEffect, useState } from 'react'; -import { ethers } from 'ethers'; -import SafeApiKit from '@safe-global/api-kit'; -import { ETH_CHAIN_ID } from '../../eth/eth.constants'; -import { SAFE_TX_SERVICE_URL } from '../safe.constants'; - -type useSafeReturn = { - ethersAdapter: EthersAdapter | undefined; - safe: Safe | undefined; - safeApiKit: SafeApiKit | undefined; -}; - -export function useSafe(safeAddress: string | undefined): useSafeReturn { - const signer = useSigner(ETH_CHAIN_ID); - const [ethersAdapter, setEthersAdapter] = useState( - undefined - ); - const [safe, setSafe] = useState(undefined); - const [safeApiKit, setSafeApiKit] = useState( - undefined - ); - - useEffect(() => { - if (!signer) return; - setEthersAdapter( - new EthersAdapter({ - ethers, - signerOrProvider: signer, - }) - ); - }, [signer]); - - useEffect(() => { - if (!ethersAdapter || !safeAddress) return; - const createSafe = async (): Promise => { - const safe = await Safe.create({ - ethAdapter: ethersAdapter, - safeAddress, - }); - setSafe(safe); - }; - void createSafe(); - }, [ethersAdapter, safeAddress]); - - useEffect(() => { - if (!ethersAdapter) return; - setSafeApiKit( - new SafeApiKit({ - txServiceUrl: SAFE_TX_SERVICE_URL, - ethAdapter: ethersAdapter, - }) - ); - }, [ethersAdapter]); - - return { ethersAdapter, safe, safeApiKit }; +import { useContext } from 'react'; +import { UseSafeReturn } from '../types/use-safe-return'; +import { SafeContext } from '../components/SafeProvider'; + +export function useSafe(): UseSafeReturn { + const context = useContext(SafeContext); + if (!context) { + throw new Error('useSafe must be used within a SafeProvider'); + } + return context; } diff --git a/packages/frontend/src/model/safe/hooks/useSafeInit.ts b/packages/frontend/src/model/safe/hooks/useSafeInit.ts new file mode 100644 index 000000000..eb67c1f10 --- /dev/null +++ b/packages/frontend/src/model/safe/hooks/useSafeInit.ts @@ -0,0 +1,106 @@ +// External package imports +import { useEffect, useState } from 'react'; +import { ethers } from 'ethers'; +import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; +import SafeApiKit from '@safe-global/api-kit'; + +// Internal imports +import { useSigner } from '../../eth/hooks/useSigner'; +import { ETH_CHAIN_ID } from '../../eth/eth.constants'; +import { SAFE_TX_SERVICE_URL } from '../safe.constants'; +import { useCommunity } from '../../communitites/hooks/useCommunity'; +import { UseSafeReturn } from '../types/use-safe-return'; + +/** + * Custom hook to interface with the Safe protocol and associated utilities. + * @returns An object containing Safe protocol utilities and information. + */ +export function useSafeInit(): UseSafeReturn { + // Hooks + const { community } = useCommunity(); + const rpcSigner = useSigner(ETH_CHAIN_ID); + + // Local state + const [ethersAdapter, setEthersAdapter] = useState(); + const [safe, setSafe] = useState(); + const [safeApiKit, setSafeApiKit] = useState(); + const [isValidSafeAddress, setIsValidSafeAddress] = useState(); + const [owners, setOwners] = useState([]); + const [threshold, setThreshold] = useState(0); + const SAFE_ADDRESS = community?.creator; + + /** + * Initialize the Ethers adapter. + */ + function initializeEthersAdapter(): void { + if (!rpcSigner) return; + setEthersAdapter( + new EthersAdapter({ + ethers, + signerOrProvider: rpcSigner, + }) + ); + } + + /** + * Create and initialize the Safe instance. + */ + function initializeSafeInstance(): void { + if (!ethersAdapter || !SAFE_ADDRESS) return; + void (async (): Promise => { + const safeInstance = await Safe.create({ + ethAdapter: ethersAdapter, + safeAddress: SAFE_ADDRESS, + }); + setSafe(safeInstance); + })(); + } + + /** + * Initialize the Safe API Kit. + */ + function initializeSafeApiKit(): void { + if (!ethersAdapter || !SAFE_ADDRESS) return; + void (async (): Promise => { + const apiKit = new SafeApiKit({ + txServiceUrl: SAFE_TX_SERVICE_URL, + ethAdapter: ethersAdapter, + }); + setSafeApiKit(apiKit); + try { + await apiKit.getSafeInfo(SAFE_ADDRESS); // Throws if the Safe address is invalid + setIsValidSafeAddress(true); + } catch (e) { + setIsValidSafeAddress(false); + } + })(); + } + + /** + * Load the owners and threshold values. + */ + function loadOwnersAndThreshold(): void { + if (!safe) return; + void (async (): Promise => { + const safeOwners = await safe.getOwners(); + const safeThreshold = await safe.getThreshold(); + setOwners(safeOwners); + setThreshold(safeThreshold); + })(); + } + + useEffect(initializeEthersAdapter, [rpcSigner]); + useEffect(initializeSafeInstance, [ethersAdapter, SAFE_ADDRESS]); + useEffect(initializeSafeApiKit, [ethersAdapter, SAFE_ADDRESS]); + useEffect(loadOwnersAndThreshold, [safe]); + + return { + isValidSafeAddress, + owners, + threshold, + ethersAdapter, + safe, + safeApiKit, + SAFE_ADDRESS, + }; +} diff --git a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts new file mode 100644 index 000000000..0edb1cb26 --- /dev/null +++ b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts @@ -0,0 +1,99 @@ +// External package imports +import { useState, useEffect } from 'react'; +import { SafeMultisigTransactionResponse } from '@safe-global/safe-core-sdk-types'; + +// Internal imports +import { useAccount } from 'wagmi'; +import { atom, useRecoilState } from 'recoil'; +import { SignSafeTransactionStateType } from '../types/sign-safe-transaction-state.type'; +import { useSafe } from './useSafe'; + +const SignSafeTransactionState = atom({ + key: 'SignSafeTransactionState', + default: undefined, +}); + +type UseSafeTransactionProps = { + safeTxHash?: string; +}; + +type UseSafeTransactionReturn = { + transaction?: SafeMultisigTransactionResponse; + moreConfirmationsRequired?: boolean; + mySignatureAwaited?: boolean; + signState?: SignSafeTransactionStateType; + signTransaction?: () => void; +}; + +/** + * Custom hook to interface with Safe transactions. + * @returns An object containing Safe transaction information and utilities. + */ +export function useSafeTransaction({ + safeTxHash, +}: UseSafeTransactionProps): UseSafeTransactionReturn { + // Hooks + const { address: userAddress } = useAccount(); + const { safe, safeApiKit } = useSafe(); + + // Local state + const [transaction, setTransaction] = + useState(); + const [mySignatureAwaited, setMySignatureAwaited] = useState(); + + // Global state + const [signState, setSignState] = useRecoilState(SignSafeTransactionState); + + /** + * Load the Safe transaction details. + */ + function loadTransaction(): void { + if (!safeApiKit || !safeTxHash) return; + void (async (): Promise => { + const tx = await safeApiKit.getTransaction(safeTxHash); + setTransaction(tx); + })(); + } + + function checkIfMySignatureAwaited(): void { + if (!userAddress || !safe) return; + void (async (): Promise => { + const isOwner = await safe.isOwner(userAddress); + setMySignatureAwaited( + isOwner && + !transaction?.confirmations?.find((c) => c.owner === userAddress) + ); + })(); + } + + useEffect(loadTransaction, [safeApiKit, safeTxHash]); + useEffect(checkIfMySignatureAwaited, [userAddress, safe, transaction]); + + const moreConfirmationsRequired = + transaction?.confirmations && + transaction?.confirmationsRequired > 0 && + transaction.confirmations.length < transaction.confirmationsRequired; + + function signTransaction(): void { + if (!safe || !safeTxHash) { + return; + } + void (async (): Promise => { + setSignState({ state: 'signing' }); + try { + await safe.signTransactionHash(safeTxHash); + setSignState({ state: 'signed' }); + } catch (e) { + setSignState({ state: 'error', error: e as Error }); + } + })(); + } + + return { + transaction, + moreConfirmationsRequired, + mySignatureAwaited, + signState, + signTransaction, + }; +} diff --git a/packages/frontend/src/model/safe/types/sign-safe-transaction-state.type.ts b/packages/frontend/src/model/safe/types/sign-safe-transaction-state.type.ts new file mode 100644 index 000000000..3376bf6b9 --- /dev/null +++ b/packages/frontend/src/model/safe/types/sign-safe-transaction-state.type.ts @@ -0,0 +1,4 @@ +export type SignSafeTransactionStateType = { + state: 'signing' | 'signed' | 'error'; + error?: Error; +}; diff --git a/packages/frontend/src/model/safe/types/use-safe-return.ts b/packages/frontend/src/model/safe/types/use-safe-return.ts new file mode 100644 index 000000000..7a0d197e2 --- /dev/null +++ b/packages/frontend/src/model/safe/types/use-safe-return.ts @@ -0,0 +1,12 @@ +import SafeApiKit from '@safe-global/api-kit'; +import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; + +export type UseSafeReturn = { + ethersAdapter?: EthersAdapter; + safe?: Safe; + safeApiKit?: SafeApiKit; + isValidSafeAddress?: boolean; + owners: string[] | undefined[]; + threshold: number; + SAFE_ADDRESS?: string; +}; From a171946fc5b2a52e5cb118b893e8210721805d5d Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Mon, 7 Aug 2023 17:36:19 +0200 Subject: [PATCH 34/63] Attestation details page WIP --- .../src/components/ui/LineListItem.tsx | 59 ++++++++ .../src/components/user/UserAvatarAndName.tsx | 21 ++- .../model/communitites/hooks/useCommunity.ts | 15 ++ .../src/model/eas/hooks/useAttestations.ts | 60 +++----- packages/frontend/src/model/user/users.ts | 16 ++ .../pages/PeriodDetails/PeriodDetailsPage.tsx | 46 +++--- .../PeriodDetails/components/Attestations.tsx | 13 +- .../components/AttestationsDetailBox.tsx | 140 ++++++++++++------ .../PeriodDetails/components/CopyButton.tsx | 23 +++ .../components/CreateAttestationsButton.tsx | 15 +- .../components/CreateAttestationsDialog.tsx | 44 ++---- .../components/SignAttestationsButton.tsx | 32 ++++ .../SignAttestationsButtonContent.tsx | 44 ++++++ 13 files changed, 372 insertions(+), 156 deletions(-) create mode 100644 packages/frontend/src/components/ui/LineListItem.tsx create mode 100644 packages/frontend/src/model/communitites/hooks/useCommunity.ts create mode 100644 packages/frontend/src/pages/PeriodDetails/components/CopyButton.tsx create mode 100644 packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx create mode 100644 packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButtonContent.tsx diff --git a/packages/frontend/src/components/ui/LineListItem.tsx b/packages/frontend/src/components/ui/LineListItem.tsx new file mode 100644 index 000000000..b0e1e08bc --- /dev/null +++ b/packages/frontend/src/components/ui/LineListItem.tsx @@ -0,0 +1,59 @@ +import { + faCheckCircle, + faDotCircle, + faMinusCircle, + faTimesCircle, +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; + +type LineListItemProps = { + children: React.ReactNode; + variant: 'check' | 'minus' | 'cross' | 'dot'; + size?: 'small' | 'medium' | 'large'; + liClassName?: string; +}; + +export function LineListItem({ + children, + variant, + size = 'medium', + liClassName, +}: LineListItemProps): JSX.Element { + const variants = { + check: faCheckCircle, + minus: faMinusCircle, + cross: faTimesCircle, + dot: faDotCircle, + }; + + return ( +
  • +
    + {size === 'small' && ( + + )} + {size === 'medium' && ( + + )} + {size === 'large' && ( + + )} + + {children} +
  • + ); +} diff --git a/packages/frontend/src/components/user/UserAvatarAndName.tsx b/packages/frontend/src/components/user/UserAvatarAndName.tsx index 75dda32d9..50cb46142 100644 --- a/packages/frontend/src/components/user/UserAvatarAndName.tsx +++ b/packages/frontend/src/components/user/UserAvatarAndName.tsx @@ -5,8 +5,11 @@ import { UserName } from './UserName'; import { UserPopover } from './UserPopover'; import { User } from '@/model/user/dto/user.dto'; import { UserAccount } from '@/model/useraccount/dto/user-account.dto'; +import { SingleUserByIdentityEthAddress } from '../../model/user/users'; +import { useRecoilValue } from 'recoil'; interface UserNameProps { + identityEthAddress?: string; user?: User; userId?: string | undefined; userAccount?: UserAccount; @@ -17,6 +20,7 @@ interface UserNameProps { } const WrappedUserAvatarAndName = ({ + identityEthAddress, user, userId, userAccount, @@ -25,20 +29,29 @@ const WrappedUserAvatarAndName = ({ avatarClassName, nameClassName, }: UserNameProps): JSX.Element | null => { - if ((!user && !userId && !userAccount) || (usePseudonym && !periodId)) + const userByEth = useRecoilValue( + SingleUserByIdentityEthAddress(identityEthAddress) + ); + + const effectiveUser = user || userByEth; + + if ( + (!effectiveUser && !userId && !userAccount) || + (usePseudonym && !periodId) + ) return null; return (
    Promise; - isOwnerValidSafeAddress: () => Promise; }; -export function useAttestations({ - hostname, -}: UseAttestationsInput): UseAttestationsReturn { - // Convert wagmi/viem `WalletClient` to ethers `Signer`, required by Safe - const signer = useSigner(ETH_CHAIN_ID); - - // Load community details - const community = useRecoilValue(CommunityByHostname(hostname)); - - // Current requirement is that the community creator is the community Safe address - const SAFE_ADDRESS = community?.creator || ''; - - // Initialize Safe SDK - const { safe, safeApiKit, ethersAdapter } = useSafe(SAFE_ADDRESS); - - const isOwnerValidSafeAddress = async (): Promise => { - if (!safeApiKit) { - throw new Error('Missing safeApiKit'); - } - const info = await safeApiKit.getSafeInfo(SAFE_ADDRESS); - console.log('info', info); - return true; - }; +export function useAttestations(): UseAttestationsReturn { + // Hooks + const rpcSigner = useSigner(ETH_CHAIN_ID); + const { safe, safeApiKit, ethersAdapter, SAFE_ADDRESS } = useSafe(); - const [creating, setCreating] = useState(undefined); - const [txHash, setTxHash] = useState(undefined); - const [signature, setSignature] = useState( - undefined - ); + // Local state + const [creating, setCreating] = useState(); + const [txHash, setTxHash] = useState(); + const [signature, setSignature] = useState(); - const createAttestations = async ( + const createAttestationsTransaction = async ( data: useReportRunReturn, period: string ): Promise => { try { - if (!signer || !safe || !safeApiKit || !ethersAdapter) { + if ( + !rpcSigner || + !safe || + !safeApiKit || + !ethersAdapter || + !SAFE_ADDRESS + ) { throw new Error('Missing signer, safe, safeApiKit or ethersAdapter'); } @@ -165,7 +144,7 @@ export function useAttestations({ }, }); - const signerAddress = await signer.getAddress(); + const signerAddress = await rpcSigner.getAddress(); const txHash = await safe.getTransactionHash(safeTransaction); const signature = await safe.signTransactionHash(txHash); @@ -196,7 +175,6 @@ export function useAttestations({ creating, txHash, signature, - createAttestations, - isOwnerValidSafeAddress, + createAttestationsTransaction, }; } diff --git a/packages/frontend/src/model/user/users.ts b/packages/frontend/src/model/user/users.ts index a8f32dca5..4fee0be1a 100644 --- a/packages/frontend/src/model/user/users.ts +++ b/packages/frontend/src/model/user/users.ts @@ -168,6 +168,22 @@ export const SingleUserByUsername = selectorFamily({ }, }); +/** + * Selector that returns one individual User by username. + */ +export const SingleUserByIdentityEthAddress = selectorFamily({ + key: 'SingleUserByIdentityEthAddress', + get: + (identityEthAddress: string | undefined) => + ({ get }): User | undefined => { + const allUsers = get(AllUsers); + if (!allUsers || !identityEthAddress) return undefined; + return allUsers.filter( + (user) => user.identityEthAddress === identityEthAddress + )[0]; + }, +}); + export const ManyUsers = selectorFamily({ key: 'ManyUsers', get: diff --git a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx index ec17fa723..982ac2750 100644 --- a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx +++ b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx @@ -53,17 +53,23 @@ const PeriodDetailsHeadFallback = (): JSX.Element => { }; export const PeriodDetailsPage = (): JSX.Element | null => { + // Hooks const { periodId } = useParams(); const detailsResponse = useLoadSinglePeriodDetails(periodId); // Load additional period details + const { path, url } = useRouteMatch(); + + // Global state const period = useRecoilValue(SinglePeriod(periodId)); const activeUserId = useRecoilValue(ActiveUserId); const isAdmin = useRecoilValue(HasRole(ROLE_ADMIN)); - const { path, url } = useRouteMatch(); - usePeriodQuantifierPraise(periodId, activeUserId || ''); + const periodQuantifierPraise = usePeriodQuantifierPraise( + periodId, + activeUserId || '' + ); - // if (!detailsResponse || !period || !periodQuantifierPraise) return null; - if (!detailsResponse || !period) return null; + if (!detailsResponse || !period || !activeUserId || !periodQuantifierPraise) + return null; return ( @@ -134,39 +140,25 @@ export const PeriodDetailsPage = (): JSX.Element | null => { - - - + - - - + - - - + - - - + - - - + - - - + diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index bfe659c35..5370a28ac 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -9,14 +9,21 @@ import { Dialog } from '@headlessui/react'; import { useNetwork } from 'wagmi'; import { ETH_CHAIN_ID } from '../../../model/eth/eth.constants'; -const Attestations = (): JSX.Element => { +const Attestations = (): JSX.Element | null => { + // Hooks const { periodId } = useParams(); const period = useRecoilValue(SinglePeriod(periodId)); const dialogRef = useRef(null); - const [dialogOpen, setDialogOpen] = useState(false); const { chain } = useNetwork(); - if (period?.status !== 'CLOSED') { + // Local state + const [dialogOpen, setDialogOpen] = useState(false); + + if (!period || !chain) { + return null; + } + + if (period.status !== 'CLOSED') { return (
    diff --git a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx index 6df8b2bc1..80672e1c5 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx @@ -1,62 +1,114 @@ import { Link, useParams } from 'react-router-dom'; import { useRecoilValue } from 'recoil'; import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; -import { ETH_CHAIN_ID } from '../../../model/eth/eth.constants'; -import { useNetwork } from 'wagmi'; import { shortenEthAddress } from '../../../utils/string'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faExternalLink } from '@fortawesome/free-solid-svg-icons'; +import { LineListItem } from '../../../components/ui/LineListItem'; +import { UserAvatarAndName } from '../../../components/user/UserAvatarAndName'; +import { CopyButton } from './CopyButton'; +import { useSafeTransaction } from '../../../model/safe/hooks/useSafeTransaction'; +import { ATTESTATION_REPORT_MANIFEST_URL } from '../../../model/eas/eas.constants'; +import { objectToQs } from '../../../utils/querystring'; import { useSafe } from '../../../model/safe/hooks/useSafe'; -import { CommunityByHostname } from '../../../model/communitites/communities'; -import { useEffect, useState } from 'react'; -import { SafeMultisigTransactionResponse } from '@safe-global/safe-core-sdk-types'; +import { + faCheckCircle, + faExternalLink, +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { SignAttestationsButton } from './SignAttestationsButton'; -export function AttestationsDetailBox(): JSX.Element { +export function AttestationsDetailBox(): JSX.Element | null { + // Hooks const { periodId } = useParams(); const period = useRecoilValue(SinglePeriod(periodId)); - const community = useRecoilValue( - CommunityByHostname(window.location.hostname) - ); - const SAFE_ADDRESS = community?.creator; - - const { chain } = useNetwork(); - const { safeApiKit } = useSafe(SAFE_ADDRESS); + const { SAFE_ADDRESS } = useSafe(); + const { + transaction, + moreConfirmationsRequired, + mySignatureAwaited, + signTransaction, + signState, + } = useSafeTransaction({ + safeTxHash: period?.attestationsTxHash, + }); - const [safeMultisigTransactionResponse, setSafeMultisigTransactionResponse] = - useState(undefined); + const reportUrl = period + ? `/reports/run?${objectToQs({ + manifestUrl: ATTESTATION_REPORT_MANIFEST_URL, + startDate: period.startDate, + endDate: period.endDate, + })}` + : ''; - function loadTransaction(): void { - if (!safeApiKit || !period?.attestationsTxHash) return; - const loadTransaction = async (): Promise => - setSafeMultisigTransactionResponse( - await safeApiKit.getTransaction(period.attestationsTxHash) - ); - void loadTransaction(); + if (!period?.attestationsTxHash) { + return null; } - useEffect(loadTransaction, [safeApiKit, period]); - return (
    -
    Attestation data generated
    -
    Transaction created
    -
    Link to report
    -
    Transaction hash
    - -
    - {safeMultisigTransactionResponse?.confirmations?.map((c) => ( -
    {c.owner}
    +
      + + Attestation data generated + + + + Attestation data report + + + + Safe transaction created + + + + + Transaction queue{' '} + + + + + + Transaction hash:{' '} + {shortenEthAddress(period?.attestationsTxHash || '')}{' '} + + + + + + Transaction confirmations ({transaction?.confirmations?.length} of + {transaction?.confirmationsRequired}) + + + + {transaction?.confirmations?.map((c) => ( + + {' '} + + ))} -
    + + {mySignatureAwaited && ( + + Transaction is awaiting your signature + + + )} + + {moreConfirmationsRequired && ( + + Transaction can be executed once the threshold is reached + + )} +
    ); } diff --git a/packages/frontend/src/pages/PeriodDetails/components/CopyButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CopyButton.tsx new file mode 100644 index 000000000..44567c7e1 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/CopyButton.tsx @@ -0,0 +1,23 @@ +import { Button } from '../../../components/ui/Button'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faCopy } from '@fortawesome/free-solid-svg-icons'; +import { toast } from 'react-hot-toast'; + +interface CopyButtonProps { + textToCopy: string; +} + +export function CopyButton({ textToCopy }: CopyButtonProps): JSX.Element { + return ( + + ); +} diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index c2d7944c8..23ccd1be7 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -3,7 +3,6 @@ import { useAccount } from 'wagmi'; import { Button } from '../../../components/ui/Button'; import { PeriodPageParams, SinglePeriod } from '../../../model/periods/periods'; import { useParams } from 'react-router-dom'; -import { CommunityByHostname } from '../../../model/communitites/communities'; import { useSafe } from '../../../model/safe/hooks/useSafe'; import { useEffect, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; @@ -17,15 +16,17 @@ type CreateAttestationsButtonProps = { export function CreateAttestationsButton({ onClick, }: CreateAttestationsButtonProps): JSX.Element | null { + // Hooks const { periodId } = useParams(); - const period = useRecoilValue(SinglePeriod(periodId)); - const community = useRecoilValue( - CommunityByHostname(window.location.hostname) - ); const { address } = useAccount(); + const { safe } = useSafe(); + + // Global state + const period = useRecoilValue(SinglePeriod(periodId)); const userId = useRecoilValue(ActiveUserId); - const { safe } = useSafe(community?.creator); - const [isOwner, setIsOwner] = useState(undefined); + + // Local state + const [isOwner, setIsOwner] = useState(); useEffect(() => { if (!safe || !address) return; diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx index 0a72b5d91..515fc5247 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialog.tsx @@ -20,7 +20,6 @@ import { PeriodPageParams, useUpdatePeriod, } from '../../../model/periods/periods'; -import { CommunityByHostname } from '../../../model/communitites/communities'; import { useReportRunReturn } from '../../../model/report/types/use-report-run-return.type'; import { ATTESTATION_REPORT_MANIFEST_URL } from '../../../model/eas/eas.constants'; import { GenerateAttestationsData } from './GenerateAttestationsData'; @@ -32,41 +31,27 @@ type CreateAttestationsDialogProps = { export function CreateAttestationsDialog({ onClose, }: CreateAttestationsDialogProps): JSX.Element | null { + // Hooks const { periodId } = useParams(); const periods = useRecoilValue(AllPeriods); - const [periodDates, setPeriodDates] = useState( - undefined - ); - const community = useRecoilValue( - CommunityByHostname(window.location.hostname) - ); - const { safe } = useSafe(community?.creator); - const [owners, setOwners] = useState([]); - const [treshold, setTreshold] = useState(0); - const [attestationData, setAttestationData] = useState< - useReportRunReturn | undefined - >(undefined); - const { createAttestations, creating, txHash } = useAttestations({ - hostname: window.location.hostname, - }); + const { owners, threshold } = useSafe(); + const { + createAttestationsTransaction: createAttestations, + creating, + txHash, + } = useAttestations(); + const { updatePeriod } = useUpdatePeriod(); + + // Local state + const [periodDates, setPeriodDates] = useState(); + const [attestationData, setAttestationData] = useState(); + // Effects function loadPeriodDates(): void { if (!periods) return; setPeriodDates(getPeriodDatesConfig(periods, periodId)); } - function loadSignersAndThreshold(): void { - if (!safe) return; - const loadSigners = async (): Promise => { - const owners = await safe.getOwners(); - const treshold = await safe.getThreshold(); - setOwners(owners); - setTreshold(treshold); - }; - void loadSigners(); - } - - const { updatePeriod } = useUpdatePeriod(); function saveTransactionHash(): void { if (!txHash) return; void updatePeriod(periodId, { attestationsTxHash: txHash }); @@ -74,7 +59,6 @@ export function CreateAttestationsDialog({ } useEffect(loadPeriodDates, [periods, periodId]); - useEffect(loadSignersAndThreshold, [safe]); useEffect(saveTransactionHash, [txHash, periodId, updatePeriod, onClose]); if (!periodDates) return null; @@ -115,7 +99,7 @@ export function CreateAttestationsDialog({
    This transaction requires the signature of:
    - {treshold} out of{' '} + {threshold} out of{' '} {owners.length} owners.
    diff --git a/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx new file mode 100644 index 000000000..727f18018 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx @@ -0,0 +1,32 @@ +import { useRecoilValue } from 'recoil'; +import { Button } from '../../../components/ui/Button'; +import { ActiveUserId } from '../../../model/auth/auth'; +import { SignAttestationsButtonContent } from './SignAttestationsButtonContent'; +import { SignSafeTransactionStateType } from '../../../model/safe/types/sign-safe-transaction-state.type'; + +type SignAttestationsButtonProps = { + signState?: SignSafeTransactionStateType; + onClick?: () => void; +}; + +export function SignAttestationsButton({ + signState, + onClick, +}: SignAttestationsButtonProps): JSX.Element | null { + // Global state + const userId = useRecoilValue(ActiveUserId); + + const signButtonDisabled = + !userId || signState?.state === 'signing' || signState?.state === 'signed'; + + return ( + + ); +} diff --git a/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButtonContent.tsx b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButtonContent.tsx new file mode 100644 index 000000000..ce3528428 --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButtonContent.tsx @@ -0,0 +1,44 @@ +import { useRecoilValue } from 'recoil'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { + faCheckCircle, + faPrayingHands, +} from '@fortawesome/free-solid-svg-icons'; +import { ActiveUserId } from '../../../model/auth/auth'; +import { SignSafeTransactionStateType } from '../../../model/safe/types/sign-safe-transaction-state.type'; + +type SignAttestationsButtonContentProps = { + signState?: SignSafeTransactionStateType; +}; + +export function SignAttestationsButtonContent({ + signState, +}: SignAttestationsButtonContentProps): JSX.Element { + // Global state + const userId = useRecoilValue(ActiveUserId); + + if (userId) { + if (typeof signState === 'undefined') { + return <>Sign transaction; + } + + if (signState?.state === 'signing') { + return ( + <> + + Signing + + ); + } + + if (signState?.state === 'signed') { + return ( + <> + + Signed + + ); + } + } + return <>Login to sign; +} From 83be4e5892311d61a8948730908c26eaffa91e8d Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Mon, 7 Aug 2023 18:16:14 +0200 Subject: [PATCH 35/63] Eth error handling --- .../src/model/eth/util/errorHasMessage.ts | 3 ++ .../src/model/eth/util/errorHasReason.ts | 3 ++ .../model/safe/hooks/useSafeTransaction.ts | 33 +++++++++++++++---- 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 packages/frontend/src/model/eth/util/errorHasMessage.ts create mode 100644 packages/frontend/src/model/eth/util/errorHasReason.ts diff --git a/packages/frontend/src/model/eth/util/errorHasMessage.ts b/packages/frontend/src/model/eth/util/errorHasMessage.ts new file mode 100644 index 000000000..e47609e7c --- /dev/null +++ b/packages/frontend/src/model/eth/util/errorHasMessage.ts @@ -0,0 +1,3 @@ +export function errorHasMessage(obj: unknown): obj is { message?: string } { + return typeof obj === 'object' && obj !== null && 'message' in obj; +} diff --git a/packages/frontend/src/model/eth/util/errorHasReason.ts b/packages/frontend/src/model/eth/util/errorHasReason.ts new file mode 100644 index 000000000..a4abfdaea --- /dev/null +++ b/packages/frontend/src/model/eth/util/errorHasReason.ts @@ -0,0 +1,3 @@ +export function errorHasReason(obj: unknown): obj is { reason?: string } { + return typeof obj === 'object' && obj !== null && 'reason' in obj; +} diff --git a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts index 0edb1cb26..e2ccfc6eb 100644 --- a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts +++ b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts @@ -4,9 +4,17 @@ import { SafeMultisigTransactionResponse } from '@safe-global/safe-core-sdk-type // Internal imports import { useAccount } from 'wagmi'; -import { atom, useRecoilState } from 'recoil'; +import { atom, atomFamily, useRecoilState } from 'recoil'; import { SignSafeTransactionStateType } from '../types/sign-safe-transaction-state.type'; import { useSafe } from './useSafe'; +import { toast } from 'react-hot-toast'; +import { errorHasReason } from '../../eth/util/errorHasReason'; +import { errorHasMessage } from '../../eth/util/errorHasMessage'; + +const SafeTransaction = atomFamily({ + key: 'SafeTransaction', + default: undefined, +}); const SignSafeTransactionState = atom({ key: 'SignSafeTransactionState', @@ -37,18 +45,19 @@ export function useSafeTransaction({ const { safe, safeApiKit } = useSafe(); // Local state - const [transaction, setTransaction] = - useState(); const [mySignatureAwaited, setMySignatureAwaited] = useState(); // Global state + const [transaction, setTransaction] = useRecoilState( + SafeTransaction(safeTxHash ?? '') + ); const [signState, setSignState] = useRecoilState(SignSafeTransactionState); /** * Load the Safe transaction details. */ function loadTransaction(): void { - if (!safeApiKit || !safeTxHash) return; + if (transaction || !safeApiKit || !safeTxHash) return; void (async (): Promise => { const tx = await safeApiKit.getTransaction(safeTxHash); setTransaction(tx); @@ -66,7 +75,12 @@ export function useSafeTransaction({ })(); } - useEffect(loadTransaction, [safeApiKit, safeTxHash]); + useEffect(loadTransaction, [ + safeApiKit, + safeTxHash, + transaction, + setTransaction, + ]); useEffect(checkIfMySignatureAwaited, [userAddress, safe, transaction]); const moreConfirmationsRequired = @@ -75,15 +89,22 @@ export function useSafeTransaction({ transaction.confirmations.length < transaction.confirmationsRequired; function signTransaction(): void { - if (!safe || !safeTxHash) { + if (!safe || !safeTxHash || !safeApiKit) { return; } void (async (): Promise => { setSignState({ state: 'signing' }); try { await safe.signTransactionHash(safeTxHash); + const tx = await safeApiKit.getTransaction(safeTxHash); + setTransaction(tx); setSignState({ state: 'signed' }); } catch (e) { + if (errorHasReason(e) && e.reason) { + toast.error(e.reason); + } else if (errorHasMessage(e) && e.message) { + toast.error(e.message); + } setSignState({ state: 'error', error: e as Error }); } })(); From 4a0c9469d581b333e7c6e556d0c2bf30f962421b Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 8 Aug 2023 15:02:30 +0200 Subject: [PATCH 36/63] Adding support for executing transactions --- .../model/safe/hooks/useSafeTransaction.ts | 45 ++++- .../execute-safe-transaction-state.type.ts | 4 + .../components/AttestationsDetailBox.tsx | 158 +++++++++++++----- .../components/ExecuteAttestationsButton.tsx | 33 ++++ .../ExecuteAttestationsButtonContent.tsx | 46 +++++ 5 files changed, 241 insertions(+), 45 deletions(-) create mode 100644 packages/frontend/src/model/safe/types/execute-safe-transaction-state.type.ts create mode 100644 packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButton.tsx create mode 100644 packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButtonContent.tsx diff --git a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts index e2ccfc6eb..52d1a5f53 100644 --- a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts +++ b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts @@ -10,6 +10,7 @@ import { useSafe } from './useSafe'; import { toast } from 'react-hot-toast'; import { errorHasReason } from '../../eth/util/errorHasReason'; import { errorHasMessage } from '../../eth/util/errorHasMessage'; +import { ExecuteSafeTransactionStateType } from '../types/execute-safe-transaction-state.type'; const SafeTransaction = atomFamily({ key: 'SafeTransaction', @@ -21,6 +22,11 @@ const SignSafeTransactionState = atom({ default: undefined, }); +const ExecuteSafeTransactionState = atom({ + key: 'ExecuteSafeTransactionState', + default: undefined, +}); + type UseSafeTransactionProps = { safeTxHash?: string; }; @@ -31,6 +37,8 @@ type UseSafeTransactionReturn = { mySignatureAwaited?: boolean; signState?: SignSafeTransactionStateType; signTransaction?: () => void; + executeState?: ExecuteSafeTransactionStateType; + executeTransaction?: () => void; }; /** @@ -52,6 +60,9 @@ export function useSafeTransaction({ SafeTransaction(safeTxHash ?? '') ); const [signState, setSignState] = useRecoilState(SignSafeTransactionState); + const [executeState, setExecuteState] = useRecoilState( + ExecuteSafeTransactionState + ); /** * Load the Safe transaction details. @@ -64,13 +75,16 @@ export function useSafeTransaction({ })(); } + /** + * Check if the user's signature is required for the transaction. + */ function checkIfMySignatureAwaited(): void { - if (!userAddress || !safe) return; + if (!userAddress || !safe || !transaction) return; void (async (): Promise => { const isOwner = await safe.isOwner(userAddress); setMySignatureAwaited( isOwner && - !transaction?.confirmations?.find((c) => c.owner === userAddress) + !transaction.confirmations?.find((c) => c.owner === userAddress) ); })(); } @@ -95,7 +109,8 @@ export function useSafeTransaction({ void (async (): Promise => { setSignState({ state: 'signing' }); try { - await safe.signTransactionHash(safeTxHash); + const signature = await safe.signTransactionHash(safeTxHash); + await safeApiKit.confirmTransaction(safeTxHash, signature.data); const tx = await safeApiKit.getTransaction(safeTxHash); setTransaction(tx); setSignState({ state: 'signed' }); @@ -110,11 +125,35 @@ export function useSafeTransaction({ })(); } + function executeTransaction(): void { + if (!safe || !safeTxHash || !safeApiKit) { + return; + } + void (async (): Promise => { + setExecuteState({ state: 'executing' }); + try { + await safe.executeTransaction(transaction, { + gasLimit: 1000000, + }); + setExecuteState({ state: 'executed' }); + } catch (e) { + if (errorHasReason(e) && e.reason) { + toast.error(e.reason); + } else if (errorHasMessage(e) && e.message) { + toast.error(e.message); + } + setExecuteState({ state: 'error', error: e as Error }); + } + })(); + } + return { transaction, moreConfirmationsRequired, mySignatureAwaited, signState, signTransaction, + executeState, + executeTransaction, }; } diff --git a/packages/frontend/src/model/safe/types/execute-safe-transaction-state.type.ts b/packages/frontend/src/model/safe/types/execute-safe-transaction-state.type.ts new file mode 100644 index 000000000..bd5d31fab --- /dev/null +++ b/packages/frontend/src/model/safe/types/execute-safe-transaction-state.type.ts @@ -0,0 +1,4 @@ +export type ExecuteSafeTransactionStateType = { + state: 'executing' | 'executed' | 'error'; + error?: Error; +}; diff --git a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx index 80672e1c5..9b6fa264e 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx @@ -9,24 +9,23 @@ import { useSafeTransaction } from '../../../model/safe/hooks/useSafeTransaction import { ATTESTATION_REPORT_MANIFEST_URL } from '../../../model/eas/eas.constants'; import { objectToQs } from '../../../utils/querystring'; import { useSafe } from '../../../model/safe/hooks/useSafe'; -import { - faCheckCircle, - faExternalLink, -} from '@fortawesome/free-solid-svg-icons'; +import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { SignAttestationsButton } from './SignAttestationsButton'; +import { ExecuteAttestationsButton } from './ExecuteAttestationsButton'; export function AttestationsDetailBox(): JSX.Element | null { - // Hooks const { periodId } = useParams(); const period = useRecoilValue(SinglePeriod(periodId)); - const { SAFE_ADDRESS } = useSafe(); + const { SAFE_ADDRESS, isCurrentUserOwner } = useSafe(); const { transaction, moreConfirmationsRequired, mySignatureAwaited, signTransaction, signState, + executeTransaction, + executeState, } = useSafeTransaction({ safeTxHash: period?.attestationsTxHash, }); @@ -39,7 +38,14 @@ export function AttestationsDetailBox(): JSX.Element | null { })}` : ''; - if (!period?.attestationsTxHash) { + if ( + !period || + !period?.attestationsTxHash || + !transaction || + !SAFE_ADDRESS || + typeof moreConfirmationsRequired === 'undefined' || + typeof mySignatureAwaited === 'undefined' + ) { return null; } @@ -51,55 +57,59 @@ export function AttestationsDetailBox(): JSX.Element | null { - Attestation data report +
    + Attestation data report +
    - Safe transaction created + Transaction proposed - - Transaction queue{' '} - - +
    + +
    - - Transaction hash:{' '} - {shortenEthAddress(period?.attestationsTxHash || '')}{' '} - - - - + - Transaction confirmations ({transaction?.confirmations?.length} of + Transaction confirmations ({transaction?.confirmations?.length} of{' '} {transaction?.confirmationsRequired}) - {transaction?.confirmations?.map((c) => ( - - {' '} - - - ))} + +
    + {transaction?.confirmations?.map((c) => ( +
    + {' '} + +
    + ))} +
    +
    - {mySignatureAwaited && ( - - Transaction is awaiting your signature - + {mySignatureAwaited && moreConfirmationsRequired && ( + +
    + Transaction is awaiting your signature + +
    )} @@ -108,6 +118,70 @@ export function AttestationsDetailBox(): JSX.Element | null { Transaction can be executed once the threshold is reached
    )} + + {!moreConfirmationsRequired && !transaction?.isExecuted && ( + <> + + Transaction is ready to be executed + + + + {isCurrentUserOwner && ( +
    + As a safe owner you can execute the transaction + +
    + )} + {!isCurrentUserOwner && + 'The transaction can be executed by any owner.'} +
    + + )} + + {transaction?.isExecuted && ( + <> + + Transaction has been executed + + + + + + + )}
    ); diff --git a/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButton.tsx new file mode 100644 index 000000000..9e94bc8bd --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButton.tsx @@ -0,0 +1,33 @@ +import { useRecoilValue } from 'recoil'; +import { Button } from '../../../components/ui/Button'; +import { ActiveUserId } from '../../../model/auth/auth'; +import { ExecuteAttestationsButtonContent } from './ExecuteAttestationsButtonContent'; +import { ExecuteSafeTransactionStateType } from '../../../model/safe/types/execute-safe-transaction-state.type'; + +type ExecuteAttestationsButtonProps = { + executeState?: ExecuteSafeTransactionStateType; + onClick?: () => void; +}; + +export function ExecuteAttestationsButton({ + executeState, + onClick, +}: ExecuteAttestationsButtonProps): JSX.Element | null { + const userId = useRecoilValue(ActiveUserId); + + const signButtonDisabled = + !userId || + executeState?.state === 'executing' || + executeState?.state === 'executed'; + + return ( + + ); +} diff --git a/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButtonContent.tsx b/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButtonContent.tsx new file mode 100644 index 000000000..2f09e1fbe --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/ExecuteAttestationsButtonContent.tsx @@ -0,0 +1,46 @@ +import { useRecoilValue } from 'recoil'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { + faCheckCircle, + faPrayingHands, +} from '@fortawesome/free-solid-svg-icons'; +import { ActiveUserId } from '../../../model/auth/auth'; +import { ExecuteSafeTransactionStateType } from '../../../model/safe/types/execute-safe-transaction-state.type'; + +type ExecuteAttestationsButtonContentProps = { + executeState?: ExecuteSafeTransactionStateType; +}; + +export function ExecuteAttestationsButtonContent({ + executeState, +}: ExecuteAttestationsButtonContentProps): JSX.Element { + const userId = useRecoilValue(ActiveUserId); + + if (userId) { + if ( + typeof executeState === 'undefined' || + executeState?.state === 'error' + ) { + return <>Execute transaction; + } + + if (executeState?.state === 'executing') { + return ( + <> + + Executing + + ); + } + + if (executeState?.state === 'executed') { + return ( + <> + + Executed + + ); + } + } + return <>Login to execute; +} From ec2cf7acb7f0457037de04af6e50e15c2e105cba Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 8 Aug 2023 15:02:58 +0200 Subject: [PATCH 37/63] Make sure popover stays on top --- packages/frontend/src/components/user/UserPopover.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/components/user/UserPopover.tsx b/packages/frontend/src/components/user/UserPopover.tsx index 8ac6313cb..8fb670923 100644 --- a/packages/frontend/src/components/user/UserPopover.tsx +++ b/packages/frontend/src/components/user/UserPopover.tsx @@ -87,7 +87,7 @@ const WrappedUserPopover = ({ {open && (
    { closeTimeout && clearTimeout(closeTimeout); From 82984628f8d422c024a3cdfd7e9fb81897e27689 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 8 Aug 2023 15:03:28 +0200 Subject: [PATCH 38/63] Is current user owner of Safe? --- packages/frontend/src/model/safe/hooks/useSafeInit.ts | 11 +++++++++-- .../frontend/src/model/safe/types/use-safe-return.ts | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/model/safe/hooks/useSafeInit.ts b/packages/frontend/src/model/safe/hooks/useSafeInit.ts index eb67c1f10..eb7eadcb8 100644 --- a/packages/frontend/src/model/safe/hooks/useSafeInit.ts +++ b/packages/frontend/src/model/safe/hooks/useSafeInit.ts @@ -10,6 +10,7 @@ import { ETH_CHAIN_ID } from '../../eth/eth.constants'; import { SAFE_TX_SERVICE_URL } from '../safe.constants'; import { useCommunity } from '../../communitites/hooks/useCommunity'; import { UseSafeReturn } from '../types/use-safe-return'; +import { useAccount } from 'wagmi'; /** * Custom hook to interface with the Safe protocol and associated utilities. @@ -19,6 +20,7 @@ export function useSafeInit(): UseSafeReturn { // Hooks const { community } = useCommunity(); const rpcSigner = useSigner(ETH_CHAIN_ID); + const { address: userAddress } = useAccount(); // Local state const [ethersAdapter, setEthersAdapter] = useState(); @@ -27,6 +29,7 @@ export function useSafeInit(): UseSafeReturn { const [isValidSafeAddress, setIsValidSafeAddress] = useState(); const [owners, setOwners] = useState([]); const [threshold, setThreshold] = useState(0); + const [isCurrentUserOwner, setIsCurrentUserOwner] = useState(false); const SAFE_ADDRESS = community?.creator; /** @@ -80,10 +83,13 @@ export function useSafeInit(): UseSafeReturn { * Load the owners and threshold values. */ function loadOwnersAndThreshold(): void { - if (!safe) return; + if (!safe || !userAddress) return; void (async (): Promise => { const safeOwners = await safe.getOwners(); const safeThreshold = await safe.getThreshold(); + if (safeOwners.includes(userAddress)) { + setIsCurrentUserOwner(true); + } setOwners(safeOwners); setThreshold(safeThreshold); })(); @@ -92,12 +98,13 @@ export function useSafeInit(): UseSafeReturn { useEffect(initializeEthersAdapter, [rpcSigner]); useEffect(initializeSafeInstance, [ethersAdapter, SAFE_ADDRESS]); useEffect(initializeSafeApiKit, [ethersAdapter, SAFE_ADDRESS]); - useEffect(loadOwnersAndThreshold, [safe]); + useEffect(loadOwnersAndThreshold, [safe, userAddress]); return { isValidSafeAddress, owners, threshold, + isCurrentUserOwner, ethersAdapter, safe, safeApiKit, diff --git a/packages/frontend/src/model/safe/types/use-safe-return.ts b/packages/frontend/src/model/safe/types/use-safe-return.ts index 7a0d197e2..a704240cd 100644 --- a/packages/frontend/src/model/safe/types/use-safe-return.ts +++ b/packages/frontend/src/model/safe/types/use-safe-return.ts @@ -8,5 +8,6 @@ export type UseSafeReturn = { isValidSafeAddress?: boolean; owners: string[] | undefined[]; threshold: number; + isCurrentUserOwner: boolean; SAFE_ADDRESS?: string; }; From dbd508a1b269475be14b3fec9c8d764b12379e02 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 8 Aug 2023 15:04:00 +0200 Subject: [PATCH 39/63] Attestation page description --- .../PeriodDetails/components/Attestations.tsx | 125 ++---------------- 1 file changed, 10 insertions(+), 115 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 5370a28ac..82e3f4114 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -50,19 +50,25 @@ const Attestations = (): JSX.Element | null => { className="object-contain w-16" />
    - +

    + Attestations are signed statements about a person, entity, or thing, + made by an individual, company, or organization and are one of the + building blocks of decentralized identity. Praise attestations are + generated by the Ethereum Attestation Service (EAS) on the{' '} + + Optimism + {' '} + blockchain. +

    {!period?.attestationsTxHash && (
    No attestations have yet been created for this period.
    )} - {chain?.id === ETH_CHAIN_ID && ( setDialogOpen(true)} /> )} - {period?.attestationsTxHash && chain?.id === ETH_CHAIN_ID && ( )} - {period?.attestationsTxHash && chain?.id !== ETH_CHAIN_ID && (
    Connect to Optimism to view attestation information.
    )} @@ -83,115 +89,4 @@ const Attestations = (): JSX.Element | null => { ); }; -// eslint-disable-next-line import/no-default-export export default Attestations; - -// function useAttestations(): UseAttestationsReturn { -// const signer = useSigner(10); -// const eas = new EAS('0x4200000000000000000000000000000000000021'); -// console.log('eas', eas); - -// const createAttestation = async (): Promise => { -// try { -// console.log('createAttestation'); -// console.log('signer', signer); -// if (!signer) { -// return; -// } - -// // // Create EthAdapter instance -// const ethAdapter = new EthersAdapter({ -// ethers, -// signerOrProvider: signer, -// }); - -// // // Create Safe instance -// const safe = await Safe.create({ -// ethAdapter, -// safeAddress: SAFE_ADDRESS, -// }); - -// // Create Safe API Kit instance -// const safeService = new SafeApiKit({ -// txServiceUrl: 'https://safe-transaction-optimism.safe.global', -// ethAdapter, -// }); - -// // Create transaction -// // const safeTransactionData: SafeTransactionDataPartial = { -// // to: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', -// // value: '1', // 1 wei -// // data: '0x', -// // operation: OperationType.Call, -// // }; - -// // Create transaction -// const safeTransactionData: SafeTransactionDataPartial = { -// to: eas.contract.address, -// value: '0', // 1 wei -// data: eas.contract.interface.encodeFunctionData('attest', [ -// { -// schema: -// '0x85500e806cf1e74844d51a20a6d893fe1ed6f6b0738b50e43d774827d08eca61', -// data: { -// recipient: '0xa32aECda752cF4EF89956e83d60C04835d4FA867', -// expirationTime: 0, -// revocable: false, -// refUID: -// '0x0000000000000000000000000000000000000000000000000000000000000000', -// data: '0x0000000000000000000000000000000000000000000000000000000000000001', -// value: 0, -// }, -// }, -// ]), - -// operation: OperationType.Call, -// }; - -// const safeTransaction = await safe.createTransaction({ -// safeTransactionData, -// }); - -// const senderAddress = await signer.getAddress(); -// const safeTxHash = await safe.getTransactionHash(safeTransaction); -// const signature = await safe.signTransactionHash(safeTxHash); - -// // Propose transaction to the service -// await safeService.proposeTransaction({ -// safeAddress: SAFE_ADDRESS, -// safeTransactionData: safeTransaction.data, -// safeTxHash, -// senderAddress, -// senderSignature: signature.data, -// }); - -// console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); -// console.log('- safeTxHash:', safeTxHash); -// console.log('- Sender:', senderAddress); -// console.log('- Sender signature:', signature.data); - -// const tx = await safeService.getTransaction(safeTxHash); -// console.log('Transaction:', tx); -// console.log('Transaction2:', safeTransaction); - -// const estimateTx = await safeService.estimateSafeTransaction( -// SAFE_ADDRESS, -// tx -// ); -// console.log('estimateTx:', estimateTx); - -// const executeTxResponse = await safe.executeTransaction(tx, { -// gasLimit: 1000000, -// }); -// const receipt = await executeTxResponse.transactionResponse?.wait(); - -// console.log('Transaction executed:'); -// console.log( -// `https://optimistic.etherscan.io/tx/${receipt?.transactionHash}` -// ); -// } catch (e) { -// console.log('error', e); -// } -// }; -// return { createAttestation }; -// } From 01a6c37b30afdce6aba27f5e5f7299a31467dbe1 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Tue, 8 Aug 2023 15:04:36 +0200 Subject: [PATCH 40/63] Styling and small fixes --- packages/frontend/src/components/ui/LineListItem.tsx | 2 +- .../src/pages/PeriodDetails/PeriodDetailsPage.tsx | 8 ++------ .../PeriodDetails/components/CreateAttestationsButton.tsx | 7 +++++-- .../PeriodDetails/components/SignAttestationsButton.tsx | 2 +- .../components/SignAttestationsButtonContent.tsx | 3 +-- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/frontend/src/components/ui/LineListItem.tsx b/packages/frontend/src/components/ui/LineListItem.tsx index b0e1e08bc..2363e39db 100644 --- a/packages/frontend/src/components/ui/LineListItem.tsx +++ b/packages/frontend/src/components/ui/LineListItem.tsx @@ -28,7 +28,7 @@ export function LineListItem({ return (
  • { const activeUserId = useRecoilValue(ActiveUserId); const isAdmin = useRecoilValue(HasRole(ROLE_ADMIN)); - const periodQuantifierPraise = usePeriodQuantifierPraise( - periodId, - activeUserId || '' - ); + usePeriodQuantifierPraise(periodId, activeUserId || ''); - if (!detailsResponse || !period || !activeUserId || !periodQuantifierPraise) - return null; + if (!detailsResponse || !period) return null; return ( diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index 23ccd1be7..d3f7ab0c8 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -6,7 +6,7 @@ import { useParams } from 'react-router-dom'; import { useSafe } from '../../../model/safe/hooks/useSafe'; import { useEffect, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faPrayingHands } from '@fortawesome/free-solid-svg-icons'; +import { faPlus, faPrayingHands } from '@fortawesome/free-solid-svg-icons'; import { ActiveUserId } from '../../../model/auth/auth'; type CreateAttestationsButtonProps = { @@ -54,7 +54,10 @@ export function CreateAttestationsButton({ if (isOwner) { return (
    - +
    ); } diff --git a/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx index 727f18018..ca3d4549d 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/SignAttestationsButton.tsx @@ -22,7 +22,7 @@ export function SignAttestationsButton({ return (
    { + if (isError) { + console.error(error); + const message = error?.message || 'Unknown error'; + toast.error(message); + } + }, [isError, error]); + + if (!switchNetwork) { + return ( + + ); + } + + return ( + + ); +} From ec61dcc965c2ec3e33ebcd4dd9e1dbfa9aae5ab1 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 14 Aug 2023 11:03:02 +0200 Subject: [PATCH 46/63] List Safe owners --- .../components/CreateAttestationsButton.tsx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index d3f7ab0c8..351108346 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -8,6 +8,7 @@ import { useEffect, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faPlus, faPrayingHands } from '@fortawesome/free-solid-svg-icons'; import { ActiveUserId } from '../../../model/auth/auth'; +import { UserAvatarAndName } from '../../../components/user/UserAvatarAndName'; type CreateAttestationsButtonProps = { onClick: () => void; @@ -27,11 +28,12 @@ export function CreateAttestationsButton({ // Local state const [isOwner, setIsOwner] = useState(); - + const [owners, setOwners] = useState(); useEffect(() => { if (!safe || !address) return; const isOwner = async (): Promise => { setIsOwner(await safe.isOwner(address)); + setOwners(await safe.getOwners()); }; void isOwner(); }, [safe, address]); @@ -62,5 +64,17 @@ export function CreateAttestationsButton({ ); } - return
    Only Safe owners can create attestations.
    ; + return ( +
    + Only Safe owners can create attestations. +
    + Owners: + {owners?.map((owner) => ( +
    + +
    + ))} +
    +
    + ); } From db7521d0fa6cbbf5855b796838219f28d3f6cb3c Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 14 Aug 2023 11:16:15 +0200 Subject: [PATCH 47/63] Remove unused --- .../frontend/src/model/report/util/get-period-dates-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/frontend/src/model/report/util/get-period-dates-config.ts b/packages/frontend/src/model/report/util/get-period-dates-config.ts index e0f1d0695..20257135c 100644 --- a/packages/frontend/src/model/report/util/get-period-dates-config.ts +++ b/packages/frontend/src/model/report/util/get-period-dates-config.ts @@ -1,5 +1,4 @@ import { PeriodDetailsDto } from '@/model/periods/dto/period-details.dto'; -import { getPreviousPeriod } from '@/utils/periods'; export type PeriodDates = { startDate: string; From e1391dc212b062a1159167952a453269539c6f4b Mon Sep 17 00:00:00 2001 From: Kristofer Date: Wed, 23 Aug 2023 14:40:55 +0200 Subject: [PATCH 48/63] Schema updates --- packages/api-types/out/schema.ts | 732 ++++++++---------- packages/api/openapi.json | 6 +- .../dto/find-all-communities-response.dto.ts | 2 +- 3 files changed, 321 insertions(+), 419 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index 2f3f334e5..c68f7ffc3 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,256 +3,257 @@ * Do not make direct changes to the file. */ + export interface paths { - '/api/activate': { + "/api/activate": { /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ - post: operations['ActivateController_activate']; + post: operations["ActivateController_activate"]; }; - '/api/users/export/json': { + "/api/users/export/json": { /** Export users document to json */ - get: operations['UsersController_exportJson']; + get: operations["UsersController_exportJson"]; }; - '/api/users/export/csv': { + "/api/users/export/csv": { /** Export users document to csv */ - get: operations['UsersController_exportCsv']; + get: operations["UsersController_exportCsv"]; }; - '/api/users/export/parquet': { + "/api/users/export/parquet": { /** Export users document to parquet */ - get: operations['UsersController_exportParquet']; + get: operations["UsersController_exportParquet"]; }; - '/api/users': { - get: operations['UsersController_findAll']; + "/api/users": { + get: operations["UsersController_findAll"]; }; - '/api/users/{id}': { - get: operations['UsersController_findOne']; + "/api/users/{id}": { + get: operations["UsersController_findOne"]; /** Updates a user */ - patch: operations['UsersController_update']; + patch: operations["UsersController_update"]; }; - '/api/users/{id}/addRole': { - patch: operations['UsersController_addRole']; + "/api/users/{id}/addRole": { + patch: operations["UsersController_addRole"]; }; - '/api/users/{id}/removeRole': { - patch: operations['UsersController_removeRole']; + "/api/users/{id}/removeRole": { + patch: operations["UsersController_removeRole"]; }; - '/api/periods/export/json': { + "/api/periods/export/json": { /** Export periods document to json */ - get: operations['PeriodsController_exportJson']; + get: operations["PeriodsController_exportJson"]; }; - '/api/periods/export/csv': { + "/api/periods/export/csv": { /** Export periods document to csv */ - get: operations['PeriodsController_exportCsv']; + get: operations["PeriodsController_exportCsv"]; }; - '/api/periods/export/parquet': { + "/api/periods/export/parquet": { /** Export periods document to parquet */ - get: operations['PeriodsController_exportParquet']; + get: operations["PeriodsController_exportParquet"]; }; - '/api/periods': { + "/api/periods": { /** List all periods */ - get: operations['PeriodsController_findAllPaginated']; + get: operations["PeriodsController_findAllPaginated"]; /** Create a new period */ - post: operations['PeriodsController_create']; + post: operations["PeriodsController_create"]; }; - '/api/periods/{id}': { + "/api/periods/{id}": { /** Find period by id */ - get: operations['PeriodsController_findOne']; + get: operations["PeriodsController_findOne"]; /** Update a period */ - patch: operations['PeriodsController_update']; + patch: operations["PeriodsController_update"]; }; - '/api/periods/{id}/close': { + "/api/periods/{id}/close": { /** Close a period */ - patch: operations['PeriodsController_close']; + patch: operations["PeriodsController_close"]; }; - '/api/periods/{id}/praise': { + "/api/periods/{id}/praise": { /** Fetch all Praise in a period */ - get: operations['PeriodsController_praise']; + get: operations["PeriodsController_praise"]; }; - '/api/periods/{periodId}/praise/receiver/{receiverId}': { + "/api/periods/{periodId}/praise/receiver/{receiverId}": { /** Fetch all Praise in a period for a given receiver */ - get: operations['PeriodsController_praiseByReceiver']; + get: operations["PeriodsController_praiseByReceiver"]; }; - '/api/periods/{periodId}/praise/giver/{giverId}': { + "/api/periods/{periodId}/praise/giver/{giverId}": { /** Fetch all Praise in a period for a given giver */ - get: operations['PeriodsController_praiseByGiver']; + get: operations["PeriodsController_praiseByGiver"]; }; - '/api/periods/{periodId}/praise/quantifier/{quantifierId}': { + "/api/periods/{periodId}/praise/quantifier/{quantifierId}": { /** Fetch all Praise in a period for a given quantifier */ - get: operations['PeriodsController_praiseByQuantifier']; + get: operations["PeriodsController_praiseByQuantifier"]; }; - '/api/periods/{id}/verifyQuantifierPoolSize': { + "/api/periods/{id}/verifyQuantifierPoolSize": { /** Verify quantifier pool size */ - get: operations['PeriodsController_verifyQuantifierPoolSize']; + get: operations["PeriodsController_verifyQuantifierPoolSize"]; }; - '/api/periods/{id}/assignQuantifiers': { + "/api/periods/{id}/assignQuantifiers": { /** Assign quantifiers to period */ - patch: operations['PeriodsController_assignQuantifiers']; + patch: operations["PeriodsController_assignQuantifiers"]; }; - '/api/periods/{id}/replaceQuantifier': { + "/api/periods/{id}/replaceQuantifier": { /** Replace quantifier in period */ - patch: operations['PeriodsController_replaceQuantifier']; + patch: operations["PeriodsController_replaceQuantifier"]; }; - '/api/event-log': { + "/api/event-log": { /** List event logs, paginated results */ - get: operations['EventLogController_findAllPaginated']; + get: operations["EventLogController_findAllPaginated"]; }; - '/api/event-log/types': { + "/api/event-log/types": { /** List event log types */ - get: operations['EventLogController_types']; + get: operations["EventLogController_types"]; }; - '/api/settings': { + "/api/settings": { /** List all settings. */ - get: operations['SettingsController_findAll']; + get: operations["SettingsController_findAll"]; }; - '/api/settings/{id}': { + "/api/settings/{id}": { /** Get a setting. */ - get: operations['SettingsController_findOne']; + get: operations["SettingsController_findOne"]; /** Set a value for a setting. */ - patch: operations['SettingsController_set']; + patch: operations["SettingsController_set"]; }; - '/api/settings/{id}/upload': { + "/api/settings/{id}/upload": { /** Upload a file for a setting */ - patch: operations['SettingsController_setWithUpload']; + patch: operations["SettingsController_setWithUpload"]; }; - '/api/settings/uploads/{file}': { + "/api/settings/uploads/{file}": { /** Serve an uploaded settings file. */ - get: operations['SettingsController_serveUpload']; + get: operations["SettingsController_serveUpload"]; }; - '/api/periods/{periodId}/settings': { + "/api/periods/{periodId}/settings": { /** List all period settings. */ - get: operations['PeriodSettingsController_findAll']; + get: operations["PeriodSettingsController_findAll"]; }; - '/api/periods/{periodId}/settings/{settingId}': { + "/api/periods/{periodId}/settings/{settingId}": { /** Get a period setting. */ - get: operations['PeriodSettingsController_findOne']; + get: operations["PeriodSettingsController_findOne"]; /** Set value for a period setting. */ - patch: operations['PeriodSettingsController_set']; + patch: operations["PeriodSettingsController_set"]; }; - '/api/praise': { + "/api/praise": { /** List praise items, paginated results */ - get: operations['PraiseController_findAllPaginated']; + get: operations["PraiseController_findAllPaginated"]; /** Create praise item */ - post: operations['PraiseController_praise']; + post: operations["PraiseController_praise"]; }; - '/api/praise/export/json': { + "/api/praise/export/json": { /** Export praise document to json */ - get: operations['PraiseController_exportJson']; + get: operations["PraiseController_exportJson"]; }; - '/api/praise/export/csv': { + "/api/praise/export/csv": { /** Export praise document to csv */ - get: operations['PraiseController_exportCsv']; + get: operations["PraiseController_exportCsv"]; }; - '/api/praise/export/parquet': { + "/api/praise/export/parquet": { /** Export praise document to parquet */ - get: operations['PraiseController_exportParquet']; + get: operations["PraiseController_exportParquet"]; }; - '/api/praise/{id}': { + "/api/praise/{id}": { /** Find praise item by id */ - get: operations['PraiseController_findOne']; + get: operations["PraiseController_findOne"]; }; - '/api/praise/forward': { + "/api/praise/forward": { /** Forward praise item */ - post: operations['PraiseController_forward']; + post: operations["PraiseController_forward"]; }; - '/api/useraccounts': { + "/api/useraccounts": { /** UserAccount list */ - get: operations['UserAccountsController_findAll']; + get: operations["UserAccountsController_findAll"]; /** Create a UserAccount */ - post: operations['UserAccountsController_create']; + post: operations["UserAccountsController_create"]; }; - '/api/useraccounts/export/json': { + "/api/useraccounts/export/json": { /** Export userAccounts document to json */ - get: operations['UserAccountsController_exportJson']; + get: operations["UserAccountsController_exportJson"]; }; - '/api/useraccounts/export/csv': { + "/api/useraccounts/export/csv": { /** Export userAccounts document to csv */ - get: operations['UserAccountsController_exportCsv']; + get: operations["UserAccountsController_exportCsv"]; }; - '/api/useraccounts/export/parquet': { + "/api/useraccounts/export/parquet": { /** Export userAccounts document to parquet */ - get: operations['UserAccountsController_exportParquet']; + get: operations["UserAccountsController_exportParquet"]; }; - '/api/useraccounts/{id}': { + "/api/useraccounts/{id}": { /** Get a UserAccount. */ - get: operations['UserAccountsController_findOne']; + get: operations["UserAccountsController_findOne"]; /** Update UserAccount */ - patch: operations['UserAccountsController_update']; + patch: operations["UserAccountsController_update"]; }; - '/api/api-key': { + "/api/api-key": { /** List all API keys */ - get: operations['ApiKeyController_findAll']; + get: operations["ApiKeyController_findAll"]; /** Create API key */ - post: operations['ApiKeyController_createApiKey']; + post: operations["ApiKeyController_createApiKey"]; }; - '/api/api-key/{id}': { + "/api/api-key/{id}": { /** Get API key by ID */ - get: operations['ApiKeyController_findOne']; + get: operations["ApiKeyController_findOne"]; /** Update API key description */ - put: operations['ApiKeyController_updateApiKeyDescription']; + put: operations["ApiKeyController_updateApiKeyDescription"]; /** Revoke API key */ - delete: operations['ApiKeyController_revokeApiKey']; + delete: operations["ApiKeyController_revokeApiKey"]; }; - '/api/auth/eth-signature/nonce': { + "/api/auth/eth-signature/nonce": { /** Generates a nonce for the user and returns it */ - post: operations['EthSignatureController_nonce']; + post: operations["EthSignatureController_nonce"]; }; - '/api/auth/eth-signature/login': { + "/api/auth/eth-signature/login": { /** Verifies a user's signature and returns a JWT token */ - post: operations['EthSignatureController_login']; + post: operations["EthSignatureController_login"]; }; - '/api/auth/eth-signature/refresh': { + "/api/auth/eth-signature/refresh": { /** Verifies a refreshToken and returns a JWT token */ - post: operations['EthSignatureController_token']; + post: operations["EthSignatureController_token"]; }; - '/api/communities': { - get: operations['CommunityController_findAll']; + "/api/communities": { + get: operations["CommunityController_findAll"]; /** Create a new community */ - post: operations['CommunityController_create']; + post: operations["CommunityController_create"]; }; - '/api/communities/{id}': { - get: operations['CommunityController_findOne']; + "/api/communities/{id}": { + get: operations["CommunityController_findOne"]; /** Update community */ - patch: operations['CommunityController_update']; + patch: operations["CommunityController_update"]; }; - '/api/communities/isNameAvailable': { - get: operations['CommunityController_isNameAvailable']; + "/api/communities/isNameAvailable": { + get: operations["CommunityController_isNameAvailable"]; }; - '/api/communities/current': { - get: operations['CommunityController_current']; + "/api/communities/current": { + get: operations["CommunityController_current"]; }; - '/api/communities/{id}/discord/link': { + "/api/communities/{id}/discord/link": { /** Link discord to community */ - patch: operations['CommunityController_linkDiscord']; + patch: operations["CommunityController_linkDiscord"]; }; - '/api/quantifications/export/json': { + "/api/quantifications/export/json": { /** Export quantifications document to json */ - get: operations['QuantificationsController_exportJson']; + get: operations["QuantificationsController_exportJson"]; }; - '/api/quantifications/export/csv': { + "/api/quantifications/export/csv": { /** Export quantifications document to csv */ - get: operations['QuantificationsController_exportCsv']; + get: operations["QuantificationsController_exportCsv"]; }; - '/api/quantifications/export/parquet': { + "/api/quantifications/export/parquet": { /** Export quantifications document to parquet */ - get: operations['QuantificationsController_exportParquet']; + get: operations["QuantificationsController_exportParquet"]; }; - '/api/quantifications/multiple': { + "/api/quantifications/multiple": { /** Quantify multiple praise items */ - patch: operations['QuantificationsController_quantifyMultiple']; + patch: operations["QuantificationsController_quantifyMultiple"]; }; - '/api/quantifications/{id}': { + "/api/quantifications/{id}": { /** Quantify praise item by id */ - patch: operations['QuantificationsController_quantify']; + patch: operations["QuantificationsController_quantify"]; }; - '/api/reports': { + "/api/reports": { /** List all report manifests */ - get: operations['ReportsController_listAllReports']; + get: operations["ReportsController_listAllReports"]; }; - '/api/reports/receiverBio/{userAccountId}': { + "/api/reports/receiverBio/{userAccountId}": { /** Get one AI generated receiver bio */ - get: operations['ReportsController_receiverBio']; + get: operations["ReportsController_receiverBio"]; }; - '/api/reports/receiverLabels/{userAccountId}': { + "/api/reports/receiverLabels/{userAccountId}": { /** AI generated labels describing a praise receiver. */ - get: operations['ReportsController_receiverLabels']; + get: operations["ReportsController_receiverLabels"]; }; } @@ -277,17 +278,7 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -296,7 +287,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -319,18 +310,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -345,18 +326,8 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ( - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB' - )[]; - accounts: readonly components['schemas']['UserAccount'][]; + roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + accounts: readonly (components["schemas"]["UserAccount"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -374,16 +345,7 @@ export interface components { }; UpdateUserRoleInputDto: { /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; Period: { /** @example 621f802b813dbdba9eeaf7d7 */ @@ -391,7 +353,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ startDate: string; /** Format: date-time */ @@ -422,7 +384,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Period'][]; + docs: readonly (components["schemas"]["Period"])[]; meta?: Record; }; Quantification: { @@ -441,12 +403,12 @@ export interface components { /** @example 639b178f19296ee0f2d0585d */ praise: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ updatedAt: string; @@ -466,7 +428,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: components['schemas']['Quantification'][]; + quantifications: (components["schemas"]["Quantification"])[]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -496,7 +458,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; + status: "OPEN" | "QUANTIFY" | "CLOSED"; /** Format: date-time */ startDate: string; /** Format: date-time */ @@ -507,9 +469,9 @@ export interface components { createdAt: string; /** Format: date-time */ updatedAt: string; - quantifiers?: readonly components['schemas']['PeriodDetailsQuantifierDto'][]; - givers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; - receivers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; + quantifiers?: readonly (components["schemas"]["PeriodDetailsQuantifierDto"])[]; + givers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; + receivers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; /** @example 543 */ numberOfPraise: number; }; @@ -556,10 +518,10 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccountWithUserRefDto']; - giver: components['schemas']['UserAccountWithUserRefDto']; - forwarder?: components['schemas']['UserAccountWithUserRefDto']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccountWithUserRefDto"]; + giver: components["schemas"]["UserAccountWithUserRefDto"]; + forwarder?: components["schemas"]["UserAccountWithUserRefDto"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -567,12 +529,12 @@ export interface components { }; VerifyQuantifierPoolSizeDto: { /** - * @description The number of quantifiers in the pool + * @description The number of quantifiers in the pool * @example 10 */ quantifierPoolSize: number; /** - * @description The number of quantifiers needed in the pool + * @description The number of quantifiers needed in the pool * @example 10 */ quantifierPoolSizeNeeded: number; @@ -598,18 +560,18 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components['schemas']['UserAccount']; - giver: components['schemas']['UserAccount']; - forwarder?: components['schemas']['UserAccount']; - quantifications: readonly components['schemas']['Quantification'][]; + receiver: components["schemas"]["UserAccount"]; + giver: components["schemas"]["UserAccount"]; + forwarder?: components["schemas"]["UserAccount"]; + quantifications: readonly (components["schemas"]["Quantification"])[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; ReplaceQuantifierResponseDto: { - praises: readonly components['schemas']['Praise'][]; - period: components['schemas']['PeriodDetailsDto']; + praises: readonly (components["schemas"]["Praise"])[]; + period: components["schemas"]["PeriodDetailsDto"]; }; UserAccountNoUserId: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -629,15 +591,7 @@ export interface components { }; EventLogType: { /** @enum {string} */ - key: - | 'PERMISSION' - | 'AUTHENTICATION' - | 'PERIOD' - | 'PRAISE' - | 'QUANTIFICATION' - | 'SETTING' - | 'USER_ACCOUNT' - | 'COMMUNITY'; + key: "PERMISSION" | "AUTHENTICATION" | "PERIOD" | "PRAISE" | "QUANTIFICATION" | "SETTING" | "USER_ACCOUNT" | "COMMUNITY"; /** @example An action that changes user permissions */ label: string; /** @example A user's permissions were changed */ @@ -646,22 +600,22 @@ export interface components { EventLog: { /** @example 621f802b813dbdba9eeaf7d7 */ _id: string; - user?: components['schemas']['User']; - useraccount?: components['schemas']['UserAccountNoUserId']; + user?: components["schemas"]["User"]; + useraccount?: components["schemas"]["UserAccountNoUserId"]; /** @example 621f802b813dbdba9eeaf7d7 */ apiKey?: string; /** @example 621f802b813dbdba9eeaf7d7 */ period?: string; - type: components['schemas']['EventLogType']; + type: components["schemas"]["EventLogType"]; /** @example A description of the event */ description: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ updatedAt: string; @@ -685,7 +639,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['EventLog'][]; + docs: readonly (components["schemas"]["EventLog"])[]; meta?: Record; }; Setting: { @@ -696,21 +650,11 @@ export interface components { /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; /** @example 555 */ defaultValue: string; /** @enum {string} */ - type: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example Quantifiers Per Praise */ label: string; /** @example How many redundant quantifications are assigned to each praise? */ @@ -730,12 +674,12 @@ export interface components { PeriodSetting: { /** @example 62291b7ea8b1619f78818524 */ _id: string; - period: components['schemas']['Period']; - setting: components['schemas']['Setting']; + period: components["schemas"]["Period"]; + setting: components["schemas"]["Setting"]; /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | string[] | boolean | number | number[]; + valueRealized: string | (string)[] | boolean | number | (number)[]; }; SetPeriodSettingDto: { /** @example 666 */ @@ -760,7 +704,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Praise'][]; + docs: readonly (components["schemas"]["Praise"])[]; meta?: Record; }; PraiseCreateInputDto: { @@ -772,8 +716,8 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; }; PraiseForwardInputDto: { /** @example for making edits in the welcome text */ @@ -784,9 +728,9 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: string[]; - giver: components['schemas']['UserAccount']; - forwarder: components['schemas']['UserAccount']; + receiverIds: (string)[]; + giver: components["schemas"]["UserAccount"]; + forwarder: components["schemas"]["UserAccount"]; }; CreateUserAccountInputDto: { /** @example 098098098098098 */ @@ -805,7 +749,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -838,7 +782,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components['schemas']['UserNoUserAccountsDto']; + user?: components["schemas"]["UserNoUserAccountsDto"]; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -858,16 +802,7 @@ export interface components { /** @example My API Key */ description: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; }; CreateApiKeyResponseDto: { /** @example 639b178f19296ee0f2d0585d */ @@ -879,16 +814,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -906,16 +832,7 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: - | 'USER' - | 'QUANTIFIER' - | 'FORWARDER' - | 'ADMIN' - | 'ROOT' - | 'API_KEY_READWRITE' - | 'API_KEY_READ' - | 'API_KEY_DISCORD_BOT' - | 'API_KEY_SETUP_WEB'; + role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -949,7 +866,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components['schemas']['User']; + user: components["schemas"]["User"]; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -970,7 +887,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -991,7 +908,7 @@ export interface components { * "0x345.." * ] */ - owners: string[]; + owners: (string)[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -999,7 +916,7 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ - discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; + discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; /** * @example { * "attestations": true @@ -1020,7 +937,7 @@ export interface components { * "0x345.." * ] */ - owners?: string[]; + owners?: (string)[]; }; CommunityFindAllResponseDto: { /** @example 1200 */ @@ -1041,7 +958,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly components['schemas']['Community'][]; + docs: readonly (components["schemas"]["Community"])[]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -1059,7 +976,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components['schemas']['QuantifyInputDto']; + params: components["schemas"]["QuantifyInputDto"]; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -1067,59 +984,59 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: string[]; + praiseIds: (string)[]; }; ConfigurationValueItemsDto: { /** - * @description Allowed array types - * @example string + * @description Allowed array types + * @example string * @enum {string} */ - type: 'string' | 'number'; + type: "string" | "number"; }; ConfigurationValueDto: { /** - * @description Type of the setting - * @example string + * @description Type of the setting + * @example string * @enum {string} */ - type: 'string' | 'number' | 'boolean' | 'array'; + type: "string" | "number" | "boolean" | "array"; /** - * @description Default value for the setting + * @description Default value for the setting * @example 666 */ - default: number | string | boolean | number[] | string[]; + default: number | string | boolean | (number)[] | (string)[]; /** - * @description Description of the setting + * @description Description of the setting * @example Description of the string setting */ description: string; /** - * @description Markdown description of the setting + * @description Markdown description of the setting * @example Description of the string setting */ markdownDescription?: string; /** - * @description Edit presentation style - * @example multiline + * @description Edit presentation style + * @example multiline * @enum {string} */ - editPresentation?: 'multiline'; + editPresentation?: "multiline"; /** - * @description Order of the setting + * @description Order of the setting * @example 1 */ order?: number; /** - * @description Enum values for string type settings + * @description Enum values for string type settings * @example [ * "left", * "right" * ] */ - enum?: string[]; + enum?: (string)[]; /** @description Defines the type of items for array settings */ - items?: components['schemas']['ConfigurationValueItemsDto']; + items?: components["schemas"]["ConfigurationValueItemsDto"]; }; ReportManifestDto: { /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ @@ -1148,18 +1065,16 @@ export interface components { * "Praise receiver reports" * ] */ - categories: string[]; + categories: (string)[]; /** * @example [ * "toplist" * ] */ - keywords: string[]; + keywords: (string)[]; /** @description Configuration settings for the report */ configuration: { - [key: string]: - | components['schemas']['ConfigurationValueDto'] - | undefined; + [key: string]: components["schemas"]["ConfigurationValueDto"] | undefined; }; }; }; @@ -1173,23 +1088,24 @@ export interface components { export type external = Record; export interface operations { + /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ ActivateController_activate: { requestBody: { content: { - 'application/json': components['schemas']['ActivateInputDto']; + "application/json": components["schemas"]["ActivateInputDto"]; }; }; responses: { /** @description The created (or updated) user. */ 200: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; 201: { content: { - 'application/json': components['schemas']['User']; + "application/json": components["schemas"]["User"]; }; }; }; @@ -1199,7 +1115,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1209,7 +1125,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1219,7 +1135,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1229,7 +1145,7 @@ export interface operations { /** @description All users */ 200: { content: { - 'application/json': components['schemas']['User'][]; + "application/json": (components["schemas"]["User"])[]; }; }; }; @@ -1244,7 +1160,7 @@ export interface operations { /** @description A single user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1258,14 +1174,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRequestDto']; + "application/json": components["schemas"]["UpdateUserRequestDto"]; }; }; responses: { /** @description Updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1278,14 +1194,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1298,14 +1214,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateUserRoleInputDto']; + "application/json": components["schemas"]["UpdateUserRoleInputDto"]; }; }; responses: { /** @description The updated user */ 200: { content: { - 'application/json': components['schemas']['UserWithStatsDto']; + "application/json": components["schemas"]["UserWithStatsDto"]; }; }; }; @@ -1315,7 +1231,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1325,7 +1241,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1335,7 +1251,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1349,14 +1265,14 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; }; }; responses: { /** @description Periods */ 200: { content: { - 'application/json': components['schemas']['PeriodPaginatedResponseDto']; + "application/json": components["schemas"]["PeriodPaginatedResponseDto"]; }; }; }; @@ -1365,19 +1281,19 @@ export interface operations { PeriodsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreatePeriodInputDto']; + "application/json": components["schemas"]["CreatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; 201: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1393,7 +1309,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1407,14 +1323,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdatePeriodInputDto']; + "application/json": components["schemas"]["UpdatePeriodInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1430,7 +1346,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1446,7 +1362,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1463,7 +1379,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1480,7 +1396,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1497,7 +1413,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; + "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; }; }; }; @@ -1513,7 +1429,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; + "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; }; }; }; @@ -1529,7 +1445,7 @@ export interface operations { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['PeriodDetailsDto']; + "application/json": components["schemas"]["PeriodDetailsDto"]; }; }; }; @@ -1543,14 +1459,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['ReplaceQuantifierInputDto']; + "application/json": components["schemas"]["ReplaceQuantifierInputDto"]; }; }; responses: { /** @description Period */ 200: { content: { - 'application/json': components['schemas']['ReplaceQuantifierResponseDto']; + "application/json": components["schemas"]["ReplaceQuantifierResponseDto"]; }; }; }; @@ -1564,16 +1480,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; search?: string; - types?: string[]; + types?: (string)[]; }; }; responses: { /** @description Paginated event logs */ 200: { content: { - 'application/json': components['schemas']['EventLogPaginatedResponseDto']; + "application/json": components["schemas"]["EventLogPaginatedResponseDto"]; }; }; }; @@ -1584,7 +1500,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - 'application/json': components['schemas']['EventLogType'][]; + "application/json": (components["schemas"]["EventLogType"])[]; }; }; }; @@ -1595,17 +1511,7 @@ export interface operations { query?: { /** @example SETTING_KEY */ key?: string; - type?: - | 'Integer' - | 'Float' - | 'String' - | 'Textarea' - | 'Boolean' - | 'IntegerList' - | 'StringList' - | 'Image' - | 'Radio' - | 'JSON'; + type?: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; /** @example 0 */ group?: number; /** @example 0 */ @@ -1616,7 +1522,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - 'application/json': components['schemas']['Setting'][]; + "application/json": (components["schemas"]["Setting"])[]; }; }; }; @@ -1632,7 +1538,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1646,14 +1552,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetSettingDto']; + "application/json": components["schemas"]["SetSettingDto"]; }; }; responses: { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1669,7 +1575,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - 'application/json': components['schemas']['Setting']; + "application/json": components["schemas"]["Setting"]; }; }; }; @@ -1684,7 +1590,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': Record; + "application/json": Record; }; }; }; @@ -1700,7 +1606,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting'][]; + "application/json": (components["schemas"]["PeriodSetting"])[]; }; }; }; @@ -1717,7 +1623,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1732,14 +1638,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['SetPeriodSettingDto']; + "application/json": components["schemas"]["SetPeriodSettingDto"]; }; }; responses: { /** @description Updated period setting */ 200: { content: { - 'application/json': components['schemas']['PeriodSetting']; + "application/json": components["schemas"]["PeriodSetting"]; }; }; }; @@ -1753,7 +1659,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; giver?: string; receiver?: string; }; @@ -1762,7 +1668,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - 'application/json': components['schemas']['PraisePaginatedResponseDto']; + "application/json": components["schemas"]["PraisePaginatedResponseDto"]; }; }; }; @@ -1771,19 +1677,19 @@ export interface operations { PraiseController_praise: { requestBody: { content: { - 'application/json': components['schemas']['PraiseCreateInputDto']; + "application/json": components["schemas"]["PraiseCreateInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1799,7 +1705,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1815,7 +1721,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1831,7 +1737,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1847,7 +1753,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; }; @@ -1856,19 +1762,19 @@ export interface operations { PraiseController_forward: { requestBody: { content: { - 'application/json': components['schemas']['PraiseForwardInputDto']; + "application/json": components["schemas"]["PraiseForwardInputDto"]; }; }; responses: { /** @description Praise item */ 200: { content: { - 'application/json': components['schemas']['Praise']; + "application/json": components["schemas"]["Praise"]; }; }; 201: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -1888,7 +1794,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1897,13 +1803,13 @@ export interface operations { UserAccountsController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateUserAccountInputDto']; + "application/json": components["schemas"]["CreateUserAccountInputDto"]; }; }; responses: { 201: { content: { - 'application/json': components['schemas']['CreateUserAccountResponseDto']; + "application/json": components["schemas"]["CreateUserAccountResponseDto"]; }; }; }; @@ -1913,7 +1819,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -1923,7 +1829,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -1933,7 +1839,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -1949,7 +1855,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - 'application/json': components['schemas']['UserAccount']; + "application/json": components["schemas"]["UserAccount"]; }; }; }; @@ -1958,13 +1864,13 @@ export interface operations { UserAccountsController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateUserAccountInputDto']; + "application/json": components["schemas"]["UpdateUserAccountInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['UpdateUserAccountResponseDto']; + "application/json": components["schemas"]["UpdateUserAccountResponseDto"]; }; }; }; @@ -1975,7 +1881,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - 'application/json': components['schemas']['ApiKey'][]; + "application/json": (components["schemas"]["ApiKey"])[]; }; }; }; @@ -1984,14 +1890,14 @@ export interface operations { ApiKeyController_createApiKey: { requestBody: { content: { - 'application/json': components['schemas']['CreateApiKeyInputDto']; + "application/json": components["schemas"]["CreateApiKeyInputDto"]; }; }; responses: { /** @description API key created */ 201: { content: { - 'application/json': components['schemas']['CreateApiKeyResponseDto']; + "application/json": components["schemas"]["CreateApiKeyResponseDto"]; }; }; }; @@ -2007,7 +1913,7 @@ export interface operations { /** @description An API key */ 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2021,19 +1927,19 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['UpdateDescriptionInputDto']; + "application/json": components["schemas"]["UpdateDescriptionInputDto"]; }; }; responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description API key with updated description */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2048,13 +1954,13 @@ export interface operations { responses: { 200: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; /** @description Revoked API key */ 201: { content: { - 'application/json': components['schemas']['ApiKey']; + "application/json": components["schemas"]["ApiKey"]; }; }; }; @@ -2064,14 +1970,14 @@ export interface operations { /** @description A request containing the user identityEthAddress */ requestBody: { content: { - 'application/json': components['schemas']['NonceInputDto']; + "application/json": components["schemas"]["NonceInputDto"]; }; }; responses: { /** @description Nonce generated successfully */ 201: { content: { - 'application/json': components['schemas']['NonceResponseDto']; + "application/json": components["schemas"]["NonceResponseDto"]; }; }; }; @@ -2084,20 +1990,20 @@ export interface operations { }; }; /** - * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: - * + * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: + * * ```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\n\nADDRESS:\n[identityEthAddress]\n\nNONCE:\n[nonce]``` */ requestBody: { content: { - 'application/json': components['schemas']['LoginInputDto']; + "application/json": components["schemas"]["LoginInputDto"]; }; }; responses: { /** @description User authenticated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2111,14 +2017,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['GenerateTokenDto']; + "application/json": components["schemas"]["GenerateTokenDto"]; }; }; responses: { /** @description Tokens generated successfully */ 201: { content: { - 'application/json': components['schemas']['LoginResponseDto']; + "application/json": components["schemas"]["LoginResponseDto"]; }; }; }; @@ -2131,7 +2037,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: 'asc' | 'desc'; + sortType?: "asc" | "desc"; /** @example hostname.givepraise.xyz */ hostname?: string; }; @@ -2140,7 +2046,7 @@ export interface operations { /** @description All communities */ 200: { content: { - 'application/json': components['schemas']['CommunityFindAllResponseDto']; + "application/json": components["schemas"]["CommunityFindAllResponseDto"]; }; }; }; @@ -2149,19 +2055,19 @@ export interface operations { CommunityController_create: { requestBody: { content: { - 'application/json': components['schemas']['CreateCommunityInputDto']; + "application/json": components["schemas"]["CreateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; 201: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2176,7 +2082,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2185,14 +2091,14 @@ export interface operations { CommunityController_update: { requestBody: { content: { - 'application/json': components['schemas']['UpdateCommunityInputDto']; + "application/json": components["schemas"]["UpdateCommunityInputDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2208,7 +2114,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - 'application/json': components['schemas']['IsNameAvailableResponseDto']; + "application/json": components["schemas"]["IsNameAvailableResponseDto"]; }; }; }; @@ -2218,7 +2124,7 @@ export interface operations { /** @description Returns the current community, based on hostname */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2227,14 +2133,14 @@ export interface operations { CommunityController_linkDiscord: { requestBody: { content: { - 'application/json': components['schemas']['LinkDiscordBotDto']; + "application/json": components["schemas"]["LinkDiscordBotDto"]; }; }; responses: { /** @description Community */ 200: { content: { - 'application/json': components['schemas']['Community']; + "application/json": components["schemas"]["Community"]; }; }; }; @@ -2250,7 +2156,7 @@ export interface operations { responses: { 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2266,7 +2172,7 @@ export interface operations { responses: { 200: { content: { - 'text/csv': string; + "text/csv": string; }; }; }; @@ -2282,7 +2188,7 @@ export interface operations { responses: { 200: { content: { - 'application/octet-stream': string; + "application/octet-stream": string; }; }; }; @@ -2291,14 +2197,14 @@ export interface operations { QuantificationsController_quantifyMultiple: { requestBody: { content: { - 'application/json': components['schemas']['QuantifyMultipleInputDto']; + "application/json": components["schemas"]["QuantifyMultipleInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2312,14 +2218,14 @@ export interface operations { }; requestBody: { content: { - 'application/json': components['schemas']['QuantifyInputDto']; + "application/json": components["schemas"]["QuantifyInputDto"]; }; }; responses: { /** @description Praise items */ 200: { content: { - 'application/json': components['schemas']['Praise'][]; + "application/json": (components["schemas"]["Praise"])[]; }; }; }; @@ -2330,7 +2236,7 @@ export interface operations { /** @description A list of report manifests */ 200: { content: { - 'application/json': components['schemas']['ReportManifestDto'][]; + "application/json": (components["schemas"]["ReportManifestDto"])[]; }; }; /** @description An error occurred while fetching report manifests */ @@ -2348,7 +2254,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; @@ -2364,7 +2270,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - 'application/json': string; + "application/json": string; }; }; }; diff --git a/packages/api/openapi.json b/packages/api/openapi.json index 3a9134575..2f403b294 100644 --- a/packages/api/openapi.json +++ b/packages/api/openapi.json @@ -1,5 +1 @@ -<<<<<<< HEAD -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":4,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityPaginatedResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":4,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"SettingDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"type":"object","description":"Default value for the setting","example":"Some string"},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"type":"object","properties":{"type":{"required":true,"type":"object"}}}},"required":["type","default","description","markdownDescription","order","items"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/SettingDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} -======= -{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":2,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityFindAllResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/current":{"get":{"operationId":"CommunityController_current","parameters":[],"responses":{"200":{"description":"Returns the current community, based on hostname","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","endDate","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"endDate":{"format":"date-time","type":"string","readOnly":true},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","endDate","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]},"features":{"type":"object","example":{"attestations":true}}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState","features"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityFindAllResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"string"}}]},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/ConfigurationValueDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} ->>>>>>> main +{"openapi":"3.0.0","paths":{"/api/activate":{"post":{"operationId":"ActivateController_activate","summary":"Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateInputDto"}}}},"responses":{"200":{"description":"The created (or updated) user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"tags":["Activate"]}},"/api/users/export/json":{"get":{"operationId":"UsersController_exportJson","summary":"Export users document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/csv":{"get":{"operationId":"UsersController_exportCsv","summary":"Export users document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users/export/parquet":{"get":{"operationId":"UsersController_exportParquet","summary":"Export users document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Users"]}},"/api/users":{"get":{"operationId":"UsersController_findAll","parameters":[],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}},"tags":["Users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]},"patch":{"operationId":"UsersController_update","summary":"Updates a user","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequestDto"}}}},"responses":{"200":{"description":"Updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/addRole":{"patch":{"operationId":"UsersController_addRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/users/{id}/removeRole":{"patch":{"operationId":"UsersController_removeRole","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRoleInputDto"}}}},"responses":{"200":{"description":"The updated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWithStatsDto"}}}}},"tags":["Users"]}},"/api/periods/export/json":{"get":{"operationId":"PeriodsController_exportJson","summary":"Export periods document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/csv":{"get":{"operationId":"PeriodsController_exportCsv","summary":"Export periods document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods/export/parquet":{"get":{"operationId":"PeriodsController_exportParquet","summary":"Export periods document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Periods"]}},"/api/periods":{"get":{"operationId":"PeriodsController_findAllPaginated","summary":"List all periods","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"description":"Periods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodPaginatedResponseDto"}}}}},"tags":["Periods"]},"post":{"operationId":"PeriodsController_create","summary":"Create a new period","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}":{"get":{"operationId":"PeriodsController_findOne","summary":"Find period by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodsController_update","summary":"Update a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePeriodInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/close":{"patch":{"operationId":"PeriodsController_close","summary":"Close a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/praise":{"get":{"operationId":"PeriodsController_praise","summary":"Fetch all Praise in a period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/receiver/{receiverId}":{"get":{"operationId":"PeriodsController_praiseByReceiver","summary":"Fetch all Praise in a period for a given receiver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"receiverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/giver/{giverId}":{"get":{"operationId":"PeriodsController_praiseByGiver","summary":"Fetch all Praise in a period for a given giver","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"giverId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/praise/quantifier/{quantifierId}":{"get":{"operationId":"PeriodsController_praiseByQuantifier","summary":"Fetch all Praise in a period for a given quantifier","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"quantifierId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PraiseWithUserAccountsWithUserRefDto"}}}}}},"tags":["Periods"]}},"/api/periods/{id}/verifyQuantifierPoolSize":{"get":{"operationId":"PeriodsController_verifyQuantifierPoolSize","summary":"Verify quantifier pool size","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyQuantifierPoolSizeDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/assignQuantifiers":{"patch":{"operationId":"PeriodsController_assignQuantifiers","summary":"Assign quantifiers to period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodDetailsDto"}}}}},"tags":["Periods"]}},"/api/periods/{id}/replaceQuantifier":{"patch":{"operationId":"PeriodsController_replaceQuantifier","summary":"Replace quantifier in period","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierInputDto"}}}},"responses":{"200":{"description":"Period","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplaceQuantifierResponseDto"}}}}},"tags":["Periods"]}},"/api/event-log":{"get":{"operationId":"EventLogController_findAllPaginated","summary":"List event logs, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"types","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Paginated event logs","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventLogPaginatedResponseDto"}}}}},"tags":["Event Log"]}},"/api/event-log/types":{"get":{"operationId":"EventLogController_types","summary":"List event log types","parameters":[],"responses":{"200":{"description":"Event log types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventLogType"}}}}}},"tags":["Event Log"]}},"/api/settings":{"get":{"operationId":"SettingsController_findAll","summary":"List all settings.","parameters":[{"name":"key","required":false,"in":"query","readOnly":true,"example":"SETTING_KEY","schema":{"type":"string"}},{"name":"type","required":false,"in":"query","readOnly":true,"schema":{"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"],"type":"string"}},{"name":"group","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}},{"name":"subgroup","required":false,"in":"query","readOnly":true,"example":0,"schema":{"type":"number"}}],"responses":{"200":{"description":"All settings.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Setting"}}}}}},"tags":["Settings"]}},"/api/settings/{id}":{"get":{"operationId":"SettingsController_findOne","summary":"Get a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]},"patch":{"operationId":"SettingsController_set","summary":"Set a value for a setting.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSettingDto"}}}},"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/{id}/upload":{"patch":{"operationId":"SettingsController_setWithUpload","summary":"Upload a file for a setting","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Updated setting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}}},"tags":["Settings"]}},"/api/settings/uploads/{file}":{"get":{"operationId":"SettingsController_serveUpload","summary":"Serve an uploaded settings file.","parameters":[{"name":"file","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["Settings"]}},"/api/periods/{periodId}/settings":{"get":{"operationId":"PeriodSettingsController_findAll","summary":"List all period settings.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"All period settings","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PeriodSetting"}}}}}},"tags":["Periods"]}},"/api/periods/{periodId}/settings/{settingId}":{"get":{"operationId":"PeriodSettingsController_findOne","summary":"Get a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]},"patch":{"operationId":"PeriodSettingsController_set","summary":"Set value for a period setting.","parameters":[{"name":"periodId","required":true,"in":"path","schema":{"type":"string"}},{"name":"settingId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPeriodSettingDto"}}}},"responses":{"200":{"description":"Updated period setting","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodSetting"}}}}},"tags":["Periods"]}},"/api/praise":{"get":{"operationId":"PraiseController_findAllPaginated","summary":"List praise items, paginated results","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"giver","required":false,"in":"query","schema":{"type":"string"}},{"name":"receiver","required":false,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated praise items","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraisePaginatedResponseDto"}}}}},"tags":["Praise"]},"post":{"operationId":"PraiseController_praise","summary":"Create praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseCreateInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/praise/export/json":{"get":{"operationId":"PraiseController_exportJson","summary":"Export praise document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/csv":{"get":{"operationId":"PraiseController_exportCsv","summary":"Export praise document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/export/parquet":{"get":{"operationId":"PraiseController_exportParquet","summary":"Export praise document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Praise"]}},"/api/praise/{id}":{"get":{"operationId":"PraiseController_findOne","summary":"Find praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}}},"tags":["Praise"]}},"/api/praise/forward":{"post":{"operationId":"PraiseController_forward","summary":"Forward praise item","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PraiseForwardInputDto"}}}},"responses":{"200":{"description":"Praise item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Praise"}}}},"201":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Praise"]}},"/api/useraccounts":{"post":{"operationId":"UserAccountsController_create","summary":"Create a UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountInputDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]},"get":{"operationId":"UserAccountsController_findAll","summary":"UserAccount list","parameters":[{"name":"accountId","required":false,"in":"query","example":"098098098098098","schema":{"minLength":10,"maxLength":255,"type":"string"}},{"name":"name","required":false,"in":"query","example":"darth#6755","schema":{"minLength":2,"maxLength":32,"type":"string"}},{"name":"user","required":false,"in":"query","example":"63b428f7d9ca4f6ff5370d05","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/json":{"get":{"operationId":"UserAccountsController_exportJson","summary":"Export userAccounts document to json","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/csv":{"get":{"operationId":"UserAccountsController_exportCsv","summary":"Export userAccounts document to csv","parameters":[],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/export/parquet":{"get":{"operationId":"UserAccountsController_exportParquet","summary":"Export userAccounts document to parquet","parameters":[],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["UserAccounts"]}},"/api/useraccounts/{id}":{"get":{"operationId":"UserAccountsController_findOne","summary":"Get a UserAccount.","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"UserAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAccount"}}}}},"tags":["UserAccounts"]},"patch":{"operationId":"UserAccountsController_update","summary":"Update UserAccount","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserAccountResponseDto"}}}}},"tags":["UserAccounts"]}},"/api/api-key":{"post":{"operationId":"ApiKeyController_createApiKey","summary":"Create API key","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyInputDto"}}}},"responses":{"201":{"description":"API key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyResponseDto"}}}}},"tags":["API Key"]},"get":{"operationId":"ApiKeyController_findAll","summary":"List all API keys","parameters":[],"responses":{"200":{"description":"Array of API keys","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}},"tags":["API Key"]}},"/api/api-key/{id}":{"get":{"operationId":"ApiKeyController_findOne","summary":"Get API key by ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"An API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"put":{"operationId":"ApiKeyController_updateApiKeyDescription","summary":"Update API key description","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionInputDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"API key with updated description","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]},"delete":{"operationId":"ApiKeyController_revokeApiKey","summary":"Revoke API key","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"201":{"description":"Revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}}},"tags":["API Key"]}},"/api/auth/eth-signature/nonce":{"post":{"operationId":"EthSignatureController_nonce","summary":"Generates a nonce for the user and returns it","parameters":[],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceInputDto"}}}},"responses":{"201":{"description":"Nonce generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/login":{"post":{"operationId":"EthSignatureController_login","summary":"Verifies a user's signature and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: \n\n```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\\n\\nADDRESS:\\n[identityEthAddress]\\n\\nNONCE:\\n[nonce]```","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInputDto"}}}},"responses":{"201":{"description":"User authenticated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/auth/eth-signature/refresh":{"post":{"operationId":"EthSignatureController_token","summary":"Verifies a refreshToken and returns a JWT token","parameters":[{"name":"host","required":true,"in":"header","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateTokenDto"}}}},"responses":{"201":{"description":"Tokens generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}},"tags":["Authentication"]}},"/api/communities":{"post":{"operationId":"CommunityController_create","summary":"Create a new community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findAll","parameters":[{"name":"limit","required":true,"in":"query","example":10,"schema":{"type":"number"}},{"name":"page","required":true,"in":"query","example":1,"schema":{"type":"number"}},{"name":"sortColumn","required":false,"in":"query","schema":{"type":"string"}},{"name":"sortType","required":false,"in":"query","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"name":"hostname","required":false,"in":"query","example":"hostname.givepraise.xyz","schema":{"type":"string"}}],"responses":{"200":{"description":"All communities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommunityFindAllResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/{id}":{"patch":{"operationId":"CommunityController_update","summary":"Update community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommunityInputDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]},"get":{"operationId":"CommunityController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A single Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/isNameAvailable":{"get":{"operationId":"CommunityController_isNameAvailable","parameters":[{"name":"name","required":true,"in":"query","example":"test_12345","schema":{"type":"string"}}],"responses":{"200":{"description":"Checking whether the community name is available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsNameAvailableResponseDto"}}}}},"tags":["Communities"]}},"/api/communities/current":{"get":{"operationId":"CommunityController_current","parameters":[],"responses":{"200":{"description":"Returns the current community, based on hostname","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/communities/{id}/discord/link":{"patch":{"operationId":"CommunityController_linkDiscord","summary":"Link discord to community","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDiscordBotDto"}}}},"responses":{"200":{"description":"Community","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Community"}}}}},"tags":["Communities"]}},"/api/quantifications/export/json":{"get":{"operationId":"QuantificationsController_exportJson","summary":"Export quantifications document to json","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/csv":{"get":{"operationId":"QuantificationsController_exportCsv","summary":"Export quantifications document to csv","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"text/csv":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/export/parquet":{"get":{"operationId":"QuantificationsController_exportParquet","summary":"Export quantifications document to parquet","parameters":[{"name":"startDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"endDate","required":false,"in":"query","schema":{"format":"date-time","type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}},"tags":["Quantifications"]}},"/api/quantifications/multiple":{"patch":{"operationId":"QuantificationsController_quantifyMultiple","summary":"Quantify multiple praise items","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyMultipleInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/quantifications/{id}":{"patch":{"operationId":"QuantificationsController_quantify","summary":"Quantify praise item by id","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuantifyInputDto"}}}},"responses":{"200":{"description":"Praise items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Praise"}}}}}},"tags":["Quantifications"]}},"/api/reports":{"get":{"operationId":"ReportsController_listAllReports","summary":"List all report manifests","parameters":[],"responses":{"200":{"description":"A list of report manifests","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ReportManifestDto"}}}}},"500":{"description":"An error occurred while fetching report manifests"}},"tags":["Reports"]}},"/api/reports/receiverBio/{userAccountId}":{"get":{"operationId":"ReportsController_receiverBio","summary":"Get one AI generated receiver bio","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"A receiver bio","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}},"/api/reports/receiverLabels/{userAccountId}":{"get":{"operationId":"ReportsController_receiverLabels","summary":"AI generated labels describing a praise receiver.","parameters":[{"name":"userAccountId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Comma separated list of labels, 7 max","content":{"application/json":{"schema":{"type":"string"}}}}},"tags":["Reports"]}}},"info":{"title":"Praise API","description":"","version":"1.0.0","contact":{}},"tags":[],"servers":[],"components":{"schemas":{"ActivateInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"accountId":{"type":"string","example":"darth#3455"},"signature":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["identityEthAddress","accountId","signature"]},"UserNoUserAccountsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","createdAt","updatedAt"]},"UserAccount":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"User":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UserWithStatsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20},"roles":{"type":"array","readOnly":true,"items":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"accounts":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/UserAccount"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"receivedTotalScore":{"type":"number","readOnly":true},"receivedTotalCount":{"type":"number","readOnly":true},"givenTotalScore":{"type":"number","readOnly":true},"givenTotalCount":{"type":"number","readOnly":true}},"required":["_id","identityEthAddress","rewardsEthAddress","username","roles","accounts","createdAt","updatedAt"]},"UpdateUserRequestDto":{"type":"object","properties":{"rewardsEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1","maxLength":42},"username":{"type":"string","example":"darth","maxLength":20}},"required":["rewardsEthAddress","username"]},"UpdateUserRoleInputDto":{"type":"object","properties":{"role":{"enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"],"type":"string"}},"required":["role"]},"Period":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt"]},"PeriodPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Period"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Quantification":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"score":{"type":"number","readOnly":true,"example":144},"scoreRealized":{"type":"number","readOnly":true,"example":144},"dismissed":{"type":"boolean","readOnly":true,"example":true},"duplicatePraise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"quantifier":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"praise":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"createdAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"},"updatedAt":{"format":"date-time","type":"string","readOnly":true,"example":"2021-06-01T00:00:00.000Z"}},"required":["_id","score","scoreRealized","dismissed","duplicatePraise","quantifier","praise","createdAt","updatedAt"]},"PeriodDetailsQuantifierDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"5f9f1b9b9b9b9b9b9b9b9b9b"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"username":{"type":"string","example":"darth","maxLength":20},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"finishedCount":{"type":"number","readOnly":true,"example":1},"praiseCount":{"type":"number","readOnly":true,"example":1},"quantifications":{"type":"array","items":{"$ref":"#/components/schemas/Quantification"}}},"required":["_id","identityEthAddress","username","createdAt","updatedAt","finishedCount","praiseCount","quantifications"]},"PeriodDetailsGiverReceiverDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"praiseCount":{"type":"number","readOnly":true,"example":"5"},"score":{"type":"number","readOnly":true,"example":144}},"required":["_id","accountId","name","platform","createdAt","updatedAt","user","praiseCount","score"]},"PeriodDetailsDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"name":{"type":"string","example":"June 2021"},"status":{"type":"string","readOnly":true,"enum":["OPEN","QUANTIFY","CLOSED"]},"startDate":{"format":"date-time","type":"string","readOnly":true},"endDate":{"format":"date-time","type":"string","readOnly":true},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"quantifiers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsQuantifierDto"}},"givers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"receivers":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/PeriodDetailsGiverReceiverDto"}},"numberOfPraise":{"type":"number","readOnly":true,"example":543}},"required":["_id","name","status","startDate","endDate","attestationsTxHash","createdAt","updatedAt","numberOfPraise"]},"CreatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"endDate":{"type":"string"}},"required":["name","endDate"]},"UpdatePeriodInputDto":{"type":"object","properties":{"name":{"type":"string","example":"June 2021"},"attestationsTxHash":{"type":"string","example":"0x46164b8581258eec4b4f44d626925953d0d7581514d9fd1335e3bd660d48e07c"},"endDate":{"type":"string"}}},"UserAccountWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"type":"string","readOnly":true,"example":"621f802b813dbdba9eeaf7d7"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"PraiseWithUserAccountsWithUserRefDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"forwarder":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccountWithUserRefDto"}]},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"VerifyQuantifierPoolSizeDto":{"type":"object","properties":{"quantifierPoolSize":{"type":"number","description":"The number of quantifiers in the pool","example":10},"quantifierPoolSizeNeeded":{"type":"number","description":"The number of quantifiers needed in the pool","example":10},"quantifierPoolDeficitSize":{"type":"number","description":"","example":0}},"required":["quantifierPoolSize","quantifierPoolSizeNeeded","quantifierPoolDeficitSize"]},"ReplaceQuantifierInputDto":{"type":"object","properties":{"currentQuantifierId":{"type":"string","example":"639b178f19296ee0f2d0585d"},"newQuantifierId":{"type":"string","example":"639b178f19296ee0f2d05666"}},"required":["currentQuantifierId","newQuantifierId"]},"Praise":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"score":{"type":"number","readOnly":true,"example":144},"receiver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"giver":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/UserAccount"}]},"forwarder":{"$ref":"#/components/schemas/UserAccount"},"quantifications":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Quantification"}},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","reasonRaw","reason","sourceId","sourceName","score","receiver","giver","quantifications","createdAt","updatedAt"]},"ReplaceQuantifierResponseDto":{"type":"object","properties":{"praises":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/PeriodDetailsDto"}]}},"required":["praises","period"]},"UserAccountNoUserId":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"EventLogType":{"type":"object","properties":{"key":{"type":"string","enum":["PERMISSION","AUTHENTICATION","PERIOD","PRAISE","QUANTIFICATION","SETTING","USER_ACCOUNT","COMMUNITY"]},"label":{"type":"string","example":"An action that changes user permissions","maxLength":255},"description":{"type":"string","example":"A user's permissions were changed","maxLength":255}},"required":["key","label","description"]},"EventLog":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"user":{"$ref":"#/components/schemas/User"},"useraccount":{"$ref":"#/components/schemas/UserAccountNoUserId"},"apiKey":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"period":{"type":"string","example":"621f802b813dbdba9eeaf7d7"},"type":{"$ref":"#/components/schemas/EventLogType"},"description":{"type":"string","example":"A description of the event "},"createdAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"},"updatedAt":{"format":"date-time","type":"string","example":"2023-03-01T22:51:20.012Z"}},"required":["_id","type","description","createdAt","updatedAt"]},"EventLogPaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/EventLog"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"Setting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"621f802b813dbdbaddeaf799"},"key":{"type":"string","readOnly":true,"example":"SETTING_KEY"},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]},"defaultValue":{"type":"string","readOnly":true,"example":"555"},"type":{"type":"string","readOnly":true,"enum":["Integer","Float","String","Textarea","Boolean","IntegerList","StringList","Image","Radio","JSON"]},"label":{"type":"string","readOnly":true,"example":"Quantifiers Per Praise"},"description":{"type":"string","readOnly":true,"example":"How many redundant quantifications are assigned to each praise?"},"group":{"type":"number","readOnly":true,"example":0},"options":{"type":"string","readOnly":true},"subgroup":{"type":"number","readOnly":true,"example":0},"periodOverridable":{"type":"boolean","readOnly":true,"example":true}},"required":["_id","key","value","valueRealized","defaultValue","type","label","description","group","options","subgroup","periodOverridable"]},"SetSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PeriodSetting":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"62291b7ea8b1619f78818524"},"period":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Period"}]},"setting":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Setting"}]},"value":{"type":"string","example":"666","maxLength":512},"valueRealized":{"example":666,"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"number"}}]}},"required":["_id","period","setting","value","valueRealized"]},"SetPeriodSettingDto":{"type":"object","properties":{"value":{"type":"string","example":"666","maxLength":512}},"required":["value"]},"PraisePaginatedResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Praise"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"PraiseCreateInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver"]},"PraiseForwardInputDto":{"type":"object","properties":{"reasonRaw":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"reason":{"type":"string","readOnly":true,"example":"for making edits in the welcome text"},"sourceId":{"type":"string","readOnly":true,"example":"DISCORD:810180621930070088:810180622336262195"},"sourceName":{"type":"string","readOnly":true,"example":"DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise"},"receiverIds":{"type":"array","items":{"type":"string"}},"giver":{"$ref":"#/components/schemas/UserAccount"},"forwarder":{"$ref":"#/components/schemas/UserAccount"}},"required":["reasonRaw","reason","sourceId","sourceName","receiverIds","giver","forwarder"]},"CreateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}},"required":["accountId","name","platform"]},"CreateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"UpdateUserAccountInputDto":{"type":"object","properties":{"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"activateToken":{"type":"string","example":"jkhvuygi643jh35g53"},"user":{"type":"string","example":"63b428f7d9ca4f6ff5370d05"}}},"UpdateUserAccountResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"63b428f7d9ca4f6ff5370d05"},"user":{"$ref":"#/components/schemas/UserNoUserAccountsDto"},"accountId":{"type":"string","example":"098098098098098","minLength":10,"maxLength":255},"name":{"type":"string","example":"darth#6755","minLength":2,"maxLength":32},"avatarId":{"type":"string","example":"098098098087097","minLength":10,"maxLength":255},"platform":{"type":"string","example":"DISCORD","minLength":4,"maxLength":255},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"activateToken":{"type":"string","readOnly":true,"example":"jkhvuygi643jh35g53"}},"required":["_id","accountId","name","platform","createdAt","updatedAt"]},"CreateApiKeyInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]}},"required":["description","role"]},"CreateApiKeyResponseDto":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true},"key":{"type":"string","readOnly":true,"example":"1834a97caed67b244dd11fa5ef53aa74f13781ad0aea8148b8607d861d9f7535"}},"required":["_id","name","description","hash","role","createdAt","updatedAt","key"]},"ApiKey":{"type":"object","properties":{"_id":{"type":"string","readOnly":true,"example":"639b178f19296ee0f2d0585d"},"name":{"type":"string","readOnly":true,"example":"89f7edbd"},"description":{"type":"string","example":"My API Key"},"hash":{"type":"string","readOnly":true,"example":"$2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i"},"role":{"type":"string","enum":["USER","QUANTIFIER","FORWARDER","ADMIN","ROOT","API_KEY_READWRITE","API_KEY_READ","API_KEY_DISCORD_BOT","API_KEY_SETUP_WEB"]},"createdAt":{"format":"date-time","type":"string","readOnly":true},"updatedAt":{"format":"date-time","type":"string","readOnly":true}},"required":["_id","name","description","hash","role","createdAt","updatedAt"]},"UpdateDescriptionInputDto":{"type":"object","properties":{"description":{"type":"string","example":"My API Key"}},"required":["description"]},"NonceInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"}},"required":["identityEthAddress"]},"NonceResponseDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"nonce":{"type":"string","readOnly":true,"example":"uh9h998u98uj09noj"}},"required":["identityEthAddress","nonce"]},"LoginInputDto":{"type":"object","properties":{"identityEthAddress":{"type":"string","example":"0xAAB27b150451726EC7738aa1d0A94505c8729bd1"},"signature":{"type":"string"}},"required":["identityEthAddress","signature"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"refreshToken":{"type":"string","readOnly":true,"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"},"identityEthAddress":{"type":"string","readOnly":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"tokenType":{"type":"string","readOnly":true,"example":"bearer"},"user":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/User"}]}},"required":["accessToken","refreshToken","identityEthAddress","tokenType","user"]},"GenerateTokenDto":{"type":"object","properties":{"refreshToken":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA"}},"required":["refreshToken"]},"CreateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32}},"required":["hostname","name","email","creator","owners"]},"Community":{"type":"object","properties":{"_id":{"type":"string","example":"621f802b813dbdba9eeaf7b4"},"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"creator":{"type":"string","example":"0x123..","maxLength":42},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}},"discordGuildId":{"type":"string","example":"0980987846534","maxLength":32},"discordLinkNonce":{"type":"string","example":"oiujoiuoo8u","maxLength":255},"isPublic":{"type":"boolean","example":true},"discordLinkState":{"type":"string","enum":["NOT_SET","PENDING","ACTIVE","DEACTIVE"]},"features":{"type":"object","example":{"attestations":true}}},"required":["_id","hostname","name","email","creator","owners","discordLinkNonce","isPublic","discordLinkState","features"]},"UpdateCommunityInputDto":{"type":"object","properties":{"hostname":{"type":"string","example":"banklessdao.givepraise.xyz","maxLength":255},"name":{"type":"string","example":"BanklessDAO","minLength":4,"maxLength":20},"email":{"type":"string","example":"john.smith@banklessDao.com","maxLength":255},"owners":{"example":["0x123..","0x345.."],"type":"array","items":{"type":"string"}}}},"CommunityFindAllResponseDto":{"type":"object","properties":{"totalDocs":{"type":"number","readOnly":true,"example":1200},"limit":{"type":"number","readOnly":true,"example":10},"totalPages":{"type":"number","readOnly":true,"example":12},"page":{"type":"number","readOnly":true,"example":2},"pagingCounter":{"type":"number","readOnly":true,"example":1},"hasPrevPage":{"type":"object","readOnly":true,"example":false},"hasNextPage":{"type":"object","readOnly":true,"example":true},"prevPage":{"type":"object","readOnly":true,"example":1},"nextPage":{"type":"object","readOnly":true,"example":3},"docs":{"readOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Community"}},"meta":{"type":"object"}},"required":["totalDocs","limit","totalPages","pagingCounter","hasPrevPage","hasNextPage","docs"]},"IsNameAvailableResponseDto":{"type":"object","properties":{"available":{"type":"boolean","example":false}},"required":["available"]},"LinkDiscordBotDto":{"type":"object","properties":{"signedMessage":{"type":"string","example":"0xdb4bb91357b23083ec2a36dc1fe23e59b71434fc020542da7e983df206ed06611e275eb30e239508f9758c0608dca6cef5619c41b50a48f22bdb36a8dabc2d201c"}},"required":["signedMessage"]},"QuantifyInputDto":{"type":"object","properties":{"score":{"type":"number"},"dismissed":{"type":"boolean"},"duplicatePraise":{"type":"string","example":"639b178f19296ee0f2d0585d"}}},"QuantifyMultipleInputDto":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/QuantifyInputDto"},"praiseIds":{"example":["639b178f19296ee0f2d0585d","639b178f19296ee0f2d0585e","639b178f19296ee0f2d0585f"],"type":"array","items":{"type":"string"}}},"required":["params","praiseIds"]},"ConfigurationValueItemsDto":{"type":"object","properties":{"type":{"type":"string","description":"Allowed array types","enum":["string","number"],"example":"string"}},"required":["type"]},"ConfigurationValueDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of the setting","enum":["string","number","boolean","array"],"example":"string"},"default":{"description":"Default value for the setting","example":666,"oneOf":[{"type":"number"},{"type":"string"},{"type":"boolean"},{"type":"array","items":{"type":"number"}},{"type":"array","items":{"type":"string"}}]},"description":{"type":"string","description":"Description of the setting","example":"Description of the string setting"},"markdownDescription":{"type":"string","description":"Markdown description of the setting","example":"Description of the string setting"},"editPresentation":{"type":"string","description":"Edit presentation style","enum":["multiline"],"example":"multiline"},"order":{"type":"number","description":"Order of the setting","example":1},"enum":{"description":"Enum values for string type settings","example":["left","right"],"type":"array","items":{"type":"string"}},"items":{"description":"Defines the type of items for array settings","allOf":[{"$ref":"#/components/schemas/ConfigurationValueItemsDto"}]}},"required":["type","default","description"]},"ReportManifestDto":{"type":"object","properties":{"manifestUrl":{"type":"string","example":"https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json"},"name":{"type":"string","example":"simple-report"},"displayName":{"type":"string","example":"Simple Report"},"description":{"type":"string","example":"A simple report."},"version":{"type":"string","example":"1.2.3"},"author":{"type":"string","example":"General Magic"},"publisher":{"type":"string","example":"general-magic"},"license":{"type":"string","example":"MIT"},"repository":{"type":"string","example":"https://github.com/givepraise/reports"},"bugs":{"type":"string","example":"https://github.com/givepraise/reports/issues"},"categories":{"example":["Basic reports","Praise receiver reports"],"type":"array","items":{"type":"string"}},"keywords":{"example":["toplist"],"type":"array","items":{"type":"string"}},"configuration":{"type":"object","description":"Configuration settings for the report","additionalProperties":{"oneOf":[{"$ref":"#/components/schemas/ConfigurationValueDto"}]}}},"required":["name","displayName","description","version","author","publisher","license","repository","bugs","categories","keywords","configuration"]}}}} \ No newline at end of file diff --git a/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts b/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts index 4e7f11f45..aa59a057a 100644 --- a/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts +++ b/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts @@ -1,4 +1,4 @@ import { components } from 'api-types'; export type FindAllCommunitiesResponseDto = - components['schemas']['CommunityPaginatedResponseDto']; + components['schemas']['CommunityFindAllResponseDto']; From 35920017bed9f98566538f66f1e07a48f5061524 Mon Sep 17 00:00:00 2001 From: kristoferlund Date: Wed, 23 Aug 2023 12:45:20 +0000 Subject: [PATCH 49/63] Build openapi schema --- packages/api-types/out/schema.ts | 732 +++++++++++++++++-------------- 1 file changed, 413 insertions(+), 319 deletions(-) diff --git a/packages/api-types/out/schema.ts b/packages/api-types/out/schema.ts index c68f7ffc3..2f3f334e5 100644 --- a/packages/api-types/out/schema.ts +++ b/packages/api-types/out/schema.ts @@ -3,257 +3,256 @@ * Do not make direct changes to the file. */ - export interface paths { - "/api/activate": { + '/api/activate': { /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ - post: operations["ActivateController_activate"]; + post: operations['ActivateController_activate']; }; - "/api/users/export/json": { + '/api/users/export/json': { /** Export users document to json */ - get: operations["UsersController_exportJson"]; + get: operations['UsersController_exportJson']; }; - "/api/users/export/csv": { + '/api/users/export/csv': { /** Export users document to csv */ - get: operations["UsersController_exportCsv"]; + get: operations['UsersController_exportCsv']; }; - "/api/users/export/parquet": { + '/api/users/export/parquet': { /** Export users document to parquet */ - get: operations["UsersController_exportParquet"]; + get: operations['UsersController_exportParquet']; }; - "/api/users": { - get: operations["UsersController_findAll"]; + '/api/users': { + get: operations['UsersController_findAll']; }; - "/api/users/{id}": { - get: operations["UsersController_findOne"]; + '/api/users/{id}': { + get: operations['UsersController_findOne']; /** Updates a user */ - patch: operations["UsersController_update"]; + patch: operations['UsersController_update']; }; - "/api/users/{id}/addRole": { - patch: operations["UsersController_addRole"]; + '/api/users/{id}/addRole': { + patch: operations['UsersController_addRole']; }; - "/api/users/{id}/removeRole": { - patch: operations["UsersController_removeRole"]; + '/api/users/{id}/removeRole': { + patch: operations['UsersController_removeRole']; }; - "/api/periods/export/json": { + '/api/periods/export/json': { /** Export periods document to json */ - get: operations["PeriodsController_exportJson"]; + get: operations['PeriodsController_exportJson']; }; - "/api/periods/export/csv": { + '/api/periods/export/csv': { /** Export periods document to csv */ - get: operations["PeriodsController_exportCsv"]; + get: operations['PeriodsController_exportCsv']; }; - "/api/periods/export/parquet": { + '/api/periods/export/parquet': { /** Export periods document to parquet */ - get: operations["PeriodsController_exportParquet"]; + get: operations['PeriodsController_exportParquet']; }; - "/api/periods": { + '/api/periods': { /** List all periods */ - get: operations["PeriodsController_findAllPaginated"]; + get: operations['PeriodsController_findAllPaginated']; /** Create a new period */ - post: operations["PeriodsController_create"]; + post: operations['PeriodsController_create']; }; - "/api/periods/{id}": { + '/api/periods/{id}': { /** Find period by id */ - get: operations["PeriodsController_findOne"]; + get: operations['PeriodsController_findOne']; /** Update a period */ - patch: operations["PeriodsController_update"]; + patch: operations['PeriodsController_update']; }; - "/api/periods/{id}/close": { + '/api/periods/{id}/close': { /** Close a period */ - patch: operations["PeriodsController_close"]; + patch: operations['PeriodsController_close']; }; - "/api/periods/{id}/praise": { + '/api/periods/{id}/praise': { /** Fetch all Praise in a period */ - get: operations["PeriodsController_praise"]; + get: operations['PeriodsController_praise']; }; - "/api/periods/{periodId}/praise/receiver/{receiverId}": { + '/api/periods/{periodId}/praise/receiver/{receiverId}': { /** Fetch all Praise in a period for a given receiver */ - get: operations["PeriodsController_praiseByReceiver"]; + get: operations['PeriodsController_praiseByReceiver']; }; - "/api/periods/{periodId}/praise/giver/{giverId}": { + '/api/periods/{periodId}/praise/giver/{giverId}': { /** Fetch all Praise in a period for a given giver */ - get: operations["PeriodsController_praiseByGiver"]; + get: operations['PeriodsController_praiseByGiver']; }; - "/api/periods/{periodId}/praise/quantifier/{quantifierId}": { + '/api/periods/{periodId}/praise/quantifier/{quantifierId}': { /** Fetch all Praise in a period for a given quantifier */ - get: operations["PeriodsController_praiseByQuantifier"]; + get: operations['PeriodsController_praiseByQuantifier']; }; - "/api/periods/{id}/verifyQuantifierPoolSize": { + '/api/periods/{id}/verifyQuantifierPoolSize': { /** Verify quantifier pool size */ - get: operations["PeriodsController_verifyQuantifierPoolSize"]; + get: operations['PeriodsController_verifyQuantifierPoolSize']; }; - "/api/periods/{id}/assignQuantifiers": { + '/api/periods/{id}/assignQuantifiers': { /** Assign quantifiers to period */ - patch: operations["PeriodsController_assignQuantifiers"]; + patch: operations['PeriodsController_assignQuantifiers']; }; - "/api/periods/{id}/replaceQuantifier": { + '/api/periods/{id}/replaceQuantifier': { /** Replace quantifier in period */ - patch: operations["PeriodsController_replaceQuantifier"]; + patch: operations['PeriodsController_replaceQuantifier']; }; - "/api/event-log": { + '/api/event-log': { /** List event logs, paginated results */ - get: operations["EventLogController_findAllPaginated"]; + get: operations['EventLogController_findAllPaginated']; }; - "/api/event-log/types": { + '/api/event-log/types': { /** List event log types */ - get: operations["EventLogController_types"]; + get: operations['EventLogController_types']; }; - "/api/settings": { + '/api/settings': { /** List all settings. */ - get: operations["SettingsController_findAll"]; + get: operations['SettingsController_findAll']; }; - "/api/settings/{id}": { + '/api/settings/{id}': { /** Get a setting. */ - get: operations["SettingsController_findOne"]; + get: operations['SettingsController_findOne']; /** Set a value for a setting. */ - patch: operations["SettingsController_set"]; + patch: operations['SettingsController_set']; }; - "/api/settings/{id}/upload": { + '/api/settings/{id}/upload': { /** Upload a file for a setting */ - patch: operations["SettingsController_setWithUpload"]; + patch: operations['SettingsController_setWithUpload']; }; - "/api/settings/uploads/{file}": { + '/api/settings/uploads/{file}': { /** Serve an uploaded settings file. */ - get: operations["SettingsController_serveUpload"]; + get: operations['SettingsController_serveUpload']; }; - "/api/periods/{periodId}/settings": { + '/api/periods/{periodId}/settings': { /** List all period settings. */ - get: operations["PeriodSettingsController_findAll"]; + get: operations['PeriodSettingsController_findAll']; }; - "/api/periods/{periodId}/settings/{settingId}": { + '/api/periods/{periodId}/settings/{settingId}': { /** Get a period setting. */ - get: operations["PeriodSettingsController_findOne"]; + get: operations['PeriodSettingsController_findOne']; /** Set value for a period setting. */ - patch: operations["PeriodSettingsController_set"]; + patch: operations['PeriodSettingsController_set']; }; - "/api/praise": { + '/api/praise': { /** List praise items, paginated results */ - get: operations["PraiseController_findAllPaginated"]; + get: operations['PraiseController_findAllPaginated']; /** Create praise item */ - post: operations["PraiseController_praise"]; + post: operations['PraiseController_praise']; }; - "/api/praise/export/json": { + '/api/praise/export/json': { /** Export praise document to json */ - get: operations["PraiseController_exportJson"]; + get: operations['PraiseController_exportJson']; }; - "/api/praise/export/csv": { + '/api/praise/export/csv': { /** Export praise document to csv */ - get: operations["PraiseController_exportCsv"]; + get: operations['PraiseController_exportCsv']; }; - "/api/praise/export/parquet": { + '/api/praise/export/parquet': { /** Export praise document to parquet */ - get: operations["PraiseController_exportParquet"]; + get: operations['PraiseController_exportParquet']; }; - "/api/praise/{id}": { + '/api/praise/{id}': { /** Find praise item by id */ - get: operations["PraiseController_findOne"]; + get: operations['PraiseController_findOne']; }; - "/api/praise/forward": { + '/api/praise/forward': { /** Forward praise item */ - post: operations["PraiseController_forward"]; + post: operations['PraiseController_forward']; }; - "/api/useraccounts": { + '/api/useraccounts': { /** UserAccount list */ - get: operations["UserAccountsController_findAll"]; + get: operations['UserAccountsController_findAll']; /** Create a UserAccount */ - post: operations["UserAccountsController_create"]; + post: operations['UserAccountsController_create']; }; - "/api/useraccounts/export/json": { + '/api/useraccounts/export/json': { /** Export userAccounts document to json */ - get: operations["UserAccountsController_exportJson"]; + get: operations['UserAccountsController_exportJson']; }; - "/api/useraccounts/export/csv": { + '/api/useraccounts/export/csv': { /** Export userAccounts document to csv */ - get: operations["UserAccountsController_exportCsv"]; + get: operations['UserAccountsController_exportCsv']; }; - "/api/useraccounts/export/parquet": { + '/api/useraccounts/export/parquet': { /** Export userAccounts document to parquet */ - get: operations["UserAccountsController_exportParquet"]; + get: operations['UserAccountsController_exportParquet']; }; - "/api/useraccounts/{id}": { + '/api/useraccounts/{id}': { /** Get a UserAccount. */ - get: operations["UserAccountsController_findOne"]; + get: operations['UserAccountsController_findOne']; /** Update UserAccount */ - patch: operations["UserAccountsController_update"]; + patch: operations['UserAccountsController_update']; }; - "/api/api-key": { + '/api/api-key': { /** List all API keys */ - get: operations["ApiKeyController_findAll"]; + get: operations['ApiKeyController_findAll']; /** Create API key */ - post: operations["ApiKeyController_createApiKey"]; + post: operations['ApiKeyController_createApiKey']; }; - "/api/api-key/{id}": { + '/api/api-key/{id}': { /** Get API key by ID */ - get: operations["ApiKeyController_findOne"]; + get: operations['ApiKeyController_findOne']; /** Update API key description */ - put: operations["ApiKeyController_updateApiKeyDescription"]; + put: operations['ApiKeyController_updateApiKeyDescription']; /** Revoke API key */ - delete: operations["ApiKeyController_revokeApiKey"]; + delete: operations['ApiKeyController_revokeApiKey']; }; - "/api/auth/eth-signature/nonce": { + '/api/auth/eth-signature/nonce': { /** Generates a nonce for the user and returns it */ - post: operations["EthSignatureController_nonce"]; + post: operations['EthSignatureController_nonce']; }; - "/api/auth/eth-signature/login": { + '/api/auth/eth-signature/login': { /** Verifies a user's signature and returns a JWT token */ - post: operations["EthSignatureController_login"]; + post: operations['EthSignatureController_login']; }; - "/api/auth/eth-signature/refresh": { + '/api/auth/eth-signature/refresh': { /** Verifies a refreshToken and returns a JWT token */ - post: operations["EthSignatureController_token"]; + post: operations['EthSignatureController_token']; }; - "/api/communities": { - get: operations["CommunityController_findAll"]; + '/api/communities': { + get: operations['CommunityController_findAll']; /** Create a new community */ - post: operations["CommunityController_create"]; + post: operations['CommunityController_create']; }; - "/api/communities/{id}": { - get: operations["CommunityController_findOne"]; + '/api/communities/{id}': { + get: operations['CommunityController_findOne']; /** Update community */ - patch: operations["CommunityController_update"]; + patch: operations['CommunityController_update']; }; - "/api/communities/isNameAvailable": { - get: operations["CommunityController_isNameAvailable"]; + '/api/communities/isNameAvailable': { + get: operations['CommunityController_isNameAvailable']; }; - "/api/communities/current": { - get: operations["CommunityController_current"]; + '/api/communities/current': { + get: operations['CommunityController_current']; }; - "/api/communities/{id}/discord/link": { + '/api/communities/{id}/discord/link': { /** Link discord to community */ - patch: operations["CommunityController_linkDiscord"]; + patch: operations['CommunityController_linkDiscord']; }; - "/api/quantifications/export/json": { + '/api/quantifications/export/json': { /** Export quantifications document to json */ - get: operations["QuantificationsController_exportJson"]; + get: operations['QuantificationsController_exportJson']; }; - "/api/quantifications/export/csv": { + '/api/quantifications/export/csv': { /** Export quantifications document to csv */ - get: operations["QuantificationsController_exportCsv"]; + get: operations['QuantificationsController_exportCsv']; }; - "/api/quantifications/export/parquet": { + '/api/quantifications/export/parquet': { /** Export quantifications document to parquet */ - get: operations["QuantificationsController_exportParquet"]; + get: operations['QuantificationsController_exportParquet']; }; - "/api/quantifications/multiple": { + '/api/quantifications/multiple': { /** Quantify multiple praise items */ - patch: operations["QuantificationsController_quantifyMultiple"]; + patch: operations['QuantificationsController_quantifyMultiple']; }; - "/api/quantifications/{id}": { + '/api/quantifications/{id}': { /** Quantify praise item by id */ - patch: operations["QuantificationsController_quantify"]; + patch: operations['QuantificationsController_quantify']; }; - "/api/reports": { + '/api/reports': { /** List all report manifests */ - get: operations["ReportsController_listAllReports"]; + get: operations['ReportsController_listAllReports']; }; - "/api/reports/receiverBio/{userAccountId}": { + '/api/reports/receiverBio/{userAccountId}': { /** Get one AI generated receiver bio */ - get: operations["ReportsController_receiverBio"]; + get: operations['ReportsController_receiverBio']; }; - "/api/reports/receiverLabels/{userAccountId}": { + '/api/reports/receiverLabels/{userAccountId}': { /** AI generated labels describing a praise receiver. */ - get: operations["ReportsController_receiverLabels"]; + get: operations['ReportsController_receiverLabels']; }; } @@ -278,7 +277,17 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; + roles: readonly ( + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB' + )[]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -287,7 +296,7 @@ export interface components { UserAccount: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -310,8 +319,18 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; - accounts: readonly (components["schemas"]["UserAccount"])[]; + roles: readonly ( + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB' + )[]; + accounts: readonly components['schemas']['UserAccount'][]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -326,8 +345,18 @@ export interface components { rewardsEthAddress: string; /** @example darth */ username: string; - roles: readonly ("USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB")[]; - accounts: readonly (components["schemas"]["UserAccount"])[]; + roles: readonly ( + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB' + )[]; + accounts: readonly components['schemas']['UserAccount'][]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -345,7 +374,16 @@ export interface components { }; UpdateUserRoleInputDto: { /** @enum {string} */ - role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; + role: + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB'; }; Period: { /** @example 621f802b813dbdba9eeaf7d7 */ @@ -353,7 +391,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: "OPEN" | "QUANTIFY" | "CLOSED"; + status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; /** Format: date-time */ startDate: string; /** Format: date-time */ @@ -384,7 +422,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Period"])[]; + docs: readonly components['schemas']['Period'][]; meta?: Record; }; Quantification: { @@ -403,12 +441,12 @@ export interface components { /** @example 639b178f19296ee0f2d0585d */ praise: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2021-06-01T00:00:00.000Z */ updatedAt: string; @@ -428,7 +466,7 @@ export interface components { finishedCount: number; /** @example 1 */ praiseCount: number; - quantifications: (components["schemas"]["Quantification"])[]; + quantifications: components['schemas']['Quantification'][]; }; PeriodDetailsGiverReceiverDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -458,7 +496,7 @@ export interface components { /** @example June 2021 */ name: string; /** @enum {string} */ - status: "OPEN" | "QUANTIFY" | "CLOSED"; + status: 'OPEN' | 'QUANTIFY' | 'CLOSED'; /** Format: date-time */ startDate: string; /** Format: date-time */ @@ -469,9 +507,9 @@ export interface components { createdAt: string; /** Format: date-time */ updatedAt: string; - quantifiers?: readonly (components["schemas"]["PeriodDetailsQuantifierDto"])[]; - givers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; - receivers?: readonly (components["schemas"]["PeriodDetailsGiverReceiverDto"])[]; + quantifiers?: readonly components['schemas']['PeriodDetailsQuantifierDto'][]; + givers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; + receivers?: readonly components['schemas']['PeriodDetailsGiverReceiverDto'][]; /** @example 543 */ numberOfPraise: number; }; @@ -518,10 +556,10 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components["schemas"]["UserAccountWithUserRefDto"]; - giver: components["schemas"]["UserAccountWithUserRefDto"]; - forwarder?: components["schemas"]["UserAccountWithUserRefDto"]; - quantifications: readonly (components["schemas"]["Quantification"])[]; + receiver: components['schemas']['UserAccountWithUserRefDto']; + giver: components['schemas']['UserAccountWithUserRefDto']; + forwarder?: components['schemas']['UserAccountWithUserRefDto']; + quantifications: readonly components['schemas']['Quantification'][]; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -529,12 +567,12 @@ export interface components { }; VerifyQuantifierPoolSizeDto: { /** - * @description The number of quantifiers in the pool + * @description The number of quantifiers in the pool * @example 10 */ quantifierPoolSize: number; /** - * @description The number of quantifiers needed in the pool + * @description The number of quantifiers needed in the pool * @example 10 */ quantifierPoolSizeNeeded: number; @@ -560,18 +598,18 @@ export interface components { sourceName: string; /** @example 144 */ score: number; - receiver: components["schemas"]["UserAccount"]; - giver: components["schemas"]["UserAccount"]; - forwarder?: components["schemas"]["UserAccount"]; - quantifications: readonly (components["schemas"]["Quantification"])[]; + receiver: components['schemas']['UserAccount']; + giver: components['schemas']['UserAccount']; + forwarder?: components['schemas']['UserAccount']; + quantifications: readonly components['schemas']['Quantification'][]; /** Format: date-time */ createdAt: string; /** Format: date-time */ updatedAt: string; }; ReplaceQuantifierResponseDto: { - praises: readonly (components["schemas"]["Praise"])[]; - period: components["schemas"]["PeriodDetailsDto"]; + praises: readonly components['schemas']['Praise'][]; + period: components['schemas']['PeriodDetailsDto']; }; UserAccountNoUserId: { /** @example 63b428f7d9ca4f6ff5370d05 */ @@ -591,7 +629,15 @@ export interface components { }; EventLogType: { /** @enum {string} */ - key: "PERMISSION" | "AUTHENTICATION" | "PERIOD" | "PRAISE" | "QUANTIFICATION" | "SETTING" | "USER_ACCOUNT" | "COMMUNITY"; + key: + | 'PERMISSION' + | 'AUTHENTICATION' + | 'PERIOD' + | 'PRAISE' + | 'QUANTIFICATION' + | 'SETTING' + | 'USER_ACCOUNT' + | 'COMMUNITY'; /** @example An action that changes user permissions */ label: string; /** @example A user's permissions were changed */ @@ -600,22 +646,22 @@ export interface components { EventLog: { /** @example 621f802b813dbdba9eeaf7d7 */ _id: string; - user?: components["schemas"]["User"]; - useraccount?: components["schemas"]["UserAccountNoUserId"]; + user?: components['schemas']['User']; + useraccount?: components['schemas']['UserAccountNoUserId']; /** @example 621f802b813dbdba9eeaf7d7 */ apiKey?: string; /** @example 621f802b813dbdba9eeaf7d7 */ period?: string; - type: components["schemas"]["EventLogType"]; + type: components['schemas']['EventLogType']; /** @example A description of the event */ description: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ createdAt: string; /** - * Format: date-time + * Format: date-time * @example 2023-03-01T22:51:20.012Z */ updatedAt: string; @@ -639,7 +685,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["EventLog"])[]; + docs: readonly components['schemas']['EventLog'][]; meta?: Record; }; Setting: { @@ -650,11 +696,21 @@ export interface components { /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | (string)[] | boolean | number | (number)[]; + valueRealized: string | string[] | boolean | number | number[]; /** @example 555 */ defaultValue: string; /** @enum {string} */ - type: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; + type: + | 'Integer' + | 'Float' + | 'String' + | 'Textarea' + | 'Boolean' + | 'IntegerList' + | 'StringList' + | 'Image' + | 'Radio' + | 'JSON'; /** @example Quantifiers Per Praise */ label: string; /** @example How many redundant quantifications are assigned to each praise? */ @@ -674,12 +730,12 @@ export interface components { PeriodSetting: { /** @example 62291b7ea8b1619f78818524 */ _id: string; - period: components["schemas"]["Period"]; - setting: components["schemas"]["Setting"]; + period: components['schemas']['Period']; + setting: components['schemas']['Setting']; /** @example 666 */ value: string; /** @example 666 */ - valueRealized: string | (string)[] | boolean | number | (number)[]; + valueRealized: string | string[] | boolean | number | number[]; }; SetPeriodSettingDto: { /** @example 666 */ @@ -704,7 +760,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Praise"])[]; + docs: readonly components['schemas']['Praise'][]; meta?: Record; }; PraiseCreateInputDto: { @@ -716,8 +772,8 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: (string)[]; - giver: components["schemas"]["UserAccount"]; + receiverIds: string[]; + giver: components['schemas']['UserAccount']; }; PraiseForwardInputDto: { /** @example for making edits in the welcome text */ @@ -728,9 +784,9 @@ export interface components { sourceId: string; /** @example DISCORD:Token%20Engineering%20Commons:%F0%9F%99%8F%EF%BD%9Cpraise */ sourceName: string; - receiverIds: (string)[]; - giver: components["schemas"]["UserAccount"]; - forwarder: components["schemas"]["UserAccount"]; + receiverIds: string[]; + giver: components['schemas']['UserAccount']; + forwarder: components['schemas']['UserAccount']; }; CreateUserAccountInputDto: { /** @example 098098098098098 */ @@ -749,7 +805,7 @@ export interface components { CreateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -782,7 +838,7 @@ export interface components { UpdateUserAccountResponseDto: { /** @example 63b428f7d9ca4f6ff5370d05 */ _id: string; - user?: components["schemas"]["UserNoUserAccountsDto"]; + user?: components['schemas']['UserNoUserAccountsDto']; /** @example 098098098098098 */ accountId: string; /** @example darth#6755 */ @@ -802,7 +858,16 @@ export interface components { /** @example My API Key */ description: string; /** @enum {string} */ - role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; + role: + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB'; }; CreateApiKeyResponseDto: { /** @example 639b178f19296ee0f2d0585d */ @@ -814,7 +879,16 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; + role: + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB'; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -832,7 +906,16 @@ export interface components { /** @example $2b$10$hfRNI.V7ewuN/K.5eSt6oelaQ.FDj6irfUNR9wkKnL/qsNT23aE4i */ hash: string; /** @enum {string} */ - role: "USER" | "QUANTIFIER" | "FORWARDER" | "ADMIN" | "ROOT" | "API_KEY_READWRITE" | "API_KEY_READ" | "API_KEY_DISCORD_BOT" | "API_KEY_SETUP_WEB"; + role: + | 'USER' + | 'QUANTIFIER' + | 'FORWARDER' + | 'ADMIN' + | 'ROOT' + | 'API_KEY_READWRITE' + | 'API_KEY_READ' + | 'API_KEY_DISCORD_BOT' + | 'API_KEY_SETUP_WEB'; /** Format: date-time */ createdAt: string; /** Format: date-time */ @@ -866,7 +949,7 @@ export interface components { identityEthAddress: string; /** @example bearer */ tokenType: string; - user: components["schemas"]["User"]; + user: components['schemas']['User']; }; GenerateTokenDto: { /** @example eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2MmIwNmY3NjU1ODA0YjE2MjllODQxNTkiLCJpZGVudGl0eUV0aEFkZHJlc3MiOiIweGEzMmFFQ2RhNzUyY0Y0RUY4OTk1NmU4M2Q2MEMwNDgzNWQ0RkE4NjciLCJyb2xlcyI6WyJVU0VSIiwiQURNSU4iXSwiaXNSZWZyZXNoIjpmYWxzZSwiaWF0IjoxNjcwMzE1OTk4LCJleHAiOjE2NzAzMTk1OTh9.qKvucMZLVbz_1TnsxaSqYX1i5CSpver6fFJTf3pABVA */ @@ -887,7 +970,7 @@ export interface components { * "0x345.." * ] */ - owners: (string)[]; + owners: string[]; /** @example 0980987846534 */ discordGuildId?: string; }; @@ -908,7 +991,7 @@ export interface components { * "0x345.." * ] */ - owners: (string)[]; + owners: string[]; /** @example 0980987846534 */ discordGuildId?: string; /** @example oiujoiuoo8u */ @@ -916,7 +999,7 @@ export interface components { /** @example true */ isPublic: boolean; /** @enum {string} */ - discordLinkState: "NOT_SET" | "PENDING" | "ACTIVE" | "DEACTIVE"; + discordLinkState: 'NOT_SET' | 'PENDING' | 'ACTIVE' | 'DEACTIVE'; /** * @example { * "attestations": true @@ -937,7 +1020,7 @@ export interface components { * "0x345.." * ] */ - owners?: (string)[]; + owners?: string[]; }; CommunityFindAllResponseDto: { /** @example 1200 */ @@ -958,7 +1041,7 @@ export interface components { prevPage?: Record; /** @example 3 */ nextPage?: Record; - docs: readonly (components["schemas"]["Community"])[]; + docs: readonly components['schemas']['Community'][]; meta?: Record; }; IsNameAvailableResponseDto: { @@ -976,7 +1059,7 @@ export interface components { duplicatePraise?: string; }; QuantifyMultipleInputDto: { - params: components["schemas"]["QuantifyInputDto"]; + params: components['schemas']['QuantifyInputDto']; /** * @example [ * "639b178f19296ee0f2d0585d", @@ -984,59 +1067,59 @@ export interface components { * "639b178f19296ee0f2d0585f" * ] */ - praiseIds: (string)[]; + praiseIds: string[]; }; ConfigurationValueItemsDto: { /** - * @description Allowed array types - * @example string + * @description Allowed array types + * @example string * @enum {string} */ - type: "string" | "number"; + type: 'string' | 'number'; }; ConfigurationValueDto: { /** - * @description Type of the setting - * @example string + * @description Type of the setting + * @example string * @enum {string} */ - type: "string" | "number" | "boolean" | "array"; + type: 'string' | 'number' | 'boolean' | 'array'; /** - * @description Default value for the setting + * @description Default value for the setting * @example 666 */ - default: number | string | boolean | (number)[] | (string)[]; + default: number | string | boolean | number[] | string[]; /** - * @description Description of the setting + * @description Description of the setting * @example Description of the string setting */ description: string; /** - * @description Markdown description of the setting + * @description Markdown description of the setting * @example Description of the string setting */ markdownDescription?: string; /** - * @description Edit presentation style - * @example multiline + * @description Edit presentation style + * @example multiline * @enum {string} */ - editPresentation?: "multiline"; + editPresentation?: 'multiline'; /** - * @description Order of the setting + * @description Order of the setting * @example 1 */ order?: number; /** - * @description Enum values for string type settings + * @description Enum values for string type settings * @example [ * "left", * "right" * ] */ - enum?: (string)[]; + enum?: string[]; /** @description Defines the type of items for array settings */ - items?: components["schemas"]["ConfigurationValueItemsDto"]; + items?: components['schemas']['ConfigurationValueItemsDto']; }; ReportManifestDto: { /** @example https://raw.githubusercontent.com/givepraise/reports/main/reports/disperse-dist-straight-curve-with-ceiling/manifest.json */ @@ -1065,16 +1148,18 @@ export interface components { * "Praise receiver reports" * ] */ - categories: (string)[]; + categories: string[]; /** * @example [ * "toplist" * ] */ - keywords: (string)[]; + keywords: string[]; /** @description Configuration settings for the report */ configuration: { - [key: string]: components["schemas"]["ConfigurationValueDto"] | undefined; + [key: string]: + | components['schemas']['ConfigurationValueDto'] + | undefined; }; }; }; @@ -1088,24 +1173,23 @@ export interface components { export type external = Record; export interface operations { - /** Activate a user account in order to be able to give praise and receive rewards. Activation a user account creates a new User object or adds user account to User if it already exists. */ ActivateController_activate: { requestBody: { content: { - "application/json": components["schemas"]["ActivateInputDto"]; + 'application/json': components['schemas']['ActivateInputDto']; }; }; responses: { /** @description The created (or updated) user. */ 200: { content: { - "application/json": components["schemas"]["User"]; + 'application/json': components['schemas']['User']; }; }; 201: { content: { - "application/json": components["schemas"]["User"]; + 'application/json': components['schemas']['User']; }; }; }; @@ -1115,7 +1199,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1125,7 +1209,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1135,7 +1219,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1145,7 +1229,7 @@ export interface operations { /** @description All users */ 200: { content: { - "application/json": (components["schemas"]["User"])[]; + 'application/json': components['schemas']['User'][]; }; }; }; @@ -1160,7 +1244,7 @@ export interface operations { /** @description A single user */ 200: { content: { - "application/json": components["schemas"]["UserWithStatsDto"]; + 'application/json': components['schemas']['UserWithStatsDto']; }; }; }; @@ -1174,14 +1258,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["UpdateUserRequestDto"]; + 'application/json': components['schemas']['UpdateUserRequestDto']; }; }; responses: { /** @description Updated user */ 200: { content: { - "application/json": components["schemas"]["UserWithStatsDto"]; + 'application/json': components['schemas']['UserWithStatsDto']; }; }; }; @@ -1194,14 +1278,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["UpdateUserRoleInputDto"]; + 'application/json': components['schemas']['UpdateUserRoleInputDto']; }; }; responses: { /** @description The updated user */ 200: { content: { - "application/json": components["schemas"]["UserWithStatsDto"]; + 'application/json': components['schemas']['UserWithStatsDto']; }; }; }; @@ -1214,14 +1298,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["UpdateUserRoleInputDto"]; + 'application/json': components['schemas']['UpdateUserRoleInputDto']; }; }; responses: { /** @description The updated user */ 200: { content: { - "application/json": components["schemas"]["UserWithStatsDto"]; + 'application/json': components['schemas']['UserWithStatsDto']; }; }; }; @@ -1231,7 +1315,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1241,7 +1325,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1251,7 +1335,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1265,14 +1349,14 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; }; }; responses: { /** @description Periods */ 200: { content: { - "application/json": components["schemas"]["PeriodPaginatedResponseDto"]; + 'application/json': components['schemas']['PeriodPaginatedResponseDto']; }; }; }; @@ -1281,19 +1365,19 @@ export interface operations { PeriodsController_create: { requestBody: { content: { - "application/json": components["schemas"]["CreatePeriodInputDto"]; + 'application/json': components['schemas']['CreatePeriodInputDto']; }; }; responses: { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; 201: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1309,7 +1393,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1323,14 +1407,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["UpdatePeriodInputDto"]; + 'application/json': components['schemas']['UpdatePeriodInputDto']; }; }; responses: { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1346,7 +1430,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1362,7 +1446,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1379,7 +1463,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1396,7 +1480,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1413,7 +1497,7 @@ export interface operations { /** @description Period Praise items */ 200: { content: { - "application/json": (components["schemas"]["PraiseWithUserAccountsWithUserRefDto"])[]; + 'application/json': components['schemas']['PraiseWithUserAccountsWithUserRefDto'][]; }; }; }; @@ -1429,7 +1513,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["VerifyQuantifierPoolSizeDto"]; + 'application/json': components['schemas']['VerifyQuantifierPoolSizeDto']; }; }; }; @@ -1445,7 +1529,7 @@ export interface operations { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["PeriodDetailsDto"]; + 'application/json': components['schemas']['PeriodDetailsDto']; }; }; }; @@ -1459,14 +1543,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["ReplaceQuantifierInputDto"]; + 'application/json': components['schemas']['ReplaceQuantifierInputDto']; }; }; responses: { /** @description Period */ 200: { content: { - "application/json": components["schemas"]["ReplaceQuantifierResponseDto"]; + 'application/json': components['schemas']['ReplaceQuantifierResponseDto']; }; }; }; @@ -1480,16 +1564,16 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; search?: string; - types?: (string)[]; + types?: string[]; }; }; responses: { /** @description Paginated event logs */ 200: { content: { - "application/json": components["schemas"]["EventLogPaginatedResponseDto"]; + 'application/json': components['schemas']['EventLogPaginatedResponseDto']; }; }; }; @@ -1500,7 +1584,7 @@ export interface operations { /** @description Event log types */ 200: { content: { - "application/json": (components["schemas"]["EventLogType"])[]; + 'application/json': components['schemas']['EventLogType'][]; }; }; }; @@ -1511,7 +1595,17 @@ export interface operations { query?: { /** @example SETTING_KEY */ key?: string; - type?: "Integer" | "Float" | "String" | "Textarea" | "Boolean" | "IntegerList" | "StringList" | "Image" | "Radio" | "JSON"; + type?: + | 'Integer' + | 'Float' + | 'String' + | 'Textarea' + | 'Boolean' + | 'IntegerList' + | 'StringList' + | 'Image' + | 'Radio' + | 'JSON'; /** @example 0 */ group?: number; /** @example 0 */ @@ -1522,7 +1616,7 @@ export interface operations { /** @description All settings. */ 200: { content: { - "application/json": (components["schemas"]["Setting"])[]; + 'application/json': components['schemas']['Setting'][]; }; }; }; @@ -1538,7 +1632,7 @@ export interface operations { /** @description Setting. */ 200: { content: { - "application/json": components["schemas"]["Setting"]; + 'application/json': components['schemas']['Setting']; }; }; }; @@ -1552,14 +1646,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["SetSettingDto"]; + 'application/json': components['schemas']['SetSettingDto']; }; }; responses: { /** @description Updated setting. */ 200: { content: { - "application/json": components["schemas"]["Setting"]; + 'application/json': components['schemas']['Setting']; }; }; }; @@ -1575,7 +1669,7 @@ export interface operations { /** @description Updated setting. */ 200: { content: { - "application/json": components["schemas"]["Setting"]; + 'application/json': components['schemas']['Setting']; }; }; }; @@ -1590,7 +1684,7 @@ export interface operations { responses: { 200: { content: { - "application/json": Record; + 'application/json': Record; }; }; }; @@ -1606,7 +1700,7 @@ export interface operations { /** @description All period settings */ 200: { content: { - "application/json": (components["schemas"]["PeriodSetting"])[]; + 'application/json': components['schemas']['PeriodSetting'][]; }; }; }; @@ -1623,7 +1717,7 @@ export interface operations { /** @description Period setting */ 200: { content: { - "application/json": components["schemas"]["PeriodSetting"]; + 'application/json': components['schemas']['PeriodSetting']; }; }; }; @@ -1638,14 +1732,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["SetPeriodSettingDto"]; + 'application/json': components['schemas']['SetPeriodSettingDto']; }; }; responses: { /** @description Updated period setting */ 200: { content: { - "application/json": components["schemas"]["PeriodSetting"]; + 'application/json': components['schemas']['PeriodSetting']; }; }; }; @@ -1659,7 +1753,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; giver?: string; receiver?: string; }; @@ -1668,7 +1762,7 @@ export interface operations { /** @description Paginated praise items */ 200: { content: { - "application/json": components["schemas"]["PraisePaginatedResponseDto"]; + 'application/json': components['schemas']['PraisePaginatedResponseDto']; }; }; }; @@ -1677,19 +1771,19 @@ export interface operations { PraiseController_praise: { requestBody: { content: { - "application/json": components["schemas"]["PraiseCreateInputDto"]; + 'application/json': components['schemas']['PraiseCreateInputDto']; }; }; responses: { /** @description Praise item */ 200: { content: { - "application/json": components["schemas"]["Praise"]; + 'application/json': components['schemas']['Praise']; }; }; 201: { content: { - "application/json": (components["schemas"]["Praise"])[]; + 'application/json': components['schemas']['Praise'][]; }; }; }; @@ -1705,7 +1799,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1721,7 +1815,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1737,7 +1831,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1753,7 +1847,7 @@ export interface operations { /** @description Praise item */ 200: { content: { - "application/json": components["schemas"]["Praise"]; + 'application/json': components['schemas']['Praise']; }; }; }; @@ -1762,19 +1856,19 @@ export interface operations { PraiseController_forward: { requestBody: { content: { - "application/json": components["schemas"]["PraiseForwardInputDto"]; + 'application/json': components['schemas']['PraiseForwardInputDto']; }; }; responses: { /** @description Praise item */ 200: { content: { - "application/json": components["schemas"]["Praise"]; + 'application/json': components['schemas']['Praise']; }; }; 201: { content: { - "application/json": (components["schemas"]["Praise"])[]; + 'application/json': components['schemas']['Praise'][]; }; }; }; @@ -1794,7 +1888,7 @@ export interface operations { responses: { 200: { content: { - "application/json": components["schemas"]["UserAccount"]; + 'application/json': components['schemas']['UserAccount']; }; }; }; @@ -1803,13 +1897,13 @@ export interface operations { UserAccountsController_create: { requestBody: { content: { - "application/json": components["schemas"]["CreateUserAccountInputDto"]; + 'application/json': components['schemas']['CreateUserAccountInputDto']; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["CreateUserAccountResponseDto"]; + 'application/json': components['schemas']['CreateUserAccountResponseDto']; }; }; }; @@ -1819,7 +1913,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -1829,7 +1923,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -1839,7 +1933,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -1855,7 +1949,7 @@ export interface operations { /** @description UserAccount */ 200: { content: { - "application/json": components["schemas"]["UserAccount"]; + 'application/json': components['schemas']['UserAccount']; }; }; }; @@ -1864,13 +1958,13 @@ export interface operations { UserAccountsController_update: { requestBody: { content: { - "application/json": components["schemas"]["UpdateUserAccountInputDto"]; + 'application/json': components['schemas']['UpdateUserAccountInputDto']; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["UpdateUserAccountResponseDto"]; + 'application/json': components['schemas']['UpdateUserAccountResponseDto']; }; }; }; @@ -1881,7 +1975,7 @@ export interface operations { /** @description Array of API keys */ 200: { content: { - "application/json": (components["schemas"]["ApiKey"])[]; + 'application/json': components['schemas']['ApiKey'][]; }; }; }; @@ -1890,14 +1984,14 @@ export interface operations { ApiKeyController_createApiKey: { requestBody: { content: { - "application/json": components["schemas"]["CreateApiKeyInputDto"]; + 'application/json': components['schemas']['CreateApiKeyInputDto']; }; }; responses: { /** @description API key created */ 201: { content: { - "application/json": components["schemas"]["CreateApiKeyResponseDto"]; + 'application/json': components['schemas']['CreateApiKeyResponseDto']; }; }; }; @@ -1913,7 +2007,7 @@ export interface operations { /** @description An API key */ 200: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; }; @@ -1927,19 +2021,19 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["UpdateDescriptionInputDto"]; + 'application/json': components['schemas']['UpdateDescriptionInputDto']; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; /** @description API key with updated description */ 201: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; }; @@ -1954,13 +2048,13 @@ export interface operations { responses: { 200: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; /** @description Revoked API key */ 201: { content: { - "application/json": components["schemas"]["ApiKey"]; + 'application/json': components['schemas']['ApiKey']; }; }; }; @@ -1970,14 +2064,14 @@ export interface operations { /** @description A request containing the user identityEthAddress */ requestBody: { content: { - "application/json": components["schemas"]["NonceInputDto"]; + 'application/json': components['schemas']['NonceInputDto']; }; }; responses: { /** @description Nonce generated successfully */ 201: { content: { - "application/json": components["schemas"]["NonceResponseDto"]; + 'application/json': components['schemas']['NonceResponseDto']; }; }; }; @@ -1990,20 +2084,20 @@ export interface operations { }; }; /** - * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: - * + * @description A request containing the user identityEthAddress and signedlogin message. The signed message should be structured as follows: + * * ```SIGN THIS MESSAGE TO LOGIN TO PRAISE.\n\nADDRESS:\n[identityEthAddress]\n\nNONCE:\n[nonce]``` */ requestBody: { content: { - "application/json": components["schemas"]["LoginInputDto"]; + 'application/json': components['schemas']['LoginInputDto']; }; }; responses: { /** @description User authenticated successfully */ 201: { content: { - "application/json": components["schemas"]["LoginResponseDto"]; + 'application/json': components['schemas']['LoginResponseDto']; }; }; }; @@ -2017,14 +2111,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["GenerateTokenDto"]; + 'application/json': components['schemas']['GenerateTokenDto']; }; }; responses: { /** @description Tokens generated successfully */ 201: { content: { - "application/json": components["schemas"]["LoginResponseDto"]; + 'application/json': components['schemas']['LoginResponseDto']; }; }; }; @@ -2037,7 +2131,7 @@ export interface operations { /** @example 1 */ page: number; sortColumn?: string; - sortType?: "asc" | "desc"; + sortType?: 'asc' | 'desc'; /** @example hostname.givepraise.xyz */ hostname?: string; }; @@ -2046,7 +2140,7 @@ export interface operations { /** @description All communities */ 200: { content: { - "application/json": components["schemas"]["CommunityFindAllResponseDto"]; + 'application/json': components['schemas']['CommunityFindAllResponseDto']; }; }; }; @@ -2055,19 +2149,19 @@ export interface operations { CommunityController_create: { requestBody: { content: { - "application/json": components["schemas"]["CreateCommunityInputDto"]; + 'application/json': components['schemas']['CreateCommunityInputDto']; }; }; responses: { /** @description Community */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; 201: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2082,7 +2176,7 @@ export interface operations { /** @description A single Community */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2091,14 +2185,14 @@ export interface operations { CommunityController_update: { requestBody: { content: { - "application/json": components["schemas"]["UpdateCommunityInputDto"]; + 'application/json': components['schemas']['UpdateCommunityInputDto']; }; }; responses: { /** @description Community */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2114,7 +2208,7 @@ export interface operations { /** @description Checking whether the community name is available */ 200: { content: { - "application/json": components["schemas"]["IsNameAvailableResponseDto"]; + 'application/json': components['schemas']['IsNameAvailableResponseDto']; }; }; }; @@ -2124,7 +2218,7 @@ export interface operations { /** @description Returns the current community, based on hostname */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2133,14 +2227,14 @@ export interface operations { CommunityController_linkDiscord: { requestBody: { content: { - "application/json": components["schemas"]["LinkDiscordBotDto"]; + 'application/json': components['schemas']['LinkDiscordBotDto']; }; }; responses: { /** @description Community */ 200: { content: { - "application/json": components["schemas"]["Community"]; + 'application/json': components['schemas']['Community']; }; }; }; @@ -2156,7 +2250,7 @@ export interface operations { responses: { 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -2172,7 +2266,7 @@ export interface operations { responses: { 200: { content: { - "text/csv": string; + 'text/csv': string; }; }; }; @@ -2188,7 +2282,7 @@ export interface operations { responses: { 200: { content: { - "application/octet-stream": string; + 'application/octet-stream': string; }; }; }; @@ -2197,14 +2291,14 @@ export interface operations { QuantificationsController_quantifyMultiple: { requestBody: { content: { - "application/json": components["schemas"]["QuantifyMultipleInputDto"]; + 'application/json': components['schemas']['QuantifyMultipleInputDto']; }; }; responses: { /** @description Praise items */ 200: { content: { - "application/json": (components["schemas"]["Praise"])[]; + 'application/json': components['schemas']['Praise'][]; }; }; }; @@ -2218,14 +2312,14 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["QuantifyInputDto"]; + 'application/json': components['schemas']['QuantifyInputDto']; }; }; responses: { /** @description Praise items */ 200: { content: { - "application/json": (components["schemas"]["Praise"])[]; + 'application/json': components['schemas']['Praise'][]; }; }; }; @@ -2236,7 +2330,7 @@ export interface operations { /** @description A list of report manifests */ 200: { content: { - "application/json": (components["schemas"]["ReportManifestDto"])[]; + 'application/json': components['schemas']['ReportManifestDto'][]; }; }; /** @description An error occurred while fetching report manifests */ @@ -2254,7 +2348,7 @@ export interface operations { /** @description A receiver bio */ 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; @@ -2270,7 +2364,7 @@ export interface operations { /** @description Comma separated list of labels, 7 max */ 200: { content: { - "application/json": string; + 'application/json': string; }; }; }; From 6c052a7b7586337e2b8c7d5b3f908d30760d8fa7 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Wed, 23 Aug 2023 22:16:37 +0200 Subject: [PATCH 50/63] Upgraded attestation components --- packages/discord-bot/src/index.ts | 1 - .../src/utils/embeds/praiseSuccessEmbed.ts | 9 +- .../discord-bot/src/utils/getUserAccount.ts | 16 +- packages/discord-bot/src/utils/givePraise.ts | 1 - packages/frontend/package.json | 8 +- packages/frontend/src/index.tsx | 6 +- .../src/model/communitites/communities.ts | 75 -- .../model/communitites/dto/community.dto.ts | 3 - .../model/communitites/hooks/useCommunity.ts | 15 - .../frontend/src/model/community/community.ts | 79 +- .../dto/find-all-communities-query.dto.ts | 0 .../dto/find-all-communities-response.dto.ts | 0 .../eas/components/EasContextProvider.tsx | 299 ++++++ packages/frontend/src/model/eas/eas.config.ts | 18 + .../src/model/eas/hooks/useAttestations.ts | 180 ---- .../frontend/src/model/eas/hooks/useEas.ts | 11 + .../src/model/eas/hooks/useEasConfig.ts | 12 + .../src/model/eas/types/attestation.type.ts | 20 +- .../model/eas/types/eas-context-value.type.ts | 35 + .../model/eas/types/schema-field-type.type.ts | 186 ++++ .../eas/types/schema-field-value.type.ts | 38 + .../src/model/eas/types/schema-field.type.ts | 6 + .../model/eas/types/validation-error.type.ts | 3 + .../eas/utils/is-schema-field-type-name.ts | 10 + .../safe/components/SafeContextProvider.tsx | 175 ++++ .../model/safe/components/SafeProvider.tsx | 22 - .../frontend/src/model/safe/hooks/useSafe.ts | 8 +- .../src/model/safe/hooks/useSafeConfig.ts | 8 + .../src/model/safe/hooks/useSafeInit.ts | 113 --- .../model/safe/hooks/useSafeTransaction.ts | 106 +-- .../frontend/src/model/safe/safe.config.ts | 21 + .../src/model/safe/types/use-safe-return.ts | 18 +- .../src/model/wagmi/hooks/useSigner.ts | 66 ++ .../src/model/wagmi/isChainIdSupported.ts | 5 + .../frontend/src/model/wagmi/wagmi.config.ts | 26 + .../PeriodDetails/components/Attestations.tsx | 6 +- .../components/AttestationsDetailBox.tsx | 9 +- .../components/CreateAttestationsDialog.tsx | 98 +- .../CreateAttestationsDialogSubmitButton.tsx | 63 ++ .../frontend/src/providers/Web3Provider.tsx | 6 +- .../providers/types/window-with-env.type.ts | 4 + yarn.lock | 884 +++++++++--------- 42 files changed, 1655 insertions(+), 1014 deletions(-) delete mode 100644 packages/frontend/src/model/communitites/communities.ts delete mode 100644 packages/frontend/src/model/communitites/dto/community.dto.ts delete mode 100644 packages/frontend/src/model/communitites/hooks/useCommunity.ts rename packages/frontend/src/model/{communitites => community}/dto/find-all-communities-query.dto.ts (100%) rename packages/frontend/src/model/{communitites => community}/dto/find-all-communities-response.dto.ts (100%) create mode 100644 packages/frontend/src/model/eas/components/EasContextProvider.tsx create mode 100644 packages/frontend/src/model/eas/eas.config.ts delete mode 100644 packages/frontend/src/model/eas/hooks/useAttestations.ts create mode 100644 packages/frontend/src/model/eas/hooks/useEas.ts create mode 100644 packages/frontend/src/model/eas/hooks/useEasConfig.ts create mode 100644 packages/frontend/src/model/eas/types/eas-context-value.type.ts create mode 100644 packages/frontend/src/model/eas/types/schema-field-type.type.ts create mode 100644 packages/frontend/src/model/eas/types/schema-field-value.type.ts create mode 100644 packages/frontend/src/model/eas/types/schema-field.type.ts create mode 100644 packages/frontend/src/model/eas/types/validation-error.type.ts create mode 100644 packages/frontend/src/model/eas/utils/is-schema-field-type-name.ts create mode 100644 packages/frontend/src/model/safe/components/SafeContextProvider.tsx delete mode 100644 packages/frontend/src/model/safe/components/SafeProvider.tsx create mode 100644 packages/frontend/src/model/safe/hooks/useSafeConfig.ts delete mode 100644 packages/frontend/src/model/safe/hooks/useSafeInit.ts create mode 100644 packages/frontend/src/model/safe/safe.config.ts create mode 100644 packages/frontend/src/model/wagmi/hooks/useSigner.ts create mode 100644 packages/frontend/src/model/wagmi/isChainIdSupported.ts create mode 100644 packages/frontend/src/model/wagmi/wagmi.config.ts create mode 100644 packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialogSubmitButton.tsx create mode 100644 packages/frontend/src/providers/types/window-with-env.type.ts diff --git a/packages/discord-bot/src/index.ts b/packages/discord-bot/src/index.ts index 337d89828..c321122de 100644 --- a/packages/discord-bot/src/index.ts +++ b/packages/discord-bot/src/index.ts @@ -66,7 +66,6 @@ discordClient.on('interactionCreate', async (interaction): Promise => { discordClient, interaction.guild.id ); - console.log(community); if (community) { await command.execute(discordClient, interaction, community.hostname); diff --git a/packages/discord-bot/src/utils/embeds/praiseSuccessEmbed.ts b/packages/discord-bot/src/utils/embeds/praiseSuccessEmbed.ts index 06982687c..298ceed7f 100644 --- a/packages/discord-bot/src/utils/embeds/praiseSuccessEmbed.ts +++ b/packages/discord-bot/src/utils/embeds/praiseSuccessEmbed.ts @@ -11,11 +11,6 @@ export const praiseSuccessEmbed = async ( .replace('{@receivers}', `${receivers.join(', ')}`) .replace('{reason}', reason); - try { - const embed = new EmbedBuilder().setColor(0xe6007e).setDescription(msg); - return embed; - } catch (error) { - console.log(error); - throw error; - } + const embed = new EmbedBuilder().setColor(0xe6007e).setDescription(msg); + return embed; }; diff --git a/packages/discord-bot/src/utils/getUserAccount.ts b/packages/discord-bot/src/utils/getUserAccount.ts index 6b694f9ff..d71c5724d 100644 --- a/packages/discord-bot/src/utils/getUserAccount.ts +++ b/packages/discord-bot/src/utils/getUserAccount.ts @@ -67,15 +67,11 @@ export const getUserAccount = async ( .then((res) => res.data.filter((acc) => acc.platform === 'DISCORD')) .catch(() => undefined); - try { - if (!data || !data.length) { - return await createUserAccount(user, host); - } else { - return await updateUserAccount(data[0], user, host); - } - } catch (e) { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - console.log((e as any).data); - throw e; + if (!data || !data.length) { + return await createUserAccount(user, host); + } else { + return await updateUserAccount(data[0], user, host); } + // No console.log please + // console.log((e as any).data); }; diff --git a/packages/discord-bot/src/utils/givePraise.ts b/packages/discord-bot/src/utils/givePraise.ts index a7c0b5203..5e990d8ff 100644 --- a/packages/discord-bot/src/utils/givePraise.ts +++ b/packages/discord-bot/src/utils/givePraise.ts @@ -105,7 +105,6 @@ export const givePraise = async ( await Promise.all( praiseItems.map(async (praise) => { - console.log(praiseItems, receivers); await sendReceiverDM( praise._id, receivers.filter( diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 03cf55f9d..80b0e8364 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -5,7 +5,7 @@ "description": "The Praise dashboard built on React/Recoil/Tailwind CSS.", "private": true, "engines": { - "node": ">=10.0.0" + "node": ">=16.0.0" }, "dependencies": { "@craco/craco": "^6.4.3", @@ -13,7 +13,7 @@ "@emotion/react": "^11.7.1", "@emotion/styled": "^11.6.0", "@endo/static-module-record": "^0.7.16", - "@ethereum-attestation-service/eas-sdk": "^0.29.1", + "@ethereum-attestation-service/eas-sdk": "^1.1.0-beta.3", "@ethersproject/providers": "^5.5.3", "@fortawesome/fontawesome-svg-core": "^6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", @@ -34,6 +34,7 @@ "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", "@ukstv/jazzicon-react": "^1.0.0", + "@wagmi/core": "~1.3.9", "api-types": "0.1.0", "assert": "^2.0.0", "autoprefixer": "^10.4.7", @@ -41,6 +42,7 @@ "chart.js": "^4.2.0", "chartjs-chart-treemap": "^2.3.0", "craco-alias": "^3.0.1", + "csv-parse": "^5.4.0", "date-fns": "^2.25.0", "date-fns-tz": "^1.3.3", "discord-markdown": "^2.5.1", @@ -72,7 +74,7 @@ "use-error-boundary": "^2.0.6", "util": "^0.12.4", "viem": "^0.3.33", - "wagmi": "^1.0.5", + "wagmi": "~1.3.9", "wasm-check": "^2.1.2" }, "scripts": { diff --git a/packages/frontend/src/index.tsx b/packages/frontend/src/index.tsx index b394ae132..b80a64895 100644 --- a/packages/frontend/src/index.tsx +++ b/packages/frontend/src/index.tsx @@ -15,7 +15,7 @@ import { AwaitMetamaskInit } from './components/AwaitMetaMaskInit'; import { LightDarkTheme } from './components/LightDarkTheme'; import { ErrorBoundaryTopLevel } from './components/ErrorBoundaryTopLevel'; import PlausibleAnalytics from '@/components/PlausibleAnalytics'; -import { SafeProvider } from './model/safe/components/SafeProvider'; +import { SafeContextProvider } from './model/safe/components/SafeContextProvider'; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const root = createRoot(document.getElementById('root')!); @@ -24,7 +24,7 @@ root.render( - +
    @@ -44,7 +44,7 @@ root.render( />
    -
    +
    diff --git a/packages/frontend/src/model/communitites/communities.ts b/packages/frontend/src/model/communitites/communities.ts deleted file mode 100644 index 133858264..000000000 --- a/packages/frontend/src/model/communitites/communities.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { AxiosResponse, AxiosError } from 'axios'; -import { selectorFamily } from 'recoil'; -import { ApiGet, isResponseOk } from '../api'; -import { Community } from './dto/community.dto'; -import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; -import { FindAllCommunitiesResponseDto } from './dto/find-all-communities-response.dto'; -import { objectToQs } from '../../utils/querystring'; - -/** - * Fetch a single community. - * @returns Full response/error returned by server. - */ -export const CommunityQuery = selectorFamily({ - key: 'CommunityQuery', - get: - (id: string) => - ({ get }): AxiosResponse | AxiosError => { - return get( - ApiGet({ - url: `/communities/${id}`, - }) - ) as AxiosResponse | AxiosError; - }, -}); - -/** - * Fetch a single community. - * @returns Community object or undefined if not found. - */ -export const SingleCommunity = selectorFamily({ - key: 'SingleCommunity', - get: - (id: string) => - ({ get }): Community | undefined => { - const response = get(CommunityQuery(id)); - if (isResponseOk(response)) { - return response.data; - } - }, -}); - -/** - * Fetch all communities. - * @returns Full response/error returned by server. - */ -export const AllCommunitiesQuery = selectorFamily({ - key: 'AllCommunitiesQuery', - get: - (query: FindAllCommunitiesQueryDto) => - ({ get }): AxiosResponse | AxiosError => { - return get( - ApiGet({ - url: `/communities?${objectToQs(query)}`, - }) - ) as AxiosResponse | AxiosError; - }, -}); - -/** - * Fetch a single community based on hostname. - * @returns Array of community objects or undefined if not found. - */ -export const CommunityByHostname = selectorFamily({ - key: 'CommunityByHostname', - get: - (hostname: string) => - ({ get }): Community | undefined => { - const response = get( - AllCommunitiesQuery({ hostname, limit: 1, page: 1 }) - ); - if (isResponseOk(response)) { - return response.data.docs[0]; - } - }, -}); diff --git a/packages/frontend/src/model/communitites/dto/community.dto.ts b/packages/frontend/src/model/communitites/dto/community.dto.ts deleted file mode 100644 index 1a2898b44..000000000 --- a/packages/frontend/src/model/communitites/dto/community.dto.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { components } from 'api-types'; - -export type Community = components['schemas']['Community']; diff --git a/packages/frontend/src/model/communitites/hooks/useCommunity.ts b/packages/frontend/src/model/communitites/hooks/useCommunity.ts deleted file mode 100644 index f1cf8c7af..000000000 --- a/packages/frontend/src/model/communitites/hooks/useCommunity.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { useRecoilValue } from 'recoil'; -import { Community } from '../dto/community.dto'; -import { CommunityByHostname } from '../communities'; - -type useCommunityReturn = { - community: Community | undefined; -}; - -export function useCommunity(): useCommunityReturn { - const community = useRecoilValue( - CommunityByHostname(window.location.hostname) - ); - - return { community }; -} diff --git a/packages/frontend/src/model/community/community.ts b/packages/frontend/src/model/community/community.ts index bf15ac07f..66586407a 100644 --- a/packages/frontend/src/model/community/community.ts +++ b/packages/frontend/src/model/community/community.ts @@ -1,10 +1,81 @@ -import { AxiosError, AxiosResponse } from 'axios'; -import { selector } from 'recoil'; +import { AxiosResponse, AxiosError } from 'axios'; +import { selectorFamily, selector } from 'recoil'; +import { objectToQs } from '../../utils/querystring'; import { ApiGet, isResponseOk } from '../api'; +import { FindAllCommunitiesQueryDto } from './dto/find-all-communities-query.dto'; import { Community } from './dto/community.dto'; +import { FindAllCommunitiesResponseDto } from './dto/find-all-communities-response.dto'; + +/** + * Fetch a single community. + * @returns Full response/error returned by server. + */ +export const CommunityQuery = selectorFamily({ + key: 'CommunityQuery', + get: + (id: string) => + ({ get }): AxiosResponse | AxiosError => { + return get( + ApiGet({ + url: `/communities/${id}`, + }) + ) as AxiosResponse | AxiosError; + }, +}); + +/** + * Fetch a single community. + * @returns Community object or undefined if not found. + */ +export const SingleCommunity = selectorFamily({ + key: 'SingleCommunity', + get: + (id: string) => + ({ get }): Community | undefined => { + const response = get(CommunityQuery(id)); + if (isResponseOk(response)) { + return response.data; + } + }, +}); + +/** + * Fetch all communities. + * @returns Full response/error returned by server. + */ +export const AllCommunitiesQuery = selectorFamily({ + key: 'AllCommunitiesQuery', + get: + (query: FindAllCommunitiesQueryDto) => + ({ get }): AxiosResponse | AxiosError => { + return get( + ApiGet({ + url: `/communities?${objectToQs(query)}`, + }) + ) as AxiosResponse | AxiosError; + }, +}); + +/** + * Fetch a single community based on hostname. + * @returns Array of community objects or undefined if not found. + */ +export const CommunityByHostname = selectorFamily({ + key: 'CommunityByHostname', + get: + (hostname: string) => + ({ get }): Community | undefined => { + const response = get( + AllCommunitiesQuery({ hostname, limit: 1, page: 1 }) + ); + if (isResponseOk(response)) { + return response.data.docs[0]; + } + }, +}); export const CurrentCommunityQuery = selector({ - key: 'CurrentCommunity', + key: 'CurrentCommunityQuery', get: ({ get }): AxiosResponse | AxiosError => { return get(ApiGet({ url: '/communities/current' })) as | AxiosResponse @@ -13,7 +84,7 @@ export const CurrentCommunityQuery = selector({ }); export const CurrentCommunity = selector({ - key: 'AllReports', + key: 'CurrentCommunity', get: ({ get }): Community | undefined => { const response = get(CurrentCommunityQuery); diff --git a/packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts b/packages/frontend/src/model/community/dto/find-all-communities-query.dto.ts similarity index 100% rename from packages/frontend/src/model/communitites/dto/find-all-communities-query.dto.ts rename to packages/frontend/src/model/community/dto/find-all-communities-query.dto.ts diff --git a/packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts b/packages/frontend/src/model/community/dto/find-all-communities-response.dto.ts similarity index 100% rename from packages/frontend/src/model/communitites/dto/find-all-communities-response.dto.ts rename to packages/frontend/src/model/community/dto/find-all-communities-response.dto.ts diff --git a/packages/frontend/src/model/eas/components/EasContextProvider.tsx b/packages/frontend/src/model/eas/components/EasContextProvider.tsx new file mode 100644 index 000000000..85c9f33c8 --- /dev/null +++ b/packages/frontend/src/model/eas/components/EasContextProvider.tsx @@ -0,0 +1,299 @@ +import { + EAS, + SchemaEncoder, + SchemaItem, + SchemaRegistry, + SchemaValue, +} from '@ethereum-attestation-service/eas-sdk'; +import { + MetaTransactionData, + OperationType, + SafeTransactionDataPartial, +} from '@safe-global/safe-core-sdk-types'; +import React, { ReactNode, useEffect, useState } from 'react'; +import { useEasConfig } from '../hooks/useEasConfig'; +import { useNetwork } from 'wagmi'; +import { useSafe } from '../../safe/hooks/useSafe'; +import { useProvider, useSigner } from '../../wagmi/hooks/useSigner'; +import { EasContext } from '../types/eas-context-value.type'; +import { SchemaField } from '../types/schema-field.type'; +import { isSchemaFieldTypeName } from '../utils/is-schema-field-type-name'; +import { parse } from 'csv-parse/sync'; + +export const ReactEasContext = React.createContext( + undefined +); + +type EasProviderProps = { + schemaUid: string; + children: ReactNode; +}; + +export const EasContextProvider: React.FC = ({ + schemaUid, + children, +}: EasProviderProps) => { + // Hooks + const { safeAddress, safe, safeApiKit, ethersAdapter } = useSafe(); + const { chain } = useNetwork(); + const easConfig = useEasConfig(chain?.id); + const rpcProvider = useProvider(); + const rpcSigner = useSigner(); + + // Local state + const [state, setState] = useState({ schemaUid }); + + function initEas() { + if (!easConfig?.address) return; + setState((previous) => ({ ...previous, eas: new EAS(easConfig.address) })); + } + + function loadSchemaRecord() { + if (!easConfig || !rpcProvider || !schemaUid) { + return; + } + void (async () => { + setState((prev) => ({ + ...prev, + schemaRecordIsLoading: true, + schemaRecordError: undefined, + })); + try { + const schemaRegistry = new SchemaRegistry(easConfig.registryAddress); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + schemaRegistry.connect(rpcProvider as any); + if (!schemaUid) { + return; + } + const schemaRecord = await schemaRegistry.getSchema({ + uid: schemaUid, + }); + setState((prev) => ({ + ...prev, + schemaRecord: schemaRecord, + schemaRecordIsLoading: false, + })); + } catch (err) { + console.error(err); + setState((prev) => ({ + ...prev, + schemaRecord: undefined, + schemaRecordIsLoading: false, + schemaRecordError: new Error('Error loading schema.'), + })); + } + })(); + } + + function createSchemaFromRecord() { + if (!state.schemaRecord) { + return; + } + const schema: SchemaField[] = []; + state.schemaRecord.schema.split(',').forEach((field) => { + const [type, name] = field.split(' '); + if (isSchemaFieldTypeName(type)) { + schema.push({ name, type }); + } else { + const err = new Error(`Invalid type name: ${type}`); + console.error(err); + setState((prev) => ({ ...prev, schemaError: err })); + } + }); + setState((prev) => ({ + ...prev, + schema, + })); + } + + function initSchemaEncoder() { + if (!state.schemaRecord?.schema) return; + const schemaEncoder = new SchemaEncoder(state.schemaRecord?.schema); + setState((prev) => ({ ...prev, schemaEncoder })); + } + + const createAttestationsTransaction = async (csv: string): Promise => { + try { + if ( + !rpcSigner || + !safeAddress || + !safe || + !safeApiKit || + !ethersAdapter || + !state.eas || + !state.schemaEncoder || + !state.schema + ) { + throw new Error('Missing signer, safe, safeApiKit or ethersAdapter'); + } + + setState((prev) => ({ + ...prev, + safeTransactionState: { + status: 'creating', + }, + })); + + const safeTransactionData: MetaTransactionData[] = []; + + const parsedCsv: string[][] = parse(csv, { + relax_column_count: true, + relax_quotes: true, + trim: true, + }); + + for (const row of parsedCsv) { + // Skip optional header row + // First value matches first schema column name = header row + if (row[0] === state.schema[0].name) { + continue; + } + + // Skip empty rows + if (row.length === 0 || (row.length === 1 && row[0] === '')) { + continue; + } + + // Skip rows with no recipient + if (row[row.length - 1] === '') { + continue; + } + + // Check if the row has the correct number of columns + if (row.length !== state.schema.length + 1) { + throw new Error( + `Invalid number of columns in row ${parsedCsv.indexOf(row) + 1}` + ); + } + + // Encode the data + const items: SchemaItem[] = []; + for (let i = 0; i < state.schema.length; i++) { + const { name, type } = state.schema[i]; + let value: SchemaValue; + if (type.startsWith('uint')) { + value = BigInt(row[i]); + } else { + switch (type) { + case 'address': + value = row[i]; + break; + case 'string': + value = row[i]; + break; + case 'bool': + value = row[i] === 'true'; + break; + case 'bytes32': + value = row[i]; + break; + case 'bytes': + value = row[i]; + break; + default: + value = row[i]; + break; + } + } + + items.push({ + name, + value, + type, + }); + } + + const encodedData = state.schemaEncoder.encodeData(items); + + // Create the transaction data + const txData: SafeTransactionDataPartial = { + to: state.eas.contract.address, + value: '0', + data: state.eas.contract.interface.encodeFunctionData('attest', [ + { + schema: schemaUid, + data: { + recipient: row[row.length - 1], // Last column should contain the recipient address + expirationTime: 0, + revocable: false, + refUID: + '0x0000000000000000000000000000000000000000000000000000000000000000', + data: encodedData, + value: 0, + }, + }, + ]), + operation: OperationType.Call, + }; + + // Add the transaction data to the list + safeTransactionData.push(txData); + } + + const safeTransaction = await safe.createTransaction({ + safeTransactionData, + options: { + nonce: await safeApiKit.getNextNonce(safeAddress), + }, + }); + + const signerAddress = await rpcSigner.getAddress(); + const txHash = await safe.getTransactionHash(safeTransaction); + + setState((prev) => ({ + ...prev, + safeTransactionState: { + status: 'signing', + txHash, + }, + })); + + const signature = await safe.signTransactionHash(txHash); + + // Propose transaction to the service + await safeApiKit.proposeTransaction({ + safeAddress, + safeTransactionData: safeTransaction.data, + safeTxHash: txHash, + senderAddress: signerAddress, + senderSignature: signature.data, + }); + + console.log('Proposed a transaction with Safe:', safeAddress); + console.log('- Transaction hash:', txHash); + console.log('- Signer address:', signerAddress); + console.log('- Signature:', signature.data); + + setState((prev) => ({ + ...prev, + safeTransactionState: { + status: 'created', + txHash, + signature, + }, + })); + } catch (e) { + setState((prev) => ({ + ...prev, + safeTransactionState: { + status: 'error', + error: e as Error, + }, + })); + console.error('Error creating transaction', e); + } + }; + + useEffect(initEas, [easConfig?.address]); + useEffect(loadSchemaRecord, [easConfig, rpcProvider, schemaUid]); + useEffect(createSchemaFromRecord, [state.schemaRecord]); + useEffect(initSchemaEncoder, [state.schemaRecord?.schema]); + + const context = { ...state, createAttestationsTransaction }; + + return ( + + {children} + + ); +}; diff --git a/packages/frontend/src/model/eas/eas.config.ts b/packages/frontend/src/model/eas/eas.config.ts new file mode 100644 index 000000000..a4e23ba88 --- /dev/null +++ b/packages/frontend/src/model/eas/eas.config.ts @@ -0,0 +1,18 @@ +type EasConfig = { + id: number; + address: string; + registryAddress: string; +}; + +export const easConfig: EasConfig[] = [ + { + id: 1, // Ethereum + address: '0xA1207F3BBa224E2c9c3c6D5aF63D0eb1582Ce587', + registryAddress: '0xA7b39296258348C78294F95B872b282326A97BDF', + }, + { + id: 10, // Optimism + address: '0x4200000000000000000000000000000000000021', + registryAddress: '0x4200000000000000000000000000000000000020', + }, +]; diff --git a/packages/frontend/src/model/eas/hooks/useAttestations.ts b/packages/frontend/src/model/eas/hooks/useAttestations.ts deleted file mode 100644 index eef265a0f..000000000 --- a/packages/frontend/src/model/eas/hooks/useAttestations.ts +++ /dev/null @@ -1,180 +0,0 @@ -import { EAS, SchemaEncoder } from '@ethereum-attestation-service/eas-sdk'; -import { - MetaTransactionData, - SafeTransactionDataPartial, - OperationType, - SafeSignature, -} from '@safe-global/safe-core-sdk-types'; -import { useState } from 'react'; -import toast from 'react-hot-toast'; -import { ETH_CHAIN_ID } from '../../eth/eth.constants'; -import { useSigner } from '../../eth/hooks/useSigner'; -import { useReportRunReturn } from '../../report/types/use-report-run-return.type'; -import { useSafe } from '../../safe/hooks/useSafe'; -import { - EAS_ADDRESS, - ATTESTATION_SCHEMA, - ATTESTATION_SCHEMA_UID, -} from '../eas.constants'; -import { Attestation } from '../types/attestation.type'; - -const eas = new EAS(EAS_ADDRESS); -const schemaEncoder = new SchemaEncoder(ATTESTATION_SCHEMA); - -type UseAttestationsReturn = { - creating: boolean | undefined; - txHash: string | undefined; - signature: SafeSignature | undefined; - createAttestationsTransaction: ( - data: useReportRunReturn, - period: string - ) => Promise; -}; - -export function useAttestations(): UseAttestationsReturn { - // Hooks - const rpcSigner = useSigner(ETH_CHAIN_ID); - const { safe, safeApiKit, ethersAdapter, SAFE_ADDRESS } = useSafe(); - - // Local state - const [creating, setCreating] = useState(); - const [txHash, setTxHash] = useState(); - const [signature, setSignature] = useState(); - - const createAttestationsTransaction = async ( - data: useReportRunReturn, - period: string - ): Promise => { - try { - if ( - !rpcSigner || - !safe || - !safeApiKit || - !ethersAdapter || - !SAFE_ADDRESS - ) { - throw new Error('Missing signer, safe, safeApiKit or ethersAdapter'); - } - - setCreating(true); - - const safeTransactionData: MetaTransactionData[] = []; - const attestationRows = data.rows as unknown as Attestation[]; - - for (const att of attestationRows) { - // Only attest if the user has an identity - if (!att.users_identityEthAddress) { - continue; - } - - // Encode the data - const encodedData = schemaEncoder.encodeData([ - { name: 'period', value: period, type: 'string' }, - { - name: 'received_score', - value: att.total_received_praise_score, - type: 'uint16', - }, - { - name: 'given_score', - value: att.total_given_praise_score, - type: 'uint16', - }, - { - name: 'top_10_receiver', - value: att.top_10_receiver, - type: 'bool', - }, - { - name: 'top_50_receiver', - value: att.top_50_receiver, - type: 'bool', - }, - { - name: 'top_100_receiver', - value: att.top_100_receiver, - type: 'bool', - }, - { - name: 'top_10_giver', - value: att.top_10_giver, - type: 'bool', - }, - { - name: 'top_50_giver', - value: att.top_50_giver, - type: 'bool', - }, - { - name: 'top_100_giver', - value: att.top_100_giver, - type: 'bool', - }, - ]); - - // Create the transaction data - const txData: SafeTransactionDataPartial = { - to: eas.contract.address, - value: '0', - data: eas.contract.interface.encodeFunctionData('attest', [ - { - schema: ATTESTATION_SCHEMA_UID, - data: { - recipient: att.users_identityEthAddress, - expirationTime: 0, - revocable: false, - refUID: - '0x0000000000000000000000000000000000000000000000000000000000000000', - data: encodedData, - value: 0, - }, - }, - ]), - operation: OperationType.Call, - }; - - // Add the transaction data to the list - safeTransactionData.push(txData); - } - - const safeTransaction = await safe.createTransaction({ - safeTransactionData, - options: { - nonce: await safeApiKit.getNextNonce(SAFE_ADDRESS), - }, - }); - - const signerAddress = await rpcSigner.getAddress(); - const txHash = await safe.getTransactionHash(safeTransaction); - const signature = await safe.signTransactionHash(txHash); - - // Propose transaction to the service - await safeApiKit.proposeTransaction({ - safeAddress: SAFE_ADDRESS, - safeTransactionData: safeTransaction.data, - safeTxHash: txHash, - senderAddress: signerAddress, - senderSignature: signature.data, - }); - - console.log('Proposed a transaction with Safe:', SAFE_ADDRESS); - console.log('- Transaction hash:', txHash); - console.log('- Signer address:', signerAddress); - console.log('- Signature:', signature.data); - - setTxHash(txHash); - setSignature(signature); - } catch (e) { - console.error('Error creating attestations', e); - toast.error((e as Error).message); - } finally { - setCreating(false); - } - }; - return { - creating, - txHash, - signature, - createAttestationsTransaction, - }; -} diff --git a/packages/frontend/src/model/eas/hooks/useEas.ts b/packages/frontend/src/model/eas/hooks/useEas.ts new file mode 100644 index 000000000..a49de798e --- /dev/null +++ b/packages/frontend/src/model/eas/hooks/useEas.ts @@ -0,0 +1,11 @@ +import { useContext } from 'react'; +import { ReactEasContext } from '../components/EasContextProvider'; +import { EasContext } from '../types/eas-context-value.type'; + +export function useEas(): EasContext { + const context = useContext(ReactEasContext); + if (!context) { + throw new Error('useEas must be used within a EasProvider'); + } + return context; +} diff --git a/packages/frontend/src/model/eas/hooks/useEasConfig.ts b/packages/frontend/src/model/eas/hooks/useEasConfig.ts new file mode 100644 index 000000000..c1596e52b --- /dev/null +++ b/packages/frontend/src/model/eas/hooks/useEasConfig.ts @@ -0,0 +1,12 @@ +import { easConfig } from '../eas.config'; + +export function useEasConfig(chainId?: number) { + if (!chainId) { + return undefined; + } + const easContractAddress = easConfig.find((c) => c.id === chainId); + if (!easContractAddress) { + return undefined; + } + return easContractAddress; +} diff --git a/packages/frontend/src/model/eas/types/attestation.type.ts b/packages/frontend/src/model/eas/types/attestation.type.ts index ad3628ae0..a46af1ed5 100644 --- a/packages/frontend/src/model/eas/types/attestation.type.ts +++ b/packages/frontend/src/model/eas/types/attestation.type.ts @@ -1,12 +1,12 @@ export type Attestation = { - useraccounts_name: string; - users_identityEthAddress: string; - total_received_praise_score: number; - top_10_receiver: boolean; - top_50_receiver: boolean; - top_100_receiver: boolean; - total_given_praise_score: number; - top_10_giver: boolean; - top_50_giver: boolean; - top_100_giver: boolean; + period: string; + received_score: string; + given_score: string; + top_10_receiver: string; + top_50_receiver: string; + top_100_receiver: string; + top_10_giver: string; + top_50_giver: string; + top_100_giver: string; + recipient: string; }; diff --git a/packages/frontend/src/model/eas/types/eas-context-value.type.ts b/packages/frontend/src/model/eas/types/eas-context-value.type.ts new file mode 100644 index 000000000..3405fbd92 --- /dev/null +++ b/packages/frontend/src/model/eas/types/eas-context-value.type.ts @@ -0,0 +1,35 @@ +import { + EAS, + SchemaEncoder, + SchemaRecord, +} from '@ethereum-attestation-service/eas-sdk'; + +import { SafeSignature } from '@safe-global/safe-core-sdk-types'; +import { SchemaField } from './schema-field.type'; + +export type SafeTransactionState = { + status: + | 'creating' + | 'signing' + | 'created' + | 'error' + | 'executing' + | 'executed'; + txHash?: string; + signature?: SafeSignature; + error?: Error; +}; + +export type EasContext = { + schemaUid: string; + eas?: EAS; + schemaEncoder?: SchemaEncoder; + schemaRecordIsLoading?: boolean; + schemaRecord?: SchemaRecord; + schemaRecordError?: Error; + schema?: SchemaField[]; + schemaError?: Error; + + safeTransactionState?: SafeTransactionState; + createAttestationsTransaction?: (csv: string) => Promise; +}; diff --git a/packages/frontend/src/model/eas/types/schema-field-type.type.ts b/packages/frontend/src/model/eas/types/schema-field-type.type.ts new file mode 100644 index 000000000..bb1467aa1 --- /dev/null +++ b/packages/frontend/src/model/eas/types/schema-field-type.type.ts @@ -0,0 +1,186 @@ +export const SCHEMA_FIELD_TYPES = [ + { + name: 'address', + description: 'An address can be any ethereum address or contract address', + }, + { + name: 'string', + description: 'A string can be any text of arbitrary length.', + }, + { + name: 'bool', + description: 'A bool can either be on or off.', + }, + { + name: 'bytes32', + description: + 'A bytes32 is a 32 byte value. Useful for unique identifiers or small data.', + }, + { + name: 'bytes', + description: 'A bytes value is an arbitrary byte value.', + }, + { + name: 'uint8', + description: 'A uint8 is a 8 integer value between 0 and 256', + }, + { + name: 'uint16', + description: 'A uint16 is a 16 integer value between 0 and 65536', + }, + { + name: 'uint24', + description: 'A uint24 is a 24 integer value between 0 and 16777216', + }, + { + name: 'uint32', + description: 'A uint32 is a 32 integer value between 0 and 4294967296', + }, + { + name: 'uint40', + description: 'A uint40 is a 40 integer value between 0 and 1099511627776', + }, + { + name: 'uint48', + description: 'A uint48 is a 48 integer value between 0 and 281474976710656', + }, + { + name: 'uint56', + description: + 'A uint56 is a 56 integer value between 0 and 72057594037927936', + }, + { + name: 'uint64', + description: + 'A uint64 is a 64 integer value between 0 and 18446744073709551616', + }, + { + name: 'uint72', + description: + 'A uint72 is a 72 integer value between 0 and 4722366482869645213696', + }, + { + name: 'uint80', + description: + 'A uint80 is a 80 integer value between 0 and 1208925819614629174706176', + }, + { + name: 'uint88', + description: + 'A uint88 is a 88 integer value between 0 and 309485009821345068724781056', + }, + { + name: 'uint96', + description: + 'A uint96 is a 96 integer value between 0 and 79228162514264337593543950336', + }, + { + name: 'uint104', + description: + 'A uint104 is a 104 integer value between 0 and 20282409603651670423947251286016', + }, + { + name: 'uint112', + description: + 'A uint112 is a 112 integer value between 0 and 5192296858534827628530496329220096', + }, + { + name: 'uint120', + description: + 'A uint120 is a 120 integer value between 0 and 1329227995784915872903807060280344576', + }, + { + name: 'uint128', + description: + 'A uint128 is a 128 integer value between 0 and 340282366920938463463374607431768211456', + }, + { + name: 'uint136', + description: + 'A uint136 is a 136 integer value between 0 and 87112285931760246646623899502532662132736', + }, + { + name: 'uint144', + description: + 'A uint144 is a 144 integer value between 0 and 22300745198530623141535718272648361505980416', + }, + { + name: 'uint152', + description: + 'A uint152 is a 152 integer value between 0 and 5708990770823839524233143877797980545530986496', + }, + { + name: 'uint160', + description: + 'A uint160 is a 160 integer value between 0 and 1461501637330902918203684832716283019655932542976', + }, + { + name: 'uint168', + description: + 'A uint168 is a 168 integer value between 0 and 374144419156711147060143317175368453031918731001856', + }, + { + name: 'uint176', + description: + 'A uint176 is a 176 integer value between 0 and 95780971304118053647396689196894323976171195136475136', + }, + { + name: 'uint184', + description: + 'A uint184 is a 184 integer value between 0 and 24519928653854221733733552434404946937899825954937634816', + }, + { + name: 'uint192', + description: + 'A uint192 is a 192 integer value between 0 and 6277101735386680763835789423207666416102355444464034512896', + }, + { + name: 'uint200', + description: + 'A uint200 is a 200 integer value between 0 and 1606938044258990275541962092341162602522202993782792835301376', + }, + { + name: 'uint208', + description: + 'A uint208 is a 208 integer value between 0 and 411376139330301510538742295639337626245683966408394965837152256', + }, + { + name: 'uint216', + description: + 'A uint216 is a 216 integer value between 0 and 105312291668557186697918027683670432318895095400549111254310977536', + }, + { + name: 'uint224', + description: + 'A uint224 is a 224 integer value between 0 and 26959946667150639794667015087019630673637144422540572481103610249216', + }, + { + name: 'uint232', + description: + 'A uint232 is a 232 integer value between 0 and 68977552734371073360835493889708558676882996288460761669049583268864', + }, + { + name: 'uint240', + description: + 'A uint240 is a 240 integer value between 0 and 1766847064778384329583297500742918515827483896875618958121606201292619776', + }, + { + name: 'uint248', + description: + 'A uint248 is a 248 integer value between 0 and 4523128485832663883733241601901871406534423780709393254959260367105535646096384', + }, + { + name: 'uint256', + description: + 'A uint256 is a 256 integer value between 0 and 115792089237316195423570985008687907853269984665640564039457584007913129639936', + }, +] as const; + +export const SCHEMA_FIELD_TYPE_NAMES = SCHEMA_FIELD_TYPES.map((dt) => dt.name); + +export type SchemaFieldTypeName = (typeof SCHEMA_FIELD_TYPE_NAMES)[number]; + +export type SchemaFieldType = { + name: SchemaFieldTypeName; + description: string; +}; diff --git a/packages/frontend/src/model/eas/types/schema-field-value.type.ts b/packages/frontend/src/model/eas/types/schema-field-value.type.ts new file mode 100644 index 000000000..18a58c3d5 --- /dev/null +++ b/packages/frontend/src/model/eas/types/schema-field-value.type.ts @@ -0,0 +1,38 @@ +type BoolValue = { + type: 'bool'; + value: boolean; +}; + +type Bytes32Value = { + type: 'bytes32'; + value: string; +}; + +type StringValue = { + type: 'string'; + value: string; +}; + +type AddressValue = { + type: 'address'; + value: string; +}; + +type BytesValue = { + type: 'bytes'; + value: string; +}; + +type UintValue = { + type: 'uint'; + size: number; + value: string; +}; + +export type ParsedValue = + | BoolValue + | Bytes32Value + | StringValue + | UintValue + | AddressValue + | BytesValue; diff --git a/packages/frontend/src/model/eas/types/schema-field.type.ts b/packages/frontend/src/model/eas/types/schema-field.type.ts new file mode 100644 index 000000000..8587c6dbf --- /dev/null +++ b/packages/frontend/src/model/eas/types/schema-field.type.ts @@ -0,0 +1,6 @@ +import { SchemaFieldTypeName } from './schema-field-type.type'; + +export type SchemaField = { + name: string; + type: SchemaFieldTypeName; +}; diff --git a/packages/frontend/src/model/eas/types/validation-error.type.ts b/packages/frontend/src/model/eas/types/validation-error.type.ts new file mode 100644 index 000000000..b2ebdf6b7 --- /dev/null +++ b/packages/frontend/src/model/eas/types/validation-error.type.ts @@ -0,0 +1,3 @@ +export type ValidationError = { + error: string; +}; diff --git a/packages/frontend/src/model/eas/utils/is-schema-field-type-name.ts b/packages/frontend/src/model/eas/utils/is-schema-field-type-name.ts new file mode 100644 index 000000000..044778e52 --- /dev/null +++ b/packages/frontend/src/model/eas/utils/is-schema-field-type-name.ts @@ -0,0 +1,10 @@ +import { + SCHEMA_FIELD_TYPE_NAMES, + SchemaFieldTypeName, +} from '../types/schema-field-type.type'; + +export function isSchemaFieldTypeName( + name: string +): name is SchemaFieldTypeName { + return SCHEMA_FIELD_TYPE_NAMES.includes(name as SchemaFieldTypeName); +} diff --git a/packages/frontend/src/model/safe/components/SafeContextProvider.tsx b/packages/frontend/src/model/safe/components/SafeContextProvider.tsx new file mode 100644 index 000000000..5be52073f --- /dev/null +++ b/packages/frontend/src/model/safe/components/SafeContextProvider.tsx @@ -0,0 +1,175 @@ +import React, { ReactNode, useEffect, useState } from 'react'; +import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; +import { useAccount, useNetwork } from 'wagmi'; + +import SafeApiKit from '@safe-global/api-kit'; +import { ethers } from 'ethers'; +import { useSafeConfig } from '../hooks/useSafeConfig'; +import { useSigner } from '../../wagmi/hooks/useSigner'; +import { SafeContext } from '../types/use-safe-return'; +import { useRecoilValue } from 'recoil'; +import { CurrentCommunity } from '../../community/community'; + +export const ReactSafeContext = React.createContext( + undefined +); + +const initialState: SafeContext = { + owners: [] as string[], + threshold: 0, + isCurrentUserOwner: false, +}; + +type SafeProviderProps = { + children: ReactNode; +}; + +export const SafeContextProvider: React.FC = ({ + children, +}: SafeProviderProps) => { + const { chain } = useNetwork(); + const rpcSigner = useSigner(); + const { address: userAddress } = useAccount(); + const safeConfig = useSafeConfig(chain?.id); + const community = useRecoilValue(CurrentCommunity); + const address = community?.creator; + + const [state, setState] = useState(initialState); + + /** + * Reset state to initial state on chain change + */ + function resetState(): void { + setState(initialState); + } + + function initializeEthersAdapter(): void { + if (!rpcSigner) return; + try { + const adapter = new EthersAdapter({ + ethers, + signerOrProvider: rpcSigner, + }); + setState((prev) => ({ + ...prev, + ethersAdapter: adapter, + ethersAdapterError: undefined, + })); + } catch (error) { + setState((prev) => ({ + ...prev, + ethersAdapter: undefined, + ethersAdapterError: error as Error, + })); + console.error(error); + } + } + + function initializeSafeApiKit(): void { + try { + if (!state.ethersAdapter || !safeConfig) return; + const apiKit = new SafeApiKit({ + txServiceUrl: safeConfig.serviceUrl, + ethAdapter: state.ethersAdapter, + }); + setState((prev) => ({ + ...prev, + safeApiKit: apiKit, + safeApiKitError: undefined, + })); + } catch (error) { + setState((prev) => ({ + ...prev, + safeApiKit: undefined, + safeApiKitError: error as Error, + })); + console.error(error); + } + } + + function listSafesByOwner(): void { + void (async (): Promise => { + try { + if (!state.safeApiKit || !userAddress) return; + const ownerResponse = await state.safeApiKit.getSafesByOwner( + userAddress + ); + setState((prev) => ({ + ...prev, + safes: ownerResponse.safes, + safesError: undefined, + })); + } catch (error) { + setState((prev) => ({ + ...prev, + safes: undefined, + safesError: error as Error, + })); + console.error(error); + } + })(); + } + + function initializeSafeInstance(): void { + void (async (): Promise => { + try { + if (!state.ethersAdapter || !address) return; + const safeInstance = await Safe.create({ + ethAdapter: state.ethersAdapter, + safeAddress: address, + }); + setState((prev) => ({ + ...prev, + safe: safeInstance, + safeAddress: address, + safeError: undefined, + })); + } catch (error) { + setState((prev) => ({ + ...prev, + safe: undefined, + safeError: error as Error, + })); + console.error(error); + } + })(); + } + + function loadOwnersAndThreshold(): void { + void (async (): Promise => { + try { + if (!state.safe || !userAddress) return; + const safeOwners = await state.safe.getOwners(); + const safeThreshold = await state.safe.getThreshold(); + const currentUserIsOwner = safeOwners.includes(userAddress); + setState((prev) => ({ + ...prev, + owners: safeOwners, + threshold: safeThreshold, + isCurrentUserOwner: currentUserIsOwner, + })); + } catch (error) { + setState((prev) => ({ + ...prev, + ownersAndThresholdError: error as Error, + })); + console.error(error); + } + })(); + } + + useEffect(resetState, [chain]); + useEffect(initializeEthersAdapter, [rpcSigner]); + useEffect(initializeSafeApiKit, [state.ethersAdapter, safeConfig]); + useEffect(listSafesByOwner, [state.safeApiKit, userAddress]); + useEffect(initializeSafeInstance, [state.ethersAdapter, address]); + useEffect(loadOwnersAndThreshold, [state.safe, userAddress]); + + const safeData = { ...state, address }; + + return ( + + {children} + + ); +}; diff --git a/packages/frontend/src/model/safe/components/SafeProvider.tsx b/packages/frontend/src/model/safe/components/SafeProvider.tsx deleted file mode 100644 index e7aeaab2b..000000000 --- a/packages/frontend/src/model/safe/components/SafeProvider.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React, { ReactNode } from 'react'; -import { UseSafeReturn } from '../types/use-safe-return'; -import { useSafeInit } from '../hooks/useSafeInit'; - -// Define the context shape -type SafeContextType = UseSafeReturn | undefined; - -export const SafeContext = React.createContext(undefined); - -type SafeProviderProps = { - children: ReactNode; -}; - -export const SafeProvider: React.FC = ({ - children, -}: SafeProviderProps) => { - const safeData = useSafeInit(); - - return ( - {children} - ); -}; diff --git a/packages/frontend/src/model/safe/hooks/useSafe.ts b/packages/frontend/src/model/safe/hooks/useSafe.ts index c8f52c15d..515b12a46 100644 --- a/packages/frontend/src/model/safe/hooks/useSafe.ts +++ b/packages/frontend/src/model/safe/hooks/useSafe.ts @@ -1,9 +1,9 @@ +import { ReactSafeContext } from '../components/SafeContextProvider'; +import { SafeContext } from '../types/use-safe-return'; import { useContext } from 'react'; -import { UseSafeReturn } from '../types/use-safe-return'; -import { SafeContext } from '../components/SafeProvider'; -export function useSafe(): UseSafeReturn { - const context = useContext(SafeContext); +export function useSafe(): SafeContext { + const context = useContext(ReactSafeContext); if (!context) { throw new Error('useSafe must be used within a SafeProvider'); } diff --git a/packages/frontend/src/model/safe/hooks/useSafeConfig.ts b/packages/frontend/src/model/safe/hooks/useSafeConfig.ts new file mode 100644 index 000000000..94b230bcc --- /dev/null +++ b/packages/frontend/src/model/safe/hooks/useSafeConfig.ts @@ -0,0 +1,8 @@ +import { safeConfig } from '../safe.config'; + +export function useSafeConfig(chainId?: number) { + if (!chainId) { + return undefined; + } + return safeConfig.find((c) => c.id === chainId); +} diff --git a/packages/frontend/src/model/safe/hooks/useSafeInit.ts b/packages/frontend/src/model/safe/hooks/useSafeInit.ts deleted file mode 100644 index eb7eadcb8..000000000 --- a/packages/frontend/src/model/safe/hooks/useSafeInit.ts +++ /dev/null @@ -1,113 +0,0 @@ -// External package imports -import { useEffect, useState } from 'react'; -import { ethers } from 'ethers'; -import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; -import SafeApiKit from '@safe-global/api-kit'; - -// Internal imports -import { useSigner } from '../../eth/hooks/useSigner'; -import { ETH_CHAIN_ID } from '../../eth/eth.constants'; -import { SAFE_TX_SERVICE_URL } from '../safe.constants'; -import { useCommunity } from '../../communitites/hooks/useCommunity'; -import { UseSafeReturn } from '../types/use-safe-return'; -import { useAccount } from 'wagmi'; - -/** - * Custom hook to interface with the Safe protocol and associated utilities. - * @returns An object containing Safe protocol utilities and information. - */ -export function useSafeInit(): UseSafeReturn { - // Hooks - const { community } = useCommunity(); - const rpcSigner = useSigner(ETH_CHAIN_ID); - const { address: userAddress } = useAccount(); - - // Local state - const [ethersAdapter, setEthersAdapter] = useState(); - const [safe, setSafe] = useState(); - const [safeApiKit, setSafeApiKit] = useState(); - const [isValidSafeAddress, setIsValidSafeAddress] = useState(); - const [owners, setOwners] = useState([]); - const [threshold, setThreshold] = useState(0); - const [isCurrentUserOwner, setIsCurrentUserOwner] = useState(false); - const SAFE_ADDRESS = community?.creator; - - /** - * Initialize the Ethers adapter. - */ - function initializeEthersAdapter(): void { - if (!rpcSigner) return; - setEthersAdapter( - new EthersAdapter({ - ethers, - signerOrProvider: rpcSigner, - }) - ); - } - - /** - * Create and initialize the Safe instance. - */ - function initializeSafeInstance(): void { - if (!ethersAdapter || !SAFE_ADDRESS) return; - void (async (): Promise => { - const safeInstance = await Safe.create({ - ethAdapter: ethersAdapter, - safeAddress: SAFE_ADDRESS, - }); - setSafe(safeInstance); - })(); - } - - /** - * Initialize the Safe API Kit. - */ - function initializeSafeApiKit(): void { - if (!ethersAdapter || !SAFE_ADDRESS) return; - void (async (): Promise => { - const apiKit = new SafeApiKit({ - txServiceUrl: SAFE_TX_SERVICE_URL, - ethAdapter: ethersAdapter, - }); - setSafeApiKit(apiKit); - try { - await apiKit.getSafeInfo(SAFE_ADDRESS); // Throws if the Safe address is invalid - setIsValidSafeAddress(true); - } catch (e) { - setIsValidSafeAddress(false); - } - })(); - } - - /** - * Load the owners and threshold values. - */ - function loadOwnersAndThreshold(): void { - if (!safe || !userAddress) return; - void (async (): Promise => { - const safeOwners = await safe.getOwners(); - const safeThreshold = await safe.getThreshold(); - if (safeOwners.includes(userAddress)) { - setIsCurrentUserOwner(true); - } - setOwners(safeOwners); - setThreshold(safeThreshold); - })(); - } - - useEffect(initializeEthersAdapter, [rpcSigner]); - useEffect(initializeSafeInstance, [ethersAdapter, SAFE_ADDRESS]); - useEffect(initializeSafeApiKit, [ethersAdapter, SAFE_ADDRESS]); - useEffect(loadOwnersAndThreshold, [safe, userAddress]); - - return { - isValidSafeAddress, - owners, - threshold, - isCurrentUserOwner, - ethersAdapter, - safe, - safeApiKit, - SAFE_ADDRESS, - }; -} diff --git a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts index 07885a470..974620c64 100644 --- a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts +++ b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts @@ -1,36 +1,16 @@ +// Internal imports +import { useAccount, useNetwork } from 'wagmi'; // External package imports -import { useState, useEffect } from 'react'; -import { SafeMultisigTransactionResponse } from '@safe-global/safe-core-sdk-types'; +import { useEffect, useState } from 'react'; -// Internal imports -import { useAccount } from 'wagmi'; -import { atom, atomFamily, useRecoilState } from 'recoil'; +import { ExecuteSafeTransactionStateType } from '../types/execute-safe-transaction-state.type'; +import { SafeMultisigTransactionResponse } from '@safe-global/safe-core-sdk-types'; import { SignSafeTransactionStateType } from '../types/sign-safe-transaction-state.type'; -import { useSafe } from './useSafe'; -import { toast } from 'react-hot-toast'; -import { errorHasReason } from '../../eth/util/errorHasReason'; import { errorHasMessage } from '../../eth/util/errorHasMessage'; -import { ExecuteSafeTransactionStateType } from '../types/execute-safe-transaction-state.type'; -import { SAFE_TX_SERVICE_URL } from '../safe.constants'; - -const SafeTransaction = atomFamily({ - key: 'SafeTransaction', - default: undefined, -}); - -const SignSafeTransactionState = atom({ - key: 'SignSafeTransactionState', - default: undefined, -}); - -const ExecuteSafeTransactionState = atom({ - key: 'ExecuteSafeTransactionState', - default: undefined, -}); - -type UseSafeTransactionProps = { - safeTxHash?: string; -}; +import { errorHasReason } from '../../eth/util/errorHasReason'; +import { toast } from 'react-hot-toast'; +import { useSafe } from './useSafe'; +import { useSafeConfig } from './useSafeConfig'; type UseSafeTransactionReturn = { transaction?: SafeMultisigTransactionResponse; @@ -40,8 +20,12 @@ type UseSafeTransactionReturn = { signTransaction?: () => void; executeState?: ExecuteSafeTransactionStateType; executeTransaction?: () => void; + explorerUrl?: string; }; +type UseSafeTransactionProps = { + safeTxHash?: string; +}; /** * Custom hook to interface with Safe transactions. * @returns An object containing Safe transaction information and utilities. @@ -52,27 +36,31 @@ export function useSafeTransaction({ // Hooks const { address: userAddress } = useAccount(); const { safe, safeApiKit } = useSafe(); + const { chain } = useNetwork(); + const safeConfig = useSafeConfig(chain?.id); // Local state const [mySignatureAwaited, setMySignatureAwaited] = useState(); + const [transaction, setTransaction] = + useState(); + const [signState, setSignState] = useState(); + const [executeState, setExecuteState] = + useState(); - // Global state - const [transaction, setTransaction] = useRecoilState( - SafeTransaction(safeTxHash ?? '') - ); - const [signState, setSignState] = useRecoilState(SignSafeTransactionState); - const [executeState, setExecuteState] = useRecoilState( - ExecuteSafeTransactionState - ); - - /** - * Load the Safe transaction details. - */ function loadTransaction(): void { - if (transaction || !safeApiKit || !safeTxHash) return; + if (!safeTxHash || !safeApiKit) return; void (async (): Promise => { - const tx = await safeApiKit.getTransaction(safeTxHash); - setTransaction(tx); + try { + const tx = await safeApiKit.getTransaction(safeTxHash); + setTransaction(tx); + } catch (e) { + console.error('Unable to load transaction', e); + if (errorHasReason(e) && e.reason) { + toast.error(e.reason); + } else if (errorHasMessage(e) && e.message) { + toast.error(e.message); + } + } })(); } @@ -90,19 +78,6 @@ export function useSafeTransaction({ })(); } - useEffect(loadTransaction, [ - safeApiKit, - safeTxHash, - transaction, - setTransaction, - ]); - useEffect(checkIfMySignatureAwaited, [userAddress, safe, transaction]); - - const moreConfirmationsRequired = - transaction?.confirmations && - transaction?.confirmationsRequired > 0 && - transaction.confirmations.length < transaction.confirmationsRequired; - function signTransaction(): void { if (!safe || !safeTxHash || !safeApiKit) { return; @@ -112,8 +87,6 @@ export function useSafeTransaction({ try { const signature = await safe.signTransactionHash(safeTxHash); await safeApiKit.confirmTransaction(safeTxHash, signature.data); - const tx = await safeApiKit.getTransaction(safeTxHash); - setTransaction(tx); setSignState({ state: 'signed' }); } catch (e) { if (errorHasReason(e) && e.reason) { @@ -131,8 +104,9 @@ export function useSafeTransaction({ */ function awaitTransactionIndexing(): void { void (async (): Promise => { + if (!transaction) return; const response = await fetch( - `${SAFE_TX_SERVICE_URL}/api/v1/multisig-transactions/${transaction.safeTxHash}` + `${safeConfig?.serviceUrl}/api/v1/multisig-transactions/${transaction.safeTxHash}` ); if (response.ok) { const tx = (await response.json()) as SafeMultisigTransactionResponse; @@ -153,6 +127,7 @@ export function useSafeTransaction({ return; } void (async (): Promise => { + if (!transaction) return; setExecuteState({ state: 'executing' }); try { const txResponse = await safe.executeTransaction(transaction); @@ -171,6 +146,16 @@ export function useSafeTransaction({ })(); } + const moreConfirmationsRequired = + transaction?.confirmations && + transaction?.confirmationsRequired > 0 && + transaction.confirmations.length < transaction.confirmationsRequired; + + const explorerUrl = `${safeConfig?.explorerUrl}/tx/${transaction?.transactionHash}`; + + useEffect(loadTransaction, [safeTxHash, safeApiKit]); + useEffect(checkIfMySignatureAwaited, [userAddress, safe, transaction]); + return { transaction, moreConfirmationsRequired, @@ -179,5 +164,6 @@ export function useSafeTransaction({ signTransaction, executeState, executeTransaction, + explorerUrl, }; } diff --git a/packages/frontend/src/model/safe/safe.config.ts b/packages/frontend/src/model/safe/safe.config.ts new file mode 100644 index 000000000..ec1b9f4c5 --- /dev/null +++ b/packages/frontend/src/model/safe/safe.config.ts @@ -0,0 +1,21 @@ +type SafeConfig = { + id: number; + serviceUrl: string; + explorerUrl: string; + safeChainAbbreviation: string; +}; + +export const safeConfig: SafeConfig[] = [ + { + id: 1, // Ethereum + serviceUrl: 'https://safe-transaction-mainnet.safe.global', + explorerUrl: 'https://etherscan.io', + safeChainAbbreviation: 'eth', + }, + { + id: 10, // Optimism + serviceUrl: 'https://safe-transaction-optimism.safe.global', + explorerUrl: 'https://optimistic.etherscan.io', + safeChainAbbreviation: 'oeth', + }, +]; diff --git a/packages/frontend/src/model/safe/types/use-safe-return.ts b/packages/frontend/src/model/safe/types/use-safe-return.ts index a704240cd..98a1e4cb3 100644 --- a/packages/frontend/src/model/safe/types/use-safe-return.ts +++ b/packages/frontend/src/model/safe/types/use-safe-return.ts @@ -1,13 +1,21 @@ -import SafeApiKit from '@safe-global/api-kit'; import Safe, { EthersAdapter } from '@safe-global/protocol-kit'; -export type UseSafeReturn = { +import SafeApiKit from '@safe-global/api-kit'; + +export type SafeAddressList = string[]; + +export type SafeContext = { ethersAdapter?: EthersAdapter; - safe?: Safe; + ethersAdapterError?: Error; safeApiKit?: SafeApiKit; - isValidSafeAddress?: boolean; + safeApiKitError?: Error; + safeAddress?: string; + safe?: Safe; + safeError?: Error; + safes?: SafeAddressList; + safesError?: Error; owners: string[] | undefined[]; threshold: number; isCurrentUserOwner: boolean; - SAFE_ADDRESS?: string; + ownersAndThresholdError?: Error; }; diff --git a/packages/frontend/src/model/wagmi/hooks/useSigner.ts b/packages/frontend/src/model/wagmi/hooks/useSigner.ts new file mode 100644 index 000000000..c25e5c7d9 --- /dev/null +++ b/packages/frontend/src/model/wagmi/hooks/useSigner.ts @@ -0,0 +1,66 @@ +import { type PublicClient, type WalletClient } from '@wagmi/core'; +import { providers } from 'ethers'; +import { type HttpTransport } from 'viem'; +import { useEffect, useState } from 'react'; +import type { JsonRpcProvider, JsonRpcSigner } from '@ethersproject/providers'; +import { usePublicClient, useWalletClient } from 'wagmi'; + +export function publicClientToProvider(publicClient: PublicClient) { + const { chain, transport } = publicClient; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + if (transport.type === 'fallback') + return new providers.FallbackProvider( + (transport.transports as ReturnType[]).map( + ({ value }) => new providers.JsonRpcProvider(value?.url, network) + ) + ); + return new providers.JsonRpcProvider(transport.url, network); +} + +export function walletClientToSigner(walletClient: WalletClient) { + const { account, chain, transport } = walletClient; + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const provider = new providers.Web3Provider(transport as any, network); + const signer = provider.getSigner(account.address); + + return signer; +} + +export function useSigner() { + const { data: walletClient } = useWalletClient(); + + const [signer, setSigner] = useState(undefined); + useEffect(() => { + if (!walletClient) return; + + const tmpSigner = walletClientToSigner(walletClient); + + setSigner(tmpSigner); + }, [walletClient]); + return signer; +} + +export function useProvider() { + const publicClient = usePublicClient(); + + const [provider, setProvider] = useState( + undefined + ); + useEffect(() => { + if (!publicClient) return; + + const tmpProvider = publicClientToProvider(publicClient); + + setProvider(tmpProvider as JsonRpcProvider); + }, [publicClient]); + return provider; +} diff --git a/packages/frontend/src/model/wagmi/isChainIdSupported.ts b/packages/frontend/src/model/wagmi/isChainIdSupported.ts new file mode 100644 index 000000000..1ba8530d4 --- /dev/null +++ b/packages/frontend/src/model/wagmi/isChainIdSupported.ts @@ -0,0 +1,5 @@ +import { supportedChains } from './wagmi.config'; + +export function isChainIdSupported(id: number) { + return supportedChains.find((c) => c.id === id) !== undefined; +} diff --git a/packages/frontend/src/model/wagmi/wagmi.config.ts b/packages/frontend/src/model/wagmi/wagmi.config.ts new file mode 100644 index 000000000..de0f9cd34 --- /dev/null +++ b/packages/frontend/src/model/wagmi/wagmi.config.ts @@ -0,0 +1,26 @@ +import { configureChains, createConfig, mainnet } from 'wagmi'; + +import { MetaMaskConnector } from 'wagmi/connectors/metaMask'; +import { alchemyProvider } from 'wagmi/providers/alchemy'; +import { optimism } from 'wagmi/chains'; +import { publicProvider } from 'wagmi/providers/public'; +import { WindowWithEnv } from '../../providers/types/window-with-env.type'; + +export const supportedChains = [mainnet, optimism]; + +const win = window as WindowWithEnv; + +const REACT_APP_ALCHEMY_KEY = + process.env.REACT_APP_ALCHEMY_KEY || win.REACT_APP_ALCHEMY_KEY || ''; + +const { chains, publicClient, webSocketPublicClient } = configureChains( + supportedChains, + [alchemyProvider({ apiKey: REACT_APP_ALCHEMY_KEY }), publicProvider()] +); + +export const wagmiConfig = createConfig({ + autoConnect: true, + connectors: [new MetaMaskConnector({ chains })], + publicClient, + webSocketPublicClient, +}); diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 5ffebd106..80cc22071 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -9,6 +9,8 @@ import { Dialog } from '@headlessui/react'; import { useNetwork } from 'wagmi'; import { ETH_CHAIN_ID } from '../../../model/eth/eth.constants'; import { SwitchNetworkButton } from './SwitchNetworkButton'; +import { EasContextProvider } from '../../../model/eas/components/EasContextProvider'; +import { ATTESTATION_SCHEMA_UID } from '../../../model/eas/eas.constants'; const Attestations = (): JSX.Element | null => { // Hooks @@ -41,7 +43,7 @@ const Attestations = (): JSX.Element | null => { } return ( - <> +

    Attestations

    @@ -89,7 +91,7 @@ const Attestations = (): JSX.Element | null => { />
    - + ); }; diff --git a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx index 9b6fa264e..b6e5f0b24 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx @@ -13,11 +13,13 @@ import { faCheckCircle } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { SignAttestationsButton } from './SignAttestationsButton'; import { ExecuteAttestationsButton } from './ExecuteAttestationsButton'; +import { useSafeConfig } from '../../../model/safe/hooks/useSafeConfig'; +import { useNetwork } from 'wagmi'; export function AttestationsDetailBox(): JSX.Element | null { const { periodId } = useParams(); const period = useRecoilValue(SinglePeriod(periodId)); - const { SAFE_ADDRESS, isCurrentUserOwner } = useSafe(); + const { isCurrentUserOwner } = useSafe(); const { transaction, moreConfirmationsRequired, @@ -29,6 +31,8 @@ export function AttestationsDetailBox(): JSX.Element | null { } = useSafeTransaction({ safeTxHash: period?.attestationsTxHash, }); + const { chain } = useNetwork(); + const safeConfig = useSafeConfig(chain?.id); const reportUrl = period ? `/reports/run?${objectToQs({ @@ -42,7 +46,6 @@ export function AttestationsDetailBox(): JSX.Element | null { !period || !period?.attestationsTxHash || !transaction || - !SAFE_ADDRESS || typeof moreConfirmationsRequired === 'undefined' || typeof mySignatureAwaited === 'undefined' ) { @@ -71,7 +74,7 @@ export function AttestationsDetailBox(): JSX.Element | null {
    Safe transaction hash:{' '} (); const periods = useRecoilValue(AllPeriods); const { owners, threshold } = useSafe(); - const { - createAttestationsTransaction: createAttestations, - creating, - txHash, - } = useAttestations(); + + const { createAttestationsTransaction, safeTransactionState } = useEas(); + const { updatePeriod } = useUpdatePeriod(); // Local state const [periodDates, setPeriodDates] = useState(); - const [attestationData, setAttestationData] = useState(); + const [attestationReportData, setAttestationReportData] = + useState(); + const [attestationCsv, setAttestationCsv] = useState(); // Effects function loadPeriodDates(): void { @@ -53,13 +53,48 @@ export function CreateAttestationsDialog({ } function saveTransactionHash(): void { - if (!txHash) return; - void updatePeriod(periodId, { attestationsTxHash: txHash }); + if ( + !safeTransactionState?.txHash || + safeTransactionState?.status !== 'created' + ) + return; + void updatePeriod(periodId, { + attestationsTxHash: safeTransactionState.txHash, + }); onClose(); } + function createAttestationCsv(): void { + if (!attestationReportData) return; + const csvObjects: Attestation[] = []; + for (const attestation of attestationReportData.rows) { + csvObjects.push({ + period: periodId, + received_score: attestation.total_received_praise_score, + given_score: attestation.total_given_praise_score, + top_10_receiver: attestation.top_10_receiver, + top_50_receiver: attestation.top_50_receiver, + top_100_receiver: attestation.top_100_receiver, + top_10_giver: attestation.top_10_giver, + top_50_giver: attestation.top_50_giver, + top_100_giver: attestation.top_100_giver, + recipient: attestation.users_identityEthAddress, + }); + } + const parser = new Parser(); + const csv = parser.parse(csvObjects); + setAttestationCsv(csv); + } + useEffect(loadPeriodDates, [periods, periodId]); - useEffect(saveTransactionHash, [txHash, periodId, updatePeriod, onClose]); + useEffect(saveTransactionHash, [ + safeTransactionState?.txHash, + safeTransactionState?.status, + updatePeriod, + periodId, + onClose, + ]); + useEffect(createAttestationCsv, [attestationReportData, periodId]); if (!periodDates) return null; @@ -89,12 +124,12 @@ export function CreateAttestationsDialog({ manifestUrl={ATTESTATION_REPORT_MANIFEST_URL} done={(result): void => { if (!result) return; - setAttestationData(result); + setAttestationReportData(result); }} />
    - {attestationData && ( + {attestationReportData && ( <>
    This transaction requires the signature of: @@ -108,29 +143,18 @@ export function CreateAttestationsDialog({ )}
    - + +
  • diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialogSubmitButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialogSubmitButton.tsx new file mode 100644 index 000000000..ada8ada0f --- /dev/null +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsDialogSubmitButton.tsx @@ -0,0 +1,63 @@ +import { faPrayingHands } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { SafeTransactionState } from '../../../model/eas/types/eas-context-value.type'; +import { Button } from '../../../components/ui/Button'; + +const buttonStates = { + creating: { + icon: faPrayingHands, + text: 'Creating...', + }, + signing: { + icon: faPrayingHands, + text: 'Signing...', + }, + created: { + text: 'Created', + }, + error: { + text: 'Submit', + }, + default: { + text: 'Submit', + }, +}; + +type CreateAttestationsDialogSubmitButtonProps = { + safeTransactionState?: SafeTransactionState; + attestationCsv?: string; + createAttestationsTransaction?: (attestationCsv: string) => Promise; +}; + +export function CreateAttestationsDialogSubmitButton({ + safeTransactionState, + attestationCsv, + createAttestationsTransaction, +}: CreateAttestationsDialogSubmitButtonProps): JSX.Element { + const currentButtonState = safeTransactionState?.status + ? buttonStates[safeTransactionState?.status] + : buttonStates.default; + + const isButtonDisabled = safeTransactionState?.status + ? ['creating', 'created', 'signing'].includes(safeTransactionState?.status) + : false; + + return ( + + ); +} diff --git a/packages/frontend/src/providers/Web3Provider.tsx b/packages/frontend/src/providers/Web3Provider.tsx index ddd5edc3b..30356f1ef 100644 --- a/packages/frontend/src/providers/Web3Provider.tsx +++ b/packages/frontend/src/providers/Web3Provider.tsx @@ -11,11 +11,7 @@ import { WagmiConfig, configureChains, createConfig } from 'wagmi'; import { publicProvider } from 'wagmi/providers/public'; import { optimism } from 'wagmi/chains'; import { alchemyProvider } from 'wagmi/providers/alchemy'; - -interface WindowWithEnv extends Window { - REACT_APP_ALCHEMY_KEY?: string; - REACT_APP_WALLETCONNECT_PROJECT_ID?: string; -} +import { WindowWithEnv } from './types/window-with-env.type'; const win = window as WindowWithEnv; diff --git a/packages/frontend/src/providers/types/window-with-env.type.ts b/packages/frontend/src/providers/types/window-with-env.type.ts new file mode 100644 index 000000000..437040afa --- /dev/null +++ b/packages/frontend/src/providers/types/window-with-env.type.ts @@ -0,0 +1,4 @@ +export interface WindowWithEnv extends Window { + REACT_APP_ALCHEMY_KEY?: string; + REACT_APP_WALLETCONNECT_PROJECT_ID?: string; +} diff --git a/yarn.lock b/yarn.lock index b809ba14c..665a73dee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,6 +19,13 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:1.9.2": + version: 1.9.2 + resolution: "@adraffy/ens-normalize@npm:1.9.2" + checksum: a9fdeb9e080774c19e4b7f9f60aa5b37cf23fe0e8fe80284bf8221f7396e9f78642bfd39a09a94a4dc3fb8e70f2ac81545204bdcaf222d93f4c4c2ae1f0dca0b + languageName: node + linkType: hard + "@agoric/babel-generator@npm:^7.17.6": version: 7.17.6 resolution: "@agoric/babel-generator@npm:7.17.6" @@ -3034,28 +3041,25 @@ __metadata: languageName: node linkType: hard -"@ethereum-attestation-service/eas-contracts@npm:^0.27.1": - version: 0.27.1 - resolution: "@ethereum-attestation-service/eas-contracts@npm:0.27.1" +"@ethereum-attestation-service/eas-contracts@npm:1.0.0-beta.0": + version: 1.0.0-beta.0 + resolution: "@ethereum-attestation-service/eas-contracts@npm:1.0.0-beta.0" dependencies: - "@typechain/ethers-v5": ^10.2.0 - "@typechain/hardhat": ^6.1.5 - hardhat: 2.13.1 - typechain: ^8.1.1 - checksum: a43b57af246bd0e5e8a6ecf627d050067f8164db7d61de3fa071459af1aa7ddcf8e5b814df4c346c1449556e0f54c3f9b2a151bedb7f275270ea9e125a1f6e6e + hardhat: 2.17.0 + checksum: c01087d1919bd96f63d759d6bfd8de890263d0ec373f312a3ab42f73f2d7e276d64ae1fa1efec9bf6b49ebd4ee6c7ee6663b78582fbdda206c8b69c67a6faf36 languageName: node linkType: hard -"@ethereum-attestation-service/eas-sdk@npm:^0.29.1": - version: 0.29.1 - resolution: "@ethereum-attestation-service/eas-sdk@npm:0.29.1" +"@ethereum-attestation-service/eas-sdk@npm:^1.1.0-beta.3": + version: 1.1.0-beta.3 + resolution: "@ethereum-attestation-service/eas-sdk@npm:1.1.0-beta.3" dependencies: - "@ethereum-attestation-service/eas-contracts": ^0.27.1 - ethers: ^5.7.2 + "@ethereum-attestation-service/eas-contracts": 1.0.0-beta.0 + ethers: ^6.7.1 js-base64: ^3.7.5 multiformats: 9.9.0 pako: ^2.1.0 - checksum: fae314cd10145c7f64785c5d85c1b4d471b163470236e196bd29c21bfc1fb5d1a254e4ca463e5e8462532f05f17e66f24846366becc6004462ee87e2bd5e8d43 + checksum: a5054d2325dd282da1146e868c9d9ed550d43364edb5ec593b44f8ab12ab9d85a0d20ee040716abf9700862be8e11fa730447e3c9dd052c6837fca585ae231d0 languageName: node linkType: hard @@ -4164,37 +4168,6 @@ __metadata: languageName: node linkType: hard -"@json-rpc-tools/provider@npm:^1.5.5": - version: 1.7.6 - resolution: "@json-rpc-tools/provider@npm:1.7.6" - dependencies: - "@json-rpc-tools/utils": ^1.7.6 - axios: ^0.21.0 - safe-json-utils: ^1.1.1 - ws: ^7.4.0 - checksum: c60d73511db7f743c3844d499df6a7e243d5f5493127c00fbf9aec74c95d2e80a3033eb22369c428c2deec263a47cd1b334cd76c84859e30355a6dace893a589 - languageName: node - linkType: hard - -"@json-rpc-tools/types@npm:^1.7.6": - version: 1.7.6 - resolution: "@json-rpc-tools/types@npm:1.7.6" - dependencies: - keyvaluestorage-interface: ^1.0.0 - checksum: f23ec7d79a78aa4e896d1dff506108bd3da38015028afd997034e6498c1f3c7bedee70618b0d1a73adf13b4d2a6a91146c2e9505487280b3c376e74f5790e77c - languageName: node - linkType: hard - -"@json-rpc-tools/utils@npm:^1.7.6": - version: 1.7.6 - resolution: "@json-rpc-tools/utils@npm:1.7.6" - dependencies: - "@json-rpc-tools/types": ^1.7.6 - "@pedrouid/environment": ^1.0.1 - checksum: 32cac2e8cbf8a15d95415de8ded483c6206e6df392e129ad51acd90a4842511e931156c59cb26036fb9fae8054e8f20b719a35282304f39cd18683a5293cb67d - languageName: node - linkType: hard - "@json2csv/formatters@npm:^6.1.3": version: 6.1.3 resolution: "@json2csv/formatters@npm:6.1.3" @@ -4229,10 +4202,10 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/connect-kit-loader@npm:^1.0.1": - version: 1.0.2 - resolution: "@ledgerhq/connect-kit-loader@npm:1.0.2" - checksum: 38475ee5a80b733fee571a8e882e7d309e0e28ef4776adb122bb4be010c54ca966c3946c1cbc78ae0d6abec62cd9ea6c7fbe4879041fe43d173bb287362fa34f +"@ledgerhq/connect-kit-loader@npm:^1.1.0": + version: 1.1.2 + resolution: "@ledgerhq/connect-kit-loader@npm:1.1.2" + checksum: 614fdd9ac2363da60af667adcfe4721f863d8ea06ee45a08192a162c28e806dc07491bee4833d14def74de673eac1f1450eaf67e783c8c28da4e0cd095b4474a languageName: node linkType: hard @@ -4329,7 +4302,7 @@ __metadata: languageName: node linkType: hard -"@motionone/dom@npm:^10.15.5, @motionone/dom@npm:^10.16.2": +"@motionone/dom@npm:^10.16.2": version: 10.16.2 resolution: "@motionone/dom@npm:10.16.2" dependencies: @@ -4364,7 +4337,7 @@ __metadata: languageName: node linkType: hard -"@motionone/svelte@npm:^10.15.5": +"@motionone/svelte@npm:^10.16.2": version: 10.16.2 resolution: "@motionone/svelte@npm:10.16.2" dependencies: @@ -4392,7 +4365,7 @@ __metadata: languageName: node linkType: hard -"@motionone/vue@npm:^10.15.5": +"@motionone/vue@npm:^10.16.2": version: 10.16.2 resolution: "@motionone/vue@npm:10.16.2" dependencies: @@ -4819,6 +4792,22 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.1.0": + version: 1.1.0 + resolution: "@noble/curves@npm:1.1.0" + dependencies: + "@noble/hashes": 1.3.1 + checksum: 2658cdd3f84f71079b4e3516c47559d22cf4b55c23ac8ee9d2b1f8e5b72916d9689e59820e0f9d9cb4a46a8423af5b56dc6bb7782405c88be06a015180508db5 + languageName: node + linkType: hard + +"@noble/hashes@npm:1.1.2": + version: 1.1.2 + resolution: "@noble/hashes@npm:1.1.2" + checksum: 3c2a8cb7c2e053811032f242155d870c5eb98844d924d69702244d48804cb03b42d4a666c49c2b71164420d8229cb9a6f242b972d50d5bb2f1d673b98b041de2 + languageName: node + linkType: hard + "@noble/hashes@npm:1.2.0, @noble/hashes@npm:~1.2.0": version: 1.2.0 resolution: "@noble/hashes@npm:1.2.0" @@ -4833,6 +4822,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.3.1": + version: 1.3.1 + resolution: "@noble/hashes@npm:1.3.1" + checksum: 7fdefc0f7a0c1ec27acc6ff88841793e3f93ec4ce6b8a6a12bfc0dd70ae6b7c4c82fe305fdfeda1735d5ad4a9eebe761e6693b3d355689c559e91242f4bc95b1 + languageName: node + linkType: hard + "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -4867,161 +4863,161 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ethereumjs-block@npm:5.0.0": - version: 5.0.0 - resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.0" +"@nomicfoundation/ethereumjs-block@npm:5.0.1": + version: 5.0.1 + resolution: "@nomicfoundation/ethereumjs-block@npm:5.0.1" dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-trie": 6.0.0 - "@nomicfoundation/ethereumjs-tx": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-trie": 6.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 ethereum-cryptography: 0.1.3 ethers: ^5.7.1 - checksum: c507d9c2160e6af9b317f434f2e1bc4ba2541e08382e49b4a295c87d05dfaf299326acb5b0cb735892349987d74557fea4c155909029b04f9bd76d20a45b48eb + checksum: 02591bc9ba02b56edc5faf75a7991d6b9430bd98542864f2f6ab202f0f4aed09be156fdba60948375beb10e524ffa4e461475edc8a15b3098b1c58ff59a0137e languageName: node linkType: hard -"@nomicfoundation/ethereumjs-blockchain@npm:7.0.0": - version: 7.0.0 - resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.0" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.0 - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-ethash": 3.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-trie": 6.0.0 - "@nomicfoundation/ethereumjs-tx": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 +"@nomicfoundation/ethereumjs-blockchain@npm:7.0.1": + version: 7.0.1 + resolution: "@nomicfoundation/ethereumjs-blockchain@npm:7.0.1" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.1 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-ethash": 3.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-trie": 6.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 abstract-level: ^1.0.3 debug: ^4.3.3 ethereum-cryptography: 0.1.3 level: ^8.0.0 lru-cache: ^5.1.1 memory-level: ^1.0.0 - checksum: 890eb8bd8b5fc3c50895a72ed81b71fa0a1c17ccb2ca50eab4e594cef3caec42571ee645877fa6aa7ec3b0413db0a78210fc91e5b6f4fbce86c1cd16a2e85a54 + checksum: 8b7a4e3613c2abbf59e92a927cb074d1df8640fbf6a0ec4be7fcb5ecaead1310ebbe3a41613c027253742f6dccca6eaeee8dde0a38315558de156313d0c8f313 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-common@npm:4.0.0": - version: 4.0.0 - resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.0" +"@nomicfoundation/ethereumjs-common@npm:4.0.1": + version: 4.0.1 + resolution: "@nomicfoundation/ethereumjs-common@npm:4.0.1" dependencies: - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-util": 9.0.1 crc-32: ^1.2.0 - checksum: fa591cdf0972e207e13a6f190942a4402d0100a3f77a930d528aff78edaf1c9f5ab14d7b5b8c313f8ca0fa03fd9111eb1a1d2d3348d056c041d4e16b0bfb425d + checksum: af5b599bcc07430b57017e516b0bad70af04e812b970be9bfae0c1d3433ab26656b3d1db71717b3b0fb38a889db2b93071b45adc1857000e7cd58a99a8e29495 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-ethash@npm:3.0.0": - version: 3.0.0 - resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.0" +"@nomicfoundation/ethereumjs-ethash@npm:3.0.1": + version: 3.0.1 + resolution: "@nomicfoundation/ethereumjs-ethash@npm:3.0.1" dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-block": 5.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 abstract-level: ^1.0.3 bigint-crypto-utils: ^3.0.23 ethereum-cryptography: 0.1.3 - checksum: 659c73b4fabaf56da0c3d85e04d441ba2d8ce55061249bd3945ef9e8a808bd16d2af7b221277e118c2ba03434b471e872c3ef45089b440fc502b2a78ea4fc334 + checksum: beeec9788a9ed57020ee47271447715bdc0a98990a0bd0e9d598c6de74ade836db17c0590275e6aab12fa9b0fbd81f1d02e3cdf1fb8497583cec693ec3ed6aed languageName: node linkType: hard -"@nomicfoundation/ethereumjs-evm@npm:2.0.0": - version: 2.0.0 - resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.0" +"@nomicfoundation/ethereumjs-evm@npm:2.0.1": + version: 2.0.1 + resolution: "@nomicfoundation/ethereumjs-evm@npm:2.0.1" dependencies: "@ethersproject/providers": ^5.7.1 - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-tx": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 debug: ^4.3.3 ethereum-cryptography: 0.1.3 mcl-wasm: ^0.7.1 rustbn.js: ~0.2.0 - checksum: 0d869db94ac9d29ee710913840f33ffdf91525423a0e7a7ee8cdea546c1c5cf3804af9f646efa83232c49546d655e504612f26e46fefbe9ac9d7f7166704789e + checksum: 0aa2e1460e1c311506fd3bf9d03602c7c3a5e03f352173a55a274a9cc1840bd774692d1c4e5c6e82a7eee015a7cf1585f1c5be02cfdf54cc2a771421820e3f84 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-rlp@npm:5.0.0": - version: 5.0.0 - resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.0" +"@nomicfoundation/ethereumjs-rlp@npm:5.0.1": + version: 5.0.1 + resolution: "@nomicfoundation/ethereumjs-rlp@npm:5.0.1" bin: rlp: bin/rlp - checksum: fbf353e77d55f40bbd05837498f208ac78a344b1917aafd8cc46f582b193d85eb6f61f71c2ef26a21084a98f53704675068af65e2ecc58aed5ea982da09d33a0 + checksum: 5a51d2cf92b84e50ce516cbdadff5d39cb4c6b71335e92eaf447dfb7d88f5499d78d599024b9252efd7ba99495de36f4d983cec6a89e77db286db691fc6328f7 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-statemanager@npm:2.0.0": - version: 2.0.0 - resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.0" +"@nomicfoundation/ethereumjs-statemanager@npm:2.0.1": + version: 2.0.1 + resolution: "@nomicfoundation/ethereumjs-statemanager@npm:2.0.1" dependencies: - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 debug: ^4.3.3 ethereum-cryptography: 0.1.3 ethers: ^5.7.1 js-sdsl: ^4.1.4 - checksum: 3cf4e4c7765cf0c53392fdf2961e5d3e22a2f36ae97c762b5ffebbdce5316b70c7ea678983244d703929f6b1208849249e1bc1e54f7aa1414bc3e812b202aadf + checksum: 157b503fa3e45a3695ba2eba5b089b56719f7790274edd09c95bb0d223570820127f6a2cbfcb14f2d9d876d1440ea4dccb04a4922fa9e9e34b416fddd6517c20 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-trie@npm:6.0.0": - version: 6.0.0 - resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.0" +"@nomicfoundation/ethereumjs-trie@npm:6.0.1": + version: 6.0.1 + resolution: "@nomicfoundation/ethereumjs-trie@npm:6.0.1" dependencies: - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 "@types/readable-stream": ^2.3.13 ethereum-cryptography: 0.1.3 readable-stream: ^3.6.0 - checksum: 0221250e323e5a92e6a5bcf60e47fa3893e965493e2342b61706a7e7c4a6779d101a515c2e59aa6f2f3080b12937e29b491aa20b3f24c59d4ebd847df51b9718 + checksum: 7001c3204120fd4baba673b4bb52015594f5ad28311f24574cd16f38c015ef87ed51188d6f46d6362ffb9da589359a9e0f99e6068ef7a2f61cb66213e2f493d7 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-tx@npm:5.0.0": - version: 5.0.0 - resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.0" +"@nomicfoundation/ethereumjs-tx@npm:5.0.1": + version: 5.0.1 + resolution: "@nomicfoundation/ethereumjs-tx@npm:5.0.1" dependencies: "@chainsafe/ssz": ^0.9.2 "@ethersproject/providers": ^5.7.2 - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 ethereum-cryptography: 0.1.3 - checksum: 3549e2cc85229d598d313bc3c298182f2154db4260bf3c4a933b40a69aa79c99f636d77b3af2d89882c95398b673feadc69e38ba48e475d567dde864f47d72a8 + checksum: aa3829e4a43f5e10cfd66b87eacb3e737ba98f5e3755a3e6a4ccfbc257dbf10d926838cc3acb8fef8afa3362a023b7fd11b53e6ba53f94bb09c345f083cd29a8 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-util@npm:9.0.0": - version: 9.0.0 - resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.0" +"@nomicfoundation/ethereumjs-util@npm:9.0.1": + version: 9.0.1 + resolution: "@nomicfoundation/ethereumjs-util@npm:9.0.1" dependencies: "@chainsafe/ssz": ^0.10.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 ethereum-cryptography: 0.1.3 - checksum: f12a23cc6e1fa404124249a02834dc459c885962bd8da19987cbc3df043d6e3476dd41351f3edafe7e0dd3c1b6f897a31a613ca3db6427b7fc9104329e8e90b0 + checksum: 5f8a50a25c68c974b717f36ad0a5828b786ce1aaea3c874663c2014593fa387de5ad5c8cea35e94379df306dbd1a58c55b310779fd82197dcb993d5dbd4de7a1 languageName: node linkType: hard -"@nomicfoundation/ethereumjs-vm@npm:7.0.0": - version: 7.0.0 - resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.0" - dependencies: - "@nomicfoundation/ethereumjs-block": 5.0.0 - "@nomicfoundation/ethereumjs-blockchain": 7.0.0 - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-evm": 2.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-statemanager": 2.0.0 - "@nomicfoundation/ethereumjs-trie": 6.0.0 - "@nomicfoundation/ethereumjs-tx": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 +"@nomicfoundation/ethereumjs-vm@npm:7.0.1": + version: 7.0.1 + resolution: "@nomicfoundation/ethereumjs-vm@npm:7.0.1" + dependencies: + "@nomicfoundation/ethereumjs-block": 5.0.1 + "@nomicfoundation/ethereumjs-blockchain": 7.0.1 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-evm": 2.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-statemanager": 2.0.1 + "@nomicfoundation/ethereumjs-trie": 6.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 debug: ^4.3.3 ethereum-cryptography: 0.1.3 mcl-wasm: ^0.7.1 rustbn.js: ~0.2.0 - checksum: 46ac42dec660f741eee211992e5eeb101b88ef557100cf80aa2529761e8da9ed9c066ed5601872a1db3ab9af1f9b84709acbb9504b00614851f9774bcbbd638d + checksum: 0f637316322744140d6f75d894c21b8055e27a94c72dd8ae9b0b9b93c0d54d7f30fa2aaf909e802e183a3f1020b4aa6a8178dedb823a4ce70a227ac7b432f8c1 languageName: node linkType: hard @@ -5317,13 +5313,6 @@ __metadata: languageName: node linkType: hard -"@pedrouid/environment@npm:^1.0.1": - version: 1.0.1 - resolution: "@pedrouid/environment@npm:1.0.1" - checksum: fd88340ad760f26340a2816c3677f0ca913976e315880891c3de3f028fe64abc9704fb904234dce77a1ff15c22d0b6cbf1d4199a76de6695c2aed8353ce20590 - languageName: node - linkType: hard - "@pkgr/utils@npm:^2.3.1": version: 2.4.1 resolution: "@pkgr/utils@npm:2.4.1" @@ -5508,33 +5497,33 @@ __metadata: languageName: node linkType: hard -"@safe-global/safe-apps-provider@npm:^0.15.2": - version: 0.15.2 - resolution: "@safe-global/safe-apps-provider@npm:0.15.2" +"@safe-global/safe-apps-provider@npm:^0.17.1": + version: 0.17.1 + resolution: "@safe-global/safe-apps-provider@npm:0.17.1" dependencies: - "@safe-global/safe-apps-sdk": 7.9.0 + "@safe-global/safe-apps-sdk": 8.0.0 events: ^3.3.0 - checksum: 5d647d105c935f1cb2b349b2dd3f8b590be5b16f5c1e65e4fd3fb8c72e46bfe8e2bb8e4876642511c41c0b3d75ae2f572e55a35066740c04d80c1def02e93e3b + checksum: 02f0415a4bb77b82e55f0055be045af715d9c0ea0fa7daa4e0604f40cc2189051d111b8ead67ddab0e99b1e423b444753c11d69bb213d51e459f706d2b430e34 languageName: node linkType: hard -"@safe-global/safe-apps-sdk@npm:7.9.0": - version: 7.9.0 - resolution: "@safe-global/safe-apps-sdk@npm:7.9.0" +"@safe-global/safe-apps-sdk@npm:8.0.0": + version: 8.0.0 + resolution: "@safe-global/safe-apps-sdk@npm:8.0.0" dependencies: "@safe-global/safe-gateway-typescript-sdk": ^3.5.3 - ethers: ^5.7.2 - checksum: 439cea5e486e85619c78c876bdbb81544d54c47af24e9633b7e0bd49cb0b25d260f02de573e734cd5bf767c8188bc60729880e30c86785c7e7dd22f0dbd5d0dd + viem: ^1.0.0 + checksum: 07295c44afa4d85fbc9419b4baac56b4fb493816d4438d6956842261e0689fdcea639ab86b39ee693c456fddace17b6c556c77a637892634a57de96f6b00b0c3 languageName: node linkType: hard -"@safe-global/safe-apps-sdk@npm:^7.9.0": - version: 7.11.0 - resolution: "@safe-global/safe-apps-sdk@npm:7.11.0" +"@safe-global/safe-apps-sdk@npm:^8.0.0": + version: 8.1.0 + resolution: "@safe-global/safe-apps-sdk@npm:8.1.0" dependencies: "@safe-global/safe-gateway-typescript-sdk": ^3.5.3 - ethers: ^5.7.2 - checksum: 8ada9c238fa485a12f0ecac14aa0c0497635f118c03537980e4ab32da7e8bfd7f01e25cfa1aaac28842e9e27d0d12598aaca943e342d94db305d2b6b9a65df9e + viem: ^1.0.0 + checksum: e9d31ed6d9cd2cd9ed71ef5a0e1f6ecfca9f0c62acb9b86a0ddb1b65a609090f2297c4304591ac0518b266a1bcc88d1dad31b0d05e50c7732accccb65adab754 languageName: node linkType: hard @@ -6341,38 +6330,6 @@ __metadata: languageName: node linkType: hard -"@typechain/ethers-v5@npm:^10.2.0": - version: 10.2.1 - resolution: "@typechain/ethers-v5@npm:10.2.1" - dependencies: - lodash: ^4.17.15 - ts-essentials: ^7.0.1 - peerDependencies: - "@ethersproject/abi": ^5.0.0 - "@ethersproject/providers": ^5.0.0 - ethers: ^5.1.3 - typechain: ^8.1.1 - typescript: ">=4.3.0" - checksum: 852da4b1ff368ef87251111a5d50077de3d0fc12c519529269a74223740f8bda89297e67a5eb6c1f5b04ee23119566d6cbccf58264d32a83132be0f328a58d22 - languageName: node - linkType: hard - -"@typechain/hardhat@npm:^6.1.5": - version: 6.1.6 - resolution: "@typechain/hardhat@npm:6.1.6" - dependencies: - fs-extra: ^9.1.0 - peerDependencies: - "@ethersproject/abi": ^5.4.7 - "@ethersproject/providers": ^5.4.7 - "@typechain/ethers-v5": ^10.2.1 - ethers: ^5.4.7 - hardhat: ^2.9.9 - typechain: ^8.1.1 - checksum: f214bebf7860956230478cb92696ba757829cfd9dc65ac99c3bc7e539378310318d92b009054186f446595c8ffc1a81e9c6d028da0eb04253253049ea1b6e8d3 - languageName: node - linkType: hard - "@types/argparse@npm:1.0.38": version: 1.0.38 resolution: "@types/argparse@npm:1.0.38" @@ -6796,6 +6753,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:18.15.13": + version: 18.15.13 + resolution: "@types/node@npm:18.15.13" + checksum: 79cc5a2b5f98e8973061a4260a781425efd39161a0e117a69cd089603964816c1a14025e1387b4590c8e82d05133b7b4154fa53a7dffb3877890a66145e76515 + languageName: node + linkType: hard + "@types/node@npm:18.7.23": version: 18.7.23 resolution: "@types/node@npm:18.7.23" @@ -6847,13 +6811,6 @@ __metadata: languageName: node linkType: hard -"@types/prettier@npm:^2.1.1": - version: 2.7.3 - resolution: "@types/prettier@npm:2.7.3" - checksum: 705384209cea6d1433ff6c187c80dcc0b95d99d5c5ce21a46a9a58060c527973506822e428789d842761e0280d25e3359300f017fbe77b9755bc772ab3dc2f83 - languageName: node - linkType: hard - "@types/prettier@npm:^2.1.5": version: 2.7.2 resolution: "@types/prettier@npm:2.7.2" @@ -7401,71 +7358,85 @@ __metadata: languageName: node linkType: hard -"@wagmi/connectors@npm:2.0.0": - version: 2.0.0 - resolution: "@wagmi/connectors@npm:2.0.0" +"@wagmi/chains@npm:1.7.0": + version: 1.7.0 + resolution: "@wagmi/chains@npm:1.7.0" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 24e930d2432def5d7cbba1d390622d2cb02f002c45d3806e5a95a814af058eb483a234cc1ad5eef650bc926641b6f31e795fb3941b25de585b58dd31407a4980 + languageName: node + linkType: hard + +"@wagmi/connectors@npm:2.7.0": + version: 2.7.0 + resolution: "@wagmi/connectors@npm:2.7.0" dependencies: "@coinbase/wallet-sdk": ^3.6.6 - "@ledgerhq/connect-kit-loader": ^1.0.1 - "@safe-global/safe-apps-provider": ^0.15.2 - "@safe-global/safe-apps-sdk": ^7.9.0 - "@walletconnect/ethereum-provider": 2.7.4 + "@ledgerhq/connect-kit-loader": ^1.1.0 + "@safe-global/safe-apps-provider": ^0.17.1 + "@safe-global/safe-apps-sdk": ^8.0.0 + "@walletconnect/ethereum-provider": 2.9.2 "@walletconnect/legacy-provider": ^2.0.0 - "@web3modal/standalone": ^2.4.1 - abitype: 0.8.1 + "@walletconnect/modal": 2.6.1 + "@walletconnect/utils": 2.9.2 + abitype: 0.8.7 eventemitter3: ^4.0.7 peerDependencies: - "@wagmi/chains": ">=0.3.0" - typescript: ">=4.9.4" - viem: ~0.3.35 + "@wagmi/chains": ">=1.7.0" + typescript: ">=5.0.4" + viem: ">=0.3.35" peerDependenciesMeta: "@wagmi/chains": optional: true typescript: optional: true - checksum: 3f7bb27cba2cef8660aef600c832688bbb4c083bf1666d9a6bbcf7b4b6aa1ca073f59125b6013aacbba8c4334f9ab6cea75288a99431baeeeb041935eb17940c + checksum: be422a00ada744042b5945d725eef60cfa37f79a8cfe81e4a77c8ecf77acddd20a0970c8dabad737d86244e9e3fc5275f99df057d636ab1e1b5443cce6bf1ced languageName: node linkType: hard -"@wagmi/core@npm:1.0.7": - version: 1.0.7 - resolution: "@wagmi/core@npm:1.0.7" +"@wagmi/core@npm:1.3.9, @wagmi/core@npm:~1.3.8": + version: 1.3.9 + resolution: "@wagmi/core@npm:1.3.9" dependencies: - "@wagmi/chains": 0.3.1 - "@wagmi/connectors": 2.0.0 - abitype: 0.8.1 + "@wagmi/chains": 1.7.0 + "@wagmi/connectors": 2.7.0 + abitype: 0.8.7 eventemitter3: ^4.0.7 zustand: ^4.3.1 peerDependencies: - typescript: ">=4.9.4" - viem: ~0.3.35 + typescript: ">=5.0.4" + viem: ">=0.3.35" peerDependenciesMeta: typescript: optional: true - checksum: 344c147c8c2bd068332569d28ee126c6fbdb972092759e32211d4796cad98ffaee2b43ee46d7ba0205fb7bc970eb3f94615a2430e0e2c735e79ade41a987610f + checksum: 80cb7c3a064174ba275af91b691c8fc1861ec0fcee063b9ce21f2d3ca84e742c57aabab2850dc3af274286e2df07523339bb2c5bdece21664aa722bc9468e71d languageName: node linkType: hard -"@walletconnect/core@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/core@npm:2.7.4" +"@walletconnect/core@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/core@npm:2.9.2" dependencies: "@walletconnect/heartbeat": 1.2.1 - "@walletconnect/jsonrpc-provider": ^1.0.12 - "@walletconnect/jsonrpc-utils": ^1.0.7 - "@walletconnect/jsonrpc-ws-connection": ^1.0.11 + "@walletconnect/jsonrpc-provider": 1.0.13 + "@walletconnect/jsonrpc-types": 1.0.3 + "@walletconnect/jsonrpc-utils": 1.0.8 + "@walletconnect/jsonrpc-ws-connection": 1.0.13 "@walletconnect/keyvaluestorage": ^1.0.2 "@walletconnect/logger": ^2.0.1 "@walletconnect/relay-api": ^1.0.9 "@walletconnect/relay-auth": ^1.0.4 "@walletconnect/safe-json": ^1.0.2 "@walletconnect/time": ^1.0.2 - "@walletconnect/types": 2.7.4 - "@walletconnect/utils": 2.7.4 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 events: ^3.3.0 lodash.isequal: 4.5.0 uint8arrays: ^3.1.0 - checksum: 84715f85fcbdd3a2d117f22720f900a57804bb4e0875191f98a5f81ba4859587849a3cc08c82ce009050c5da2a8813b7898744fc32f72d57ba8a792d3fcf4d6e + checksum: f96fe5147ddae5ab08c72e946ebfc40b218ca2a985e243ebcbf2346c79286b33de9c1f6dfb0f9cb81ae52f29725b3437a8af8b856ed55ed3a089e06546b3db06 languageName: node linkType: hard @@ -7503,25 +7474,25 @@ __metadata: languageName: node linkType: hard -"@walletconnect/ethereum-provider@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/ethereum-provider@npm:2.7.4" +"@walletconnect/ethereum-provider@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/ethereum-provider@npm:2.9.2" dependencies: - "@walletconnect/jsonrpc-http-connection": ^1.0.4 - "@walletconnect/jsonrpc-provider": ^1.0.11 - "@walletconnect/jsonrpc-types": ^1.0.2 - "@walletconnect/jsonrpc-utils": ^1.0.7 - "@walletconnect/sign-client": 2.7.4 - "@walletconnect/types": 2.7.4 - "@walletconnect/universal-provider": 2.7.4 - "@walletconnect/utils": 2.7.4 + "@walletconnect/jsonrpc-http-connection": ^1.0.7 + "@walletconnect/jsonrpc-provider": ^1.0.13 + "@walletconnect/jsonrpc-types": ^1.0.3 + "@walletconnect/jsonrpc-utils": ^1.0.8 + "@walletconnect/sign-client": 2.9.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/universal-provider": 2.9.2 + "@walletconnect/utils": 2.9.2 events: ^3.3.0 peerDependencies: - "@web3modal/standalone": ">=2" + "@walletconnect/modal": ">=2" peerDependenciesMeta: - "@web3modal/standalone": + "@walletconnect/modal": optional: true - checksum: 89e7454ff7a47ac4b2eff826f25662641aa2f96d30d71bb2c6421304739691f3c30ad9b9c6b50db1f53d8d781e2099cf1f941bd08947a124e105cf536bb6168c + checksum: 80cb896c5da6247b68a28ef08e5a8a32beb3e6a2b70a3543aaced09a618e73b5437af36f9884003333021566405e19938726f1f02241aa69f83f5a0df5a4150a languageName: node linkType: hard @@ -7546,7 +7517,7 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-http-connection@npm:^1.0.4": +"@walletconnect/jsonrpc-http-connection@npm:^1.0.4, @walletconnect/jsonrpc-http-connection@npm:^1.0.7": version: 1.0.7 resolution: "@walletconnect/jsonrpc-http-connection@npm:1.0.7" dependencies: @@ -7558,7 +7529,7 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-provider@npm:^1.0.11, @walletconnect/jsonrpc-provider@npm:^1.0.12, @walletconnect/jsonrpc-provider@npm:^1.0.6": +"@walletconnect/jsonrpc-provider@npm:1.0.13, @walletconnect/jsonrpc-provider@npm:^1.0.13, @walletconnect/jsonrpc-provider@npm:^1.0.6": version: 1.0.13 resolution: "@walletconnect/jsonrpc-provider@npm:1.0.13" dependencies: @@ -7569,7 +7540,7 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-types@npm:^1.0.2, @walletconnect/jsonrpc-types@npm:^1.0.3": +"@walletconnect/jsonrpc-types@npm:1.0.3, @walletconnect/jsonrpc-types@npm:^1.0.2, @walletconnect/jsonrpc-types@npm:^1.0.3": version: 1.0.3 resolution: "@walletconnect/jsonrpc-types@npm:1.0.3" dependencies: @@ -7579,7 +7550,7 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-utils@npm:^1.0.4, @walletconnect/jsonrpc-utils@npm:^1.0.6, @walletconnect/jsonrpc-utils@npm:^1.0.7, @walletconnect/jsonrpc-utils@npm:^1.0.8": +"@walletconnect/jsonrpc-utils@npm:1.0.8, @walletconnect/jsonrpc-utils@npm:^1.0.4, @walletconnect/jsonrpc-utils@npm:^1.0.6, @walletconnect/jsonrpc-utils@npm:^1.0.7, @walletconnect/jsonrpc-utils@npm:^1.0.8": version: 1.0.8 resolution: "@walletconnect/jsonrpc-utils@npm:1.0.8" dependencies: @@ -7590,16 +7561,16 @@ __metadata: languageName: node linkType: hard -"@walletconnect/jsonrpc-ws-connection@npm:^1.0.11": - version: 1.0.11 - resolution: "@walletconnect/jsonrpc-ws-connection@npm:1.0.11" +"@walletconnect/jsonrpc-ws-connection@npm:1.0.13": + version: 1.0.13 + resolution: "@walletconnect/jsonrpc-ws-connection@npm:1.0.13" dependencies: "@walletconnect/jsonrpc-utils": ^1.0.6 "@walletconnect/safe-json": ^1.0.2 events: ^3.3.0 tslib: 1.14.1 ws: ^7.5.1 - checksum: 69fcc5ecb6eafd697fb88e22e6b7a2fd24d06129860feb6bcb5f702062233ebf5aef8b86a8502c67158f48370b98d0f5dffd930a0e5f6944752eb6a3c37a40cb + checksum: f2253b17564f7622e69b1252830f05efdf7f4d58b120adb3a3e950c2087845171c912307c39948d0b869aa8610688b83f54f54de4657091f7431aea95a59f8b9 languageName: node linkType: hard @@ -7701,6 +7672,37 @@ __metadata: languageName: node linkType: hard +"@walletconnect/modal-core@npm:2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal-core@npm:2.6.1" + dependencies: + valtio: 1.11.0 + checksum: 3c1dcb865cc0737bb0e77b7103bde7167e64a8790c628427814b825dafa133c7cb3baf5184314de35a2dbd743a3b0978ef4abc86c3bb63d051f8368e3bdba67a + languageName: node + linkType: hard + +"@walletconnect/modal-ui@npm:2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal-ui@npm:2.6.1" + dependencies: + "@walletconnect/modal-core": 2.6.1 + lit: 2.7.6 + motion: 10.16.2 + qrcode: 1.5.3 + checksum: 34408c784659564ef57fe59227f5f0a307ec34dc9e73c6c7b72e4c03054024ffbbf1d4ed73425a2606c978aaa3518629eba61adf3fc31263d80a4c13cf1c77d2 + languageName: node + linkType: hard + +"@walletconnect/modal@npm:2.6.1": + version: 2.6.1 + resolution: "@walletconnect/modal@npm:2.6.1" + dependencies: + "@walletconnect/modal-core": 2.6.1 + "@walletconnect/modal-ui": 2.6.1 + checksum: f48107abe4594b3a6849a4eae1a3fb9fb37ded25ef390c084e9098ceed58ace1bcb723abfa15027b462d75226a907bbbfc1d48e1414f882b5d7f83903da617bb + languageName: node + linkType: hard + "@walletconnect/randombytes@npm:^1.0.3": version: 1.0.3 resolution: "@walletconnect/randombytes@npm:1.0.3" @@ -7746,20 +7748,20 @@ __metadata: languageName: node linkType: hard -"@walletconnect/sign-client@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/sign-client@npm:2.7.4" +"@walletconnect/sign-client@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/sign-client@npm:2.9.2" dependencies: - "@walletconnect/core": 2.7.4 + "@walletconnect/core": 2.9.2 "@walletconnect/events": ^1.0.1 "@walletconnect/heartbeat": 1.2.1 - "@walletconnect/jsonrpc-utils": ^1.0.7 + "@walletconnect/jsonrpc-utils": 1.0.8 "@walletconnect/logger": ^2.0.1 "@walletconnect/time": ^1.0.2 - "@walletconnect/types": 2.7.4 - "@walletconnect/utils": 2.7.4 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 events: ^3.3.0 - checksum: 370bf68abad3d3d45343cff3c3ad7a319c914d618d772aefc107268c034f06d98719332ca62f512083f753559d6786d80898e8c4e7deda6dd8cc93a3307599e6 + checksum: b91b271130ab6404c89a94e31bcf9b987c23bc4c5f86a75344b7f4ea1cd887996ae7876038ae35b430175af17529c4caf9bc332abe6e986d878439c7a3dba31a languageName: node linkType: hard @@ -7772,58 +7774,56 @@ __metadata: languageName: node linkType: hard -"@walletconnect/types@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/types@npm:2.7.4" +"@walletconnect/types@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/types@npm:2.9.2" dependencies: "@walletconnect/events": ^1.0.1 "@walletconnect/heartbeat": 1.2.1 - "@walletconnect/jsonrpc-types": ^1.0.2 + "@walletconnect/jsonrpc-types": 1.0.3 "@walletconnect/keyvaluestorage": ^1.0.2 "@walletconnect/logger": ^2.0.1 events: ^3.3.0 - checksum: 40d4d1ed3791216fe29f9210c35275fa6d44ec3d49000db1afdbe1e44a9add629c103af8354b856f5d2874dd20f39993d17cde5a3a939d0066a589c905e4568e + checksum: 81d523cf337f456190b87242ae7843e09f0b1d84127c1138d73420a5cc8e7b05f7f1722dfeaa2ecd12be25331e3896c733e0327221bc51eb6bae192e43b4a99f languageName: node linkType: hard -"@walletconnect/universal-provider@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/universal-provider@npm:2.7.4" +"@walletconnect/universal-provider@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/universal-provider@npm:2.9.2" dependencies: - "@walletconnect/jsonrpc-http-connection": ^1.0.4 - "@walletconnect/jsonrpc-provider": ^1.0.11 + "@walletconnect/jsonrpc-http-connection": ^1.0.7 + "@walletconnect/jsonrpc-provider": 1.0.13 "@walletconnect/jsonrpc-types": ^1.0.2 "@walletconnect/jsonrpc-utils": ^1.0.7 "@walletconnect/logger": ^2.0.1 - "@walletconnect/sign-client": 2.7.4 - "@walletconnect/types": 2.7.4 - "@walletconnect/utils": 2.7.4 - eip1193-provider: 1.0.1 + "@walletconnect/sign-client": 2.9.2 + "@walletconnect/types": 2.9.2 + "@walletconnect/utils": 2.9.2 events: ^3.3.0 - checksum: 5f6ae4436ccbe6283437fab4a451431477ac72f9dc5de0d0ab0491480106f5083f247deb53a091bb935386850274584842a6c315ae6db0f3b3b098b1ac40b42d + checksum: 4f1003d63e5358fb45b15c1156911cda8287c98d606084c6168bda5fa9b9a376a3d08afc777823b9dfb71dad18c3f90896be0c0c7d5fc56c6061086b91177bc7 languageName: node linkType: hard -"@walletconnect/utils@npm:2.7.4": - version: 2.7.4 - resolution: "@walletconnect/utils@npm:2.7.4" +"@walletconnect/utils@npm:2.9.2": + version: 2.9.2 + resolution: "@walletconnect/utils@npm:2.9.2" dependencies: "@stablelib/chacha20poly1305": 1.0.1 "@stablelib/hkdf": 1.0.1 "@stablelib/random": ^1.0.2 "@stablelib/sha256": 1.0.1 "@stablelib/x25519": ^1.0.3 - "@walletconnect/jsonrpc-utils": ^1.0.7 "@walletconnect/relay-api": ^1.0.9 "@walletconnect/safe-json": ^1.0.2 "@walletconnect/time": ^1.0.2 - "@walletconnect/types": 2.7.4 + "@walletconnect/types": 2.9.2 "@walletconnect/window-getters": ^1.0.1 "@walletconnect/window-metadata": ^1.0.1 detect-browser: 5.3.0 query-string: 7.1.3 uint8arrays: ^3.1.0 - checksum: ab2db03eaa77d2f5511734e973b5b0d802e96bb27c9ebde292294111bd4a880cb4d37b9e633296861f4d2e332741a858b777b4c08a4fa01983898fb0122565ca + checksum: 9caf05fa6f7c95945e675845e305220fc1e7832ae595a9ff39799195d2d5865972914f74a8768044473f45450e98db685a0ff965a09d9cd0220cfdc391279eab languageName: node linkType: hard @@ -7846,38 +7846,6 @@ __metadata: languageName: node linkType: hard -"@web3modal/core@npm:2.4.1": - version: 2.4.1 - resolution: "@web3modal/core@npm:2.4.1" - dependencies: - buffer: 6.0.3 - valtio: 1.10.5 - checksum: b8496bb488271fd5081d7f4b1279c469470aca05aea58090610e20b44e47088b18f843fac582ab55cfeb7440e0d9904e0bb73c1e2dbaea8582f391b2d379cb0d - languageName: node - linkType: hard - -"@web3modal/standalone@npm:^2.4.1": - version: 2.4.1 - resolution: "@web3modal/standalone@npm:2.4.1" - dependencies: - "@web3modal/core": 2.4.1 - "@web3modal/ui": 2.4.1 - checksum: 0a26a7cc4b00dac6496a342ed8ab6f3b0c2946b8e5a3766c08fa824876ef399696fc474fabd4a7665ce4a3795dee00dfa2679f6d8e6d8b187618786ee12a025c - languageName: node - linkType: hard - -"@web3modal/ui@npm:2.4.1": - version: 2.4.1 - resolution: "@web3modal/ui@npm:2.4.1" - dependencies: - "@web3modal/core": 2.4.1 - lit: 2.7.4 - motion: 10.15.5 - qrcode: 1.5.3 - checksum: 80f21d6c791b00f2beeb6b2ff69a0faf6857872306c23c1913f08f3ca8d4d60c9255b7684294405459cc089ff2a8f68e10d189868628efd517d83a3fa430bca5 - languageName: node - linkType: hard - "@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": version: 1.11.6 resolution: "@webassemblyjs/ast@npm:1.11.6" @@ -8069,29 +8037,44 @@ __metadata: languageName: node linkType: hard -"abitype@npm:0.8.1": - version: 0.8.1 - resolution: "abitype@npm:0.8.1" +"abitype@npm:0.8.2": + version: 0.8.2 + resolution: "abitype@npm:0.8.2" peerDependencies: - typescript: ">=4.9.4" + typescript: ">=5.0.4" zod: ^3 >=3.19.1 peerDependenciesMeta: zod: optional: true - checksum: 20a84b21fe5496588cfd8eedd877eecfe1a78b21a552827ea162998b6c0528c284b205e979e8ea48b36a6d8951dbffe995dfa2dd79cca8cc99b1f567fc12751c + checksum: ec9ade7e2b54f6d22b5dc1688b7fa71958361f595b94bbde0a3fa5e53742400e587bb99ba6df7d041ebc229c766df4263d9a15fe523941112fe111b07848a05d languageName: node linkType: hard -"abitype@npm:0.8.2": - version: 0.8.2 - resolution: "abitype@npm:0.8.2" +"abitype@npm:0.8.7": + version: 0.8.7 + resolution: "abitype@npm:0.8.7" peerDependencies: typescript: ">=5.0.4" zod: ^3 >=3.19.1 peerDependenciesMeta: zod: optional: true - checksum: ec9ade7e2b54f6d22b5dc1688b7fa71958361f595b94bbde0a3fa5e53742400e587bb99ba6df7d041ebc229c766df4263d9a15fe523941112fe111b07848a05d + checksum: 4351466808969bcc73e5c535c3d96bb687ee2be0bccd48eba024c47e6cc248f0c8bd368f9e42dab35d39923e63b1349ade470f72812de27127968caf1a1426c9 + languageName: node + linkType: hard + +"abitype@npm:0.9.3": + version: 0.9.3 + resolution: "abitype@npm:0.9.3" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3 >=3.19.1 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: f97c5a118180563b9ed8b97da492a82d3ce53dcd7d96c87764e90dbe84c04ae72dd5703d1ed5a54601033ab1772b8a235a1b5aadaf7aad6c4b5fdad7fd3a69a7 languageName: node linkType: hard @@ -8227,6 +8210,13 @@ __metadata: languageName: node linkType: hard +"aes-js@npm:4.0.0-beta.5": + version: 4.0.0-beta.5 + resolution: "aes-js@npm:4.0.0-beta.5" + checksum: cc2ea969d77df939c32057f7e361b6530aa6cb93cb10617a17a45cd164e6d761002f031ff6330af3e67e58b1f0a3a8fd0b63a720afd591a653b02f649470e15b + languageName: node + linkType: hard + "aes-js@npm:^3.1.2": version: 3.1.2 resolution: "aes-js@npm:3.1.2" @@ -8843,15 +8833,6 @@ __metadata: languageName: node linkType: hard -"axios@npm:^0.21.0": - version: 0.21.4 - resolution: "axios@npm:0.21.4" - dependencies: - follow-redirects: ^1.14.0 - checksum: 44245f24ac971e7458f3120c92f9d66d1fc695e8b97019139de5b0cc65d9b8104647db01e5f46917728edfc0cfd88eb30fc4c55e6053eef4ace76768ce95ff3c - languageName: node - linkType: hard - "axios@npm:^0.22.0": version: 0.22.0 resolution: "axios@npm:0.22.0" @@ -10247,7 +10228,7 @@ __metadata: languageName: node linkType: hard -"command-line-args@npm:5.2.1, command-line-args@npm:^5.1.1": +"command-line-args@npm:5.2.1": version: 5.2.1 resolution: "command-line-args@npm:5.2.1" dependencies: @@ -10259,7 +10240,7 @@ __metadata: languageName: node linkType: hard -"command-line-usage@npm:6.1.3, command-line-usage@npm:^6.1.0": +"command-line-usage@npm:6.1.3": version: 6.1.3 resolution: "command-line-usage@npm:6.1.3" dependencies: @@ -10953,6 +10934,20 @@ __metadata: languageName: node linkType: hard +"csv-parse@npm:^5.4.0": + version: 5.4.0 + resolution: "csv-parse@npm:5.4.0" + checksum: e9c2f23953f628849c476adeb9f500e9c03fcfe98fea7b732366e3c2ed0b07a5e67f32ca12a0132db6eb71601c080b4935b5921296db3625a597e24caa16f633 + languageName: node + linkType: hard + +"csv-stringify@npm:^6.4.0": + version: 6.4.0 + resolution: "csv-stringify@npm:6.4.0" + checksum: 4d68c34a8f9ec52ec7b2da8a67c2c4b658431f4ba8f816a5e9b4664dc09ec37e5cf65a41dae13500488d38bd8b416b1dc179aad8275ba54e7b1735e21bbf2830 + languageName: node + linkType: hard + "d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.2.0": version: 3.2.3 resolution: "d3-array@npm:3.2.3" @@ -11335,7 +11330,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:4.x, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:4.x, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -12023,15 +12018,6 @@ __metadata: languageName: node linkType: hard -"eip1193-provider@npm:1.0.1": - version: 1.0.1 - resolution: "eip1193-provider@npm:1.0.1" - dependencies: - "@json-rpc-tools/provider": ^1.5.5 - checksum: a56d6a874786b788c1f09f96d329b118ca6b3d381055865bb1ec1bde17da8d433a4141200baa2922108d67ac0d83813841940d2813814e56ea923fc9fafb369a - languageName: node - linkType: hard - "ejs@npm:^3.1.5, ejs@npm:^3.1.6": version: 3.1.9 resolution: "ejs@npm:3.1.9" @@ -13092,6 +13078,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.7.1": + version: 6.7.1 + resolution: "ethers@npm:6.7.1" + dependencies: + "@adraffy/ens-normalize": 1.9.2 + "@noble/hashes": 1.1.2 + "@noble/secp256k1": 1.7.1 + "@types/node": 18.15.13 + aes-js: 4.0.0-beta.5 + tslib: 2.4.0 + ws: 8.5.0 + checksum: 07833692e3f53b18e28c4cba9f53f3d5ebff8360de02ad57b2584c00c52b88f5b790373f9b9f6b4f6b52ffa2074530a6101192b30c3260f7cdeff929d34bb88b + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -13655,7 +13656,7 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.0, follow-redirects@npm:^1.14.4, follow-redirects@npm:^1.15.0": +"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.12.1, follow-redirects@npm:^1.14.4, follow-redirects@npm:^1.15.0": version: 1.15.2 resolution: "follow-redirects@npm:1.15.2" peerDependenciesMeta: @@ -13831,7 +13832,7 @@ __metadata: "@emotion/react": ^11.7.1 "@emotion/styled": ^11.6.0 "@endo/static-module-record": ^0.7.16 - "@ethereum-attestation-service/eas-sdk": ^0.29.1 + "@ethereum-attestation-service/eas-sdk": ^1.1.0-beta.3 "@ethersproject/providers": ^5.5.3 "@fortawesome/fontawesome-svg-core": ^6.1.1 "@fortawesome/free-brands-svg-icons": ^6.1.1 @@ -13856,6 +13857,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.18.0 "@typescript-eslint/parser": ^5.18.0 "@ukstv/jazzicon-react": ^1.0.0 + "@wagmi/core": ~1.3.8 api-types: 0.1.0 assert: ^2.0.0 autoprefixer: ^10.4.7 @@ -13863,6 +13865,8 @@ __metadata: chart.js: ^4.2.0 chartjs-chart-treemap: ^2.3.0 craco-alias: ^3.0.1 + csv-parse: ^5.4.0 + csv-stringify: ^6.4.0 date-fns: ^2.25.0 date-fns-tz: ^1.3.3 discord-markdown: ^2.5.1 @@ -13902,7 +13906,7 @@ __metadata: use-error-boundary: ^2.0.6 util: ^0.12.4 viem: ^0.3.33 - wagmi: ^1.0.5 + wagmi: ~1.3.9 wasm-check: ^2.1.2 languageName: unknown linkType: soft @@ -13942,7 +13946,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^7.0.0, fs-extra@npm:^7.0.1": +"fs-extra@npm:^7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" dependencies: @@ -13953,7 +13957,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1, fs-extra@npm:^9.1.0": +"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" dependencies: @@ -14231,20 +14235,6 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.1.7": - version: 7.1.7 - resolution: "glob@npm:7.1.7" - dependencies: - fs.realpath: ^1.0.0 - inflight: ^1.0.4 - inherits: 2 - minimatch: ^3.0.4 - once: ^1.3.0 - path-is-absolute: ^1.0.0 - checksum: b61f48973bbdcf5159997b0874a2165db572b368b931135832599875919c237fc05c12984e38fe828e69aa8a921eb0e8a4997266211c517c9cfaae8a93988bb8 - languageName: node - linkType: hard - "glob@npm:7.2.0": version: 7.2.0 resolution: "glob@npm:7.2.0" @@ -14506,22 +14496,22 @@ __metadata: languageName: node linkType: hard -"hardhat@npm:2.13.1": - version: 2.13.1 - resolution: "hardhat@npm:2.13.1" +"hardhat@npm:2.17.0": + version: 2.17.0 + resolution: "hardhat@npm:2.17.0" dependencies: "@ethersproject/abi": ^5.1.2 "@metamask/eth-sig-util": ^4.0.0 - "@nomicfoundation/ethereumjs-block": 5.0.0 - "@nomicfoundation/ethereumjs-blockchain": 7.0.0 - "@nomicfoundation/ethereumjs-common": 4.0.0 - "@nomicfoundation/ethereumjs-evm": 2.0.0 - "@nomicfoundation/ethereumjs-rlp": 5.0.0 - "@nomicfoundation/ethereumjs-statemanager": 2.0.0 - "@nomicfoundation/ethereumjs-trie": 6.0.0 - "@nomicfoundation/ethereumjs-tx": 5.0.0 - "@nomicfoundation/ethereumjs-util": 9.0.0 - "@nomicfoundation/ethereumjs-vm": 7.0.0 + "@nomicfoundation/ethereumjs-block": 5.0.1 + "@nomicfoundation/ethereumjs-blockchain": 7.0.1 + "@nomicfoundation/ethereumjs-common": 4.0.1 + "@nomicfoundation/ethereumjs-evm": 2.0.1 + "@nomicfoundation/ethereumjs-rlp": 5.0.1 + "@nomicfoundation/ethereumjs-statemanager": 2.0.1 + "@nomicfoundation/ethereumjs-trie": 6.0.1 + "@nomicfoundation/ethereumjs-tx": 5.0.1 + "@nomicfoundation/ethereumjs-util": 9.0.1 + "@nomicfoundation/ethereumjs-vm": 7.0.1 "@nomicfoundation/solidity-analyzer": ^0.1.0 "@sentry/node": ^5.18.1 "@types/bn.js": ^5.1.0 @@ -14549,7 +14539,6 @@ __metadata: mnemonist: ^0.38.0 mocha: ^10.0.0 p-map: ^4.0.0 - qs: ^6.7.0 raw-body: ^2.4.1 resolve: 1.17.0 semver: ^6.3.0 @@ -14570,7 +14559,7 @@ __metadata: optional: true bin: hardhat: internal/cli/bootstrap.js - checksum: 7e2103a878fd2f397a14a0ad9489f26deedf9beb0e777640f4912605450c527c434834ff99c52a51030ea18c1ba7c9b0efa86a212ee5adb3733c5642b61fcd65 + checksum: fcbbee245069a9c3fd0b7f015bc7b99529d3b2be6b8c0c9a61d6a68e5eb2bece8d4f7a9a206808af8fa46a3f3f05df51571caa4e88d3ebbc977c0f16fdb0aafe languageName: node linkType: hard @@ -17446,14 +17435,14 @@ __metadata: languageName: node linkType: hard -"lit@npm:2.7.4": - version: 2.7.4 - resolution: "lit@npm:2.7.4" +"lit@npm:2.7.6": + version: 2.7.6 + resolution: "lit@npm:2.7.6" dependencies: "@lit/reactive-element": ^1.6.0 lit-element: ^3.3.0 lit-html: ^2.7.0 - checksum: 7494f4e814fca0ebf7a73923c85454531aac26ff83f0d4d5afe62ebbc6225363c9df41f88147d79d5d3ab518925ceb9b27a557bee610bbb414ae0339c513f5a3 + checksum: 984a7fb9c0fa387f20177a07de22ea1c9cdc01a7dc7cb1c400d1df5b43a8956908460482a3259ea173555c6f0f13457d2ddc5c84d4c365007afd86e7ca58b384 languageName: node linkType: hard @@ -18327,17 +18316,17 @@ __metadata: languageName: node linkType: hard -"motion@npm:10.15.5": - version: 10.15.5 - resolution: "motion@npm:10.15.5" +"motion@npm:10.16.2": + version: 10.16.2 + resolution: "motion@npm:10.16.2" dependencies: "@motionone/animation": ^10.15.1 - "@motionone/dom": ^10.15.5 - "@motionone/svelte": ^10.15.5 + "@motionone/dom": ^10.16.2 + "@motionone/svelte": ^10.16.2 "@motionone/types": ^10.15.1 "@motionone/utils": ^10.15.1 - "@motionone/vue": ^10.15.5 - checksum: 43e7883d95da6e4949b2e5ca01732bce28214f4978bf940511a3fbd8e00943ab7c00fcb28f3f1ce1ed099a404016f784243330be161c4805958deaf60d1b0571 + "@motionone/vue": ^10.16.2 + checksum: 0b91256808c2374d8b7f4ac5e7ed513f2ca8df2b7d1be4fbc00ec5baece5162ada648aedaa5bc1d60be9ad2e6c9bc1d3bb160333051c20ab79e241b8e02e3c92 languageName: node linkType: hard @@ -20487,7 +20476,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.3.1, prettier@npm:^2.3.2, prettier@npm:^2.5.1": +"prettier@npm:^2.3.2, prettier@npm:^2.5.1": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -20728,7 +20717,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.10.3, qs@npm:^6.11.0, qs@npm:^6.7.0": +"qs@npm:^6.10.3, qs@npm:^6.11.0": version: 6.11.2 resolution: "qs@npm:6.11.2" dependencies: @@ -22778,13 +22767,6 @@ __metadata: languageName: node linkType: hard -"string-format@npm:^2.0.0": - version: 2.0.0 - resolution: "string-format@npm:2.0.0" - checksum: dada2ef95f6d36c66562c673d95315f80457fa7dce2f3609a2e75d1190b98c88319028cf0a5b6c043d01c18d581b2641579f79480584ba030d6ac6fceb30bc55 - languageName: node - linkType: hard - "string-length@npm:^4.0.1": version: 4.0.2 resolution: "string-length@npm:4.0.2" @@ -23650,29 +23632,6 @@ __metadata: languageName: node linkType: hard -"ts-command-line-args@npm:^2.2.0": - version: 2.5.1 - resolution: "ts-command-line-args@npm:2.5.1" - dependencies: - chalk: ^4.1.0 - command-line-args: ^5.1.1 - command-line-usage: ^6.1.0 - string-format: ^2.0.0 - bin: - write-markdown: dist/write-markdown.js - checksum: 7c0a7582e94f1d2160e3dd379851ec4f1758bc673ccd71bae07f839f83051b6b83e0ae14325c2d04ea728e5bde7b7eacfd2ab060b8fd4b8ab29e0bbf77f6c51e - languageName: node - linkType: hard - -"ts-essentials@npm:^7.0.1": - version: 7.0.3 - resolution: "ts-essentials@npm:7.0.3" - peerDependencies: - typescript: ">=3.7.0" - checksum: 74d75868acf7f8b95e447d8b3b7442ca21738c6894e576df9917a352423fde5eb43c5651da5f78997da6061458160ae1f6b279150b42f47ccc58b73e55acaa2f - languageName: node - linkType: hard - "ts-interface-checker@npm:^0.1.9": version: 0.1.13 resolution: "ts-interface-checker@npm:0.1.13" @@ -23814,6 +23773,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.4.0": + version: 2.4.0 + resolution: "tslib@npm:2.4.0" + checksum: 8c4aa6a3c5a754bf76aefc38026134180c053b7bd2f81338cb5e5ebf96fefa0f417bff221592bf801077f5bf990562f6264fecbc42cd3309b33872cb6fc3b113 + languageName: node + linkType: hard + "tslib@npm:2.5.2, tslib@npm:^2.0.0, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.5.0": version: 2.5.2 resolution: "tslib@npm:2.5.2" @@ -23953,28 +23919,6 @@ __metadata: languageName: node linkType: hard -"typechain@npm:^8.1.1": - version: 8.3.1 - resolution: "typechain@npm:8.3.1" - dependencies: - "@types/prettier": ^2.1.1 - debug: ^4.3.1 - fs-extra: ^7.0.0 - glob: 7.1.7 - js-sha3: ^0.8.0 - lodash: ^4.17.15 - mkdirp: ^1.0.4 - prettier: ^2.3.1 - ts-command-line-args: ^2.2.0 - ts-essentials: ^7.0.1 - peerDependencies: - typescript: ">=4.3.0" - bin: - typechain: dist/cli/cli.js - checksum: c1e11ab1452d0c83be0c34a8b900b156b0c6654b95f7e7bb18dd98c0decd6009ffa1316e393f4e8def187af1bea3e931a13503815cc37155c0c945b7ae5b5215 - languageName: node - linkType: hard - "typed-array-length@npm:^1.0.4": version: 1.0.4 resolution: "typed-array-length@npm:1.0.4" @@ -24436,9 +24380,9 @@ __metadata: languageName: node linkType: hard -"valtio@npm:1.10.5": - version: 1.10.5 - resolution: "valtio@npm:1.10.5" +"valtio@npm:1.11.0": + version: 1.11.0 + resolution: "valtio@npm:1.11.0" dependencies: proxy-compare: 2.5.1 use-sync-external-store: 1.2.0 @@ -24447,7 +24391,7 @@ __metadata: peerDependenciesMeta: react: optional: true - checksum: a01d7cca44b3ff60213aa40470c42083f7522d8e2c2f2d9f696b0aa3eec4c3dba7393831d5ff47db1ad025904860d2788ce4d9654963ff3555481deb25376851 + checksum: 77e42f5841054ba3e41b456fbb96b679eaeb6d9dbb46b7ce9aee6acf1352de73969858dea837a706c969ca908155d6cb97966e33be10b69b097744dd99b5174a languageName: node linkType: hard @@ -24500,6 +24444,29 @@ __metadata: languageName: node linkType: hard +"viem@npm:^1.0.0": + version: 1.6.7 + resolution: "viem@npm:1.6.7" + dependencies: + "@adraffy/ens-normalize": 1.9.0 + "@noble/curves": 1.1.0 + "@noble/hashes": 1.3.0 + "@scure/bip32": 1.3.0 + "@scure/bip39": 1.2.0 + "@types/ws": ^8.5.4 + "@wagmi/chains": 1.7.0 + abitype: 0.9.3 + isomorphic-ws: 5.0.0 + ws: 8.12.0 + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: d923f46c2e0e66ef542162d68a5faed5719c12fd30de22c4a4701cbd81093346166ff18b5d4fe6dabef08e20393c3f507f9fbc18af5798f4125888b21bbfc6e4 + languageName: node + linkType: hard + "w3c-hr-time@npm:^1.0.2": version: 1.0.2 resolution: "w3c-hr-time@npm:1.0.2" @@ -24518,24 +24485,24 @@ __metadata: languageName: node linkType: hard -"wagmi@npm:^1.0.5": - version: 1.0.7 - resolution: "wagmi@npm:1.0.7" +"wagmi@npm:~1.3.9": + version: 1.3.10 + resolution: "wagmi@npm:1.3.10" dependencies: "@tanstack/query-sync-storage-persister": ^4.27.1 "@tanstack/react-query": ^4.28.0 "@tanstack/react-query-persist-client": ^4.28.0 - "@wagmi/core": 1.0.7 - abitype: 0.8.1 + "@wagmi/core": 1.3.9 + abitype: 0.8.7 use-sync-external-store: ^1.2.0 peerDependencies: react: ">=17.0.0" - typescript: ">=4.9.4" - viem: ~0.3.35 + typescript: ">=5.0.4" + viem: ">=0.3.35" peerDependenciesMeta: typescript: optional: true - checksum: 4eab4feec3c23fe156708f08ad379cfeefae9fa47afac76a57916f644e6033c93c91fba64531cae7d6db7a18be20be6aae3955d368aa61ec7036fd8e7390d852 + checksum: ed329b9e8e7c1263312b028967980a3e47764586f154fc1040eb03fc48b9e1742b5de9eca962efcad04ea24b3440c846b439f4a35ca0849a56183783564e80f7 languageName: node linkType: hard @@ -25617,6 +25584,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.5.0": + version: 8.5.0 + resolution: "ws@npm:8.5.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 76f2f90e40344bf18fd544194e7067812fb1372b2a37865678d8f12afe4b478ff2ebc0c7c0aff82cd5e6b66fc43d889eec0f1865c2365d8f7a66d92da7744a77 + languageName: node + linkType: hard + "ws@npm:^3.0.0": version: 3.3.3 resolution: "ws@npm:3.3.3" @@ -25628,7 +25610,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.4.0, ws@npm:^7.4.5, ws@npm:^7.4.6, ws@npm:^7.5.1": +"ws@npm:^7.4.5, ws@npm:^7.4.6, ws@npm:^7.5.1": version: 7.5.9 resolution: "ws@npm:7.5.9" peerDependencies: From 6f4fbfb1d7dd0d9ead815bd93d37b62ec760332e Mon Sep 17 00:00:00 2001 From: Kristofer Date: Wed, 23 Aug 2023 22:19:12 +0200 Subject: [PATCH 51/63] yarn.lock --- yarn.lock | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 665a73dee..2b4ee9a2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7397,7 +7397,7 @@ __metadata: languageName: node linkType: hard -"@wagmi/core@npm:1.3.9, @wagmi/core@npm:~1.3.8": +"@wagmi/core@npm:1.3.9, @wagmi/core@npm:~1.3.9": version: 1.3.9 resolution: "@wagmi/core@npm:1.3.9" dependencies: @@ -10941,13 +10941,6 @@ __metadata: languageName: node linkType: hard -"csv-stringify@npm:^6.4.0": - version: 6.4.0 - resolution: "csv-stringify@npm:6.4.0" - checksum: 4d68c34a8f9ec52ec7b2da8a67c2c4b658431f4ba8f816a5e9b4664dc09ec37e5cf65a41dae13500488d38bd8b416b1dc179aad8275ba54e7b1735e21bbf2830 - languageName: node - linkType: hard - "d3-array@npm:2 - 3, d3-array@npm:2.10.0 - 3, d3-array@npm:2.5.0 - 3, d3-array@npm:3, d3-array@npm:^3.2.0": version: 3.2.3 resolution: "d3-array@npm:3.2.3" @@ -13857,7 +13850,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.18.0 "@typescript-eslint/parser": ^5.18.0 "@ukstv/jazzicon-react": ^1.0.0 - "@wagmi/core": ~1.3.8 + "@wagmi/core": ~1.3.9 api-types: 0.1.0 assert: ^2.0.0 autoprefixer: ^10.4.7 @@ -13866,7 +13859,6 @@ __metadata: chartjs-chart-treemap: ^2.3.0 craco-alias: ^3.0.1 csv-parse: ^5.4.0 - csv-stringify: ^6.4.0 date-fns: ^2.25.0 date-fns-tz: ^1.3.3 discord-markdown: ^2.5.1 From 7510dabd9c15ad2672f686a821de0fe9fdbb642d Mon Sep 17 00:00:00 2001 From: Kristofer Date: Thu, 24 Aug 2023 08:43:04 +0200 Subject: [PATCH 52/63] Type name change --- packages/discord-bot/src/utils/api-schema.ts | 4 ++-- packages/discord-bot/src/utils/getHost.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/discord-bot/src/utils/api-schema.ts b/packages/discord-bot/src/utils/api-schema.ts index 582a9dc3b..6b19ed677 100644 --- a/packages/discord-bot/src/utils/api-schema.ts +++ b/packages/discord-bot/src/utils/api-schema.ts @@ -24,8 +24,8 @@ export type PraiseForwardInputDto = export type Setting = components['schemas']['Setting']; -export type CommunityPaginatedResponseDto = - components['schemas']['CommunityPaginatedResponseDto']; +export type CommunityFindAllResponseDto = + components['schemas']['CommunityFindAllResponseDto']; export type Community = components['schemas']['Community']; export type PeriodPaginatedResponseDto = diff --git a/packages/discord-bot/src/utils/getHost.ts b/packages/discord-bot/src/utils/getHost.ts index 6fcf76585..54a1386e2 100644 --- a/packages/discord-bot/src/utils/getHost.ts +++ b/packages/discord-bot/src/utils/getHost.ts @@ -1,6 +1,6 @@ import { apiGet } from './api'; import Keyv from 'keyv'; -import { Community, CommunityPaginatedResponseDto } from './api-schema'; +import { Community, CommunityFindAllResponseDto } from './api-schema'; import { DiscordClient } from '../interfaces/DiscordClient'; /** @@ -11,7 +11,7 @@ export const buildCommunityCache = async (cache: Keyv): Promise => { let currPage = 1; let totalPages = 1; while (currPage <= totalPages) { - const communityList = await apiGet( + const communityList = await apiGet( `/communities?page=${currPage}` ).then((res) => res.data); From e8a95d1091630d5cd83cad0f4a4041302b718c68 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Thu, 24 Aug 2023 09:06:15 +0200 Subject: [PATCH 53/63] Show disabled button when user can't create attestations --- .../PeriodDetails/components/CreateAttestationsButton.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index 351108346..3b158299a 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -38,10 +38,12 @@ export function CreateAttestationsButton({ void isOwner(); }, [safe, address]); - if (!address || !userId || !period || period.attestationsTxHash) { + if (!period || period.attestationsTxHash) { return null; } + const disabled = !userId || !address; + if (address && typeof isOwner === 'undefined') { return (
    @@ -56,7 +58,7 @@ export function CreateAttestationsButton({ if (isOwner) { return (
    - From 33b55e641296fdad5617f2ec953d139da704e6c5 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Thu, 24 Aug 2023 09:29:26 +0200 Subject: [PATCH 54/63] Login button polish --- .../frontend/src/components/auth/SignMessageButton.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/auth/SignMessageButton.tsx b/packages/frontend/src/components/auth/SignMessageButton.tsx index 5a0444437..29d76a393 100644 --- a/packages/frontend/src/components/auth/SignMessageButton.tsx +++ b/packages/frontend/src/components/auth/SignMessageButton.tsx @@ -1,6 +1,7 @@ import { useSignMessage } from 'wagmi'; -import { LoaderSpinner } from '@/components/ui/LoaderSpinner'; import { Button } from '../ui/Button'; +import { faPrayingHands } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; interface Props { text: string; @@ -26,7 +27,10 @@ const SignMessageButton = ({ }); return isLoading || isSuccess ? ( - + ) : ( ); From f9b7472e6acbbe5427f861ae1a99f15981997d7e Mon Sep 17 00:00:00 2001 From: Kristofer Date: Thu, 24 Aug 2023 09:36:17 +0200 Subject: [PATCH 55/63] Reload transaction after signing --- packages/frontend/src/model/safe/hooks/useSafeTransaction.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts index 974620c64..290a6f151 100644 --- a/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts +++ b/packages/frontend/src/model/safe/hooks/useSafeTransaction.ts @@ -88,6 +88,8 @@ export function useSafeTransaction({ const signature = await safe.signTransactionHash(safeTxHash); await safeApiKit.confirmTransaction(safeTxHash, signature.data); setSignState({ state: 'signed' }); + // Wait 2 seconds, then reload the transaction + setTimeout(loadTransaction, 2000); } catch (e) { if (errorHasReason(e) && e.reason) { toast.error(e.reason); From 16f23e7d666f13d2a9f3ce7860244baccc37f6da Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 08:39:02 +0200 Subject: [PATCH 56/63] Remove unused --- packages/frontend/src/model/safe/safe.constants.ts | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 packages/frontend/src/model/safe/safe.constants.ts diff --git a/packages/frontend/src/model/safe/safe.constants.ts b/packages/frontend/src/model/safe/safe.constants.ts deleted file mode 100644 index 681737228..000000000 --- a/packages/frontend/src/model/safe/safe.constants.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const SAFE_TX_SERVICE_URL = - 'https://safe-transaction-optimism.safe.global'; From 144d014ea0b39b8921cb6b669dde211bf403d802 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 08:39:11 +0200 Subject: [PATCH 57/63] View on easscan.org --- .../components/AttestationsDetailBox.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx index b6e5f0b24..f1b9d7f17 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/AttestationsDetailBox.tsx @@ -15,6 +15,7 @@ import { SignAttestationsButton } from './SignAttestationsButton'; import { ExecuteAttestationsButton } from './ExecuteAttestationsButton'; import { useSafeConfig } from '../../../model/safe/hooks/useSafeConfig'; import { useNetwork } from 'wagmi'; +import { useEas } from '../../../model/eas/hooks/useEas'; export function AttestationsDetailBox(): JSX.Element | null { const { periodId } = useParams(); @@ -33,6 +34,7 @@ export function AttestationsDetailBox(): JSX.Element | null { }); const { chain } = useNetwork(); const safeConfig = useSafeConfig(chain?.id); + const { schemaUid } = useEas(); const reportUrl = period ? `/reports/run?${objectToQs({ @@ -181,6 +183,15 @@ export function AttestationsDetailBox(): JSX.Element | null {
    +
    From a8cda0aa513ff42e81fdd7071f9dac1ae3eeec10 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 08:51:04 +0200 Subject: [PATCH 58/63] Show attestation tab only if feature is enabled --- .../pages/PeriodDetails/PeriodDetailsPage.tsx | 18 +++++++++++------- .../PeriodDetails/components/Attestations.tsx | 6 +++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx index b81ea0cda..bee973c5a 100644 --- a/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx +++ b/packages/frontend/src/pages/PeriodDetails/PeriodDetailsPage.tsx @@ -35,6 +35,7 @@ import { Box } from '@/components/ui/Box'; import { LoadPlaceholder } from '@/components/LoadPlaceholder'; import { PeriodStatusType } from '@/model/periods/enums/period-status-type.enum'; import Attestations from './components/Attestations'; +import { CurrentCommunity } from '../../model/community/community'; const QuantifierTable = React.lazy( () => import('./components/QuantifierTable') @@ -62,6 +63,7 @@ export const PeriodDetailsPage = (): JSX.Element | null => { const period = useRecoilValue(SinglePeriod(periodId)); const activeUserId = useRecoilValue(ActiveUserId); const isAdmin = useRecoilValue(HasRole(ROLE_ADMIN)); + const community = useRecoilValue(CurrentCommunity); usePeriodQuantifierPraise(periodId, activeUserId || ''); @@ -121,13 +123,15 @@ export const PeriodDetailsPage = (): JSX.Element | null => { replace rounded /> - + {community?.features?.attestations && ( + + )}
    diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 80cc22071..1d0a9624b 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -11,6 +11,7 @@ import { ETH_CHAIN_ID } from '../../../model/eth/eth.constants'; import { SwitchNetworkButton } from './SwitchNetworkButton'; import { EasContextProvider } from '../../../model/eas/components/EasContextProvider'; import { ATTESTATION_SCHEMA_UID } from '../../../model/eas/eas.constants'; +import { CurrentCommunity } from '../../../model/community/community'; const Attestations = (): JSX.Element | null => { // Hooks @@ -22,7 +23,10 @@ const Attestations = (): JSX.Element | null => { // Local state const [dialogOpen, setDialogOpen] = useState(false); - if (!period || !chain) { + // Global state + const community = useRecoilValue(CurrentCommunity); + + if (!period || !chain || !community?.features.attestations) { return null; } From e38e3b21235e9a679e175376e67d517e5fa14506 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 09:27:52 +0200 Subject: [PATCH 59/63] toast on safe init error --- .../frontend/src/model/safe/components/SafeContextProvider.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/frontend/src/model/safe/components/SafeContextProvider.tsx b/packages/frontend/src/model/safe/components/SafeContextProvider.tsx index 5be52073f..581c0f409 100644 --- a/packages/frontend/src/model/safe/components/SafeContextProvider.tsx +++ b/packages/frontend/src/model/safe/components/SafeContextProvider.tsx @@ -9,6 +9,7 @@ import { useSigner } from '../../wagmi/hooks/useSigner'; import { SafeContext } from '../types/use-safe-return'; import { useRecoilValue } from 'recoil'; import { CurrentCommunity } from '../../community/community'; +import { toast } from 'react-hot-toast'; export const ReactSafeContext = React.createContext( undefined @@ -130,6 +131,7 @@ export const SafeContextProvider: React.FC = ({ safe: undefined, safeError: error as Error, })); + toast.error('Could not initialize Safe instance'); console.error(error); } })(); From 40a5b40a3161b278182ab37d7ba51dc67d069047 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 09:28:21 +0200 Subject: [PATCH 60/63] Always show connect button on wrong net --- .../src/pages/PeriodDetails/components/Attestations.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx index 1d0a9624b..390c9d75a 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/Attestations.tsx @@ -76,7 +76,7 @@ const Attestations = (): JSX.Element | null => { {period?.attestationsTxHash && chain?.id === ETH_CHAIN_ID && ( )} - {period?.attestationsTxHash && chain?.id !== ETH_CHAIN_ID && ( + {chain?.id !== ETH_CHAIN_ID && (
    Connect to Optimism to create or view attestations. From 99c2073676a99de05c47d796063dca50df80e706 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 09:28:39 +0200 Subject: [PATCH 61/63] Show Safe error to user --- .../components/CreateAttestationsButton.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx index 3b158299a..8583ac508 100644 --- a/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx +++ b/packages/frontend/src/pages/PeriodDetails/components/CreateAttestationsButton.tsx @@ -20,7 +20,7 @@ export function CreateAttestationsButton({ // Hooks const { periodId } = useParams(); const { address } = useAccount(); - const { safe } = useSafe(); + const { safe, safeError } = useSafe(); // Global state const period = useRecoilValue(SinglePeriod(periodId)); @@ -44,6 +44,19 @@ export function CreateAttestationsButton({ const disabled = !userId || !address; + if (safeError) { + return ( +
    +
    + Error: {safeError.message} +
    +
    + Make sure the community creator address is valid Safe account address. +
    +
    + ); + } + if (address && typeof isOwner === 'undefined') { return (
    From dab839077b1ff79fdc179655ed6e74381ca640a1 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 09:41:22 +0200 Subject: [PATCH 62/63] Remove unused --- packages/api/src/periods/services/periods.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/api/src/periods/services/periods.service.ts b/packages/api/src/periods/services/periods.service.ts index bf50be0f7..e36d2771b 100644 --- a/packages/api/src/periods/services/periods.service.ts +++ b/packages/api/src/periods/services/periods.service.ts @@ -27,7 +27,6 @@ import { UserAccount, UserAccountSchema, } from '../../useraccounts/schemas/useraccounts.schema'; -import { forEach } from 'lodash'; @Injectable({ scope: Scope.REQUEST }) export class PeriodsService { From 959cf82175f085f45edd16cf647e72701decf1b0 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Mon, 4 Sep 2023 09:44:02 +0200 Subject: [PATCH 63/63] CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10fdd18ea..a9ff031c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- **Frontend/API**: Attestations! Communities can now create attestations based on Praise data using the Ethereum Attestation Service. Attest to top receivers, givers etc. - **Frontend**: Custom reports can now be configured using an interactive form. #1131 - **Frontend**: New feature: Run custom reports from the reports page. #1050