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 c0fde6b..d19a18c 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 @@ -79,6 +79,11 @@ "type": "boolean", "default": false }, + "proposal_hard_fork_content": { + "type": "relation", + "relation": "oneToOne", + "target": "api::proposal-hard-fork-content.proposal-hard-fork-content" + }, "proposal": { "type": "relation", "relation": "manyToOne", diff --git a/backend/src/api/proposal-content/controllers/proposal-content.js b/backend/src/api/proposal-content/controllers/proposal-content.js index e155dc7..f115744 100644 --- a/backend/src/api/proposal-content/controllers/proposal-content.js +++ b/backend/src/api/proposal-content/controllers/proposal-content.js @@ -1,6 +1,5 @@ // @ts-nocheck "use strict"; - /** * proposal-content controller */ @@ -28,6 +27,9 @@ module.exports = createCoreController( if (!sanitizedQueryParams?.populate?.includes("proposal_constitution_content")) { sanitizedQueryParams.populate.push("proposal_constitution_content"); } + if (!sanitizedQueryParams?.populate?.includes("proposal_hard_fork_content")) { + sanitizedQueryParams.populate.push("proposal_hard_fork_content"); + } const { results, pagination } = await strapi .service("api::proposal-content.proposal-content") .find(sanitizedQueryParams); @@ -70,45 +72,72 @@ module.exports = createCoreController( if (!proposalId) { return ctx.badRequest(null, "Proposal ID is required"); } - let proposal_content; + let proposal_hard_fork_content = null; + if(!data.proposal_hard_fork_content.previous_ga_id === false ){ + // Hard Fromk Content + const hardForkContent = await strapi.entityService.create("api::proposal-hard-fork-content.proposal-hard-fork-content", { + data: { + previous_ga_hash: data.proposal_hard_fork_content.previous_ga_hash, + previous_ga_id: data.proposal_hard_fork_content.previous_ga_id, + major: data.proposal_hard_fork_content.major, + minor: data.proposal_hard_fork_content.minor, + } + }); + proposal_hard_fork_content = hardForkContent.id + } try { const proposalContentData = { ...data, - proposal_id: ""+proposalId, + proposal_id: "" + proposalId, gov_action_type_id: data?.gov_action_type_id?.toString(), prop_rev_active: true, user_id: user?.id?.toString(), - }; - // Only create proposal_constitution_content if gov_action_type_id is 3 - let proposalConstitutionContent = null; - if (data?.gov_action_type_id == 3 && data.proposal_constitution_content) { + }; + // Only create proposal_constitution_content if gov_action_type_id is 3 + let proposalConstitutionContent = null; + if ( + data?.gov_action_type_id == 3 && + data.proposal_constitution_content + ) { proposalConstitutionContent = await strapi.entityService.create( - "api::proposal-constitution-content.proposal-constitution-content", - { - data: { - prop_constitution_url: data.proposal_constitution_content.prop_constitution_url, - prop_have_guardrails_script: data.proposal_constitution_content.prop_have_guardrails_script, - ...(data.proposal_constitution_content.prop_have_guardrails_script === true && { - prop_guardrails_script_url: data.proposal_constitution_content.prop_guardrails_script_url, - prop_guardrails_script_hash: data.proposal_constitution_content.prop_guardrails_script_hash, - }), - }, - } + "api::proposal-constitution-content.proposal-constitution-content", + { + data: { + prop_constitution_url: + data.proposal_constitution_content.prop_constitution_url, + prop_have_guardrails_script: + data.proposal_constitution_content + .prop_have_guardrails_script, + ...(data.proposal_constitution_content + .prop_have_guardrails_script === true && { + prop_guardrails_script_url: + data.proposal_constitution_content + .prop_guardrails_script_url, + prop_guardrails_script_hash: + data.proposal_constitution_content + .prop_guardrails_script_hash, + }), + }, + } ); if (!proposalConstitutionContent?.id) { - return ctx.badRequest(null, "Proposal constitution content not created"); + return ctx.badRequest( + null, + "Proposal constitution content not created" + ); } // connect proposal_constitution_content with proposal_content proposalContentData.proposal_constitution_content = { - connect: [proposalConstitutionContent.id], // over ID + connect: [proposalConstitutionContent.id], // over ID }; - } - proposal_content = await strapi.entityService.create( + } + proposalContentData.proposal_hard_fork_content = proposal_hard_fork_content; + const proposal_content = await strapi.entityService.create( "api::proposal-content.proposal-content", { - data: proposalContentData, + data: proposalContentData, } - ); + ); // proposal_content = await strapi.entityService.create( // "api::proposal-content.proposal-content", // { diff --git a/backend/src/api/proposal-hard-fork-content/content-types/proposal-hard-fork-content/schema.json b/backend/src/api/proposal-hard-fork-content/content-types/proposal-hard-fork-content/schema.json new file mode 100644 index 0000000..20c15e9 --- /dev/null +++ b/backend/src/api/proposal-hard-fork-content/content-types/proposal-hard-fork-content/schema.json @@ -0,0 +1,28 @@ +{ + "kind": "collectionType", + "collectionName": "proposal_hard_fork_contents", + "info": { + "singularName": "proposal-hard-fork-content", + "pluralName": "proposal-hard-fork-contents", + "displayName": "Proposal Hard Fork content", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "previous_ga_hash": { + "type": "string" + }, + "previous_ga_id": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + } + } +} diff --git a/backend/src/api/proposal-hard-fork-content/controllers/proposal-hard-fork-content.js b/backend/src/api/proposal-hard-fork-content/controllers/proposal-hard-fork-content.js new file mode 100644 index 0000000..f154eb0 --- /dev/null +++ b/backend/src/api/proposal-hard-fork-content/controllers/proposal-hard-fork-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-hard-fork-content controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::proposal-hard-fork-content.proposal-hard-fork-content'); diff --git a/backend/src/api/proposal-hard-fork-content/documentation/1.0.0/proposal-hard-fork-content.json b/backend/src/api/proposal-hard-fork-content/documentation/1.0.0/proposal-hard-fork-content.json new file mode 100644 index 0000000..92cc06c --- /dev/null +++ b/backend/src/api/proposal-hard-fork-content/documentation/1.0.0/proposal-hard-fork-content.json @@ -0,0 +1,507 @@ +{ + "/proposal-hard-fork-contents": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentListResponse" + } + } + } + }, + "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-hard-fork-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-hard-fork-contents" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentResponse" + } + } + } + }, + "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-hard-fork-content" + ], + "parameters": [], + "operationId": "post/proposal-hard-fork-contents", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentRequest" + } + } + } + } + } + }, + "/proposal-hard-fork-contents/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentResponse" + } + } + } + }, + "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-hard-fork-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/proposal-hard-fork-contents/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentResponse" + } + } + } + }, + "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-hard-fork-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/proposal-hard-fork-contents/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalHardForkContentRequest" + } + } + } + } + }, + "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-hard-fork-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/proposal-hard-fork-contents/{id}" + } + } +} diff --git a/backend/src/api/proposal-hard-fork-content/routes/proposal-hard-fork-content.js b/backend/src/api/proposal-hard-fork-content/routes/proposal-hard-fork-content.js new file mode 100644 index 0000000..c66c3fc --- /dev/null +++ b/backend/src/api/proposal-hard-fork-content/routes/proposal-hard-fork-content.js @@ -0,0 +1,28 @@ +'use strict'; + +/** + * proposal-hard-fork-content router + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::proposal-hard-fork-content.proposal-hard-fork-content', { + config: { + find: { + roles: ["authenticated", "public"], + }, + create: { + roles: ["authenticated"], + }, + findOne: { + roles: ["authenticated", "public"], + }, + update: { + roles: ["authenticated"], + middlewares: ["global::is-owner"], + }, + delete: { + roles: [], + }, + }, +}); diff --git a/backend/src/api/proposal-hard-fork-content/services/proposal-hard-fork-content.js b/backend/src/api/proposal-hard-fork-content/services/proposal-hard-fork-content.js new file mode 100644 index 0000000..caf0df6 --- /dev/null +++ b/backend/src/api/proposal-hard-fork-content/services/proposal-hard-fork-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-hard-fork-content service + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::proposal-hard-fork-content.proposal-hard-fork-content'); diff --git a/backend/src/api/proposal-update-committee-content/content-types/proposal-update-committee-content/schema.json b/backend/src/api/proposal-update-committee-content/content-types/proposal-update-committee-content/schema.json new file mode 100644 index 0000000..a7ab0e4 --- /dev/null +++ b/backend/src/api/proposal-update-committee-content/content-types/proposal-update-committee-content/schema.json @@ -0,0 +1,32 @@ +{ + "kind": "collectionType", + "collectionName": "proposal_update_committee_contents", + "info": { + "singularName": "proposal-update-committee-content", + "pluralName": "proposal-update-committee-contents", + "displayName": "Proposal Update Committee content", + "description": "" + }, + "options": { + "draftAndPublish": false + }, + "pluginOptions": {}, + "attributes": { + "numerator": { + "type": "integer" + }, + "denominator": { + "type": "integer" + }, + "add_members": { + "type": "component", + "repeatable": true, + "component": "proposal.committee-member" + }, + "remove_members": { + "type": "component", + "repeatable": true, + "component": "proposal.committee-member" + } + } +} diff --git a/backend/src/api/proposal-update-committee-content/controllers/proposal-update-committee-content.js b/backend/src/api/proposal-update-committee-content/controllers/proposal-update-committee-content.js new file mode 100644 index 0000000..58d16a1 --- /dev/null +++ b/backend/src/api/proposal-update-committee-content/controllers/proposal-update-committee-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-update-committee-content controller + */ + +const { createCoreController } = require('@strapi/strapi').factories; + +module.exports = createCoreController('api::proposal-update-committee-content.proposal-update-committee-content'); diff --git a/backend/src/api/proposal-update-committee-content/documentation/1.0.0/proposal-update-committee-content.json b/backend/src/api/proposal-update-committee-content/documentation/1.0.0/proposal-update-committee-content.json new file mode 100644 index 0000000..e6e4a56 --- /dev/null +++ b/backend/src/api/proposal-update-committee-content/documentation/1.0.0/proposal-update-committee-content.json @@ -0,0 +1,507 @@ +{ + "/proposal-update-committee-contents": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentListResponse" + } + } + } + }, + "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-update-committee-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-update-committee-contents" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" + } + } + } + }, + "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-update-committee-content" + ], + "parameters": [], + "operationId": "post/proposal-update-committee-contents", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentRequest" + } + } + } + } + } + }, + "/proposal-update-committee-contents/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" + } + } + } + }, + "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-update-committee-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/proposal-update-committee-contents/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" + } + } + } + }, + "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-update-committee-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/proposal-update-committee-contents/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentRequest" + } + } + } + } + }, + "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-update-committee-content" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/proposal-update-committee-contents/{id}" + } + } +} diff --git a/backend/src/api/proposal-update-committee-content/routes/proposal-update-committee-content.js b/backend/src/api/proposal-update-committee-content/routes/proposal-update-committee-content.js new file mode 100644 index 0000000..39ed9d2 --- /dev/null +++ b/backend/src/api/proposal-update-committee-content/routes/proposal-update-committee-content.js @@ -0,0 +1,28 @@ +'use strict'; + +/** + * proposal-update-committee-content router + */ + +const { createCoreRouter } = require('@strapi/strapi').factories; + +module.exports = createCoreRouter('api::proposal-update-committee-content.proposal-update-committee-content', { + config: { + find: { + roles: ["authenticated", "public"], + }, + create: { + roles: ["authenticated"], + }, + findOne: { + roles: ["authenticated", "public"], + }, + update: { + roles: ["authenticated"], + middlewares: ["global::is-owner"], + }, + delete: { + roles: [], + }, + }, +}); diff --git a/backend/src/api/proposal-update-committee-content/services/proposal-update-committee-content.js b/backend/src/api/proposal-update-committee-content/services/proposal-update-committee-content.js new file mode 100644 index 0000000..845bf90 --- /dev/null +++ b/backend/src/api/proposal-update-committee-content/services/proposal-update-committee-content.js @@ -0,0 +1,9 @@ +'use strict'; + +/** + * proposal-update-committee-content service + */ + +const { createCoreService } = require('@strapi/strapi').factories; + +module.exports = createCoreService('api::proposal-update-committee-content.proposal-update-committee-content'); diff --git a/backend/src/api/proposal/controllers/proposal.js b/backend/src/api/proposal/controllers/proposal.js index b0362d6..710166a 100644 --- a/backend/src/api/proposal/controllers/proposal.js +++ b/backend/src/api/proposal/controllers/proposal.js @@ -164,7 +164,7 @@ module.exports = createCoreController( "api::proposal.proposal", proposalContent?.proposal_id ); - + const proposalUser = await strapi .query("plugin::users-permissions.user") .findOne({ where: { id: +proposal?.user_id } }); @@ -190,33 +190,33 @@ module.exports = createCoreController( return ctx.badRequest(null, "Proposal ID is required"); } try { - if(id.length !== 64) { - // const sanitizedQueryParams = await this.sanitizeQuery(ctx); + if (id.length !== 64) { + // const sanitizedQueryParams = await this.sanitizeQuery(ctx); proposal = await strapi.entityService.findOne( - "api::proposal.proposal",id); - } else { - const proposalByHash = await strapi.entityService.findMany( - "api::proposal-content.proposal-content", - { - filters: { - prop_submission_tx_hash: { - $eq: id, + "api::proposal.proposal", + id + ); + } else { + const proposalByHash = await strapi.entityService.findMany( + "api::proposal-content.proposal-content", + { + filters: { + prop_submission_tx_hash: { + $eq: id, + }, }, - }, + } + ); + if (!proposalByHash) { + return ctx.badRequest(null, "Proposal not found"); } - ); - if (!proposalByHash) { - return ctx.badRequest(null, "Proposal not found"); - } - let xid = parseInt(proposalByHash[0].proposal_id, 10); - proposal = await strapi.entityService.findOne( - "api::proposal.proposal", - xid - ); + let xid = parseInt(proposalByHash[0].proposal_id, 10); + proposal = await strapi.entityService.findOne( + "api::proposal.proposal", + xid + ); } - - } - catch (error) { + } catch (error) { return ctx.badRequest(null, "Proposal wit ID or Hash not found"); } if (!proposal) { @@ -232,18 +232,16 @@ module.exports = createCoreController( }, }, }); - if (proposalContent?.data?.length > 0) { - if (proposalContent?.data?.[0]?.attributes?.is_draft) { - return ctx.badRequest( - null, - "You can not access draft proposal details." - ); - } - proposal.content = proposalContent?.data?.[0]; + if(proposalContent?.data?.length > 0) { + proposal.content = proposalContent?.data?.[0]; + if (proposalContent?.data?.length > 0) { + if (proposalContent?.data?.[0]?.attributes?.is_draft) { + return ctx.badRequest(null,"You can not access draft proposal details."); + } + } } else { proposal.content = null; } - const proposalUser = await strapi .query("plugin::users-permissions.user") .findOne({ where: { id: +proposal?.user_id } }); @@ -253,7 +251,6 @@ module.exports = createCoreController( } else { proposal.user_govtool_username = "Anonymous"; } - return this.transformResponse(proposal); }, async create(ctx) { @@ -263,7 +260,6 @@ module.exports = createCoreController( if (!user) { return ctx.badRequest(null, "User is required"); } - let proposal; let proposal_content; // Delete the Prposal @@ -408,6 +404,37 @@ module.exports = createCoreController( console.error("Error creating proposal:", error); return ctx.badRequest(null, "Proposal not created"); } + let proposalHardForkContent = null; + //only create proposal hard fork content if gov_action_type_id is 6 and proposal_hard_fork_content exists + if (gov_action_type_id == 6 && !!data?.proposal_hard_fork_content) { + try { + proposalHardForkContent = await strapi.entityService.create( + "api::proposal-hard-fork-content.proposal-hard-fork-content", + { + data: { + previous_ga_hash: + data?.proposal_hard_fork_content?.previous_ga_hash, + previous_ga_id: String( + data?.proposal_hard_fork_content?.previous_ga_id + ), + major: data?.proposal_hard_fork_content?.major, + minor: data?.proposal_hard_fork_content?.minor + }, + } + ); + } catch (error) { + console.error( + "Error creating proposal hard fork content:", + error + ); + } + if (!proposalHardForkContent?.id) { + return ctx.badRequest( + null, + "Proposal hard fork content not created" + ); + } + } try { const proposalContentData = { ...data, @@ -416,6 +443,7 @@ module.exports = createCoreController( prop_rev_active: true, user_id: user?.id?.toString(), proposal: proposal?.id, + proposal_hard_fork_content: proposalHardForkContent?.id, }; // Only create proposal_constitution_content if gov_action_type_id is 3 let proposalConstitutionContent = null; @@ -458,6 +486,7 @@ module.exports = createCoreController( data: proposalContentData, } ); + } catch (error) { console.error("Error creating proposal content:", error); // Delete the Proposal because the Proposal content was not created diff --git a/backend/src/api/proxy/controllers/proxy.js b/backend/src/api/proxy/controllers/proxy.js new file mode 100644 index 0000000..cf7da45 --- /dev/null +++ b/backend/src/api/proxy/controllers/proxy.js @@ -0,0 +1,77 @@ +"use strict"; +const axios = require("axios"); + +module.exports = { + // POST /proxy + async forward(ctx) { + try { + const { + url, + method = "GET", + data = {}, + params = {}, + headers = {}, + } = ctx.request.body; + const response = await axios({ url, method, data, params, headers }); + ctx.send({ status: response.status, data: response.data }); + } catch (error) { + strapi.log.error("Proxy error:", error); + ctx.status = error.response?.status || 500; + ctx.body = { + error: error.message, + details: error.response?.data || null, + }; + } + }, + + // GET /proxy/govtool/:endpoint* + async getGovtoolData(ctx) { + try { + const endpoint = ctx.params.endpoint; + if (!endpoint) return ctx.badRequest("Endpoint is required"); + const baseUrl = process.env.GOVTOOL_API_BASE_URL; + const fullUrl = `${baseUrl.replace(/\/$/, "")}/${endpoint}`; + const response = await axios.get(fullUrl, { + params: ctx.query, + headers: { + // Authorization: `Bearer ${process.env.GOVTOOL_API_TOKEN}`, + }, + }); + + ctx.send({ status: response.status, data: response.data }); + } catch (error) { + strapi.log.error("GovTool GET error:", error); + ctx.status = error.response?.status || 500; + ctx.body = { + error: error.message, + details: error.response?.data || null, + }; + } + }, + + async postGovtoolData(ctx) { + try { + const endpoint = ctx.params.endpoint; + if (!endpoint) return ctx.badRequest("Endpoint is required"); + + const baseUrl = process.env.GOVTOOL_API_BASE_URL; + const fullUrl = `${baseUrl.replace(/\/$/, "")}/${endpoint}`; + + const response = await axios.post(fullUrl, ctx.request.body, { + headers: { + "Content-Type": "application/json", + // Authorization: `Bearer ${process.env.GOVTOOL_API_TOKEN}`, + }, + }); + + ctx.send({ status: response.status, data: response.data }); + } catch (error) { + strapi.log.error("GovTool POST error:", error); + ctx.status = error.response?.status || 500; + ctx.body = { + error: error.message, + details: error.response?.data || null, + }; + } + }, +}; diff --git a/backend/src/api/proxy/documentation/1.0.0/proxy.json b/backend/src/api/proxy/documentation/1.0.0/proxy.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/backend/src/api/proxy/documentation/1.0.0/proxy.json @@ -0,0 +1 @@ +{} diff --git a/backend/src/api/proxy/routes/proxy.js b/backend/src/api/proxy/routes/proxy.js new file mode 100644 index 0000000..adc9570 --- /dev/null +++ b/backend/src/api/proxy/routes/proxy.js @@ -0,0 +1,33 @@ +'use strict'; + +module.exports = { + routes: [ + { + method: 'POST', + path: '/proxy', + handler: 'proxy.forward', + config: { + roles: ['authenticated', 'public'], + auth: false + }, + }, + { + method: 'GET', + path: '/proxy/govtool/:endpoint*', + handler: 'proxy.getGovtoolData', + config: { + roles: ['authenticated', 'public'], + auth: false + }, + }, + { + method: 'POST', + path: '/proxy/govtool/:endpoint*', + handler: 'proxy.postGovtoolData', + config: { + roles: ['authenticated', 'public'], + auth: false + }, + }, + ], +}; diff --git a/backend/src/components/proposal/committee-member.json b/backend/src/components/proposal/committee-member.json new file mode 100644 index 0000000..9cbbaff --- /dev/null +++ b/backend/src/components/proposal/committee-member.json @@ -0,0 +1,16 @@ +{ + "collectionName": "components_proposal_committee_members", + "info": { + "displayName": "Committee_member", + "description": "" + }, + "options": {}, + "attributes": { + "address_hash": { + "type": "string" + }, + "epoch": { + "type": "integer" + } + } +} 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 3aaa86f..64c1c2e 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,10 +13,12 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2025-04-30T09:53:57.423Z" + "x-generation-date": "2025-05-30T11:01:02.957Z" }, "x-strapi-config": { - "plugins": [], + "plugins": [ + "users-permissions" + ], "path": "/documentation" }, "openapi": "3.0.0", @@ -625,6 +627,10 @@ }, "master_id": { "type": "string" + }, + "submitted_for_vote": { + "type": "string", + "format": "date-time" } } } @@ -2495,6 +2501,10 @@ "master_id": { "type": "string" }, + "submitted_for_vote": { + "type": "string", + "format": "date-time" + }, "createdAt": { "type": "string", "format": "date-time" @@ -2555,6 +2565,10 @@ "master_id": { "type": "string" }, + "submitted_for_vote": { + "type": "string", + "format": "date-time" + }, "createdAt": { "type": "string", "format": "date-time" @@ -12830,6 +12844,20 @@ }, "user_id": { "type": "string" + }, + "proposal_contents": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + } } } } @@ -12899,54 +12927,96 @@ "user_id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - }, - "createdBy": { + "proposal_contents": { "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": "array", + "items": { + "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": { + "id": { + "type": "number" + }, + "prop_link": { + "type": "string" + }, + "prop_link_text": { + "type": "string" + } + } + } + }, + "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": { + "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": { @@ -12955,119 +13025,30 @@ "attributes": { "type": "object", "properties": { - "name": { + "prop_constitution_url": { "type": "string" }, - "code": { - "type": "string" + "prop_have_guardrails_script": { + "type": "boolean" }, - "description": { + "prop_guardrails_script_url": { "type": "string" }, - "users": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } + "prop_guardrails_script_hash": { + "type": "string" }, - "permissions": { + "proposal_content": { "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": {} - } - } - } - } - } - } - } + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} } } } @@ -13092,113 +13073,568 @@ }, "attributes": { "type": "object", - "properties": {} - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} + "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": {} + } + } + } + } + } + } + } } } } - } - }, - "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": {} + }, + "is_locked": { + "type": "boolean" + }, + "proposal_hard_fork_content": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "previous_ga_hash": { + "type": "string" + }, + "previous_ga_id": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + }, + "proposal_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": {} + } + } + } + } + }, + "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": {} + }, + "proposal": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "prop_likes": { + "type": "integer" + }, + "prop_dislikes": { + "type": "integer" + }, + "prop_comments_number": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "proposal_contents": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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": {} + } + } + } + } + } + } + } } } } - } - } - } - } - } - } - } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "attributes": { - "type": "object", - "properties": {} - } - } - } - } - } - } - }, - "ProposalResponseDataObject": { - "type": "object", - "properties": { - "id": { + }, + "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": {} + } + } + } + } + } + } + }, + "ProposalResponseDataObject": { + "type": "object", + "properties": { + "id": { "type": "number" }, "attributes": { @@ -13739,15 +14175,10 @@ } } }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" + "is_locked": { + "type": "boolean" }, - "createdBy": { + "proposal_hard_fork_content": { "type": "object", "properties": { "data": { @@ -13758,13 +14189,85 @@ }, "attributes": { "type": "object", - "properties": {} + "properties": { + "previous_ga_hash": { + "type": "string" + }, + "previous_ga_id": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + }, + "proposal_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": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } } } } } }, - "updatedBy": { + "proposal": { "type": "object", "properties": { "data": { @@ -13775,19 +14278,136 @@ }, "attributes": { "type": "object", - "properties": {} + "properties": { + "prop_likes": { + "type": "integer" + }, + "prop_dislikes": { + "type": "integer" + }, + "prop_comments_number": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "proposal_contents": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "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": { + }, + "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" }, @@ -13925,6 +14545,31 @@ } ], "example": "string or id" + }, + "is_locked": { + "type": "boolean" + }, + "proposal_hard_fork_content": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" + }, + "proposal": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" } } } @@ -14157,15 +14802,10 @@ } } }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" + "is_locked": { + "type": "boolean" }, - "createdBy": { + "proposal_hard_fork_content": { "type": "object", "properties": { "data": { @@ -14177,123 +14817,106 @@ "attributes": { "type": "object", "properties": { - "firstname": { + "previous_ga_hash": { "type": "string" }, - "lastname": { + "previous_ga_id": { "type": "string" }, - "username": { + "major": { "type": "string" }, - "email": { - "type": "string", - "format": "email" - }, - "resetPasswordToken": { + "minor": { "type": "string" }, - "registrationToken": { - "type": "string" + "proposal_content": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } }, - "isActive": { - "type": "boolean" + "createdAt": { + "type": "string", + "format": "date-time" }, - "roles": { + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { "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": { + "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": { @@ -14306,11 +14929,14 @@ } } } - }, - "updatedBy": { - "type": "object", - "properties": { - "data": { + } + }, + "permissions": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -14318,57 +14944,174 @@ }, "attributes": { "type": "object", - "properties": {} - } - } - } - } - } - } - } - } + "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": { - "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": {} } } } @@ -14380,12 +15123,73 @@ } } }, - "blocked": { - "type": "boolean" + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "proposal": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "prop_likes": { + "type": "integer" }, - "preferedLanguage": { + "prop_dislikes": { + "type": "integer" + }, + "prop_comments_number": { + "type": "integer" + }, + "user_id": { "type": "string" }, + "proposal_contents": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + }, "createdAt": { "type": "string", "format": "date-time" @@ -14434,6 +15238,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": { @@ -14505,15 +15334,10 @@ } } }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" + "is_locked": { + "type": "boolean" }, - "createdBy": { + "proposal_hard_fork_content": { "type": "object", "properties": { "data": { @@ -14530,7 +15354,7 @@ } } }, - "updatedBy": { + "proposal": { "type": "object", "properties": { "data": { @@ -14546,22 +15370,64 @@ } } } - } - } - }, - "ProposalContentResponseDataObject": { - "type": "object", - "properties": { - "id": { - "type": "number" }, - "attributes": { - "$ref": "#/components/schemas/ProposalContent" - } - } - }, - "ProposalContentResponse": { - "type": "object", + "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": {} + } + } + } + } + } + } + }, + "ProposalContentResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/ProposalContent" + } + } + }, + "ProposalContentResponse": { + "type": "object", "properties": { "data": { "$ref": "#/components/schemas/ProposalContentResponseDataObject" @@ -14600,7 +15466,7 @@ } } }, - "ProposalSubmitionRequest": { + "ProposalHardForkContentRequest": { "type": "object", "required": [ "data" @@ -14609,35 +15475,51 @@ "data": { "type": "object", "properties": { - "proposal_id": { + "previous_ga_hash": { "type": "string" }, - "sub_json_path": {}, - "sub_location_url": { + "previous_ga_id": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { "type": "string" + }, + "proposal_content": { + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "example": "string or id" } } } } }, - "ProposalSubmitionListResponseDataItem": { + "ProposalHardForkContentListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/ProposalSubmition" + "$ref": "#/components/schemas/ProposalHardForkContent" } } }, - "ProposalSubmitionListResponse": { + "ProposalHardForkContentListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ProposalSubmitionListResponseDataItem" + "$ref": "#/components/schemas/ProposalHardForkContentListResponseDataItem" } }, "meta": { @@ -14666,25 +15548,22 @@ } } }, - "ProposalSubmition": { + "ProposalHardForkContent": { "type": "object", "properties": { - "proposal_id": { + "previous_ga_hash": { "type": "string" }, - "sub_json_path": {}, - "sub_location_url": { + "previous_ga_id": { "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time" + "major": { + "type": "string" }, - "updatedAt": { - "type": "string", - "format": "date-time" + "minor": { + "type": "string" }, - "createdBy": { + "proposal_content": { "type": "object", "properties": { "data": { @@ -14696,150 +15575,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": {} } } } @@ -14849,36 +15963,153 @@ } } } - }, - "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": { + } + } + } + } + } + } + } + }, + "is_locked": { + "type": "boolean" + }, + "proposal_hard_fork_content": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "previous_ga_hash": { + "type": "string" + }, + "previous_ga_id": { + "type": "string" + }, + "major": { + "type": "string" + }, + "minor": { + "type": "string" + }, + "proposal_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": {} + } + } + } + } + }, + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } + } + } + } + } + } + } + }, + "proposal": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": { + "prop_likes": { + "type": "integer" + }, + "prop_dislikes": { + "type": "integer" + }, + "prop_comments_number": { + "type": "integer" + }, + "user_id": { + "type": "string" + }, + "proposal_contents": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -14892,6 +16123,48 @@ } } } + }, + "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": {} + } + } + } + } } } } @@ -14899,12 +16172,6 @@ } } }, - "blocked": { - "type": "boolean" - }, - "preferedLanguage": { - "type": "string" - }, "createdAt": { "type": "string", "format": "date-time" @@ -14953,7 +16220,15 @@ } } }, - "updatedBy": { + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "createdBy": { "type": "object", "properties": { "data": { @@ -14969,75 +16244,86 @@ } } } - } - } - }, - "ProposalSubmitionResponseDataObject": { - "type": "object", - "properties": { - "id": { - "type": "number" }, - "attributes": { - "$ref": "#/components/schemas/ProposalSubmition" + "updatedBy": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "type": "object", + "properties": {} + } + } + } + } } } }, - "ProposalSubmitionResponse": { + "ProposalHardForkContentResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/ProposalHardForkContent" + } + } + }, + "ProposalHardForkContentResponse": { "type": "object", "properties": { "data": { - "$ref": "#/components/schemas/ProposalSubmitionResponseDataObject" + "$ref": "#/components/schemas/ProposalHardForkContentResponseDataObject" }, "meta": { "type": "object" } } }, - "ProposalVoteRequest": { + "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": { @@ -15066,22 +16352,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" @@ -15378,29 +16658,29 @@ } } }, - "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": { + "ProposalUpdateCommitteeContentRequest": { "type": "object", "required": [ "data" @@ -15409,37 +16689,46 @@ "data": { "type": "object", "properties": { - "wallet_name": { - "type": "string" + "numerator": { + "type": "integer" }, - "wallet_image": { - "type": "string" + "denominator": { + "type": "integer" }, - "wallet_active": { - "type": "boolean" + "add_members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalCommitteeMemberComponent" + } + }, + "remove_members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalCommitteeMemberComponent" + } } } } } }, - "WalletTypeListResponseDataItem": { + "ProposalUpdateCommitteeContentListResponseDataItem": { "type": "object", "properties": { "id": { "type": "number" }, "attributes": { - "$ref": "#/components/schemas/WalletType" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContent" } } }, - "WalletTypeListResponse": { + "ProposalUpdateCommitteeContentListResponse": { "type": "object", "properties": { "data": { "type": "array", "items": { - "$ref": "#/components/schemas/WalletTypeListResponseDataItem" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentListResponseDataItem" } }, "meta": { @@ -15468,17 +16757,26 @@ } } }, - "WalletType": { + "ProposalUpdateCommitteeContent": { "type": "object", "properties": { - "wallet_name": { - "type": "string" + "numerator": { + "type": "integer" }, - "wallet_image": { - "type": "string" + "denominator": { + "type": "integer" }, - "wallet_active": { - "type": "boolean" + "add_members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalCommitteeMemberComponent" + } + }, + "remove_members": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalCommitteeMemberComponent" + } }, "createdAt": { "type": "string", @@ -15757,51 +17055,3034 @@ } } }, - "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": {} + } + } + } + } + } + } + }, + "ProposalUpdateCommitteeContentResponseDataObject": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContent" + } + } + }, + "ProposalUpdateCommitteeContentResponse": { + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponseDataObject" + }, + "meta": { + "type": "object" + } + } + }, + "ProposalCommitteeMemberComponent": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "address_hash": { + "type": "string" + }, + "epoch": { + "type": "integer" + } + } + }, + "ProposalVoteRequest": { + "type": "object", + "required": [ + "data" + ], + "properties": { + "data": { + "required": [ + "proposal_id", + "user_id" + ], + "type": "object", + "properties": { + "proposal_id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "vote_result": { + "type": "boolean" + } + } + } + } + }, + "ProposalVoteListResponseDataItem": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "attributes": { + "$ref": "#/components/schemas/ProposalVote" + } + } + }, + "ProposalVoteListResponse": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ProposalVoteListResponseDataItem" + } + }, + "meta": { + "type": "object", + "properties": { + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "pageSize": { + "type": "integer", + "minimum": 25 + }, + "pageCount": { + "type": "integer", + "maximum": 1 + }, + "total": { + "type": "integer" + } + } + } + } + } + } + }, + "ProposalVote": { + "type": "object", + "required": [ + "proposal_id", + "user_id" + ], + "properties": { + "proposal_id": { + "type": "string" + }, + "user_id": { + "type": "string" + }, + "vote_result": { + "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": {} + } + } + } + } + } + } + }, + "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" + } + } + }, + "Users-Permissions-Role": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + } + } + }, + "Users-Permissions-User": { + "type": "object", + "properties": { + "id": { + "type": "number", + "example": 1 + }, + "username": { + "type": "string", + "example": "foo.bar" + }, + "email": { + "type": "string", + "example": "foo.bar@strapi.io" + }, + "provider": { + "type": "string", + "example": "local" + }, + "confirmed": { + "type": "boolean", + "example": true + }, + "blocked": { + "type": "boolean", + "example": false + }, + "createdAt": { + "type": "string", + "format": "date-time", + "example": "2022-06-02T08:32:06.258Z" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "example": "2022-06-02T08:32:06.267Z" + } + } + }, + "Users-Permissions-UserRegistration": { + "type": "object", + "properties": { + "jwt": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" + }, + "user": { + "$ref": "#/components/schemas/Users-Permissions-User" + } + } + }, + "Users-Permissions-PermissionsTree": { + "type": "object", + "additionalProperties": { + "type": "object", + "description": "every api", + "properties": { + "controllers": { + "description": "every controller of the api", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "description": "every action of every controller", + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "policy": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "requestBodies": { + "Users-Permissions-RoleRequest": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + }, + "permissions": { + "$ref": "#/components/schemas/Users-Permissions-PermissionsTree" + } + } + }, + "example": { + "name": "foo", + "description": "role foo", + "permissions": { + "api::content-type.content-type": { + "controllers": { + "controllerA": { + "find": { + "enabled": true + } + } + } + } + } + } + } + } + } + } + }, + "paths": { + "/auth-challenges": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeListResponse" + } + } + } + }, + "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": [ + "Auth-challenge" + ], + "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/auth-challenges" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeResponse" + } + } + } + }, + "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": [ + "Auth-challenge" + ], + "parameters": [], + "operationId": "post/auth-challenges", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeRequest" + } + } + } + } + } + }, + "/auth-challenges/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeResponse" + } + } + } + }, + "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": [ + "Auth-challenge" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/auth-challenges/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeResponse" + } + } + } + }, + "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": [ + "Auth-challenge" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/auth-challenges/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthChallengeRequest" + } + } + } + } + }, + "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": [ + "Auth-challenge" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/auth-challenges/{id}" + } + }, + "/bds": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdListResponse" + } + } + } + }, + "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": [ + "Bd" + ], + "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/bds" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdResponse" + } + } + } + }, + "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": [ + "Bd" + ], + "parameters": [], + "operationId": "post/bds", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdRequest" + } + } + } + } + } + }, + "/bds/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdResponse" + } + } + } + }, + "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": [ + "Bd" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/bds/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdResponse" + } + } + } + }, + "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": [ + "Bd" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/bds/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdRequest" + } + } + } + } + }, + "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": [ + "Bd" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/bds/{id}" + } + }, + "/bd-contact-informations": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationListResponse" + } + } + } + }, + "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": [ + "Bd-contact-information" + ], + "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/bd-contact-informations" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationResponse" + } + } + } + }, + "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": [ + "Bd-contact-information" + ], + "parameters": [], + "operationId": "post/bd-contact-informations", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationRequest" + } + } + } + } + } + }, + "/bd-contact-informations/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationResponse" + } + } + } + }, + "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": [ + "Bd-contact-information" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/bd-contact-informations/{id}" + }, + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationResponse" + } + } + } + }, + "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": [ + "Bd-contact-information" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/bd-contact-informations/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContactInformationRequest" + } + } + } + } + }, + "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": [ + "Bd-contact-information" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/bd-contact-informations/{id}" + } + }, + "/bd-contract-types": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeListResponse" + } + } + } + }, + "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": [ + "Bd-contract-type" + ], + "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/bd-contract-types" + }, + "post": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeResponse" + } + } + } + }, + "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": [ + "Bd-contract-type" + ], + "parameters": [], + "operationId": "post/bd-contract-types", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeRequest" + } + } + } + } + } + }, + "/bd-contract-types/{id}": { + "get": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeResponse" + } + } + } + }, + "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": [ + "Bd-contract-type" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "get/bd-contract-types/{id}" }, - "WalletTypeResponseDataObject": { - "type": "object", - "properties": { - "id": { - "type": "number" + "put": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeResponse" + } + } + } }, - "attributes": { - "$ref": "#/components/schemas/WalletType" + "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": [ + "Bd-contract-type" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "put/bd-contract-types/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BdContractTypeRequest" + } + } } } }, - "WalletTypeResponse": { - "type": "object", - "properties": { - "data": { - "$ref": "#/components/schemas/WalletTypeResponseDataObject" + "delete": { + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } }, - "meta": { - "type": "object" + "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": [ + "Bd-contract-type" + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" + } + } + ], + "operationId": "delete/bd-contract-types/{id}" } - } - }, - "paths": { - "/auth-challenges": { + }, + "/bd-costings": { "get": { "responses": { "200": { @@ -15809,7 +20090,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeListResponse" + "$ref": "#/components/schemas/BdCostingListResponse" } } } @@ -15866,7 +20147,7 @@ } }, "tags": [ - "Auth-challenge" + "Bd-costing" ], "parameters": [ { @@ -15971,7 +20252,7 @@ } } ], - "operationId": "get/auth-challenges" + "operationId": "get/bd-costings" }, "post": { "responses": { @@ -15980,7 +20261,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeResponse" + "$ref": "#/components/schemas/BdCostingResponse" } } } @@ -16037,23 +20318,23 @@ } }, "tags": [ - "Auth-challenge" + "Bd-costing" ], "parameters": [], - "operationId": "post/auth-challenges", + "operationId": "post/bd-costings", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeRequest" + "$ref": "#/components/schemas/BdCostingRequest" } } } } } }, - "/auth-challenges/{id}": { + "/bd-costings/{id}": { "get": { "responses": { "200": { @@ -16061,7 +20342,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeResponse" + "$ref": "#/components/schemas/BdCostingResponse" } } } @@ -16118,7 +20399,7 @@ } }, "tags": [ - "Auth-challenge" + "Bd-costing" ], "parameters": [ { @@ -16132,7 +20413,7 @@ } } ], - "operationId": "get/auth-challenges/{id}" + "operationId": "get/bd-costings/{id}" }, "put": { "responses": { @@ -16141,7 +20422,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeResponse" + "$ref": "#/components/schemas/BdCostingResponse" } } } @@ -16198,7 +20479,7 @@ } }, "tags": [ - "Auth-challenge" + "Bd-costing" ], "parameters": [ { @@ -16212,13 +20493,13 @@ } } ], - "operationId": "put/auth-challenges/{id}", + "operationId": "put/bd-costings/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AuthChallengeRequest" + "$ref": "#/components/schemas/BdCostingRequest" } } } @@ -16289,7 +20570,7 @@ } }, "tags": [ - "Auth-challenge" + "Bd-costing" ], "parameters": [ { @@ -16303,10 +20584,10 @@ } } ], - "operationId": "delete/auth-challenges/{id}" + "operationId": "delete/bd-costings/{id}" } }, - "/bds": { + "/bd-currency-lists": { "get": { "responses": { "200": { @@ -16314,7 +20595,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdListResponse" + "$ref": "#/components/schemas/BdCurrencyListListResponse" } } } @@ -16371,7 +20652,7 @@ } }, "tags": [ - "Bd" + "Bd-currency-list" ], "parameters": [ { @@ -16476,7 +20757,7 @@ } } ], - "operationId": "get/bds" + "operationId": "get/bd-currency-lists" }, "post": { "responses": { @@ -16485,7 +20766,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdResponse" + "$ref": "#/components/schemas/BdCurrencyListResponse" } } } @@ -16542,23 +20823,23 @@ } }, "tags": [ - "Bd" + "Bd-currency-list" ], "parameters": [], - "operationId": "post/bds", + "operationId": "post/bd-currency-lists", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRequest" + "$ref": "#/components/schemas/BdCurrencyListRequest" } } } } } }, - "/bds/{id}": { + "/bd-currency-lists/{id}": { "get": { "responses": { "200": { @@ -16566,7 +20847,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdResponse" + "$ref": "#/components/schemas/BdCurrencyListResponse" } } } @@ -16623,7 +20904,7 @@ } }, "tags": [ - "Bd" + "Bd-currency-list" ], "parameters": [ { @@ -16637,7 +20918,7 @@ } } ], - "operationId": "get/bds/{id}" + "operationId": "get/bd-currency-lists/{id}" }, "put": { "responses": { @@ -16646,7 +20927,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdResponse" + "$ref": "#/components/schemas/BdCurrencyListResponse" } } } @@ -16703,7 +20984,7 @@ } }, "tags": [ - "Bd" + "Bd-currency-list" ], "parameters": [ { @@ -16717,13 +20998,13 @@ } } ], - "operationId": "put/bds/{id}", + "operationId": "put/bd-currency-lists/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRequest" + "$ref": "#/components/schemas/BdCurrencyListRequest" } } } @@ -16794,7 +21075,7 @@ } }, "tags": [ - "Bd" + "Bd-currency-list" ], "parameters": [ { @@ -16808,10 +21089,10 @@ } } ], - "operationId": "delete/bds/{id}" + "operationId": "delete/bd-currency-lists/{id}" } }, - "/bd-contact-informations": { + "/bd-drafts": { "get": { "responses": { "200": { @@ -16819,7 +21100,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationListResponse" + "$ref": "#/components/schemas/BdDraftListResponse" } } } @@ -16876,7 +21157,7 @@ } }, "tags": [ - "Bd-contact-information" + "Bd-draft" ], "parameters": [ { @@ -16981,7 +21262,7 @@ } } ], - "operationId": "get/bd-contact-informations" + "operationId": "get/bd-drafts" }, "post": { "responses": { @@ -16990,7 +21271,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationResponse" + "$ref": "#/components/schemas/BdDraftResponse" } } } @@ -17047,23 +21328,23 @@ } }, "tags": [ - "Bd-contact-information" + "Bd-draft" ], "parameters": [], - "operationId": "post/bd-contact-informations", + "operationId": "post/bd-drafts", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationRequest" + "$ref": "#/components/schemas/BdDraftRequest" } } } } } }, - "/bd-contact-informations/{id}": { + "/bd-drafts/{id}": { "get": { "responses": { "200": { @@ -17071,7 +21352,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationResponse" + "$ref": "#/components/schemas/BdDraftResponse" } } } @@ -17128,7 +21409,7 @@ } }, "tags": [ - "Bd-contact-information" + "Bd-draft" ], "parameters": [ { @@ -17142,7 +21423,7 @@ } } ], - "operationId": "get/bd-contact-informations/{id}" + "operationId": "get/bd-drafts/{id}" }, "put": { "responses": { @@ -17151,7 +21432,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationResponse" + "$ref": "#/components/schemas/BdDraftResponse" } } } @@ -17208,7 +21489,7 @@ } }, "tags": [ - "Bd-contact-information" + "Bd-draft" ], "parameters": [ { @@ -17222,13 +21503,13 @@ } } ], - "operationId": "put/bd-contact-informations/{id}", + "operationId": "put/bd-drafts/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContactInformationRequest" + "$ref": "#/components/schemas/BdDraftRequest" } } } @@ -17299,7 +21580,7 @@ } }, "tags": [ - "Bd-contact-information" + "Bd-draft" ], "parameters": [ { @@ -17313,10 +21594,10 @@ } } ], - "operationId": "delete/bd-contact-informations/{id}" + "operationId": "delete/bd-drafts/{id}" } }, - "/bd-contract-types": { + "/bd-further-informations": { "get": { "responses": { "200": { @@ -17324,7 +21605,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeListResponse" + "$ref": "#/components/schemas/BdFurtherInformationListResponse" } } } @@ -17381,7 +21662,7 @@ } }, "tags": [ - "Bd-contract-type" + "Bd-further-information" ], "parameters": [ { @@ -17486,7 +21767,7 @@ } } ], - "operationId": "get/bd-contract-types" + "operationId": "get/bd-further-informations" }, "post": { "responses": { @@ -17495,7 +21776,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeResponse" + "$ref": "#/components/schemas/BdFurtherInformationResponse" } } } @@ -17552,23 +21833,23 @@ } }, "tags": [ - "Bd-contract-type" + "Bd-further-information" ], "parameters": [], - "operationId": "post/bd-contract-types", + "operationId": "post/bd-further-informations", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeRequest" + "$ref": "#/components/schemas/BdFurtherInformationRequest" } } } } } }, - "/bd-contract-types/{id}": { + "/bd-further-informations/{id}": { "get": { "responses": { "200": { @@ -17576,7 +21857,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeResponse" + "$ref": "#/components/schemas/BdFurtherInformationResponse" } } } @@ -17633,7 +21914,7 @@ } }, "tags": [ - "Bd-contract-type" + "Bd-further-information" ], "parameters": [ { @@ -17647,7 +21928,7 @@ } } ], - "operationId": "get/bd-contract-types/{id}" + "operationId": "get/bd-further-informations/{id}" }, "put": { "responses": { @@ -17656,7 +21937,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeResponse" + "$ref": "#/components/schemas/BdFurtherInformationResponse" } } } @@ -17713,7 +21994,7 @@ } }, "tags": [ - "Bd-contract-type" + "Bd-further-information" ], "parameters": [ { @@ -17727,13 +22008,13 @@ } } ], - "operationId": "put/bd-contract-types/{id}", + "operationId": "put/bd-further-informations/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdContractTypeRequest" + "$ref": "#/components/schemas/BdFurtherInformationRequest" } } } @@ -17804,7 +22085,7 @@ } }, "tags": [ - "Bd-contract-type" + "Bd-further-information" ], "parameters": [ { @@ -17818,10 +22099,10 @@ } } ], - "operationId": "delete/bd-contract-types/{id}" + "operationId": "delete/bd-further-informations/{id}" } }, - "/bd-costings": { + "/bd-intersect-committees": { "get": { "responses": { "200": { @@ -17829,7 +22110,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingListResponse" + "$ref": "#/components/schemas/BdIntersectCommitteeListResponse" } } } @@ -17886,7 +22167,7 @@ } }, "tags": [ - "Bd-costing" + "Bd-intersect-committee" ], "parameters": [ { @@ -17991,7 +22272,7 @@ } } ], - "operationId": "get/bd-costings" + "operationId": "get/bd-intersect-committees" }, "post": { "responses": { @@ -18000,7 +22281,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingResponse" + "$ref": "#/components/schemas/BdIntersectCommitteeResponse" } } } @@ -18057,23 +22338,23 @@ } }, "tags": [ - "Bd-costing" + "Bd-intersect-committee" ], "parameters": [], - "operationId": "post/bd-costings", + "operationId": "post/bd-intersect-committees", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingRequest" + "$ref": "#/components/schemas/BdIntersectCommitteeRequest" } } } } } }, - "/bd-costings/{id}": { + "/bd-intersect-committees/{id}": { "get": { "responses": { "200": { @@ -18081,7 +22362,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingResponse" + "$ref": "#/components/schemas/BdIntersectCommitteeResponse" } } } @@ -18138,7 +22419,7 @@ } }, "tags": [ - "Bd-costing" + "Bd-intersect-committee" ], "parameters": [ { @@ -18152,7 +22433,7 @@ } } ], - "operationId": "get/bd-costings/{id}" + "operationId": "get/bd-intersect-committees/{id}" }, "put": { "responses": { @@ -18161,7 +22442,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingResponse" + "$ref": "#/components/schemas/BdIntersectCommitteeResponse" } } } @@ -18218,7 +22499,7 @@ } }, "tags": [ - "Bd-costing" + "Bd-intersect-committee" ], "parameters": [ { @@ -18232,13 +22513,13 @@ } } ], - "operationId": "put/bd-costings/{id}", + "operationId": "put/bd-intersect-committees/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCostingRequest" + "$ref": "#/components/schemas/BdIntersectCommitteeRequest" } } } @@ -18309,7 +22590,7 @@ } }, "tags": [ - "Bd-costing" + "Bd-intersect-committee" ], "parameters": [ { @@ -18323,10 +22604,10 @@ } } ], - "operationId": "delete/bd-costings/{id}" + "operationId": "delete/bd-intersect-committees/{id}" } }, - "/bd-currency-lists": { + "/bd-polls": { "get": { "responses": { "200": { @@ -18334,7 +22615,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListListResponse" + "$ref": "#/components/schemas/BdPollListResponse" } } } @@ -18391,7 +22672,7 @@ } }, "tags": [ - "Bd-currency-list" + "Bd-poll" ], "parameters": [ { @@ -18496,7 +22777,7 @@ } } ], - "operationId": "get/bd-currency-lists" + "operationId": "get/bd-polls" }, "post": { "responses": { @@ -18505,7 +22786,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListResponse" + "$ref": "#/components/schemas/BdPollResponse" } } } @@ -18562,23 +22843,23 @@ } }, "tags": [ - "Bd-currency-list" + "Bd-poll" ], "parameters": [], - "operationId": "post/bd-currency-lists", + "operationId": "post/bd-polls", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListRequest" + "$ref": "#/components/schemas/BdPollRequest" } } } } } }, - "/bd-currency-lists/{id}": { + "/bd-polls/{id}": { "get": { "responses": { "200": { @@ -18586,7 +22867,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListResponse" + "$ref": "#/components/schemas/BdPollResponse" } } } @@ -18643,7 +22924,7 @@ } }, "tags": [ - "Bd-currency-list" + "Bd-poll" ], "parameters": [ { @@ -18657,7 +22938,7 @@ } } ], - "operationId": "get/bd-currency-lists/{id}" + "operationId": "get/bd-polls/{id}" }, "put": { "responses": { @@ -18666,7 +22947,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListResponse" + "$ref": "#/components/schemas/BdPollResponse" } } } @@ -18723,7 +23004,7 @@ } }, "tags": [ - "Bd-currency-list" + "Bd-poll" ], "parameters": [ { @@ -18737,13 +23018,13 @@ } } ], - "operationId": "put/bd-currency-lists/{id}", + "operationId": "put/bd-polls/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdCurrencyListRequest" + "$ref": "#/components/schemas/BdPollRequest" } } } @@ -18814,7 +23095,7 @@ } }, "tags": [ - "Bd-currency-list" + "Bd-poll" ], "parameters": [ { @@ -18828,10 +23109,10 @@ } } ], - "operationId": "delete/bd-currency-lists/{id}" + "operationId": "delete/bd-polls/{id}" } }, - "/bd-drafts": { + "/bd-poll-votes": { "get": { "responses": { "200": { @@ -18839,7 +23120,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftListResponse" + "$ref": "#/components/schemas/BdPollVoteListResponse" } } } @@ -18896,7 +23177,7 @@ } }, "tags": [ - "Bd-draft" + "Bd-poll-vote" ], "parameters": [ { @@ -19001,7 +23282,7 @@ } } ], - "operationId": "get/bd-drafts" + "operationId": "get/bd-poll-votes" }, "post": { "responses": { @@ -19010,7 +23291,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftResponse" + "$ref": "#/components/schemas/BdPollVoteResponse" } } } @@ -19067,23 +23348,23 @@ } }, "tags": [ - "Bd-draft" + "Bd-poll-vote" ], "parameters": [], - "operationId": "post/bd-drafts", + "operationId": "post/bd-poll-votes", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftRequest" + "$ref": "#/components/schemas/BdPollVoteRequest" } } } } } }, - "/bd-drafts/{id}": { + "/bd-poll-votes/{id}": { "get": { "responses": { "200": { @@ -19091,7 +23372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftResponse" + "$ref": "#/components/schemas/BdPollVoteResponse" } } } @@ -19148,7 +23429,7 @@ } }, "tags": [ - "Bd-draft" + "Bd-poll-vote" ], "parameters": [ { @@ -19162,7 +23443,7 @@ } } ], - "operationId": "get/bd-drafts/{id}" + "operationId": "get/bd-poll-votes/{id}" }, "put": { "responses": { @@ -19171,7 +23452,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftResponse" + "$ref": "#/components/schemas/BdPollVoteResponse" } } } @@ -19228,7 +23509,7 @@ } }, "tags": [ - "Bd-draft" + "Bd-poll-vote" ], "parameters": [ { @@ -19242,13 +23523,13 @@ } } ], - "operationId": "put/bd-drafts/{id}", + "operationId": "put/bd-poll-votes/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdDraftRequest" + "$ref": "#/components/schemas/BdPollVoteRequest" } } } @@ -19319,7 +23600,7 @@ } }, "tags": [ - "Bd-draft" + "Bd-poll-vote" ], "parameters": [ { @@ -19333,10 +23614,10 @@ } } ], - "operationId": "delete/bd-drafts/{id}" + "operationId": "delete/bd-poll-votes/{id}" } }, - "/bd-further-informations": { + "/bd-proposal-details": { "get": { "responses": { "200": { @@ -19344,7 +23625,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationListResponse" + "$ref": "#/components/schemas/BdProposalDetailListResponse" } } } @@ -19401,7 +23682,7 @@ } }, "tags": [ - "Bd-further-information" + "Bd-proposal-detail" ], "parameters": [ { @@ -19506,7 +23787,7 @@ } } ], - "operationId": "get/bd-further-informations" + "operationId": "get/bd-proposal-details" }, "post": { "responses": { @@ -19515,7 +23796,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationResponse" + "$ref": "#/components/schemas/BdProposalDetailResponse" } } } @@ -19572,23 +23853,23 @@ } }, "tags": [ - "Bd-further-information" + "Bd-proposal-detail" ], "parameters": [], - "operationId": "post/bd-further-informations", + "operationId": "post/bd-proposal-details", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationRequest" + "$ref": "#/components/schemas/BdProposalDetailRequest" } } } } } }, - "/bd-further-informations/{id}": { + "/bd-proposal-details/{id}": { "get": { "responses": { "200": { @@ -19596,7 +23877,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationResponse" + "$ref": "#/components/schemas/BdProposalDetailResponse" } } } @@ -19653,7 +23934,7 @@ } }, "tags": [ - "Bd-further-information" + "Bd-proposal-detail" ], "parameters": [ { @@ -19667,7 +23948,7 @@ } } ], - "operationId": "get/bd-further-informations/{id}" + "operationId": "get/bd-proposal-details/{id}" }, "put": { "responses": { @@ -19676,7 +23957,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationResponse" + "$ref": "#/components/schemas/BdProposalDetailResponse" } } } @@ -19733,7 +24014,7 @@ } }, "tags": [ - "Bd-further-information" + "Bd-proposal-detail" ], "parameters": [ { @@ -19747,13 +24028,13 @@ } } ], - "operationId": "put/bd-further-informations/{id}", + "operationId": "put/bd-proposal-details/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdFurtherInformationRequest" + "$ref": "#/components/schemas/BdProposalDetailRequest" } } } @@ -19824,7 +24105,7 @@ } }, "tags": [ - "Bd-further-information" + "Bd-proposal-detail" ], "parameters": [ { @@ -19838,10 +24119,10 @@ } } ], - "operationId": "delete/bd-further-informations/{id}" + "operationId": "delete/bd-proposal-details/{id}" } }, - "/bd-intersect-committees": { + "/bd-proposal-ownerships": { "get": { "responses": { "200": { @@ -19849,7 +24130,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeListResponse" + "$ref": "#/components/schemas/BdProposalOwnershipListResponse" } } } @@ -19906,7 +24187,7 @@ } }, "tags": [ - "Bd-intersect-committee" + "Bd-proposal-ownership" ], "parameters": [ { @@ -20011,7 +24292,7 @@ } } ], - "operationId": "get/bd-intersect-committees" + "operationId": "get/bd-proposal-ownerships" }, "post": { "responses": { @@ -20020,7 +24301,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeResponse" + "$ref": "#/components/schemas/BdProposalOwnershipResponse" } } } @@ -20077,23 +24358,23 @@ } }, "tags": [ - "Bd-intersect-committee" + "Bd-proposal-ownership" ], "parameters": [], - "operationId": "post/bd-intersect-committees", + "operationId": "post/bd-proposal-ownerships", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeRequest" + "$ref": "#/components/schemas/BdProposalOwnershipRequest" } } } } } }, - "/bd-intersect-committees/{id}": { + "/bd-proposal-ownerships/{id}": { "get": { "responses": { "200": { @@ -20101,7 +24382,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeResponse" + "$ref": "#/components/schemas/BdProposalOwnershipResponse" } } } @@ -20158,7 +24439,7 @@ } }, "tags": [ - "Bd-intersect-committee" + "Bd-proposal-ownership" ], "parameters": [ { @@ -20172,7 +24453,7 @@ } } ], - "operationId": "get/bd-intersect-committees/{id}" + "operationId": "get/bd-proposal-ownerships/{id}" }, "put": { "responses": { @@ -20181,7 +24462,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeResponse" + "$ref": "#/components/schemas/BdProposalOwnershipResponse" } } } @@ -20238,7 +24519,7 @@ } }, "tags": [ - "Bd-intersect-committee" + "Bd-proposal-ownership" ], "parameters": [ { @@ -20252,13 +24533,13 @@ } } ], - "operationId": "put/bd-intersect-committees/{id}", + "operationId": "put/bd-proposal-ownerships/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdIntersectCommitteeRequest" + "$ref": "#/components/schemas/BdProposalOwnershipRequest" } } } @@ -20329,7 +24610,7 @@ } }, "tags": [ - "Bd-intersect-committee" + "Bd-proposal-ownership" ], "parameters": [ { @@ -20343,10 +24624,10 @@ } } ], - "operationId": "delete/bd-intersect-committees/{id}" + "operationId": "delete/bd-proposal-ownerships/{id}" } }, - "/bd-polls": { + "/bd-psapbs": { "get": { "responses": { "200": { @@ -20354,7 +24635,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollListResponse" + "$ref": "#/components/schemas/BdPsapbListResponse" } } } @@ -20411,7 +24692,7 @@ } }, "tags": [ - "Bd-poll" + "Bd-psapb" ], "parameters": [ { @@ -20516,7 +24797,7 @@ } } ], - "operationId": "get/bd-polls" + "operationId": "get/bd-psapbs" }, "post": { "responses": { @@ -20525,7 +24806,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollResponse" + "$ref": "#/components/schemas/BdPsapbResponse" } } } @@ -20582,23 +24863,23 @@ } }, "tags": [ - "Bd-poll" + "Bd-psapb" ], "parameters": [], - "operationId": "post/bd-polls", + "operationId": "post/bd-psapbs", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollRequest" + "$ref": "#/components/schemas/BdPsapbRequest" } } } } } }, - "/bd-polls/{id}": { + "/bd-psapbs/{id}": { "get": { "responses": { "200": { @@ -20606,7 +24887,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollResponse" + "$ref": "#/components/schemas/BdPsapbResponse" } } } @@ -20663,7 +24944,7 @@ } }, "tags": [ - "Bd-poll" + "Bd-psapb" ], "parameters": [ { @@ -20677,7 +24958,7 @@ } } ], - "operationId": "get/bd-polls/{id}" + "operationId": "get/bd-psapbs/{id}" }, "put": { "responses": { @@ -20686,7 +24967,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollResponse" + "$ref": "#/components/schemas/BdPsapbResponse" } } } @@ -20743,7 +25024,7 @@ } }, "tags": [ - "Bd-poll" + "Bd-psapb" ], "parameters": [ { @@ -20757,13 +25038,13 @@ } } ], - "operationId": "put/bd-polls/{id}", + "operationId": "put/bd-psapbs/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollRequest" + "$ref": "#/components/schemas/BdPsapbRequest" } } } @@ -20834,7 +25115,7 @@ } }, "tags": [ - "Bd-poll" + "Bd-psapb" ], "parameters": [ { @@ -20848,10 +25129,10 @@ } } ], - "operationId": "delete/bd-polls/{id}" + "operationId": "delete/bd-psapbs/{id}" } }, - "/bd-poll-votes": { + "/bd-road-maps": { "get": { "responses": { "200": { @@ -20859,7 +25140,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteListResponse" + "$ref": "#/components/schemas/BdRoadMapListResponse" } } } @@ -20916,7 +25197,7 @@ } }, "tags": [ - "Bd-poll-vote" + "Bd-road-map" ], "parameters": [ { @@ -21021,7 +25302,7 @@ } } ], - "operationId": "get/bd-poll-votes" + "operationId": "get/bd-road-maps" }, "post": { "responses": { @@ -21030,7 +25311,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteResponse" + "$ref": "#/components/schemas/BdRoadMapResponse" } } } @@ -21087,23 +25368,23 @@ } }, "tags": [ - "Bd-poll-vote" + "Bd-road-map" ], "parameters": [], - "operationId": "post/bd-poll-votes", + "operationId": "post/bd-road-maps", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteRequest" + "$ref": "#/components/schemas/BdRoadMapRequest" } } } } } }, - "/bd-poll-votes/{id}": { + "/bd-road-maps/{id}": { "get": { "responses": { "200": { @@ -21111,7 +25392,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteResponse" + "$ref": "#/components/schemas/BdRoadMapResponse" } } } @@ -21168,7 +25449,7 @@ } }, "tags": [ - "Bd-poll-vote" + "Bd-road-map" ], "parameters": [ { @@ -21182,7 +25463,7 @@ } } ], - "operationId": "get/bd-poll-votes/{id}" + "operationId": "get/bd-road-maps/{id}" }, "put": { "responses": { @@ -21191,7 +25472,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteResponse" + "$ref": "#/components/schemas/BdRoadMapResponse" } } } @@ -21248,7 +25529,7 @@ } }, "tags": [ - "Bd-poll-vote" + "Bd-road-map" ], "parameters": [ { @@ -21262,13 +25543,13 @@ } } ], - "operationId": "put/bd-poll-votes/{id}", + "operationId": "put/bd-road-maps/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPollVoteRequest" + "$ref": "#/components/schemas/BdRoadMapRequest" } } } @@ -21339,7 +25620,7 @@ } }, "tags": [ - "Bd-poll-vote" + "Bd-road-map" ], "parameters": [ { @@ -21353,10 +25634,10 @@ } } ], - "operationId": "delete/bd-poll-votes/{id}" + "operationId": "delete/bd-road-maps/{id}" } }, - "/bd-proposal-details": { + "/bd-types": { "get": { "responses": { "200": { @@ -21364,7 +25645,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailListResponse" + "$ref": "#/components/schemas/BdTypeListResponse" } } } @@ -21421,7 +25702,7 @@ } }, "tags": [ - "Bd-proposal-detail" + "Bd-type" ], "parameters": [ { @@ -21526,7 +25807,7 @@ } } ], - "operationId": "get/bd-proposal-details" + "operationId": "get/bd-types" }, "post": { "responses": { @@ -21535,7 +25816,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailResponse" + "$ref": "#/components/schemas/BdTypeResponse" } } } @@ -21592,23 +25873,23 @@ } }, "tags": [ - "Bd-proposal-detail" + "Bd-type" ], "parameters": [], - "operationId": "post/bd-proposal-details", + "operationId": "post/bd-types", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailRequest" + "$ref": "#/components/schemas/BdTypeRequest" } } } } } }, - "/bd-proposal-details/{id}": { + "/bd-types/{id}": { "get": { "responses": { "200": { @@ -21616,7 +25897,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailResponse" + "$ref": "#/components/schemas/BdTypeResponse" } } } @@ -21673,7 +25954,7 @@ } }, "tags": [ - "Bd-proposal-detail" + "Bd-type" ], "parameters": [ { @@ -21687,7 +25968,7 @@ } } ], - "operationId": "get/bd-proposal-details/{id}" + "operationId": "get/bd-types/{id}" }, "put": { "responses": { @@ -21696,7 +25977,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailResponse" + "$ref": "#/components/schemas/BdTypeResponse" } } } @@ -21753,7 +26034,7 @@ } }, "tags": [ - "Bd-proposal-detail" + "Bd-type" ], "parameters": [ { @@ -21767,13 +26048,13 @@ } } ], - "operationId": "put/bd-proposal-details/{id}", + "operationId": "put/bd-types/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalDetailRequest" + "$ref": "#/components/schemas/BdTypeRequest" } } } @@ -21844,7 +26125,7 @@ } }, "tags": [ - "Bd-proposal-detail" + "Bd-type" ], "parameters": [ { @@ -21858,10 +26139,10 @@ } } ], - "operationId": "delete/bd-proposal-details/{id}" + "operationId": "delete/bd-types/{id}" } }, - "/bd-proposal-ownerships": { + "/comments": { "get": { "responses": { "200": { @@ -21869,7 +26150,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipListResponse" + "$ref": "#/components/schemas/CommentListResponse" } } } @@ -21926,7 +26207,7 @@ } }, "tags": [ - "Bd-proposal-ownership" + "Comment" ], "parameters": [ { @@ -22031,7 +26312,7 @@ } } ], - "operationId": "get/bd-proposal-ownerships" + "operationId": "get/comments" }, "post": { "responses": { @@ -22040,7 +26321,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipResponse" + "$ref": "#/components/schemas/CommentResponse" } } } @@ -22097,23 +26378,23 @@ } }, "tags": [ - "Bd-proposal-ownership" + "Comment" ], "parameters": [], - "operationId": "post/bd-proposal-ownerships", + "operationId": "post/comments", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipRequest" + "$ref": "#/components/schemas/CommentRequest" } } } } } }, - "/bd-proposal-ownerships/{id}": { + "/comments/{id}": { "get": { "responses": { "200": { @@ -22121,7 +26402,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipResponse" + "$ref": "#/components/schemas/CommentResponse" } } } @@ -22178,7 +26459,7 @@ } }, "tags": [ - "Bd-proposal-ownership" + "Comment" ], "parameters": [ { @@ -22192,7 +26473,7 @@ } } ], - "operationId": "get/bd-proposal-ownerships/{id}" + "operationId": "get/comments/{id}" }, "put": { "responses": { @@ -22201,7 +26482,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipResponse" + "$ref": "#/components/schemas/CommentResponse" } } } @@ -22258,7 +26539,7 @@ } }, "tags": [ - "Bd-proposal-ownership" + "Comment" ], "parameters": [ { @@ -22272,13 +26553,13 @@ } } ], - "operationId": "put/bd-proposal-ownerships/{id}", + "operationId": "put/comments/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdProposalOwnershipRequest" + "$ref": "#/components/schemas/CommentRequest" } } } @@ -22349,7 +26630,7 @@ } }, "tags": [ - "Bd-proposal-ownership" + "Comment" ], "parameters": [ { @@ -22363,10 +26644,10 @@ } } ], - "operationId": "delete/bd-proposal-ownerships/{id}" + "operationId": "delete/comments/{id}" } }, - "/bd-psapbs": { + "/comments-reports": { "get": { "responses": { "200": { @@ -22374,7 +26655,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbListResponse" + "$ref": "#/components/schemas/CommentsReportListResponse" } } } @@ -22431,7 +26712,7 @@ } }, "tags": [ - "Bd-psapb" + "Comments-report" ], "parameters": [ { @@ -22536,7 +26817,7 @@ } } ], - "operationId": "get/bd-psapbs" + "operationId": "get/comments-reports" }, "post": { "responses": { @@ -22545,7 +26826,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbResponse" + "$ref": "#/components/schemas/CommentsReportResponse" } } } @@ -22602,23 +26883,23 @@ } }, "tags": [ - "Bd-psapb" + "Comments-report" ], "parameters": [], - "operationId": "post/bd-psapbs", + "operationId": "post/comments-reports", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbRequest" + "$ref": "#/components/schemas/CommentsReportRequest" } } } } } }, - "/bd-psapbs/{id}": { + "/comments-reports/{id}": { "get": { "responses": { "200": { @@ -22626,7 +26907,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbResponse" + "$ref": "#/components/schemas/CommentsReportResponse" } } } @@ -22683,7 +26964,7 @@ } }, "tags": [ - "Bd-psapb" + "Comments-report" ], "parameters": [ { @@ -22697,7 +26978,7 @@ } } ], - "operationId": "get/bd-psapbs/{id}" + "operationId": "get/comments-reports/{id}" }, "put": { "responses": { @@ -22706,7 +26987,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbResponse" + "$ref": "#/components/schemas/CommentsReportResponse" } } } @@ -22763,7 +27044,7 @@ } }, "tags": [ - "Bd-psapb" + "Comments-report" ], "parameters": [ { @@ -22777,13 +27058,13 @@ } } ], - "operationId": "put/bd-psapbs/{id}", + "operationId": "put/comments-reports/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdPsapbRequest" + "$ref": "#/components/schemas/CommentsReportRequest" } } } @@ -22854,7 +27135,7 @@ } }, "tags": [ - "Bd-psapb" + "Comments-report" ], "parameters": [ { @@ -22868,10 +27149,10 @@ } } ], - "operationId": "delete/bd-psapbs/{id}" + "operationId": "delete/comments-reports/{id}" } }, - "/bd-road-maps": { + "/country-lists": { "get": { "responses": { "200": { @@ -22879,7 +27160,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapListResponse" + "$ref": "#/components/schemas/CountryListListResponse" } } } @@ -22936,7 +27217,7 @@ } }, "tags": [ - "Bd-road-map" + "Country-list" ], "parameters": [ { @@ -23041,7 +27322,7 @@ } } ], - "operationId": "get/bd-road-maps" + "operationId": "get/country-lists" }, "post": { "responses": { @@ -23050,7 +27331,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapResponse" + "$ref": "#/components/schemas/CountryListResponse" } } } @@ -23107,23 +27388,23 @@ } }, "tags": [ - "Bd-road-map" + "Country-list" ], "parameters": [], - "operationId": "post/bd-road-maps", + "operationId": "post/country-lists", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapRequest" + "$ref": "#/components/schemas/CountryListRequest" } } } } } }, - "/bd-road-maps/{id}": { + "/country-lists/{id}": { "get": { "responses": { "200": { @@ -23131,7 +27412,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapResponse" + "$ref": "#/components/schemas/CountryListResponse" } } } @@ -23188,7 +27469,7 @@ } }, "tags": [ - "Bd-road-map" + "Country-list" ], "parameters": [ { @@ -23202,7 +27483,7 @@ } } ], - "operationId": "get/bd-road-maps/{id}" + "operationId": "get/country-lists/{id}" }, "put": { "responses": { @@ -23211,7 +27492,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapResponse" + "$ref": "#/components/schemas/CountryListResponse" } } } @@ -23268,7 +27549,7 @@ } }, "tags": [ - "Bd-road-map" + "Country-list" ], "parameters": [ { @@ -23282,13 +27563,13 @@ } } ], - "operationId": "put/bd-road-maps/{id}", + "operationId": "put/country-lists/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdRoadMapRequest" + "$ref": "#/components/schemas/CountryListRequest" } } } @@ -23359,7 +27640,7 @@ } }, "tags": [ - "Bd-road-map" + "Country-list" ], "parameters": [ { @@ -23373,10 +27654,10 @@ } } ], - "operationId": "delete/bd-road-maps/{id}" + "operationId": "delete/country-lists/{id}" } }, - "/bd-types": { + "/governance-action-types": { "get": { "responses": { "200": { @@ -23384,7 +27665,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeListResponse" + "$ref": "#/components/schemas/GovernanceActionTypeListResponse" } } } @@ -23441,7 +27722,7 @@ } }, "tags": [ - "Bd-type" + "Governance-action-type" ], "parameters": [ { @@ -23546,7 +27827,7 @@ } } ], - "operationId": "get/bd-types" + "operationId": "get/governance-action-types" }, "post": { "responses": { @@ -23555,7 +27836,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -23612,23 +27893,23 @@ } }, "tags": [ - "Bd-type" + "Governance-action-type" ], "parameters": [], - "operationId": "post/bd-types", + "operationId": "post/governance-action-types", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeRequest" + "$ref": "#/components/schemas/GovernanceActionTypeRequest" } } } } } }, - "/bd-types/{id}": { + "/governance-action-types/{id}": { "get": { "responses": { "200": { @@ -23636,7 +27917,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -23693,7 +27974,7 @@ } }, "tags": [ - "Bd-type" + "Governance-action-type" ], "parameters": [ { @@ -23707,7 +27988,7 @@ } } ], - "operationId": "get/bd-types/{id}" + "operationId": "get/governance-action-types/{id}" }, "put": { "responses": { @@ -23716,7 +27997,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeResponse" + "$ref": "#/components/schemas/GovernanceActionTypeResponse" } } } @@ -23773,7 +28054,7 @@ } }, "tags": [ - "Bd-type" + "Governance-action-type" ], "parameters": [ { @@ -23787,13 +28068,13 @@ } } ], - "operationId": "put/bd-types/{id}", + "operationId": "put/governance-action-types/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BdTypeRequest" + "$ref": "#/components/schemas/GovernanceActionTypeRequest" } } } @@ -23864,7 +28145,7 @@ } }, "tags": [ - "Bd-type" + "Governance-action-type" ], "parameters": [ { @@ -23878,10 +28159,10 @@ } } ], - "operationId": "delete/bd-types/{id}" + "operationId": "delete/governance-action-types/{id}" } }, - "/comments": { + "/polls": { "get": { "responses": { "200": { @@ -23889,7 +28170,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentListResponse" + "$ref": "#/components/schemas/PollListResponse" } } } @@ -23946,7 +28227,7 @@ } }, "tags": [ - "Comment" + "Poll" ], "parameters": [ { @@ -24051,7 +28332,7 @@ } } ], - "operationId": "get/comments" + "operationId": "get/polls" }, "post": { "responses": { @@ -24060,7 +28341,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -24117,23 +28398,23 @@ } }, "tags": [ - "Comment" + "Poll" ], "parameters": [], - "operationId": "post/comments", + "operationId": "post/polls", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentRequest" + "$ref": "#/components/schemas/PollRequest" } } } } } }, - "/comments/{id}": { + "/polls/{id}": { "get": { "responses": { "200": { @@ -24141,7 +28422,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -24198,7 +28479,7 @@ } }, "tags": [ - "Comment" + "Poll" ], "parameters": [ { @@ -24212,7 +28493,7 @@ } } ], - "operationId": "get/comments/{id}" + "operationId": "get/polls/{id}" }, "put": { "responses": { @@ -24221,7 +28502,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentResponse" + "$ref": "#/components/schemas/PollResponse" } } } @@ -24278,7 +28559,7 @@ } }, "tags": [ - "Comment" + "Poll" ], "parameters": [ { @@ -24292,13 +28573,13 @@ } } ], - "operationId": "put/comments/{id}", + "operationId": "put/polls/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentRequest" + "$ref": "#/components/schemas/PollRequest" } } } @@ -24369,7 +28650,7 @@ } }, "tags": [ - "Comment" + "Poll" ], "parameters": [ { @@ -24383,10 +28664,10 @@ } } ], - "operationId": "delete/comments/{id}" + "operationId": "delete/polls/{id}" } }, - "/comments-reports": { + "/poll-votes": { "get": { "responses": { "200": { @@ -24394,7 +28675,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportListResponse" + "$ref": "#/components/schemas/PollVoteListResponse" } } } @@ -24451,7 +28732,7 @@ } }, "tags": [ - "Comments-report" + "Poll-vote" ], "parameters": [ { @@ -24556,7 +28837,7 @@ } } ], - "operationId": "get/comments-reports" + "operationId": "get/poll-votes" }, "post": { "responses": { @@ -24565,7 +28846,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -24622,23 +28903,23 @@ } }, "tags": [ - "Comments-report" + "Poll-vote" ], "parameters": [], - "operationId": "post/comments-reports", + "operationId": "post/poll-votes", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportRequest" + "$ref": "#/components/schemas/PollVoteRequest" } } } } } }, - "/comments-reports/{id}": { + "/poll-votes/{id}": { "get": { "responses": { "200": { @@ -24646,7 +28927,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -24703,7 +28984,7 @@ } }, "tags": [ - "Comments-report" + "Poll-vote" ], "parameters": [ { @@ -24717,7 +28998,7 @@ } } ], - "operationId": "get/comments-reports/{id}" + "operationId": "get/poll-votes/{id}" }, "put": { "responses": { @@ -24726,7 +29007,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportResponse" + "$ref": "#/components/schemas/PollVoteResponse" } } } @@ -24783,7 +29064,7 @@ } }, "tags": [ - "Comments-report" + "Poll-vote" ], "parameters": [ { @@ -24797,13 +29078,13 @@ } } ], - "operationId": "put/comments-reports/{id}", + "operationId": "put/poll-votes/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CommentsReportRequest" + "$ref": "#/components/schemas/PollVoteRequest" } } } @@ -24874,7 +29155,7 @@ } }, "tags": [ - "Comments-report" + "Poll-vote" ], "parameters": [ { @@ -24888,10 +29169,10 @@ } } ], - "operationId": "delete/comments-reports/{id}" + "operationId": "delete/poll-votes/{id}" } }, - "/country-lists": { + "/proposals": { "get": { "responses": { "200": { @@ -24899,7 +29180,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListListResponse" + "$ref": "#/components/schemas/ProposalListResponse" } } } @@ -24956,7 +29237,7 @@ } }, "tags": [ - "Country-list" + "Proposal" ], "parameters": [ { @@ -25061,7 +29342,7 @@ } } ], - "operationId": "get/country-lists" + "operationId": "get/proposals" }, "post": { "responses": { @@ -25070,7 +29351,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -25127,23 +29408,23 @@ } }, "tags": [ - "Country-list" + "Proposal" ], "parameters": [], - "operationId": "post/country-lists", + "operationId": "post/proposals", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListRequest" + "$ref": "#/components/schemas/ProposalRequest" } } } } } }, - "/country-lists/{id}": { + "/proposals/{id}": { "get": { "responses": { "200": { @@ -25151,7 +29432,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -25208,7 +29489,7 @@ } }, "tags": [ - "Country-list" + "Proposal" ], "parameters": [ { @@ -25222,7 +29503,7 @@ } } ], - "operationId": "get/country-lists/{id}" + "operationId": "get/proposals/{id}" }, "put": { "responses": { @@ -25231,7 +29512,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListResponse" + "$ref": "#/components/schemas/ProposalResponse" } } } @@ -25288,7 +29569,7 @@ } }, "tags": [ - "Country-list" + "Proposal" ], "parameters": [ { @@ -25302,13 +29583,13 @@ } } ], - "operationId": "put/country-lists/{id}", + "operationId": "put/proposals/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CountryListRequest" + "$ref": "#/components/schemas/ProposalRequest" } } } @@ -25379,7 +29660,7 @@ } }, "tags": [ - "Country-list" + "Proposal" ], "parameters": [ { @@ -25393,10 +29674,10 @@ } } ], - "operationId": "delete/country-lists/{id}" + "operationId": "delete/proposals/{id}" } }, - "/governance-action-types": { + "/proposal-constitution-contents": { "get": { "responses": { "200": { @@ -25404,7 +29685,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeListResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentListResponse" } } } @@ -25461,7 +29742,7 @@ } }, "tags": [ - "Governance-action-type" + "Proposal-constitution-content" ], "parameters": [ { @@ -25566,7 +29847,7 @@ } } ], - "operationId": "get/governance-action-types" + "operationId": "get/proposal-constitution-contents" }, "post": { "responses": { @@ -25575,7 +29856,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -25632,23 +29913,23 @@ } }, "tags": [ - "Governance-action-type" + "Proposal-constitution-content" ], "parameters": [], - "operationId": "post/governance-action-types", + "operationId": "post/proposal-constitution-contents", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeRequest" + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" } } } } } }, - "/governance-action-types/{id}": { + "/proposal-constitution-contents/{id}": { "get": { "responses": { "200": { @@ -25656,7 +29937,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -25713,7 +29994,7 @@ } }, "tags": [ - "Governance-action-type" + "Proposal-constitution-content" ], "parameters": [ { @@ -25727,7 +30008,7 @@ } } ], - "operationId": "get/governance-action-types/{id}" + "operationId": "get/proposal-constitution-contents/{id}" }, "put": { "responses": { @@ -25736,7 +30017,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeResponse" + "$ref": "#/components/schemas/ProposalConstitutionContentResponse" } } } @@ -25793,7 +30074,7 @@ } }, "tags": [ - "Governance-action-type" + "Proposal-constitution-content" ], "parameters": [ { @@ -25807,13 +30088,13 @@ } } ], - "operationId": "put/governance-action-types/{id}", + "operationId": "put/proposal-constitution-contents/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GovernanceActionTypeRequest" + "$ref": "#/components/schemas/ProposalConstitutionContentRequest" } } } @@ -25884,7 +30165,7 @@ } }, "tags": [ - "Governance-action-type" + "Proposal-constitution-content" ], "parameters": [ { @@ -25898,10 +30179,10 @@ } } ], - "operationId": "delete/governance-action-types/{id}" + "operationId": "delete/proposal-constitution-contents/{id}" } }, - "/polls": { + "/proposal-contents": { "get": { "responses": { "200": { @@ -25909,7 +30190,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollListResponse" + "$ref": "#/components/schemas/ProposalContentListResponse" } } } @@ -25966,7 +30247,7 @@ } }, "tags": [ - "Poll" + "Proposal-content" ], "parameters": [ { @@ -26071,7 +30352,7 @@ } } ], - "operationId": "get/polls" + "operationId": "get/proposal-contents" }, "post": { "responses": { @@ -26080,7 +30361,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/ProposalContentResponse" } } } @@ -26137,23 +30418,23 @@ } }, "tags": [ - "Poll" + "Proposal-content" ], "parameters": [], - "operationId": "post/polls", + "operationId": "post/proposal-contents", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollRequest" + "$ref": "#/components/schemas/ProposalContentRequest" } } } } } }, - "/polls/{id}": { + "/proposal-contents/{id}": { "get": { "responses": { "200": { @@ -26161,7 +30442,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/ProposalContentResponse" } } } @@ -26218,7 +30499,7 @@ } }, "tags": [ - "Poll" + "Proposal-content" ], "parameters": [ { @@ -26232,7 +30513,7 @@ } } ], - "operationId": "get/polls/{id}" + "operationId": "get/proposal-contents/{id}" }, "put": { "responses": { @@ -26241,7 +30522,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollResponse" + "$ref": "#/components/schemas/ProposalContentResponse" } } } @@ -26298,7 +30579,7 @@ } }, "tags": [ - "Poll" + "Proposal-content" ], "parameters": [ { @@ -26312,13 +30593,13 @@ } } ], - "operationId": "put/polls/{id}", + "operationId": "put/proposal-contents/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollRequest" + "$ref": "#/components/schemas/ProposalContentRequest" } } } @@ -26389,7 +30670,7 @@ } }, "tags": [ - "Poll" + "Proposal-content" ], "parameters": [ { @@ -26403,10 +30684,10 @@ } } ], - "operationId": "delete/polls/{id}" + "operationId": "delete/proposal-contents/{id}" } }, - "/poll-votes": { + "/proposal-hard-fork-contents": { "get": { "responses": { "200": { @@ -26414,7 +30695,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteListResponse" + "$ref": "#/components/schemas/ProposalHardForkContentListResponse" } } } @@ -26471,7 +30752,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal-hard-fork-content" ], "parameters": [ { @@ -26576,7 +30857,7 @@ } } ], - "operationId": "get/poll-votes" + "operationId": "get/proposal-hard-fork-contents" }, "post": { "responses": { @@ -26585,7 +30866,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalHardForkContentResponse" } } } @@ -26642,23 +30923,23 @@ } }, "tags": [ - "Poll-vote" + "Proposal-hard-fork-content" ], "parameters": [], - "operationId": "post/poll-votes", + "operationId": "post/proposal-hard-fork-contents", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteRequest" + "$ref": "#/components/schemas/ProposalHardForkContentRequest" } } } } } }, - "/poll-votes/{id}": { + "/proposal-hard-fork-contents/{id}": { "get": { "responses": { "200": { @@ -26666,7 +30947,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalHardForkContentResponse" } } } @@ -26723,7 +31004,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal-hard-fork-content" ], "parameters": [ { @@ -26737,7 +31018,7 @@ } } ], - "operationId": "get/poll-votes/{id}" + "operationId": "get/proposal-hard-fork-contents/{id}" }, "put": { "responses": { @@ -26746,7 +31027,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteResponse" + "$ref": "#/components/schemas/ProposalHardForkContentResponse" } } } @@ -26803,7 +31084,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal-hard-fork-content" ], "parameters": [ { @@ -26817,13 +31098,13 @@ } } ], - "operationId": "put/poll-votes/{id}", + "operationId": "put/proposal-hard-fork-contents/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PollVoteRequest" + "$ref": "#/components/schemas/ProposalHardForkContentRequest" } } } @@ -26894,7 +31175,7 @@ } }, "tags": [ - "Poll-vote" + "Proposal-hard-fork-content" ], "parameters": [ { @@ -26908,10 +31189,10 @@ } } ], - "operationId": "delete/poll-votes/{id}" + "operationId": "delete/proposal-hard-fork-contents/{id}" } }, - "/proposals": { + "/proposal-submitions": { "get": { "responses": { "200": { @@ -26919,7 +31200,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalListResponse" + "$ref": "#/components/schemas/ProposalSubmitionListResponse" } } } @@ -26976,7 +31257,7 @@ } }, "tags": [ - "Proposal" + "Proposal-submition" ], "parameters": [ { @@ -27081,7 +31362,7 @@ } } ], - "operationId": "get/proposals" + "operationId": "get/proposal-submitions" }, "post": { "responses": { @@ -27090,7 +31371,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalSubmitionResponse" } } } @@ -27147,23 +31428,23 @@ } }, "tags": [ - "Proposal" + "Proposal-submition" ], "parameters": [], - "operationId": "post/proposals", + "operationId": "post/proposal-submitions", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalRequest" + "$ref": "#/components/schemas/ProposalSubmitionRequest" } } } } } }, - "/proposals/{id}": { + "/proposal-submitions/{id}": { "get": { "responses": { "200": { @@ -27171,7 +31452,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalSubmitionResponse" } } } @@ -27228,7 +31509,7 @@ } }, "tags": [ - "Proposal" + "Proposal-submition" ], "parameters": [ { @@ -27242,7 +31523,7 @@ } } ], - "operationId": "get/proposals/{id}" + "operationId": "get/proposal-submitions/{id}" }, "put": { "responses": { @@ -27251,7 +31532,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalResponse" + "$ref": "#/components/schemas/ProposalSubmitionResponse" } } } @@ -27308,7 +31589,7 @@ } }, "tags": [ - "Proposal" + "Proposal-submition" ], "parameters": [ { @@ -27322,13 +31603,13 @@ } } ], - "operationId": "put/proposals/{id}", + "operationId": "put/proposal-submitions/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalRequest" + "$ref": "#/components/schemas/ProposalSubmitionRequest" } } } @@ -27399,7 +31680,7 @@ } }, "tags": [ - "Proposal" + "Proposal-submition" ], "parameters": [ { @@ -27413,10 +31694,10 @@ } } ], - "operationId": "delete/proposals/{id}" + "operationId": "delete/proposal-submitions/{id}" } }, - "/proposal-constitution-contents": { + "/proposal-update-committee-contents": { "get": { "responses": { "200": { @@ -27424,7 +31705,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentListResponse" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentListResponse" } } } @@ -27481,7 +31762,7 @@ } }, "tags": [ - "Proposal-constitution-content" + "Proposal-update-committee-content" ], "parameters": [ { @@ -27586,7 +31867,7 @@ } } ], - "operationId": "get/proposal-constitution-contents" + "operationId": "get/proposal-update-committee-contents" }, "post": { "responses": { @@ -27595,7 +31876,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" } } } @@ -27652,23 +31933,23 @@ } }, "tags": [ - "Proposal-constitution-content" + "Proposal-update-committee-content" ], "parameters": [], - "operationId": "post/proposal-constitution-contents", + "operationId": "post/proposal-update-committee-contents", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentRequest" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentRequest" } } } } } }, - "/proposal-constitution-contents/{id}": { + "/proposal-update-committee-contents/{id}": { "get": { "responses": { "200": { @@ -27676,7 +31957,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" } } } @@ -27733,7 +32014,7 @@ } }, "tags": [ - "Proposal-constitution-content" + "Proposal-update-committee-content" ], "parameters": [ { @@ -27747,7 +32028,7 @@ } } ], - "operationId": "get/proposal-constitution-contents/{id}" + "operationId": "get/proposal-update-committee-contents/{id}" }, "put": { "responses": { @@ -27756,7 +32037,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentResponse" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentResponse" } } } @@ -27813,7 +32094,7 @@ } }, "tags": [ - "Proposal-constitution-content" + "Proposal-update-committee-content" ], "parameters": [ { @@ -27827,13 +32108,13 @@ } } ], - "operationId": "put/proposal-constitution-contents/{id}", + "operationId": "put/proposal-update-committee-contents/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalConstitutionContentRequest" + "$ref": "#/components/schemas/ProposalUpdateCommitteeContentRequest" } } } @@ -27904,7 +32185,7 @@ } }, "tags": [ - "Proposal-constitution-content" + "Proposal-update-committee-content" ], "parameters": [ { @@ -27918,10 +32199,10 @@ } } ], - "operationId": "delete/proposal-constitution-contents/{id}" + "operationId": "delete/proposal-update-committee-contents/{id}" } }, - "/proposal-contents": { + "/proposal-votes": { "get": { "responses": { "200": { @@ -27929,7 +32210,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentListResponse" + "$ref": "#/components/schemas/ProposalVoteListResponse" } } } @@ -27986,7 +32267,7 @@ } }, "tags": [ - "Proposal-content" + "Proposal-vote" ], "parameters": [ { @@ -28091,7 +32372,7 @@ } } ], - "operationId": "get/proposal-contents" + "operationId": "get/proposal-votes" }, "post": { "responses": { @@ -28100,7 +32381,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentResponse" + "$ref": "#/components/schemas/ProposalVoteResponse" } } } @@ -28157,23 +32438,23 @@ } }, "tags": [ - "Proposal-content" + "Proposal-vote" ], "parameters": [], - "operationId": "post/proposal-contents", + "operationId": "post/proposal-votes", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentRequest" + "$ref": "#/components/schemas/ProposalVoteRequest" } } } } } }, - "/proposal-contents/{id}": { + "/proposal-votes/{id}": { "get": { "responses": { "200": { @@ -28181,7 +32462,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentResponse" + "$ref": "#/components/schemas/ProposalVoteResponse" } } } @@ -28238,7 +32519,7 @@ } }, "tags": [ - "Proposal-content" + "Proposal-vote" ], "parameters": [ { @@ -28252,7 +32533,7 @@ } } ], - "operationId": "get/proposal-contents/{id}" + "operationId": "get/proposal-votes/{id}" }, "put": { "responses": { @@ -28261,7 +32542,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentResponse" + "$ref": "#/components/schemas/ProposalVoteResponse" } } } @@ -28318,7 +32599,7 @@ } }, "tags": [ - "Proposal-content" + "Proposal-vote" ], "parameters": [ { @@ -28332,13 +32613,13 @@ } } ], - "operationId": "put/proposal-contents/{id}", + "operationId": "put/proposal-votes/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalContentRequest" + "$ref": "#/components/schemas/ProposalVoteRequest" } } } @@ -28409,7 +32690,7 @@ } }, "tags": [ - "Proposal-content" + "Proposal-vote" ], "parameters": [ { @@ -28423,10 +32704,10 @@ } } ], - "operationId": "delete/proposal-contents/{id}" + "operationId": "delete/proposal-votes/{id}" } }, - "/proposal-submitions": { + "/wallet-types": { "get": { "responses": { "200": { @@ -28434,7 +32715,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalSubmitionListResponse" + "$ref": "#/components/schemas/WalletTypeListResponse" } } } @@ -28491,7 +32772,7 @@ } }, "tags": [ - "Proposal-submition" + "Wallet-type" ], "parameters": [ { @@ -28582,191 +32863,30 @@ "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-submitions" - }, - "post": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposalSubmitionResponse" - } - } - } - }, - "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-submition" - ], - "parameters": [], - "operationId": "post/proposal-submitions", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposalSubmitionRequest" - } - } - } - } - } - }, - "/proposal-submitions/{id}": { - "get": { - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposalSubmitionResponse" - } - } - } - }, - "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" - } - } - } + }, + "style": "deepObject" }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, - "tags": [ - "Proposal-submition" - ], - "parameters": [ { - "name": "id", - "in": "path", - "description": "", + "name": "locale", + "in": "query", + "description": "Locale to apply", "deprecated": false, - "required": true, + "required": false, "schema": { - "type": "number" + "type": "string" } } ], - "operationId": "get/proposal-submitions/{id}" + "operationId": "get/wallet-types" }, - "put": { + "post": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalSubmitionResponse" + "$ref": "#/components/schemas/WalletTypeResponse" } } } @@ -28823,41 +32943,31 @@ } }, "tags": [ - "Proposal-submition" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" - } - } + "Wallet-type" ], - "operationId": "put/proposal-submitions/{id}", + "parameters": [], + "operationId": "post/wallet-types", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalSubmitionRequest" + "$ref": "#/components/schemas/WalletTypeRequest" } } } } - }, - "delete": { + } + }, + "/wallet-types/{id}": { + "get": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "$ref": "#/components/schemas/WalletTypeResponse" } } } @@ -28914,7 +33024,7 @@ } }, "tags": [ - "Proposal-submition" + "Wallet-type" ], "parameters": [ { @@ -28928,18 +33038,16 @@ } } ], - "operationId": "delete/proposal-submitions/{id}" - } - }, - "/proposal-votes": { - "get": { + "operationId": "get/wallet-types/{id}" + }, + "put": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalVoteListResponse" + "$ref": "#/components/schemas/WalletTypeResponse" } } } @@ -28996,121 +33104,41 @@ } }, "tags": [ - "Proposal-vote" + "Wallet-type" ], "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", + "name": "id", + "in": "path", + "description": "", "deprecated": false, - "required": false, + "required": true, "schema": { - "type": "string" + "type": "number" } } ], - "operationId": "get/proposal-votes" + "operationId": "put/wallet-types/{id}", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WalletTypeRequest" + } + } + } + } }, - "post": { + "delete": { "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalVoteResponse" + "type": "integer", + "format": "int64" } } } @@ -29167,57 +33195,101 @@ } }, "tags": [ - "Proposal-vote" + "Wallet-type" ], - "parameters": [], - "operationId": "post/proposal-votes", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposalVoteRequest" - } + "parameters": [ + { + "name": "id", + "in": "path", + "description": "", + "deprecated": false, + "required": true, + "schema": { + "type": "number" } } - } + ], + "operationId": "delete/wallet-types/{id}" } }, - "/proposal-votes/{id}": { + "/connect/{provider}": { "get": { + "parameters": [ + { + "name": "provider", + "in": "path", + "required": true, + "description": "Provider name", + "schema": { + "type": "string", + "pattern": ".*" + } + } + ], + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Login with a provider", + "description": "Redirects to provider login before being redirect to /auth/{provider}/callback", "responses": { - "200": { - "description": "OK", + "301": { + "description": "Redirect response" + }, + "default": { + "description": "Error", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalVoteResponse" + "$ref": "#/components/schemas/Error" } } } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + } + } + } + }, + "/auth/local": { + "post": { + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Local login", + "description": "Returns a jwt token and user info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "password": { + "type": "string" + } } + }, + "example": { + "identifier": "foobar", + "password": "Test1234" } } }, - "401": { - "description": "Unauthorized", + "required": true + }, + "responses": { + "200": { + "description": "Connection", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-UserRegistration" } } } }, - "403": { - "description": "Forbidden", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29225,19 +33297,56 @@ } } } + } + } + } + }, + "/auth/local/register": { + "post": { + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Register a user", + "description": "Returns a jwt token and user info", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "example": { + "username": "foobar", + "email": "foo.bar@strapi.io", + "password": "Test1234" + } + } }, - "404": { - "description": "Not Found", + "required": true + }, + "responses": { + "200": { + "description": "Successful registration", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-UserRegistration" } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29246,48 +33355,39 @@ } } } - }, + } + } + }, + "/auth/{provider}/callback": { + "get": { "tags": [ - "Proposal-vote" + "Users-Permissions - Auth" ], + "summary": "Default Callback from provider auth", "parameters": [ { - "name": "id", + "name": "provider", "in": "path", - "description": "", - "deprecated": false, "required": true, + "description": "Provider name", "schema": { - "type": "number" + "type": "string" } } ], - "operationId": "get/proposal-votes/{id}" - }, - "put": { "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProposalVoteResponse" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "Returns a jwt token and user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-UserRegistration" } } } }, - "401": { - "description": "Unauthorized", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29295,29 +33395,55 @@ } } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + } + } + } + }, + "/auth/forgot-password": { + "post": { + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Send rest password email", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string" + } } + }, + "example": { + "email": "foo.bar@strapi.io" } } - }, - "404": { - "description": "Not Found", + } + }, + "responses": { + "200": { + "description": "Returns ok", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "ok": { + "type": "string", + "enum": [ + true + ] + } + } } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29326,59 +33452,54 @@ } } } - }, + } + } + }, + "/auth/reset-password": { + "post": { "tags": [ - "Proposal-vote" + "Users-Permissions - Auth" ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" - } - } - ], - "operationId": "put/proposal-votes/{id}", + "summary": "Rest user password", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProposalVoteRequest" + "type": "object", + "properties": { + "password": { + "type": "string" + }, + "passwordConfirmation": { + "type": "string" + }, + "code": { + "type": "string" + } + } + }, + "example": { + "password": "Test1234", + "passwordConfirmation": "Test1234", + "code": "zertyoaizndoianzodianzdonaizdoinaozdnia" } } } - } - }, - "delete": { + }, "responses": { "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "type": "integer", - "format": "int64" - } - } - } - }, - "400": { - "description": "Bad Request", + "description": "Returns a jwt token and user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-UserRegistration" } } } }, - "401": { - "description": "Unauthorized", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29386,29 +33507,55 @@ } } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + } + } + } + }, + "/auth/change-password": { + "post": { + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Update user's own password", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "password", + "currentPassword", + "passwordConfirmation" + ], + "properties": { + "password": { + "type": "string" + }, + "currentPassword": { + "type": "string" + }, + "passwordConfirmation": { + "type": "string" + } } } } - }, - "404": { - "description": "Not Found", + } + }, + "responses": { + "200": { + "description": "Returns a jwt token and user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-UserRegistration" } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29417,50 +33564,31 @@ } } } - }, + } + } + }, + "/auth/email-confirmation": { + "get": { "tags": [ - "Proposal-vote" + "Users-Permissions - Auth" ], + "summary": "Confirm user email", "parameters": [ { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, + "in": "query", + "name": "confirmation", "schema": { - "type": "number" - } + "type": "string" + }, + "description": "confirmation token received by email" } ], - "operationId": "delete/proposal-votes/{id}" - } - }, - "/wallet-types": { - "get": { "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletTypeListResponse" - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } + "301": { + "description": "Redirects to the configure email confirmation redirect url" }, - "401": { - "description": "Unauthorized", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29468,29 +33596,55 @@ } } } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" + } + } + } + }, + "/auth/send-email-confirmation": { + "post": { + "tags": [ + "Users-Permissions - Auth" + ], + "summary": "Send confirmation email", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string" + } } } } - }, - "404": { - "description": "Not Found", + } + }, + "responses": { + "200": { + "description": "Returns email and boolean to confirm email was sent", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "email": { + "type": "string" + }, + "sent": { + "type": "string", + "enum": [ + true + ] + } + } } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29499,129 +33653,69 @@ } } } - }, + } + } + }, + "/users-permissions/permissions": { + "get": { "tags": [ - "Wallet-type" - ], - "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" - } - } + "Users-Permissions - Users & Roles" ], - "operationId": "get/wallet-types" - }, - "post": { + "summary": "Get default generated permissions", "responses": { "200": { - "description": "OK", + "description": "Returns the permissions tree", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletTypeResponse" + "type": "object", + "properties": { + "permissions": { + "$ref": "#/components/schemas/Users-Permissions-PermissionsTree" + } + } + }, + "example": { + "permissions": { + "api::content-type.content-type": { + "controllers": { + "controllerA": { + "find": { + "enabled": false, + "policy": "" + }, + "findOne": { + "enabled": false, + "policy": "" + }, + "create": { + "enabled": false, + "policy": "" + } + }, + "controllerB": { + "find": { + "enabled": false, + "policy": "" + }, + "findOne": { + "enabled": false, + "policy": "" + }, + "create": { + "enabled": false, + "policy": "" + } + } + } + } + } } } } }, - "400": { - "description": "Bad Request", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29629,19 +33723,62 @@ } } } - }, - "401": { - "description": "Unauthorized", + } + } + } + }, + "/users-permissions/roles": { + "get": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "List roles", + "responses": { + "200": { + "description": "Returns list of roles", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "roles": { + "type": "array", + "items": { + "allOf": [ + { + "$ref": "#/components/schemas/Users-Permissions-Role" + }, + { + "type": "object", + "properties": { + "nb_users": { + "type": "number" + } + } + } + ] + } + } + } + }, + "example": { + "roles": [ + { + "id": 1, + "name": "Public", + "description": "Default role given to unauthenticated user.", + "type": "public", + "createdAt": "2022-05-19T17:35:35.097Z", + "updatedAt": "2022-05-31T16:05:36.603Z", + "nb_users": 0 + } + ] } } } }, - "403": { - "description": "Forbidden", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29649,19 +33786,38 @@ } } } - }, - "404": { - "description": "Not Found", + } + } + }, + "post": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Create a role", + "requestBody": { + "$ref": "#/components/requestBodies/Users-Permissions-RoleRequest" + }, + "responses": { + "200": { + "description": "Returns ok if the role was create", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "ok": { + "type": "string", + "enum": [ + true + ] + } + } } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29670,39 +33826,65 @@ } } } - }, - "tags": [ - "Wallet-type" - ], - "parameters": [], - "operationId": "post/wallet-types", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WalletTypeRequest" - } - } - } } } }, - "/wallet-types/{id}": { + "/users-permissions/roles/{id}": { "get": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Get a role", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "description": "role Id" + } + ], "responses": { "200": { - "description": "OK", + "description": "Returns the role", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletTypeResponse" + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/Users-Permissions-Role" + } + } + }, + "example": { + "role": { + "id": 1, + "name": "Public", + "description": "Default role given to unauthenticated user.", + "type": "public", + "createdAt": "2022-05-19T17:35:35.097Z", + "updatedAt": "2022-05-31T16:05:36.603Z", + "permissions": { + "api::content-type.content-type": { + "controllers": { + "controllerA": { + "find": { + "enabled": true + } + } + } + } + } + } } } } }, - "400": { - "description": "Bad Request", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29710,19 +33892,51 @@ } } } - }, - "401": { - "description": "Unauthorized", + } + } + } + }, + "/users-permissions/roles/{role}": { + "put": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Update a role", + "parameters": [ + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string" + }, + "description": "role Id" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/Users-Permissions-RoleRequest" + }, + "responses": { + "200": { + "description": "Returns ok if the role was udpated", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "ok": { + "type": "string", + "enum": [ + true + ] + } + } } } } }, - "403": { - "description": "Forbidden", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29730,19 +33944,46 @@ } } } - }, - "404": { - "description": "Not Found", + } + } + }, + "delete": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Delete a role", + "parameters": [ + { + "in": "path", + "name": "role", + "required": true, + "schema": { + "type": "string" + }, + "description": "role Id" + } + ], + "responses": { + "200": { + "description": "Returns ok if the role was delete", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "type": "object", + "properties": { + "ok": { + "type": "string", + "enum": [ + true + ] + } + } } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29751,38 +33992,43 @@ } } } - }, + } + } + }, + "/users": { + "get": { "tags": [ - "Wallet-type" - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" - } - } + "Users-Permissions - Users & Roles" ], - "operationId": "get/wallet-types/{id}" - }, - "put": { + "summary": "Get list of users", "responses": { "200": { - "description": "OK", + "description": "Returns an array of users", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletTypeResponse" - } + "type": "array", + "items": { + "$ref": "#/components/schemas/Users-Permissions-User" + } + }, + "example": [ + { + "id": 9, + "username": "foao@strapi.io", + "email": "foao@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-06-01T18:32:35.211Z", + "updatedAt": "2022-06-01T18:32:35.217Z" + } + ] } } }, - "400": { - "description": "Bad Request", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29790,19 +34036,88 @@ } } } - }, - "401": { - "description": "Unauthorized", + } + } + }, + "post": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Create a user", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "username", + "email", + "password" + ], + "properties": { + "email": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "example": { + "username": "foo", + "email": "foo@strapi.io", + "password": "foo-password" + } + } + } + }, + "responses": { + "201": { + "description": "Returns created user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "allOf": [ + { + "$ref": "#/components/schemas/Users-Permissions-User" + }, + { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/Users-Permissions-Role" + } + } + } + ] + }, + "example": { + "id": 1, + "username": "foo", + "email": "foo@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-05-19T17:35:35.096Z", + "role": { + "id": 1, + "name": "X", + "description": "Default role given to authenticated user.", + "type": "authenticated", + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-06-04T07:11:59.551Z" + } } } } }, - "403": { - "description": "Forbidden", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29810,19 +34125,50 @@ } } } - }, - "404": { - "description": "Not Found", + } + } + } + }, + "/users/{id}": { + "get": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Get a user", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "description": "user Id" + } + ], + "responses": { + "200": { + "description": "Returns a user", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-User" + }, + "example": { + "id": 1, + "username": "foo", + "email": "foo@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-05-19T17:35:35.096Z" } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29831,49 +34177,98 @@ } } } - }, + } + }, + "put": { "tags": [ - "Wallet-type" + "Users-Permissions - Users & Roles" ], + "summary": "Update a user", "parameters": [ { - "name": "id", "in": "path", - "description": "", - "deprecated": false, + "name": "id", "required": true, "schema": { - "type": "number" - } + "type": "string" + }, + "description": "user Id" } ], - "operationId": "put/wallet-types/{id}", "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WalletTypeRequest" + "type": "object", + "required": [ + "username", + "email", + "password" + ], + "properties": { + "email": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + } + }, + "example": { + "username": "foo", + "email": "foo@strapi.io", + "password": "foo-password" } } } - } - }, - "delete": { + }, "responses": { "200": { - "description": "OK", + "description": "Returns updated user info", "content": { "application/json": { "schema": { - "type": "integer", - "format": "int64" + "allOf": [ + { + "$ref": "#/components/schemas/Users-Permissions-User" + }, + { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/Users-Permissions-Role" + } + } + } + ] + }, + "example": { + "id": 1, + "username": "foo", + "email": "foo@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-05-19T17:35:35.096Z", + "role": { + "id": 1, + "name": "X", + "description": "Default role given to authenticated user.", + "type": "authenticated", + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-06-04T07:11:59.551Z" + } } } } }, - "400": { - "description": "Bad Request", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29881,19 +34276,52 @@ } } } - }, - "401": { - "description": "Unauthorized", + } + } + }, + "delete": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Delete a user", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "description": "user Id" + } + ], + "responses": { + "200": { + "description": "Returns deleted user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "allOf": [ + { + "$ref": "#/components/schemas/Users-Permissions-User" + } + ] + }, + "example": { + "id": 1, + "username": "foo", + "email": "foo@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-05-19T17:35:35.096Z" } } } }, - "403": { - "description": "Forbidden", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29901,19 +34329,39 @@ } } } - }, - "404": { - "description": "Not Found", + } + } + } + }, + "/users/me": { + "get": { + "tags": [ + "Users-Permissions - Users & Roles" + ], + "summary": "Get authenticated user info", + "responses": { + "200": { + "description": "Returns user info", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/Users-Permissions-User" + }, + "example": { + "id": 1, + "username": "foo", + "email": "foo@strapi.io", + "provider": "local", + "confirmed": false, + "blocked": false, + "createdAt": "2022-05-19T17:35:35.096Z", + "updatedAt": "2022-05-19T17:35:35.096Z" } } } }, - "500": { - "description": "Internal Server Error", + "default": { + "description": "Error", "content": { "application/json": { "schema": { @@ -29922,24 +34370,57 @@ } } } - }, + } + } + }, + "/users/count": { + "get": { "tags": [ - "Wallet-type" + "Users-Permissions - Users & Roles" ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "", - "deprecated": false, - "required": true, - "schema": { - "type": "number" + "summary": "Get user count", + "responses": { + "200": { + "description": "Returns a number", + "content": { + "application/json": { + "schema": { + "type": "number" + }, + "example": 1 + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } } } - ], - "operationId": "delete/wallet-types/{id}" + } + } + } + }, + "tags": [ + { + "name": "Users-Permissions - Auth", + "description": "Authentication endpoints", + "externalDocs": { + "description": "Find out more", + "url": "https://docs.strapi.io/developer-docs/latest/plugins/users-permissions.html" + } + }, + { + "name": "Users-Permissions - Users & Roles", + "description": "Users, roles, and permissions endpoints", + "externalDocs": { + "description": "Find out more", + "url": "https://docs.strapi.io/developer-docs/latest/plugins/users-permissions.html" } } - } + ] } diff --git a/pdf-ui/CHANGELOG.md b/pdf-ui/CHANGELOG.md index 6c51dea..580e55f 100644 --- a/pdf-ui/CHANGELOG.md +++ b/pdf-ui/CHANGELOG.md @@ -7,6 +7,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 As a minor extension, we also keep a semantic version for the `UNRELEASED` changes. + +## [v1.0.3-alfa](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.3-beta) 2025-06-19 +- Fix Vote link visibility + +## [v1.0.3-alfa](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.3-alfa) 2025-06-19 +- Fix removed voting button for non drep on budget proposal + +## [v1.0.2-beta](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.2-beta) 2025-06-19 +- Fix submit to ga button +- Added pointer to links + +## [v1.0.2-alfa](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.2-alfa) 2025-06-18 +- Change login + +## [v1.0.0-beta](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.1-beta) 2025-06-18 +- Change login +- Fix Invalid Link Validation Bypassed in Proposal Creation via UI and API #3715 + +## [v1.0.1-alfa](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.1-alfa) 2025-06-12 +- Change: User verification mechanism changed to follow process + +## [v1.0.0-beta](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.0-beta) 2025-06-11 +- Fix Hard Fork Proposal type + +## [v1.0.0-alfa](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/1.0.0-alfa) 2025-06-05 +- Added Hard Fork Proposal type + +## [v0.7.0-beta-36](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-36) 2025-06-04 +- Fix data-testIds + +## [v0.7.0-beta-35](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-35) 2025-06-03 +- Fix data-testIds + +## [v0.7.0-beta-34](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-34) 2025-06-03 +- Fix data-testIds +- Adjust link validation in proposal + + +## [v0.7.0-beta-33](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-33) 2025-06-02 +- Remove CSS Rounded Edges on Creating Governance Action Pages on background +- Fix data-testIds + + + ## [v0.7.0-beta-32](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-32) 2025-05-29 - fix: Update data-testid attributes for improved accessibility in form… - Hardware Wallet warning #2575 wording updated diff --git a/pdf-ui/package-lock.json b/pdf-ui/package-lock.json index a812221..60cabe9 100644 --- a/pdf-ui/package-lock.json +++ b/pdf-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "@intersect.mbo/pdf-ui", - "version": "0.7.0-beta-32", + "version": "1.0.3-beta", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@intersect.mbo/pdf-ui", - "version": "0.7.0-beta-20", + "version": "1.0.0", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/pdf-ui/package.json b/pdf-ui/package.json index 25691f1..0563add 100644 --- a/pdf-ui/package.json +++ b/pdf-ui/package.json @@ -1,6 +1,6 @@ { "name": "@intersect.mbo/pdf-ui", - "version": "0.7.0-beta-32", + "version": "1.0.3-beta", "description": "Proposal discussion ui", "main": "./src/index.js", "exports": { diff --git a/pdf-ui/src/components/BudgetDiscussionParts/StepperActionButtons.jsx b/pdf-ui/src/components/BudgetDiscussionParts/StepperActionButtons.jsx index 6e661d2..dce5f6f 100644 --- a/pdf-ui/src/components/BudgetDiscussionParts/StepperActionButtons.jsx +++ b/pdf-ui/src/components/BudgetDiscussionParts/StepperActionButtons.jsx @@ -21,7 +21,6 @@ const StepperActionButtons = ({ backText = 'Back', errors, }) => { - console.log('🚀 ~ errors:', errors); // Calculate backStep if not provided const calculatedBackStep = backStep !== undefined ? backStep : nextStep - 2; const [continueDisabled, setContinueDisabled] = useState(false); diff --git a/pdf-ui/src/components/BudgetDiscussionPoll/index.jsx b/pdf-ui/src/components/BudgetDiscussionPoll/index.jsx index e3cb2f6..0650d7a 100644 --- a/pdf-ui/src/components/BudgetDiscussionPoll/index.jsx +++ b/pdf-ui/src/components/BudgetDiscussionPoll/index.jsx @@ -19,7 +19,9 @@ import { } from '../../lib/api'; import { decodeJWT, formatDateWithOffset } from '../../lib/utils'; import DrepVotersDialog from '../DrepVotersDialog'; -import { add } from 'date-fns'; +import { add, max } from 'date-fns'; +import { checkIfDrepIsSignedIn, checkShowValidation } from '../../lib/helpers'; +import UserValidation from '../UserValidation/UserValidation'; const BudgetDiscussionPoll = ({ fetchActivePoll = false, @@ -153,10 +155,35 @@ const BudgetDiscussionPoll = ({ } }, [user, poll]); + // user && + // userPollVote && + // poll?.attributes?.is_poll_active && + // (walletAPI?.voter?.isRegisteredAsDRep || + // walletAPI?.voter?.isRegisteredAsSoleVoter) && + // jwtData?.dRepID; + + // console.log('user', user); + // console.log('userPollVote', userPollVote); + // console.log('poll', poll?.attributes?.is_poll_active); + // console.log('walletAPI', walletAPI?.voter?.isRegisteredAsDRep); + // console.log('walletAPI', walletAPI?.voter?.isRegisteredAsSoleVoter); + // console.log('jwtData', jwtData); + // console.log('jwtData.dRepID', jwtData?.dRepID); + + // console.log( + // 'log', + // user && + // userPollVote && + // poll?.attributes?.is_poll_active && + // (walletAPI?.voter?.isRegisteredAsDRep || + // walletAPI?.voter?.isRegisteredAsSoleVoter) && + // jwtData?.dRepID + // ); + if (poll) { return ( <> - {user && + {/* {user && !userPollVote && (walletAPI?.voter?.isRegisteredAsDRep || walletAPI?.voter?.isRegisteredAsSoleVoter) && @@ -209,38 +236,106 @@ const BudgetDiscussionPoll = ({ - ) : null} + ) : null} */} - {proposalAuthorUsername ? ( - - @{proposalAuthorUsername} + + + Should this proposal be included in the next + Cardano Budget? - ) : null} - theme.palette.text.grey, - }} - mt={2} - > - {formatDateWithOffset( - new Date(poll?.attributes?.createdAt), - 0, - 'dd/MM/yyyy - p', - 'UTC' - )} - - - Poll Results - - - Do you support this proposal to be included in the - next Cardano Budget? - + {!(user && + userPollVote && + poll?.attributes?.is_poll_active && + (walletAPI?.voter?.isRegisteredAsDRep || + walletAPI?.voter + ?.isRegisteredAsSoleVoter) && + jwtData?.dRepID) && ( + + {checkShowValidation( + true, + walletAPI, + user + ) ? ( + + ) : + + (walletAPI?.voter?.isRegisteredAsDRep || + walletAPI?.voter + ?.isRegisteredAsSoleVoter)&&( + + + + + )} + + )} + { const { setLoading, @@ -125,7 +132,9 @@ const CommentCard = ({ loadSubComments(1); setCommentHasReplays(true); setShowReply(false); - setRefetchProposal(true); + if (!newComment?.data?.attributes?.comment_parent_id) { + setRefetchProposal(true); + } addSuccessAlert('Commented successfully'); } catch (error) { addErrorAlert('Failed to comment'); @@ -498,34 +507,58 @@ const CommentCard = ({ {proposal?.attributes?.content?.attributes ?.prop_submitted ? null : ( - + + {checkShowValidation( + true, + walletAPI, + user + ) && ( + + )} + + )} - {showReply && ( + {showReply ? ( - )} + ) : null} {showSubcomments && subcommnetsList?.map((subcomment, index) => ( diff --git a/pdf-ui/src/components/CreateGovernanceActionDialog/index.jsx b/pdf-ui/src/components/CreateGovernanceActionDialog/index.jsx index d49eeb1..e47b649 100644 --- a/pdf-ui/src/components/CreateGovernanceActionDialog/index.jsx +++ b/pdf-ui/src/components/CreateGovernanceActionDialog/index.jsx @@ -54,6 +54,8 @@ const CreateGovernanceActionDialog = ({ open = false, onClose = false }) => { const [linksErrors, setLinksErrors] = useState({}); const [withdrawalsErrors, setWithdrawalsErrors] = useState({}); const [constitutionErrors, setConstitutionErrors] = useState({}); + const [hardForkErrors, setHardForkErrors] = useState({}); + const [committeeErrors, setCommitteeErrors] = useState({}); const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down('sm') ); @@ -141,6 +143,19 @@ const CreateGovernanceActionDialog = ({ open = false, onClose = false }) => { ) return setIsContinueDisabled(true); } else { + + setIsContinueDisabled(false); + } + } + if (proposalData?.gov_action_type_id == 6) { + if ( + !proposalData?.proposal_hard_fork_content?.major || + hardForkErrors?.major || + !proposalData?.proposal_hard_fork_content?.minor || + hardForkErrors?.minor + ) { + return setIsContinueDisabled(true); + } else { setIsContinueDisabled(false); } } @@ -309,6 +324,10 @@ const CreateGovernanceActionDialog = ({ open = false, onClose = false }) => { setConstitutionErrors={ setConstitutionErrors } + hardForkErrors={hardForkErrors} + setHardForkErrors={setHardForkErrors} + committeeErrors={committeeErrors} + setCommitteeErrors={setCommitteeErrors} /> )} diff --git a/pdf-ui/src/components/CreationGoveranceAction/CommitteeManager.jsx b/pdf-ui/src/components/CreationGoveranceAction/CommitteeManager.jsx new file mode 100644 index 0000000..d339907 --- /dev/null +++ b/pdf-ui/src/components/CreationGoveranceAction/CommitteeManager.jsx @@ -0,0 +1,68 @@ +import { Box, TextField } from '@mui/material'; +import React from 'react'; + +const CommitteeManager = ({ + proposalData, + setProposalData, + committeeManagerErrors, + setCommitteeManagerErrors, +}) => { + return ( + <> + + {}} + required + inputProps={{ + 'data-testid': `numerator-input`, + }} + error={!!committeeManagerErrors?.numerator} + helperText={committeeManagerErrors?.numerator} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `numerator-error`, + }} + /> + + + {}} + required + inputProps={{ + 'data-testid': `denominator-input`, + }} + error={!!committeeManagerErrors?.denominator} + helperText={committeeManagerErrors?.denominator} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `denominator-error`, + }} + /> + + + ); +}; + +export default CommitteeManager; diff --git a/pdf-ui/src/components/CreationGoveranceAction/HardForkManager.jsx b/pdf-ui/src/components/CreationGoveranceAction/HardForkManager.jsx new file mode 100644 index 0000000..b4db9d4 --- /dev/null +++ b/pdf-ui/src/components/CreationGoveranceAction/HardForkManager.jsx @@ -0,0 +1,201 @@ +import { Box, minor, TextField } from '@mui/material'; +import React, { useEffect } from 'react'; +import { getHardForkData } from '../../lib/api'; +import { numberValidation } from '../../lib/utils'; + +const HardForkManager = ({ + proposalData, + setProposalData, + hardForkErrors, + setHardForkErrors, + isEdit = null, // Flag to indicate if the component is in edit mode +}) => { + const fetchAndSetHardForkData = async () => { + try { + const resp = await getHardForkData(); + const data = resp.data; + + if (data) { + setProposalData((prevData) => ({ + ...prevData, + proposal_hard_fork_content: { + ...prevData.proposal_hard_fork_content, + previous_ga_hash: data.hash, + previous_ga_id: data.id, + }, + })); + } + } catch (error) { + console.error('Error fetching hard fork data:', error); + } + }; + + useEffect(() => { + if (isEdit === false) + fetchAndSetHardForkData(); + + }, []); + useEffect(() => { + if (isEdit === true) + { + if(proposalData?.proposal_hard_fork_content?.data?.attributes) + { + let temp = proposalData?.proposal_hard_fork_content?.data?.attributes; + + setProposalData((prevData) => ({ + ...prevData, + proposal_hard_fork_content: { + previous_ga_hash: temp?.previous_ga_hash, + previous_ga_id: temp?.previous_ga_id, + major: temp?.major, + minor: temp?.minor, + + }})) + }} + }, [proposalData?.proposal_hard_fork_content?.data?.attributes]); + const handleHardForkDataChange = (field, value) => { + setProposalData((prevData) => ({ + ...prevData, + proposal_hard_fork_content: { + ...prevData.proposal_hard_fork_content, + [field]: value, + }, + })); + const validationError = validateNumberInput(value); + if (!validationError.value) { + setHardForkErrors((prevErrors) => { + const { [field]: removed, ...rest } = prevErrors; + return rest; + }); + } else { + setHardForkErrors((prevErrors) => ({ + ...prevErrors, + [field]: validationError.text, + })); + } + }; + + const validateNumberInput = (value) => { + if (isNaN(value) || value === '') { + return { value: true, text: 'Please enter a valid number' }; + } else if (value < 0) { + return { value: true, text: 'Number cannot be negative' }; + } else { + return { value: false, text: '' }; + } + }; + return ( + <> + + {}} + // required + disabled + inputProps={{ + 'data-testid': `previous-ga-hash-input`, + }} + error={!!hardForkErrors?.previous_ga_hash} + helperText={hardForkErrors?.previous_ga_hash} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `previous-ga-hash-error`, + }} + /> + + + {}} + // required + inputProps={{ + 'data-testid': `previous-ga-id-input`, + }} + error={!!hardForkErrors?.previous_ga_id} + helperText={hardForkErrors?.previous_ga_id} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `previous-ga-id-error`, + }} + /> + + + + { + handleHardForkDataChange('major', e.target.value); + }} + required + inputProps={{ + 'data-testid': `major-input`, + }} + error={!!hardForkErrors?.major} + helperText={hardForkErrors?.major} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `major-error`, + }} + /> + + + { + handleHardForkDataChange('minor', e.target.value); + }} + required + inputProps={{ + 'data-testid': `minor-input`, + }} + error={!!hardForkErrors?.minor} + helperText={hardForkErrors?.minor} + FormHelperTextProps={{ + sx: { + backgroundColor: 'transparent', + }, + 'data-testid': `minor-error`, + }} + /> + + + ); +}; +export default HardForkManager; \ No newline at end of file diff --git a/pdf-ui/src/components/CreationGoveranceAction/LinkManager.jsx b/pdf-ui/src/components/CreationGoveranceAction/LinkManager.jsx index e417d3d..d45a7ca 100644 --- a/pdf-ui/src/components/CreationGoveranceAction/LinkManager.jsx +++ b/pdf-ui/src/components/CreationGoveranceAction/LinkManager.jsx @@ -51,10 +51,23 @@ const LinkManager = ({ if (value.length > 255) { textError = 'Text must be 255 characters or less'; } + if (value.trim() === '') { + textError = 'Text cannot be empty'; + } setLinksErrors((prev) => { - if (value === '' || value < 255) { - const { [index]: removed, ...rest } = prev; - return rest; + if (textError === '') { + const currentErrors = prev[index] || {}; + const { text, ...otherErrors } = currentErrors; + + if (Object.keys(otherErrors).length === 0) { + const { [index]: removed, ...rest } = prev; + return rest; + } else { + return { + ...prev, + [index]: otherErrors, + }; + } } return { ...prev, @@ -95,6 +108,8 @@ const LinkManager = ({ }); }; + console.log('linksErrors', linksErrors); + return ( {proposalData?.proposal_links?.map((link, index) => ( diff --git a/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx b/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx index 7196dff..376a318 100644 --- a/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx +++ b/pdf-ui/src/components/CreationGoveranceAction/Step2.jsx @@ -13,6 +13,8 @@ import { useAppContext } from '../../context/context'; import { getGovernanceActionTypes } from '../../lib/api'; import { containsString, maxLengthCheck } from '../../lib/utils'; import { set } from 'date-fns'; +import HardForkManager from './HardForkManager'; +import CommitteeManager from './CommitteeManager'; const Step2 = ({ setStep, proposalData, @@ -32,6 +34,10 @@ const Step2 = ({ setWithdrawalsErrors, constitutionErrors, setConstitutionErrors, + hardForkErrors, + setHardForkErrors, + committeeErrors, + setCommitteeErrors, }) => { const titleMaxLength = 80; const abstractMaxLength = 2500; @@ -145,7 +151,6 @@ const Step2 = ({ (typeof err?.url === 'string' && err.url.trim() !== '') || (typeof err?.text === 'string' && err.text.trim() !== '') ); - console.log('🚀 ~ useEffect ~ hasLinkError:', hasLinkError); if (hasLinkError) { setIsDraftDisabled(true); return; @@ -219,7 +224,6 @@ const Step2 = ({ Proposal Details - ))} - - - - ) : null } + { + /// 'Committee' + selectedGovActionId === 5 ? ( + + ) : null + } + { + /// 'Hard Fork' + selectedGovActionId === 6 ? ( + + ) : null + } - - {proposalData?.prop_name} - - */} - */} - ) : null} + {selectedGATypeId == 6 ? ( + <> + + + Previous Gov Action Hash + + + { + proposalData?.proposal_hard_fork_content + ?.previous_ga_hash + } + + + + + Previous Gov Action ID + + + { + proposalData?.proposal_hard_fork_content + ?.previous_ga_id + } + + + + + + Major version + + + { + proposalData?.proposal_hard_fork_content + ?.major + } + + + + + Minor version + + + { + proposalData?.proposal_hard_fork_content + ?.minor + } + + + + ) : null} + {proposalData?.proposal_links?.length > 0 && ( ({ diff --git a/pdf-ui/src/components/CreationGoveranceAction/index.js b/pdf-ui/src/components/CreationGoveranceAction/index.js index a979055..ac188ab 100644 --- a/pdf-ui/src/components/CreationGoveranceAction/index.js +++ b/pdf-ui/src/components/CreationGoveranceAction/index.js @@ -2,7 +2,9 @@ export { default as Step1 } from './Step1'; export { default as Step2 } from './Step2'; export { default as Step3 } from './Step3'; export { default as LinkManager } from './LinkManager'; -export { default as WithdrawalsManager} from "./WithdrawalsManager"; +export { default as WithdrawalsManager } from './WithdrawalsManager'; export { default as Step3Modal } from './Step3Modal'; export { default as DraftSuccessfulModal } from './DraftSuccessfulModal'; export { default as ConstitutionManager } from './ConstitutionManager'; +export { default as HardForkManager } from './HardForkManager'; +export { default as CommitteeManager } from './CommitteeManager'; diff --git a/pdf-ui/src/components/EditProposalDialog/index.jsx b/pdf-ui/src/components/EditProposalDialog/index.jsx index b07ddb2..f0c0cd2 100644 --- a/pdf-ui/src/components/EditProposalDialog/index.jsx +++ b/pdf-ui/src/components/EditProposalDialog/index.jsx @@ -1,16 +1,47 @@ 'use client'; import { useTheme } from '@emotion/react'; -import { IconCheveronLeft,IconInformationCircle,IconPencil,IconTrash,IconX} from '@intersect.mbo/intersectmbo.org-icons-set'; -import { Box, Button, Card, CardContent, Dialog, Grid, IconButton, MenuItem, Modal,TextField,Typography,useMediaQuery,Checkbox,FormControlLabel} from '@mui/material'; +import { + IconCheveronLeft, + IconInformationCircle, + IconPencil, + IconTrash, + IconX, +} from '@intersect.mbo/intersectmbo.org-icons-set'; +import { + Box, + Button, + Card, + CardContent, + Dialog, + Grid, + IconButton, + MenuItem, + Modal, + TextField, + Typography, + useMediaQuery, + Checkbox, + FormControlLabel, +} from '@mui/material'; import { useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAppContext } from '../../context/context'; -import { createProposalContent, deleteProposal, getGovernanceActionTypes} from '../../lib/api'; -import { containsString, formatIsoDate, isRewardAddress, maxLengthCheck, numberValidation} from '../../lib/utils'; -import { LinkManager } from '../CreationGoveranceAction'; +import { + createProposalContent, + deleteProposal, + getGovernanceActionTypes, +} from '../../lib/api'; +import { + containsString, + formatIsoDate, + isRewardAddress, + maxLengthCheck, + numberValidation, +} from '../../lib/utils'; +import { HardForkManager, LinkManager } from '../CreationGoveranceAction'; import { WithdrawalsManager } from '../CreationGoveranceAction'; -import { ConstitutionManager } from '../CreationGoveranceAction'; +import { ConstitutionManager } from '../CreationGoveranceAction'; import DeleteProposalModal from '../DeleteProposalModal'; import CreateGA2 from '../../assets/svg/CreateGA2.jsx'; const style = { @@ -71,7 +102,8 @@ const EditProposalDialog = ({ }); const [linksErrors, setLinksErrors] = useState({}); const [withdrawalsErrors, setWithdrawalsErrors] = useState({}); - const [constitutionErrors,setConstitutionErrors] = useState({}); + const [constitutionErrors, setConstitutionErrors] = useState({}); + const [hardForkErrors, setHardForkErrors] = useState({}); const isSmallScreen = useMediaQuery((theme) => theme.breakpoints.down('sm') ); @@ -99,23 +131,27 @@ const EditProposalDialog = ({ setIsSaveDisabled(false); } } - if (draft?.gov_action_type_id==2) { - if ( - draft?.proposal_withdrawals?.some( - (proposal_withdrawal) => !proposal_withdrawal || !proposal_withdrawal.prop_receiving_address - ) || - Object.values(withdrawalsErrors).some((error) => error.prop_receiving_address) - ) { - return setIsSaveDisabled(true); - } else { - setIsSaveDisabled(false); - } + if (draft?.gov_action_type_id == 2) { + if ( + draft?.proposal_withdrawals?.some( + (proposal_withdrawal) => + !proposal_withdrawal || + !proposal_withdrawal.prop_receiving_address + ) || + Object.values(withdrawalsErrors).some( + (error) => error.prop_receiving_address + ) + ) { + return setIsSaveDisabled(true); + } else { + setIsSaveDisabled(false); + } } - if (draft?.gov_action_type_id==3){ - if ((draft?.proposal_constitution_content?.prop_constitution_url =='') - || - constitutionErrors.prop_constitution_url - || + if (draft?.gov_action_type_id == 3) { + if ( + draft?.proposal_constitution_content + ?.prop_constitution_url == '' || + constitutionErrors.prop_constitution_url || constitutionErrors.prop_guardrails_script_url ) { return setIsSaveDisabled(true); @@ -123,9 +159,35 @@ const EditProposalDialog = ({ setIsSaveDisabled(false); } } + if (draft?.gov_action_type_id == 6) { + if ( + draft?.proposal_hard_fork_content?.major == '' || + draft?.proposal_hard_fork_content?.minor == '' || + isNaN(Number(draft?.proposal_hard_fork_content?.major)) || + isNaN(Number(draft?.proposal_hard_fork_content?.minor)) + ) { + return setIsSaveDisabled(true); + } else { + setIsSaveDisabled(false); + } + } + // if(draft?.gov_action_type_id == 6){ + // console.log(draft,"drafttttt") + // draft.proposal_hard_fork_content.id = draft.proposal_hard_fork_content.data.id + // draft.proposal_hard_fork_content.previous_ga_hash = draft.proposal_hard_fork_content.data.attributes.previous_ga_hash + // draft.proposal_hard_fork_content.previous_ga_id = draft.proposal_hard_fork_content.data.attributes.previous_ga_id + // draft.proposal_hard_fork_content.major = draft.proposal_hard_fork_content.data.attributes.major + // draft.proposal_hard_fork_content.minor = draft.proposal_hard_fork_content.data.attributes.minor + // // delete draft.proposal_hard_fork_content.data + // setDraftData(draft) + // } - const selectedLabel = governanceActionTypes.find((option) => option?.value === draft?.gov_action_type_id)?.label; - const selectedType = governanceActionTypes.find((option) => option?.value === draft?.gov_action_type_id)?.value; + const selectedLabel = governanceActionTypes.find( + (option) => option?.value === draft?.gov_action_type_id + )?.label; + const selectedType = governanceActionTypes.find( + (option) => option?.value === draft?.gov_action_type_id + )?.value; if (selectedType === 2) { if ( @@ -143,10 +205,12 @@ const EditProposalDialog = ({ } if (selectedType === 3) { if ( - draft?.proposal_constitution_content.prop_constitution_url && + draft?.proposal_constitution_content + .prop_constitution_url && !errors?.prop_constitution_url && - draft?.proposal_constitution_content.prop_guardrails_script_url && - !errors?.prop_guardrails_script_url + draft?.proposal_constitution_content + .prop_guardrails_script_url && + !errors?.prop_guardrails_script_url ) { setIsSaveDisabled(false); } else { @@ -173,11 +237,17 @@ const EditProposalDialog = ({ prop_rationale: proposalData?.attributes?.content?.attributes?.prop_rationale, proposal_withdrawals: - proposalData?.attributes?.content?.attributes?.proposal_withdrawals, + proposalData?.attributes?.content?.attributes + ?.proposal_withdrawals, proposal_links: proposalData?.attributes?.content?.attributes?.proposal_links, proposal_constitution_content: - proposalData?.attributes?.content?.attributes?.proposal_constitution_content || {} + proposalData?.attributes?.content?.attributes + ?.proposal_constitution_content, + proposal_hard_fork_content: + proposalData?.attributes?.content?.attributes + ?.proposal_hard_fork_content + || {}, }; return draft; }; @@ -243,8 +313,16 @@ const EditProposalDialog = ({ } try { + let payload = {...draft, proposal_hard_fork_content : + { + previous_ga_hash : draft.proposal_hard_fork_content.previous_ga_hash, + previous_ga_id : draft.proposal_hard_fork_content.previous_ga_id, + major : draft.proposal_hard_fork_content.major, + minor : draft.proposal_hard_fork_content.minor + } + } const response = await createProposalContent({ - ...draft, + ...payload, ...proposalConentObj, }); if (!response) return; @@ -300,11 +378,18 @@ const EditProposalDialog = ({ prop_amount: null, })); - if(selectedValue != 3) - { //cleanup fields co + if (selectedValue != 3) { + //cleanup fields co setDraft((prev) => ({ ...prev, - proposal_constitution_content:{} + proposal_constitution_content: {}, + })); + } + + if (selectedValue !== 6) { + setDraft((prev) => ({ + ...prev, + proposal_hard_fork_content: {}, })); } setSelectedGovActionId(selectedValue); @@ -323,753 +408,840 @@ const EditProposalDialog = ({ return ( <> - - - + + - - Edit Proposal - - - - - - + + Edit Proposal + + + + + - - - + + - - theme.palette.text.orange - } - gutterBottom - > - REQUIRED - - - - Proposal Details - - - - - - + REQUIRED + - - - - - {`Last Edit: ${ - proposal?.attributes - ?.updatedAt - ? formatIsoDate( - proposal - ?.attributes - ?.updatedAt - ) - : '--' - }`} + Proposal Details - - - - {governanceActionTypes?.map( - (option) => ( - + + + - - handleTextAreaChange( - e, - 'prop_name', - 'name' - ) - } - required - inputProps={{ - 'data-testid': 'title-input', - }} - error={errors?.name} - helperText={helperText?.name} - FormHelperTextProps={{ - 'data-testid': - 'title-input-error', - }} - /> + + + + + {`Last Edit: ${ + proposal?.attributes + ?.updatedAt + ? formatIsoDate( + proposal + ?.attributes + ?.updatedAt + ) + : '--' + }`} + + + - - handleTextAreaChange( - e, - 'prop_abstract', - 'abstract' - ) - } - required - helperText={ - helperText?.abstract ? ( - helperText?.abstract - ) : ( - <> - - * A short summary of - your proposal - - + {governanceActionTypes?.map( + (option) => ( + - {`${ - draft - ?.prop_abstract - ?.length || - 0 - }/${abstractMaxLength}`} - - - ) - } - InputProps={{ - inputProps: { - maxLength: - abstractMaxLength, - 'data-testid': - 'abstract-input', - }, - }} - error={errors?.abstract} - FormHelperTextProps={{ - 'data-testid': errors?.abstract - ? 'abstract-helper-error' - : 'abstract-helper', - }} - /> + {option?.label} + + ) + )} + - - handleTextAreaChange( - e, - 'prop_motivation', - 'motivation' - ) - } - required - helperText={ - helperText?.motivation ? ( - helperText?.motivation - ) : ( - <> - - * What problem is - your proposal - solving? - - - {`${ - draft - ?.prop_motivation - ?.length || - 0 - }/${motivationRationaleMaxLength}`} - - - ) - } - InputProps={{ - inputProps: { - maxLength: - motivationRationaleMaxLength, + + handleTextAreaChange( + e, + 'prop_name', + 'name' + ) + } + required + inputProps={{ 'data-testid': - 'motivation-input', - }, - }} - error={errors?.motivation} - FormHelperTextProps={{ - 'data-testid': - errors?.motivation - ? 'motivation-helper-error' - : 'motivation-helper', - }} - /> + 'title-input', + }} + error={errors?.name} + helperText={helperText?.name} + FormHelperTextProps={{ + 'data-testid': + 'title-input-error', + }} + /> - - handleTextAreaChange( - e, - 'prop_rationale', - 'rationale' - ) - } - required - helperText={ - helperText?.rationale ? ( - helperText?.rationale - ) : ( - <> - - * How does the - on-chain change - solve the problem? - - - {`${ - draft - ?.prop_rationale - ?.length || - 0 - }/${motivationRationaleMaxLength}`} - - - ) - } - InputProps={{ - inputProps: { - maxLength: - motivationRationaleMaxLength, + + handleTextAreaChange( + e, + 'prop_abstract', + 'abstract' + ) + } + required + helperText={ + helperText?.abstract ? ( + helperText?.abstract + ) : ( + <> + + * A short + summary of your + proposal + + + {`${ + draft + ?.prop_abstract + ?.length || + 0 + }/${abstractMaxLength}`} + + + ) + } + InputProps={{ + inputProps: { + maxLength: + abstractMaxLength, + 'data-testid': + 'abstract-input', + }, + }} + error={errors?.abstract} + FormHelperTextProps={{ 'data-testid': - 'rationale-input', - }, - }} - error={errors?.rationale} - FormHelperTextProps={{ - 'data-testid': errors?.rationale - ? 'rationale-helper-error' - : 'rationale-helper', - }} - /> + errors?.abstract + ? 'abstract-helper-error' + : 'abstract-helper', + }} + /> - {/// 'Treasury' - selectedGovActionId === 2 - ? ( - <> - + handleTextAreaChange( + e, + 'prop_motivation', + 'motivation' + ) + } + required + helperText={ + helperText?.motivation ? ( + helperText?.motivation + ) : ( + <> + + * What problem + is your proposal + solving? + + + {`${ + draft + ?.prop_motivation + ?.length || + 0 + }/${motivationRationaleMaxLength}`} + + + ) + } + InputProps={{ + inputProps: { + maxLength: + motivationRationaleMaxLength, + 'data-testid': + 'motivation-input', + }, + }} + error={errors?.motivation} + FormHelperTextProps={{ + 'data-testid': + errors?.motivation + ? 'motivation-helper-error' + : 'motivation-helper', + }} /> - - ) : null} - { /// 'Constitution' - selectedGovActionId === 3 ? ( - - ) : null - } - - - - - theme.palette.text.orange - } - gutterBottom - > - OPTIONAL - - - References and Supporting - Information - + + handleTextAreaChange( + e, + 'prop_rationale', + 'rationale' + ) + } + required + helperText={ + helperText?.rationale ? ( + helperText?.rationale + ) : ( + <> + + * How does the + on-chain change + solve the + problem? + + + {`${ + draft + ?.prop_rationale + ?.length || + 0 + }/${motivationRationaleMaxLength}`} + + + ) + } + InputProps={{ + inputProps: { + maxLength: + motivationRationaleMaxLength, + 'data-testid': + 'rationale-input', + }, + }} + error={errors?.rationale} + FormHelperTextProps={{ + 'data-testid': + errors?.rationale + ? 'rationale-helper-error' + : 'rationale-helper', + }} + /> - - theme.palette.text.grey + { + /// 'Treasury' + selectedGovActionId === 2 ? ( + <> + + + ) : null } - gutterBottom - > - Links to additional content or - social media contacts (up to 7 - entries) - - - - - - - + + theme.palette.text + .orange + } + gutterBottom + > + OPTIONAL + + + + References and Supporting + Information + + + + theme.palette.text.grey + } + gutterBottom + > + Links to additional content + or social media contacts (up + to 7 entries) + + + - + - + + - Publish with new edits - + + - - - + + + - - - - - theme.palette.border.lightGray - } - > + + + theme.palette.border.lightGray + } > - - Proposal saved to drafts - - + + Proposal saved to drafts + + { + handleCloseSaveDraftModal(); + handleCloseEditDialog(); + + setMounted(false); + }} + > + + + + + + - - - - - - - - - theme.palette.border.lightGray - } - > + + + Please confirm applied changes + + { + handleClosePublishModal(); + }} + > + + + + - - Please confirm applied changes - - { + await handleUpdatePorposal(false); + handleCloseSaveDraftModal(); + handleCloseEditDialog(); + setMounted(false); + }} + data-testid='confirm-button' + > + Confirm + + - - - - - - - { - handleCloseEditDialog(); - navigate('/proposal_discussion'); - if (setShouldRefresh) { - setShouldRefresh(true); - } - }} - > - - - theme.palette.border.lightGray + + { + handleCloseEditDialog(); + navigate('/proposal_discussion'); + if (setShouldRefresh) { + setShouldRefresh(true); } - > + }} + > + + theme.palette.border.lightGray + } > - - Proposal Deleted + + + Proposal Deleted + + { + setOpenDeleteConfirmationModal( + false + ); + handleCloseEditDialog(); + navigate('/proposal_discussion'); + if (setShouldRefresh) { + setShouldRefresh(true); + } + }} + > + + + + theme.palette.text.grey} + > + The proposal has been deleted successfully. - + + - theme.palette.text.grey} - > - The proposal has been deleted successfully. - - - - + + setShowProposalDeleteModal(false)} + handleDeleteProposal={handleDeleteProposal} + /> + + - - setShowProposalDeleteModal(false)} - handleDeleteProposal={handleDeleteProposal} - /> - - - - + ); }; diff --git a/pdf-ui/src/components/GlobalWrapper.jsx b/pdf-ui/src/components/GlobalWrapper.jsx index 8af5c2c..d72f524 100644 --- a/pdf-ui/src/components/GlobalWrapper.jsx +++ b/pdf-ui/src/components/GlobalWrapper.jsx @@ -44,6 +44,10 @@ const GlobalWrapper = ({ ...props }) => { setAddWarningAlert, addChangesSavedAlert, setAddChangesSavedAlert, + showIdentificationPage, + setShowIdentificationPage, + setLoading, + setGovtoolProps, } = useAppContext(); const [mounted, setMounted] = useState(false); @@ -61,6 +65,12 @@ const GlobalWrapper = ({ ...props }) => { addChangesSavedAlert: GovToolAddChangesSavedAlert, } = props; + useEffect(() => { + setLoading(true); + setGovtoolProps(props); + setLoading(false); + }, [GovToolAssemblyWalletAPI]); + function getProposalID(url) { const parts = url.split('/'); const lastSegment = parts[parts.length - 1]; @@ -82,7 +92,9 @@ const GlobalWrapper = ({ ...props }) => { const handleLogin = async (trigerSignData, useDRepKey = false) => { if (GovToolAssemblyWalletAPI?.address) { - setWalletAPI(GovToolAssemblyWalletAPI); + setWalletAPI((prevWalletAPI) => { + return GovToolAssemblyWalletAPI; + }); if (GovToolAssemblyValidateMetadata) { setValidateMetadata(() => GovToolAssemblyValidateMetadata); } @@ -162,12 +174,14 @@ const GlobalWrapper = ({ ...props }) => { }, [GovToolAddChangesSavedAlert]); useEffect(() => { - if (!mounted) { - setMounted(true); - } else { - handleLogin(false); + if (!user) { + if (!mounted) { + setMounted(true); + } else { + handleLogin(false); + } } - }, [GovToolAssemblyWalletAPI?.address, mounted]); + }, [GovToolAssemblyWalletAPI?.address, mounted, props?.walletAPI]); useEffect(() => { if (GovToolAssemblyLocale) { @@ -218,70 +232,70 @@ const GlobalWrapper = ({ ...props }) => { const renderComponentBasedOnPath = (path) => { if (GovToolAssemblyPdfApiUrl) { - if (!user && GovToolAssemblyWalletAPI?.address) { - return ; - } else { - if ( - GovToolAssemblyWalletAPI?.dRepID && - (GovToolAssemblyWalletAPI?.voter?.isRegisteredAsDRep || - GovToolAssemblyWalletAPI?.voter - ?.isRegisteredAsSoleVoter) - ) { - const jwtData = decodeJWT(); + // if ( + // !user && + // GovToolAssemblyWalletAPI?.address && + // showIdentificationPage + // ) { + // return ; + // } else { + // if ( + // GovToolAssemblyWalletAPI?.dRepID && + // (GovToolAssemblyWalletAPI?.voter?.isRegisteredAsDRep || + // GovToolAssemblyWalletAPI?.voter + // ?.isRegisteredAsSoleVoter) + // ) { + // const jwtData = decodeJWT(); - if (jwtData) { - let jwtDrepId = jwtData?.dRepID; - if (!jwtDrepId) { - return ( - - ); - } - } else { - return null; - } - } - if (path.includes('propose')) { - return ; - } else if ( - path.includes( - 'proposal_discussion/proposal_comment_review/' - ) && - getReviewHash(path) - ) { - return ( - - ); - } else if ( - path.includes('budget_discussion/') && - getProposalID(path) - ) { - return ; - } else if (path.includes('budget_discussion')) { - return ; - } else if ( - path.includes('proposal_discussion/') && - getProposalID(path) - ) { - return ; - } else if (path.includes('proposal_discussion')) { - return ; - } else { - return ; - } + // if (jwtData) { + // let jwtDrepId = jwtData?.dRepID; + // if (!jwtDrepId) { + // return ( + // + // ); + // } + // } else { + // return null; + // } + // } + if (path.includes('propose')) { + return ; + } else if ( + path.includes('proposal_discussion/proposal_comment_review/') && + getReviewHash(path) + ) { + return ; + } else if ( + path.includes('budget_discussion/') && + getProposalID(path) + ) { + return ; + } else if (path.includes('budget_discussion')) { + return ; + } else if ( + path.includes('proposal_discussion/') && + getProposalID(path) + ) { + return ; + } else if (path.includes('proposal_discussion')) { + return ; + } else { + return ; } - } else { - return null; } + // } else { + // return null; + // } }; return ( diff --git a/pdf-ui/src/components/ProposalCard/index.jsx b/pdf-ui/src/components/ProposalCard/index.jsx index dbfc217..f1902e2 100644 --- a/pdf-ui/src/components/ProposalCard/index.jsx +++ b/pdf-ui/src/components/ProposalCard/index.jsx @@ -334,7 +334,7 @@ const ProposalCard = ({ proposal?.attributes?.content ?.attributes?.prop_abstract || '' } - testId={`abstract-content`} + testId={`proposal-${proposal?.id}-abstract-content`} /> diff --git a/pdf-ui/src/components/ProposalSubmissionDialog/index.jsx b/pdf-ui/src/components/ProposalSubmissionDialog/index.jsx index 0fc5a0c..9101506 100644 --- a/pdf-ui/src/components/ProposalSubmissionDialog/index.jsx +++ b/pdf-ui/src/components/ProposalSubmissionDialog/index.jsx @@ -24,6 +24,9 @@ const ProposalSubmissionDialog = ({ open={openEditDialog} onClose={handleCloseSubmissionDialog} data-testid='proposal-submission-dialog' + PaperProps={{ + sx: { borderRadius: 0 }, + }} > { url: fileURL, }); } - + else if(parseInt(proposalGATypeId) === 6) + { ///Hard Fork Initiation + govActionBuilder = + await walletAPI.buildHardForkInitiationGovernanceActions({ + prevGovernanceActionHash: proposal?.attributes?.content?.attributes?.proposal_hard_fork_content.previous_ga_hash, + prevGovernanceActionIndex: proposal?.attributes?.content?.attributes?.proposal_hard_fork_content.previous_ga_id, + major: proposal?.attributes?.content?.attributes?.proposal_hard_fork_content.major, + minor: proposal?.attributes?.content?.attributes?.proposal_hard_fork_content.minor, + hash: hashData, + url: fileURL, + }); + } if (govActionBuilder) { const tx = await walletAPI.buildSignSubmitConwayCertTx({ diff --git a/pdf-ui/src/components/UserValidation/UserValidation.jsx b/pdf-ui/src/components/UserValidation/UserValidation.jsx new file mode 100644 index 0000000..fd88658 --- /dev/null +++ b/pdf-ui/src/components/UserValidation/UserValidation.jsx @@ -0,0 +1,324 @@ +import { + Box, + Button, + Card, + CardContent, + List, + ListItem, + Typography, +} from '@mui/material'; +import React, { useMemo, useEffect, useState } from 'react'; +import { Link } from '@mui/material'; +import { IdentificationPage } from '../../pages'; +import { useAppContext } from '../../context/context'; +import { loginUserToApp } from '../../lib/helpers'; +import { + clearSession, + decodeJWT, + getDataFromSession, + saveDataInSession, +} from '../../lib/utils'; +import { getRefreshToken } from '../../lib/api'; + +const UserValidation = ({ + type = 'budget', + drepCheck = false, + drepRequired = false, +}) => { + const { + setWalletAPI, + loading, + setLocale, + walletAPI, + setUser, + openUsernameModal, + setOpenUsernameModal, + setValidateMetadata, + user, + clearStates, + setFetchDRepVotingPowerList, + addSuccessAlert, + setAddSuccessAlert, + addErrorAlert, + setAddErrorAlert, + addWarningAlert, + setAddWarningAlert, + addChangesSavedAlert, + setAddChangesSavedAlert, + showIdentificationPage, + setShowIdentificationPage, + govtoolProps, + } = useAppContext(); + + const [mounted, setMounted] = useState(false); + + const { + walletAPI: GovToolAssemblyWalletAPI, + locale: GovToolAssemblyLocale, + validateMetadata: GovToolAssemblyValidateMetadata, + pdfApiUrl: GovToolAssemblyPdfApiUrl, + fetchDRepVotingPowerList: GovToolFetchDRepVotingPowerList, + username: GovToolAssemblyUsername, + setUsername: GovToolAssemblySetUsername, + addSuccessAlert: GovToolAddSuccessAlert, + addErrorAlert: GovToolAddErrorAlert, + addWarningAlert: GovToolAddWarningAlert, + addChangesSavedAlert: GovToolAddChangesSavedAlert, + } = govtoolProps || {}; + const handleLogin = async (trigerSignData, useDRepKey = false) => { + if (GovToolAssemblyWalletAPI?.address) { + setWalletAPI(GovToolAssemblyWalletAPI); + if (GovToolAssemblyValidateMetadata) { + setValidateMetadata(() => GovToolAssemblyValidateMetadata); + } + if (GovToolFetchDRepVotingPowerList) { + setFetchDRepVotingPowerList( + () => GovToolFetchDRepVotingPowerList + ); + } + if (GovToolAddSuccessAlert) { + setAddSuccessAlert(() => GovToolAddSuccessAlert); + } + if (GovToolAddErrorAlert) { + setAddErrorAlert(() => GovToolAddErrorAlert); + } + if (GovToolAddWarningAlert) { + setAddWarningAlert(() => GovToolAddWarningAlert); + } + if (GovToolAddChangesSavedAlert) { + setAddChangesSavedAlert(() => GovToolAddChangesSavedAlert); + } + await loginUserToApp({ + wallet: GovToolAssemblyWalletAPI, + setUser: setUser, + setOpenUsernameModal: setOpenUsernameModal, + trigerSignData: trigerSignData ? true : false, + clearStates: clearStates, + setPDFUsername: GovToolAssemblySetUsername, + isDRep: useDRepKey, + addErrorAlert: GovToolAddErrorAlert, + addSuccessAlert: GovToolAddSuccessAlert, + addChangesSavedAlert: GovToolAddChangesSavedAlert, + // callBackFn: () => {}, + }); + } else { + if ( + !GovToolAssemblyWalletAPI?.isEnabled && + getDataFromSession('pdfUserJwt') + ) { + clearStates(); + clearSession(); + } + } + }; + useEffect(() => { + if (GovToolAssemblyValidateMetadata) { + setValidateMetadata(() => GovToolAssemblyValidateMetadata); + } + }, [GovToolAssemblyValidateMetadata]); + + useEffect(() => { + if (GovToolFetchDRepVotingPowerList) { + setFetchDRepVotingPowerList(() => GovToolFetchDRepVotingPowerList); + } + }, [GovToolFetchDRepVotingPowerList]); + + useEffect(() => { + if (GovToolAddSuccessAlert) { + setAddSuccessAlert(() => GovToolAddSuccessAlert); + } + }, [GovToolAddSuccessAlert]); + + useEffect(() => { + if (GovToolAddErrorAlert) { + setAddErrorAlert(() => GovToolAddErrorAlert); + } + }, [GovToolAddErrorAlert]); + + useEffect(() => { + if (GovToolAddWarningAlert) { + setAddWarningAlert(() => GovToolAddWarningAlert); + } + }, [GovToolAddWarningAlert]); + + useEffect(() => { + if (GovToolAddChangesSavedAlert) { + setAddChangesSavedAlert(() => GovToolAddChangesSavedAlert); + } + }, [GovToolAddChangesSavedAlert]); + + useEffect(() => { + if (GovToolAssemblyLocale) { + setLocale(GovToolAssemblyLocale); + } + }, [GovToolAssemblyLocale]); + + useEffect(() => { + if (user && user?.user?.govtool_username) { + const interval = setInterval(async () => { + const jwt = decodeJWT(); // Get JWT from session + if (jwt) { + const expDate = new Date(jwt?.exp * 1000); // Transfer exp from ms to date + const now = new Date(); + + // Check if token is still valid + if (expDate <= now) { + setUser(null); + clearSession(); + clearInterval(interval); // Clear because user do not exist + } else if (expDate - now <= 300000) { + // If difference is less then 5 minutes, get new refresh token + try { + const refreshedTokens = await getRefreshToken(); // Call refreshToken function + // Set new JWT in Session + saveDataInSession( + 'pdfUserJwt', + refreshedTokens.jwt + ); + } catch (error) { + console.error('Error refreshing token:', error); + setUser(null); // Logout user if refresh token fails + clearSession(); + } + } + } else { + setUser(null); + clearInterval(interval); // Clear interval if there is no token + } + }, 60 * 1000); // Every minute + + return () => clearInterval(interval); // Clear interval on component unmount + } + }, [user]); + + const checkFunctionCall = () => { + if (!walletAPI?.address) { + const button = document.querySelector( + '[data-testId="connect-wallet-button"]' + ); + button?.click(); + } else if (!user) { + handleLogin(true); + } else if (!user?.user?.govtool_username) { + setOpenUsernameModal({ + open: true, + callBackFn: () => {}, + }); + } else if (drepCheck) { + handleLogin(true, true); + } + }; + + const checkTitleText = (type) => { + switch (type) { + case 'budget': + return 'To submit a comment, you need to'; + case 'comment': + return 'To submit a reply, you need to'; + case 'budget-proposal': + return 'To submit a budget proposal, you need to'; + case 'proposal': + return 'To submit a proposal, you need to'; + case 'governance': + return 'If this is your Proposal, to submit it, you need to'; + case 'sentiment': + return 'To show sentiment, you need to'; + case 'drep-poll': + return 'If you are a Drep, you need to'; + default: + return ''; + } + }; + + const showValidationMessage = useMemo(() => { + if (!walletAPI) { + return ( + + + connect a Cardano wallet + + + ); + } + + if (!user) { + return ( + + + verify yourself by signing a transaction + + + ); + } + + if (!user?.user?.govtool_username) { + return ( + + + create a GovTool Display Name + + + ); + } + if (drepRequired && drepCheck) { + return ( + + + verify your status as a DRep. + + + ); + } + }, [user, walletAPI]); + + return ( + + + {checkTitleText(type)} + {showValidationMessage} + {type === 'drep-poll' && !user && ( + + and Drep key to vote. This is a two step process for + security. + + )} + + + ); +}; + +export default UserValidation; diff --git a/pdf-ui/src/context/context.jsx b/pdf-ui/src/context/context.jsx index 8ae3894..da11292 100644 --- a/pdf-ui/src/context/context.jsx +++ b/pdf-ui/src/context/context.jsx @@ -6,55 +6,67 @@ export function AppContextProvider({ children }) { const [user, setUser] = useState(); const [loading, setLoading] = useState(false); const [walletAPI, setWalletAPI] = useState(null); + const [validateMetadata, setValidateMetadata] = useState(null); const [locale, setLocale] = useState('en'); const [openUsernameModal, setOpenUsernameModal] = useState({ open: false, callBackFn: () => {}, }); -const [fetchDRepVotingPowerList, setFetchDRepVotingPowerList] = useState(null) -const [addSuccessAlert, setAddSuccessAlert] = useState(null); -const [addErrorAlert, setAddErrorAlert] = useState(null); -const [addWarningAlert, setAddWarningAlert] = useState(null); -const [addChangesSavedAlert, setAddChangesSavedAlert] = useState(null); + const [fetchDRepVotingPowerList, setFetchDRepVotingPowerList] = + useState(null); + const [addSuccessAlert, setAddSuccessAlert] = useState(null); + const [addErrorAlert, setAddErrorAlert] = useState(null); + const [addWarningAlert, setAddWarningAlert] = useState(null); + const [addChangesSavedAlert, setAddChangesSavedAlert] = useState(null); + const [showIdentificationPage, setShowIdentificationPage] = useState(false); + const [identificationType, setIdentificationType] = useState('wallet'); + const [govtoolProps, setGovtoolProps] = useState(); + -const clearStates = () => { - setWalletAPI(null); - setUser(null); - setValidateMetadata(null); -}; + const clearStates = () => { + setWalletAPI(null); + setUser(null); + setValidateMetadata(null); + }; -return ( - - {children} - -); + return ( + + {children} + + ); } export function useAppContext() { diff --git a/pdf-ui/src/lib/api.js b/pdf-ui/src/lib/api.js index f671340..08da1df 100644 --- a/pdf-ui/src/lib/api.js +++ b/pdf-ui/src/lib/api.js @@ -588,3 +588,14 @@ export const getChallenge = async ({ query = '' }) => { throw error; } }; + +export const getHardForkData = async () => { + try { + const data = await axiosInstance.get( + '/api/proxy/govtool/proposal/enacted-details?type=HardForkInitiation' + ); + return data.data; + } catch (error) { + throw error; + } +}; diff --git a/pdf-ui/src/lib/helpers.js b/pdf-ui/src/lib/helpers.js index 0d55821..a11eb42 100644 --- a/pdf-ui/src/lib/helpers.js +++ b/pdf-ui/src/lib/helpers.js @@ -91,9 +91,11 @@ export const loginUserToApp = async ({ } else { if (trigerSignData) { const keyToSign = wallet?.stakeKey; + const challengeRes = await getChallenge({ query: `?identifier=${keyToSign}`, }); + const { message } = challengeRes; const messageHex = utf8ToHex(message); @@ -187,8 +189,10 @@ export const loginUserToApp = async ({ errorMessage = error?.response?.data?.error?.message; } addErrorAlert(errorMessage); - clearStates(); - clearSession(); + if (error?.code !== 3) { + clearStates(); + clearSession(); + } } }; export const cleanObject = (obj) => { @@ -238,3 +242,39 @@ export const isCommentRestricted = (curComment) => { } return false; }; + +export const checkShowValidation = (drepRequired = false, walletAPI, user) => { + let showButton = false; + + if (!walletAPI) { + showButton = true; + } else if (!user) { + showButton = true; + } else if (!user?.user?.govtool_username) { + showButton = true; + } else if (drepRequired) { + if (checkIfDrepIsSignedIn(walletAPI)) { + showButton = true; + } else { + showButton = false; + } + } else { + showButton = false; + } + + return showButton; +}; + +export const checkIfDrepIsSignedIn = (walletAPI) => { + const jwtData = decodeJWT(); + const isDrep = + walletAPI?.voter?.isRegisteredAsDRep || + walletAPI?.voter?.isRegisteredAsSoleVoter; + const hasDrepID = !!jwtData?.dRepID; + + if (isDrep && !hasDrepID) { + return true; + } + + return false; +}; diff --git a/pdf-ui/src/lib/markdownRenderer.js b/pdf-ui/src/lib/markdownRenderer.js index 9c7e915..4993658 100644 --- a/pdf-ui/src/lib/markdownRenderer.js +++ b/pdf-ui/src/lib/markdownRenderer.js @@ -370,7 +370,6 @@ const MarkdownTypography = ({ content, testId, onLinkClick }) => { // Change special symbols text = symbolReplacements(text); - return text; }; @@ -389,7 +388,7 @@ const MarkdownTypography = ({ content, testId, onLinkClick }) => { } }); }); - }, []); + }, [processedContent]); return (
diff --git a/pdf-ui/src/pages/BudgetDiscussion/SingleBudgetDiscussion/index.jsx b/pdf-ui/src/pages/BudgetDiscussion/SingleBudgetDiscussion/index.jsx index be5b56e..5378ac5 100644 --- a/pdf-ui/src/pages/BudgetDiscussion/SingleBudgetDiscussion/index.jsx +++ b/pdf-ui/src/pages/BudgetDiscussion/SingleBudgetDiscussion/index.jsx @@ -20,6 +20,7 @@ import { CardHeader, Grid, IconButton, + List, Menu, MenuItem, Stack, @@ -27,6 +28,7 @@ import { Tooltip, Typography, alpha, + Link, } from '@mui/material'; import { useEffect, useState, useRef } from 'react'; import { useNavigate, useLocation } from 'react-router-dom'; @@ -48,12 +50,18 @@ import { } from '../../../lib/api'; import { correctVoteAdaFormat, + decodeJWT, formatIsoDate, openInNewTab, } from '../../../lib/utils'; import ProposalOwnModal from '../../../components/ProposalOwnModal'; import BudgetDiscussionReviewVersions from '../../../components/BudgetDiscussionReviewVersions'; import { useScrollToHashSection } from '../../../lib/hooks'; +import UserValidation from '../../../components/UserValidation/UserValidation'; +import { + checkIfDrepIsSignedIn, + checkShowValidation, +} from '../../../lib/helpers'; const SECTIONS = [ 'problem-statement', @@ -233,10 +241,8 @@ const SingleBudgetDiscussion = ({ id }) => { if (!response) return; setProposal(response); - }catch (error) { - if ( - error?.response?.data?.error?.message === - 'Not Found' ) { + } catch (error) { + if (error?.response?.data?.error?.message === 'Not Found') { return navigate('/budget_discussion'); } } finally { @@ -870,7 +876,7 @@ const SingleBudgetDiscussion = ({ id }) => { mt={2} display='flex' alignItems='center' - justifyContent='space-between' + gap={2} > { )}`} - + { + + + Poll of DRep sentiment + + + + {activePoll && + proposal?.attributes?.submitted_for_vote === + null && ( + + + + )} { /> - - {activePoll && - proposal?.attributes?.submitted_for_vote === - null && ( - - - - )} - {proposal?.attributes?.content?.attributes ?.prop_submitted ? null : ( @@ -1941,7 +1957,15 @@ const SingleBudgetDiscussion = ({ id }) => { { gap={2} ref={targetRef} > + {checkShowValidation( + true, + walletAPI, + user + ) && ( + + )} - - )} + {checkShowValidation( + false, + walletAPI, + user + ) && ( + + )} + + { proposalsOwnerFilter?.id === ga?.id } + disabled={ + ga?.disabled + } /> } id={`${ga?.label}-radio`} diff --git a/pdf-ui/src/pages/IdentificationPage/index.jsx b/pdf-ui/src/pages/IdentificationPage/index.jsx index 0024465..229b96c 100644 --- a/pdf-ui/src/pages/IdentificationPage/index.jsx +++ b/pdf-ui/src/pages/IdentificationPage/index.jsx @@ -8,7 +8,7 @@ const IdentificationPage = ({ handleLogin, isDRep = false }) => { width={'100%'} height={'70vh'} display={'flex'} - justifyContent={'centet'} + justifyContent={'center'} alignItems={'center'} > diff --git a/pdf-ui/src/pages/ProposedGovernanceActions/SingleGovernanceAction/index.jsx b/pdf-ui/src/pages/ProposedGovernanceActions/SingleGovernanceAction/index.jsx index dabba75..5d5ae5d 100644 --- a/pdf-ui/src/pages/ProposedGovernanceActions/SingleGovernanceAction/index.jsx +++ b/pdf-ui/src/pages/ProposedGovernanceActions/SingleGovernanceAction/index.jsx @@ -37,6 +37,7 @@ import { DialogContent, DialogContentText, badgeClasses, + Link, } from '@mui/material'; import { useEffect, useState, useRef } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -62,13 +63,19 @@ import { } from '../../../lib/api'; import { correctVoteAdaFormat, + decodeJWT, formatIsoDate, openInNewTab, } from '../../../lib/utils'; import ProposalOwnModal from '../../../components/ProposalOwnModal'; import ReactMarkdown from 'react-markdown'; -import { loginUserToApp } from '../../../lib/helpers'; +import { + checkIfDrepIsSignedIn, + checkShowValidation, + loginUserToApp, +} from '../../../lib/helpers'; import MarkdownTypography from '../../../lib/markdownRenderer'; +import UserValidation from '../../../components/UserValidation/UserValidation'; const SingleGovernanceAction = ({ id }) => { const MAX_COMMENT_LENGTH = 15000; @@ -120,7 +127,6 @@ const SingleGovernanceAction = ({ id }) => { }); } }; - useEffect(() => { let domain = new URL(window.location.href); let origin = domain.origin; @@ -472,11 +478,11 @@ const SingleGovernanceAction = ({ id }) => { } onClick={() => navigate(`/proposal_discussion`)} > - Show all + Back - + {/* { } + */} + + {checkShowValidation(false, walletAPI, user) && ( + + )} @@ -725,14 +740,61 @@ const SingleGovernanceAction = ({ id }) => { } - - {/* SHARE BUTTON */} + > + + {user && + proposal?.attributes?.content?.attributes?.prop_submitted === false && + //proposal?.attributes?.prop_submitted && + user?.user?.id?.toString() === + proposal?.attributes?.user_id?.toString() ? ( + + ) : null} + + {/* SHARE BUTTON */} + { } - - - theme?.palette?.text?.grey, - }} - > - {`Last Edit: ${formatIsoDate( - proposal?.attributes?.content - ?.attributes?.createdAt - )}`} - + + {' '} + + theme?.palette?.text?.grey, + }} + > + {proposal?.attributes?.content + ?.attributes?.prop_submitted + ? `Submitted on:` + : `Proposed on:`} + + + {proposal?.attributes?.content + ?.attributes?.prop_submitted + ? `${formatIsoDate(proposal?.attributes?.content?.attributes?.prop_submission_date)}` + : `${formatIsoDate( + proposal?.attributes + ?.createdAt + )}`} + + + {proposal?.attributes?.content?.attributes?.prop_submitted && + ( + + navigate( + `/connected/governance_actions/${proposal?.attributes?.content?.attributes?.prop_submission_tx_hash}#0` + )} + sx={{ cursor: 'pointer' }} + >Vote + + ) + } + + + + {' '} + + theme?.palette?.text + ?.grey, + }} + > + Last Edit: + + + {formatIsoDate( + proposal?.attributes + ?.content?.attributes + ?.createdAt + )} + + - + { > Abstract -
- - {/* + + {/* {showFullText || !maxLength ? AbstractMarkdownText : truncatedText} */} -
{!showFullText && totalCharLength > maxLength && ( )} - - {walletAPI?.address && ( - + + - - )} + {checkShowValidation( + false, + walletAPI, + user + ) && ( + + )} +
+