diff --git a/backend/config/plugins.js b/backend/config/plugins.js index d1614ed..061d5d1 100644 --- a/backend/config/plugins.js +++ b/backend/config/plugins.js @@ -5,6 +5,9 @@ module.exports = ({ env }) => ({ config: { dsn: env("SENTRY_DSN"), // Set Sentry DSN from environment variable sendMetadata: true, // Enable sending metadata to Sentry + init: { + environment: env('APP_ENV'), + }, }, }, // Documentation plugin configuration diff --git a/backend/package-lock.json b/backend/package-lock.json index 712d7d5..7bf8589 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -14,7 +14,7 @@ "@strapi/plugin-cloud": "4.19.1", "@strapi/plugin-documentation": "^4.19.1", "@strapi/plugin-i18n": "4.19.1", - "@strapi/plugin-sentry": "^4.19.1", + "@strapi/plugin-sentry": "^4.25.20", "@strapi/plugin-users-permissions": "4.19.1", "@strapi/strapi": "4.19.1", "pg": "8.8.0", @@ -1317,17 +1317,19 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/@internationalized/date": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.5.1.tgz", - "integrity": "sha512-LUQIfwU9e+Fmutc/DpRTGXSdgYZLBegi4wygCWDSVmUdLTaMHsQyASDiJtREwanwKuQLq0hY76fCJ9J/9I2xOQ==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@internationalized/date/-/date-3.7.0.tgz", + "integrity": "sha512-VJ5WS3fcVx0bejE/YHfbDKR/yawZgKqn/if+oEeLqNwBtPzVB06olkfcnojTmEMX+gTpH+FlQ69SHNitJ8/erQ==", + "license": "Apache-2.0", "dependencies": { "@swc/helpers": "^0.5.0" } }, "node_modules/@internationalized/number": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.5.0.tgz", - "integrity": "sha512-ZY1BW8HT9WKYvaubbuqXbbDdHhOUMfE2zHHFJeTppid0S+pc8HtdIxFxaYMsGjCb4UsF+MEJ4n2TfU7iHnUK8w==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@internationalized/number/-/number-3.6.0.tgz", + "integrity": "sha512-PtrRcJVy7nw++wn4W2OuePQQfTqDzfusSuY1QTtui4wa7r+rGVtR75pO8CyKvHvzyQYi3Q1uO5sY0AsB4e65Bw==", + "license": "Apache-2.0", "dependencies": { "@swc/helpers": "^0.5.0" } @@ -3238,14 +3240,15 @@ } }, "node_modules/@strapi/plugin-sentry": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@strapi/plugin-sentry/-/plugin-sentry-4.19.1.tgz", - "integrity": "sha512-+aaH02eJG0s9WT0YkMCaigkMLKF707ZLG+mvNCxDZxnTlwbRAUAQuNVr1x1zCMzSaslRXnqct68Lxp+/YTnUzA==", + "version": "4.25.20", + "resolved": "https://registry.npmjs.org/@strapi/plugin-sentry/-/plugin-sentry-4.25.20.tgz", + "integrity": "sha512-wHZDg3OXUarrw9R5Cu2kHMRaqrn/uOBSlYRtHS1ouB6ZQ98wZgM2JIXpHgaBtLLbqwh1tM1U0rYwrkwrVUWMNw==", + "license": "SEE LICENSE IN LICENSE", "dependencies": { "@sentry/node": "6.19.7", - "@strapi/design-system": "1.14.1", - "@strapi/helper-plugin": "4.19.1", - "@strapi/icons": "1.14.1" + "@strapi/design-system": "1.19.0", + "@strapi/helper-plugin": "4.25.20", + "@strapi/icons": "1.19.0" }, "engines": { "node": ">=18.0.0 <=20.x.x", @@ -3259,6 +3262,85 @@ "styled-components": "^5.2.1" } }, + "node_modules/@strapi/plugin-sentry/node_modules/@strapi/design-system": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@strapi/design-system/-/design-system-1.19.0.tgz", + "integrity": "sha512-kEQNaRztIcr6I5Zh6mxtE/Nmkk1mylCS5s56ySKDdqOjWZw2BCbS72/J9k6r1RF1TLIDSXJN9r5dHR0ZKtWvBQ==", + "license": "MIT", + "dependencies": { + "@codemirror/lang-json": "^6.0.1", + "@floating-ui/react-dom": "^2.0.8", + "@internationalized/date": "^3.5.2", + "@internationalized/number": "^3.5.1", + "@radix-ui/react-dismissable-layer": "^1.0.5", + "@radix-ui/react-dropdown-menu": "^2.0.6", + "@radix-ui/react-focus-scope": "1.0.4", + "@strapi/ui-primitives": "^1.19.0", + "@uiw/react-codemirror": "^4.21.25", + "aria-hidden": "^1.2.4", + "compute-scroll-into-view": "^3.1.0", + "prop-types": "^15.8.1", + "react-remove-scroll": "^2.5.9" + }, + "peerDependencies": { + "@strapi/icons": "^1.5.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0", + "react-router-dom": "^5.2.0", + "styled-components": "^5.2.1" + } + }, + "node_modules/@strapi/plugin-sentry/node_modules/@strapi/helper-plugin": { + "version": "4.25.20", + "resolved": "https://registry.npmjs.org/@strapi/helper-plugin/-/helper-plugin-4.25.20.tgz", + "integrity": "sha512-QBEwGcG676xc3irOY3gwdrG0wqbI7UtCTm8opcni8D/jARsr4JW/OvdiXmiuWDLWvVrczRtrkeqQ2pBWevX/dg==", + "license": "SEE LICENSE IN LICENSE", + "dependencies": { + "axios": "1.7.4", + "date-fns": "2.30.0", + "formik": "2.4.0", + "immer": "9.0.19", + "lodash": "4.17.21", + "qs": "6.11.1", + "react-helmet": "6.1.0", + "react-intl": "6.4.1", + "react-query": "3.39.3", + "react-select": "5.7.0" + }, + "engines": { + "node": ">=18.0.0 <=20.x.x", + "npm": ">=6.0.0" + }, + "peerDependencies": { + "@strapi/design-system": "1.19.0", + "@strapi/icons": "1.19.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0", + "react-router-dom": "^5.2.0", + "styled-components": "^5.2.1" + } + }, + "node_modules/@strapi/plugin-sentry/node_modules/@strapi/icons": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@strapi/icons/-/icons-1.19.0.tgz", + "integrity": "sha512-jcS7n3Ps+73fYGadxdaD6owazoDJKN1fHSG9dp8RX4RqkP6BfoHOX5j3aodVLmDX57Ksg6gy5JXf9xEml7nMpQ==", + "license": "MIT", + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" + } + }, + "node_modules/@strapi/plugin-sentry/node_modules/axios": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/@strapi/plugin-upload": { "version": "4.19.1", "resolved": "https://registry.npmjs.org/@strapi/plugin-upload/-/plugin-upload-4.19.1.tgz", @@ -3497,9 +3579,10 @@ } }, "node_modules/@strapi/ui-primitives": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/@strapi/ui-primitives/-/ui-primitives-1.14.1.tgz", - "integrity": "sha512-AmwyfZuazN7J1AgVf7i7oly+zwcJdWFqh/UCd3uPtoonnPmdCIRjkK8aBWlU9M+k3277FGIaCHOwNHiMSiBbbA==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/@strapi/ui-primitives/-/ui-primitives-1.19.0.tgz", + "integrity": "sha512-dEpmI0PpSH6VWuP/bBvRKI5lUpazdDAcxOpukoq2QDwUFbuZWywgW7a6O5nMnD4bLQtyNeYwd52J8Jqr9pNoQA==", + "license": "MIT", "dependencies": { "@radix-ui/number": "^1.0.1", "@radix-ui/primitive": "^1.0.1", @@ -3520,8 +3603,8 @@ "@radix-ui/react-use-layout-effect": "1.0.1", "@radix-ui/react-use-previous": "^1.0.1", "@radix-ui/react-visually-hidden": "^1.0.3", - "aria-hidden": "^1.2.3", - "react-remove-scroll": "^2.5.7" + "aria-hidden": "^1.2.4", + "react-remove-scroll": "^2.5.9" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", @@ -4016,9 +4099,10 @@ } }, "node_modules/@uiw/codemirror-extensions-basic-setup": { - "version": "4.21.21", - "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.21.21.tgz", - "integrity": "sha512-+0i9dPrRSa8Mf0CvyrMvnAhajnqwsP3IMRRlaHDRgsSGL8igc4z7MhvUPn+7cWFAAqWzQRhMdMSWzo6/TEa3EA==", + "version": "4.23.8", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.23.8.tgz", + "integrity": "sha512-XJR/8AEVcE7ufy1BhW2nCN9qSVDYEdCtYLfvhaMwl6Q3qcaYYCGE2K5QbFCy7LsdP/3uZKvc1OskuqatoOPdhQ==", + "license": "MIT", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", @@ -4042,15 +4126,16 @@ } }, "node_modules/@uiw/react-codemirror": { - "version": "4.21.21", - "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.21.21.tgz", - "integrity": "sha512-PaxBMarufMWoR0qc5zuvBSt76rJ9POm9qoOaJbqRmnNL2viaF+d+Paf2blPSlm1JSnqn7hlRjio+40nZJ9TKzw==", + "version": "4.23.8", + "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.23.8.tgz", + "integrity": "sha512-/NA5Pj4MmXkLSlmlUm4yfEmRLntrNq5TkQKBSINn7TukXQ4fc+C6Bk0U60Qa4rkvCSgwzZdQ2exyP0t0+2GtqA==", + "license": "MIT", "dependencies": { "@babel/runtime": "^7.18.6", "@codemirror/commands": "^6.1.0", "@codemirror/state": "^6.1.1", "@codemirror/theme-one-dark": "^6.0.0", - "@uiw/codemirror-extensions-basic-setup": "4.21.21", + "@uiw/codemirror-extensions-basic-setup": "4.23.8", "codemirror": "^6.0.0" }, "funding": { @@ -4438,9 +4523,10 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/aria-hidden": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.3.tgz", - "integrity": "sha512-xcLxITLe2HYa1cnYnwCjkOO1PqUHQpozB8x9AR0OgWN2woOBi5kSDVxKfd0b7sb1hw5qFeJhXm9H1nu3xSfLeQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz", + "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -7643,15 +7729,16 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], + "license": "MIT", "engines": { "node": ">=4.0" }, @@ -12675,22 +12762,23 @@ } }, "node_modules/react-remove-scroll": { - "version": "2.5.7", - "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.5.7.tgz", - "integrity": "sha512-FnrTWO4L7/Bhhf3CYBNArEG/yROV0tKmTv7/3h9QCFvH6sndeFf1wPqOcbFVu5VAulS5dV1wGT3GZZ/1GawqiA==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz", + "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==", + "license": "MIT", "dependencies": { - "react-remove-scroll-bar": "^2.3.4", - "react-style-singleton": "^2.2.1", + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", "tslib": "^2.1.0", - "use-callback-ref": "^1.3.0", - "use-sidecar": "^1.1.2" + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -12699,19 +12787,20 @@ } }, "node_modules/react-remove-scroll-bar": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz", - "integrity": "sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", + "license": "MIT", "dependencies": { - "react-style-singleton": "^2.2.1", + "react-style-singleton": "^2.2.2", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" }, "peerDependenciesMeta": { "@types/react": { @@ -12812,20 +12901,20 @@ } }, "node_modules/react-style-singleton": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.1.tgz", - "integrity": "sha512-ZWj0fHEMyWkHzKYUr2Bs/4zU6XLmq9HsgBURm7g5pAVfyn49DgUiNgY2d4lXRlYSiCif9YBGpQleewkcqddc7g==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", + "license": "MIT", "dependencies": { "get-nonce": "^1.0.0", - "invariant": "^2.2.4", "tslib": "^2.0.0" }, "engines": { "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -15208,9 +15297,10 @@ } }, "node_modules/use-callback-ref": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.1.tgz", - "integrity": "sha512-Lg4Vx1XZQauB42Hw3kK7JM6yjVjgFmFC5/Ab797s79aARomD2nEErc4mCgM8EZrARLmmbWpi5DGCadmK50DcAQ==", + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "license": "MIT", "dependencies": { "tslib": "^2.0.0" }, @@ -15218,8 +15308,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { @@ -15265,9 +15355,10 @@ } }, "node_modules/use-sidecar": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.2.tgz", - "integrity": "sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "license": "MIT", "dependencies": { "detect-node-es": "^1.1.0", "tslib": "^2.0.0" @@ -15276,8 +15367,8 @@ "node": ">=10" }, "peerDependencies": { - "@types/react": "^16.9.0 || ^17.0.0 || ^18.0.0", - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "peerDependenciesMeta": { "@types/react": { diff --git a/backend/package.json b/backend/package.json index a2a6374..55e7c3f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -15,7 +15,7 @@ "@strapi/plugin-cloud": "4.19.1", "@strapi/plugin-documentation": "^4.19.1", "@strapi/plugin-i18n": "4.19.1", - "@strapi/plugin-sentry": "^4.19.1", + "@strapi/plugin-sentry": "^4.25.20", "@strapi/plugin-users-permissions": "4.19.1", "@strapi/strapi": "4.19.1", "pg": "8.8.0", diff --git a/backend/src/api/proposal-constitution-content/content-types/proposal-constitution-content/schema.json b/backend/src/api/proposal-constitution-content/content-types/proposal-constitution-content/schema.json new file mode 100644 index 0000000..72ed155 --- /dev/null +++ b/backend/src/api/proposal-constitution-content/content-types/proposal-constitution-content/schema.json @@ -0,0 +1,34 @@ +{ + "kind": "collectionType", + "collectionName": "proposal_constitution_contents", + "info": { + "singularName": "proposal-constitution-content", + "pluralName": "proposal-constitution-contents", + "displayName": "Proposal Constitution content", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "prop_constitution_url": { + "type": "string" + }, + "prop_have_guardrails_script": { + "type": "boolean" + }, + "prop_guardrails_script_url": { + "type": "string" + }, + "prop_guardrails_script_hash": { + "type": "string" + }, + "proposal_content": { + "type": "relation", + "relation": "oneToOne", + "target": "api::proposal-content.proposal-content", + "inversedBy": "proposal_constitution_content" + } + } +} diff --git a/backend/src/api/proposal-constitution-content/controllers/proposal-constitution-content.js b/backend/src/api/proposal-constitution-content/controllers/proposal-constitution-content.js new file mode 100644 index 0000000..e84c774 --- /dev/null +++ b/backend/src/api/proposal-constitution-content/controllers/proposal-constitution-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-constitution-content controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::proposal-constitution-content.proposal-constitution-content'); diff --git a/backend/src/api/proposal-constitution-content/documentation/1.0.0/proposal-constitution-content.json b/backend/src/api/proposal-constitution-content/documentation/1.0.0/proposal-constitution-content.json new file mode 100644 index 0000000..02885d1 --- /dev/null +++ b/backend/src/api/proposal-constitution-content/documentation/1.0.0/proposal-constitution-content.json @@ -0,0 +1,507 @@ +{ + "/proposal-constitution-contents": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Proposal-constitution-content" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/proposal-constitution-contents" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Proposal-constitution-content" + ], + "parameters": [], + "operationId": "post/proposal-constitution-contents", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" + } + } + } + } + } + }, + "/proposal-constitution-contents/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Proposal-constitution-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/proposal-constitution-contents/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Proposal-constitution-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/proposal-constitution-contents/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Proposal-constitution-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/proposal-constitution-contents/{id}" + } + } +} diff --git a/backend/src/api/proposal-constitution-content/routes/proposal-constitution-content.js b/backend/src/api/proposal-constitution-content/routes/proposal-constitution-content.js new file mode 100644 index 0000000..0f14a8c --- /dev/null +++ b/backend/src/api/proposal-constitution-content/routes/proposal-constitution-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-constitution-content router + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::proposal-constitution-content.proposal-constitution-content'); diff --git a/backend/src/api/proposal-constitution-content/services/proposal-constitution-content.js b/backend/src/api/proposal-constitution-content/services/proposal-constitution-content.js new file mode 100644 index 0000000..e38d976 --- /dev/null +++ b/backend/src/api/proposal-constitution-content/services/proposal-constitution-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-constitution-content service + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::proposal-constitution-content.proposal-constitution-content'); diff --git a/backend/src/api/proposal-content/content-types/proposal-content/schema.json b/backend/src/api/proposal-content/content-types/proposal-content/schema.json index df36fee..8d4d8a4 100644 --- a/backend/src/api/proposal-content/content-types/proposal-content/schema.json +++ b/backend/src/api/proposal-content/content-types/proposal-content/schema.json @@ -68,6 +68,12 @@ "type": "component", "repeatable": true, "component": "proposal.proposal-withdrawals" + }, + "proposal_constitution_content": { + "type": "relation", + "relation": "oneToOne", + "target": "api::proposal-constitution-content.proposal-constitution-content", + "mappedBy": "proposal_content" } } } diff --git a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json index c8fa535..d3a58b6 100644 --- a/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/backend/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -13,7 +13,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-11-26T08:48:46.401Z" + "x-generation-date": "2025-02-12T11:40:34.828Z" }, "x-strapi-config": { "plugins": [], @@ -2113,90 +2113,60 @@ } } }, - "ProposalContentRequest": { + "ProposalConstitutionContentRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { - "required": [ - "prop_name", - "user_id" - ], "type": "object", "properties": { - "proposal_id": { - "type": "string" - }, - "prop_rev_active": { - "type": "boolean" - }, - "prop_abstract": { - "type": "string" - }, - "prop_motivation": { - "type": "string" - }, - "prop_rationale": { - "type": "string" - }, - "gov_action_type_id": { - "type": "string" - }, - "prop_name": { + "prop_constitution_url": { "type": "string" }, - "proposal_links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProposalProposalLinkComponent" - } - }, - "is_draft": { + "prop_have_guardrails_script": { "type": "boolean" }, - "user_id": { + "prop_guardrails_script_url": { "type": "string" }, - "prop_submitted": { - "type": "boolean" - }, - "prop_submission_tx_hash": { + "prop_guardrails_script_hash": { "type": "string" }, - "prop_submission_date": { - "type": "string", - "format": "date" - }, - "proposal_withdrawals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProposalProposalWithdrawalsComponent" - } + "proposal_content": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" } } } } }, - "ProposalContentListResponseDataItem": { + "ProposalConstitutionContentListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalContent" + "$ref": "#/components/schemas/ProposalConstitutionContent" } } }, - "ProposalContentListResponse": { + "ProposalConstitutionContentListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProposalContentListResponseDataItem" + "$ref": "#/components/schemas/ProposalConstitutionContentListResponseDataItem" } }, "meta": { @@ -2225,71 +2195,22 @@ } } }, - "ProposalContent": { + "ProposalConstitutionContent": { "type": "object", - "required": [ - "prop_name", - "user_id" - ], "properties": { - "proposal_id": { - "type": "string" - }, - "prop_rev_active": { - "type": "boolean" - }, - "prop_abstract": { + "prop_constitution_url": { "type": "string" }, - "prop_motivation": { - "type": "string" - }, - "prop_rationale": { - "type": "string" - }, - "gov_action_type_id": { - "type": "string" - }, - "prop_name": { - "type": "string" - }, - "proposal_links": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProposalProposalLinkComponent" - } - }, - "is_draft": { + "prop_have_guardrails_script": { "type": "boolean" }, - "user_id": { + "prop_guardrails_script_url": { "type": "string" }, - "prop_submitted": { - "type": "boolean" - }, - "prop_submission_tx_hash": { + "prop_guardrails_script_hash": { "type": "string" }, - "prop_submission_date": { - "type": "string", - "format": "date" - }, - "proposal_withdrawals": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ProposalProposalWithdrawalsComponent" - } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { + "proposal_content": { "type": "object", "properties": { "data": { @@ -2301,150 +2222,385 @@ "attributes": { "type": "object", "properties": { - "firstname": { + "proposal_id": { "type": "string" }, - "lastname": { + "prop_rev_active": { + "type": "boolean" + }, + "prop_abstract": { "type": "string" }, - "username": { + "prop_motivation": { "type": "string" }, - "email": { - "type": "string", - "format": "email" + "prop_rationale": { + "type": "string" }, - "resetPasswordToken": { + "gov_action_type_id": { "type": "string" }, - "registrationToken": { + "prop_name": { "type": "string" }, - "isActive": { + "proposal_links": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "prop_link": { + "type": "string" + }, + "prop_link_text": { + "type": "string" + } + } + } + }, + "is_draft": { "type": "boolean" }, - "roles": { + "user_id": { + "type": "string" + }, + "prop_submitted": { + "type": "boolean" + }, + "prop_submission_tx_hash": { + "type": "string" + }, + "prop_submission_date": { + "type": "string", + "format": "date" + }, + "proposal_withdrawals": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "prop_receiving_address": { + "type": "string" + }, + "prop_amount": { + "type": "number", + "format": "float" + } + } + } + }, + "proposal_constitution_content": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "prop_constitution_url": { + "type": "string" + }, + "prop_have_guardrails_script": { + "type": "boolean" + }, + "prop_guardrails_script_url": { + "type": "string" + }, + "prop_guardrails_script_hash": { + "type": "string" + }, + "proposal_content": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } + "properties": {} } } } - }, - "permissions": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", "properties": { - "id": { - "type": "number" + "firstname": { + "type": "string" }, - "attributes": { + "lastname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "resetPasswordToken": { + "type": "string" + }, + "registrationToken": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "roles": { "type": "object", "properties": { - "action": { - "type": "string" - }, - "actionParameters": {}, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } } } } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { "type": "object", "properties": { - "data": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } + "properties": {} } } - }, - "updatedBy": { + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { "type": "object", "properties": { - "data": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } + "properties": {} } } } @@ -2454,45 +2610,20 @@ } } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} } } } @@ -2504,12 +2635,6 @@ } } }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, "createdAt": { "type": "string", "format": "date-time" @@ -2558,6 +2683,31 @@ } } }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, "updatedBy": { "type": "object", "properties": { @@ -2577,95 +2727,123 @@ } } }, - "ProposalContentResponseDataObject": { + "ProposalConstitutionContentResponseDataObject": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalContent" + "$ref": "#/components/schemas/ProposalConstitutionContent" } } }, - "ProposalContentResponse": { + "ProposalConstitutionContentResponse": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProposalContentResponseDataObject" + "$ref": "#/components/schemas/ProposalConstitutionContentResponseDataObject" }, "meta": { "type": "object" } } }, - "ProposalProposalLinkComponent": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "prop_link": { - "type": "string" - }, - "prop_link_text": { - "type": "string" - } - } - }, - "ProposalProposalWithdrawalsComponent": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "prop_receiving_address": { - "type": "string" - }, - "prop_amount": { - "type": "number", - "format": "float" - } - } - }, - "ProposalSubmitionRequest": { + "ProposalContentRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { + "required": [ + "prop_name", + "user_id" + ], "type": "object", "properties": { "proposal_id": { "type": "string" }, - "sub_json_path": {}, - "sub_location_url": { + "prop_rev_active": { + "type": "boolean" + }, + "prop_abstract": { + "type": "string" + }, + "prop_motivation": { + "type": "string" + }, + "prop_rationale": { "type": "string" + }, + "gov_action_type_id": { + "type": "string" + }, + "prop_name": { + "type": "string" + }, + "proposal_links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalProposalLinkComponent" + } + }, + "is_draft": { + "type": "boolean" + }, + "user_id": { + "type": "string" + }, + "prop_submitted": { + "type": "boolean" + }, + "prop_submission_tx_hash": { + "type": "string" + }, + "prop_submission_date": { + "type": "string", + "format": "date" + }, + "proposal_withdrawals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalProposalWithdrawalsComponent" + } + }, + "proposal_constitution_content": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" } } } } }, - "ProposalSubmitionListResponseDataItem": { + "ProposalContentListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalSubmition" + "$ref": "#/components/schemas/ProposalContent" } } }, - "ProposalSubmitionListResponse": { + "ProposalContentListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProposalSubmitionListResponseDataItem" + "$ref": "#/components/schemas/ProposalContentListResponseDataItem" } }, "meta": { @@ -2694,25 +2872,63 @@ } } }, - "ProposalSubmition": { + "ProposalContent": { "type": "object", + "required": [ + "prop_name", + "user_id" + ], "properties": { "proposal_id": { "type": "string" }, - "sub_json_path": {}, - "sub_location_url": { + "prop_rev_active": { + "type": "boolean" + }, + "prop_abstract": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "prop_motivation": { + "type": "string" }, - "updatedAt": { + "prop_rationale": { + "type": "string" + }, + "gov_action_type_id": { + "type": "string" + }, + "prop_name": { + "type": "string" + }, + "proposal_links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalProposalLinkComponent" + } + }, + "is_draft": { + "type": "boolean" + }, + "user_id": { + "type": "string" + }, + "prop_submitted": { + "type": "boolean" + }, + "prop_submission_tx_hash": { + "type": "string" + }, + "prop_submission_date": { "type": "string", - "format": "date-time" + "format": "date" }, - "createdBy": { + "proposal_withdrawals": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalProposalWithdrawalsComponent" + } + }, + "proposal_constitution_content": { "type": "object", "properties": { "data": { @@ -2724,150 +2940,385 @@ "attributes": { "type": "object", "properties": { - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "username": { + "prop_constitution_url": { "type": "string" }, - "email": { - "type": "string", - "format": "email" + "prop_have_guardrails_script": { + "type": "boolean" }, - "resetPasswordToken": { + "prop_guardrails_script_url": { "type": "string" }, - "registrationToken": { + "prop_guardrails_script_hash": { "type": "string" }, - "isActive": { - "type": "boolean" - }, - "roles": { + "proposal_content": { "type": "object", "properties": { "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "description": { - "type": "string" - }, - "users": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "proposal_id": { + "type": "string" + }, + "prop_rev_active": { + "type": "boolean" + }, + "prop_abstract": { + "type": "string" + }, + "prop_motivation": { + "type": "string" + }, + "prop_rationale": { + "type": "string" + }, + "gov_action_type_id": { + "type": "string" + }, + "prop_name": { + "type": "string" + }, + "proposal_links": { + "type": "array", + "items": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } + "id": { + "type": "number" + }, + "prop_link": { + "type": "string" + }, + "prop_link_text": { + "type": "string" } } - }, - "permissions": { + } + }, + "is_draft": { + "type": "boolean" + }, + "user_id": { + "type": "string" + }, + "prop_submitted": { + "type": "boolean" + }, + "prop_submission_tx_hash": { + "type": "string" + }, + "prop_submission_date": { + "type": "string", + "format": "date" + }, + "proposal_withdrawals": { + "type": "array", + "items": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { + "id": { + "type": "number" + }, + "prop_receiving_address": { + "type": "string" + }, + "prop_amount": { + "type": "number", + "format": "float" + } + } + } + }, + "proposal_constitution_content": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", "properties": { - "id": { - "type": "number" + "firstname": { + "type": "string" }, - "attributes": { + "lastname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "resetPasswordToken": { + "type": "string" + }, + "registrationToken": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "roles": { "type": "object", "properties": { - "action": { - "type": "string" - }, - "actionParameters": {}, - "subject": { - "type": "string" - }, - "properties": {}, - "conditions": {}, - "role": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } } } } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { "type": "object", "properties": { - "data": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } + "properties": {} } } - }, - "updatedBy": { + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { "type": "object", "properties": { - "data": { + "id": { + "type": "number" + }, + "attributes": { "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } + "properties": {} } } } @@ -2877,45 +3328,20 @@ } } } - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} } } } @@ -2927,12 +3353,6 @@ } } }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, "createdAt": { "type": "string", "format": "date-time" @@ -2981,6 +3401,31 @@ } } }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, "updatedBy": { "type": "object", "properties": { @@ -3000,72 +3445,95 @@ } } }, - "ProposalSubmitionResponseDataObject": { + "ProposalContentResponseDataObject": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalSubmition" + "$ref": "#/components/schemas/ProposalContent" } } }, - "ProposalSubmitionResponse": { + "ProposalContentResponse": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProposalSubmitionResponseDataObject" + "$ref": "#/components/schemas/ProposalContentResponseDataObject" }, "meta": { "type": "object" } } }, - "ProposalVoteRequest": { + "ProposalProposalLinkComponent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "prop_link": { + "type": "string" + }, + "prop_link_text": { + "type": "string" + } + } + }, + "ProposalProposalWithdrawalsComponent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "prop_receiving_address": { + "type": "string" + }, + "prop_amount": { + "type": "number", + "format": "float" + } + } + }, + "ProposalSubmitionRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { - "required": [ - "proposal_id", - "user_id" - ], "type": "object", "properties": { "proposal_id": { "type": "string" }, - "user_id": { + "sub_json_path": {}, + "sub_location_url": { "type": "string" - }, - "vote_result": { - "type": "boolean" } } } } }, - "ProposalVoteListResponseDataItem": { + "ProposalSubmitionListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalVote" + "$ref": "#/components/schemas/ProposalSubmition" } } }, - "ProposalVoteListResponse": { + "ProposalSubmitionListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProposalVoteListResponseDataItem" + "$ref": "#/components/schemas/ProposalSubmitionListResponseDataItem" } }, "meta": { @@ -3094,22 +3562,16 @@ } } }, - "ProposalVote": { + "ProposalSubmition": { "type": "object", - "required": [ - "proposal_id", - "user_id" - ], "properties": { "proposal_id": { "type": "string" }, - "user_id": { + "sub_json_path": {}, + "sub_location_url": { "type": "string" }, - "vote_result": { - "type": "boolean" - }, "createdAt": { "type": "string", "format": "date-time" @@ -3406,68 +3868,72 @@ } } }, - "ProposalVoteResponseDataObject": { + "ProposalSubmitionResponseDataObject": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalVote" + "$ref": "#/components/schemas/ProposalSubmition" } } }, - "ProposalVoteResponse": { + "ProposalSubmitionResponse": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProposalVoteResponseDataObject" + "$ref": "#/components/schemas/ProposalSubmitionResponseDataObject" }, "meta": { "type": "object" } } }, - "WalletTypeRequest": { + "ProposalVoteRequest": { "type": "object", "required": [ "data" ], "properties": { "data": { + "required": [ + "proposal_id", + "user_id" + ], "type": "object", "properties": { - "wallet_name": { + "proposal_id": { "type": "string" }, - "wallet_image": { + "user_id": { "type": "string" }, - "wallet_active": { + "vote_result": { "type": "boolean" } } } } }, - "WalletTypeListResponseDataItem": { + "ProposalVoteListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/WalletType" + "$ref": "#/components/schemas/ProposalVote" } } }, - "WalletTypeListResponse": { + "ProposalVoteListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/WalletTypeListResponseDataItem" + "$ref": "#/components/schemas/ProposalVoteListResponseDataItem" } }, "meta": { @@ -3496,16 +3962,20 @@ } } }, - "WalletType": { + "ProposalVote": { "type": "object", + "required": [ + "proposal_id", + "user_id" + ], "properties": { - "wallet_name": { + "proposal_id": { "type": "string" }, - "wallet_image": { + "user_id": { "type": "string" }, - "wallet_active": { + "vote_result": { "type": "boolean" }, "createdAt": { @@ -3785,51 +4255,954 @@ } } }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + }, + "ProposalVoteResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/ProposalVote" + } + } + }, + "ProposalVoteResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ProposalVoteResponseDataObject" + }, + "meta": { + "type": "object" + } + } + }, + "WalletTypeRequest": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "type": "object", + "properties": { + "wallet_name": { + "type": "string" + }, + "wallet_image": { + "type": "string" + }, + "wallet_active": { + "type": "boolean" + } + } + } + } + }, + "WalletTypeListResponseDataItem": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/WalletType" + } + } + }, + "WalletTypeListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WalletTypeListResponseDataItem" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer", + "minimum": 25 + }, + "pageCount": { + "type": "integer", + "maximum": 1 + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "WalletType": { + "type": "object", + "properties": { + "wallet_name": { + "type": "string" + }, + "wallet_image": { + "type": "string" + }, + "wallet_active": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "username": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "resetPasswordToken": { + "type": "string" + }, + "registrationToken": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "roles": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "users": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "action": { + "type": "string" + }, + "actionParameters": {}, + "subject": { + "type": "string" + }, + "properties": {}, + "conditions": {}, + "role": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + } + }, + "blocked": { + "type": "boolean" + }, + "preferedLanguage": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + }, + "WalletTypeResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/WalletType" + } + } + }, + "WalletTypeResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/WalletTypeResponseDataObject" + }, + "meta": { + "type": "object" + } + } + } + } + }, + "paths": { + "/comments": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentListResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Comment" + ], + "parameters": [ + { + "name": "sort", + "in": "query", + "description": "Sort by attributes ascending (asc) or descending (desc)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "pagination[withCount]", + "in": "query", + "description": "Return page/pageSize (default: true)", + "deprecated": false, + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "pagination[page]", + "in": "query", + "description": "Page number (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[pageSize]", + "in": "query", + "description": "Page size (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[start]", + "in": "query", + "description": "Offset value (default: 0)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "pagination[limit]", + "in": "query", + "description": "Number of entities to return (default: 25)", + "deprecated": false, + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "fields", + "in": "query", + "description": "Fields to return (ex: title,author)", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "populate", + "in": "query", + "description": "Relations to return", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "filters", + "in": "query", + "description": "Filters to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "object" + }, + "style": "deepObject" + }, + { + "name": "locale", + "in": "query", + "description": "Locale to apply", + "deprecated": false, + "required": false, + "schema": { + "type": "string" + } + } + ], + "operationId": "get/comments" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Comment" + ], + "parameters": [], + "operationId": "post/comments", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentRequest" + } + } + } + } + } + }, + "/comments/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Comment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/comments/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "tags": [ + "Comment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/comments/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentRequest" + } + } + } + } + }, + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" } } } - } - } - }, - "WalletTypeResponseDataObject": { - "type": "object", - "properties": { - "id": { - "type": "number" }, - "attributes": { - "$ref": "#/components/schemas/WalletType" - } - } - }, - "WalletTypeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/WalletTypeResponseDataObject" + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } }, - "meta": { - "type": "object" + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } - } + }, + "tags": [ + "Comment" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/comments/{id}" } - } - }, - "paths": { - "/comments": { + }, + "/governance-action-types": { "get": { "responses": { "200": { @@ -3837,7 +5210,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentListResponse" + "$ref": "#/components/schemas/GovernanceActionTypeListResponse" } } } @@ -3894,7 +5267,7 @@ } }, "tags": [ - "Comment" + "Governance-action-type" ], "parameters": [ { @@ -3999,7 +5372,7 @@ } } ], - "operationId": "get/comments" + "operationId": "get/governance-action-types" }, "post": { "responses": { @@ -4008,7 +5381,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -4065,23 +5438,23 @@ } }, "tags": [ - "Comment" + "Governance-action-type" ], "parameters": [], - "operationId": "post/comments", + "operationId": "post/governance-action-types", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentRequest" + "$ref": "#/components/schemas/GovernanceActionTypeRequest" } } } } } }, - "/comments/{id}": { + "/governance-action-types/{id}": { "get": { "responses": { "200": { @@ -4089,7 +5462,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -4146,7 +5519,7 @@ } }, "tags": [ - "Comment" + "Governance-action-type" ], "parameters": [ { @@ -4160,7 +5533,7 @@ } } ], - "operationId": "get/comments/{id}" + "operationId": "get/governance-action-types/{id}" }, "put": { "responses": { @@ -4169,7 +5542,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -4226,7 +5599,7 @@ } }, "tags": [ - "Comment" + "Governance-action-type" ], "parameters": [ { @@ -4240,13 +5613,13 @@ } } ], - "operationId": "put/comments/{id}", + "operationId": "put/governance-action-types/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentRequest" + "$ref": "#/components/schemas/GovernanceActionTypeRequest" } } } @@ -4317,7 +5690,7 @@ } }, "tags": [ - "Comment" + "Governance-action-type" ], "parameters": [ { @@ -4331,10 +5704,10 @@ } } ], - "operationId": "delete/comments/{id}" + "operationId": "delete/governance-action-types/{id}" } }, - "/governance-action-types": { + "/polls": { "get": { "responses": { "200": { @@ -4342,7 +5715,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeListResponse" + "$ref": "#/components/schemas/PollListResponse" } } } @@ -4399,7 +5772,7 @@ } }, "tags": [ - "Governance-action-type" + "Poll" ], "parameters": [ { @@ -4504,7 +5877,7 @@ } } ], - "operationId": "get/governance-action-types" + "operationId": "get/polls" }, "post": { "responses": { @@ -4513,7 +5886,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -4570,23 +5943,23 @@ } }, "tags": [ - "Governance-action-type" + "Poll" ], "parameters": [], - "operationId": "post/governance-action-types", + "operationId": "post/polls", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeRequest" + "$ref": "#/components/schemas/PollRequest" } } } } } }, - "/governance-action-types/{id}": { + "/polls/{id}": { "get": { "responses": { "200": { @@ -4594,7 +5967,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -4651,7 +6024,7 @@ } }, "tags": [ - "Governance-action-type" + "Poll" ], "parameters": [ { @@ -4665,7 +6038,7 @@ } } ], - "operationId": "get/governance-action-types/{id}" + "operationId": "get/polls/{id}" }, "put": { "responses": { @@ -4674,7 +6047,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -4731,7 +6104,7 @@ } }, "tags": [ - "Governance-action-type" + "Poll" ], "parameters": [ { @@ -4745,13 +6118,13 @@ } } ], - "operationId": "put/governance-action-types/{id}", + "operationId": "put/polls/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeRequest" + "$ref": "#/components/schemas/PollRequest" } } } @@ -4822,7 +6195,7 @@ } }, "tags": [ - "Governance-action-type" + "Poll" ], "parameters": [ { @@ -4836,10 +6209,10 @@ } } ], - "operationId": "delete/governance-action-types/{id}" + "operationId": "delete/polls/{id}" } }, - "/polls": { + "/poll-votes": { "get": { "responses": { "200": { @@ -4847,7 +6220,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollListResponse" + "$ref": "#/components/schemas/PollVoteListResponse" } } } @@ -4904,7 +6277,7 @@ } }, "tags": [ - "Poll" + "Poll-vote" ], "parameters": [ { @@ -5009,7 +6382,7 @@ } } ], - "operationId": "get/polls" + "operationId": "get/poll-votes" }, "post": { "responses": { @@ -5018,7 +6391,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -5075,23 +6448,23 @@ } }, "tags": [ - "Poll" + "Poll-vote" ], "parameters": [], - "operationId": "post/polls", + "operationId": "post/poll-votes", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollRequest" + "$ref": "#/components/schemas/PollVoteRequest" } } } } } }, - "/polls/{id}": { + "/poll-votes/{id}": { "get": { "responses": { "200": { @@ -5099,7 +6472,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -5156,7 +6529,7 @@ } }, "tags": [ - "Poll" + "Poll-vote" ], "parameters": [ { @@ -5170,7 +6543,7 @@ } } ], - "operationId": "get/polls/{id}" + "operationId": "get/poll-votes/{id}" }, "put": { "responses": { @@ -5179,7 +6552,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -5236,7 +6609,7 @@ } }, "tags": [ - "Poll" + "Poll-vote" ], "parameters": [ { @@ -5250,13 +6623,13 @@ } } ], - "operationId": "put/polls/{id}", + "operationId": "put/poll-votes/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollRequest" + "$ref": "#/components/schemas/PollVoteRequest" } } } @@ -5327,7 +6700,7 @@ } }, "tags": [ - "Poll" + "Poll-vote" ], "parameters": [ { @@ -5341,10 +6714,10 @@ } } ], - "operationId": "delete/polls/{id}" + "operationId": "delete/poll-votes/{id}" } }, - "/poll-votes": { + "/proposals": { "get": { "responses": { "200": { @@ -5352,7 +6725,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteListResponse" + "$ref": "#/components/schemas/ProposalListResponse" } } } @@ -5409,7 +6782,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal" ], "parameters": [ { @@ -5514,7 +6887,7 @@ } } ], - "operationId": "get/poll-votes" + "operationId": "get/proposals" }, "post": { "responses": { @@ -5523,7 +6896,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -5580,23 +6953,23 @@ } }, "tags": [ - "Poll-vote" + "Proposal" ], "parameters": [], - "operationId": "post/poll-votes", + "operationId": "post/proposals", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteRequest" + "$ref": "#/components/schemas/ProposalRequest" } } } } } }, - "/poll-votes/{id}": { + "/proposals/{id}": { "get": { "responses": { "200": { @@ -5604,7 +6977,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -5661,7 +7034,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal" ], "parameters": [ { @@ -5675,7 +7048,7 @@ } } ], - "operationId": "get/poll-votes/{id}" + "operationId": "get/proposals/{id}" }, "put": { "responses": { @@ -5684,7 +7057,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -5741,7 +7114,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal" ], "parameters": [ { @@ -5755,13 +7128,13 @@ } } ], - "operationId": "put/poll-votes/{id}", + "operationId": "put/proposals/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteRequest" + "$ref": "#/components/schemas/ProposalRequest" } } } @@ -5832,7 +7205,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal" ], "parameters": [ { @@ -5846,10 +7219,10 @@ } } ], - "operationId": "delete/poll-votes/{id}" + "operationId": "delete/proposals/{id}" } }, - "/proposals": { + "/proposal-constitution-contents": { "get": { "responses": { "200": { @@ -5857,7 +7230,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalListResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentListResponse" } } } @@ -5914,7 +7287,7 @@ } }, "tags": [ - "Proposal" + "Proposal-constitution-content" ], "parameters": [ { @@ -6019,7 +7392,7 @@ } } ], - "operationId": "get/proposals" + "operationId": "get/proposal-constitution-contents" }, "post": { "responses": { @@ -6028,7 +7401,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -6085,23 +7458,23 @@ } }, "tags": [ - "Proposal" + "Proposal-constitution-content" ], "parameters": [], - "operationId": "post/proposals", + "operationId": "post/proposal-constitution-contents", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalRequest" + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" } } } } } }, - "/proposals/{id}": { + "/proposal-constitution-contents/{id}": { "get": { "responses": { "200": { @@ -6109,7 +7482,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -6166,7 +7539,7 @@ } }, "tags": [ - "Proposal" + "Proposal-constitution-content" ], "parameters": [ { @@ -6180,7 +7553,7 @@ } } ], - "operationId": "get/proposals/{id}" + "operationId": "get/proposal-constitution-contents/{id}" }, "put": { "responses": { @@ -6189,7 +7562,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -6246,7 +7619,7 @@ } }, "tags": [ - "Proposal" + "Proposal-constitution-content" ], "parameters": [ { @@ -6260,13 +7633,13 @@ } } ], - "operationId": "put/proposals/{id}", + "operationId": "put/proposal-constitution-contents/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalRequest" + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" } } } @@ -6337,7 +7710,7 @@ } }, "tags": [ - "Proposal" + "Proposal-constitution-content" ], "parameters": [ { @@ -6351,7 +7724,7 @@ } } ], - "operationId": "delete/proposals/{id}" + "operationId": "delete/proposal-constitution-contents/{id}" } }, "/proposal-contents": {