diff --git a/kubb.config.ts b/kubb.config.ts index a171e742..10c63bc4 100644 --- a/kubb.config.ts +++ b/kubb.config.ts @@ -7,7 +7,7 @@ export default defineConfig({ root: ".", input: { - path: "./src/common/api/potlock/index.yaml", + path: "https://dev.potlock.io/api/schema", }, output: { diff --git a/package.json b/package.json index 382ba498..a9c7b514 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,9 @@ "lint": "next lint", "generate:api": "kubb --config kubb.config.ts", "test:unit": "vitest run", - "dev:test": "yarn && vitest watch", - "dev": "yarn && next dev", - "build": "next build", + "dev:test": "yarn && yarn generate:api && vitest watch", + "dev": "yarn && yarn generate:api && next dev", + "build": "yarn generate:api && next build", "start": "next start" }, "dependencies": { @@ -109,4 +109,4 @@ "vite-tsconfig-paths": "^4.3.2", "vitest": "^1.6.0" } -} +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/Account.json b/src/common/api/potlock/generated/schemas/Account.json index f42f22b6..f97e5de2 100644 --- a/src/common/api/potlock/generated/schemas/Account.json +++ b/src/common/api/potlock/generated/schemas/Account.json @@ -1 +1 @@ -{"type":"object","properties":{"id":{"description":"On-chain account address.","type":"string","maxLength":64,"title":"Address"},"total_donations_in_usd":{"description":"Total donations received in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total donations received in USD"},"total_donations_out_usd":{"description":"Total donated in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total donations sent in USD"},"total_matching_pool_allocations_usd":{"description":"Total matching pool allocations in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total matching pool allocations in USD"},"donors_count":{"description":"Number of donors.","type":"integer","maximum":2147483647,"minimum":0}},"required":["id"],"x-readme-ref-name":"Account"} \ No newline at end of file +{"type":"object","properties":{"id":{"description":"On-chain account address.","type":"string","maxLength":64,"title":"Address"},"total_donations_in_usd":{"description":"Total donations received in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total donations received in USD"},"total_donations_out_usd":{"description":"Total donated in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total donations sent in USD"},"total_matching_pool_allocations_usd":{"description":"Total matching pool allocations in USD.","type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total matching pool allocations in USD"},"donors_count":{"description":"Number of donors.","type":"integer","maximum":2147483647,"minimum":0},"near_social_profile_data":{"description":"NEAR social data contained under 'profile' key.","nullable":true}},"required":["id"],"x-readme-ref-name":"Account"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/accountSchema.ts b/src/common/api/potlock/generated/zod/accountSchema.ts index 9a122f03..2288fc08 100644 --- a/src/common/api/potlock/generated/zod/accountSchema.ts +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -1,4 +1,4 @@ import { z } from "zod"; -export const accountSchema = z.object({ "id": z.string().max(64).describe("On-chain account address."), "total_donations_in_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total donations received in USD.").optional(), "total_donations_out_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total donated in USD.").optional(), "total_matching_pool_allocations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total matching pool allocations in USD.").optional(), "donors_count": z.number().min(0).max(2147483647).describe("Number of donors.").optional() }); \ No newline at end of file +export const accountSchema = z.object({ "id": z.string().max(64).describe("On-chain account address."), "total_donations_in_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total donations received in USD.").optional(), "total_donations_out_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total donated in USD.").optional(), "total_matching_pool_allocations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total matching pool allocations in USD.").optional(), "donors_count": z.number().min(0).max(2147483647).describe("Number of donors.").optional(), "near_social_profile_data": z.any().nullish() }); \ No newline at end of file diff --git a/src/common/api/potlock/index.yaml b/src/common/api/potlock/index.yaml deleted file mode 100644 index 1b20fe5f..00000000 --- a/src/common/api/potlock/index.yaml +++ /dev/null @@ -1,1278 +0,0 @@ -openapi: 3.0.3 -info: - title: PotLock Indexer API dev - version: 1.0.0 - description: Indexed data for the PotLock protocol -paths: - /api/v1/accounts: - get: - operationId: v1_accounts_retrieve - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Account" - examples: - Example-1: - value: - - id: user.near - total_donations_in_usd: "740.00" - total_donations_out_usd: "1234.56" - total_matching_pool_allocations_usd: "800.01" - donors_count: 321 - summary: Simple example - description: Example response for accounts data - description: Returns a list of accounts - "500": - description: Internal server error - /api/v1/accounts/{account_id}: - get: - operationId: v1_accounts_retrieve_2 - parameters: - - in: path - name: account_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Account" - examples: - Example-1: - value: - id: user.near - total_donations_in_usd: "740.00" - total_donations_out_usd: "1234.56" - total_matching_pool_allocations_usd: "800.01" - donors_count: 321 - summary: user.near - description: Example response for account detail - description: Returns account details - "404": - description: Account not found - "500": - description: Internal server error - /api/v1/accounts/{account_id}/active_pots: - get: - operationId: v1_accounts_active_pots_retrieve - parameters: - - in: path - name: account_id - schema: - type: string - required: true - - in: query - name: status - schema: - type: string - description: Filter by pot status - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Pot" - examples: - Example-1: - value: - - id: some-pot.v1.potfactory.potlock.near - deployed_at: "2024-02-16T17:45:03.600845Z" - source_metadata: - link: https://github.com/PotLock/core - version: 0.1.0 - commit_hash: 2db43b1182eb97d34e1b67f21b44c7084b364358 - name: My Pot Name - description: To support impactful open source software projects. - max_approved_applicants: 50 - base_currency: near - application_start: "2024-04-08T04:00:00Z" - application_end: "2024-04-22T03:59:00Z" - matching_round_start: "2024-04-22T04:00:00Z" - matching_round_end: "2024-05-06T03:59:00Z" - registry_provider: registry.potlock.near:is_registered - min_matching_pool_donation_amount: "0" - sybil_wrapper_provider: v1.nadabot.near:is_human - custom_sybil_checks: null - custom_min_threshold_score: null - referral_fee_matching_pool_basis_points: 500 - referral_fee_public_round_basis_points: 500 - chef_fee_basis_points: 500 - total_matching_pool: "10000000000000000000" - total_matching_pool_usd: "100.17" - matching_pool_balance: "10000000000000000000" - matching_pool_donations_count: 0 - total_public_donations: "100000000000000000" - total_public_donations_usd: "1.17" - public_donations_count: 0 - cooldown_end: null - cooldown_period_ms: null - all_paid_out: false - protocol_config_provider: v1.potfactory.potlock.near:get_protocol_config - pot_factory: v1.potfactory.potlock.near - deployer: ossround.near - owner: ossround.near - chef: plugrel.near - admins: [] - summary: Simple example - description: Example response for active pots - description: Returns paginated active pots for the account - "404": - description: Account not found - "500": - description: Internal server error - /api/v1/donors: - get: - operationId: v1_donors_retrieve - parameters: - - in: query - name: sort - schema: - type: string - description: Sort by field, e.g., most_donated_usd - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Account" - examples: - Example-1: - value: - - id: user.near - total_donations_in_usd: "740.00" - total_donations_out_usd: "1234.56" - total_matching_pool_allocations_usd: "800.01" - donors_count: 321 - summary: user.near - description: Example response for donor accounts - description: Returns a list of donor accounts - "500": - description: Internal server error - /api/v1/lists: - get: - operationId: v1_lists_retrieve - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/List" - examples: - Example-1: - value: - - id: 1 - name: PotLock Public Goods Registry - description: The official registry of public goods on NEAR Protocol - cover_image_url: https://images.unsplash.com/photo-1593642532973-d31b6557fa68 - admin_only_registrations: true - default_registration_status: Approved - created_at: "2024-06-05T17:55:14.030Z" - updated_at: "2024-06-05T17:55:14.030Z" - owner: potlock.near - admins: - - plugrel.near - summary: Simple example - description: Example response for lists - description: Returns a list of lists - "500": - description: Internal server error - /api/v1/lists/{list_id}: - get: - operationId: v1_lists_retrieve_2 - parameters: - - in: path - name: list_id - schema: - type: integer - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/List" - examples: - Example-1: - value: - id: 1 - name: PotLock Public Goods Registry - description: The official registry of public goods on NEAR Protocol - cover_image_url: https://images.unsplash.com/photo-1593642532973-d31b6557fa68 - admin_only_registrations: true - default_registration_status: Approved - created_at: "2024-06-05T17:55:14.030Z" - updated_at: "2024-06-05T17:55:14.030Z" - owner: potlock.near - admins: - - plugrel.near - summary: Simple list example - description: Example response for list detail - description: Returns list details - "404": - description: List not found - "500": - description: Internal server error - /api/v1/lists/{list_id}/registrations: - get: - operationId: v1_lists_registrations_retrieve - parameters: - - in: path - name: list_id - schema: - type: integer - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ListRegistration" - examples: - Example-1: - value: - - id: 10 - status: Approved - submitted_at: "2024-06-05T18:01:02.319Z" - updated_at: "2024-06-05T18:01:02.319Z" - registrant_notes: I'm excited to apply for this list - admin_notes: This is a great project that I want on my list. - tx_hash: EVMQsXorrrxPLHfK9UnbzFUy1SVYWvc8hwSGQZs4RbTk - list: 1 - registrant: project.near - registered_by: project-admin.near - summary: Simple registration example - description: Example response for list registrations - description: Returns registrations for the list - "404": - description: List not found - "500": - description: Internal server error - /api/v1/pots: - get: - operationId: v1_pots_retrieve - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Pot" - examples: - Example-1: - value: - - id: some-pot.v1.potfactory.potlock.near - deployed_at: "2024-02-16T17:45:03.600845Z" - source_metadata: - link: https://github.com/PotLock/core - version: 0.1.0 - commit_hash: 2db43b1182eb97d34e1b67f21b44c7084b364358 - name: My Pot Name - description: To support impactful open source software projects. - max_approved_applicants: 50 - base_currency: near - application_start: "2024-04-08T04:00:00Z" - application_end: "2024-04-22T03:59:00Z" - matching_round_start: "2024-04-22T04:00:00Z" - matching_round_end: "2024-05-06T03:59:00Z" - registry_provider: registry.potlock.near:is_registered - min_matching_pool_donation_amount: "0" - sybil_wrapper_provider: v1.nadabot.near:is_human - custom_sybil_checks: null - custom_min_threshold_score: null - referral_fee_matching_pool_basis_points: 500 - referral_fee_public_round_basis_points: 500 - chef_fee_basis_points: 500 - total_matching_pool: "10000000000000000000" - total_matching_pool_usd: "100.17" - matching_pool_balance: "10000000000000000000" - matching_pool_donations_count: 0 - total_public_donations: "100000000000000000" - total_public_donations_usd: "1.17" - public_donations_count: 0 - cooldown_end: null - cooldown_period_ms: null - all_paid_out: false - protocol_config_provider: v1.potfactory.potlock.near:get_protocol_config - pot_factory: v1.potfactory.potlock.near - deployer: ossround.near - owner: ossround.near - chef: plugrel.near - admins: [] - summary: Simple example - description: Example response for pots - description: Returns a list of pots - /api/v1/pots/{pot_id}/: - get: - operationId: v1_pots_retrieve_2 - parameters: - - in: path - name: pot_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Pot" - examples: - Example-1: - value: - id: some-pot.v1.potfactory.potlock.near - deployed_at: "2024-02-16T17:45:03.600845Z" - source_metadata: - link: https://github.com/PotLock/core - version: 0.1.0 - commit_hash: 2db43b1182eb97d34e1b67f21b44c7084b364358 - name: My Pot Name - description: To support impactful open source software projects. - max_approved_applicants: 50 - base_currency: near - application_start: "2024-04-08T04:00:00Z" - application_end: "2024-04-22T03:59:00Z" - matching_round_start: "2024-04-22T04:00:00Z" - matching_round_end: "2024-05-06T03:59:00Z" - registry_provider: registry.potlock.near:is_registered - min_matching_pool_donation_amount: "0" - sybil_wrapper_provider: v1.nadabot.near:is_human - custom_sybil_checks: null - custom_min_threshold_score: null - referral_fee_matching_pool_basis_points: 500 - referral_fee_public_round_basis_points: 500 - chef_fee_basis_points: 500 - total_matching_pool: "10000000000000000000" - total_matching_pool_usd: "100.17" - matching_pool_balance: "10000000000000000000" - matching_pool_donations_count: 0 - total_public_donations: "100000000000000000" - total_public_donations_usd: "1.17" - public_donations_count: 0 - cooldown_end: null - cooldown_period_ms: null - all_paid_out: false - protocol_config_provider: v1.potfactory.potlock.near:get_protocol_config - pot_factory: v1.potfactory.potlock.near - deployer: ossround.near - owner: ossround.near - chef: plugrel.near - admins: [] - summary: Simple pot example - description: Example response for pot detail - description: Returns pot details - "404": - description: Pot not found - /api/v1/pots/{pot_id}/applications: - get: - operationId: v1_pots_applications_retrieve - parameters: - - in: path - name: pot_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/PotApplication" - examples: - Example-1: - value: - - id: 2 - message: - Hi, I'm a great project and I'd like to apply for this - pot. - status: Pending - submitted_at: "2024-06-05T18:06:45.519Z" - updated_at: "2024-06-05T18:06:45.519Z" - tx_hash: EVMQsXorrrxPLHfK9UnbzFUy1SVYWvc8hwSGQZs4RbTk - pot: some-pot.v1.potfactory.potlock.near - applicant: applicant.near - summary: Simple example - description: Example response for pot applications - description: Returns applications for the pot - "404": - description: Pot not found - /api/v1/pots/{pot_id}/donations: - get: - operationId: v1_pots_donations_retrieve - parameters: - - in: path - name: pot_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Donation" - examples: - Example-1: - value: - - id: 100 - on_chain_id: 156 - total_amount: "1000000000000000000000000" - total_amount_usd: "1.17" - net_amount: "1000000000000000000000000" - net_amount_usd: "1.02" - matching_pool: true - message: null - donated_at: "2024-06-05T18:08:40.751Z" - protocol_fee: "10000000000000000000000" - protocol_fee_usd: "0.27" - referrer_fee: "10000000000000000000000" - referrer_fee_usd: "0.27" - chef_fee: "10000000000000000000000" - chef_fee_usd: "0.27" - tx_hash: EVMQsXorrrxPLHfK9UnbzFUy1SVYWvc8hwSGQZs4RbTk - donor: donor.near - ft: near - pot: some-pot.v1.potfactory.potlock.near - recipient: someproject.near - referrer: somereferrer.near - chef: chef.near - summary: Simple example - description: Example response for donations - description: Returns donations for the pot - "404": - description: Pot not found - /api/v1/pots/{pot_id}/payouts: - get: - operationId: v1_pots_payouts_retrieve - parameters: - - in: path - name: pot_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/PotPayout" - examples: - Example-1: - value: - - id: 4 - amount: "1000000000000000000000000" - amount_paid_usd: "1.27" - paid_at: "2024-06-05T18:12:39.014Z" - tx_hash: EVMQsXorrrxPLHfK9UnbzFUy1SVYWvc8hwSGQZs4RbTk - pot: some-pot.v1.potfactory.potlock.near - recipient: someproject.near - ft: near - summary: Simple example - description: Example response for payouts - description: Returns payouts for the pot - "404": - description: Pot not found - /api/v1/pots/{pot_id}/sponsors: - get: - operationId: v1_pots_sponsors_retrieve - parameters: - - in: path - name: pot_id - schema: - type: string - required: true - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/Account" - examples: - Example-1: - value: - - id: user.near - total_donations_in_usd: "740.00" - total_donations_out_usd: "1234.56" - total_matching_pool_allocations_usd: "800.01" - donors_count: 321 - summary: user.near - description: Example response for sponsors - description: Returns sponsors for the pot - "404": - description: Pot not found - /api/v1/stats: - get: - operationId: v1_stats_retrieve - tags: - - v1 - security: - - cookieAuth: [] - - basicAuth: [] - - {} - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/StatsResponse" - examples: - Example-1: - value: - total_donations_usd: 12345.67 - total_payouts_usd: 8901.23 - total_donations_count: 456 - total_donors_count: 789 - total_recipients_count: 321 - summary: Simple example - description: Example response for statistics data - description: Returns statistics data - "500": - description: Internal server error -components: - schemas: - Account: - type: object - properties: - id: - type: string - title: Address - description: On-chain account address. - maxLength: 64 - total_donations_in_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - title: Total donations received in USD - description: Total donations received in USD. - total_donations_out_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - title: Total donations sent in USD - description: Total donated in USD. - total_matching_pool_allocations_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - title: Total matching pool allocations in USD - description: Total matching pool allocations in USD. - donors_count: - type: integer - maximum: 2147483647 - minimum: 0 - description: Number of donors. - required: - - id - DefaultRegistrationStatusEnum: - enum: - - Pending - - Approved - - Rejected - - Graylisted - - Blacklisted - type: string - description: |- - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `Graylisted` - Graylisted - * `Blacklisted` - Blacklisted - Donation: - type: object - properties: - id: - type: integer - readOnly: true - title: Donation id - description: Donation id. - on_chain_id: - type: integer - maximum: 2147483647 - minimum: -2147483648 - title: Contract donation id - description: Donation id in contract - total_amount: - type: string - description: Total amount. - maxLength: 64 - total_amount_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Total amount in USD - description: Total amount in USD. - net_amount: - type: string - description: Net amount. - maxLength: 64 - net_amount_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Net amount in USD - description: Net amount in USD. - matching_pool: - type: boolean - description: Matching pool. - message: - type: string - nullable: true - description: Donation message. - maxLength: 1024 - donated_at: - type: string - format: date-time - description: Donation date. - protocol_fee: - type: string - description: Protocol fee. - maxLength: 64 - protocol_fee_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Protocol fee in USD - description: Protocol fee in USD. - referrer_fee: - type: string - nullable: true - description: Referrer fee. - maxLength: 64 - referrer_fee_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Referrer fee in USD - description: Referrer fee in USD. - chef_fee: - type: string - nullable: true - description: Chef fee. - maxLength: 64 - chef_fee_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Chef fee in USD - description: Chef fee in USD. - tx_hash: - type: string - title: Transaction hash - description: Transaction hash. - maxLength: 64 - donor: - type: string - title: Address - description: Donor. - ft: - type: string - title: Address - description: Donation FT. - pot: - type: string - title: Address - description: Donation pot. - nullable: true - recipient: - type: string - title: Address - description: Donation recipient. - nullable: true - referrer: - type: string - title: Address - description: Donation referrer. - nullable: true - chef: - type: string - title: Address - description: Donation chef. - nullable: true - required: - - donated_at - - donor - - ft - - id - - matching_pool - - net_amount - - on_chain_id - - pot - - protocol_fee - - total_amount - - tx_hash - List: - type: object - properties: - id: - type: integer - maximum: 2147483647 - minimum: 0 - title: List id - description: List id. - name: - type: string - description: List name. - maxLength: 64 - description: - type: string - nullable: true - description: List description. - maxLength: 256 - cover_image_url: - type: string - format: uri - nullable: true - description: Cover image url. - maxLength: 200 - admin_only_registrations: - type: boolean - description: Admin only registrations. - default_registration_status: - allOf: - - $ref: "#/components/schemas/DefaultRegistrationStatusEnum" - description: |- - Default registration status. - - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `Graylisted` - Graylisted - * `Blacklisted` - Blacklisted - created_at: - type: string - format: date-time - description: List creation date. - updated_at: - type: string - format: date-time - description: List last update date. - owner: - type: string - title: Address - description: List owner. - admins: - type: array - items: - type: string - title: Address - description: List admins. - required: - - admin_only_registrations - - admins - - created_at - - default_registration_status - - id - - name - - owner - - updated_at - ListRegistration: - type: object - properties: - id: - type: integer - readOnly: true - title: Registration id - description: Registration id. - status: - allOf: - - $ref: "#/components/schemas/StatusF24Enum" - title: Registration status - description: |- - Registration status. - - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `Graylisted` - Graylisted - * `Blacklisted` - Blacklisted - submitted_at: - type: string - format: date-time - description: Registration submission date. - updated_at: - type: string - format: date-time - description: Registration last update date. - registrant_notes: - type: string - nullable: true - description: Registrant notes. - maxLength: 1024 - admin_notes: - type: string - nullable: true - description: Admin notes. - maxLength: 1024 - tx_hash: - type: string - nullable: true - title: Transaction hash - description: Transaction hash. - maxLength: 64 - list: - type: integer - maximum: 2147483647 - minimum: 0 - title: List id - description: List registered. - registrant: - type: string - title: Address - description: Account that registered on the list. - registered_by: - type: string - title: Address - description: Account that did the registration. - required: - - id - - list - - registered_by - - registrant - - status - - submitted_at - - updated_at - Pot: - type: object - properties: - id: - type: string - title: Address - description: Pot account ID. - pot_factory: - type: string - title: Address - description: Pot factory. - deployer: - type: string - title: Address - description: Pot deployer. - deployed_at: - type: string - format: date-time - description: Pot deployment date. - source_metadata: - description: Pot source metadata. - owner: - type: string - title: Address - description: Pot owner. - admins: - type: array - items: - type: string - title: Address - description: Pot admins. - chef: - type: string - title: Address - description: Pot chef. - nullable: true - name: - type: string - description: Pot name. - description: - type: string - description: Pot description. - max_approved_applicants: - type: integer - maximum: 2147483647 - minimum: 0 - description: Max approved applicants. - base_currency: - type: string - nullable: true - description: Base currency. - maxLength: 64 - application_start: - type: string - format: date-time - description: Pot application start date. - application_end: - type: string - format: date-time - description: Pot application end date. - matching_round_start: - type: string - format: date-time - description: Pot matching round start date. - matching_round_end: - type: string - format: date-time - description: Pot matching round end date. - registry_provider: - type: string - nullable: true - description: Registry provider. - maxLength: 64 - min_matching_pool_donation_amount: - type: string - description: Min matching pool donation amount. - maxLength: 64 - sybil_wrapper_provider: - type: string - nullable: true - description: Sybil wrapper provider. - maxLength: 64 - custom_sybil_checks: - type: string - nullable: true - description: Custom sybil checks. - maxLength: 64 - custom_min_threshold_score: - type: integer - maximum: 2147483647 - minimum: 0 - nullable: true - description: Custom min threshold score. - referral_fee_matching_pool_basis_points: - type: integer - maximum: 2147483647 - minimum: 0 - description: Referral fee matching pool basis points. - referral_fee_public_round_basis_points: - type: integer - maximum: 2147483647 - minimum: 0 - description: Referral fee public round basis points. - chef_fee_basis_points: - type: integer - maximum: 2147483647 - minimum: 0 - description: Chef fee basis points. - total_matching_pool: - type: string - description: Total matching pool. - maxLength: 64 - total_matching_pool_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - matching_pool_balance: - type: string - description: Matching pool balance. - maxLength: 64 - matching_pool_donations_count: - type: integer - maximum: 2147483647 - minimum: 0 - description: Matching pool donations count. - total_public_donations: - type: string - description: Total public donations. - maxLength: 64 - total_public_donations_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - public_donations_count: - type: integer - maximum: 2147483647 - minimum: 0 - description: Public donations count. - cooldown_end: - type: string - format: date-time - nullable: true - description: Pot cooldown end date. - cooldown_period_ms: - type: integer - maximum: 2147483647 - minimum: 0 - nullable: true - title: Cooldown period in ms - description: Pot cooldown period in ms. - all_paid_out: - type: boolean - description: All paid out. - protocol_config_provider: - type: string - nullable: true - description: Protocol config provider. - maxLength: 64 - required: - - admins - - all_paid_out - - application_end - - application_start - - chef_fee_basis_points - - deployed_at - - deployer - - description - - id - - matching_pool_balance - - matching_pool_donations_count - - matching_round_end - - matching_round_start - - max_approved_applicants - - min_matching_pool_donation_amount - - name - - owner - - pot_factory - - public_donations_count - - referral_fee_matching_pool_basis_points - - referral_fee_public_round_basis_points - - source_metadata - - total_matching_pool - - total_matching_pool_usd - - total_public_donations - - total_public_donations_usd - PotApplication: - type: object - properties: - id: - type: integer - readOnly: true - title: Application id - description: Application id. - message: - type: string - nullable: true - description: Application message. - maxLength: 1024 - status: - allOf: - - $ref: "#/components/schemas/PotApplicationStatusEnum" - description: |- - Application status. - - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `InReview` - InReview - submitted_at: - type: string - format: date-time - description: Application submission date. - updated_at: - type: string - format: date-time - description: Application last update date. - tx_hash: - type: string - title: Transaction hash - description: Transaction hash. - maxLength: 64 - pot: - type: string - title: Address - description: Pot applied to. - applicant: - type: string - title: Address - description: Account that applied to the pot. - required: - - applicant - - id - - pot - - status - - submitted_at - - tx_hash - - updated_at - PotApplicationStatusEnum: - enum: - - Pending - - Approved - - Rejected - - InReview - type: string - description: |- - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `InReview` - InReview - PotPayout: - type: object - properties: - id: - type: integer - readOnly: true - title: Payout id - description: Payout id. - amount: - type: string - description: Payout amount. - maxLength: 64 - amount_paid_usd: - type: string - format: decimal - pattern: ^-?\d{0,18}(?:\.\d{0,2})?$ - nullable: true - title: Amount paid in USD - description: Payout amount in USD. - paid_at: - type: string - format: date-time - description: Payout date. - tx_hash: - type: string - title: Transaction hash - description: Transaction hash. - maxLength: 64 - pot: - type: string - title: Address - description: Pot that this payout is for. - recipient: - type: string - title: Address - description: Payout recipient. - ft: - type: string - title: Address - description: Payout FT. - required: - - amount - - ft - - id - - paid_at - - pot - - recipient - - tx_hash - StatsResponse: - type: object - properties: - total_donations_usd: - type: number - format: double - total_payouts_usd: - type: number - format: double - total_donations_count: - type: integer - total_donors_count: - type: integer - total_recipients_count: - type: integer - required: - - total_donations_count - - total_donations_usd - - total_donors_count - - total_payouts_usd - - total_recipients_count - StatusF24Enum: - enum: - - Pending - - Approved - - Rejected - - Graylisted - - Blacklisted - type: string - description: |- - * `Pending` - Pending - * `Approved` - Approved - * `Rejected` - Rejected - * `Graylisted` - Graylisted - * `Blacklisted` - Blacklisted - securitySchemes: - basicAuth: - type: http - scheme: basic - cookieAuth: - type: apiKey - in: cookie - name: sessionid