--- openapi: 3.0.3 info: title: DAO description: This API allows you to get the information of DAO version: 1.0.0 tags: - name: proposals - name: voters - name: votes servers: - url: "https://dao.octusbridge.io/v1" - url: "https://dao-test.octusbridge.io/v1" paths: /proposals/overview: get: tags: - proposals summary: Proposals overview description: Get proposals overview. responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/ProposalsOverview" /proposals/search: post: tags: - proposals summary: Proposals search description: Get proposals data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/ProposalsRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/ProposalsResponse" /votes/search: post: tags: - votes summary: Votes search description: Get votes data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/VotesRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/VotesResponse" "/voters/{voter}/search": post: tags: - voters summary: Voter search description: Get proposals with votes data. requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/VotersRequest" responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/ProposalsWithVotesResponse" parameters: - name: voter in: path required: true schema: type: string /voters/proposals/count: post: tags: - voters summary: Voter proposals count description: Get proposals counts requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/ProposalsCountRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ProposalCountResponse" /voters/proposals/count/search: post: tags: - voters summary: Voter proposals count search description: Get proposals counts requestBody: required: true description: "" content: application/json: schema: $ref: "#/components/schemas/ProposalsCountSearchRequest" responses: 200: description: OK content: application/json: schema: type: array items: $ref: "#/components/schemas/ProposalCountResponse" components: schemas: Direction: description: Ordering type: string enum: - ASC - DESC example: ASC ProposalActions: type: object properties: ethActions: type: array items: $ref: "#/components/schemas/ProposalEthAction" tonActions: type: array items: $ref: "#/components/schemas/ProposalTonAction" required: - tonActions - ethActions ProposalColumn: description: Proposal column type: string enum: - createdAt example: createdAt ProposalCountResponse: description: Proposals count response type: object properties: count: type: integer format: int64 voter: type: string required: - voter - count ProposalEthAction: type: object properties: callData: type: string chainId: type: integer format: uint32 signature: type: string target: type: string value: type: string required: - value - chainId - target - signature - callData ProposalResponse: description: Proposal response type: object properties: actions: $ref: "#/components/schemas/ProposalActions" againstVotes: description: againstVotes type: string canceled: type: boolean canceledAt: nullable: true type: integer format: int32 createdAt: type: integer format: int32 description: type: string endTime: type: integer format: int64 executed: type: boolean executedAt: nullable: true type: integer format: int32 executionTime: nullable: true type: integer format: int64 forVotes: description: forVotes type: string gracePeriod: type: integer format: int64 messageHash: type: string proposalAddress: type: string proposalId: type: integer format: int32 proposer: type: string queued: type: boolean queuedAt: nullable: true type: integer format: int32 quorumVotes: description: quorumVotes type: string startTime: type: integer format: int64 state: $ref: "#/components/schemas/ProposalState" timeLock: type: integer format: int64 transactionHash: type: string votingDelay: type: integer format: int64 required: - proposalId - proposalAddress - proposer - description - startTime - endTime - executionTime - gracePeriod - timeLock - votingDelay - forVotes - againstVotes - quorumVotes - messageHash - transactionHash - actions - executed - canceled - queued - executedAt - canceledAt - queuedAt - createdAt - state ProposalState: description: Proposal state nullable: true type: string enum: - Pending - Active - Canceled - Failed - Succeeded - Expired - Queued - Executed example: Pending ProposalTonAction: type: object properties: payload: type: string target: type: string value: type: string required: - value - target - payload ProposalWithVoteResponse: description: Proposal with Vote response type: object properties: proposal: $ref: "#/components/schemas/ProposalResponse" vote: $ref: "#/components/schemas/VoteResponse" required: - vote - proposal ProposalsCountRequest: description: Proposals count request type: object properties: voters: type: array items: type: string required: - voters ProposalsCountSearchRequest: description: Proposals count search request type: object properties: limit: type: integer format: int32 offset: type: integer format: int32 ordering: $ref: "#/components/schemas/VotersProposalsOrdering" voters: nullable: true type: array items: type: string required: - limit - offset ProposalsOrdering: description: Proposals ordering nullable: true type: object properties: column: $ref: "#/components/schemas/ProposalColumn" direction: $ref: "#/components/schemas/Direction" required: - column - direction ProposalsOverview: description: Proposals overview type: object properties: proposalsTotalCount: type: integer format: int64 required: - proposalsTotalCount ProposalsRequest: description: Proposals request type: object properties: endTimeGe: nullable: true type: integer format: int32 endTimeLe: nullable: true type: integer format: int32 limit: type: integer format: int32 offset: type: integer format: int32 ordering: $ref: "#/components/schemas/ProposalsOrdering" proposalAddress: nullable: true type: string proposalId: nullable: true type: integer format: int32 proposer: nullable: true type: string startTimeGe: nullable: true type: integer format: int32 startTimeLe: nullable: true type: integer format: int32 state: $ref: "#/components/schemas/ProposalState" required: - limit - offset ProposalsResponse: description: Proposal table response type: object properties: proposals: type: array items: $ref: "#/components/schemas/ProposalResponse" totalCount: type: integer format: int64 required: - proposals - totalCount ProposalsWithVotesResponse: description: Proposals with Votes response type: object properties: proposalWithVotes: type: array items: $ref: "#/components/schemas/ProposalWithVoteResponse" totalCount: type: integer format: int64 required: - proposalWithVotes - totalCount VoteColumn: description: Vote column type: string enum: - createdAt example: createdAt VoteResponse: description: Vote response type: object properties: createdAt: type: integer format: int32 locked: type: boolean messageHash: type: string proposalId: type: integer format: int32 reason: type: string support: type: boolean transactionHash: type: string voter: type: string votes: description: votes type: string required: - proposalId - voter - support - reason - votes - locked - messageHash - transactionHash - createdAt VoterColumn: description: Voter column type: string enum: - createdAt example: createdAt VotersOrdering: description: Voters ordering nullable: true type: object properties: column: $ref: "#/components/schemas/VoterColumn" direction: $ref: "#/components/schemas/Direction" required: - column - direction VotersProposalColumn: description: Voter column type: string enum: - count example: count VotersProposalsOrdering: description: Voters proposals ordering nullable: true type: object properties: column: $ref: "#/components/schemas/VotersProposalColumn" direction: $ref: "#/components/schemas/Direction" required: - column - direction VotersRequest: description: Voters request type: object properties: availableForUnlock: nullable: true type: boolean endTimeGe: nullable: true type: integer format: int32 endTimeLe: nullable: true type: integer format: int32 limit: type: integer format: int32 locked: nullable: true type: boolean offset: type: integer format: int32 ordering: $ref: "#/components/schemas/VotersOrdering" proposalAddress: nullable: true type: string proposalId: nullable: true type: integer format: int32 proposer: nullable: true type: string startTimeGe: nullable: true type: integer format: int32 startTimeLe: nullable: true type: integer format: int32 state: $ref: "#/components/schemas/ProposalState" support: nullable: true type: boolean required: - limit - offset VotesOrdering: description: Votes ordering nullable: true type: object properties: column: $ref: "#/components/schemas/VoteColumn" direction: $ref: "#/components/schemas/Direction" required: - column - direction VotesRequest: description: Proposal votes request type: object properties: limit: type: integer format: int32 locked: nullable: true type: boolean offset: type: integer format: int32 ordering: $ref: "#/components/schemas/VotesOrdering" proposalId: nullable: true type: integer format: int32 support: nullable: true type: boolean voter: nullable: true type: string required: - limit - offset VotesResponse: description: Votes response type: object properties: totalCount: type: integer format: int64 votes: type: array items: $ref: "#/components/schemas/VoteResponse" required: - votes - totalCount