From 2e12bc9b1557be2dad119c0f90c77d80f0ec62e3 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Mon, 3 Jun 2024 19:57:35 +0400 Subject: [PATCH 01/84] Include projects overview component --- src/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index f2ded74b..ea8c7bf8 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,7 +11,7 @@ export default function Home() { - {/* */} + ); } From 57accbae9131f8717219827236a32ba6e691c918 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Thu, 6 Jun 2024 05:52:10 +0400 Subject: [PATCH 02/84] wip --- .vscode/settings.json | 7 +- components.json | 2 +- kubb.config.ts | 26 + package.json | 30 +- src/app/_components/AllProjects.tsx | 9 +- src/app/_components/FeaturedProjects.tsx | 4 +- src/app/_layout/RootProvider.tsx | 15 +- src/common/api/API.ts | 5 - src/common/api/{ => potlock}/account.ts | 4 +- src/common/api/potlock/generated/index.ts | 1 + .../potlock/generated/schemas/Account.json | 1 + .../DefaultRegistrationStatusEnum.json | 1 + .../potlock/generated/schemas/Donation.json | 1 + .../api/potlock/generated/schemas/List.json | 1 + .../generated/schemas/ListRegistration.json | 1 + .../api/potlock/generated/schemas/Pot.json | 1 + .../generated/schemas/PotApplication.json | 1 + .../schemas/PotApplicationStatusEnum.json | 1 + .../potlock/generated/schemas/PotPayout.json | 1 + .../generated/schemas/StatsResponse.json | 1 + .../generated/schemas/StatusF24Enum.json | 1 + .../potlock/generated/zod/accountSchema.ts | 4 + .../defaultRegistrationStatusEnumSchema.ts | 6 + .../potlock/generated/zod/donationSchema.ts | 4 + src/common/api/potlock/generated/zod/index.ts | 25 + .../generated/zod/listRegistrationSchema.ts | 5 + .../api/potlock/generated/zod/listSchema.ts | 5 + .../api/potlock/generated/zod/operations.ts | 202 +++ .../generated/zod/potApplicationSchema.ts | 5 + .../zod/potApplicationStatusEnumSchema.ts | 6 + .../potlock/generated/zod/potPayoutSchema.ts | 4 + .../api/potlock/generated/zod/potSchema.ts | 4 + .../generated/zod/statsResponseSchema.ts | 4 + .../generated/zod/statusF24EnumSchema.ts | 6 + .../zod/v1AccountsActivePotsRetrieveSchema.ts | 23 + .../zod/v1AccountsRetrieve2Schema.ts | 21 + .../generated/zod/v1AccountsRetrieveSchema.ts | 15 + .../generated/zod/v1DonorsRetrieveSchema.ts | 17 + .../zod/v1ListsRegistrationsRetrieveSchema.ts | 21 + .../generated/zod/v1ListsRetrieve2Schema.ts | 21 + .../generated/zod/v1ListsRetrieveSchema.ts | 15 + .../zod/v1PotsApplicationsRetrieveSchema.ts | 17 + .../zod/v1PotsDonationsRetrieveSchema.ts | 17 + .../zod/v1PotsPayoutsRetrieveSchema.ts | 17 + .../generated/zod/v1PotsRetrieve2Schema.ts | 17 + .../generated/zod/v1PotsRetrieveSchema.ts | 11 + .../zod/v1PotsSponsorsRetrieveSchema.ts | 17 + .../generated/zod/v1StatsRetrieveSchema.ts | 15 + src/common/api/potlock/generated/zodios.ts | 321 ++++ src/common/api/potlock/index.ts | 18 + src/common/api/potlock/index.yaml | 1278 ++++++++++++++ src/common/constants.ts | 7 + src/common/hooks/useGetAccounts.ts | 2 +- src/common/ui/components/dialog.tsx | 139 ++ .../donation/components/DonationModal.tsx | 48 + src/modules/donation/index.ts | 4 + .../components/{Card.tsx => ProjectCard.tsx} | 7 +- src/modules/project/index.ts | 1 + yarn.lock | 1505 ++++++++++++++++- 59 files changed, 3904 insertions(+), 64 deletions(-) create mode 100644 kubb.config.ts delete mode 100644 src/common/api/API.ts rename src/common/api/{ => potlock}/account.ts (77%) create mode 100644 src/common/api/potlock/generated/index.ts create mode 100644 src/common/api/potlock/generated/schemas/Account.json create mode 100644 src/common/api/potlock/generated/schemas/DefaultRegistrationStatusEnum.json create mode 100644 src/common/api/potlock/generated/schemas/Donation.json create mode 100644 src/common/api/potlock/generated/schemas/List.json create mode 100644 src/common/api/potlock/generated/schemas/ListRegistration.json create mode 100644 src/common/api/potlock/generated/schemas/Pot.json create mode 100644 src/common/api/potlock/generated/schemas/PotApplication.json create mode 100644 src/common/api/potlock/generated/schemas/PotApplicationStatusEnum.json create mode 100644 src/common/api/potlock/generated/schemas/PotPayout.json create mode 100644 src/common/api/potlock/generated/schemas/StatsResponse.json create mode 100644 src/common/api/potlock/generated/schemas/StatusF24Enum.json create mode 100644 src/common/api/potlock/generated/zod/accountSchema.ts create mode 100644 src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts create mode 100644 src/common/api/potlock/generated/zod/donationSchema.ts create mode 100644 src/common/api/potlock/generated/zod/index.ts create mode 100644 src/common/api/potlock/generated/zod/listRegistrationSchema.ts create mode 100644 src/common/api/potlock/generated/zod/listSchema.ts create mode 100644 src/common/api/potlock/generated/zod/operations.ts create mode 100644 src/common/api/potlock/generated/zod/potApplicationSchema.ts create mode 100644 src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts create mode 100644 src/common/api/potlock/generated/zod/potPayoutSchema.ts create mode 100644 src/common/api/potlock/generated/zod/potSchema.ts create mode 100644 src/common/api/potlock/generated/zod/statsResponseSchema.ts create mode 100644 src/common/api/potlock/generated/zod/statusF24EnumSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts create mode 100644 src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts create mode 100644 src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts create mode 100644 src/common/api/potlock/generated/zodios.ts create mode 100644 src/common/api/potlock/index.ts create mode 100644 src/common/api/potlock/index.yaml create mode 100644 src/common/ui/components/dialog.tsx create mode 100644 src/modules/donation/components/DonationModal.tsx create mode 100644 src/modules/donation/index.ts rename src/modules/project/components/{Card.tsx => ProjectCard.tsx} (97%) create mode 100644 src/modules/project/index.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index e64705e4..d8c9000b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,17 +11,22 @@ "bitget", "colocation", "data-testid", + "kubb", "NADABOT", "narwallets", "naxios", "nearfi", + "openapi", + "potfactory", "POTLOCK", "ramper", + "sessionid", "shadcn", "typecheck", "unocss", "welldone", "wpdas", - "xdefi" + "xdefi", + "zodios" ] } \ No newline at end of file diff --git a/components.json b/components.json index cbaa9300..24b28d3c 100644 --- a/components.json +++ b/components.json @@ -12,7 +12,7 @@ }, "aliases": { "components": "src/common/ui", - "utils": "src/common/ui/utils", + "utils": "@/common/ui/utils", "ui": "src/common/ui/components" } } \ No newline at end of file diff --git a/kubb.config.ts b/kubb.config.ts new file mode 100644 index 00000000..a171e742 --- /dev/null +++ b/kubb.config.ts @@ -0,0 +1,26 @@ +import { defineConfig } from "@kubb/core"; +import { pluginOas } from "@kubb/plugin-oas"; +import { pluginZod } from "@kubb/swagger-zod"; +import { pluginZodios } from "@kubb/swagger-zodios"; + +export default defineConfig({ + root: ".", + + input: { + path: "./src/common/api/potlock/index.yaml", + }, + + output: { + path: "./src/common/api/potlock/generated", + clean: true, + }, + + plugins: [ + pluginOas(), + pluginZod(), + + pluginZodios({ + output: { path: "./zodios.ts" }, + }), + ], +}); diff --git a/package.json b/package.json index 4ed741fd..382ba498 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "typecheck": "tsc --noEmit", "lint": "next lint", + "generate:api": "kubb --config kubb.config.ts", "test:unit": "vitest run", "dev:test": "yarn && vitest watch", "dev": "yarn && next dev", @@ -13,6 +14,13 @@ "start": "next start" }, "dependencies": { + "@ebay/nice-modal-react": "^1.2.13", + "@kubb/cli": "^2.19.5", + "@kubb/core": "^2.19.5", + "@kubb/plugin-oas": "^2.19.5", + "@kubb/swagger": "^2.19.5", + "@kubb/swagger-zod": "^2.19.5", + "@kubb/swagger-zodios": "^2.19.5", "@near-wallet-selector/bitget-wallet": "^8.9.5", "@near-wallet-selector/coin98-wallet": "^8.9.5", "@near-wallet-selector/here-wallet": "^8.9.5", @@ -35,6 +43,7 @@ "@radix-ui/react-accordion": "^1.1.2", "@radix-ui/react-avatar": "^1.0.4", "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-dialog": "^1.0.5", "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.0.7", @@ -47,33 +56,39 @@ "@rematch/immer": "^2.1.3", "@rematch/loading": "^2.1.2", "@rematch/persist": "^2.1.2", - "@tanstack/react-query": "^5.36.1", + "@tanstack/react-query": "^5.40.1", "@wpdas/naxios": "^2.1.0", + "@zodios/core": "^10.9.6", + "@zodios/express": "^10.6.1", + "@zodios/react": "^10.4.5", + "axios": "^1.7.2", "big.js": "^6.2.1", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "immer": "^9.0.21", "lucide-react": "^0.378.0", "near-api-js": "^2.1.4", - "next": "14.2.3", - "react": "^18", - "react-dom": "^18", + "next": "^14.2.3", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-infinite-scroll-component": "^6.1.0", "react-redux": "^9.1.2", "redux": "^5.0.1", "sass": "^1.77.2", "tailwind-merge": "^2.3.0", - "tailwindcss-animate": "^1.0.7" + "tailwindcss-animate": "^1.0.7", + "zod": "^3.23.8" }, "devDependencies": { "@tanstack/eslint-plugin-query": "^5.35.6", "@testing-library/react": "^15.0.7", "@types/big.js": "^6.2.2", "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", + "@types/react": "^18.3.3", + "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^7.9.0", "@typescript-eslint/parser": "^7.9.0", + "@unocss/preset-wind": "^0.60.4", "@vitejs/plugin-react": "^4.3.0", "eslint": "^8", "eslint-config-next": "14.2.3", @@ -90,6 +105,7 @@ "unocss": "^0.60.2", "unocss-preset-animations": "^1.0.2", "unocss-preset-shadcn": "^0.3.0", + "vite": "^5.2.12", "vite-tsconfig-paths": "^4.3.2", "vitest": "^1.6.0" } diff --git a/src/app/_components/AllProjects.tsx b/src/app/_components/AllProjects.tsx index 5f74afc5..ed53ae97 100644 --- a/src/app/_components/AllProjects.tsx +++ b/src/app/_components/AllProjects.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from "react"; +import { useTypedSelector } from "@/app/_store"; import { Registration, RegistrationStatus, @@ -10,10 +11,8 @@ import InfiniteScroll from "@/common/ui/components/InfiniteScroll"; import SearchBar from "@/common/ui/components/SearchBar"; import SortSelect from "@/common/ui/components/SortSelect"; import { Profile } from "@/modules/profile/models"; - -import Card from "../../modules/project/components/Card"; -import { categories, statuses } from "../../modules/project/constants"; -import { useTypedSelector } from "../_store"; +import { ProjectCard } from "@/modules/project"; +import { categories, statuses } from "@/modules/project/constants"; const MAXIMUM_CARDS_PER_INDEX = 9; @@ -184,7 +183,7 @@ const AllProjects = () => { setIndex={setIndex} size={MAXIMUM_CARDS_PER_INDEX} renderItem={(registration: Registration) => ( - diff --git a/src/app/_components/FeaturedProjects.tsx b/src/app/_components/FeaturedProjects.tsx index f597e79a..45e5a9f1 100644 --- a/src/app/_components/FeaturedProjects.tsx +++ b/src/app/_components/FeaturedProjects.tsx @@ -1,4 +1,4 @@ -import Card from "@/modules/project/components/Card"; +import { ProjectCard } from "@/modules/project"; const featuredProjectIds = [ "v1.foodbank.near", @@ -17,7 +17,7 @@ const FeaturedProjects = () => {
{featuredProjectIds.map((projectId) => ( - + ))}
diff --git a/src/app/_layout/RootProvider.tsx b/src/app/_layout/RootProvider.tsx index e950b2bc..cb237c7f 100644 --- a/src/app/_layout/RootProvider.tsx +++ b/src/app/_layout/RootProvider.tsx @@ -1,7 +1,8 @@ "use client"; +import { Provider as NiceModalProvider } from "@ebay/nice-modal-react"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { Provider } from "react-redux"; +import { Provider as ReduxProvider } from "react-redux"; import { store } from "@/app/_store"; import { AuthProvider } from "@/modules/auth/providers/AuthProvider"; @@ -11,11 +12,13 @@ const queryClient = new QueryClient(); const Providers = ({ children }: { children: React.ReactNode }) => { return ( - - - {children} - - + + + + {children} + + + ); }; diff --git a/src/common/api/API.ts b/src/common/api/API.ts deleted file mode 100644 index 94a72b90..00000000 --- a/src/common/api/API.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * API Docs: https://github.com/PotLock/django-indexer?tab=readme-ov-file#api-endpoints - */ - -export const URI = "http://ec2-100-27-57-47.compute-1.amazonaws.com/api/v1"; diff --git a/src/common/api/account.ts b/src/common/api/potlock/account.ts similarity index 77% rename from src/common/api/account.ts rename to src/common/api/potlock/account.ts index ab07e617..53d87779 100644 --- a/src/common/api/account.ts +++ b/src/common/api/potlock/account.ts @@ -1,4 +1,4 @@ -import { URI } from "./API"; +import { POTLOCK_API_ENDPOINT } from "../../constants"; type Accounts = { id: string; @@ -16,7 +16,7 @@ type GetAccountsResponse = { }; export const getAccounts = async () => { - const res = await fetch(`${URI}/accounts`); + const res = await fetch(`${POTLOCK_API_ENDPOINT}/accounts`); const json = await res.json(); return json as GetAccountsResponse; }; diff --git a/src/common/api/potlock/generated/index.ts b/src/common/api/potlock/generated/index.ts new file mode 100644 index 00000000..5beccc5b --- /dev/null +++ b/src/common/api/potlock/generated/index.ts @@ -0,0 +1 @@ +export * from "./zod/index"; \ 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 new file mode 100644 index 00000000..f42f22b6 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/Account.json @@ -0,0 +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 diff --git a/src/common/api/potlock/generated/schemas/DefaultRegistrationStatusEnum.json b/src/common/api/potlock/generated/schemas/DefaultRegistrationStatusEnum.json new file mode 100644 index 00000000..016c0721 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/DefaultRegistrationStatusEnum.json @@ -0,0 +1 @@ +{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"DefaultRegistrationStatusEnum"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/Donation.json b/src/common/api/potlock/generated/schemas/Donation.json new file mode 100644 index 00000000..0429c85b --- /dev/null +++ b/src/common/api/potlock/generated/schemas/Donation.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"Donation id.","type":"integer","readOnly":true,"title":"Donation id"},"on_chain_id":{"description":"Donation id in contract","type":"integer","maximum":2147483647,"minimum":-2147483648,"title":"Contract donation id"},"total_amount":{"description":"Total amount.","type":"string","maxLength":64},"total_amount_usd":{"description":"Total amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Total amount in USD"},"net_amount":{"description":"Net amount.","type":"string","maxLength":64},"net_amount_usd":{"description":"Net amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Net amount in USD"},"matching_pool":{"description":"Matching pool.","type":"boolean"},"message":{"description":"Donation message.","type":"string","maxLength":1024,"nullable":true},"donated_at":{"description":"Donation date.","type":"string","format":"date-time"},"protocol_fee":{"description":"Protocol fee.","type":"string","maxLength":64},"protocol_fee_usd":{"description":"Protocol fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Protocol fee in USD"},"referrer_fee":{"description":"Referrer fee.","type":"string","maxLength":64,"nullable":true},"referrer_fee_usd":{"description":"Referrer fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Referrer fee in USD"},"chef_fee":{"description":"Chef fee.","type":"string","maxLength":64,"nullable":true},"chef_fee_usd":{"description":"Chef fee in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Chef fee in USD"},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"title":"Transaction hash"},"donor":{"description":"Donor.","type":"string","title":"Address"},"ft":{"description":"Donation FT.","type":"string","title":"Address"},"pot":{"description":"Donation pot.","type":"string","nullable":true,"title":"Address"},"recipient":{"description":"Donation recipient.","type":"string","nullable":true,"title":"Address"},"referrer":{"description":"Donation referrer.","type":"string","nullable":true,"title":"Address"},"chef":{"description":"Donation chef.","type":"string","nullable":true,"title":"Address"}},"required":["donated_at","donor","ft","id","matching_pool","net_amount","on_chain_id","pot","protocol_fee","total_amount","tx_hash"],"x-readme-ref-name":"Donation"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/List.json b/src/common/api/potlock/generated/schemas/List.json new file mode 100644 index 00000000..d0697280 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/List.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"List id.","type":"integer","maximum":2147483647,"minimum":0,"title":"List id"},"name":{"description":"List name.","type":"string","maxLength":64},"description":{"description":"List description.","type":"string","maxLength":256,"nullable":true},"cover_image_url":{"description":"Cover image url.","type":"string","format":"uri","maxLength":200,"nullable":true},"admin_only_registrations":{"description":"Admin only registrations.","type":"boolean"},"default_registration_status":{"description":"Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","allOf":[{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"DefaultRegistrationStatusEnum"}]},"created_at":{"description":"List creation date.","type":"string","format":"date-time"},"updated_at":{"description":"List last update date.","type":"string","format":"date-time"},"owner":{"description":"List owner.","type":"string","title":"Address"},"admins":{"description":"List admins.","type":"array","items":{"type":"string","title":"Address"}}},"required":["admin_only_registrations","admins","created_at","default_registration_status","id","name","owner","updated_at"],"x-readme-ref-name":"List"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/ListRegistration.json b/src/common/api/potlock/generated/schemas/ListRegistration.json new file mode 100644 index 00000000..ad10ccfb --- /dev/null +++ b/src/common/api/potlock/generated/schemas/ListRegistration.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"Registration id.","type":"integer","readOnly":true,"title":"Registration id"},"status":{"description":"Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","allOf":[{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"StatusF24Enum"}],"title":"Registration status"},"submitted_at":{"description":"Registration submission date.","type":"string","format":"date-time"},"updated_at":{"description":"Registration last update date.","type":"string","format":"date-time"},"registrant_notes":{"description":"Registrant notes.","type":"string","maxLength":1024,"nullable":true},"admin_notes":{"description":"Admin notes.","type":"string","maxLength":1024,"nullable":true},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"nullable":true,"title":"Transaction hash"},"list":{"description":"List registered.","type":"integer","maximum":2147483647,"minimum":0,"title":"List id"},"registrant":{"description":"Account that registered on the list.","type":"string","title":"Address"},"registered_by":{"description":"Account that did the registration.","type":"string","title":"Address"}},"required":["id","list","registered_by","registrant","status","submitted_at","updated_at"],"x-readme-ref-name":"ListRegistration"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/Pot.json b/src/common/api/potlock/generated/schemas/Pot.json new file mode 100644 index 00000000..98fd4181 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/Pot.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"Pot account ID.","type":"string","title":"Address"},"pot_factory":{"description":"Pot factory.","type":"string","title":"Address"},"deployer":{"description":"Pot deployer.","type":"string","title":"Address"},"deployed_at":{"description":"Pot deployment date.","type":"string","format":"date-time"},"source_metadata":{"description":"Pot source metadata."},"owner":{"description":"Pot owner.","type":"string","title":"Address"},"admins":{"description":"Pot admins.","type":"array","items":{"type":"string","title":"Address"}},"chef":{"description":"Pot chef.","type":"string","nullable":true,"title":"Address"},"name":{"description":"Pot name.","type":"string"},"description":{"description":"Pot description.","type":"string"},"max_approved_applicants":{"description":"Max approved applicants.","type":"integer","maximum":2147483647,"minimum":0},"base_currency":{"description":"Base currency.","type":"string","maxLength":64,"nullable":true},"application_start":{"description":"Pot application start date.","type":"string","format":"date-time"},"application_end":{"description":"Pot application end date.","type":"string","format":"date-time"},"matching_round_start":{"description":"Pot matching round start date.","type":"string","format":"date-time"},"matching_round_end":{"description":"Pot matching round end date.","type":"string","format":"date-time"},"registry_provider":{"description":"Registry provider.","type":"string","maxLength":64,"nullable":true},"min_matching_pool_donation_amount":{"description":"Min matching pool donation amount.","type":"string","maxLength":64},"sybil_wrapper_provider":{"description":"Sybil wrapper provider.","type":"string","maxLength":64,"nullable":true},"custom_sybil_checks":{"description":"Custom sybil checks.","type":"string","maxLength":64,"nullable":true},"custom_min_threshold_score":{"description":"Custom min threshold score.","type":"integer","maximum":2147483647,"minimum":0,"nullable":true},"referral_fee_matching_pool_basis_points":{"description":"Referral fee matching pool basis points.","type":"integer","maximum":2147483647,"minimum":0},"referral_fee_public_round_basis_points":{"description":"Referral fee public round basis points.","type":"integer","maximum":2147483647,"minimum":0},"chef_fee_basis_points":{"description":"Chef fee basis points.","type":"integer","maximum":2147483647,"minimum":0},"total_matching_pool":{"description":"Total matching pool.","type":"string","maxLength":64},"total_matching_pool_usd":{"type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$"},"matching_pool_balance":{"description":"Matching pool balance.","type":"string","maxLength":64},"matching_pool_donations_count":{"description":"Matching pool donations count.","type":"integer","maximum":2147483647,"minimum":0},"total_public_donations":{"description":"Total public donations.","type":"string","maxLength":64},"total_public_donations_usd":{"type":"string","format":"decimal","pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$"},"public_donations_count":{"description":"Public donations count.","type":"integer","maximum":2147483647,"minimum":0},"cooldown_end":{"description":"Pot cooldown end date.","type":"string","format":"date-time","nullable":true},"cooldown_period_ms":{"description":"Pot cooldown period in ms.","type":"integer","maximum":2147483647,"minimum":0,"nullable":true,"title":"Cooldown period in ms"},"all_paid_out":{"description":"All paid out.","type":"boolean"},"protocol_config_provider":{"description":"Protocol config provider.","type":"string","maxLength":64,"nullable":true}},"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"],"x-readme-ref-name":"Pot"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/PotApplication.json b/src/common/api/potlock/generated/schemas/PotApplication.json new file mode 100644 index 00000000..2f0cc3f4 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/PotApplication.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"Application id.","type":"integer","readOnly":true,"title":"Application id"},"message":{"description":"Application message.","type":"string","maxLength":1024,"nullable":true},"status":{"description":"Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview","allOf":[{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview","type":"string","enum":["Pending","Approved","Rejected","InReview"],"x-readme-ref-name":"PotApplicationStatusEnum"}]},"submitted_at":{"description":"Application submission date.","type":"string","format":"date-time"},"updated_at":{"description":"Application last update date.","type":"string","format":"date-time"},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"title":"Transaction hash"},"pot":{"description":"Pot applied to.","type":"string","title":"Address"},"applicant":{"description":"Account that applied to the pot.","type":"string","title":"Address"}},"required":["applicant","id","pot","status","submitted_at","tx_hash","updated_at"],"x-readme-ref-name":"PotApplication"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/PotApplicationStatusEnum.json b/src/common/api/potlock/generated/schemas/PotApplicationStatusEnum.json new file mode 100644 index 00000000..c7203a33 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/PotApplicationStatusEnum.json @@ -0,0 +1 @@ +{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview","type":"string","enum":["Pending","Approved","Rejected","InReview"],"x-readme-ref-name":"PotApplicationStatusEnum"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/PotPayout.json b/src/common/api/potlock/generated/schemas/PotPayout.json new file mode 100644 index 00000000..e45b765a --- /dev/null +++ b/src/common/api/potlock/generated/schemas/PotPayout.json @@ -0,0 +1 @@ +{"type":"object","properties":{"id":{"description":"Payout id.","type":"integer","readOnly":true,"title":"Payout id"},"amount":{"description":"Payout amount.","type":"string","maxLength":64},"amount_paid_usd":{"description":"Payout amount in USD.","type":"string","format":"decimal","nullable":true,"pattern":"^-?\\d{0,18}(?:\\.\\d{0,2})?$","title":"Amount paid in USD"},"paid_at":{"description":"Payout date.","type":"string","format":"date-time"},"tx_hash":{"description":"Transaction hash.","type":"string","maxLength":64,"title":"Transaction hash"},"pot":{"description":"Pot that this payout is for.","type":"string","title":"Address"},"recipient":{"description":"Payout recipient.","type":"string","title":"Address"},"ft":{"description":"Payout FT.","type":"string","title":"Address"}},"required":["amount","ft","id","paid_at","pot","recipient","tx_hash"],"x-readme-ref-name":"PotPayout"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/StatsResponse.json b/src/common/api/potlock/generated/schemas/StatsResponse.json new file mode 100644 index 00000000..57cc305d --- /dev/null +++ b/src/common/api/potlock/generated/schemas/StatsResponse.json @@ -0,0 +1 @@ +{"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"],"x-readme-ref-name":"StatsResponse"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/StatusF24Enum.json b/src/common/api/potlock/generated/schemas/StatusF24Enum.json new file mode 100644 index 00000000..72479c15 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/StatusF24Enum.json @@ -0,0 +1 @@ +{"description":"* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted","type":"string","enum":["Pending","Approved","Rejected","Graylisted","Blacklisted"],"x-readme-ref-name":"StatusF24Enum"} \ 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 new file mode 100644 index 00000000..9a122f03 --- /dev/null +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -0,0 +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 diff --git a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts new file mode 100644 index 00000000..373dcb4d --- /dev/null +++ b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts @@ -0,0 +1,6 @@ +import { z } from "zod"; + + /** + * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ +export const defaultRegistrationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/donationSchema.ts b/src/common/api/potlock/generated/zod/donationSchema.ts new file mode 100644 index 00000000..2f0ca1a0 --- /dev/null +++ b/src/common/api/potlock/generated/zod/donationSchema.ts @@ -0,0 +1,4 @@ +import { z } from "zod"; + + +export const donationSchema = z.object({ "id": z.number().describe("Donation id."), "on_chain_id": z.number().min(-2147483648).max(2147483647).describe("Donation id in contract"), "total_amount": z.string().max(64).describe("Total amount."), "total_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total amount in USD.").nullable().nullish(), "net_amount": z.string().max(64).describe("Net amount."), "net_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Net amount in USD.").nullable().nullish(), "matching_pool": z.boolean().describe("Matching pool."), "message": z.string().max(1024).describe("Donation message.").nullable().nullish(), "donated_at": z.string().datetime().describe("Donation date."), "protocol_fee": z.string().max(64).describe("Protocol fee."), "protocol_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Protocol fee in USD.").nullable().nullish(), "referrer_fee": z.string().max(64).describe("Referrer fee.").nullable().nullish(), "referrer_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Referrer fee in USD.").nullable().nullish(), "chef_fee": z.string().max(64).describe("Chef fee.").nullable().nullish(), "chef_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Chef fee in USD.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash."), "donor": z.string().describe("Donor."), "ft": z.string().describe("Donation FT."), "pot": z.string().describe("Donation pot.").nullable(), "recipient": z.string().describe("Donation recipient.").nullable().nullish(), "referrer": z.string().describe("Donation referrer.").nullable().nullish(), "chef": z.string().describe("Donation chef.").nullable().nullish() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/index.ts b/src/common/api/potlock/generated/zod/index.ts new file mode 100644 index 00000000..ae4fe072 --- /dev/null +++ b/src/common/api/potlock/generated/zod/index.ts @@ -0,0 +1,25 @@ +export * from "./accountSchema"; +export * from "./defaultRegistrationStatusEnumSchema"; +export * from "./donationSchema"; +export * from "./listRegistrationSchema"; +export * from "./listSchema"; +export * from "./potApplicationSchema"; +export * from "./potApplicationStatusEnumSchema"; +export * from "./potPayoutSchema"; +export * from "./potSchema"; +export * from "./statsResponseSchema"; +export * from "./statusF24EnumSchema"; +export * from "./v1AccountsActivePotsRetrieveSchema"; +export * from "./v1AccountsRetrieve2Schema"; +export * from "./v1AccountsRetrieveSchema"; +export * from "./v1DonorsRetrieveSchema"; +export * from "./v1ListsRegistrationsRetrieveSchema"; +export * from "./v1ListsRetrieve2Schema"; +export * from "./v1ListsRetrieveSchema"; +export * from "./v1PotsApplicationsRetrieveSchema"; +export * from "./v1PotsDonationsRetrieveSchema"; +export * from "./v1PotsPayoutsRetrieveSchema"; +export * from "./v1PotsRetrieve2Schema"; +export * from "./v1PotsRetrieveSchema"; +export * from "./v1PotsSponsorsRetrieveSchema"; +export * from "./v1StatsRetrieveSchema"; \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts new file mode 100644 index 00000000..912e05eb --- /dev/null +++ b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts @@ -0,0 +1,5 @@ +import { statusF24EnumSchema } from "./statusF24EnumSchema"; +import { z } from "zod"; + + +export const listRegistrationSchema = z.object({ "id": z.number().describe("Registration id."), "status": z.lazy(() => statusF24EnumSchema).describe("Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "submitted_at": z.string().datetime().describe("Registration submission date."), "updated_at": z.string().datetime().describe("Registration last update date."), "registrant_notes": z.string().max(1024).describe("Registrant notes.").nullable().nullish(), "admin_notes": z.string().max(1024).describe("Admin notes.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash.").nullable().nullish(), "list": z.number().min(0).max(2147483647).describe("List registered."), "registrant": z.string().describe("Account that registered on the list."), "registered_by": z.string().describe("Account that did the registration.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/listSchema.ts b/src/common/api/potlock/generated/zod/listSchema.ts new file mode 100644 index 00000000..dc978cf0 --- /dev/null +++ b/src/common/api/potlock/generated/zod/listSchema.ts @@ -0,0 +1,5 @@ +import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; +import { z } from "zod"; + + +export const listSchema = z.object({ "id": z.number().min(0).max(2147483647).describe("List id."), "name": z.string().max(64).describe("List name."), "description": z.string().max(256).describe("List description.").nullable().nullish(), "cover_image_url": z.string().url().max(200).describe("Cover image url.").nullable().nullish(), "admin_only_registrations": z.boolean().describe("Admin only registrations."), "default_registration_status": z.lazy(() => defaultRegistrationStatusEnumSchema).describe("Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "created_at": z.string().datetime().describe("List creation date."), "updated_at": z.string().datetime().describe("List last update date."), "owner": z.string().describe("List owner."), "admins": z.array(z.string()).describe("List admins.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/operations.ts b/src/common/api/potlock/generated/zod/operations.ts new file mode 100644 index 00000000..3a01f9a8 --- /dev/null +++ b/src/common/api/potlock/generated/zod/operations.ts @@ -0,0 +1,202 @@ +import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./v1AccountsRetrieveSchema"; +import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema, v1AccountsRetrieve2PathParamsSchema } from "./v1AccountsRetrieve2Schema"; +import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema } from "./v1AccountsActivePotsRetrieveSchema"; +import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieve500Schema, v1DonorsRetrieveQueryParamsSchema } from "./v1DonorsRetrieveSchema"; +import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./v1ListsRetrieveSchema"; +import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema, v1ListsRetrieve2PathParamsSchema } from "./v1ListsRetrieve2Schema"; +import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema, v1ListsRegistrationsRetrievePathParamsSchema } from "./v1ListsRegistrationsRetrieveSchema"; +import { v1PotsRetrieveQueryResponseSchema } from "./v1PotsRetrieveSchema"; +import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2404Schema, v1PotsRetrieve2PathParamsSchema } from "./v1PotsRetrieve2Schema"; +import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrieve404Schema, v1PotsApplicationsRetrievePathParamsSchema } from "./v1PotsApplicationsRetrieveSchema"; +import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrieve404Schema, v1PotsDonationsRetrievePathParamsSchema } from "./v1PotsDonationsRetrieveSchema"; +import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrieve404Schema, v1PotsPayoutsRetrievePathParamsSchema } from "./v1PotsPayoutsRetrieveSchema"; +import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrieve404Schema, v1PotsSponsorsRetrievePathParamsSchema } from "./v1PotsSponsorsRetrieveSchema"; +import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./v1StatsRetrieveSchema"; + + export const operations = { "v1_accounts_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1AccountsRetrieveQueryResponseSchema, + 500: v1AccountsRetrieve500Schema + } + }, "v1_accounts_retrieve_2": { + request: undefined, + parameters: { + path: v1AccountsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1AccountsRetrieve2QueryResponseSchema, + 404: v1AccountsRetrieve2404Schema, + 500: v1AccountsRetrieve2500Schema + } + }, "v1_accounts_active_pots_retrieve": { + request: undefined, + parameters: { + path: v1AccountsActivePotsRetrievePathParamsSchema, + query: v1AccountsActivePotsRetrieveQueryParamsSchema, + header: undefined + }, + responses: { + 200: v1AccountsActivePotsRetrieveQueryResponseSchema, + 404: v1AccountsActivePotsRetrieve404Schema, + 500: v1AccountsActivePotsRetrieve500Schema + } + }, "v1_donors_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: v1DonorsRetrieveQueryParamsSchema, + header: undefined + }, + responses: { + 200: v1DonorsRetrieveQueryResponseSchema, + 500: v1DonorsRetrieve500Schema + } + }, "v1_lists_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRetrieveQueryResponseSchema, + 500: v1ListsRetrieve500Schema + } + }, "v1_lists_retrieve_2": { + request: undefined, + parameters: { + path: v1ListsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRetrieve2QueryResponseSchema, + 404: v1ListsRetrieve2404Schema, + 500: v1ListsRetrieve2500Schema + } + }, "v1_lists_registrations_retrieve": { + request: undefined, + parameters: { + path: v1ListsRegistrationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRegistrationsRetrieveQueryResponseSchema, + 404: v1ListsRegistrationsRetrieve404Schema, + 500: v1ListsRegistrationsRetrieve500Schema + } + }, "v1_pots_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsRetrieveQueryResponseSchema + } + }, "v1_pots_retrieve_2": { + request: undefined, + parameters: { + path: v1PotsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsRetrieve2QueryResponseSchema, + 404: v1PotsRetrieve2404Schema + } + }, "v1_pots_applications_retrieve": { + request: undefined, + parameters: { + path: v1PotsApplicationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsApplicationsRetrieveQueryResponseSchema, + 404: v1PotsApplicationsRetrieve404Schema + } + }, "v1_pots_donations_retrieve": { + request: undefined, + parameters: { + path: v1PotsDonationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsDonationsRetrieveQueryResponseSchema, + 404: v1PotsDonationsRetrieve404Schema + } + }, "v1_pots_payouts_retrieve": { + request: undefined, + parameters: { + path: v1PotsPayoutsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsPayoutsRetrieveQueryResponseSchema, + 404: v1PotsPayoutsRetrieve404Schema + } + }, "v1_pots_sponsors_retrieve": { + request: undefined, + parameters: { + path: v1PotsSponsorsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsSponsorsRetrieveQueryResponseSchema, + 404: v1PotsSponsorsRetrieve404Schema + } + }, "v1_stats_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1StatsRetrieveQueryResponseSchema, + 500: v1StatsRetrieve500Schema + } + } } as const; +export const paths = { "/api/v1/accounts": { + get: operations["v1_accounts_retrieve"] + }, "/api/v1/accounts/{account_id}": { + get: operations["v1_accounts_retrieve_2"] + }, "/api/v1/accounts/{account_id}/active_pots": { + get: operations["v1_accounts_active_pots_retrieve"] + }, "/api/v1/donors": { + get: operations["v1_donors_retrieve"] + }, "/api/v1/lists": { + get: operations["v1_lists_retrieve"] + }, "/api/v1/lists/{list_id}": { + get: operations["v1_lists_retrieve_2"] + }, "/api/v1/lists/{list_id}/registrations": { + get: operations["v1_lists_registrations_retrieve"] + }, "/api/v1/pots": { + get: operations["v1_pots_retrieve"] + }, "/api/v1/pots/{pot_id}/": { + get: operations["v1_pots_retrieve_2"] + }, "/api/v1/pots/{pot_id}/applications": { + get: operations["v1_pots_applications_retrieve"] + }, "/api/v1/pots/{pot_id}/donations": { + get: operations["v1_pots_donations_retrieve"] + }, "/api/v1/pots/{pot_id}/payouts": { + get: operations["v1_pots_payouts_retrieve"] + }, "/api/v1/pots/{pot_id}/sponsors": { + get: operations["v1_pots_sponsors_retrieve"] + }, "/api/v1/stats": { + get: operations["v1_stats_retrieve"] + } } as const; \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potApplicationSchema.ts b/src/common/api/potlock/generated/zod/potApplicationSchema.ts new file mode 100644 index 00000000..0121babc --- /dev/null +++ b/src/common/api/potlock/generated/zod/potApplicationSchema.ts @@ -0,0 +1,5 @@ +import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; +import { z } from "zod"; + + +export const potApplicationSchema = z.object({ "id": z.number().describe("Application id."), "message": z.string().max(1024).describe("Application message.").nullable().nullish(), "status": z.lazy(() => potApplicationStatusEnumSchema).describe("Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"), "submitted_at": z.string().datetime().describe("Application submission date."), "updated_at": z.string().datetime().describe("Application last update date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot applied to."), "applicant": z.string().describe("Account that applied to the pot.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts new file mode 100644 index 00000000..b44597af --- /dev/null +++ b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts @@ -0,0 +1,6 @@ +import { z } from "zod"; + + /** + * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview + */ +export const potApplicationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "InReview"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potPayoutSchema.ts b/src/common/api/potlock/generated/zod/potPayoutSchema.ts new file mode 100644 index 00000000..d7277212 --- /dev/null +++ b/src/common/api/potlock/generated/zod/potPayoutSchema.ts @@ -0,0 +1,4 @@ +import { z } from "zod"; + + +export const potPayoutSchema = z.object({ "id": z.number().describe("Payout id."), "amount": z.string().max(64).describe("Payout amount."), "amount_paid_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Payout amount in USD.").nullable().nullish(), "paid_at": z.string().datetime().describe("Payout date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot that this payout is for."), "recipient": z.string().describe("Payout recipient."), "ft": z.string().describe("Payout FT.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potSchema.ts b/src/common/api/potlock/generated/zod/potSchema.ts new file mode 100644 index 00000000..a0c19ac6 --- /dev/null +++ b/src/common/api/potlock/generated/zod/potSchema.ts @@ -0,0 +1,4 @@ +import { z } from "zod"; + + +export const potSchema = z.object({ "id": z.string().describe("Pot account ID."), "pot_factory": z.string().describe("Pot factory."), "deployer": z.string().describe("Pot deployer."), "deployed_at": z.string().datetime().describe("Pot deployment date."), "source_metadata": z.any(), "owner": z.string().describe("Pot owner."), "admins": z.array(z.string()).describe("Pot admins."), "chef": z.string().describe("Pot chef.").nullable().nullish(), "name": z.string().describe("Pot name."), "description": z.string().describe("Pot description."), "max_approved_applicants": z.number().min(0).max(2147483647).describe("Max approved applicants."), "base_currency": z.string().max(64).describe("Base currency.").nullable().nullish(), "application_start": z.string().datetime().describe("Pot application start date."), "application_end": z.string().datetime().describe("Pot application end date."), "matching_round_start": z.string().datetime().describe("Pot matching round start date."), "matching_round_end": z.string().datetime().describe("Pot matching round end date."), "registry_provider": z.string().max(64).describe("Registry provider.").nullable().nullish(), "min_matching_pool_donation_amount": z.string().max(64).describe("Min matching pool donation amount."), "sybil_wrapper_provider": z.string().max(64).describe("Sybil wrapper provider.").nullable().nullish(), "custom_sybil_checks": z.string().max(64).describe("Custom sybil checks.").nullable().nullish(), "custom_min_threshold_score": z.number().min(0).max(2147483647).describe("Custom min threshold score.").nullable().nullish(), "referral_fee_matching_pool_basis_points": z.number().min(0).max(2147483647).describe("Referral fee matching pool basis points."), "referral_fee_public_round_basis_points": z.number().min(0).max(2147483647).describe("Referral fee public round basis points."), "chef_fee_basis_points": z.number().min(0).max(2147483647).describe("Chef fee basis points."), "total_matching_pool": z.string().max(64).describe("Total matching pool."), "total_matching_pool_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "matching_pool_balance": z.string().max(64).describe("Matching pool balance."), "matching_pool_donations_count": z.number().min(0).max(2147483647).describe("Matching pool donations count."), "total_public_donations": z.string().max(64).describe("Total public donations."), "total_public_donations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "public_donations_count": z.number().min(0).max(2147483647).describe("Public donations count."), "cooldown_end": z.string().datetime().describe("Pot cooldown end date.").nullable().nullish(), "cooldown_period_ms": z.number().min(0).max(2147483647).describe("Pot cooldown period in ms.").nullable().nullish(), "all_paid_out": z.boolean().describe("All paid out."), "protocol_config_provider": z.string().max(64).describe("Protocol config provider.").nullable().nullish() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/statsResponseSchema.ts b/src/common/api/potlock/generated/zod/statsResponseSchema.ts new file mode 100644 index 00000000..740a83f4 --- /dev/null +++ b/src/common/api/potlock/generated/zod/statsResponseSchema.ts @@ -0,0 +1,4 @@ +import { z } from "zod"; + + +export const statsResponseSchema = z.object({ "total_donations_usd": z.number(), "total_payouts_usd": z.number(), "total_donations_count": z.number(), "total_donors_count": z.number(), "total_recipients_count": z.number() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts new file mode 100644 index 00000000..fadb137a --- /dev/null +++ b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts @@ -0,0 +1,6 @@ +import { z } from "zod"; + + /** + * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ +export const statusF24EnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts new file mode 100644 index 00000000..e8777c51 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts @@ -0,0 +1,23 @@ +import { z } from "zod"; +import { potSchema } from "./potSchema"; + + +export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ "account_id": z.string() }); + + export const v1AccountsActivePotsRetrieveQueryParamsSchema = z.object({ "status": z.string().describe("Filter by pot status").optional() }).optional(); +/** + * @description Returns paginated active pots for the account + */ +export const v1AccountsActivePotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); +/** + * @description Account not found + */ +export const v1AccountsActivePotsRetrieve404Schema = z.any(); +/** + * @description Internal server error + */ +export const v1AccountsActivePotsRetrieve500Schema = z.any(); +/** + * @description Returns paginated active pots for the account + */ +export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts new file mode 100644 index 00000000..c65eec24 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts @@ -0,0 +1,21 @@ +import { z } from "zod"; +import { accountSchema } from "./accountSchema"; + + +export const v1AccountsRetrieve2PathParamsSchema = z.object({ "account_id": z.string() }); +/** + * @description Returns account details + */ +export const v1AccountsRetrieve2200Schema = z.lazy(() => accountSchema); +/** + * @description Account not found + */ +export const v1AccountsRetrieve2404Schema = z.any(); +/** + * @description Internal server error + */ +export const v1AccountsRetrieve2500Schema = z.any(); +/** + * @description Returns account details + */ +export const v1AccountsRetrieve2QueryResponseSchema = z.lazy(() => accountSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts new file mode 100644 index 00000000..f9ac9afe --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts @@ -0,0 +1,15 @@ +import { z } from "zod"; +import { accountSchema } from "./accountSchema"; + + /** + * @description Returns a list of accounts + */ +export const v1AccountsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); +/** + * @description Internal server error + */ +export const v1AccountsRetrieve500Schema = z.any(); +/** + * @description Returns a list of accounts + */ +export const v1AccountsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts new file mode 100644 index 00000000..0420a5e2 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { accountSchema } from "./accountSchema"; + + +export const v1DonorsRetrieveQueryParamsSchema = z.object({ "sort": z.string().describe("Sort by field, e.g., most_donated_usd").optional() }).optional(); +/** + * @description Returns a list of donor accounts + */ +export const v1DonorsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); +/** + * @description Internal server error + */ +export const v1DonorsRetrieve500Schema = z.any(); +/** + * @description Returns a list of donor accounts + */ +export const v1DonorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts new file mode 100644 index 00000000..9e191236 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts @@ -0,0 +1,21 @@ +import { z } from "zod"; +import { listRegistrationSchema } from "./listRegistrationSchema"; + + +export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ "list_id": z.number() }); +/** + * @description Returns registrations for the list + */ +export const v1ListsRegistrationsRetrieve200Schema = z.array(z.lazy(() => listRegistrationSchema)); +/** + * @description List not found + */ +export const v1ListsRegistrationsRetrieve404Schema = z.any(); +/** + * @description Internal server error + */ +export const v1ListsRegistrationsRetrieve500Schema = z.any(); +/** + * @description Returns registrations for the list + */ +export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array(z.lazy(() => listRegistrationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts new file mode 100644 index 00000000..4e88ea9b --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts @@ -0,0 +1,21 @@ +import { z } from "zod"; +import { listSchema } from "./listSchema"; + + +export const v1ListsRetrieve2PathParamsSchema = z.object({ "list_id": z.number() }); +/** + * @description Returns list details + */ +export const v1ListsRetrieve2200Schema = z.lazy(() => listSchema); +/** + * @description List not found + */ +export const v1ListsRetrieve2404Schema = z.any(); +/** + * @description Internal server error + */ +export const v1ListsRetrieve2500Schema = z.any(); +/** + * @description Returns list details + */ +export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts new file mode 100644 index 00000000..a6578129 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts @@ -0,0 +1,15 @@ +import { z } from "zod"; +import { listSchema } from "./listSchema"; + + /** + * @description Returns a list of lists + */ +export const v1ListsRetrieve200Schema = z.array(z.lazy(() => listSchema)); +/** + * @description Internal server error + */ +export const v1ListsRetrieve500Schema = z.any(); +/** + * @description Returns a list of lists + */ +export const v1ListsRetrieveQueryResponseSchema = z.array(z.lazy(() => listSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts new file mode 100644 index 00000000..1392b571 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { potApplicationSchema } from "./potApplicationSchema"; + + +export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +/** + * @description Returns applications for the pot + */ +export const v1PotsApplicationsRetrieve200Schema = z.array(z.lazy(() => potApplicationSchema)); +/** + * @description Pot not found + */ +export const v1PotsApplicationsRetrieve404Schema = z.any(); +/** + * @description Returns applications for the pot + */ +export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array(z.lazy(() => potApplicationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts new file mode 100644 index 00000000..707a67b7 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { donationSchema } from "./donationSchema"; + + +export const v1PotsDonationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +/** + * @description Returns donations for the pot + */ +export const v1PotsDonationsRetrieve200Schema = z.array(z.lazy(() => donationSchema)); +/** + * @description Pot not found + */ +export const v1PotsDonationsRetrieve404Schema = z.any(); +/** + * @description Returns donations for the pot + */ +export const v1PotsDonationsRetrieveQueryResponseSchema = z.array(z.lazy(() => donationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts new file mode 100644 index 00000000..9892362f --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { potPayoutSchema } from "./potPayoutSchema"; + + +export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +/** + * @description Returns payouts for the pot + */ +export const v1PotsPayoutsRetrieve200Schema = z.array(z.lazy(() => potPayoutSchema)); +/** + * @description Pot not found + */ +export const v1PotsPayoutsRetrieve404Schema = z.any(); +/** + * @description Returns payouts for the pot + */ +export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array(z.lazy(() => potPayoutSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts new file mode 100644 index 00000000..a9ebf834 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { potSchema } from "./potSchema"; + + +export const v1PotsRetrieve2PathParamsSchema = z.object({ "pot_id": z.string() }); +/** + * @description Returns pot details + */ +export const v1PotsRetrieve2200Schema = z.lazy(() => potSchema); +/** + * @description Pot not found + */ +export const v1PotsRetrieve2404Schema = z.any(); +/** + * @description Returns pot details + */ +export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts new file mode 100644 index 00000000..373724c1 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; +import { potSchema } from "./potSchema"; + + /** + * @description Returns a list of pots + */ +export const v1PotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); +/** + * @description Returns a list of pots + */ +export const v1PotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts new file mode 100644 index 00000000..1a0a53e2 --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts @@ -0,0 +1,17 @@ +import { z } from "zod"; +import { accountSchema } from "./accountSchema"; + + +export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +/** + * @description Returns sponsors for the pot + */ +export const v1PotsSponsorsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); +/** + * @description Pot not found + */ +export const v1PotsSponsorsRetrieve404Schema = z.any(); +/** + * @description Returns sponsors for the pot + */ +export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts new file mode 100644 index 00000000..a74f954c --- /dev/null +++ b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts @@ -0,0 +1,15 @@ +import { z } from "zod"; +import { statsResponseSchema } from "./statsResponseSchema"; + + /** + * @description Returns statistics data + */ +export const v1StatsRetrieve200Schema = z.lazy(() => statsResponseSchema); +/** + * @description Internal server error + */ +export const v1StatsRetrieve500Schema = z.any(); +/** + * @description Returns statistics data + */ +export const v1StatsRetrieveQueryResponseSchema = z.lazy(() => statsResponseSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zodios.ts b/src/common/api/potlock/generated/zodios.ts new file mode 100644 index 00000000..9576a620 --- /dev/null +++ b/src/common/api/potlock/generated/zodios.ts @@ -0,0 +1,321 @@ +import { makeApi, Zodios } from "@zodios/core"; +import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./zod/v1AccountsRetrieveSchema"; +import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2PathParamsSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema } from "./zod/v1AccountsRetrieve2Schema"; +import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema } from "./zod/v1AccountsActivePotsRetrieveSchema"; +import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieveQueryParamsSchema, v1DonorsRetrieve500Schema } from "./zod/v1DonorsRetrieveSchema"; +import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./zod/v1ListsRetrieveSchema"; +import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2PathParamsSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema } from "./zod/v1ListsRetrieve2Schema"; +import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrievePathParamsSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema } from "./zod/v1ListsRegistrationsRetrieveSchema"; +import { v1PotsRetrieveQueryResponseSchema } from "./zod/v1PotsRetrieveSchema"; +import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2PathParamsSchema, v1PotsRetrieve2404Schema } from "./zod/v1PotsRetrieve2Schema"; +import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrievePathParamsSchema, v1PotsApplicationsRetrieve404Schema } from "./zod/v1PotsApplicationsRetrieveSchema"; +import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrievePathParamsSchema, v1PotsDonationsRetrieve404Schema } from "./zod/v1PotsDonationsRetrieveSchema"; +import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrievePathParamsSchema, v1PotsPayoutsRetrieve404Schema } from "./zod/v1PotsPayoutsRetrieveSchema"; +import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrievePathParamsSchema, v1PotsSponsorsRetrieve404Schema } from "./zod/v1PotsSponsorsRetrieveSchema"; +import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./zod/v1StatsRetrieveSchema"; + + export const endpoints = makeApi([ + { + method: "get", + path: "/api/v1/accounts", + description: ``, + requestFormat: "json", + parameters: [], + response: v1AccountsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1AccountsRetrieve500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/accounts/:account_id", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "account_id", + description: ``, + type: "Path", + schema: v1AccountsRetrieve2PathParamsSchema.shape["account_id"] + } + ], + response: v1AccountsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `Account not found`, + schema: v1AccountsRetrieve2404Schema + }, + { + status: 500, + description: `Internal server error`, + schema: v1AccountsRetrieve2500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/accounts/:account_id/active_pots", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "account_id", + description: ``, + type: "Path", + schema: v1AccountsActivePotsRetrievePathParamsSchema.shape["account_id"] + }, + { + name: "status", + description: `Filter by pot status`, + type: "Query", + schema: v1AccountsActivePotsRetrieveQueryParamsSchema.unwrap().shape["status"] + } + ], + response: v1AccountsActivePotsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Account not found`, + schema: v1AccountsActivePotsRetrieve404Schema + }, + { + status: 500, + description: `Internal server error`, + schema: v1AccountsActivePotsRetrieve500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/donors", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "sort", + description: `Sort by field, e.g., most_donated_usd`, + type: "Query", + schema: v1DonorsRetrieveQueryParamsSchema.unwrap().shape["sort"] + } + ], + response: v1DonorsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1DonorsRetrieve500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/lists", + description: ``, + requestFormat: "json", + parameters: [], + response: v1ListsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1ListsRetrieve500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/lists/:list_id", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "list_id", + description: ``, + type: "Path", + schema: v1ListsRetrieve2PathParamsSchema.shape["list_id"] + } + ], + response: v1ListsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `List not found`, + schema: v1ListsRetrieve2404Schema + }, + { + status: 500, + description: `Internal server error`, + schema: v1ListsRetrieve2500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/lists/:list_id/registrations", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "list_id", + description: ``, + type: "Path", + schema: v1ListsRegistrationsRetrievePathParamsSchema.shape["list_id"] + } + ], + response: v1ListsRegistrationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `List not found`, + schema: v1ListsRegistrationsRetrieve404Schema + }, + { + status: 500, + description: `Internal server error`, + schema: v1ListsRegistrationsRetrieve500Schema + } + ], + }, + { + method: "get", + path: "/api/v1/pots", + description: ``, + requestFormat: "json", + parameters: [], + response: v1PotsRetrieveQueryResponseSchema, + errors: [], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", + description: ``, + type: "Path", + schema: v1PotsRetrieve2PathParamsSchema.shape["pot_id"] + } + ], + response: v1PotsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsRetrieve2404Schema + } + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/applications", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", + description: ``, + type: "Path", + schema: v1PotsApplicationsRetrievePathParamsSchema.shape["pot_id"] + } + ], + response: v1PotsApplicationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsApplicationsRetrieve404Schema + } + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/donations", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", + description: ``, + type: "Path", + schema: v1PotsDonationsRetrievePathParamsSchema.shape["pot_id"] + } + ], + response: v1PotsDonationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsDonationsRetrieve404Schema + } + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/payouts", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", + description: ``, + type: "Path", + schema: v1PotsPayoutsRetrievePathParamsSchema.shape["pot_id"] + } + ], + response: v1PotsPayoutsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsPayoutsRetrieve404Schema + } + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/sponsors", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", + description: ``, + type: "Path", + schema: v1PotsSponsorsRetrievePathParamsSchema.shape["pot_id"] + } + ], + response: v1PotsSponsorsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsSponsorsRetrieve404Schema + } + ], + }, + { + method: "get", + path: "/api/v1/stats", + description: ``, + requestFormat: "json", + parameters: [], + response: v1StatsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1StatsRetrieve500Schema + } + ], + } +]); +export const getAPI = (baseUrl: string) => new Zodios(baseUrl, endpoints); +export const api = new Zodios(endpoints); +export default api; \ No newline at end of file diff --git a/src/common/api/potlock/index.ts b/src/common/api/potlock/index.ts new file mode 100644 index 00000000..a0ad1152 --- /dev/null +++ b/src/common/api/potlock/index.ts @@ -0,0 +1,18 @@ +import { ZodiosHooks } from "@zodios/react"; +import { infer as FromSchema } from "zod"; + +import { accountSchema } from "./generated"; +import { getAPI } from "./generated/zodios"; +import { POTLOCK_API_ENDPOINT } from "../../constants"; +export * from "./generated"; +export * from "./generated/zodios"; + +export type Account = FromSchema; + +export type AccountId = Account["id"]; + +const client = getAPI(POTLOCK_API_ENDPOINT); + +export const { useQuery: usePotlockQuery } = new ZodiosHooks("Potlock", client); + +usePotlockQuery(""); diff --git a/src/common/api/potlock/index.yaml b/src/common/api/potlock/index.yaml new file mode 100644 index 00000000..1b20fe5f --- /dev/null +++ b/src/common/api/potlock/index.yaml @@ -0,0 +1,1278 @@ +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 diff --git a/src/common/constants.ts b/src/common/constants.ts index e56e0b46..e65c5e91 100644 --- a/src/common/constants.ts +++ b/src/common/constants.ts @@ -1,6 +1,13 @@ import { Network } from "@wpdas/naxios"; import { utils } from "near-api-js"; +/** + * Docs: https://dev.potlock.io/api/schema/swagger-ui/ + */ +export const POTLOCK_API_ENDPOINT = + process.env.NEXT_PUBLIC_API_ENDPOINT ?? + "http://ec2-100-27-57-47.compute-1.amazonaws.com/api/v1"; + // NETWORK export const NETWORK = (process.env.NEXT_PUBLIC_NETWORK || "testnet") as Network; diff --git a/src/common/hooks/useGetAccounts.ts b/src/common/hooks/useGetAccounts.ts index f08817e0..2b249719 100644 --- a/src/common/hooks/useGetAccounts.ts +++ b/src/common/hooks/useGetAccounts.ts @@ -1,6 +1,6 @@ import { useQuery } from "@tanstack/react-query"; -import { getAccounts } from "@/common/api/account"; +import { getAccounts } from "@/common/api/potlock/account"; const useGetAccounts = () => { const accounts = useQuery({ diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx new file mode 100644 index 00000000..073ef738 --- /dev/null +++ b/src/common/ui/components/dialog.tsx @@ -0,0 +1,139 @@ +"use client"; + +import { forwardRef } from "react"; + +import * as DialogPrimitive from "@radix-ui/react-dialog"; +import { X } from "lucide-react"; + +import { cn } from "../utils"; + +const Dialog = DialogPrimitive.Root; + +const DialogTrigger = DialogPrimitive.Trigger; + +const DialogPortal = DialogPrimitive.Portal; + +const DialogClose = DialogPrimitive.Close; + +const DialogOverlay = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; + +const DialogContent = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, children, ...props }, ref) => ( + + + + {children} + + + + Close + + + +)); +DialogContent.displayName = DialogPrimitive.Content.displayName; + +const DialogHeader = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+); +DialogHeader.displayName = "DialogHeader"; + +const DialogFooter = ({ + className, + ...props +}: React.HTMLAttributes) => ( +
+); +DialogFooter.displayName = "DialogFooter"; + +const DialogTitle = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogTitle.displayName = DialogPrimitive.Title.displayName; + +const DialogDescription = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + +)); +DialogDescription.displayName = DialogPrimitive.Description.displayName; + +export { + Dialog, + DialogPortal, + DialogOverlay, + DialogClose, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, +}; diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx new file mode 100644 index 00000000..3886815e --- /dev/null +++ b/src/modules/donation/components/DonationModal.tsx @@ -0,0 +1,48 @@ +import { useCallback } from "react"; + +import { create, show, useModal } from "@ebay/nice-modal-react"; + +import { AccountId } from "@/common/api/potlock"; +import { + Dialog, + DialogClose, + DialogContent, + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/common/ui/components/dialog"; + +export type DonationModalProps = { + projectId: AccountId; +}; + +export const DonationModal = create(({ projectId }: DonationModalProps) => { + const { hide, remove, visible } = useModal(); + + const onCloseClick = useCallback(() => { + hide(); + remove(); + }, [hide, remove]); + + return ( + + + + + + Are you absolutely sure? + + + This action cannot be undone. This will permanently delete your + account and remove your data from our servers. + + + + + ); +}); + +export const useDonationModal = () => useModal(DonationModal); + +export const openDonationModal = (props: DonationModalProps) => + show(DonationModal, props); diff --git a/src/modules/donation/index.ts b/src/modules/donation/index.ts new file mode 100644 index 00000000..14d842c0 --- /dev/null +++ b/src/modules/donation/index.ts @@ -0,0 +1,4 @@ +export { + openDonationModal, + useDonationModal, +} from "./components/DonationModal"; diff --git a/src/modules/project/components/Card.tsx b/src/modules/project/components/ProjectCard.tsx similarity index 97% rename from src/modules/project/components/Card.tsx rename to src/modules/project/components/ProjectCard.tsx index 726c117b..8492a7a8 100644 --- a/src/modules/project/components/Card.tsx +++ b/src/modules/project/components/ProjectCard.tsx @@ -7,13 +7,14 @@ import { dispatch } from "@/app/_store"; import { PayoutDetailed } from "@/common/contracts/potlock/interfaces/pot.interfaces"; import { _address, yoctosToNear } from "@/common/lib"; import { Button } from "@/common/ui/components/button"; +import { useDonationModal } from "@/modules/donation"; import { useProfile } from "@/modules/profile/utils"; import CardSkeleton from "./CardSkeleton"; const MAX_DESCRIPTION_LENGTH = 80; -const Card = ({ +export const ProjectCard = ({ projectId, potId, allowDonate: _allowDonate, @@ -26,6 +27,8 @@ const Card = ({ }) => { const allowDonate = _allowDonate === undefined ? true : _allowDonate; + const donationModal = useDonationModal(); + const { socialData, socialImages, tags, totalAmountNear } = useProfile(projectId); @@ -166,5 +169,3 @@ const Card = ({ ); }; - -export default Card; diff --git a/src/modules/project/index.ts b/src/modules/project/index.ts new file mode 100644 index 00000000..71574608 --- /dev/null +++ b/src/modules/project/index.ts @@ -0,0 +1 @@ +export { ProjectCard } from "./components/ProjectCard"; diff --git a/yarn.lock b/yarn.lock index f2ba2909..de67e266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28,6 +28,11 @@ resolved "https://registry.npmjs.org/@antfu/utils/-/utils-0.7.8.tgz" integrity sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg== +"@apidevtools/swagger-methods@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267" + integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg== + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5", "@babel/code-frame@^7.24.2": version "7.24.2" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz" @@ -44,6 +49,14 @@ "@babel/highlight" "^7.24.6" picocolors "^1.0.0" +"@babel/code-frame@^7.16.0": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/compat-data@^7.23.5": version "7.24.4" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz" @@ -225,6 +238,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e" integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.23.5": version "7.23.5" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz" @@ -259,6 +277,16 @@ js-tokens "^4.0.0" picocolors "^1.0.0" +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/parser@^7.1.0", "@babel/parser@^7.20.7": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328" @@ -341,6 +369,13 @@ dependencies: regenerator-runtime "^0.14.0" +"@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12" + integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.22.15", "@babel/template@^7.24.0": version "7.24.0" resolved "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz" @@ -384,6 +419,11 @@ "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" +"@ebay/nice-modal-react@^1.2.13": + version "1.2.13" + resolved "https://registry.yarnpkg.com/@ebay/nice-modal-react/-/nice-modal-react-1.2.13.tgz#7e8229fe3a48a11f27cd7f5e21190d82d6f609ce" + integrity sha512-jx8xIWe/Up4tpNuM02M+rbnLoxdngTGk3Y8LjJsLGXXcSoKd/+eZStZcAlIO/jwxyz/bhPZnpqPJZWAmhOofuA== + "@esbuild/aix-ppc64@0.20.2": version "0.20.2" resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537" @@ -873,6 +913,11 @@ "@ethersproject/properties" "^5.7.0" "@ethersproject/strings" "^5.7.0" +"@exodus/schemasafe@^1.0.0-rc.2": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.3.0.tgz#731656abe21e8e769a7f70a4d833e6312fe59b7f" + integrity sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw== + "@floating-ui/core@^1.0.0": version "1.6.2" resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.2.tgz#d37f3e0ac1f1c756c7de45db13303a266226851a" @@ -923,6 +968,11 @@ resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== +"@humanwhocodes/momoa@^2.0.3": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/momoa/-/momoa-2.0.4.tgz#8b9e7a629651d15009c3587d07a222deeb829385" + integrity sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA== + "@humanwhocodes/object-schema@^2.0.2": version "2.0.3" resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" @@ -997,6 +1047,155 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@jsdevtools/ono@^7.1.3": + version "7.1.3" + resolved "https://registry.yarnpkg.com/@jsdevtools/ono/-/ono-7.1.3.tgz#9df03bbd7c696a5c58885c34aa06da41c8543796" + integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== + +"@kubb/cli@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/cli/-/cli-2.19.5.tgz#3dd619b37dbf393d1b3f013159a1f61f1074e94e" + integrity sha512-Oeb+ikmTZb78XQjXv9o2L5LAU9ir5sw3wxg6jCZBoyFyHpw0sALc4Z+ck+JtXi6eoS+ujT3SAQ69aJb6TC+mtQ== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + bundle-require "^4.1.0" + chokidar "^3.6.0" + citty "^0.1.6" + consola "^3.2.3" + cosmiconfig "^9.0.0" + esbuild "^0.20.2" + execa "^8.0.1" + js-runtime "^0.0.8" + latest-version "^9.0.0" + ora "^8.0.1" + semver "^7.6.2" + string-argv "^0.3.2" + tinyrainbow "^1.1.1" + +"@kubb/core@2.19.5", "@kubb/core@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/core/-/core-2.19.5.tgz#117511b4a5934bf90cbb646892b893687c74c7b4" + integrity sha512-s/kf6fAf3fszcOvG3w/mOWQDqgr0yOhXyM0zMiYlJK43ZZ9ZbM7gy0LhFmabzOFP3geuyU3I3YySE0OKG4ldSQ== + dependencies: + "@kubb/fs" "2.19.5" + "@kubb/parser-ts" "2.19.5" + "@kubb/types" "2.19.5" + change-case "^5.4.4" + directory-tree "^3.5.1" + find-up "^7.0.0" + natural-orderby "^3.0.2" + p-queue "^8.0.1" + remeda "^2.0.0" + seedrandom "^3.0.5" + semver "^7.6.2" + unraw "^3.0.0" + +"@kubb/fs@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/fs/-/fs-2.19.5.tgz#89e5ccdaaa8aad61087aa22fafae9c1f6b94170b" + integrity sha512-cJ+eNh1fzFXpMSsdLTcmHV50d2wso6gkKRnz3vqyF9Xus1kpcVkQCruEs8RmsAW7mHEtcfWEI+tMfzqTDxpTjA== + dependencies: + fs-extra "^11.2.0" + js-runtime "^0.0.8" + +"@kubb/oas@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/oas/-/oas-2.19.5.tgz#484a1110f08ecbd132739b762e7e5dbefeab0e52" + integrity sha512-Da7R3oPsL61H6LU1zxBFrhI40jKHZpeyHmvkVlIOwSEVNH20a85Qq6OrNM0QaG0/vm7aro9sapg4ZIk5GvNqxg== + dependencies: + "@redocly/openapi-core" "^1.14.0" + hotscript "^1.0.13" + json-schema-to-ts "^3.1.0" + oas "^24.3.6" + oas-normalize "^11.1.0" + openapi-format "^1.17.1" + openapi-types "^12.1.3" + remeda "^2.0.0" + swagger2openapi "^7.0.8" + ts-toolbelt "^9.6.0" + +"@kubb/parser-ts@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/parser-ts/-/parser-ts-2.19.5.tgz#6bc6e2ab72d8d93babd7cde786bd526f49a569f7" + integrity sha512-22xrxzQC9GScFa7W+Y0dNkiN8DPcgi9q4jszS3vHaz4zXsst31tNyzAnBe73KFdsW7JecELS+3/qQmd3PbB1NA== + dependencies: + remeda "^2.0.0" + typescript "^5.4.5" + +"@kubb/plugin-oas@2.19.5", "@kubb/plugin-oas@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/plugin-oas/-/plugin-oas-2.19.5.tgz#8ad2a10e3c02cafc97e8fe9811cf7995ef435a73" + integrity sha512-DkdrGFJpUxVOBdwXLWpB7GUq4zhqRFwb3btzWeU3wPG2QX4UjiZ49ZzT/rvGsbH3yl3blYXCn1sXIKRmOFqVyw== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/oas" "2.19.5" + "@kubb/react" "2.19.5" + "@stoplight/yaml" "^4.3.0" + remeda "^2.0.0" + +"@kubb/react@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/react/-/react-2.19.5.tgz#b3ff3dea8c3b2ba8d612e226d161c69dc6556a4d" + integrity sha512-9reIEq0fyyAeCIUknhyjYTJGxRtnO2a70i5wBd80X3GHyT9dRA5eLDasd5m1NFGI8EsG+T77343IRg90z+YCag== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/parser-ts" "2.19.5" + natural-orderby "^3.0.2" + +"@kubb/swagger-ts@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/swagger-ts/-/swagger-ts-2.19.5.tgz#3eeb7b140eafba1496bf28b2a6f9c2d640bf4ae0" + integrity sha512-POjCRSPX4fKzZ+Ln0XEMeo6i7RM4RGm+n7nHo3iXP5ZxrD28fFgzWML7T7Eo6JT+2nNp+vG94NSkGDUo4PLpjQ== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/oas" "2.19.5" + "@kubb/parser-ts" "2.19.5" + "@kubb/plugin-oas" "2.19.5" + "@kubb/react" "2.19.5" + "@kubb/types" "2.19.5" + +"@kubb/swagger-zod@2.19.5", "@kubb/swagger-zod@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/swagger-zod/-/swagger-zod-2.19.5.tgz#5cd8e41915a3be8fb799e6836245184f8a193476" + integrity sha512-tP/3HhopVHHbctR928vPGg4vWXlLfJmEKo948xD/CvLiq3G9G2K6b5VtiivwB20CjFvnofxWhYx6rYdJFWBC2g== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/oas" "2.19.5" + "@kubb/parser-ts" "2.19.5" + "@kubb/plugin-oas" "2.19.5" + "@kubb/react" "2.19.5" + "@kubb/swagger-ts" "2.19.5" + +"@kubb/swagger-zodios@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/swagger-zodios/-/swagger-zodios-2.19.5.tgz#8971576b4696b8e9b58af81bb67a5a7c7c0692ff" + integrity sha512-z5OcF4wD2RgWcrEK7lClsXy76BXUuPpq+ZXGtD2sKGQd3NIDqUQa8LMT4qWMDRwDBHrBV3FCDiFgxLU6JJnyTw== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/oas" "2.19.5" + "@kubb/parser-ts" "2.19.5" + "@kubb/plugin-oas" "2.19.5" + "@kubb/react" "2.19.5" + "@kubb/swagger-zod" "2.19.5" + +"@kubb/swagger@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/swagger/-/swagger-2.19.5.tgz#b070c97a543de48bf38c0f9bfdd2e41ad1aa7913" + integrity sha512-bqLwMT72T9VHr7b3/BXVQgJ5iVd3EffTb9P808/elyYxTMvH0EG9uDUMe4utaVQhI1gLca5+IKQovSwZ7NooDw== + dependencies: + "@kubb/plugin-oas" "2.19.5" + +"@kubb/types@2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/types/-/types-2.19.5.tgz#c5186619173f21b3ee311334be0239d583fea48e" + integrity sha512-YxWMGAzGXOcw+RC3++lXIk0CO7dA2iqTVbQ9lxyVKOI89iUbTeydA7cSaC1M2iAx/6C2xoBHYrLa6nnKukc8Tw== + "@ledgerhq/devices@^8.2.0", "@ledgerhq/devices@^8.3.0": version "8.3.0" resolved "https://registry.npmjs.org/@ledgerhq/devices/-/devices-8.3.0.tgz" @@ -2373,6 +2572,27 @@ resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz" integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== +"@pnpm/config.env-replace@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" + integrity sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w== + +"@pnpm/network.ca-file@^1.0.1": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz#2ab05e09c1af0cdf2fcf5035bea1484e222f7983" + integrity sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA== + dependencies: + graceful-fs "4.2.10" + +"@pnpm/npm-conf@^2.1.0": + version "2.2.2" + resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz#0058baf1c26cbb63a828f0193795401684ac86f0" + integrity sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA== + dependencies: + "@pnpm/config.env-replace" "^1.1.0" + "@pnpm/network.ca-file" "^1.0.1" + config-chain "^1.1.11" + "@polka/url@^1.0.0-next.24": version "1.0.0-next.25" resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz" @@ -2482,6 +2702,27 @@ dependencies: "@babel/runtime" "^7.13.10" +"@radix-ui/react-dialog@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dialog/-/react-dialog-1.0.5.tgz#71657b1b116de6c7a0b03242d7d43e01062c7300" + integrity sha512-GjWJX/AUpB703eEBanuBnIWdIXg6NvJFCXcNlSZk4xdszCdhrJgBoUd1cGk67vFO+WdA2pfI/plOpqz/5GUP6Q== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-dismissable-layer" "1.0.5" + "@radix-ui/react-focus-guards" "1.0.1" + "@radix-ui/react-focus-scope" "1.0.4" + "@radix-ui/react-id" "1.0.1" + "@radix-ui/react-portal" "1.0.4" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-slot" "1.0.2" + "@radix-ui/react-use-controllable-state" "1.0.1" + aria-hidden "^1.1.1" + react-remove-scroll "2.5.5" + "@radix-ui/react-direction@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@radix-ui/react-direction/-/react-direction-1.0.1.tgz#9cb61bf2ccf568f3421422d182637b7f47596c9b" @@ -2843,6 +3084,96 @@ slugify "^1.6.5" ua-parser-js "^1.0.2" +"@readme/better-ajv-errors@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@readme/better-ajv-errors/-/better-ajv-errors-1.6.0.tgz#cf96740bd71d256ed628f3a7466ecae0846edd62" + integrity sha512-9gO9rld84Jgu13kcbKRU+WHseNhaVt76wYMeRDGsUGYxwJtI3RmEJ9LY9dZCYQGI8eUZLuxb5qDja0nqklpFjQ== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/runtime" "^7.21.0" + "@humanwhocodes/momoa" "^2.0.3" + chalk "^4.1.2" + json-to-ast "^2.0.3" + jsonpointer "^5.0.0" + leven "^3.1.0" + +"@readme/http-status-codes@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@readme/http-status-codes/-/http-status-codes-7.2.0.tgz#805d281346eb4c25d987d8b86e23b4dba116a96f" + integrity sha512-/dBh9qw3QhJYqlGwt2I+KUP/lQ6nytdCx3aq+GpMUhibLHF3O7fwoowNcTwlbnwtyJ+TJYTIIrp3oVUlRNx3fA== + +"@readme/json-schema-ref-parser@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@readme/json-schema-ref-parser/-/json-schema-ref-parser-1.2.0.tgz#8552cde8f8ecf455398c59aa6e2cf5ed2d0f3d31" + integrity sha512-Bt3QVovFSua4QmHa65EHUmh2xS0XJ3rgTEUPH998f4OW4VVJke3BuS16f+kM0ZLOGdvIrzrPRqwihuv5BAjtrA== + dependencies: + "@jsdevtools/ono" "^7.1.3" + "@types/json-schema" "^7.0.6" + call-me-maybe "^1.0.1" + js-yaml "^4.1.0" + +"@readme/openapi-parser@^2.6.0": + version "2.6.0" + resolved "https://registry.yarnpkg.com/@readme/openapi-parser/-/openapi-parser-2.6.0.tgz#fcd17459270e209dad5e0b0654b2ba74d64104c8" + integrity sha512-pyFJXezWj9WI1O+gdp95CoxfY+i+Uq3kKk4zXIFuRAZi9YnHpHOpjumWWr67wkmRTw19Hskh9spyY0Iyikf3fA== + dependencies: + "@apidevtools/swagger-methods" "^3.0.2" + "@jsdevtools/ono" "^7.1.3" + "@readme/better-ajv-errors" "^1.6.0" + "@readme/json-schema-ref-parser" "^1.2.0" + "@readme/openapi-schemas" "^3.1.0" + ajv "^8.12.0" + ajv-draft-04 "^1.0.0" + call-me-maybe "^1.0.1" + +"@readme/openapi-schemas@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@readme/openapi-schemas/-/openapi-schemas-3.1.0.tgz#5ff4b704af6a8b108f9d577fd87cf73e9e7b3178" + integrity sha512-9FC/6ho8uFa8fV50+FPy/ngWN53jaUu4GRXlAjcxIRrzhltJnpKkBG2Tp0IDraFJeWrOpk84RJ9EMEEYzaI1Bw== + +"@readme/postman-to-openapi@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@readme/postman-to-openapi/-/postman-to-openapi-4.1.0.tgz#ba40dd4374f74cf2112e23e031320ba2c3e0da44" + integrity sha512-VvV2Hzjskz01m8doSn7Ypt6cSZzgjnypVqXy1ipThbyYD6SGiM74VSePXykOODj/43Y2m6zeYedPk/ZLts/HvQ== + dependencies: + "@readme/http-status-codes" "^7.2.0" + js-yaml "^4.1.0" + jsonc-parser "3.2.0" + lodash.camelcase "^4.3.0" + marked "^4.3.0" + mustache "^4.2.0" + +"@redocly/ajv@^8.11.0": + version "8.11.0" + resolved "https://registry.yarnpkg.com/@redocly/ajv/-/ajv-8.11.0.tgz#2fad322888dc0113af026e08fceb3e71aae495ae" + integrity sha512-9GWx27t7xWhDIR02PA18nzBdLcKQRgc46xNQvjFkrYk4UOmvKhJ/dawwiX0cCOeetN5LcaaiqQbVOWYK62SGHw== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +"@redocly/config@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@redocly/config/-/config-0.5.0.tgz#3ba2585f10d7039b85d7604d0e17f4d091d424c2" + integrity sha512-oA1ezWPT2tSV9CLk0FtZlViaFKtp+id3iAVeKBme1DdP4xUCdxEdP8umB21iLKdc6leRd5uGa+T5Ox4nHBAXWg== + +"@redocly/openapi-core@^1.14.0": + version "1.14.0" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.14.0.tgz#74f9daf95f835563d458ce02644f0ad0cd519211" + integrity sha512-sraF4PGVcc6t6CaYw5raO/GWeOaa6UjcEvH/+Qm7zp+q/fbWAMwbj+1QzaNvpMspCwF+xW6TddDcnXrCDmqYVA== + dependencies: + "@redocly/ajv" "^8.11.0" + "@redocly/config" "^0.5.0" + colorette "^1.2.0" + js-levenshtein "^1.1.6" + js-yaml "^4.1.0" + lodash.isequal "^4.5.0" + minimatch "^5.0.1" + node-fetch "^2.6.1" + pluralize "^8.0.0" + yaml-ast-parser "0.0.43" + "@rematch/core@^2.2.0": version "2.2.0" resolved "https://registry.npmjs.org/@rematch/core/-/core-2.2.0.tgz" @@ -2964,6 +3295,34 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@stoplight/ordered-object-literal@^1.0.5": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz#06689095a4f1a53e9d9a5f0055f707c387af966a" + integrity sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg== + +"@stoplight/types@^14.1.1": + version "14.1.1" + resolved "https://registry.yarnpkg.com/@stoplight/types/-/types-14.1.1.tgz#0dd5761aac25673a951955e984c724c138368b7a" + integrity sha512-/kjtr+0t0tjKr+heVfviO9FrU/uGLc+QNX3fHJc19xsCNYqU7lVhaXxDmEID9BZTjG+/r9pK9xP/xU02XGg65g== + dependencies: + "@types/json-schema" "^7.0.4" + utility-types "^3.10.0" + +"@stoplight/yaml-ast-parser@0.0.50": + version "0.0.50" + resolved "https://registry.yarnpkg.com/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.50.tgz#ed625a1d9ae63eb61980446e058fa745386ab61e" + integrity sha512-Pb6M8TDO9DtSVla9yXSTAxmo9GVEouq5P40DWXdOie69bXogZTkgvopCq+yEvTMA0F6PEvdJmbtTV3ccIp11VQ== + +"@stoplight/yaml@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@stoplight/yaml/-/yaml-4.3.0.tgz#ca403157472509812ccec6f277185e7e65d7bd7d" + integrity sha512-JZlVFE6/dYpP9tQmV0/ADfn32L9uFarHWxfcRhReKUnljz1ZiUM5zpX+PH8h5CJs6lao3TuFqnPm9IJJCEkE2w== + dependencies: + "@stoplight/ordered-object-literal" "^1.0.5" + "@stoplight/types" "^14.1.1" + "@stoplight/yaml-ast-parser" "0.0.50" + tslib "^2.2.0" + "@swc/core-darwin-arm64@1.5.7": version "1.5.7" resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.5.7.tgz#2b5cdbd34e4162e50de6147dd1a5cb12d23b08e8" @@ -3060,17 +3419,17 @@ dependencies: "@typescript-eslint/utils" "^6.20.0" -"@tanstack/query-core@5.36.1": - version "5.36.1" - resolved "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.36.1.tgz" - integrity sha512-BteWYEPUcucEu3NBcDAgKuI4U25R9aPrHSP6YSf2NvaD2pSlIQTdqOfLRsxH9WdRYg7k0Uom35Uacb6nvbIMJg== +"@tanstack/query-core@5.40.0": + version "5.40.0" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.40.0.tgz#c74ae8303752ed4b5a0ab848ec71a0e6e8179f83" + integrity sha512-eD8K8jsOIq0Z5u/QbvOmfvKKE/XC39jA7yv4hgpl/1SRiU+J8QCIwgM/mEHuunQsL87dcvnHqSVLmf9pD4CiaA== -"@tanstack/react-query@^5.36.1": - version "5.37.1" - resolved "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.37.1.tgz" - integrity sha512-EhtBNA8GL3XFeSx6VYUjXQ96n44xe3JGKZCzBINrCYlxbZP6UwBafv7ti4eSRWc2Fy+fybQre0w17gR6lMzULA== +"@tanstack/react-query@^5.40.1": + version "5.40.1" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.40.1.tgz#c1098791fea42bdc4c48938fb0131fa9ccc30fae" + integrity sha512-gOcmu+gpFd2taHrrgMM9RemLYYEDYfsCqszxCC0xtx+csDa4R8t7Hr7SfWXQP13S2sF+mOxySo/+FNXJFYBqcA== dependencies: - "@tanstack/query-core" "5.36.1" + "@tanstack/query-core" "5.40.0" "@testing-library/dom@^10.0.0": version "10.1.0" @@ -3148,7 +3507,7 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3175,14 +3534,14 @@ resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz" integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== -"@types/react-dom@^18", "@types/react-dom@^18.0.0": +"@types/react-dom@^18.0.0", "@types/react-dom@^18.3.0": version "18.3.0" resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz" integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg== dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18": +"@types/react@*": version "18.3.2" resolved "https://registry.npmjs.org/@types/react/-/react-18.3.2.tgz" integrity sha512-Btgg89dAnqD4vV7R3hlwOxgqobUQKgx3MmrQRi0yYbs/P0ym8XozIAlkqVilPqHQwXs4e9Tf63rrCgl58BcO4w== @@ -3190,6 +3549,14 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/react@^18.3.3": + version "18.3.3" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.3.tgz#9679020895318b0915d7a3ab004d92d33375c45f" + integrity sha512-hti/R0pS0q1/xx+TsI73XIqk26eBsISZ2R0wUijXIngRK9R/e7Xw/cXVxQK7R5JjW+SV4zGcn5hXjudkN/pLIw== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" + "@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" @@ -3474,6 +3841,11 @@ resolved "https://registry.npmjs.org/@unocss/core/-/core-0.60.3.tgz" integrity sha512-4bBX1pavDl2DSCozEII7bxYGT0IkyO7kKlUuCtooTePWyLjf2F7essdzHkJ00EpNR64kkebR9V0lqBMBo07VPw== +"@unocss/core@0.60.4", "@unocss/core@^0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.60.4.tgz#01ff57305225beb0635f4686dea6806e4016abe4" + integrity sha512-6tz8KTzC30oB0YikwRQoIpJ6Y6Dg+ZiK3NfCIsH+UX11bh2J2M53as2EL/5VQCqtiUn3YP0ZEzR2d1AWX78RCA== + "@unocss/extractor-arbitrary-variants@0.60.3": version "0.60.3" resolved "https://registry.npmjs.org/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.60.3.tgz" @@ -3481,6 +3853,13 @@ dependencies: "@unocss/core" "0.60.3" +"@unocss/extractor-arbitrary-variants@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.60.4.tgz#d5b9194297108acdd8de0cc2338ac4c569ebdd2c" + integrity sha512-USuFGs5CLft9q7IGNdAEp1oliuUns+W7OO0Tx5qtx/oBh6pU/L93lcNNsuuGNrMU8BCmF3atx1/PEmGymgJ7VA== + dependencies: + "@unocss/core" "0.60.4" + "@unocss/inspector@0.60.3": version "0.60.3" resolved "https://registry.npmjs.org/@unocss/inspector/-/inspector-0.60.3.tgz" @@ -3529,6 +3908,15 @@ "@unocss/extractor-arbitrary-variants" "0.60.3" "@unocss/rule-utils" "0.60.3" +"@unocss/preset-mini@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-0.60.4.tgz#5f6d1c8fbe7299acf401c59e6c78cf37554cd817" + integrity sha512-ZiHbP69vkyz0xmhqzC4B4PegwV+LPlZOBT7cRhsh0P8oPOQKYOyDRy4rAl+sJBJeIrggn1r1LgN+Z0Xvd8Ytcw== + dependencies: + "@unocss/core" "0.60.4" + "@unocss/extractor-arbitrary-variants" "0.60.4" + "@unocss/rule-utils" "0.60.4" + "@unocss/preset-tagify@0.60.3": version "0.60.3" resolved "https://registry.npmjs.org/@unocss/preset-tagify/-/preset-tagify-0.60.3.tgz" @@ -3571,6 +3959,15 @@ "@unocss/preset-mini" "0.60.3" "@unocss/rule-utils" "0.60.3" +"@unocss/preset-wind@^0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-0.60.4.tgz#1ec849e04020d0c86b2180d18f72a0f734a8a224" + integrity sha512-dT/U+RkbL21lDTOP7/mlFZxlBbUAefUzQZINC0BX7vTKvO57G4HxRq62u9xvMGFv38lQ+qXXzKhABVsEPDNpUA== + dependencies: + "@unocss/core" "0.60.4" + "@unocss/preset-mini" "0.60.4" + "@unocss/rule-utils" "0.60.4" + "@unocss/reset@0.60.3": version "0.60.3" resolved "https://registry.npmjs.org/@unocss/reset/-/reset-0.60.3.tgz" @@ -3584,6 +3981,14 @@ "@unocss/core" "^0.60.3" magic-string "^0.30.10" +"@unocss/rule-utils@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/rule-utils/-/rule-utils-0.60.4.tgz#cf99f9b1d2d1de1421a84f1d931cd51109d0e79b" + integrity sha512-7qUN33NM4T/IwWavm9VIOCZ2+4hLBc0YUGxcMNTDZSFQRQLkWe3N5dOlgwKXtMyMKatZfbIRUKVDUgvEefoCTA== + dependencies: + "@unocss/core" "^0.60.4" + magic-string "^0.30.10" + "@unocss/scope@0.60.3": version "0.60.3" resolved "https://registry.npmjs.org/@unocss/scope/-/scope-0.60.3.tgz" @@ -3712,6 +4117,21 @@ react "^18.2.0" react-dom "^18.2.0" +"@zodios/core@^10.9.6": + version "10.9.6" + resolved "https://registry.yarnpkg.com/@zodios/core/-/core-10.9.6.tgz#64ad831216e6ffa71679ea6be8d1ed882bb04d83" + integrity sha512-aH4rOdb3AcezN7ws8vDgBfGboZMk2JGGzEq/DtW65MhnRxyTGRuLJRWVQ/2KxDgWvV2F5oTkAS+5pnjKbl0n+A== + +"@zodios/express@^10.6.1": + version "10.6.1" + resolved "https://registry.yarnpkg.com/@zodios/express/-/express-10.6.1.tgz#d5438f93fe907f283296f85c65df16456ed30b01" + integrity sha512-FNgOq8mvwvWP5B2howMKGm6EPp6i/0XFAsQnX5Ov3MLbanzD1oE4WJtBkTL3cmJYvD0nyykbWSeHOh51bCmhUA== + +"@zodios/react@^10.4.5": + version "10.4.5" + resolved "https://registry.yarnpkg.com/@zodios/react/-/react-10.4.5.tgz#e796152ee034f24facc5c8a156d98c81c43eaec5" + integrity sha512-2jisuquf30bEQg6KzhtYnoutXEQD9uD/I0vBO3d3AzL91SLhFTeHNSk2MwkBj0LL/wCIWt9v0sUL52OMv++EwQ== + abortcontroller-polyfill@^1.1.9: version "1.7.5" resolved "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz" @@ -3744,6 +4164,11 @@ agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" +ajv-draft-04@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz#3b64761b268ba0b9e668f0b41ba53fce0ad77fc8" + integrity sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw== + ajv-formats@2.1.1, ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" @@ -3781,6 +4206,16 @@ ajv@^8.0.0, ajv@^8.11.2: require-from-string "^2.0.2" uri-js "^4.4.1" +ajv@^8.12.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.16.0.tgz#22e2a92b94f005f7e0f9c9d39652ef0b8f6f0cb4" + integrity sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw== + dependencies: + fast-deep-equal "^3.1.3" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.4.1" + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" @@ -3852,6 +4287,16 @@ aria-query@5.3.0, aria-query@^5.3.0: dependencies: dequal "^2.0.3" +array-back@^3.0.1, array-back@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0" + integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q== + +array-back@^4.0.1, array-back@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.2.tgz#8004e999a6274586beeb27342168652fdb89fa1e" + integrity sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg== + array-buffer-byte-length@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz" @@ -3988,6 +4433,15 @@ axe-core@=4.7.0: resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.7.0.tgz" integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== +axios@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621" + integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axobject-query@^3.2.1: version "3.2.1" resolved "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz" @@ -4127,6 +4581,13 @@ bs58@^4.0.0, bs58@^4.0.1: dependencies: base-x "^3.0.2" +bundle-require@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/bundle-require/-/bundle-require-4.2.1.tgz#4c450a5807381d20ade987bde8ac391544257919" + integrity sha512-7Q/6vkyYAwOmQNRw75x+4yRtZCZJXUDmHHlFdkiV0wgv/reNjtJwpu1jPJ0w2kbEpIM0uoKI3S4/f39dU7AjSA== + dependencies: + load-tsconfig "^0.2.3" + busboy@1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" @@ -4150,6 +4611,11 @@ call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.6, call-bind@^1.0.7: get-intrinsic "^1.2.4" set-function-length "^1.2.1" +call-me-maybe@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.2.tgz#03f964f19522ba643b1b0693acb9152fe2074baa" + integrity sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ== + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -4175,6 +4641,11 @@ capability@^0.2.5: resolved "https://registry.npmjs.org/capability/-/capability-0.2.5.tgz" integrity sha512-rsJZYVCgXd08sPqwmaIqjAd5SUTfonV0z/gDJ8D6cN8wQphky1kkAYEqQ+hmDxTw7UihvBfjUVUSY+DBEe44jg== +case-anything@2.1.10: + version "2.1.10" + resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.10.tgz#d18a6ca968d54ec3421df71e3e190f3bced23410" + integrity sha512-JczJwVrCP0jPKh05McyVsuOg6AYosrB9XWZKbQzXeDAm2ClE/PJE/BcrrQrVyGYH7Jg8V/LDupmyL4kFlVsVFQ== + chai@^4.3.10: version "4.4.1" resolved "https://registry.yarnpkg.com/chai/-/chai-4.4.1.tgz#3603fa6eba35425b0f2ac91a009fe924106e50d1" @@ -4197,7 +4668,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -4205,6 +4676,16 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +change-case@^5.4.4: + version "5.4.4" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-5.4.4.tgz#0d52b507d8fb8f204343432381d1a6d7bff97a02" + integrity sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w== + "charenc@>= 0.0.1": version "0.0.2" resolved "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz" @@ -4245,6 +4726,13 @@ cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +citty@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/citty/-/citty-0.1.6.tgz#0f7904da1ed4625e1a9ea7e0fa780981aab7c5e4" + integrity sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ== + dependencies: + consola "^3.2.3" + class-variance-authority@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.0.tgz" @@ -4252,6 +4740,18 @@ class-variance-authority@^0.7.0: dependencies: clsx "2.0.0" +cli-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" + integrity sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg== + dependencies: + restore-cursor "^4.0.0" + +cli-spinners@^2.9.2: + version "2.9.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + client-only@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" @@ -4266,6 +4766,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + clone@^2.1.1: version "2.1.2" resolved "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz" @@ -4281,6 +4790,11 @@ clsx@^2.1.1: resolved "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz" integrity sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA== +code-error-fragment@0.0.230: + version "0.0.230" + resolved "https://registry.yarnpkg.com/code-error-fragment/-/code-error-fragment-0.0.230.tgz#d736d75c832445342eca1d1fedbf17d9618b14d7" + integrity sha512-cadkfKp6932H8UkhzE/gcUqhRMNf8jHzkAN7+5Myabswaghu4xABTgPHDCjW+dBAJxj/SpkTYokpzDqY4pCzQw== + color-convert@^1.9.0: version "1.9.3" resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" @@ -4305,6 +4819,11 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" + integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== + colorette@^2.0.20: version "2.0.20" resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" @@ -4317,16 +4836,55 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +command-line-args@^5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.2.1.tgz#c44c32e437a57d7c51157696893c5909e9cec42e" + integrity sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg== + dependencies: + array-back "^3.1.0" + find-replace "^3.0.0" + lodash.camelcase "^4.3.0" + typical "^4.0.0" + +command-line-usage@^6.1.1: + version "6.1.3" + resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.3.tgz#428fa5acde6a838779dfa30e44686f4b6761d957" + integrity sha512-sH5ZSPr+7UStsloltmDh7Ce5fb8XPlHyoPzTpyyMuYCtervL65+ubVZ6Q61cFtFl62UyJlc8/JwERRbAFPUqgw== + dependencies: + array-back "^4.0.2" + chalk "^2.4.2" + table-layout "^1.0.2" + typical "^5.2.0" + commander@^4.0.0: version "4.1.1" resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^7.0.0, commander@^7.2.0: +commander@^7.0.0, commander@^7.1.0, commander@^7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== +compute-gcd@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/compute-gcd/-/compute-gcd-1.2.1.tgz#34d639f3825625e1357ce81f0e456a6249d8c77f" + integrity sha512-TwMbxBNz0l71+8Sc4czv13h4kEqnchV9igQZBi6QUaz09dnz13juGnnaWWJTRsP3brxOoxeB4SA2WELLw1hCtg== + dependencies: + validate.io-array "^1.0.3" + validate.io-function "^1.0.2" + validate.io-integer-array "^1.0.0" + +compute-lcm@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/compute-lcm/-/compute-lcm-1.1.2.tgz#9107c66b9dca28cefb22b4ab4545caac4034af23" + integrity sha512-OFNPdQAXnQhDSKioX8/XYT6sdUlXwpeMjfd6ApxMJfyZ4GxmLR1xvMERctlYhlHwIiz6CSpBc2+qYKjHGZw4TQ== + dependencies: + compute-gcd "^1.2.1" + validate.io-array "^1.0.3" + validate.io-function "^1.0.2" + validate.io-integer-array "^1.0.0" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" @@ -4337,6 +4895,14 @@ confbox@^0.1.7: resolved "https://registry.npmjs.org/confbox/-/confbox-0.1.7.tgz" integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== +config-chain@^1.1.11: + version "1.1.13" + resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" + integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== + dependencies: + ini "^1.3.4" + proto-list "~1.2.1" + consola@^3.2.3: version "3.2.3" resolved "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz" @@ -4457,6 +5023,14 @@ csstype@^3.0.2: resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +d@1, d@^1.0.1, d@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.2.tgz#2aefd554b81981e7dccf72d6842ae725cb17e5de" + integrity sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw== + dependencies: + es5-ext "^0.10.64" + type "^2.7.2" + damerau-levenshtein@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz" @@ -4533,6 +5107,11 @@ deep-eql@^4.1.3: dependencies: type-detect "^4.0.0" +deep-extend@^0.6.0, deep-extend@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== + deep-is@^0.1.3: version "0.1.4" resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" @@ -4623,6 +5202,14 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +directory-tree@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/directory-tree/-/directory-tree-3.5.1.tgz#004d599c2478d752e7906e3a922b09c7ee2f03e2" + integrity sha512-HqjZ49fDzUnKYUhHxVw9eKBqbQ+lL0v4kSBInlDlaktmLtGoV9tC54a6A0ZfYeIrkMHWTE6MwwmUXP477+UEKQ== + dependencies: + command-line-args "^5.2.0" + command-line-usage "^6.1.1" + dlv@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz" @@ -4715,6 +5302,11 @@ elliptic@6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" +emoji-regex@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.3.0.tgz#76998b9268409eb3dae3de989254d456e70cfe23" + integrity sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -4890,7 +5482,49 @@ es-to-primitive@^1.2.1: is-date-object "^1.0.1" is-symbol "^1.0.2" -esbuild@^0.20.1: +es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.62, es5-ext@^0.10.64, es5-ext@~0.10.14, es5-ext@~0.10.2: + version "0.10.64" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.64.tgz#12e4ffb48f1ba2ea777f1fcdd1918ef73ea21714" + integrity sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg== + dependencies: + es6-iterator "^2.0.3" + es6-symbol "^3.1.3" + esniff "^2.0.1" + next-tick "^1.1.0" + +es6-iterator@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g== + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-promise@^3.2.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" + integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg== + +es6-symbol@^3.1.1, es6-symbol@^3.1.3: + version "3.1.4" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.4.tgz#f4e7d28013770b4208ecbf3e0bf14d3bcb557b8c" + integrity sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg== + dependencies: + d "^1.0.2" + ext "^1.7.0" + +es6-weak-map@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" + integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== + dependencies: + d "1" + es5-ext "^0.10.46" + es6-iterator "^2.0.3" + es6-symbol "^3.1.1" + +esbuild@^0.20.1, esbuild@^0.20.2: version "0.20.2" resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1" integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g== @@ -4919,7 +5553,7 @@ esbuild@^0.20.1: "@esbuild/win32-ia32" "0.20.2" "@esbuild/win32-x64" "0.20.2" -escalade@^3.1.2: +escalade@^3.1.1, escalade@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== @@ -5137,6 +5771,16 @@ eslint@^8: strip-ansi "^6.0.1" text-table "^0.2.0" +esniff@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/esniff/-/esniff-2.0.1.tgz#a4d4b43a5c71c7ec51c51098c1d8a29081f9b308" + integrity sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg== + dependencies: + d "^1.0.1" + es5-ext "^0.10.62" + event-emitter "^0.3.5" + type "^2.7.2" + espree@^9.6.0, espree@^9.6.1: version "9.6.1" resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" @@ -5223,6 +5867,19 @@ ethers@5.7.2: "@ethersproject/web" "5.7.1" "@ethersproject/wordlists" "5.7.0" +event-emitter@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" + integrity sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA== + dependencies: + d "1" + es5-ext "~0.10.14" + +eventemitter3@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + events@3.3.0, events@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" @@ -5258,6 +5915,13 @@ execa@^8.0.1: signal-exit "^4.1.0" strip-final-newline "^3.0.0" +ext@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.7.0.tgz#0ea4383c0103d60e70be99e9a7f11027a33c4f5f" + integrity sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw== + dependencies: + type "^2.7.2" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" @@ -5289,6 +5953,11 @@ fast-levenshtein@^2.0.6: resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-safe-stringify@^2.0.7: + version "2.1.1" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884" + integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA== + fastq@^1.6.0: version "1.17.1" resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" @@ -5315,6 +5984,13 @@ filter-obj@^1.1.0: resolved "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz" integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== +find-replace@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38" + integrity sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ== + dependencies: + array-back "^3.0.1" + find-up@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" @@ -5331,6 +6007,15 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-up@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-7.0.0.tgz#e8dec1455f74f78d888ad65bf7ca13dd2b4e66fb" + integrity sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g== + dependencies: + locate-path "^7.2.0" + path-exists "^5.0.0" + unicorn-magic "^0.1.0" + flat-cache@^3.0.4: version "3.2.0" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" @@ -5345,6 +6030,11 @@ flatted@^3.2.9: resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" @@ -5369,6 +6059,15 @@ form-data@^4.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +fs-extra@^11.2.0: + version "11.2.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" @@ -5404,11 +6103,16 @@ gensync@^1.0.0-beta.2: resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== -get-caller-file@^2.0.1: +get-caller-file@^2.0.1, get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-east-asian-width@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz#5e6ebd9baee6fb8b7b6bd505221065f0cd91f64e" + integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== + get-func-name@^2.0.1, get-func-name@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.2.tgz#0d7cf20cd13fda808669ffa88f4ffc7a3943fc41" @@ -5553,11 +6257,21 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.2.11, graceful-fs@^4.2.4: +graceful-fs@4.2.10: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + +graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + graphemer@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" @@ -5642,6 +6356,11 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" +hotscript@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/hotscript/-/hotscript-1.0.13.tgz#6eb5de757e9b33444ffc22555e98dbc17fa31fb4" + integrity sha512-C++tTF1GqkGYecL+2S1wJTfoH6APGAsbb7PAWQ3iVIwgG/EFseAfEVOKFgAFq4yK3+6j1EjUD4UQ9dRJHX/sSQ== + html-encoding-sniffer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz#696df529a7cfd82446369dc5193e590a3735b448" @@ -5698,6 +6417,11 @@ http-proxy-agent@^7.0.2: agent-base "^7.1.0" debug "^4.3.4" +http2-client@^1.2.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.5.tgz#20c9dc909e3cc98284dd20af2432c524086df181" + integrity sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA== + https-proxy-agent@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168" @@ -5769,6 +6493,11 @@ inherits@2.0.3: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== +ini@^1.3.4, ini@~1.3.0: + version "1.3.8" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" + integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== + internal-slot@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz" @@ -5884,6 +6613,11 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-interactive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90" + integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ== + is-json@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz" @@ -5926,6 +6660,11 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-promise@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1" + integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz" @@ -5977,6 +6716,16 @@ is-typed-array@^1.1.13: dependencies: which-typed-array "^1.1.14" +is-unicode-supported@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714" + integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ== + +is-unicode-supported@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz#fdf32df9ae98ff6ab2cedc155a5a6e895701c451" + integrity sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q== + is-weakmap@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz" @@ -6032,6 +6781,16 @@ jiti@^1.21.0: resolved "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz" integrity sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q== +js-levenshtein@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" + integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== + +js-runtime@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/js-runtime/-/js-runtime-0.0.8.tgz#1455efe991b8f853968ecbe6e76b85711f822672" + integrity sha512-/nxfuHRkzajgNgGP/7j2A9y8k54XtTWizq+vEGrWh3eBWlSqFhwgToXHAGZeHX3wRMTC3VFBw1iVeemlX4qxZw== + js-sha256@0.9.0, js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz" @@ -6101,6 +6860,30 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-schema-compare@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/json-schema-compare/-/json-schema-compare-0.2.2.tgz#dd601508335a90c7f4cfadb6b2e397225c908e56" + integrity sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ== + dependencies: + lodash "^4.17.4" + +json-schema-merge-allof@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/json-schema-merge-allof/-/json-schema-merge-allof-0.8.1.tgz#ed2828cdd958616ff74f932830a26291789eaaf2" + integrity sha512-CTUKmIlPJbsWfzRRnOXz+0MjIqvnleIXwFTzz+t9T86HnYX/Rozria6ZVGLktAU9e+NygNljveP+yxqtQp/Q4w== + dependencies: + compute-lcm "^1.1.2" + json-schema-compare "^0.2.2" + lodash "^4.17.20" + +json-schema-to-ts@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/json-schema-to-ts/-/json-schema-to-ts-3.1.0.tgz#96303370c2bf9da23aa0e86841548de6c70077b4" + integrity sha512-UeVN/ery4/JeXI8h4rM8yZPxsH+KqPi/84qFxHfTGHZnWnK9D0UU9ZGYO+6XAaJLqCWMiks+ARuFOKAiSxJCHA== + dependencies: + "@babel/runtime" "^7.18.3" + ts-algebra "^2.0.0" + json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" @@ -6116,6 +6899,14 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== +json-to-ast@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/json-to-ast/-/json-to-ast-2.1.0.tgz#041a9fcd03c0845036acb670d29f425cea4faaf9" + integrity sha512-W9Lq347r8tA1DfMvAGn9QNcgYm4Wm7Yc+k8e6vezpMnRT+NHbtlxgNBXRVjXe9YM6eTn6+p/MKOlV/aABJcSnQ== + dependencies: + code-error-fragment "0.0.230" + grapheme-splitter "^1.0.4" + json5@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz" @@ -6128,6 +6919,30 @@ json5@^2.2.0, json5@^2.2.1, json5@^2.2.3: resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +jsonc-parser@3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== + +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonpath-plus@^8.0.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-8.1.0.tgz#68c92281215672d1d6c785b3c1bdc8acc097ba3f" + integrity sha512-qVTiuKztFGw0dGhYi3WNqvddx3/SHtyDT0xJaeyz4uP0d1tkpG+0y5uYQ4OcIo1TLAz3PE/qDOW9F0uDt3+CTw== + +jsonpointer@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-5.0.1.tgz#2110e0af0900fd37467b5907ecd13a7884a1b559" + integrity sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ== + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.5: version "3.3.5" resolved "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz" @@ -6160,6 +6975,11 @@ kolorist@^1.8.0: resolved "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz" integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== +ky@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ky/-/ky-1.3.0.tgz#d6a02490cb50f5e6df4de4989665a76f30b02728" + integrity sha512-QUViPXlgP6NKA57IAPff/aZSmRA6qs9wKxlEpayBorwRZG+x2LG7jD4kXh8lnH3q/gkUr64NyZ7kwErUEZJmlw== + language-subtag-registry@^0.3.20: version "0.3.23" resolved "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz" @@ -6172,6 +6992,18 @@ language-tags@^1.0.9: dependencies: language-subtag-registry "^0.3.20" +latest-version@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-9.0.0.tgz#e91ed216e7a4badc6f73b66c65adb46c58ec6ba1" + integrity sha512-7W0vV3rqv5tokqkBAFV1LbR7HPOWzXQDpDgEuib/aJ1jsZZx6x3c2mBI+TJhJzOhkGeaLbCKEHXEXLfirtG2JA== + dependencies: + package-json "^10.0.0" + +leven@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" + integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== + levn@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz" @@ -6275,6 +7107,11 @@ lmdb@2.8.5: "@lmdb/lmdb-linux-x64" "2.8.5" "@lmdb/lmdb-win32-x64" "2.8.5" +load-tsconfig@^0.2.3: + version "0.2.5" + resolved "https://registry.yarnpkg.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz#453b8cd8961bfb912dea77eb6c168fe8cca3d3a1" + integrity sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg== + local-pkg@^0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.5.0.tgz" @@ -6297,11 +7134,41 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locate-path@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +lodash.isequal@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash@^4.17.20, lodash@^4.17.4: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-6.0.0.tgz#bb95e5f05322651cac30c0feb6404f9f2a8a9439" + integrity sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw== + dependencies: + chalk "^5.3.0" + is-unicode-supported "^1.3.0" + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" @@ -6328,6 +7195,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" + integrity sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ== + dependencies: + es5-ext "~0.10.2" + lru_map@0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/lru_map/-/lru_map-0.4.1.tgz" @@ -6350,6 +7224,11 @@ magic-string@^0.30.10, magic-string@^0.30.5: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +marked@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" + integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== + md5.js@^1.3.4: version "1.3.5" resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz" @@ -6369,6 +7248,20 @@ mdn-data@2.0.30: resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz" integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== +memoizee@^0.4.16: + version "0.4.17" + resolved "https://registry.yarnpkg.com/memoizee/-/memoizee-0.4.17.tgz#942a5f8acee281fa6fb9c620bddc57e3b7382949" + integrity sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA== + dependencies: + d "^1.0.2" + es5-ext "^0.10.64" + es6-weak-map "^2.0.3" + event-emitter "^0.3.5" + is-promise "^2.2.2" + lru-queue "^0.1.0" + next-tick "^1.1.0" + timers-ext "^0.1.7" + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" @@ -6433,6 +7326,13 @@ minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^9.0.1, minimatch@^9.0.4: version "9.0.4" resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz" @@ -6501,7 +7401,7 @@ mustache@4.0.0: resolved "https://registry.npmjs.org/mustache/-/mustache-4.0.0.tgz" integrity sha512-FJgjyX/IVkbXBXYUwH+OYwQKqWpFPLaLVESd70yHjSDunwzV2hZOoTBvPf4KLoxesUzzyfTH6F784Uqd7Wm5yA== -mustache@^4.0.0: +mustache@^4.0.0, mustache@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== @@ -6530,6 +7430,11 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +natural-orderby@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/natural-orderby/-/natural-orderby-3.0.2.tgz#1b874d685fbd68beab2c6e7d14f298e03d631ec3" + integrity sha512-x7ZdOwBxZCEm9MM7+eQCjkrNLrW3rkBKNHVr78zbtqnMGVNlnDi6C/eUEYgxHNrcbu0ymvjzcwIL/6H1iHri9g== + near-abi@0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/near-abi/-/near-abi-0.1.1.tgz" @@ -6609,9 +7514,14 @@ near-seed-phrase@0.2.0: near-hd-key "^1.2.1" tweetnacl "^1.0.2" -next@14.2.3: +next-tick@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb" + integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== + +next@^14.2.3: version "14.2.3" - resolved "https://registry.npmjs.org/next/-/next-14.2.3.tgz" + resolved "https://registry.yarnpkg.com/next/-/next-14.2.3.tgz#f117dd5d5f20c307e7b8e4f9c1c97d961008925d" integrity sha512-dowFkFTR8v79NPJO4QsBUtxv0g9BrS/phluVpMAt2ku7H+cbcBJlopXjkWlwxrk/xGqMemr7JkGPGemPrLLX7A== dependencies: "@next/env" "14.2.3" @@ -6642,6 +7552,13 @@ node-addon-api@^7.0.0: resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz" integrity sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g== +node-fetch-h2@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz#c6188325f9bd3d834020bf0f2d6dc17ced2241ac" + integrity sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg== + dependencies: + http2-client "^1.2.5" + node-fetch-native@^1.6.3: version "1.6.4" resolved "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.4.tgz" @@ -6673,6 +7590,13 @@ node-gyp-build-optional-packages@5.1.1: dependencies: detect-libc "^2.0.1" +node-readfiles@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/node-readfiles/-/node-readfiles-0.2.0.tgz#dbbd4af12134e2e635c245ef93ffcf6f60673a5d" + integrity sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA== + dependencies: + es6-promise "^3.2.1" + node-releases@^2.0.14: version "2.0.14" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" @@ -6721,6 +7645,79 @@ o3@^1.0.3: dependencies: capability "^0.2.5" +oas-kit-common@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/oas-kit-common/-/oas-kit-common-1.0.8.tgz#6d8cacf6e9097967a4c7ea8bcbcbd77018e1f535" + integrity sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ== + dependencies: + fast-safe-stringify "^2.0.7" + +oas-linter@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/oas-linter/-/oas-linter-3.2.2.tgz#ab6a33736313490659035ca6802dc4b35d48aa1e" + integrity sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ== + dependencies: + "@exodus/schemasafe" "^1.0.0-rc.2" + should "^13.2.1" + yaml "^1.10.0" + +oas-normalize@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/oas-normalize/-/oas-normalize-11.1.0.tgz#531c6c688ba4a4a2d039b141c68e3fd1f4026157" + integrity sha512-J6bOG0wCm/OG/qkuVmp8Q6J4kft0Z6y/E/UDZp2NsJW1ZR8gcECXLKBdbFGRvTzJBmpTSRbLVu7yWdHllQhuIQ== + dependencies: + "@readme/openapi-parser" "^2.6.0" + "@readme/postman-to-openapi" "^4.1.0" + js-yaml "^4.1.0" + openapi-types "^12.1.3" + swagger2openapi "^7.0.8" + +oas-resolver@^2.5.6: + version "2.5.6" + resolved "https://registry.yarnpkg.com/oas-resolver/-/oas-resolver-2.5.6.tgz#10430569cb7daca56115c915e611ebc5515c561b" + integrity sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ== + dependencies: + node-fetch-h2 "^2.3.0" + oas-kit-common "^1.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + +oas-schema-walker@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz#74c3cd47b70ff8e0b19adada14455b5d3ac38a22" + integrity sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ== + +oas-validator@^5.0.8: + version "5.0.8" + resolved "https://registry.yarnpkg.com/oas-validator/-/oas-validator-5.0.8.tgz#387e90df7cafa2d3ffc83b5fb976052b87e73c28" + integrity sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw== + dependencies: + call-me-maybe "^1.0.1" + oas-kit-common "^1.0.8" + oas-linter "^3.2.2" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + reftools "^1.1.9" + should "^13.2.1" + yaml "^1.10.0" + +oas@^24.3.6: + version "24.3.6" + resolved "https://registry.yarnpkg.com/oas/-/oas-24.3.6.tgz#aa9d1c6af418582f4a917cd02ed2e8603cd89aa3" + integrity sha512-KgtJPEksGGAhQFuIY0JezU48sW+3jbYcexc7TlfOfBaNCQHlGMt3aWVjKC/soYn18E0okkyQemDhLnG1yy2MzA== + dependencies: + "@readme/json-schema-ref-parser" "^1.2.0" + "@types/json-schema" "^7.0.11" + json-schema-merge-allof "^0.8.1" + jsonpath-plus "^8.0.0" + jsonpointer "^5.0.0" + memoizee "^0.4.16" + oas-normalize "^11.1.0" + openapi-types "^12.1.1" + path-to-regexp "^6.2.2" + remove-undefined-objects "^5.0.0" + object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" @@ -6813,7 +7810,7 @@ once@^1.3.0: dependencies: wrappy "1" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -6827,6 +7824,21 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" +openapi-format@^1.17.1: + version "1.17.2" + resolved "https://registry.yarnpkg.com/openapi-format/-/openapi-format-1.17.2.tgz#1d3dfef946d465746ecc44100f549bbec15c3173" + integrity sha512-yzoMlgI4yMEsHKK3Y6Di1KS8s8FmQ7KoeNdodOHxtGHINFkuT/+Y/h/p/BT2Yh7LTzLkXH2+jmBJTkaSoJ1bFQ== + dependencies: + "@stoplight/yaml" "^4.3.0" + case-anything "2.1.10" + commander "^7.1.0" + traverse "^0.6.9" + +openapi-types@^12.1.1, openapi-types@^12.1.3: + version "12.1.3" + resolved "https://registry.yarnpkg.com/openapi-types/-/openapi-types-12.1.3.tgz#471995eb26c4b97b7bd356aacf7b91b73e777dd3" + integrity sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw== + optionator@^0.9.3: version "0.9.4" resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" @@ -6839,6 +7851,21 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" +ora@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-8.0.1.tgz#6dcb9250a629642cbe0d2df3a6331ad6f7a2af3e" + integrity sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ== + dependencies: + chalk "^5.3.0" + cli-cursor "^4.0.0" + cli-spinners "^2.9.2" + is-interactive "^2.0.0" + is-unicode-supported "^2.0.0" + log-symbols "^6.0.0" + stdin-discarder "^0.2.1" + string-width "^7.0.0" + strip-ansi "^7.1.0" + ordered-binary@^1.4.1: version "1.5.1" resolved "https://registry.npmjs.org/ordered-binary/-/ordered-binary-1.5.1.tgz" @@ -6858,6 +7885,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-4.0.0.tgz#914af6544ed32bfa54670b061cafcbd04984b644" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + p-limit@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-5.0.0.tgz#6946d5b7140b649b7a33a027d89b4c625b3a5985" @@ -6879,11 +7913,41 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-6.0.0.tgz#3da9a49d4934b901089dca3302fa65dc5a05c04f" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + +p-queue@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-8.0.1.tgz#718b7f83836922ef213ddec263ff4223ce70bef8" + integrity sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA== + dependencies: + eventemitter3 "^5.0.1" + p-timeout "^6.1.2" + +p-timeout@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.2.tgz#22b8d8a78abf5e103030211c5fc6dee1166a6aa5" + integrity sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ== + p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/package-json/-/package-json-10.0.0.tgz#238786d9deabb946fe514b13290f19e2d5347fe1" + integrity sha512-w34pqp733w35nElGG6eH1OnDnHEWud4uxruQ2nKzY/Uy0uOJmWFdjDcAC+xAD4goVuBZStwaAEBS21BANv83HQ== + dependencies: + ky "^1.2.0" + registry-auth-token "^5.0.2" + registry-url "^6.0.1" + semver "^7.6.0" + parcel@^2.9.3: version "2.12.0" resolved "https://registry.npmjs.org/parcel/-/parcel-2.12.0.tgz" @@ -6933,6 +7997,11 @@ path-exists@^4.0.0: resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-5.0.0.tgz#a6aad9489200b21fab31e49cf09277e5116fb9e7" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" @@ -6961,6 +8030,11 @@ path-scurry@^1.10.1, path-scurry@^1.11.0: lru-cache "^10.2.0" minipass "^5.0.0 || ^6.0.2 || ^7.0.0" +path-to-regexp@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36" + integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== + path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -7026,6 +8100,11 @@ pkg-types@^1.0.3, pkg-types@^1.1.0: mlly "^1.7.0" pathe "^1.1.2" +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + pngjs@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz" @@ -7181,6 +8260,16 @@ prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proto-list@~1.2.1: + version "1.2.4" + resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" + integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== + +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -7228,6 +8317,16 @@ randombytes@2.1.0, randombytes@^2.0.1: dependencies: safe-buffer "^5.1.0" +rc@1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== + dependencies: + deep-extend "^0.6.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + react-dom@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" @@ -7236,7 +8335,7 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-dom@^18, react-dom@^18.2.0: +react-dom@^18.2.0: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -7244,6 +8343,14 @@ react-dom@^18, react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.2" +react-dom@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" + integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== + dependencies: + loose-envify "^1.1.0" + scheduler "^0.23.2" + react-error-overlay@6.0.9: version "6.0.9" resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz" @@ -7324,13 +8431,20 @@ react@18.2.0: dependencies: loose-envify "^1.1.0" -react@^18, react@^18.2.0: +react@^18.2.0: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== dependencies: loose-envify "^1.1.0" +react@^18.3.1: + version "18.3.1" + resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" + integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== + dependencies: + loose-envify "^1.1.0" + read-cache@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz" @@ -7354,6 +8468,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" +reduce-flatten@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27" + integrity sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w== + redux-persist@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/redux-persist/-/redux-persist-6.0.0.tgz" @@ -7377,6 +8496,11 @@ reflect.getprototypeof@^1.0.4: globalthis "^1.0.3" which-builtin-type "^1.1.3" +reftools@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e" + integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w== + regenerator-runtime@^0.13.7: version "0.13.11" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" @@ -7397,6 +8521,32 @@ regexp.prototype.flags@^1.5.2: es-errors "^1.3.0" set-function-name "^2.0.1" +registry-auth-token@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-5.0.2.tgz#8b026cc507c8552ebbe06724136267e63302f756" + integrity sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ== + dependencies: + "@pnpm/npm-conf" "^2.1.0" + +registry-url@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-6.0.1.tgz#056d9343680f2f64400032b1e199faa692286c58" + integrity sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q== + dependencies: + rc "1.2.8" + +remeda@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/remeda/-/remeda-2.0.4.tgz#d602f7b020791fdefaf7ed1bb485aec38b6009dd" + integrity sha512-EbR83P0ni4AQqtHxiRBlLCpnb2oMHkvEn4epuQ1w3r1pjO51oDytiZFqUplnEjFUTizgm74gJCeThluNDsl20g== + dependencies: + type-fest "^4.18.2" + +remove-undefined-objects@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/remove-undefined-objects/-/remove-undefined-objects-5.0.0.tgz#6a298a395c648eee7fbd3c1e486a983a82a963e8" + integrity sha512-DE8C17uIWeHaY4SqIkpQpHXm0MIdYHtIqjieWuh0I2PG8YcZRxFE6pqeEhnRetsrQ7Lu9uvSNQkDbg95NLpvnQ== + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" @@ -7445,6 +8595,14 @@ resolve@^2.0.0-next.5: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +restore-cursor@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-4.0.0.tgz#519560a4318975096def6e609d44100edaa4ccb9" + integrity sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" @@ -7571,12 +8729,17 @@ scrypt-js@3.0.1: resolved "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz" integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== +seedrandom@^3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" + integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== + semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.4, semver@^7.6.0: +semver@^7.3.5, semver@^7.3.7, semver@^7.5.2, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2: version "7.6.2" resolved "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -7646,6 +8809,50 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +should-equal@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" + integrity sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA== + dependencies: + should-type "^1.4.0" + +should-format@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" + integrity sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q== + dependencies: + should-type "^1.3.0" + should-type-adaptors "^1.0.1" + +should-type-adaptors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" + integrity sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA== + dependencies: + should-type "^1.3.0" + should-util "^1.0.0" + +should-type@^1.3.0, should-type@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" + integrity sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ== + +should-util@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.1.tgz#fb0d71338f532a3a149213639e2d32cbea8bcb28" + integrity sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g== + +should@^13.2.1: + version "13.2.3" + resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10" + integrity sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ== + dependencies: + should-equal "^2.0.0" + should-format "^3.0.3" + should-type "^1.4.0" + should-type-adaptors "^1.0.1" + should-util "^1.0.0" + side-channel@^1.0.4, side-channel@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz" @@ -7661,7 +8868,7 @@ siginfo@^2.0.0: resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== -signal-exit@^3.0.3: +signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -7730,6 +8937,11 @@ std-env@^3.5.0: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== +stdin-discarder@^0.2.1: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stdin-discarder/-/stdin-discarder-0.2.2.tgz#390037f44c4ae1a1ae535c5fe38dc3aba8d997be" + integrity sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ== + streamsearch@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" @@ -7740,7 +8952,21 @@ strict-uri-encode@^2.0.0: resolved "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz" integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0: +string-argv@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== + +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7758,6 +8984,15 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string-width@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-7.1.0.tgz#d994252935224729ea3719c49f7206dc9c46550a" + integrity sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw== + dependencies: + emoji-regex "^10.3.0" + get-east-asian-width "^1.0.0" + strip-ansi "^7.1.0" + string.prototype.matchall@^4.0.10: version "4.0.11" resolved "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz" @@ -7811,14 +9046,21 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" -strip-ansi@^7.0.1: +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz" integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== @@ -7845,6 +9087,11 @@ strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== + strip-literal@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.0.tgz#6d82ade5e2e74f5c7e8739b6c84692bd65f0bd2a" @@ -7904,6 +9151,23 @@ svgo@^2.4.0: picocolors "^1.0.0" stable "^0.1.8" +swagger2openapi@^7.0.8: + version "7.0.8" + resolved "https://registry.yarnpkg.com/swagger2openapi/-/swagger2openapi-7.0.8.tgz#12c88d5de776cb1cbba758994930f40ad0afac59" + integrity sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g== + dependencies: + call-me-maybe "^1.0.1" + node-fetch "^2.6.1" + node-fetch-h2 "^2.3.0" + node-readfiles "^0.2.0" + oas-kit-common "^1.0.8" + oas-resolver "^2.5.6" + oas-schema-walker "^1.1.5" + oas-validator "^5.0.8" + reftools "^1.1.9" + yaml "^1.10.0" + yargs "^17.0.1" + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -7917,6 +9181,16 @@ synckit@^0.8.6: "@pkgr/core" "^0.1.0" tslib "^2.6.2" +table-layout@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04" + integrity sha512-qd/R7n5rQTRFi+Zf2sk5XVVd9UQl6ZkduPFC3S7WEGJAmetDTjY3qPN50eSKzwuzEyQKy5TN2TiZdkIjos2L6A== + dependencies: + array-back "^4.0.1" + deep-extend "~0.6.0" + typical "^5.2.0" + wordwrapjs "^4.0.0" + tailwind-merge@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.3.0.tgz" @@ -7996,6 +9270,14 @@ throttle-debounce@^2.1.0: resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.3.0.tgz#fd31865e66502071e411817e241465b3e9c372e2" integrity sha512-H7oLPV0P7+jgvrk+6mwwwBDmxTaxnu9HMXmloNLXwnNO0ZxZ31Orah2n8lU1eMPvsaowP2CX+USCgyovXfdOFQ== +timers-ext@^0.1.7: + version "0.1.8" + resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.8.tgz#b4e442f10b7624a29dd2aa42c295e257150cf16c" + integrity sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww== + dependencies: + es5-ext "^0.10.64" + next-tick "^1.1.0" + timsort@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz" @@ -8011,6 +9293,11 @@ tinypool@^0.8.3: resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.8.4.tgz#e217fe1270d941b39e98c625dcecebb1408c9aa8" integrity sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ== +tinyrainbow@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tinyrainbow/-/tinyrainbow-1.1.1.tgz#08dff5d4b86ff253c0b1087b0554c1f4d119ebf0" + integrity sha512-3yBkLfmrG/x2fkhcDAg4vyS4/GLSCOXtXa9bIfzEN1Y3geldnA7aEPsHfSsKqsvdEsPnESzkV9aU/9T0IjwWFg== + tinyspy@^2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-2.2.1.tgz#117b2342f1f38a0dbdcc73a50a454883adf861d1" @@ -8070,6 +9357,20 @@ tr46@~0.0.3: resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +traverse@^0.6.9: + version "0.6.9" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.9.tgz#76cfdbacf06382d460b76f8b735a44a6209d8b81" + integrity sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg== + dependencies: + gopd "^1.0.1" + typedarray.prototype.slice "^1.0.3" + which-typed-array "^1.1.15" + +ts-algebra@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ts-algebra/-/ts-algebra-2.0.0.tgz#4e3e0953878f26518fce7f6bb115064a65388b7a" + integrity sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw== + ts-api-utils@^1.0.1, ts-api-utils@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz" @@ -8085,6 +9386,11 @@ ts-interface-checker@^0.1.9: resolved "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz" integrity sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA== +ts-toolbelt@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz#50a25426cfed500d4a09bd1b3afb6f28879edfd5" + integrity sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w== + tsconfck@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.1.0.tgz#30c63b15972b591adb41dc9a339a02743d090c81" @@ -8110,6 +9416,11 @@ tslib@^2.0.0, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.6.2: resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== +tslib@^2.2.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" @@ -8139,6 +9450,16 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +type-fest@^4.18.2: + version "4.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-4.19.0.tgz#f7d3d5f55a7a118b5fe3d2eef53059cf8e516dcd" + integrity sha512-CN2l+hWACRiejlnr68vY0/7734Kzu+9+TOslUXbSCQ1ruY9XIHDBSceVXCcHm/oXrdzhtLMMdJEKfemf1yXiZQ== + +type@^2.7.2: + version "2.7.3" + resolved "https://registry.yarnpkg.com/type/-/type-2.7.3.tgz#436981652129285cc3ba94f392886c2637ea0486" + integrity sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ== + typed-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz" @@ -8183,11 +9504,33 @@ typed-array-length@^1.0.6: is-typed-array "^1.1.13" possible-typed-array-names "^1.0.0" -typescript@^5: +typedarray.prototype.slice@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typedarray.prototype.slice/-/typedarray.prototype.slice-1.0.3.tgz#bce2f685d3279f543239e4d595e0d021731d2d1a" + integrity sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A== + dependencies: + call-bind "^1.0.7" + define-properties "^1.2.1" + es-abstract "^1.23.0" + es-errors "^1.3.0" + typed-array-buffer "^1.0.2" + typed-array-byte-offset "^1.0.2" + +typescript@^5, typescript@^5.4.5: version "5.4.5" resolved "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz" integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== +typical@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4" + integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw== + +typical@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066" + integrity sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg== + u3@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/u3/-/u3-0.1.1.tgz" @@ -8227,11 +9570,21 @@ undici-types@~5.26.4: resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +unicorn-magic@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4" + integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== + universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== +universalify@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" + integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== + unocss-preset-animations@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/unocss-preset-animations/-/unocss-preset-animations-1.0.2.tgz" @@ -8268,6 +9621,11 @@ unocss@^0.60.2: "@unocss/transformer-variant-group" "0.60.3" "@unocss/vite" "0.60.3" +unraw@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unraw/-/unraw-3.0.0.tgz#73443ed70d2ab09ccbac2b00525602d5991fbbe3" + integrity sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg== + update-browserslist-db@^1.0.13: version "1.0.16" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz" @@ -8326,6 +9684,36 @@ uuid4@2.0.3: resolved "https://registry.npmjs.org/uuid4/-/uuid4-2.0.3.tgz" integrity sha512-CTpAkEVXMNJl2ojgtpLXHgz23dh8z81u6/HEPiQFOvBc/c2pde6TVHmH4uwY0d/GLF3tb7+VDAj4+2eJaQSdZQ== +validate.io-array@^1.0.3: + version "1.0.6" + resolved "https://registry.yarnpkg.com/validate.io-array/-/validate.io-array-1.0.6.tgz#5b5a2cafd8f8b85abb2f886ba153f2d93a27774d" + integrity sha512-DeOy7CnPEziggrOO5CZhVKJw6S3Yi7e9e65R1Nl/RTN1vTQKnzjfvks0/8kQ40FP/dsjRAOd4hxmJ7uLa6vxkg== + +validate.io-function@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/validate.io-function/-/validate.io-function-1.0.2.tgz#343a19802ed3b1968269c780e558e93411c0bad7" + integrity sha512-LlFybRJEriSuBnUhQyG5bwglhh50EpTL2ul23MPIuR1odjO7XaMLFV8vHGwp7AZciFxtYOeiSCT5st+XSPONiQ== + +validate.io-integer-array@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz#2cabde033293a6bcbe063feafe91eaf46b13a089" + integrity sha512-mTrMk/1ytQHtCY0oNO3dztafHYyGU88KL+jRxWuzfOmQb+4qqnWmI+gykvGp8usKZOM0H7keJHEbRaFiYA0VrA== + dependencies: + validate.io-array "^1.0.3" + validate.io-integer "^1.0.4" + +validate.io-integer@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/validate.io-integer/-/validate.io-integer-1.0.5.tgz#168496480b95be2247ec443f2233de4f89878068" + integrity sha512-22izsYSLojN/P6bppBqhgUDjCkr5RY2jd+N2a3DCAUey8ydvrZ/OkGvFPR7qfOpwR2LC5p4Ngzxz36g5Vgr/hQ== + dependencies: + validate.io-number "^1.0.3" + +validate.io-number@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/validate.io-number/-/validate.io-number-1.0.3.tgz#f63ffeda248bf28a67a8d48e0e3b461a1665baf8" + integrity sha512-kRAyotcbNaSYoDnXvb4MHg/0a1egJdLwS6oJ38TJY7aw9n93Fl/3blIXdyYvPOp55CNxywooG/3BcrwNrBpcSg== + vite-node@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.6.0.tgz#2c7e61129bfecc759478fa592754fd9704aaba7f" @@ -8346,7 +9734,7 @@ vite-tsconfig-paths@^4.3.2: globrex "^0.1.2" tsconfck "^3.0.3" -vite@^5.0.0: +vite@^5.0.0, vite@^5.2.12: version "5.2.12" resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.12.tgz#3536c93c58ba18edea4915a2ac573e6537409d97" integrity sha512-/gC8GxzxMK5ntBwb48pR32GGhENnjtY30G4A0jemunsBkiEZFw60s8InGpN8gkhHEkjnRK1aSAxeQgwvFhUHAA== @@ -8508,6 +9896,14 @@ word-wrap@^1.2.5: resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +wordwrapjs@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f" + integrity sha512-kKlNACbvHrkpIw6oPeYDSmdCTu2hdMHoyXLTcUKala++lx5Y+wjJ/e474Jqv5abnVmwxw08DiTuHmw69lJGksA== + dependencies: + reduce-flatten "^2.0.0" + typical "^5.2.0" + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" @@ -8526,6 +9922,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" @@ -8565,11 +9970,26 @@ y18n@^4.0.0: resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + yallist@^3.0.2: version "3.1.1" resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yaml-ast-parser@0.0.43: + version "0.0.43" + resolved "https://registry.yarnpkg.com/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz#e8a23e6fb4c38076ab92995c5dca33f3d3d7c9bb" + integrity sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A== + +yaml@^1.10.0: + version "1.10.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" + integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== + yaml@^2.3.4: version "2.4.2" resolved "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz" @@ -8583,6 +10003,11 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + yargs@^15.3.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" @@ -8600,6 +10025,19 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^17.0.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" @@ -8609,3 +10047,8 @@ yocto-queue@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-1.0.0.tgz#7f816433fb2cbc511ec8bf7d263c3b58a1a3c251" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== + +zod@^3.23.8: + version "3.23.8" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.23.8.tgz#e37b957b5d52079769fb8097099b592f0ef4067d" + integrity sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g== From 5d43174004fa6b5ef81aa053af3da27f9e149b84 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Thu, 6 Jun 2024 20:13:02 +0400 Subject: [PATCH 03/84] wip --- src/common/api/potlock/index.ts | 8 ++-- src/modules/core/hooks/useIsHuman.ts | 2 +- .../donation/components/DonationModal.tsx | 36 ++++++++-------- .../donation/components/DonationToAccount.tsx | 43 +++++++++++++++++++ .../donation/components/DonationToPot.tsx | 37 ++++++++++++++++ src/modules/donation/index.ts | 5 +-- .../project/components/ProjectCard.tsx | 8 +--- 7 files changed, 106 insertions(+), 33 deletions(-) create mode 100644 src/modules/donation/components/DonationToAccount.tsx create mode 100644 src/modules/donation/components/DonationToPot.tsx diff --git a/src/common/api/potlock/index.ts b/src/common/api/potlock/index.ts index a0ad1152..eba0d7e8 100644 --- a/src/common/api/potlock/index.ts +++ b/src/common/api/potlock/index.ts @@ -1,7 +1,7 @@ import { ZodiosHooks } from "@zodios/react"; import { infer as FromSchema } from "zod"; -import { accountSchema } from "./generated"; +import { accountSchema, potSchema } from "./generated"; import { getAPI } from "./generated/zodios"; import { POTLOCK_API_ENDPOINT } from "../../constants"; export * from "./generated"; @@ -11,8 +11,10 @@ export type Account = FromSchema; export type AccountId = Account["id"]; +export type Pot = FromSchema; + +export type PotId = Pot["id"]; + const client = getAPI(POTLOCK_API_ENDPOINT); export const { useQuery: usePotlockQuery } = new ZodiosHooks("Potlock", client); - -usePotlockQuery(""); diff --git a/src/modules/core/hooks/useIsHuman.ts b/src/modules/core/hooks/useIsHuman.ts index 46e47f0c..1f31cf5b 100644 --- a/src/modules/core/hooks/useIsHuman.ts +++ b/src/modules/core/hooks/useIsHuman.ts @@ -19,7 +19,7 @@ const useIsHuman = (accountId: string) => { } }; fetchHumanStatus(); - }, []); + }, [accountId]); return { nadaBotVerified, diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index 3886815e..e122640d 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -1,22 +1,20 @@ import { useCallback } from "react"; -import { create, show, useModal } from "@ebay/nice-modal-react"; +import { create, useModal } from "@ebay/nice-modal-react"; -import { AccountId } from "@/common/api/potlock"; +import { AccountId, PotId } from "@/common/api/potlock"; import { Dialog, DialogClose, DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, } from "@/common/ui/components/dialog"; -export type DonationModalProps = { - projectId: AccountId; -}; +import { DonationToAccount } from "./DonationToAccount"; +import { DonationToPot } from "./DonationToPot"; + +export type DonationModalProps = { accountId: AccountId } | { potId: PotId }; -export const DonationModal = create(({ projectId }: DonationModalProps) => { +export const DonationModal = create((props: DonationModalProps) => { const { hide, remove, visible } = useModal(); const onCloseClick = useCallback(() => { @@ -29,20 +27,20 @@ export const DonationModal = create(({ projectId }: DonationModalProps) => { - - Are you absolutely sure? + {"accountId" in props && ( + + )} - - This action cannot be undone. This will permanently delete your - account and remove your data from our servers. - - + {"potId" in props && } ); }); -export const useDonationModal = () => useModal(DonationModal); +export const useDonationModal = (props: DonationModalProps) => { + const { show } = useModal(DonationModal); -export const openDonationModal = (props: DonationModalProps) => - show(DonationModal, props); + const openDonationModal = useCallback(() => show(props), [props, show]); + + return { openDonationModal }; +}; diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx new file mode 100644 index 00000000..f8f9e494 --- /dev/null +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -0,0 +1,43 @@ +import { AccountId, usePotlockQuery } from "@/common/api/potlock"; +import { + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/common/ui/components/dialog"; + +export type DonationToAccountProps = { + accountId: AccountId; +}; + +export const DonationToAccount: React.FC = ({ + accountId, +}) => { + console.log(accountId); + + const { + isError, + isLoading, + data: account, + error, + } = usePotlockQuery("/api/v1/accounts/:account_id", { + params: { account_id: accountId }, + }); + + return isLoading ? ( + "Loading..." + ) : ( + <> + {isError && error.message} + + {account !== undefined && ( + <> + + {`Donation to ${account.id}`} + + + + + )} + + ); +}; diff --git a/src/modules/donation/components/DonationToPot.tsx b/src/modules/donation/components/DonationToPot.tsx new file mode 100644 index 00000000..62b8c13b --- /dev/null +++ b/src/modules/donation/components/DonationToPot.tsx @@ -0,0 +1,37 @@ +import { PotId, usePotlockQuery } from "@/common/api/potlock"; +import { + DialogDescription, + DialogHeader, + DialogTitle, +} from "@/common/ui/components/dialog"; + +export type DonationToPotProps = { + potId: PotId; +}; + +export const DonationToPot: React.FC = ({ potId }) => { + const { + isError, + isLoading, + data: pot, + error, + } = usePotlockQuery("/api/v1/pots/:pot_id/", { params: { pot_id: potId } }); + + return isLoading ? ( + "Loading..." + ) : ( + <> + {isError && error.message} + + {pot !== undefined && ( + <> + + {`Donation to Projects in ${pot.name}`} + + + + + )} + + ); +}; diff --git a/src/modules/donation/index.ts b/src/modules/donation/index.ts index 14d842c0..7c156099 100644 --- a/src/modules/donation/index.ts +++ b/src/modules/donation/index.ts @@ -1,4 +1 @@ -export { - openDonationModal, - useDonationModal, -} from "./components/DonationModal"; +export { useDonationModal } from "./components/DonationModal"; diff --git a/src/modules/project/components/ProjectCard.tsx b/src/modules/project/components/ProjectCard.tsx index 8492a7a8..b273a9a8 100644 --- a/src/modules/project/components/ProjectCard.tsx +++ b/src/modules/project/components/ProjectCard.tsx @@ -26,8 +26,7 @@ export const ProjectCard = ({ payoutDetails?: PayoutDetailed; }) => { const allowDonate = _allowDonate === undefined ? true : _allowDonate; - - const donationModal = useDonationModal(); + const { openDonationModal } = useDonationModal({ accountId: projectId }); const { socialData, socialImages, tags, totalAmountNear } = useProfile(projectId); @@ -143,10 +142,7 @@ export const ProjectCard = ({ From 697dd781fd11ac5d81ca03c3c6c84f5c949f9f53 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Thu, 6 Jun 2024 20:30:17 +0400 Subject: [PATCH 04/84] Generate API bindings directly from endpoint --- kubb.config.ts | 2 +- package.json | 8 +- .../potlock/generated/schemas/Account.json | 2 +- .../potlock/generated/zod/accountSchema.ts | 2 +- src/common/api/potlock/index.yaml | 1278 ----------------- 5 files changed, 7 insertions(+), 1285 deletions(-) delete mode 100644 src/common/api/potlock/index.yaml 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 From 697c9530d79e7e241f389ebaa5ac591722506616 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Thu, 6 Jun 2024 20:50:01 +0400 Subject: [PATCH 05/84] chore: Enable autoformatting for generated API clients --- .eslintrc.json | 7 + kubb.config.ts | 4 + package.json | 3 +- src/common/api/potlock/generated/index.ts | 2 +- .../potlock/generated/zod/accountSchema.ts | 27 +- .../defaultRegistrationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/donationSchema.ts | 65 +- src/common/api/potlock/generated/zod/index.ts | 2 +- .../generated/zod/listRegistrationSchema.ts | 34 +- .../api/potlock/generated/zod/listSchema.ts | 30 +- .../api/potlock/generated/zod/operations.ts | 484 +++++++------ .../generated/zod/potApplicationSchema.ts | 22 +- .../zod/potApplicationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/potPayoutSchema.ts | 17 +- .../api/potlock/generated/zod/potSchema.ts | 124 +++- .../generated/zod/statsResponseSchema.ts | 9 +- .../generated/zod/statusF24EnumSchema.ts | 8 +- .../zod/v1AccountsActivePotsRetrieveSchema.ts | 18 +- .../zod/v1AccountsRetrieve2Schema.ts | 10 +- .../generated/zod/v1AccountsRetrieveSchema.ts | 7 +- .../generated/zod/v1DonorsRetrieveSchema.ts | 15 +- .../zod/v1ListsRegistrationsRetrieveSchema.ts | 14 +- .../generated/zod/v1ListsRetrieve2Schema.ts | 8 +- .../generated/zod/v1ListsRetrieveSchema.ts | 7 +- .../zod/v1PotsApplicationsRetrieveSchema.ts | 14 +- .../zod/v1PotsDonationsRetrieveSchema.ts | 14 +- .../zod/v1PotsPayoutsRetrieveSchema.ts | 14 +- .../generated/zod/v1PotsRetrieve2Schema.ts | 6 +- .../generated/zod/v1PotsRetrieveSchema.ts | 7 +- .../zod/v1PotsSponsorsRetrieveSchema.ts | 14 +- .../generated/zod/v1StatsRetrieveSchema.ts | 7 +- src/common/api/potlock/generated/zodios.ts | 673 ++++++++++-------- src/common/contracts/social/index.ts | 27 - 33 files changed, 1105 insertions(+), 604 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 7d6806da..749f4720 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -91,6 +91,13 @@ "caseInsensitive": true } } + ], + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "argsIgnorePattern": "^_" + } ] } } \ No newline at end of file diff --git a/kubb.config.ts b/kubb.config.ts index 10c63bc4..dd1edeb1 100644 --- a/kubb.config.ts +++ b/kubb.config.ts @@ -23,4 +23,8 @@ export default defineConfig({ output: { path: "./zodios.ts" }, }), ], + + hooks: { + done: ["yarn format"], + }, }); diff --git a/package.json b/package.json index a9c7b514..c16fc557 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,9 @@ "private": true, "type": "module", "scripts": { - "typecheck": "tsc --noEmit", "lint": "next lint", + "format": "yarn lint --fix", + "typecheck": "tsc --noEmit", "generate:api": "kubb --config kubb.config.ts", "test:unit": "vitest run", "dev:test": "yarn && yarn generate:api && vitest watch", diff --git a/src/common/api/potlock/generated/index.ts b/src/common/api/potlock/generated/index.ts index 5beccc5b..a1edf4e1 100644 --- a/src/common/api/potlock/generated/index.ts +++ b/src/common/api/potlock/generated/index.ts @@ -1 +1 @@ -export * from "./zod/index"; \ No newline at end of file +export * from "./zod/index"; diff --git a/src/common/api/potlock/generated/zod/accountSchema.ts b/src/common/api/potlock/generated/zod/accountSchema.ts index 2288fc08..cd632532 100644 --- a/src/common/api/potlock/generated/zod/accountSchema.ts +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -1,4 +1,27 @@ 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(), "near_social_profile_data": z.any().nullish() }); \ 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(), +}); diff --git a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts index 373dcb4d..548b7732 100644 --- a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const defaultRegistrationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file +export const defaultRegistrationStatusEnumSchema = z + .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ); diff --git a/src/common/api/potlock/generated/zod/donationSchema.ts b/src/common/api/potlock/generated/zod/donationSchema.ts index 2f0ca1a0..c4c26aa3 100644 --- a/src/common/api/potlock/generated/zod/donationSchema.ts +++ b/src/common/api/potlock/generated/zod/donationSchema.ts @@ -1,4 +1,65 @@ import { z } from "zod"; - -export const donationSchema = z.object({ "id": z.number().describe("Donation id."), "on_chain_id": z.number().min(-2147483648).max(2147483647).describe("Donation id in contract"), "total_amount": z.string().max(64).describe("Total amount."), "total_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total amount in USD.").nullable().nullish(), "net_amount": z.string().max(64).describe("Net amount."), "net_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Net amount in USD.").nullable().nullish(), "matching_pool": z.boolean().describe("Matching pool."), "message": z.string().max(1024).describe("Donation message.").nullable().nullish(), "donated_at": z.string().datetime().describe("Donation date."), "protocol_fee": z.string().max(64).describe("Protocol fee."), "protocol_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Protocol fee in USD.").nullable().nullish(), "referrer_fee": z.string().max(64).describe("Referrer fee.").nullable().nullish(), "referrer_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Referrer fee in USD.").nullable().nullish(), "chef_fee": z.string().max(64).describe("Chef fee.").nullable().nullish(), "chef_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Chef fee in USD.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash."), "donor": z.string().describe("Donor."), "ft": z.string().describe("Donation FT."), "pot": z.string().describe("Donation pot.").nullable(), "recipient": z.string().describe("Donation recipient.").nullable().nullish(), "referrer": z.string().describe("Donation referrer.").nullable().nullish(), "chef": z.string().describe("Donation chef.").nullable().nullish() }); \ No newline at end of file +export const donationSchema = z.object({ + id: z.number().describe("Donation id."), + on_chain_id: z + .number() + .min(-2147483648) + .max(2147483647) + .describe("Donation id in contract"), + total_amount: z.string().max(64).describe("Total amount."), + total_amount_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Total amount in USD.") + .nullable() + .nullish(), + net_amount: z.string().max(64).describe("Net amount."), + net_amount_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Net amount in USD.") + .nullable() + .nullish(), + matching_pool: z.boolean().describe("Matching pool."), + message: z + .string() + .max(1024) + .describe("Donation message.") + .nullable() + .nullish(), + donated_at: z.string().datetime().describe("Donation date."), + protocol_fee: z.string().max(64).describe("Protocol fee."), + protocol_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Protocol fee in USD.") + .nullable() + .nullish(), + referrer_fee: z + .string() + .max(64) + .describe("Referrer fee.") + .nullable() + .nullish(), + referrer_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Referrer fee in USD.") + .nullable() + .nullish(), + chef_fee: z.string().max(64).describe("Chef fee.").nullable().nullish(), + chef_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Chef fee in USD.") + .nullable() + .nullish(), + tx_hash: z.string().max(64).describe("Transaction hash."), + donor: z.string().describe("Donor."), + ft: z.string().describe("Donation FT."), + pot: z.string().describe("Donation pot.").nullable(), + recipient: z.string().describe("Donation recipient.").nullable().nullish(), + referrer: z.string().describe("Donation referrer.").nullable().nullish(), + chef: z.string().describe("Donation chef.").nullable().nullish(), +}); diff --git a/src/common/api/potlock/generated/zod/index.ts b/src/common/api/potlock/generated/zod/index.ts index ae4fe072..43c1cf05 100644 --- a/src/common/api/potlock/generated/zod/index.ts +++ b/src/common/api/potlock/generated/zod/index.ts @@ -22,4 +22,4 @@ export * from "./v1PotsPayoutsRetrieveSchema"; export * from "./v1PotsRetrieve2Schema"; export * from "./v1PotsRetrieveSchema"; export * from "./v1PotsSponsorsRetrieveSchema"; -export * from "./v1StatsRetrieveSchema"; \ No newline at end of file +export * from "./v1StatsRetrieveSchema"; diff --git a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts index 912e05eb..3da1f8df 100644 --- a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts +++ b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts @@ -1,5 +1,35 @@ -import { statusF24EnumSchema } from "./statusF24EnumSchema"; import { z } from "zod"; +import { statusF24EnumSchema } from "./statusF24EnumSchema"; -export const listRegistrationSchema = z.object({ "id": z.number().describe("Registration id."), "status": z.lazy(() => statusF24EnumSchema).describe("Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "submitted_at": z.string().datetime().describe("Registration submission date."), "updated_at": z.string().datetime().describe("Registration last update date."), "registrant_notes": z.string().max(1024).describe("Registrant notes.").nullable().nullish(), "admin_notes": z.string().max(1024).describe("Admin notes.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash.").nullable().nullish(), "list": z.number().min(0).max(2147483647).describe("List registered."), "registrant": z.string().describe("Account that registered on the list."), "registered_by": z.string().describe("Account that did the registration.") }); \ No newline at end of file +export const listRegistrationSchema = z.object({ + id: z.number().describe("Registration id."), + status: z + .lazy(() => statusF24EnumSchema) + .describe( + "Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ), + submitted_at: z.string().datetime().describe("Registration submission date."), + updated_at: z.string().datetime().describe("Registration last update date."), + registrant_notes: z + .string() + .max(1024) + .describe("Registrant notes.") + .nullable() + .nullish(), + admin_notes: z + .string() + .max(1024) + .describe("Admin notes.") + .nullable() + .nullish(), + tx_hash: z + .string() + .max(64) + .describe("Transaction hash.") + .nullable() + .nullish(), + list: z.number().min(0).max(2147483647).describe("List registered."), + registrant: z.string().describe("Account that registered on the list."), + registered_by: z.string().describe("Account that did the registration."), +}); diff --git a/src/common/api/potlock/generated/zod/listSchema.ts b/src/common/api/potlock/generated/zod/listSchema.ts index dc978cf0..cfe2b5d3 100644 --- a/src/common/api/potlock/generated/zod/listSchema.ts +++ b/src/common/api/potlock/generated/zod/listSchema.ts @@ -1,5 +1,31 @@ -import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; import { z } from "zod"; +import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; -export const listSchema = z.object({ "id": z.number().min(0).max(2147483647).describe("List id."), "name": z.string().max(64).describe("List name."), "description": z.string().max(256).describe("List description.").nullable().nullish(), "cover_image_url": z.string().url().max(200).describe("Cover image url.").nullable().nullish(), "admin_only_registrations": z.boolean().describe("Admin only registrations."), "default_registration_status": z.lazy(() => defaultRegistrationStatusEnumSchema).describe("Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "created_at": z.string().datetime().describe("List creation date."), "updated_at": z.string().datetime().describe("List last update date."), "owner": z.string().describe("List owner."), "admins": z.array(z.string()).describe("List admins.") }); \ No newline at end of file +export const listSchema = z.object({ + id: z.number().min(0).max(2147483647).describe("List id."), + name: z.string().max(64).describe("List name."), + description: z + .string() + .max(256) + .describe("List description.") + .nullable() + .nullish(), + cover_image_url: z + .string() + .url() + .max(200) + .describe("Cover image url.") + .nullable() + .nullish(), + admin_only_registrations: z.boolean().describe("Admin only registrations."), + default_registration_status: z + .lazy(() => defaultRegistrationStatusEnumSchema) + .describe( + "Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ), + created_at: z.string().datetime().describe("List creation date."), + updated_at: z.string().datetime().describe("List last update date."), + owner: z.string().describe("List owner."), + admins: z.array(z.string()).describe("List admins."), +}); diff --git a/src/common/api/potlock/generated/zod/operations.ts b/src/common/api/potlock/generated/zod/operations.ts index 3a01f9a8..29971b90 100644 --- a/src/common/api/potlock/generated/zod/operations.ts +++ b/src/common/api/potlock/generated/zod/operations.ts @@ -1,202 +1,286 @@ -import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./v1AccountsRetrieveSchema"; -import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema, v1AccountsRetrieve2PathParamsSchema } from "./v1AccountsRetrieve2Schema"; -import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema } from "./v1AccountsActivePotsRetrieveSchema"; -import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieve500Schema, v1DonorsRetrieveQueryParamsSchema } from "./v1DonorsRetrieveSchema"; -import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./v1ListsRetrieveSchema"; -import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema, v1ListsRetrieve2PathParamsSchema } from "./v1ListsRetrieve2Schema"; -import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema, v1ListsRegistrationsRetrievePathParamsSchema } from "./v1ListsRegistrationsRetrieveSchema"; +import { + v1AccountsActivePotsRetrieve404Schema, + v1AccountsActivePotsRetrieve500Schema, + v1AccountsActivePotsRetrievePathParamsSchema, + v1AccountsActivePotsRetrieveQueryParamsSchema, + v1AccountsActivePotsRetrieveQueryResponseSchema, +} from "./v1AccountsActivePotsRetrieveSchema"; +import { + v1AccountsRetrieve2404Schema, + v1AccountsRetrieve2500Schema, + v1AccountsRetrieve2PathParamsSchema, + v1AccountsRetrieve2QueryResponseSchema, +} from "./v1AccountsRetrieve2Schema"; +import { + v1AccountsRetrieve500Schema, + v1AccountsRetrieveQueryResponseSchema, +} from "./v1AccountsRetrieveSchema"; +import { + v1DonorsRetrieve500Schema, + v1DonorsRetrieveQueryParamsSchema, + v1DonorsRetrieveQueryResponseSchema, +} from "./v1DonorsRetrieveSchema"; +import { + v1ListsRegistrationsRetrieve404Schema, + v1ListsRegistrationsRetrieve500Schema, + v1ListsRegistrationsRetrievePathParamsSchema, + v1ListsRegistrationsRetrieveQueryResponseSchema, +} from "./v1ListsRegistrationsRetrieveSchema"; +import { + v1ListsRetrieve2404Schema, + v1ListsRetrieve2500Schema, + v1ListsRetrieve2PathParamsSchema, + v1ListsRetrieve2QueryResponseSchema, +} from "./v1ListsRetrieve2Schema"; +import { + v1ListsRetrieve500Schema, + v1ListsRetrieveQueryResponseSchema, +} from "./v1ListsRetrieveSchema"; +import { + v1PotsApplicationsRetrieve404Schema, + v1PotsApplicationsRetrievePathParamsSchema, + v1PotsApplicationsRetrieveQueryResponseSchema, +} from "./v1PotsApplicationsRetrieveSchema"; +import { + v1PotsDonationsRetrieve404Schema, + v1PotsDonationsRetrievePathParamsSchema, + v1PotsDonationsRetrieveQueryResponseSchema, +} from "./v1PotsDonationsRetrieveSchema"; +import { + v1PotsPayoutsRetrieve404Schema, + v1PotsPayoutsRetrievePathParamsSchema, + v1PotsPayoutsRetrieveQueryResponseSchema, +} from "./v1PotsPayoutsRetrieveSchema"; +import { + v1PotsRetrieve2404Schema, + v1PotsRetrieve2PathParamsSchema, + v1PotsRetrieve2QueryResponseSchema, +} from "./v1PotsRetrieve2Schema"; import { v1PotsRetrieveQueryResponseSchema } from "./v1PotsRetrieveSchema"; -import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2404Schema, v1PotsRetrieve2PathParamsSchema } from "./v1PotsRetrieve2Schema"; -import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrieve404Schema, v1PotsApplicationsRetrievePathParamsSchema } from "./v1PotsApplicationsRetrieveSchema"; -import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrieve404Schema, v1PotsDonationsRetrievePathParamsSchema } from "./v1PotsDonationsRetrieveSchema"; -import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrieve404Schema, v1PotsPayoutsRetrievePathParamsSchema } from "./v1PotsPayoutsRetrieveSchema"; -import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrieve404Schema, v1PotsSponsorsRetrievePathParamsSchema } from "./v1PotsSponsorsRetrieveSchema"; -import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./v1StatsRetrieveSchema"; +import { + v1PotsSponsorsRetrieve404Schema, + v1PotsSponsorsRetrievePathParamsSchema, + v1PotsSponsorsRetrieveQueryResponseSchema, +} from "./v1PotsSponsorsRetrieveSchema"; +import { + v1StatsRetrieve500Schema, + v1StatsRetrieveQueryResponseSchema, +} from "./v1StatsRetrieveSchema"; - export const operations = { "v1_accounts_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1AccountsRetrieveQueryResponseSchema, - 500: v1AccountsRetrieve500Schema - } - }, "v1_accounts_retrieve_2": { - request: undefined, - parameters: { - path: v1AccountsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1AccountsRetrieve2QueryResponseSchema, - 404: v1AccountsRetrieve2404Schema, - 500: v1AccountsRetrieve2500Schema - } - }, "v1_accounts_active_pots_retrieve": { - request: undefined, - parameters: { - path: v1AccountsActivePotsRetrievePathParamsSchema, - query: v1AccountsActivePotsRetrieveQueryParamsSchema, - header: undefined - }, - responses: { - 200: v1AccountsActivePotsRetrieveQueryResponseSchema, - 404: v1AccountsActivePotsRetrieve404Schema, - 500: v1AccountsActivePotsRetrieve500Schema - } - }, "v1_donors_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: v1DonorsRetrieveQueryParamsSchema, - header: undefined - }, - responses: { - 200: v1DonorsRetrieveQueryResponseSchema, - 500: v1DonorsRetrieve500Schema - } - }, "v1_lists_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRetrieveQueryResponseSchema, - 500: v1ListsRetrieve500Schema - } - }, "v1_lists_retrieve_2": { - request: undefined, - parameters: { - path: v1ListsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRetrieve2QueryResponseSchema, - 404: v1ListsRetrieve2404Schema, - 500: v1ListsRetrieve2500Schema - } - }, "v1_lists_registrations_retrieve": { - request: undefined, - parameters: { - path: v1ListsRegistrationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRegistrationsRetrieveQueryResponseSchema, - 404: v1ListsRegistrationsRetrieve404Schema, - 500: v1ListsRegistrationsRetrieve500Schema - } - }, "v1_pots_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsRetrieveQueryResponseSchema - } - }, "v1_pots_retrieve_2": { - request: undefined, - parameters: { - path: v1PotsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsRetrieve2QueryResponseSchema, - 404: v1PotsRetrieve2404Schema - } - }, "v1_pots_applications_retrieve": { - request: undefined, - parameters: { - path: v1PotsApplicationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsApplicationsRetrieveQueryResponseSchema, - 404: v1PotsApplicationsRetrieve404Schema - } - }, "v1_pots_donations_retrieve": { - request: undefined, - parameters: { - path: v1PotsDonationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsDonationsRetrieveQueryResponseSchema, - 404: v1PotsDonationsRetrieve404Schema - } - }, "v1_pots_payouts_retrieve": { - request: undefined, - parameters: { - path: v1PotsPayoutsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsPayoutsRetrieveQueryResponseSchema, - 404: v1PotsPayoutsRetrieve404Schema - } - }, "v1_pots_sponsors_retrieve": { - request: undefined, - parameters: { - path: v1PotsSponsorsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsSponsorsRetrieveQueryResponseSchema, - 404: v1PotsSponsorsRetrieve404Schema - } - }, "v1_stats_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1StatsRetrieveQueryResponseSchema, - 500: v1StatsRetrieve500Schema - } - } } as const; -export const paths = { "/api/v1/accounts": { - get: operations["v1_accounts_retrieve"] - }, "/api/v1/accounts/{account_id}": { - get: operations["v1_accounts_retrieve_2"] - }, "/api/v1/accounts/{account_id}/active_pots": { - get: operations["v1_accounts_active_pots_retrieve"] - }, "/api/v1/donors": { - get: operations["v1_donors_retrieve"] - }, "/api/v1/lists": { - get: operations["v1_lists_retrieve"] - }, "/api/v1/lists/{list_id}": { - get: operations["v1_lists_retrieve_2"] - }, "/api/v1/lists/{list_id}/registrations": { - get: operations["v1_lists_registrations_retrieve"] - }, "/api/v1/pots": { - get: operations["v1_pots_retrieve"] - }, "/api/v1/pots/{pot_id}/": { - get: operations["v1_pots_retrieve_2"] - }, "/api/v1/pots/{pot_id}/applications": { - get: operations["v1_pots_applications_retrieve"] - }, "/api/v1/pots/{pot_id}/donations": { - get: operations["v1_pots_donations_retrieve"] - }, "/api/v1/pots/{pot_id}/payouts": { - get: operations["v1_pots_payouts_retrieve"] - }, "/api/v1/pots/{pot_id}/sponsors": { - get: operations["v1_pots_sponsors_retrieve"] - }, "/api/v1/stats": { - get: operations["v1_stats_retrieve"] - } } as const; \ No newline at end of file +export const operations = { + v1_accounts_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1AccountsRetrieveQueryResponseSchema, + 500: v1AccountsRetrieve500Schema, + }, + }, + v1_accounts_retrieve_2: { + request: undefined, + parameters: { + path: v1AccountsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1AccountsRetrieve2QueryResponseSchema, + 404: v1AccountsRetrieve2404Schema, + 500: v1AccountsRetrieve2500Schema, + }, + }, + v1_accounts_active_pots_retrieve: { + request: undefined, + parameters: { + path: v1AccountsActivePotsRetrievePathParamsSchema, + query: v1AccountsActivePotsRetrieveQueryParamsSchema, + header: undefined, + }, + responses: { + 200: v1AccountsActivePotsRetrieveQueryResponseSchema, + 404: v1AccountsActivePotsRetrieve404Schema, + 500: v1AccountsActivePotsRetrieve500Schema, + }, + }, + v1_donors_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: v1DonorsRetrieveQueryParamsSchema, + header: undefined, + }, + responses: { + 200: v1DonorsRetrieveQueryResponseSchema, + 500: v1DonorsRetrieve500Schema, + }, + }, + v1_lists_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRetrieveQueryResponseSchema, + 500: v1ListsRetrieve500Schema, + }, + }, + v1_lists_retrieve_2: { + request: undefined, + parameters: { + path: v1ListsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRetrieve2QueryResponseSchema, + 404: v1ListsRetrieve2404Schema, + 500: v1ListsRetrieve2500Schema, + }, + }, + v1_lists_registrations_retrieve: { + request: undefined, + parameters: { + path: v1ListsRegistrationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRegistrationsRetrieveQueryResponseSchema, + 404: v1ListsRegistrationsRetrieve404Schema, + 500: v1ListsRegistrationsRetrieve500Schema, + }, + }, + v1_pots_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsRetrieveQueryResponseSchema, + }, + }, + v1_pots_retrieve_2: { + request: undefined, + parameters: { + path: v1PotsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsRetrieve2QueryResponseSchema, + 404: v1PotsRetrieve2404Schema, + }, + }, + v1_pots_applications_retrieve: { + request: undefined, + parameters: { + path: v1PotsApplicationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsApplicationsRetrieveQueryResponseSchema, + 404: v1PotsApplicationsRetrieve404Schema, + }, + }, + v1_pots_donations_retrieve: { + request: undefined, + parameters: { + path: v1PotsDonationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsDonationsRetrieveQueryResponseSchema, + 404: v1PotsDonationsRetrieve404Schema, + }, + }, + v1_pots_payouts_retrieve: { + request: undefined, + parameters: { + path: v1PotsPayoutsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsPayoutsRetrieveQueryResponseSchema, + 404: v1PotsPayoutsRetrieve404Schema, + }, + }, + v1_pots_sponsors_retrieve: { + request: undefined, + parameters: { + path: v1PotsSponsorsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsSponsorsRetrieveQueryResponseSchema, + 404: v1PotsSponsorsRetrieve404Schema, + }, + }, + v1_stats_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1StatsRetrieveQueryResponseSchema, + 500: v1StatsRetrieve500Schema, + }, + }, +} as const; +export const paths = { + "/api/v1/accounts": { + get: operations["v1_accounts_retrieve"], + }, + "/api/v1/accounts/{account_id}": { + get: operations["v1_accounts_retrieve_2"], + }, + "/api/v1/accounts/{account_id}/active_pots": { + get: operations["v1_accounts_active_pots_retrieve"], + }, + "/api/v1/donors": { + get: operations["v1_donors_retrieve"], + }, + "/api/v1/lists": { + get: operations["v1_lists_retrieve"], + }, + "/api/v1/lists/{list_id}": { + get: operations["v1_lists_retrieve_2"], + }, + "/api/v1/lists/{list_id}/registrations": { + get: operations["v1_lists_registrations_retrieve"], + }, + "/api/v1/pots": { + get: operations["v1_pots_retrieve"], + }, + "/api/v1/pots/{pot_id}/": { + get: operations["v1_pots_retrieve_2"], + }, + "/api/v1/pots/{pot_id}/applications": { + get: operations["v1_pots_applications_retrieve"], + }, + "/api/v1/pots/{pot_id}/donations": { + get: operations["v1_pots_donations_retrieve"], + }, + "/api/v1/pots/{pot_id}/payouts": { + get: operations["v1_pots_payouts_retrieve"], + }, + "/api/v1/pots/{pot_id}/sponsors": { + get: operations["v1_pots_sponsors_retrieve"], + }, + "/api/v1/stats": { + get: operations["v1_stats_retrieve"], + }, +} as const; diff --git a/src/common/api/potlock/generated/zod/potApplicationSchema.ts b/src/common/api/potlock/generated/zod/potApplicationSchema.ts index 0121babc..98996388 100644 --- a/src/common/api/potlock/generated/zod/potApplicationSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationSchema.ts @@ -1,5 +1,23 @@ -import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; import { z } from "zod"; +import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; -export const potApplicationSchema = z.object({ "id": z.number().describe("Application id."), "message": z.string().max(1024).describe("Application message.").nullable().nullish(), "status": z.lazy(() => potApplicationStatusEnumSchema).describe("Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"), "submitted_at": z.string().datetime().describe("Application submission date."), "updated_at": z.string().datetime().describe("Application last update date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot applied to."), "applicant": z.string().describe("Account that applied to the pot.") }); \ No newline at end of file +export const potApplicationSchema = z.object({ + id: z.number().describe("Application id."), + message: z + .string() + .max(1024) + .describe("Application message.") + .nullable() + .nullish(), + status: z + .lazy(() => potApplicationStatusEnumSchema) + .describe( + "Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", + ), + submitted_at: z.string().datetime().describe("Application submission date."), + updated_at: z.string().datetime().describe("Application last update date."), + tx_hash: z.string().max(64).describe("Transaction hash."), + pot: z.string().describe("Pot applied to."), + applicant: z.string().describe("Account that applied to the pot."), +}); diff --git a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts index b44597af..92b90896 100644 --- a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview */ -export const potApplicationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "InReview"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"); \ No newline at end of file +export const potApplicationStatusEnumSchema = z + .enum(["Pending", "Approved", "Rejected", "InReview"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", + ); diff --git a/src/common/api/potlock/generated/zod/potPayoutSchema.ts b/src/common/api/potlock/generated/zod/potPayoutSchema.ts index d7277212..627965e1 100644 --- a/src/common/api/potlock/generated/zod/potPayoutSchema.ts +++ b/src/common/api/potlock/generated/zod/potPayoutSchema.ts @@ -1,4 +1,17 @@ import { z } from "zod"; - -export const potPayoutSchema = z.object({ "id": z.number().describe("Payout id."), "amount": z.string().max(64).describe("Payout amount."), "amount_paid_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Payout amount in USD.").nullable().nullish(), "paid_at": z.string().datetime().describe("Payout date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot that this payout is for."), "recipient": z.string().describe("Payout recipient."), "ft": z.string().describe("Payout FT.") }); \ No newline at end of file +export const potPayoutSchema = z.object({ + id: z.number().describe("Payout id."), + amount: z.string().max(64).describe("Payout amount."), + amount_paid_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Payout amount in USD.") + .nullable() + .nullish(), + paid_at: z.string().datetime().describe("Payout date."), + tx_hash: z.string().max(64).describe("Transaction hash."), + pot: z.string().describe("Pot that this payout is for."), + recipient: z.string().describe("Payout recipient."), + ft: z.string().describe("Payout FT."), +}); diff --git a/src/common/api/potlock/generated/zod/potSchema.ts b/src/common/api/potlock/generated/zod/potSchema.ts index a0c19ac6..1cd5f75c 100644 --- a/src/common/api/potlock/generated/zod/potSchema.ts +++ b/src/common/api/potlock/generated/zod/potSchema.ts @@ -1,4 +1,124 @@ import { z } from "zod"; - -export const potSchema = z.object({ "id": z.string().describe("Pot account ID."), "pot_factory": z.string().describe("Pot factory."), "deployer": z.string().describe("Pot deployer."), "deployed_at": z.string().datetime().describe("Pot deployment date."), "source_metadata": z.any(), "owner": z.string().describe("Pot owner."), "admins": z.array(z.string()).describe("Pot admins."), "chef": z.string().describe("Pot chef.").nullable().nullish(), "name": z.string().describe("Pot name."), "description": z.string().describe("Pot description."), "max_approved_applicants": z.number().min(0).max(2147483647).describe("Max approved applicants."), "base_currency": z.string().max(64).describe("Base currency.").nullable().nullish(), "application_start": z.string().datetime().describe("Pot application start date."), "application_end": z.string().datetime().describe("Pot application end date."), "matching_round_start": z.string().datetime().describe("Pot matching round start date."), "matching_round_end": z.string().datetime().describe("Pot matching round end date."), "registry_provider": z.string().max(64).describe("Registry provider.").nullable().nullish(), "min_matching_pool_donation_amount": z.string().max(64).describe("Min matching pool donation amount."), "sybil_wrapper_provider": z.string().max(64).describe("Sybil wrapper provider.").nullable().nullish(), "custom_sybil_checks": z.string().max(64).describe("Custom sybil checks.").nullable().nullish(), "custom_min_threshold_score": z.number().min(0).max(2147483647).describe("Custom min threshold score.").nullable().nullish(), "referral_fee_matching_pool_basis_points": z.number().min(0).max(2147483647).describe("Referral fee matching pool basis points."), "referral_fee_public_round_basis_points": z.number().min(0).max(2147483647).describe("Referral fee public round basis points."), "chef_fee_basis_points": z.number().min(0).max(2147483647).describe("Chef fee basis points."), "total_matching_pool": z.string().max(64).describe("Total matching pool."), "total_matching_pool_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "matching_pool_balance": z.string().max(64).describe("Matching pool balance."), "matching_pool_donations_count": z.number().min(0).max(2147483647).describe("Matching pool donations count."), "total_public_donations": z.string().max(64).describe("Total public donations."), "total_public_donations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "public_donations_count": z.number().min(0).max(2147483647).describe("Public donations count."), "cooldown_end": z.string().datetime().describe("Pot cooldown end date.").nullable().nullish(), "cooldown_period_ms": z.number().min(0).max(2147483647).describe("Pot cooldown period in ms.").nullable().nullish(), "all_paid_out": z.boolean().describe("All paid out."), "protocol_config_provider": z.string().max(64).describe("Protocol config provider.").nullable().nullish() }); \ No newline at end of file +export const potSchema = z.object({ + id: z.string().describe("Pot account ID."), + pot_factory: z.string().describe("Pot factory."), + deployer: z.string().describe("Pot deployer."), + deployed_at: z.string().datetime().describe("Pot deployment date."), + source_metadata: z.any(), + owner: z.string().describe("Pot owner."), + admins: z.array(z.string()).describe("Pot admins."), + chef: z.string().describe("Pot chef.").nullable().nullish(), + name: z.string().describe("Pot name."), + description: z.string().describe("Pot description."), + max_approved_applicants: z + .number() + .min(0) + .max(2147483647) + .describe("Max approved applicants."), + base_currency: z + .string() + .max(64) + .describe("Base currency.") + .nullable() + .nullish(), + application_start: z + .string() + .datetime() + .describe("Pot application start date."), + application_end: z.string().datetime().describe("Pot application end date."), + matching_round_start: z + .string() + .datetime() + .describe("Pot matching round start date."), + matching_round_end: z + .string() + .datetime() + .describe("Pot matching round end date."), + registry_provider: z + .string() + .max(64) + .describe("Registry provider.") + .nullable() + .nullish(), + min_matching_pool_donation_amount: z + .string() + .max(64) + .describe("Min matching pool donation amount."), + sybil_wrapper_provider: z + .string() + .max(64) + .describe("Sybil wrapper provider.") + .nullable() + .nullish(), + custom_sybil_checks: z + .string() + .max(64) + .describe("Custom sybil checks.") + .nullable() + .nullish(), + custom_min_threshold_score: z + .number() + .min(0) + .max(2147483647) + .describe("Custom min threshold score.") + .nullable() + .nullish(), + referral_fee_matching_pool_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Referral fee matching pool basis points."), + referral_fee_public_round_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Referral fee public round basis points."), + chef_fee_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Chef fee basis points."), + total_matching_pool: z.string().max(64).describe("Total matching pool."), + total_matching_pool_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), + matching_pool_balance: z.string().max(64).describe("Matching pool balance."), + matching_pool_donations_count: z + .number() + .min(0) + .max(2147483647) + .describe("Matching pool donations count."), + total_public_donations: z + .string() + .max(64) + .describe("Total public donations."), + total_public_donations_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), + public_donations_count: z + .number() + .min(0) + .max(2147483647) + .describe("Public donations count."), + cooldown_end: z + .string() + .datetime() + .describe("Pot cooldown end date.") + .nullable() + .nullish(), + cooldown_period_ms: z + .number() + .min(0) + .max(2147483647) + .describe("Pot cooldown period in ms.") + .nullable() + .nullish(), + all_paid_out: z.boolean().describe("All paid out."), + protocol_config_provider: z + .string() + .max(64) + .describe("Protocol config provider.") + .nullable() + .nullish(), +}); diff --git a/src/common/api/potlock/generated/zod/statsResponseSchema.ts b/src/common/api/potlock/generated/zod/statsResponseSchema.ts index 740a83f4..c009c24b 100644 --- a/src/common/api/potlock/generated/zod/statsResponseSchema.ts +++ b/src/common/api/potlock/generated/zod/statsResponseSchema.ts @@ -1,4 +1,9 @@ import { z } from "zod"; - -export const statsResponseSchema = z.object({ "total_donations_usd": z.number(), "total_payouts_usd": z.number(), "total_donations_count": z.number(), "total_donors_count": z.number(), "total_recipients_count": z.number() }); \ No newline at end of file +export const statsResponseSchema = z.object({ + total_donations_usd: z.number(), + total_payouts_usd: z.number(), + total_donations_count: z.number(), + total_donors_count: z.number(), + total_recipients_count: z.number(), +}); diff --git a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts index fadb137a..33ce8e9a 100644 --- a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts +++ b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const statusF24EnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file +export const statusF24EnumSchema = z + .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ); diff --git a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts index e8777c51..2805af8d 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts @@ -1,14 +1,20 @@ import { z } from "zod"; -import { potSchema } from "./potSchema"; +import { potSchema } from "./potSchema"; -export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ "account_id": z.string() }); +export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ + account_id: z.string(), +}); - export const v1AccountsActivePotsRetrieveQueryParamsSchema = z.object({ "status": z.string().describe("Filter by pot status").optional() }).optional(); +export const v1AccountsActivePotsRetrieveQueryParamsSchema = z + .object({ status: z.string().describe("Filter by pot status").optional() }) + .optional(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); +export const v1AccountsActivePotsRetrieve200Schema = z.array( + z.lazy(() => potSchema), +); /** * @description Account not found */ @@ -20,4 +26,6 @@ export const v1AccountsActivePotsRetrieve500Schema = z.any(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file +export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts index c65eec24..0de9aa2a 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts @@ -1,8 +1,10 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1AccountsRetrieve2PathParamsSchema = z.object({ "account_id": z.string() }); +export const v1AccountsRetrieve2PathParamsSchema = z.object({ + account_id: z.string(), +}); /** * @description Returns account details */ @@ -18,4 +20,6 @@ export const v1AccountsRetrieve2500Schema = z.any(); /** * @description Returns account details */ -export const v1AccountsRetrieve2QueryResponseSchema = z.lazy(() => accountSchema); \ No newline at end of file +export const v1AccountsRetrieve2QueryResponseSchema = z.lazy( + () => accountSchema, +); diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts index f9ac9afe..7e391a3b 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { accountSchema } from "./accountSchema"; - /** +/** * @description Returns a list of accounts */ export const v1AccountsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); @@ -12,4 +13,6 @@ export const v1AccountsRetrieve500Schema = z.any(); /** * @description Returns a list of accounts */ -export const v1AccountsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1AccountsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts index 0420a5e2..9f5762a5 100644 --- a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts @@ -1,8 +1,15 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1DonorsRetrieveQueryParamsSchema = z.object({ "sort": z.string().describe("Sort by field, e.g., most_donated_usd").optional() }).optional(); +export const v1DonorsRetrieveQueryParamsSchema = z + .object({ + sort: z + .string() + .describe("Sort by field, e.g., most_donated_usd") + .optional(), + }) + .optional(); /** * @description Returns a list of donor accounts */ @@ -14,4 +21,6 @@ export const v1DonorsRetrieve500Schema = z.any(); /** * @description Returns a list of donor accounts */ -export const v1DonorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1DonorsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts index 9e191236..0adfaa5e 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { listRegistrationSchema } from "./listRegistrationSchema"; +import { listRegistrationSchema } from "./listRegistrationSchema"; -export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ "list_id": z.number() }); +export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ + list_id: z.number(), +}); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieve200Schema = z.array(z.lazy(() => listRegistrationSchema)); +export const v1ListsRegistrationsRetrieve200Schema = z.array( + z.lazy(() => listRegistrationSchema), +); /** * @description List not found */ @@ -18,4 +22,6 @@ export const v1ListsRegistrationsRetrieve500Schema = z.any(); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array(z.lazy(() => listRegistrationSchema)); \ No newline at end of file +export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => listRegistrationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts index 4e88ea9b..ae5a0934 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts @@ -1,8 +1,10 @@ import { z } from "zod"; -import { listSchema } from "./listSchema"; +import { listSchema } from "./listSchema"; -export const v1ListsRetrieve2PathParamsSchema = z.object({ "list_id": z.number() }); +export const v1ListsRetrieve2PathParamsSchema = z.object({ + list_id: z.number(), +}); /** * @description Returns list details */ @@ -18,4 +20,4 @@ export const v1ListsRetrieve2500Schema = z.any(); /** * @description Returns list details */ -export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); \ No newline at end of file +export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts index a6578129..7e13ceb9 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { listSchema } from "./listSchema"; - /** +/** * @description Returns a list of lists */ export const v1ListsRetrieve200Schema = z.array(z.lazy(() => listSchema)); @@ -12,4 +13,6 @@ export const v1ListsRetrieve500Schema = z.any(); /** * @description Returns a list of lists */ -export const v1ListsRetrieveQueryResponseSchema = z.array(z.lazy(() => listSchema)); \ No newline at end of file +export const v1ListsRetrieveQueryResponseSchema = z.array( + z.lazy(() => listSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts index 1392b571..1dc33744 100644 --- a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { potApplicationSchema } from "./potApplicationSchema"; +import { potApplicationSchema } from "./potApplicationSchema"; -export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieve200Schema = z.array(z.lazy(() => potApplicationSchema)); +export const v1PotsApplicationsRetrieve200Schema = z.array( + z.lazy(() => potApplicationSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsApplicationsRetrieve404Schema = z.any(); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array(z.lazy(() => potApplicationSchema)); \ No newline at end of file +export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potApplicationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts index 707a67b7..cdb8b356 100644 --- a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { donationSchema } from "./donationSchema"; +import { donationSchema } from "./donationSchema"; -export const v1PotsDonationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsDonationsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieve200Schema = z.array(z.lazy(() => donationSchema)); +export const v1PotsDonationsRetrieve200Schema = z.array( + z.lazy(() => donationSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsDonationsRetrieve404Schema = z.any(); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieveQueryResponseSchema = z.array(z.lazy(() => donationSchema)); \ No newline at end of file +export const v1PotsDonationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => donationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts index 9892362f..3ff282f6 100644 --- a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { potPayoutSchema } from "./potPayoutSchema"; +import { potPayoutSchema } from "./potPayoutSchema"; -export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieve200Schema = z.array(z.lazy(() => potPayoutSchema)); +export const v1PotsPayoutsRetrieve200Schema = z.array( + z.lazy(() => potPayoutSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsPayoutsRetrieve404Schema = z.any(); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array(z.lazy(() => potPayoutSchema)); \ No newline at end of file +export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potPayoutSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts index a9ebf834..26021f10 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts @@ -1,8 +1,8 @@ import { z } from "zod"; -import { potSchema } from "./potSchema"; +import { potSchema } from "./potSchema"; -export const v1PotsRetrieve2PathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsRetrieve2PathParamsSchema = z.object({ pot_id: z.string() }); /** * @description Returns pot details */ @@ -14,4 +14,4 @@ export const v1PotsRetrieve2404Schema = z.any(); /** * @description Returns pot details */ -export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); \ No newline at end of file +export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts index 373724c1..eee00c54 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts @@ -1,11 +1,14 @@ import { z } from "zod"; + import { potSchema } from "./potSchema"; - /** +/** * @description Returns a list of pots */ export const v1PotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); /** * @description Returns a list of pots */ -export const v1PotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file +export const v1PotsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts index 1a0a53e2..e9bf09bc 100644 --- a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); +export const v1PotsSponsorsRetrieve200Schema = z.array( + z.lazy(() => accountSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsSponsorsRetrieve404Schema = z.any(); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts index a74f954c..ba4a5754 100644 --- a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { statsResponseSchema } from "./statsResponseSchema"; - /** +/** * @description Returns statistics data */ export const v1StatsRetrieve200Schema = z.lazy(() => statsResponseSchema); @@ -12,4 +13,6 @@ export const v1StatsRetrieve500Schema = z.any(); /** * @description Returns statistics data */ -export const v1StatsRetrieveQueryResponseSchema = z.lazy(() => statsResponseSchema); \ No newline at end of file +export const v1StatsRetrieveQueryResponseSchema = z.lazy( + () => statsResponseSchema, +); diff --git a/src/common/api/potlock/generated/zodios.ts b/src/common/api/potlock/generated/zodios.ts index 9576a620..6733f1f7 100644 --- a/src/common/api/potlock/generated/zodios.ts +++ b/src/common/api/potlock/generated/zodios.ts @@ -1,321 +1,380 @@ -import { makeApi, Zodios } from "@zodios/core"; -import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./zod/v1AccountsRetrieveSchema"; -import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2PathParamsSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema } from "./zod/v1AccountsRetrieve2Schema"; -import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema } from "./zod/v1AccountsActivePotsRetrieveSchema"; -import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieveQueryParamsSchema, v1DonorsRetrieve500Schema } from "./zod/v1DonorsRetrieveSchema"; -import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./zod/v1ListsRetrieveSchema"; -import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2PathParamsSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema } from "./zod/v1ListsRetrieve2Schema"; -import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrievePathParamsSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema } from "./zod/v1ListsRegistrationsRetrieveSchema"; +import { Zodios, makeApi } from "@zodios/core"; + +import { + v1AccountsActivePotsRetrieve404Schema, + v1AccountsActivePotsRetrieve500Schema, + v1AccountsActivePotsRetrievePathParamsSchema, + v1AccountsActivePotsRetrieveQueryParamsSchema, + v1AccountsActivePotsRetrieveQueryResponseSchema, +} from "./zod/v1AccountsActivePotsRetrieveSchema"; +import { + v1AccountsRetrieve2404Schema, + v1AccountsRetrieve2500Schema, + v1AccountsRetrieve2PathParamsSchema, + v1AccountsRetrieve2QueryResponseSchema, +} from "./zod/v1AccountsRetrieve2Schema"; +import { + v1AccountsRetrieve500Schema, + v1AccountsRetrieveQueryResponseSchema, +} from "./zod/v1AccountsRetrieveSchema"; +import { + v1DonorsRetrieve500Schema, + v1DonorsRetrieveQueryParamsSchema, + v1DonorsRetrieveQueryResponseSchema, +} from "./zod/v1DonorsRetrieveSchema"; +import { + v1ListsRegistrationsRetrieve404Schema, + v1ListsRegistrationsRetrieve500Schema, + v1ListsRegistrationsRetrievePathParamsSchema, + v1ListsRegistrationsRetrieveQueryResponseSchema, +} from "./zod/v1ListsRegistrationsRetrieveSchema"; +import { + v1ListsRetrieve2404Schema, + v1ListsRetrieve2500Schema, + v1ListsRetrieve2PathParamsSchema, + v1ListsRetrieve2QueryResponseSchema, +} from "./zod/v1ListsRetrieve2Schema"; +import { + v1ListsRetrieve500Schema, + v1ListsRetrieveQueryResponseSchema, +} from "./zod/v1ListsRetrieveSchema"; +import { + v1PotsApplicationsRetrieve404Schema, + v1PotsApplicationsRetrievePathParamsSchema, + v1PotsApplicationsRetrieveQueryResponseSchema, +} from "./zod/v1PotsApplicationsRetrieveSchema"; +import { + v1PotsDonationsRetrieve404Schema, + v1PotsDonationsRetrievePathParamsSchema, + v1PotsDonationsRetrieveQueryResponseSchema, +} from "./zod/v1PotsDonationsRetrieveSchema"; +import { + v1PotsPayoutsRetrieve404Schema, + v1PotsPayoutsRetrievePathParamsSchema, + v1PotsPayoutsRetrieveQueryResponseSchema, +} from "./zod/v1PotsPayoutsRetrieveSchema"; +import { + v1PotsRetrieve2404Schema, + v1PotsRetrieve2PathParamsSchema, + v1PotsRetrieve2QueryResponseSchema, +} from "./zod/v1PotsRetrieve2Schema"; import { v1PotsRetrieveQueryResponseSchema } from "./zod/v1PotsRetrieveSchema"; -import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2PathParamsSchema, v1PotsRetrieve2404Schema } from "./zod/v1PotsRetrieve2Schema"; -import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrievePathParamsSchema, v1PotsApplicationsRetrieve404Schema } from "./zod/v1PotsApplicationsRetrieveSchema"; -import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrievePathParamsSchema, v1PotsDonationsRetrieve404Schema } from "./zod/v1PotsDonationsRetrieveSchema"; -import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrievePathParamsSchema, v1PotsPayoutsRetrieve404Schema } from "./zod/v1PotsPayoutsRetrieveSchema"; -import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrievePathParamsSchema, v1PotsSponsorsRetrieve404Schema } from "./zod/v1PotsSponsorsRetrieveSchema"; -import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./zod/v1StatsRetrieveSchema"; +import { + v1PotsSponsorsRetrieve404Schema, + v1PotsSponsorsRetrievePathParamsSchema, + v1PotsSponsorsRetrieveQueryResponseSchema, +} from "./zod/v1PotsSponsorsRetrieveSchema"; +import { + v1StatsRetrieve500Schema, + v1StatsRetrieveQueryResponseSchema, +} from "./zod/v1StatsRetrieveSchema"; - export const endpoints = makeApi([ - { - method: "get", - path: "/api/v1/accounts", - description: ``, - requestFormat: "json", - parameters: [], - response: v1AccountsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1AccountsRetrieve500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/accounts/:account_id", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "account_id", - description: ``, - type: "Path", - schema: v1AccountsRetrieve2PathParamsSchema.shape["account_id"] - } - ], - response: v1AccountsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `Account not found`, - schema: v1AccountsRetrieve2404Schema - }, - { - status: 500, - description: `Internal server error`, - schema: v1AccountsRetrieve2500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/accounts/:account_id/active_pots", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "account_id", - description: ``, - type: "Path", - schema: v1AccountsActivePotsRetrievePathParamsSchema.shape["account_id"] - }, - { - name: "status", - description: `Filter by pot status`, - type: "Query", - schema: v1AccountsActivePotsRetrieveQueryParamsSchema.unwrap().shape["status"] - } - ], - response: v1AccountsActivePotsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Account not found`, - schema: v1AccountsActivePotsRetrieve404Schema - }, - { - status: 500, - description: `Internal server error`, - schema: v1AccountsActivePotsRetrieve500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/donors", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "sort", - description: `Sort by field, e.g., most_donated_usd`, - type: "Query", - schema: v1DonorsRetrieveQueryParamsSchema.unwrap().shape["sort"] - } - ], - response: v1DonorsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1DonorsRetrieve500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/lists", - description: ``, - requestFormat: "json", - parameters: [], - response: v1ListsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1ListsRetrieve500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/lists/:list_id", +export const endpoints = makeApi([ + { + method: "get", + path: "/api/v1/accounts", + description: ``, + requestFormat: "json", + parameters: [], + response: v1AccountsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1AccountsRetrieve500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/accounts/:account_id", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "account_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "list_id", - description: ``, - type: "Path", - schema: v1ListsRetrieve2PathParamsSchema.shape["list_id"] - } - ], - response: v1ListsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `List not found`, - schema: v1ListsRetrieve2404Schema - }, - { - status: 500, - description: `Internal server error`, - schema: v1ListsRetrieve2500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/lists/:list_id/registrations", + type: "Path", + schema: v1AccountsRetrieve2PathParamsSchema.shape["account_id"], + }, + ], + response: v1AccountsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `Account not found`, + schema: v1AccountsRetrieve2404Schema, + }, + { + status: 500, + description: `Internal server error`, + schema: v1AccountsRetrieve2500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/accounts/:account_id/active_pots", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "account_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "list_id", - description: ``, - type: "Path", - schema: v1ListsRegistrationsRetrievePathParamsSchema.shape["list_id"] - } - ], - response: v1ListsRegistrationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `List not found`, - schema: v1ListsRegistrationsRetrieve404Schema - }, - { - status: 500, - description: `Internal server error`, - schema: v1ListsRegistrationsRetrieve500Schema - } - ], - }, - { - method: "get", - path: "/api/v1/pots", + type: "Path", + schema: + v1AccountsActivePotsRetrievePathParamsSchema.shape["account_id"], + }, + { + name: "status", + description: `Filter by pot status`, + type: "Query", + schema: + v1AccountsActivePotsRetrieveQueryParamsSchema.unwrap().shape[ + "status" + ], + }, + ], + response: v1AccountsActivePotsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Account not found`, + schema: v1AccountsActivePotsRetrieve404Schema, + }, + { + status: 500, + description: `Internal server error`, + schema: v1AccountsActivePotsRetrieve500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/donors", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "sort", + description: `Sort by field, e.g., most_donated_usd`, + type: "Query", + schema: v1DonorsRetrieveQueryParamsSchema.unwrap().shape["sort"], + }, + ], + response: v1DonorsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1DonorsRetrieve500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/lists", + description: ``, + requestFormat: "json", + parameters: [], + response: v1ListsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1ListsRetrieve500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/lists/:list_id", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "list_id", description: ``, - requestFormat: "json", - parameters: [], - response: v1PotsRetrieveQueryResponseSchema, - errors: [], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/", + type: "Path", + schema: v1ListsRetrieve2PathParamsSchema.shape["list_id"], + }, + ], + response: v1ListsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `List not found`, + schema: v1ListsRetrieve2404Schema, + }, + { + status: 500, + description: `Internal server error`, + schema: v1ListsRetrieve2500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/lists/:list_id/registrations", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "list_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsRetrieve2PathParamsSchema.shape["pot_id"] - } - ], - response: v1PotsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsRetrieve2404Schema - } - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/applications", + type: "Path", + schema: v1ListsRegistrationsRetrievePathParamsSchema.shape["list_id"], + }, + ], + response: v1ListsRegistrationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `List not found`, + schema: v1ListsRegistrationsRetrieve404Schema, + }, + { + status: 500, + description: `Internal server error`, + schema: v1ListsRegistrationsRetrieve500Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/pots", + description: ``, + requestFormat: "json", + parameters: [], + response: v1PotsRetrieveQueryResponseSchema, + errors: [], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsApplicationsRetrievePathParamsSchema.shape["pot_id"] - } - ], - response: v1PotsApplicationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsApplicationsRetrieve404Schema - } - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/donations", + type: "Path", + schema: v1PotsRetrieve2PathParamsSchema.shape["pot_id"], + }, + ], + response: v1PotsRetrieve2QueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsRetrieve2404Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/applications", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsDonationsRetrievePathParamsSchema.shape["pot_id"] - } - ], - response: v1PotsDonationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsDonationsRetrieve404Schema - } - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/payouts", + type: "Path", + schema: v1PotsApplicationsRetrievePathParamsSchema.shape["pot_id"], + }, + ], + response: v1PotsApplicationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsApplicationsRetrieve404Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/donations", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsPayoutsRetrievePathParamsSchema.shape["pot_id"] - } - ], - response: v1PotsPayoutsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsPayoutsRetrieve404Schema - } - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/sponsors", + type: "Path", + schema: v1PotsDonationsRetrievePathParamsSchema.shape["pot_id"], + }, + ], + response: v1PotsDonationsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsDonationsRetrieve404Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/payouts", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsSponsorsRetrievePathParamsSchema.shape["pot_id"] - } - ], - response: v1PotsSponsorsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsSponsorsRetrieve404Schema - } - ], - }, - { - method: "get", - path: "/api/v1/stats", + type: "Path", + schema: v1PotsPayoutsRetrievePathParamsSchema.shape["pot_id"], + }, + ], + response: v1PotsPayoutsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsPayoutsRetrieve404Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/pots/:pot_id/sponsors", + description: ``, + requestFormat: "json", + parameters: [ + { + name: "pot_id", description: ``, - requestFormat: "json", - parameters: [], - response: v1StatsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1StatsRetrieve500Schema - } - ], - } + type: "Path", + schema: v1PotsSponsorsRetrievePathParamsSchema.shape["pot_id"], + }, + ], + response: v1PotsSponsorsRetrieveQueryResponseSchema, + errors: [ + { + status: 404, + description: `Pot not found`, + schema: v1PotsSponsorsRetrieve404Schema, + }, + ], + }, + { + method: "get", + path: "/api/v1/stats", + description: ``, + requestFormat: "json", + parameters: [], + response: v1StatsRetrieveQueryResponseSchema, + errors: [ + { + status: 500, + description: `Internal server error`, + schema: v1StatsRetrieve500Schema, + }, + ], + }, ]); export const getAPI = (baseUrl: string) => new Zodios(baseUrl, endpoints); export const api = new Zodios(endpoints); -export default api; \ No newline at end of file +export default api; diff --git a/src/common/contracts/social/index.ts b/src/common/contracts/social/index.ts index 980f485e..cdb8971e 100644 --- a/src/common/contracts/social/index.ts +++ b/src/common/contracts/social/index.ts @@ -9,7 +9,6 @@ import { naxiosInstance } from ".."; */ const nearSocialDbContractApi = naxiosInstance.contractApi({ contractId: SOCIAL_DB_CONTRACT_ID, - cache: new StorageCache({ expirationTime: 5 * 60 }), // 5 minutes }); @@ -128,29 +127,3 @@ export const getSocialProfile = async (input: { accountId: string }) => { return response[input.accountId]?.profile; }; - -// TODO: fix graph endoint fetch failer -export const getSocialData = async ({ - method, - args, -}: { - method: string; - args: NEARSocialUserProfileInput; -}) => { - const response = await nearSocialDbContractApi.view( - method, - args, - ); - - // const response = await nearSocialDbContractApi.view(method, { - // args: { - // keys: [`potlock.near/graph/follow/*`], - // options: { - // return_type: "BlockHeight", - // values_only: true, - // }, - // }, - // }); - - return response; -}; From 37f46e2f5aa1ecbb0e45e0d8e5e0a42026045f96 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Fri, 7 Jun 2024 01:14:28 +0400 Subject: [PATCH 06/84] Use SWR --- .eslintrc.json | 3 - .vscode/settings.json | 1 + kubb.config.ts | 13 +- package.json | 14 +- src/app/_layout/Nav.tsx | 2 +- src/app/_layout/RootProvider.tsx | 12 +- .../api/potlock/generated/hooks/index.ts | 14 + .../hooks/useV1AccountsActivePotsRetrieve.ts | 52 ++ .../generated/hooks/useV1AccountsRetrieve.ts | 48 ++ .../generated/hooks/useV1AccountsRetrieve2.ts | 48 ++ .../generated/hooks/useV1DonorsRetrieve.ts | 52 ++ .../hooks/useV1ListsRegistrationsRetrieve.ts | 48 ++ .../generated/hooks/useV1ListsRetrieve.ts | 48 ++ .../generated/hooks/useV1ListsRetrieve2.ts | 48 ++ .../hooks/useV1PotsApplicationsRetrieve.ts | 48 ++ .../hooks/useV1PotsDonationsRetrieve.ts | 48 ++ .../hooks/useV1PotsPayoutsRetrieve.ts | 48 ++ .../generated/hooks/useV1PotsRetrieve.ts | 48 ++ .../generated/hooks/useV1PotsRetrieve2.ts | 48 ++ .../hooks/useV1PotsSponsorsRetrieve.ts | 48 ++ .../generated/hooks/useV1StatsRetrieve.ts | 48 ++ src/common/api/potlock/generated/index.ts | 2 + .../api/potlock/generated/types/Account.ts | 28 + .../types/DefaultRegistrationStatusEnum.ts | 8 + .../api/potlock/generated/types/Donation.ts | 112 ++++ .../api/potlock/generated/types/List.ts | 53 ++ .../generated/types/ListRegistration.ts | 53 ++ src/common/api/potlock/generated/types/Pot.ts | 171 +++++++ .../potlock/generated/types/PotApplication.ts | 43 ++ .../types/PotApplicationStatusEnum.ts | 7 + .../api/potlock/generated/types/PotPayout.ts | 42 ++ .../potlock/generated/types/StatsResponse.ts | 22 + .../potlock/generated/types/StatusF24Enum.ts | 8 + .../types/V1AccountsActivePotsRetrieve.ts | 37 ++ .../generated/types/V1AccountsRetrieve.ts | 18 + .../generated/types/V1AccountsRetrieve2.ts | 29 ++ .../generated/types/V1DonorsRetrieve.ts | 26 + .../types/V1ListsRegistrationsRetrieve.ts | 29 ++ .../generated/types/V1ListsRetrieve.ts | 18 + .../generated/types/V1ListsRetrieve2.ts | 29 ++ .../types/V1PotsApplicationsRetrieve.ts | 25 + .../types/V1PotsDonationsRetrieve.ts | 25 + .../generated/types/V1PotsPayoutsRetrieve.ts | 25 + .../potlock/generated/types/V1PotsRetrieve.ts | 13 + .../generated/types/V1PotsRetrieve2.ts | 25 + .../generated/types/V1PotsSponsorsRetrieve.ts | 25 + .../generated/types/V1StatsRetrieve.ts | 18 + .../api/potlock/generated/types/index.ts | 25 + .../potlock/generated/zod/accountSchema.ts | 27 +- .../defaultRegistrationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/donationSchema.ts | 65 +-- src/common/api/potlock/generated/zod/index.ts | 2 +- .../generated/zod/listRegistrationSchema.ts | 34 +- .../api/potlock/generated/zod/listSchema.ts | 30 +- .../api/potlock/generated/zod/operations.ts | 484 ++++++++---------- .../generated/zod/potApplicationSchema.ts | 22 +- .../zod/potApplicationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/potPayoutSchema.ts | 17 +- .../api/potlock/generated/zod/potSchema.ts | 124 +---- .../generated/zod/statsResponseSchema.ts | 9 +- .../generated/zod/statusF24EnumSchema.ts | 8 +- .../zod/v1AccountsActivePotsRetrieveSchema.ts | 18 +- .../zod/v1AccountsRetrieve2Schema.ts | 10 +- .../generated/zod/v1AccountsRetrieveSchema.ts | 7 +- .../generated/zod/v1DonorsRetrieveSchema.ts | 15 +- .../zod/v1ListsRegistrationsRetrieveSchema.ts | 14 +- .../generated/zod/v1ListsRetrieve2Schema.ts | 8 +- .../generated/zod/v1ListsRetrieveSchema.ts | 7 +- .../zod/v1PotsApplicationsRetrieveSchema.ts | 14 +- .../zod/v1PotsDonationsRetrieveSchema.ts | 14 +- .../zod/v1PotsPayoutsRetrieveSchema.ts | 14 +- .../generated/zod/v1PotsRetrieve2Schema.ts | 6 +- .../generated/zod/v1PotsRetrieveSchema.ts | 7 +- .../zod/v1PotsSponsorsRetrieveSchema.ts | 14 +- .../generated/zod/v1StatsRetrieveSchema.ts | 7 +- src/common/api/potlock/generated/zodios.ts | 380 -------------- src/common/api/potlock/hooks.ts | 14 + src/common/api/potlock/index.ts | 21 +- src/common/api/potlock/types.ts | 13 + src/common/constants.ts | 7 +- src/common/hooks/useGetAccounts.ts | 13 - src/common/{hooks => lib}/useIsClient.ts | 0 src/modules/auth/providers/AuthProvider.tsx | 2 +- .../donation/components/DonationModal.tsx | 18 +- .../donation/components/DonationToAccount.tsx | 25 +- .../donation/components/DonationToPot.tsx | 19 +- yarn.lock | 151 ++---- 87 files changed, 1996 insertions(+), 1315 deletions(-) create mode 100644 src/common/api/potlock/generated/hooks/index.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts create mode 100644 src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/Account.ts create mode 100644 src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts create mode 100644 src/common/api/potlock/generated/types/Donation.ts create mode 100644 src/common/api/potlock/generated/types/List.ts create mode 100644 src/common/api/potlock/generated/types/ListRegistration.ts create mode 100644 src/common/api/potlock/generated/types/Pot.ts create mode 100644 src/common/api/potlock/generated/types/PotApplication.ts create mode 100644 src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts create mode 100644 src/common/api/potlock/generated/types/PotPayout.ts create mode 100644 src/common/api/potlock/generated/types/StatsResponse.ts create mode 100644 src/common/api/potlock/generated/types/StatusF24Enum.ts create mode 100644 src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1AccountsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/types/V1DonorsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1ListsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1ListsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsRetrieve2.ts create mode 100644 src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/V1StatsRetrieve.ts create mode 100644 src/common/api/potlock/generated/types/index.ts delete mode 100644 src/common/api/potlock/generated/zodios.ts create mode 100644 src/common/api/potlock/hooks.ts create mode 100644 src/common/api/potlock/types.ts delete mode 100644 src/common/hooks/useGetAccounts.ts rename src/common/{hooks => lib}/useIsClient.ts (100%) diff --git a/.eslintrc.json b/.eslintrc.json index 749f4720..87bd25b3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -11,15 +11,12 @@ "@typescript-eslint", "prettier", "import", - "@tanstack/query", "testing-library" ], "extends": [ "next/core-web-vitals", "eslint:recommended", "plugin:@typescript-eslint/recommended", - // Tanstack - "plugin:@tanstack/eslint-plugin-query/recommended", // configuration for "import" plugin "plugin:import/recommended", "plugin:import/typescript", diff --git a/.vscode/settings.json b/.vscode/settings.json index d8c9000b..9f0f25f1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ }, "cSpell.words": [ "bitget", + "camelcase", "colocation", "data-testid", "kubb", diff --git a/kubb.config.ts b/kubb.config.ts index dd1edeb1..09a450b5 100644 --- a/kubb.config.ts +++ b/kubb.config.ts @@ -1,26 +1,29 @@ import { defineConfig } from "@kubb/core"; import { pluginOas } from "@kubb/plugin-oas"; +import { pluginSwr } from "@kubb/swagger-swr"; +import { pluginTs } from "@kubb/swagger-ts"; import { pluginZod } from "@kubb/swagger-zod"; -import { pluginZodios } from "@kubb/swagger-zodios"; export default defineConfig({ - root: ".", + root: "./src/", input: { path: "https://dev.potlock.io/api/schema", }, output: { - path: "./src/common/api/potlock/generated", + path: "./common/api/potlock/generated", clean: true, }, plugins: [ pluginOas(), + pluginTs(), pluginZod(), - pluginZodios({ - output: { path: "./zodios.ts" }, + pluginSwr({ + output: { path: "./hooks", exportAs: "swrHooks" }, + parser: "zod", }), ], diff --git a/package.json b/package.json index c16fc557..5a25273e 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "generate:api": "kubb --config kubb.config.ts", "test:unit": "vitest run", "dev:test": "yarn && yarn generate:api && vitest watch", - "dev": "yarn && yarn generate:api && next dev", - "build": "yarn generate:api && next build", + "dev": "yarn && yarn generate:api; next dev", + "build": "yarn generate:api; next build", "start": "next start" }, "dependencies": { @@ -19,9 +19,12 @@ "@kubb/cli": "^2.19.5", "@kubb/core": "^2.19.5", "@kubb/plugin-oas": "^2.19.5", + "@kubb/react": "^2.19.5", "@kubb/swagger": "^2.19.5", + "@kubb/swagger-client": "^2.19.5", + "@kubb/swagger-swr": "^2.19.5", + "@kubb/swagger-ts": "^2.19.5", "@kubb/swagger-zod": "^2.19.5", - "@kubb/swagger-zodios": "^2.19.5", "@near-wallet-selector/bitget-wallet": "^8.9.5", "@near-wallet-selector/coin98-wallet": "^8.9.5", "@near-wallet-selector/here-wallet": "^8.9.5", @@ -57,11 +60,8 @@ "@rematch/immer": "^2.1.3", "@rematch/loading": "^2.1.2", "@rematch/persist": "^2.1.2", - "@tanstack/react-query": "^5.40.1", "@wpdas/naxios": "^2.1.0", "@zodios/core": "^10.9.6", - "@zodios/express": "^10.6.1", - "@zodios/react": "^10.4.5", "axios": "^1.7.2", "big.js": "^6.2.1", "class-variance-authority": "^0.7.0", @@ -76,12 +76,12 @@ "react-redux": "^9.1.2", "redux": "^5.0.1", "sass": "^1.77.2", + "swr": "^2.2.5", "tailwind-merge": "^2.3.0", "tailwindcss-animate": "^1.0.7", "zod": "^3.23.8" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.35.6", "@testing-library/react": "^15.0.7", "@types/big.js": "^6.2.2", "@types/node": "^20", diff --git a/src/app/_layout/Nav.tsx b/src/app/_layout/Nav.tsx index 4d344eac..761bbb09 100644 --- a/src/app/_layout/Nav.tsx +++ b/src/app/_layout/Nav.tsx @@ -7,7 +7,7 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; import { walletApi } from "@/common/contracts"; -import useIsClient from "@/common/hooks/useIsClient"; +import useIsClient from "@/common/lib/useIsClient"; import { Button } from "@/common/ui/components/button"; import { useAuth } from "@/modules/auth/hooks/useAuth"; import routesPath from "@/modules/core/routes"; diff --git a/src/app/_layout/RootProvider.tsx b/src/app/_layout/RootProvider.tsx index cb237c7f..709cba66 100644 --- a/src/app/_layout/RootProvider.tsx +++ b/src/app/_layout/RootProvider.tsx @@ -1,23 +1,17 @@ "use client"; import { Provider as NiceModalProvider } from "@ebay/nice-modal-react"; -import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { Provider as ReduxProvider } from "react-redux"; import { store } from "@/app/_store"; import { AuthProvider } from "@/modules/auth/providers/AuthProvider"; -// react-query -const queryClient = new QueryClient(); - const Providers = ({ children }: { children: React.ReactNode }) => { return ( - - - {children} - - + + {children} + ); }; diff --git a/src/common/api/potlock/generated/hooks/index.ts b/src/common/api/potlock/generated/hooks/index.ts new file mode 100644 index 00000000..5e2d3004 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/index.ts @@ -0,0 +1,14 @@ +export * from "./useV1AccountsActivePotsRetrieve"; +export * from "./useV1AccountsRetrieve"; +export * from "./useV1AccountsRetrieve2"; +export * from "./useV1DonorsRetrieve"; +export * from "./useV1ListsRegistrationsRetrieve"; +export * from "./useV1ListsRetrieve"; +export * from "./useV1ListsRetrieve2"; +export * from "./useV1PotsApplicationsRetrieve"; +export * from "./useV1PotsDonationsRetrieve"; +export * from "./useV1PotsPayoutsRetrieve"; +export * from "./useV1PotsRetrieve"; +export * from "./useV1PotsRetrieve2"; +export * from "./useV1PotsSponsorsRetrieve"; +export * from "./useV1StatsRetrieve"; \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts new file mode 100644 index 00000000..919ed0cc --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts @@ -0,0 +1,52 @@ +import { v1AccountsActivePotsRetrieveQueryResponseSchema } from "../zod/v1AccountsActivePotsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1AccountsActivePotsRetrieveQueryResponse, V1AccountsActivePotsRetrievePathParams, V1AccountsActivePotsRetrieveQueryParams, V1AccountsActivePotsRetrieve404, V1AccountsActivePotsRetrieve500 } from "../types/V1AccountsActivePotsRetrieve"; + + type V1AccountsActivePotsRetrieveClient = typeof client; +type V1AccountsActivePotsRetrieve = { + data: V1AccountsActivePotsRetrieveQueryResponse; + error: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; + request: never; + pathParams: V1AccountsActivePotsRetrievePathParams; + queryParams: V1AccountsActivePotsRetrieveQueryParams; + headerParams: never; + response: V1AccountsActivePotsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1AccountsActivePotsRetrieveQueryOptions(accountId: V1AccountsActivePotsRetrievePathParams["account_id"], params?: V1AccountsActivePotsRetrieve["queryParams"], options: V1AccountsActivePotsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts/${accountId}/active_pots`, + params, + ...options + }); + return v1AccountsActivePotsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/accounts/:account_id/active_pots + */ +export function useV1AccountsActivePotsRetrieve(accountId: V1AccountsActivePotsRetrievePathParams["account_id"], params?: V1AccountsActivePotsRetrieve["queryParams"], options?: { + query?: SWRConfiguration; + client?: V1AccountsActivePotsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/accounts/${accountId}/active_pots`; + const query = useSWR(shouldFetch ? [url, params] : null, { + ...v1AccountsActivePotsRetrieveQueryOptions(accountId, params, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts new file mode 100644 index 00000000..c544f965 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1AccountsRetrieveQueryResponseSchema } from "../zod/v1AccountsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1AccountsRetrieveQueryResponse, V1AccountsRetrieve500 } from "../types/V1AccountsRetrieve"; + + type V1AccountsRetrieveClient = typeof client; +type V1AccountsRetrieve = { + data: V1AccountsRetrieveQueryResponse; + error: V1AccountsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1AccountsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1AccountsRetrieveQueryOptions(options: V1AccountsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts`, + ...options + }); + return v1AccountsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/accounts + */ +export function useV1AccountsRetrieve(options?: { + query?: SWRConfiguration; + client?: V1AccountsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/accounts`; + const query = useSWR(shouldFetch ? url : null, { + ...v1AccountsRetrieveQueryOptions(clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts new file mode 100644 index 00000000..be5943db --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts @@ -0,0 +1,48 @@ +import { v1AccountsRetrieve2QueryResponseSchema } from "../zod/v1AccountsRetrieve2Schema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1AccountsRetrieve2QueryResponse, V1AccountsRetrieve2PathParams, V1AccountsRetrieve2404, V1AccountsRetrieve2500 } from "../types/V1AccountsRetrieve2"; + + type V1AccountsRetrieve2Client = typeof client; +type V1AccountsRetrieve2 = { + data: V1AccountsRetrieve2QueryResponse; + error: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; + request: never; + pathParams: V1AccountsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1AccountsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1AccountsRetrieve2QueryOptions(accountId: V1AccountsRetrieve2PathParams["account_id"], options: V1AccountsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts/${accountId}`, + ...options + }); + return v1AccountsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/accounts/:account_id + */ +export function useV1AccountsRetrieve2(accountId: V1AccountsRetrieve2PathParams["account_id"], options?: { + query?: SWRConfiguration; + client?: V1AccountsRetrieve2["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/accounts/${accountId}`; + const query = useSWR(shouldFetch ? url : null, { + ...v1AccountsRetrieve2QueryOptions(accountId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts new file mode 100644 index 00000000..17b7ce0d --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts @@ -0,0 +1,52 @@ +import { v1DonorsRetrieveQueryResponseSchema } from "../zod/v1DonorsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1DonorsRetrieveQueryResponse, V1DonorsRetrieveQueryParams, V1DonorsRetrieve500 } from "../types/V1DonorsRetrieve"; + + type V1DonorsRetrieveClient = typeof client; +type V1DonorsRetrieve = { + data: V1DonorsRetrieveQueryResponse; + error: V1DonorsRetrieve500; + request: never; + pathParams: never; + queryParams: V1DonorsRetrieveQueryParams; + headerParams: never; + response: V1DonorsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1DonorsRetrieveQueryOptions(params?: V1DonorsRetrieve["queryParams"], options: V1DonorsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/donors`, + params, + ...options + }); + return v1DonorsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/donors + */ +export function useV1DonorsRetrieve(params?: V1DonorsRetrieve["queryParams"], options?: { + query?: SWRConfiguration; + client?: V1DonorsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/donors`; + const query = useSWR(shouldFetch ? [url, params] : null, { + ...v1DonorsRetrieveQueryOptions(params, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts new file mode 100644 index 00000000..0294fcf6 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1ListsRegistrationsRetrieveQueryResponseSchema } from "../zod/v1ListsRegistrationsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1ListsRegistrationsRetrieveQueryResponse, V1ListsRegistrationsRetrievePathParams, V1ListsRegistrationsRetrieve404, V1ListsRegistrationsRetrieve500 } from "../types/V1ListsRegistrationsRetrieve"; + + type V1ListsRegistrationsRetrieveClient = typeof client; +type V1ListsRegistrationsRetrieve = { + data: V1ListsRegistrationsRetrieveQueryResponse; + error: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; + request: never; + pathParams: V1ListsRegistrationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1ListsRegistrationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1ListsRegistrationsRetrieveQueryOptions(listId: V1ListsRegistrationsRetrievePathParams["list_id"], options: V1ListsRegistrationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists/${listId}/registrations`, + ...options + }); + return v1ListsRegistrationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/lists/:list_id/registrations + */ +export function useV1ListsRegistrationsRetrieve(listId: V1ListsRegistrationsRetrievePathParams["list_id"], options?: { + query?: SWRConfiguration; + client?: V1ListsRegistrationsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/lists/${listId}/registrations`; + const query = useSWR(shouldFetch ? url : null, { + ...v1ListsRegistrationsRetrieveQueryOptions(listId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts new file mode 100644 index 00000000..4e359141 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1ListsRetrieveQueryResponseSchema } from "../zod/v1ListsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1ListsRetrieveQueryResponse, V1ListsRetrieve500 } from "../types/V1ListsRetrieve"; + + type V1ListsRetrieveClient = typeof client; +type V1ListsRetrieve = { + data: V1ListsRetrieveQueryResponse; + error: V1ListsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1ListsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1ListsRetrieveQueryOptions(options: V1ListsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists`, + ...options + }); + return v1ListsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/lists + */ +export function useV1ListsRetrieve(options?: { + query?: SWRConfiguration; + client?: V1ListsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/lists`; + const query = useSWR(shouldFetch ? url : null, { + ...v1ListsRetrieveQueryOptions(clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts new file mode 100644 index 00000000..bad7706e --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts @@ -0,0 +1,48 @@ +import { v1ListsRetrieve2QueryResponseSchema } from "../zod/v1ListsRetrieve2Schema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1ListsRetrieve2QueryResponse, V1ListsRetrieve2PathParams, V1ListsRetrieve2404, V1ListsRetrieve2500 } from "../types/V1ListsRetrieve2"; + + type V1ListsRetrieve2Client = typeof client; +type V1ListsRetrieve2 = { + data: V1ListsRetrieve2QueryResponse; + error: V1ListsRetrieve2404 | V1ListsRetrieve2500; + request: never; + pathParams: V1ListsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1ListsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1ListsRetrieve2QueryOptions(listId: V1ListsRetrieve2PathParams["list_id"], options: V1ListsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists/${listId}`, + ...options + }); + return v1ListsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/lists/:list_id + */ +export function useV1ListsRetrieve2(listId: V1ListsRetrieve2PathParams["list_id"], options?: { + query?: SWRConfiguration; + client?: V1ListsRetrieve2["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/lists/${listId}`; + const query = useSWR(shouldFetch ? url : null, { + ...v1ListsRetrieve2QueryOptions(listId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts new file mode 100644 index 00000000..3e56aa9d --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1PotsApplicationsRetrieveQueryResponseSchema } from "../zod/v1PotsApplicationsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsApplicationsRetrieveQueryResponse, V1PotsApplicationsRetrievePathParams, V1PotsApplicationsRetrieve404 } from "../types/V1PotsApplicationsRetrieve"; + + type V1PotsApplicationsRetrieveClient = typeof client; +type V1PotsApplicationsRetrieve = { + data: V1PotsApplicationsRetrieveQueryResponse; + error: V1PotsApplicationsRetrieve404; + request: never; + pathParams: V1PotsApplicationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsApplicationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsApplicationsRetrieveQueryOptions(potId: V1PotsApplicationsRetrievePathParams["pot_id"], options: V1PotsApplicationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/applications`, + ...options + }); + return v1PotsApplicationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots/:pot_id/applications + */ +export function useV1PotsApplicationsRetrieve(potId: V1PotsApplicationsRetrievePathParams["pot_id"], options?: { + query?: SWRConfiguration; + client?: V1PotsApplicationsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots/${potId}/applications`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsApplicationsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts new file mode 100644 index 00000000..16ce675f --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1PotsDonationsRetrieveQueryResponseSchema } from "../zod/v1PotsDonationsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsDonationsRetrieveQueryResponse, V1PotsDonationsRetrievePathParams, V1PotsDonationsRetrieve404 } from "../types/V1PotsDonationsRetrieve"; + + type V1PotsDonationsRetrieveClient = typeof client; +type V1PotsDonationsRetrieve = { + data: V1PotsDonationsRetrieveQueryResponse; + error: V1PotsDonationsRetrieve404; + request: never; + pathParams: V1PotsDonationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsDonationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsDonationsRetrieveQueryOptions(potId: V1PotsDonationsRetrievePathParams["pot_id"], options: V1PotsDonationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/donations`, + ...options + }); + return v1PotsDonationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots/:pot_id/donations + */ +export function useV1PotsDonationsRetrieve(potId: V1PotsDonationsRetrievePathParams["pot_id"], options?: { + query?: SWRConfiguration; + client?: V1PotsDonationsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots/${potId}/donations`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsDonationsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts new file mode 100644 index 00000000..7c78bb38 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1PotsPayoutsRetrieveQueryResponseSchema } from "../zod/v1PotsPayoutsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsPayoutsRetrieveQueryResponse, V1PotsPayoutsRetrievePathParams, V1PotsPayoutsRetrieve404 } from "../types/V1PotsPayoutsRetrieve"; + + type V1PotsPayoutsRetrieveClient = typeof client; +type V1PotsPayoutsRetrieve = { + data: V1PotsPayoutsRetrieveQueryResponse; + error: V1PotsPayoutsRetrieve404; + request: never; + pathParams: V1PotsPayoutsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsPayoutsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsPayoutsRetrieveQueryOptions(potId: V1PotsPayoutsRetrievePathParams["pot_id"], options: V1PotsPayoutsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/payouts`, + ...options + }); + return v1PotsPayoutsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots/:pot_id/payouts + */ +export function useV1PotsPayoutsRetrieve(potId: V1PotsPayoutsRetrievePathParams["pot_id"], options?: { + query?: SWRConfiguration; + client?: V1PotsPayoutsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots/${potId}/payouts`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsPayoutsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts new file mode 100644 index 00000000..be06c39b --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1PotsRetrieveQueryResponseSchema } from "../zod/v1PotsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsRetrieveQueryResponse } from "../types/V1PotsRetrieve"; + + type V1PotsRetrieveClient = typeof client; +type V1PotsRetrieve = { + data: V1PotsRetrieveQueryResponse; + error: never; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1PotsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsRetrieveQueryOptions(options: V1PotsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots`, + ...options + }); + return v1PotsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots + */ +export function useV1PotsRetrieve(options?: { + query?: SWRConfiguration; + client?: V1PotsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsRetrieveQueryOptions(clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts new file mode 100644 index 00000000..f3274012 --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts @@ -0,0 +1,48 @@ +import { v1PotsRetrieve2QueryResponseSchema } from "../zod/v1PotsRetrieve2Schema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsRetrieve2QueryResponse, V1PotsRetrieve2PathParams, V1PotsRetrieve2404 } from "../types/V1PotsRetrieve2"; + + type V1PotsRetrieve2Client = typeof client; +type V1PotsRetrieve2 = { + data: V1PotsRetrieve2QueryResponse; + error: V1PotsRetrieve2404; + request: never; + pathParams: V1PotsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1PotsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsRetrieve2QueryOptions(potId: V1PotsRetrieve2PathParams["pot_id"], options: V1PotsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/`, + ...options + }); + return v1PotsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots/:pot_id/ + */ +export function useV1PotsRetrieve2(potId: V1PotsRetrieve2PathParams["pot_id"], options?: { + query?: SWRConfiguration; + client?: V1PotsRetrieve2["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots/${potId}/`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsRetrieve2QueryOptions(potId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts new file mode 100644 index 00000000..22bdeacc --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1PotsSponsorsRetrieveQueryResponseSchema } from "../zod/v1PotsSponsorsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1PotsSponsorsRetrieveQueryResponse, V1PotsSponsorsRetrievePathParams, V1PotsSponsorsRetrieve404 } from "../types/V1PotsSponsorsRetrieve"; + + type V1PotsSponsorsRetrieveClient = typeof client; +type V1PotsSponsorsRetrieve = { + data: V1PotsSponsorsRetrieveQueryResponse; + error: V1PotsSponsorsRetrieve404; + request: never; + pathParams: V1PotsSponsorsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsSponsorsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1PotsSponsorsRetrieveQueryOptions(potId: V1PotsSponsorsRetrievePathParams["pot_id"], options: V1PotsSponsorsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/sponsors`, + ...options + }); + return v1PotsSponsorsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/pots/:pot_id/sponsors + */ +export function useV1PotsSponsorsRetrieve(potId: V1PotsSponsorsRetrievePathParams["pot_id"], options?: { + query?: SWRConfiguration; + client?: V1PotsSponsorsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/pots/${potId}/sponsors`; + const query = useSWR(shouldFetch ? url : null, { + ...v1PotsSponsorsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts new file mode 100644 index 00000000..f995ef8e --- /dev/null +++ b/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts @@ -0,0 +1,48 @@ +import { v1StatsRetrieveQueryResponseSchema } from "../zod/v1StatsRetrieveSchema"; +import useSWR from "swr"; +import client from "@kubb/swagger-client/client"; +import type { SWRConfiguration, SWRResponse } from "swr"; +import type { V1StatsRetrieveQueryResponse, V1StatsRetrieve500 } from "../types/V1StatsRetrieve"; + + type V1StatsRetrieveClient = typeof client; +type V1StatsRetrieve = { + data: V1StatsRetrieveQueryResponse; + error: V1StatsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1StatsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; +}; +export function v1StatsRetrieveQueryOptions(options: V1StatsRetrieve["client"]["parameters"] = {}): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/stats`, + ...options + }); + return v1StatsRetrieveQueryResponseSchema.parse(res.data); + }, + }; +} +/** + * @link /api/v1/stats + */ +export function useV1StatsRetrieve(options?: { + query?: SWRConfiguration; + client?: V1StatsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; +}): SWRResponse { + const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; + const url = `/api/v1/stats`; + const query = useSWR(shouldFetch ? url : null, { + ...v1StatsRetrieveQueryOptions(clientOptions), + ...queryOptions + }); + return query; +} \ No newline at end of file diff --git a/src/common/api/potlock/generated/index.ts b/src/common/api/potlock/generated/index.ts index a1edf4e1..17f30af5 100644 --- a/src/common/api/potlock/generated/index.ts +++ b/src/common/api/potlock/generated/index.ts @@ -1 +1,3 @@ +export * from "./types/index"; export * from "./zod/index"; +export * as swrHooks from "./hooks/index"; diff --git a/src/common/api/potlock/generated/types/Account.ts b/src/common/api/potlock/generated/types/Account.ts new file mode 100644 index 00000000..caf8fbaf --- /dev/null +++ b/src/common/api/potlock/generated/types/Account.ts @@ -0,0 +1,28 @@ +export type Account = { + /** + * @description On-chain account address. + * @type string + */ + id: string; + /** + * @description Total donations received in USD. + * @type string | undefined, decimal + */ + total_donations_in_usd?: string; + /** + * @description Total donated in USD. + * @type string | undefined, decimal + */ + total_donations_out_usd?: string; + /** + * @description Total matching pool allocations in USD. + * @type string | undefined, decimal + */ + total_matching_pool_allocations_usd?: string; + /** + * @description Number of donors. + * @type integer | undefined + */ + donors_count?: number; + near_social_profile_data?: any; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts b/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts new file mode 100644 index 00000000..229e0fca --- /dev/null +++ b/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts @@ -0,0 +1,8 @@ +export const defaultRegistrationStatusEnum = { + "Pending": "Pending", + "Approved": "Approved", + "Rejected": "Rejected", + "Graylisted": "Graylisted", + "Blacklisted": "Blacklisted" +} as const; +export type DefaultRegistrationStatusEnum = (typeof defaultRegistrationStatusEnum)[keyof typeof defaultRegistrationStatusEnum]; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/Donation.ts b/src/common/api/potlock/generated/types/Donation.ts new file mode 100644 index 00000000..582582fd --- /dev/null +++ b/src/common/api/potlock/generated/types/Donation.ts @@ -0,0 +1,112 @@ +export type Donation = { + /** + * @description Donation id. + * @type integer + */ + readonly id: number; + /** + * @description Donation id in contract + * @type integer + */ + on_chain_id: number; + /** + * @description Total amount. + * @type string + */ + total_amount: string; + /** + * @description Total amount in USD. + * @type string, decimal + */ + total_amount_usd?: string | null; + /** + * @description Net amount. + * @type string + */ + net_amount: string; + /** + * @description Net amount in USD. + * @type string, decimal + */ + net_amount_usd?: string | null; + /** + * @description Matching pool. + * @type boolean + */ + matching_pool: boolean; + /** + * @description Donation message. + * @type string + */ + message?: string | null; + /** + * @description Donation date. + * @type string, date-time + */ + donated_at: string; + /** + * @description Protocol fee. + * @type string + */ + protocol_fee: string; + /** + * @description Protocol fee in USD. + * @type string, decimal + */ + protocol_fee_usd?: string | null; + /** + * @description Referrer fee. + * @type string + */ + referrer_fee?: string | null; + /** + * @description Referrer fee in USD. + * @type string, decimal + */ + referrer_fee_usd?: string | null; + /** + * @description Chef fee. + * @type string + */ + chef_fee?: string | null; + /** + * @description Chef fee in USD. + * @type string, decimal + */ + chef_fee_usd?: string | null; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Donor. + * @type string + */ + donor: string; + /** + * @description Donation FT. + * @type string + */ + ft: string; + /** + * @description Donation pot. + * @type string + */ + pot: string | null; + /** + * @description Donation recipient. + * @type string + */ + recipient?: string | null; + /** + * @description Donation referrer. + * @type string + */ + referrer?: string | null; + /** + * @description Donation chef. + * @type string + */ + chef?: string | null; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/List.ts b/src/common/api/potlock/generated/types/List.ts new file mode 100644 index 00000000..9ef6a664 --- /dev/null +++ b/src/common/api/potlock/generated/types/List.ts @@ -0,0 +1,53 @@ +import { DefaultRegistrationStatusEnum } from "./DefaultRegistrationStatusEnum"; + + export type List = { + /** + * @description List id. + * @type integer + */ + id: number; + /** + * @description List name. + * @type string + */ + name: string; + /** + * @description List description. + * @type string + */ + description?: string | null; + /** + * @description Cover image url. + * @type string, uri + */ + cover_image_url?: string | null; + /** + * @description Admin only registrations. + * @type boolean + */ + admin_only_registrations: boolean; + /** + * @description Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ + default_registration_status: DefaultRegistrationStatusEnum; + /** + * @description List creation date. + * @type string, date-time + */ + created_at: string; + /** + * @description List last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description List owner. + * @type string + */ + owner: string; + /** + * @description List admins. + * @type array + */ + admins: string[]; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/ListRegistration.ts b/src/common/api/potlock/generated/types/ListRegistration.ts new file mode 100644 index 00000000..751e84d8 --- /dev/null +++ b/src/common/api/potlock/generated/types/ListRegistration.ts @@ -0,0 +1,53 @@ +import { StatusF24Enum } from "./StatusF24Enum"; + + export type ListRegistration = { + /** + * @description Registration id. + * @type integer + */ + readonly id: number; + /** + * @description Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ + status: StatusF24Enum; + /** + * @description Registration submission date. + * @type string, date-time + */ + submitted_at: string; + /** + * @description Registration last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description Registrant notes. + * @type string + */ + registrant_notes?: string | null; + /** + * @description Admin notes. + * @type string + */ + admin_notes?: string | null; + /** + * @description Transaction hash. + * @type string + */ + tx_hash?: string | null; + /** + * @description List registered. + * @type integer + */ + list: number; + /** + * @description Account that registered on the list. + * @type string + */ + registrant: string; + /** + * @description Account that did the registration. + * @type string + */ + registered_by: string; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/Pot.ts b/src/common/api/potlock/generated/types/Pot.ts new file mode 100644 index 00000000..b1932261 --- /dev/null +++ b/src/common/api/potlock/generated/types/Pot.ts @@ -0,0 +1,171 @@ +export type Pot = { + /** + * @description Pot account ID. + * @type string + */ + id: string; + /** + * @description Pot factory. + * @type string + */ + pot_factory: string; + /** + * @description Pot deployer. + * @type string + */ + deployer: string; + /** + * @description Pot deployment date. + * @type string, date-time + */ + deployed_at: string; + source_metadata: any; + /** + * @description Pot owner. + * @type string + */ + owner: string; + /** + * @description Pot admins. + * @type array + */ + admins: string[]; + /** + * @description Pot chef. + * @type string + */ + chef?: string | null; + /** + * @description Pot name. + * @type string + */ + name: string; + /** + * @description Pot description. + * @type string + */ + description: string; + /** + * @description Max approved applicants. + * @type integer + */ + max_approved_applicants: number; + /** + * @description Base currency. + * @type string + */ + base_currency?: string | null; + /** + * @description Pot application start date. + * @type string, date-time + */ + application_start: string; + /** + * @description Pot application end date. + * @type string, date-time + */ + application_end: string; + /** + * @description Pot matching round start date. + * @type string, date-time + */ + matching_round_start: string; + /** + * @description Pot matching round end date. + * @type string, date-time + */ + matching_round_end: string; + /** + * @description Registry provider. + * @type string + */ + registry_provider?: string | null; + /** + * @description Min matching pool donation amount. + * @type string + */ + min_matching_pool_donation_amount: string; + /** + * @description Sybil wrapper provider. + * @type string + */ + sybil_wrapper_provider?: string | null; + /** + * @description Custom sybil checks. + * @type string + */ + custom_sybil_checks?: string | null; + /** + * @description Custom min threshold score. + * @type integer + */ + custom_min_threshold_score?: number | null; + /** + * @description Referral fee matching pool basis points. + * @type integer + */ + referral_fee_matching_pool_basis_points: number; + /** + * @description Referral fee public round basis points. + * @type integer + */ + referral_fee_public_round_basis_points: number; + /** + * @description Chef fee basis points. + * @type integer + */ + chef_fee_basis_points: number; + /** + * @description Total matching pool. + * @type string + */ + total_matching_pool: string; + /** + * @type string, decimal + */ + total_matching_pool_usd: string; + /** + * @description Matching pool balance. + * @type string + */ + matching_pool_balance: string; + /** + * @description Matching pool donations count. + * @type integer + */ + matching_pool_donations_count: number; + /** + * @description Total public donations. + * @type string + */ + total_public_donations: string; + /** + * @type string, decimal + */ + total_public_donations_usd: string; + /** + * @description Public donations count. + * @type integer + */ + public_donations_count: number; + /** + * @description Pot cooldown end date. + * @type string, date-time + */ + cooldown_end?: string | null; + /** + * @description Pot cooldown period in ms. + * @type integer + */ + cooldown_period_ms?: number | null; + /** + * @description All paid out. + * @type boolean + */ + all_paid_out: boolean; + /** + * @description Protocol config provider. + * @type string + */ + protocol_config_provider?: string | null; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/PotApplication.ts b/src/common/api/potlock/generated/types/PotApplication.ts new file mode 100644 index 00000000..3aeb4a06 --- /dev/null +++ b/src/common/api/potlock/generated/types/PotApplication.ts @@ -0,0 +1,43 @@ +import { PotApplicationStatusEnum } from "./PotApplicationStatusEnum"; + + export type PotApplication = { + /** + * @description Application id. + * @type integer + */ + readonly id: number; + /** + * @description Application message. + * @type string + */ + message?: string | null; + /** + * @description Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview + */ + status: PotApplicationStatusEnum; + /** + * @description Application submission date. + * @type string, date-time + */ + submitted_at: string; + /** + * @description Application last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Pot applied to. + * @type string + */ + pot: string; + /** + * @description Account that applied to the pot. + * @type string + */ + applicant: string; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts b/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts new file mode 100644 index 00000000..c354db62 --- /dev/null +++ b/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts @@ -0,0 +1,7 @@ +export const potApplicationStatusEnum = { + "Pending": "Pending", + "Approved": "Approved", + "Rejected": "Rejected", + "InReview": "InReview" +} as const; +export type PotApplicationStatusEnum = (typeof potApplicationStatusEnum)[keyof typeof potApplicationStatusEnum]; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/PotPayout.ts b/src/common/api/potlock/generated/types/PotPayout.ts new file mode 100644 index 00000000..8da1ebbf --- /dev/null +++ b/src/common/api/potlock/generated/types/PotPayout.ts @@ -0,0 +1,42 @@ +export type PotPayout = { + /** + * @description Payout id. + * @type integer + */ + readonly id: number; + /** + * @description Payout amount. + * @type string + */ + amount: string; + /** + * @description Payout amount in USD. + * @type string, decimal + */ + amount_paid_usd?: string | null; + /** + * @description Payout date. + * @type string, date-time + */ + paid_at: string; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Pot that this payout is for. + * @type string + */ + pot: string; + /** + * @description Payout recipient. + * @type string + */ + recipient: string; + /** + * @description Payout FT. + * @type string + */ + ft: string; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/StatsResponse.ts b/src/common/api/potlock/generated/types/StatsResponse.ts new file mode 100644 index 00000000..e356db58 --- /dev/null +++ b/src/common/api/potlock/generated/types/StatsResponse.ts @@ -0,0 +1,22 @@ +export type StatsResponse = { + /** + * @type number, double + */ + total_donations_usd: number; + /** + * @type number, double + */ + total_payouts_usd: number; + /** + * @type integer + */ + total_donations_count: number; + /** + * @type integer + */ + total_donors_count: number; + /** + * @type integer + */ + total_recipients_count: number; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/StatusF24Enum.ts b/src/common/api/potlock/generated/types/StatusF24Enum.ts new file mode 100644 index 00000000..ba36df1c --- /dev/null +++ b/src/common/api/potlock/generated/types/StatusF24Enum.ts @@ -0,0 +1,8 @@ +export const statusF24Enum = { + "Pending": "Pending", + "Approved": "Approved", + "Rejected": "Rejected", + "Graylisted": "Graylisted", + "Blacklisted": "Blacklisted" +} as const; +export type StatusF24Enum = (typeof statusF24Enum)[keyof typeof statusF24Enum]; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts b/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts new file mode 100644 index 00000000..8c9326e4 --- /dev/null +++ b/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts @@ -0,0 +1,37 @@ +import type { Pot } from "./Pot"; + + export type V1AccountsActivePotsRetrievePathParams = { + /** + * @type string + */ + account_id: string; +}; +export type V1AccountsActivePotsRetrieveQueryParams = { + /** + * @description Filter by pot status + * @type string | undefined + */ + status?: string; +}; +/** + * @description Returns paginated active pots for the account +*/ +export type V1AccountsActivePotsRetrieve200 = Pot[]; +/** + * @description Account not found +*/ +export type V1AccountsActivePotsRetrieve404 = any; +/** + * @description Internal server error +*/ +export type V1AccountsActivePotsRetrieve500 = any; +/** + * @description Returns paginated active pots for the account +*/ +export type V1AccountsActivePotsRetrieveQueryResponse = Pot[]; +export type V1AccountsActivePotsRetrieveQuery = { + Response: V1AccountsActivePotsRetrieveQueryResponse; + PathParams: V1AccountsActivePotsRetrievePathParams; + QueryParams: V1AccountsActivePotsRetrieveQueryParams; + Errors: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts b/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts new file mode 100644 index 00000000..e2970a4b --- /dev/null +++ b/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts @@ -0,0 +1,18 @@ +import type { Account } from "./Account"; + + /** + * @description Returns a list of accounts +*/ +export type V1AccountsRetrieve200 = Account[]; +/** + * @description Internal server error +*/ +export type V1AccountsRetrieve500 = any; +/** + * @description Returns a list of accounts +*/ +export type V1AccountsRetrieveQueryResponse = Account[]; +export type V1AccountsRetrieveQuery = { + Response: V1AccountsRetrieveQueryResponse; + Errors: V1AccountsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts b/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts new file mode 100644 index 00000000..1fbe0e8d --- /dev/null +++ b/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts @@ -0,0 +1,29 @@ +import type { Account } from "./Account"; + + export type V1AccountsRetrieve2PathParams = { + /** + * @type string + */ + account_id: string; +}; +/** + * @description Returns account details +*/ +export type V1AccountsRetrieve2200 = Account; +/** + * @description Account not found +*/ +export type V1AccountsRetrieve2404 = any; +/** + * @description Internal server error +*/ +export type V1AccountsRetrieve2500 = any; +/** + * @description Returns account details +*/ +export type V1AccountsRetrieve2QueryResponse = Account; +export type V1AccountsRetrieve2Query = { + Response: V1AccountsRetrieve2QueryResponse; + PathParams: V1AccountsRetrieve2PathParams; + Errors: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts b/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts new file mode 100644 index 00000000..edcf4b34 --- /dev/null +++ b/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts @@ -0,0 +1,26 @@ +import type { Account } from "./Account"; + + export type V1DonorsRetrieveQueryParams = { + /** + * @description Sort by field, e.g., most_donated_usd + * @type string | undefined + */ + sort?: string; +}; +/** + * @description Returns a list of donor accounts +*/ +export type V1DonorsRetrieve200 = Account[]; +/** + * @description Internal server error +*/ +export type V1DonorsRetrieve500 = any; +/** + * @description Returns a list of donor accounts +*/ +export type V1DonorsRetrieveQueryResponse = Account[]; +export type V1DonorsRetrieveQuery = { + Response: V1DonorsRetrieveQueryResponse; + QueryParams: V1DonorsRetrieveQueryParams; + Errors: V1DonorsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts b/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts new file mode 100644 index 00000000..440d6ce7 --- /dev/null +++ b/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts @@ -0,0 +1,29 @@ +import type { ListRegistration } from "./ListRegistration"; + + export type V1ListsRegistrationsRetrievePathParams = { + /** + * @type integer + */ + list_id: number; +}; +/** + * @description Returns registrations for the list +*/ +export type V1ListsRegistrationsRetrieve200 = ListRegistration[]; +/** + * @description List not found +*/ +export type V1ListsRegistrationsRetrieve404 = any; +/** + * @description Internal server error +*/ +export type V1ListsRegistrationsRetrieve500 = any; +/** + * @description Returns registrations for the list +*/ +export type V1ListsRegistrationsRetrieveQueryResponse = ListRegistration[]; +export type V1ListsRegistrationsRetrieveQuery = { + Response: V1ListsRegistrationsRetrieveQueryResponse; + PathParams: V1ListsRegistrationsRetrievePathParams; + Errors: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1ListsRetrieve.ts b/src/common/api/potlock/generated/types/V1ListsRetrieve.ts new file mode 100644 index 00000000..d9ef728c --- /dev/null +++ b/src/common/api/potlock/generated/types/V1ListsRetrieve.ts @@ -0,0 +1,18 @@ +import type { List } from "./List"; + + /** + * @description Returns a list of lists +*/ +export type V1ListsRetrieve200 = List[]; +/** + * @description Internal server error +*/ +export type V1ListsRetrieve500 = any; +/** + * @description Returns a list of lists +*/ +export type V1ListsRetrieveQueryResponse = List[]; +export type V1ListsRetrieveQuery = { + Response: V1ListsRetrieveQueryResponse; + Errors: V1ListsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts b/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts new file mode 100644 index 00000000..ef1aa84b --- /dev/null +++ b/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts @@ -0,0 +1,29 @@ +import type { List } from "./List"; + + export type V1ListsRetrieve2PathParams = { + /** + * @type integer + */ + list_id: number; +}; +/** + * @description Returns list details +*/ +export type V1ListsRetrieve2200 = List; +/** + * @description List not found +*/ +export type V1ListsRetrieve2404 = any; +/** + * @description Internal server error +*/ +export type V1ListsRetrieve2500 = any; +/** + * @description Returns list details +*/ +export type V1ListsRetrieve2QueryResponse = List; +export type V1ListsRetrieve2Query = { + Response: V1ListsRetrieve2QueryResponse; + PathParams: V1ListsRetrieve2PathParams; + Errors: V1ListsRetrieve2404 | V1ListsRetrieve2500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts new file mode 100644 index 00000000..c979a5e3 --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts @@ -0,0 +1,25 @@ +import type { PotApplication } from "./PotApplication"; + + export type V1PotsApplicationsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; +}; +/** + * @description Returns applications for the pot +*/ +export type V1PotsApplicationsRetrieve200 = PotApplication[]; +/** + * @description Pot not found +*/ +export type V1PotsApplicationsRetrieve404 = any; +/** + * @description Returns applications for the pot +*/ +export type V1PotsApplicationsRetrieveQueryResponse = PotApplication[]; +export type V1PotsApplicationsRetrieveQuery = { + Response: V1PotsApplicationsRetrieveQueryResponse; + PathParams: V1PotsApplicationsRetrievePathParams; + Errors: V1PotsApplicationsRetrieve404; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts new file mode 100644 index 00000000..5952562b --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts @@ -0,0 +1,25 @@ +import type { Donation } from "./Donation"; + + export type V1PotsDonationsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; +}; +/** + * @description Returns donations for the pot +*/ +export type V1PotsDonationsRetrieve200 = Donation[]; +/** + * @description Pot not found +*/ +export type V1PotsDonationsRetrieve404 = any; +/** + * @description Returns donations for the pot +*/ +export type V1PotsDonationsRetrieveQueryResponse = Donation[]; +export type V1PotsDonationsRetrieveQuery = { + Response: V1PotsDonationsRetrieveQueryResponse; + PathParams: V1PotsDonationsRetrievePathParams; + Errors: V1PotsDonationsRetrieve404; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts new file mode 100644 index 00000000..fda3d00b --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts @@ -0,0 +1,25 @@ +import type { PotPayout } from "./PotPayout"; + + export type V1PotsPayoutsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; +}; +/** + * @description Returns payouts for the pot +*/ +export type V1PotsPayoutsRetrieve200 = PotPayout[]; +/** + * @description Pot not found +*/ +export type V1PotsPayoutsRetrieve404 = any; +/** + * @description Returns payouts for the pot +*/ +export type V1PotsPayoutsRetrieveQueryResponse = PotPayout[]; +export type V1PotsPayoutsRetrieveQuery = { + Response: V1PotsPayoutsRetrieveQueryResponse; + PathParams: V1PotsPayoutsRetrievePathParams; + Errors: V1PotsPayoutsRetrieve404; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsRetrieve.ts new file mode 100644 index 00000000..d586ba4a --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsRetrieve.ts @@ -0,0 +1,13 @@ +import type { Pot } from "./Pot"; + + /** + * @description Returns a list of pots +*/ +export type V1PotsRetrieve200 = Pot[]; +/** + * @description Returns a list of pots +*/ +export type V1PotsRetrieveQueryResponse = Pot[]; +export type V1PotsRetrieveQuery = { + Response: V1PotsRetrieveQueryResponse; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts b/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts new file mode 100644 index 00000000..d20b8f3e --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts @@ -0,0 +1,25 @@ +import type { Pot } from "./Pot"; + + export type V1PotsRetrieve2PathParams = { + /** + * @type string + */ + pot_id: string; +}; +/** + * @description Returns pot details +*/ +export type V1PotsRetrieve2200 = Pot; +/** + * @description Pot not found +*/ +export type V1PotsRetrieve2404 = any; +/** + * @description Returns pot details +*/ +export type V1PotsRetrieve2QueryResponse = Pot; +export type V1PotsRetrieve2Query = { + Response: V1PotsRetrieve2QueryResponse; + PathParams: V1PotsRetrieve2PathParams; + Errors: V1PotsRetrieve2404; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts new file mode 100644 index 00000000..d16581cd --- /dev/null +++ b/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts @@ -0,0 +1,25 @@ +import type { Account } from "./Account"; + + export type V1PotsSponsorsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; +}; +/** + * @description Returns sponsors for the pot +*/ +export type V1PotsSponsorsRetrieve200 = Account[]; +/** + * @description Pot not found +*/ +export type V1PotsSponsorsRetrieve404 = any; +/** + * @description Returns sponsors for the pot +*/ +export type V1PotsSponsorsRetrieveQueryResponse = Account[]; +export type V1PotsSponsorsRetrieveQuery = { + Response: V1PotsSponsorsRetrieveQueryResponse; + PathParams: V1PotsSponsorsRetrievePathParams; + Errors: V1PotsSponsorsRetrieve404; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/V1StatsRetrieve.ts b/src/common/api/potlock/generated/types/V1StatsRetrieve.ts new file mode 100644 index 00000000..442cdea8 --- /dev/null +++ b/src/common/api/potlock/generated/types/V1StatsRetrieve.ts @@ -0,0 +1,18 @@ +import type { StatsResponse } from "./StatsResponse"; + + /** + * @description Returns statistics data +*/ +export type V1StatsRetrieve200 = StatsResponse; +/** + * @description Internal server error +*/ +export type V1StatsRetrieve500 = any; +/** + * @description Returns statistics data +*/ +export type V1StatsRetrieveQueryResponse = StatsResponse; +export type V1StatsRetrieveQuery = { + Response: V1StatsRetrieveQueryResponse; + Errors: V1StatsRetrieve500; +}; \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/index.ts b/src/common/api/potlock/generated/types/index.ts new file mode 100644 index 00000000..c92f1218 --- /dev/null +++ b/src/common/api/potlock/generated/types/index.ts @@ -0,0 +1,25 @@ +export * from "./Account"; +export * from "./DefaultRegistrationStatusEnum"; +export * from "./Donation"; +export * from "./List"; +export * from "./ListRegistration"; +export * from "./Pot"; +export * from "./PotApplication"; +export * from "./PotApplicationStatusEnum"; +export * from "./PotPayout"; +export * from "./StatsResponse"; +export * from "./StatusF24Enum"; +export * from "./V1AccountsActivePotsRetrieve"; +export * from "./V1AccountsRetrieve"; +export * from "./V1AccountsRetrieve2"; +export * from "./V1DonorsRetrieve"; +export * from "./V1ListsRegistrationsRetrieve"; +export * from "./V1ListsRetrieve"; +export * from "./V1ListsRetrieve2"; +export * from "./V1PotsApplicationsRetrieve"; +export * from "./V1PotsDonationsRetrieve"; +export * from "./V1PotsPayoutsRetrieve"; +export * from "./V1PotsRetrieve"; +export * from "./V1PotsRetrieve2"; +export * from "./V1PotsSponsorsRetrieve"; +export * from "./V1StatsRetrieve"; \ 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 cd632532..2288fc08 100644 --- a/src/common/api/potlock/generated/zod/accountSchema.ts +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -1,27 +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(), - near_social_profile_data: z.any().nullish(), -}); + +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/generated/zod/defaultRegistrationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts index 548b7732..373dcb4d 100644 --- a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts @@ -1,10 +1,6 @@ import { z } from "zod"; -/** + /** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const defaultRegistrationStatusEnumSchema = z - .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) - .describe( - "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", - ); +export const defaultRegistrationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/donationSchema.ts b/src/common/api/potlock/generated/zod/donationSchema.ts index c4c26aa3..2f0ca1a0 100644 --- a/src/common/api/potlock/generated/zod/donationSchema.ts +++ b/src/common/api/potlock/generated/zod/donationSchema.ts @@ -1,65 +1,4 @@ import { z } from "zod"; -export const donationSchema = z.object({ - id: z.number().describe("Donation id."), - on_chain_id: z - .number() - .min(-2147483648) - .max(2147483647) - .describe("Donation id in contract"), - total_amount: z.string().max(64).describe("Total amount."), - total_amount_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Total amount in USD.") - .nullable() - .nullish(), - net_amount: z.string().max(64).describe("Net amount."), - net_amount_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Net amount in USD.") - .nullable() - .nullish(), - matching_pool: z.boolean().describe("Matching pool."), - message: z - .string() - .max(1024) - .describe("Donation message.") - .nullable() - .nullish(), - donated_at: z.string().datetime().describe("Donation date."), - protocol_fee: z.string().max(64).describe("Protocol fee."), - protocol_fee_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Protocol fee in USD.") - .nullable() - .nullish(), - referrer_fee: z - .string() - .max(64) - .describe("Referrer fee.") - .nullable() - .nullish(), - referrer_fee_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Referrer fee in USD.") - .nullable() - .nullish(), - chef_fee: z.string().max(64).describe("Chef fee.").nullable().nullish(), - chef_fee_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Chef fee in USD.") - .nullable() - .nullish(), - tx_hash: z.string().max(64).describe("Transaction hash."), - donor: z.string().describe("Donor."), - ft: z.string().describe("Donation FT."), - pot: z.string().describe("Donation pot.").nullable(), - recipient: z.string().describe("Donation recipient.").nullable().nullish(), - referrer: z.string().describe("Donation referrer.").nullable().nullish(), - chef: z.string().describe("Donation chef.").nullable().nullish(), -}); + +export const donationSchema = z.object({ "id": z.number().describe("Donation id."), "on_chain_id": z.number().min(-2147483648).max(2147483647).describe("Donation id in contract"), "total_amount": z.string().max(64).describe("Total amount."), "total_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total amount in USD.").nullable().nullish(), "net_amount": z.string().max(64).describe("Net amount."), "net_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Net amount in USD.").nullable().nullish(), "matching_pool": z.boolean().describe("Matching pool."), "message": z.string().max(1024).describe("Donation message.").nullable().nullish(), "donated_at": z.string().datetime().describe("Donation date."), "protocol_fee": z.string().max(64).describe("Protocol fee."), "protocol_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Protocol fee in USD.").nullable().nullish(), "referrer_fee": z.string().max(64).describe("Referrer fee.").nullable().nullish(), "referrer_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Referrer fee in USD.").nullable().nullish(), "chef_fee": z.string().max(64).describe("Chef fee.").nullable().nullish(), "chef_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Chef fee in USD.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash."), "donor": z.string().describe("Donor."), "ft": z.string().describe("Donation FT."), "pot": z.string().describe("Donation pot.").nullable(), "recipient": z.string().describe("Donation recipient.").nullable().nullish(), "referrer": z.string().describe("Donation referrer.").nullable().nullish(), "chef": z.string().describe("Donation chef.").nullable().nullish() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/index.ts b/src/common/api/potlock/generated/zod/index.ts index 43c1cf05..ae4fe072 100644 --- a/src/common/api/potlock/generated/zod/index.ts +++ b/src/common/api/potlock/generated/zod/index.ts @@ -22,4 +22,4 @@ export * from "./v1PotsPayoutsRetrieveSchema"; export * from "./v1PotsRetrieve2Schema"; export * from "./v1PotsRetrieveSchema"; export * from "./v1PotsSponsorsRetrieveSchema"; -export * from "./v1StatsRetrieveSchema"; +export * from "./v1StatsRetrieveSchema"; \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts index 3da1f8df..912e05eb 100644 --- a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts +++ b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts @@ -1,35 +1,5 @@ +import { statusF24EnumSchema } from "./statusF24EnumSchema"; import { z } from "zod"; -import { statusF24EnumSchema } from "./statusF24EnumSchema"; -export const listRegistrationSchema = z.object({ - id: z.number().describe("Registration id."), - status: z - .lazy(() => statusF24EnumSchema) - .describe( - "Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", - ), - submitted_at: z.string().datetime().describe("Registration submission date."), - updated_at: z.string().datetime().describe("Registration last update date."), - registrant_notes: z - .string() - .max(1024) - .describe("Registrant notes.") - .nullable() - .nullish(), - admin_notes: z - .string() - .max(1024) - .describe("Admin notes.") - .nullable() - .nullish(), - tx_hash: z - .string() - .max(64) - .describe("Transaction hash.") - .nullable() - .nullish(), - list: z.number().min(0).max(2147483647).describe("List registered."), - registrant: z.string().describe("Account that registered on the list."), - registered_by: z.string().describe("Account that did the registration."), -}); +export const listRegistrationSchema = z.object({ "id": z.number().describe("Registration id."), "status": z.lazy(() => statusF24EnumSchema).describe("Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "submitted_at": z.string().datetime().describe("Registration submission date."), "updated_at": z.string().datetime().describe("Registration last update date."), "registrant_notes": z.string().max(1024).describe("Registrant notes.").nullable().nullish(), "admin_notes": z.string().max(1024).describe("Admin notes.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash.").nullable().nullish(), "list": z.number().min(0).max(2147483647).describe("List registered."), "registrant": z.string().describe("Account that registered on the list."), "registered_by": z.string().describe("Account that did the registration.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/listSchema.ts b/src/common/api/potlock/generated/zod/listSchema.ts index cfe2b5d3..dc978cf0 100644 --- a/src/common/api/potlock/generated/zod/listSchema.ts +++ b/src/common/api/potlock/generated/zod/listSchema.ts @@ -1,31 +1,5 @@ +import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; import { z } from "zod"; -import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; -export const listSchema = z.object({ - id: z.number().min(0).max(2147483647).describe("List id."), - name: z.string().max(64).describe("List name."), - description: z - .string() - .max(256) - .describe("List description.") - .nullable() - .nullish(), - cover_image_url: z - .string() - .url() - .max(200) - .describe("Cover image url.") - .nullable() - .nullish(), - admin_only_registrations: z.boolean().describe("Admin only registrations."), - default_registration_status: z - .lazy(() => defaultRegistrationStatusEnumSchema) - .describe( - "Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", - ), - created_at: z.string().datetime().describe("List creation date."), - updated_at: z.string().datetime().describe("List last update date."), - owner: z.string().describe("List owner."), - admins: z.array(z.string()).describe("List admins."), -}); +export const listSchema = z.object({ "id": z.number().min(0).max(2147483647).describe("List id."), "name": z.string().max(64).describe("List name."), "description": z.string().max(256).describe("List description.").nullable().nullish(), "cover_image_url": z.string().url().max(200).describe("Cover image url.").nullable().nullish(), "admin_only_registrations": z.boolean().describe("Admin only registrations."), "default_registration_status": z.lazy(() => defaultRegistrationStatusEnumSchema).describe("Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "created_at": z.string().datetime().describe("List creation date."), "updated_at": z.string().datetime().describe("List last update date."), "owner": z.string().describe("List owner."), "admins": z.array(z.string()).describe("List admins.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/operations.ts b/src/common/api/potlock/generated/zod/operations.ts index 29971b90..3a01f9a8 100644 --- a/src/common/api/potlock/generated/zod/operations.ts +++ b/src/common/api/potlock/generated/zod/operations.ts @@ -1,286 +1,202 @@ -import { - v1AccountsActivePotsRetrieve404Schema, - v1AccountsActivePotsRetrieve500Schema, - v1AccountsActivePotsRetrievePathParamsSchema, - v1AccountsActivePotsRetrieveQueryParamsSchema, - v1AccountsActivePotsRetrieveQueryResponseSchema, -} from "./v1AccountsActivePotsRetrieveSchema"; -import { - v1AccountsRetrieve2404Schema, - v1AccountsRetrieve2500Schema, - v1AccountsRetrieve2PathParamsSchema, - v1AccountsRetrieve2QueryResponseSchema, -} from "./v1AccountsRetrieve2Schema"; -import { - v1AccountsRetrieve500Schema, - v1AccountsRetrieveQueryResponseSchema, -} from "./v1AccountsRetrieveSchema"; -import { - v1DonorsRetrieve500Schema, - v1DonorsRetrieveQueryParamsSchema, - v1DonorsRetrieveQueryResponseSchema, -} from "./v1DonorsRetrieveSchema"; -import { - v1ListsRegistrationsRetrieve404Schema, - v1ListsRegistrationsRetrieve500Schema, - v1ListsRegistrationsRetrievePathParamsSchema, - v1ListsRegistrationsRetrieveQueryResponseSchema, -} from "./v1ListsRegistrationsRetrieveSchema"; -import { - v1ListsRetrieve2404Schema, - v1ListsRetrieve2500Schema, - v1ListsRetrieve2PathParamsSchema, - v1ListsRetrieve2QueryResponseSchema, -} from "./v1ListsRetrieve2Schema"; -import { - v1ListsRetrieve500Schema, - v1ListsRetrieveQueryResponseSchema, -} from "./v1ListsRetrieveSchema"; -import { - v1PotsApplicationsRetrieve404Schema, - v1PotsApplicationsRetrievePathParamsSchema, - v1PotsApplicationsRetrieveQueryResponseSchema, -} from "./v1PotsApplicationsRetrieveSchema"; -import { - v1PotsDonationsRetrieve404Schema, - v1PotsDonationsRetrievePathParamsSchema, - v1PotsDonationsRetrieveQueryResponseSchema, -} from "./v1PotsDonationsRetrieveSchema"; -import { - v1PotsPayoutsRetrieve404Schema, - v1PotsPayoutsRetrievePathParamsSchema, - v1PotsPayoutsRetrieveQueryResponseSchema, -} from "./v1PotsPayoutsRetrieveSchema"; -import { - v1PotsRetrieve2404Schema, - v1PotsRetrieve2PathParamsSchema, - v1PotsRetrieve2QueryResponseSchema, -} from "./v1PotsRetrieve2Schema"; +import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./v1AccountsRetrieveSchema"; +import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema, v1AccountsRetrieve2PathParamsSchema } from "./v1AccountsRetrieve2Schema"; +import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema } from "./v1AccountsActivePotsRetrieveSchema"; +import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieve500Schema, v1DonorsRetrieveQueryParamsSchema } from "./v1DonorsRetrieveSchema"; +import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./v1ListsRetrieveSchema"; +import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema, v1ListsRetrieve2PathParamsSchema } from "./v1ListsRetrieve2Schema"; +import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema, v1ListsRegistrationsRetrievePathParamsSchema } from "./v1ListsRegistrationsRetrieveSchema"; import { v1PotsRetrieveQueryResponseSchema } from "./v1PotsRetrieveSchema"; -import { - v1PotsSponsorsRetrieve404Schema, - v1PotsSponsorsRetrievePathParamsSchema, - v1PotsSponsorsRetrieveQueryResponseSchema, -} from "./v1PotsSponsorsRetrieveSchema"; -import { - v1StatsRetrieve500Schema, - v1StatsRetrieveQueryResponseSchema, -} from "./v1StatsRetrieveSchema"; +import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2404Schema, v1PotsRetrieve2PathParamsSchema } from "./v1PotsRetrieve2Schema"; +import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrieve404Schema, v1PotsApplicationsRetrievePathParamsSchema } from "./v1PotsApplicationsRetrieveSchema"; +import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrieve404Schema, v1PotsDonationsRetrievePathParamsSchema } from "./v1PotsDonationsRetrieveSchema"; +import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrieve404Schema, v1PotsPayoutsRetrievePathParamsSchema } from "./v1PotsPayoutsRetrieveSchema"; +import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrieve404Schema, v1PotsSponsorsRetrievePathParamsSchema } from "./v1PotsSponsorsRetrieveSchema"; +import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./v1StatsRetrieveSchema"; -export const operations = { - v1_accounts_retrieve: { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined, - }, - responses: { - 200: v1AccountsRetrieveQueryResponseSchema, - 500: v1AccountsRetrieve500Schema, - }, - }, - v1_accounts_retrieve_2: { - request: undefined, - parameters: { - path: v1AccountsRetrieve2PathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1AccountsRetrieve2QueryResponseSchema, - 404: v1AccountsRetrieve2404Schema, - 500: v1AccountsRetrieve2500Schema, - }, - }, - v1_accounts_active_pots_retrieve: { - request: undefined, - parameters: { - path: v1AccountsActivePotsRetrievePathParamsSchema, - query: v1AccountsActivePotsRetrieveQueryParamsSchema, - header: undefined, - }, - responses: { - 200: v1AccountsActivePotsRetrieveQueryResponseSchema, - 404: v1AccountsActivePotsRetrieve404Schema, - 500: v1AccountsActivePotsRetrieve500Schema, - }, - }, - v1_donors_retrieve: { - request: undefined, - parameters: { - path: undefined, - query: v1DonorsRetrieveQueryParamsSchema, - header: undefined, - }, - responses: { - 200: v1DonorsRetrieveQueryResponseSchema, - 500: v1DonorsRetrieve500Schema, - }, - }, - v1_lists_retrieve: { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined, - }, - responses: { - 200: v1ListsRetrieveQueryResponseSchema, - 500: v1ListsRetrieve500Schema, - }, - }, - v1_lists_retrieve_2: { - request: undefined, - parameters: { - path: v1ListsRetrieve2PathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1ListsRetrieve2QueryResponseSchema, - 404: v1ListsRetrieve2404Schema, - 500: v1ListsRetrieve2500Schema, - }, - }, - v1_lists_registrations_retrieve: { - request: undefined, - parameters: { - path: v1ListsRegistrationsRetrievePathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1ListsRegistrationsRetrieveQueryResponseSchema, - 404: v1ListsRegistrationsRetrieve404Schema, - 500: v1ListsRegistrationsRetrieve500Schema, - }, - }, - v1_pots_retrieve: { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsRetrieveQueryResponseSchema, - }, - }, - v1_pots_retrieve_2: { - request: undefined, - parameters: { - path: v1PotsRetrieve2PathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsRetrieve2QueryResponseSchema, - 404: v1PotsRetrieve2404Schema, - }, - }, - v1_pots_applications_retrieve: { - request: undefined, - parameters: { - path: v1PotsApplicationsRetrievePathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsApplicationsRetrieveQueryResponseSchema, - 404: v1PotsApplicationsRetrieve404Schema, - }, - }, - v1_pots_donations_retrieve: { - request: undefined, - parameters: { - path: v1PotsDonationsRetrievePathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsDonationsRetrieveQueryResponseSchema, - 404: v1PotsDonationsRetrieve404Schema, - }, - }, - v1_pots_payouts_retrieve: { - request: undefined, - parameters: { - path: v1PotsPayoutsRetrievePathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsPayoutsRetrieveQueryResponseSchema, - 404: v1PotsPayoutsRetrieve404Schema, - }, - }, - v1_pots_sponsors_retrieve: { - request: undefined, - parameters: { - path: v1PotsSponsorsRetrievePathParamsSchema, - query: undefined, - header: undefined, - }, - responses: { - 200: v1PotsSponsorsRetrieveQueryResponseSchema, - 404: v1PotsSponsorsRetrieve404Schema, - }, - }, - v1_stats_retrieve: { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined, - }, - responses: { - 200: v1StatsRetrieveQueryResponseSchema, - 500: v1StatsRetrieve500Schema, - }, - }, -} as const; -export const paths = { - "/api/v1/accounts": { - get: operations["v1_accounts_retrieve"], - }, - "/api/v1/accounts/{account_id}": { - get: operations["v1_accounts_retrieve_2"], - }, - "/api/v1/accounts/{account_id}/active_pots": { - get: operations["v1_accounts_active_pots_retrieve"], - }, - "/api/v1/donors": { - get: operations["v1_donors_retrieve"], - }, - "/api/v1/lists": { - get: operations["v1_lists_retrieve"], - }, - "/api/v1/lists/{list_id}": { - get: operations["v1_lists_retrieve_2"], - }, - "/api/v1/lists/{list_id}/registrations": { - get: operations["v1_lists_registrations_retrieve"], - }, - "/api/v1/pots": { - get: operations["v1_pots_retrieve"], - }, - "/api/v1/pots/{pot_id}/": { - get: operations["v1_pots_retrieve_2"], - }, - "/api/v1/pots/{pot_id}/applications": { - get: operations["v1_pots_applications_retrieve"], - }, - "/api/v1/pots/{pot_id}/donations": { - get: operations["v1_pots_donations_retrieve"], - }, - "/api/v1/pots/{pot_id}/payouts": { - get: operations["v1_pots_payouts_retrieve"], - }, - "/api/v1/pots/{pot_id}/sponsors": { - get: operations["v1_pots_sponsors_retrieve"], - }, - "/api/v1/stats": { - get: operations["v1_stats_retrieve"], - }, -} as const; + export const operations = { "v1_accounts_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1AccountsRetrieveQueryResponseSchema, + 500: v1AccountsRetrieve500Schema + } + }, "v1_accounts_retrieve_2": { + request: undefined, + parameters: { + path: v1AccountsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1AccountsRetrieve2QueryResponseSchema, + 404: v1AccountsRetrieve2404Schema, + 500: v1AccountsRetrieve2500Schema + } + }, "v1_accounts_active_pots_retrieve": { + request: undefined, + parameters: { + path: v1AccountsActivePotsRetrievePathParamsSchema, + query: v1AccountsActivePotsRetrieveQueryParamsSchema, + header: undefined + }, + responses: { + 200: v1AccountsActivePotsRetrieveQueryResponseSchema, + 404: v1AccountsActivePotsRetrieve404Schema, + 500: v1AccountsActivePotsRetrieve500Schema + } + }, "v1_donors_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: v1DonorsRetrieveQueryParamsSchema, + header: undefined + }, + responses: { + 200: v1DonorsRetrieveQueryResponseSchema, + 500: v1DonorsRetrieve500Schema + } + }, "v1_lists_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRetrieveQueryResponseSchema, + 500: v1ListsRetrieve500Schema + } + }, "v1_lists_retrieve_2": { + request: undefined, + parameters: { + path: v1ListsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRetrieve2QueryResponseSchema, + 404: v1ListsRetrieve2404Schema, + 500: v1ListsRetrieve2500Schema + } + }, "v1_lists_registrations_retrieve": { + request: undefined, + parameters: { + path: v1ListsRegistrationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1ListsRegistrationsRetrieveQueryResponseSchema, + 404: v1ListsRegistrationsRetrieve404Schema, + 500: v1ListsRegistrationsRetrieve500Schema + } + }, "v1_pots_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsRetrieveQueryResponseSchema + } + }, "v1_pots_retrieve_2": { + request: undefined, + parameters: { + path: v1PotsRetrieve2PathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsRetrieve2QueryResponseSchema, + 404: v1PotsRetrieve2404Schema + } + }, "v1_pots_applications_retrieve": { + request: undefined, + parameters: { + path: v1PotsApplicationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsApplicationsRetrieveQueryResponseSchema, + 404: v1PotsApplicationsRetrieve404Schema + } + }, "v1_pots_donations_retrieve": { + request: undefined, + parameters: { + path: v1PotsDonationsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsDonationsRetrieveQueryResponseSchema, + 404: v1PotsDonationsRetrieve404Schema + } + }, "v1_pots_payouts_retrieve": { + request: undefined, + parameters: { + path: v1PotsPayoutsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsPayoutsRetrieveQueryResponseSchema, + 404: v1PotsPayoutsRetrieve404Schema + } + }, "v1_pots_sponsors_retrieve": { + request: undefined, + parameters: { + path: v1PotsSponsorsRetrievePathParamsSchema, + query: undefined, + header: undefined + }, + responses: { + 200: v1PotsSponsorsRetrieveQueryResponseSchema, + 404: v1PotsSponsorsRetrieve404Schema + } + }, "v1_stats_retrieve": { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined + }, + responses: { + 200: v1StatsRetrieveQueryResponseSchema, + 500: v1StatsRetrieve500Schema + } + } } as const; +export const paths = { "/api/v1/accounts": { + get: operations["v1_accounts_retrieve"] + }, "/api/v1/accounts/{account_id}": { + get: operations["v1_accounts_retrieve_2"] + }, "/api/v1/accounts/{account_id}/active_pots": { + get: operations["v1_accounts_active_pots_retrieve"] + }, "/api/v1/donors": { + get: operations["v1_donors_retrieve"] + }, "/api/v1/lists": { + get: operations["v1_lists_retrieve"] + }, "/api/v1/lists/{list_id}": { + get: operations["v1_lists_retrieve_2"] + }, "/api/v1/lists/{list_id}/registrations": { + get: operations["v1_lists_registrations_retrieve"] + }, "/api/v1/pots": { + get: operations["v1_pots_retrieve"] + }, "/api/v1/pots/{pot_id}/": { + get: operations["v1_pots_retrieve_2"] + }, "/api/v1/pots/{pot_id}/applications": { + get: operations["v1_pots_applications_retrieve"] + }, "/api/v1/pots/{pot_id}/donations": { + get: operations["v1_pots_donations_retrieve"] + }, "/api/v1/pots/{pot_id}/payouts": { + get: operations["v1_pots_payouts_retrieve"] + }, "/api/v1/pots/{pot_id}/sponsors": { + get: operations["v1_pots_sponsors_retrieve"] + }, "/api/v1/stats": { + get: operations["v1_stats_retrieve"] + } } as const; \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potApplicationSchema.ts b/src/common/api/potlock/generated/zod/potApplicationSchema.ts index 98996388..0121babc 100644 --- a/src/common/api/potlock/generated/zod/potApplicationSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationSchema.ts @@ -1,23 +1,5 @@ +import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; import { z } from "zod"; -import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; -export const potApplicationSchema = z.object({ - id: z.number().describe("Application id."), - message: z - .string() - .max(1024) - .describe("Application message.") - .nullable() - .nullish(), - status: z - .lazy(() => potApplicationStatusEnumSchema) - .describe( - "Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", - ), - submitted_at: z.string().datetime().describe("Application submission date."), - updated_at: z.string().datetime().describe("Application last update date."), - tx_hash: z.string().max(64).describe("Transaction hash."), - pot: z.string().describe("Pot applied to."), - applicant: z.string().describe("Account that applied to the pot."), -}); +export const potApplicationSchema = z.object({ "id": z.number().describe("Application id."), "message": z.string().max(1024).describe("Application message.").nullable().nullish(), "status": z.lazy(() => potApplicationStatusEnumSchema).describe("Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"), "submitted_at": z.string().datetime().describe("Application submission date."), "updated_at": z.string().datetime().describe("Application last update date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot applied to."), "applicant": z.string().describe("Account that applied to the pot.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts index 92b90896..b44597af 100644 --- a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts @@ -1,10 +1,6 @@ import { z } from "zod"; -/** + /** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview */ -export const potApplicationStatusEnumSchema = z - .enum(["Pending", "Approved", "Rejected", "InReview"]) - .describe( - "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", - ); +export const potApplicationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "InReview"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potPayoutSchema.ts b/src/common/api/potlock/generated/zod/potPayoutSchema.ts index 627965e1..d7277212 100644 --- a/src/common/api/potlock/generated/zod/potPayoutSchema.ts +++ b/src/common/api/potlock/generated/zod/potPayoutSchema.ts @@ -1,17 +1,4 @@ import { z } from "zod"; -export const potPayoutSchema = z.object({ - id: z.number().describe("Payout id."), - amount: z.string().max(64).describe("Payout amount."), - amount_paid_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Payout amount in USD.") - .nullable() - .nullish(), - paid_at: z.string().datetime().describe("Payout date."), - tx_hash: z.string().max(64).describe("Transaction hash."), - pot: z.string().describe("Pot that this payout is for."), - recipient: z.string().describe("Payout recipient."), - ft: z.string().describe("Payout FT."), -}); + +export const potPayoutSchema = z.object({ "id": z.number().describe("Payout id."), "amount": z.string().max(64).describe("Payout amount."), "amount_paid_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Payout amount in USD.").nullable().nullish(), "paid_at": z.string().datetime().describe("Payout date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot that this payout is for."), "recipient": z.string().describe("Payout recipient."), "ft": z.string().describe("Payout FT.") }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/potSchema.ts b/src/common/api/potlock/generated/zod/potSchema.ts index 1cd5f75c..a0c19ac6 100644 --- a/src/common/api/potlock/generated/zod/potSchema.ts +++ b/src/common/api/potlock/generated/zod/potSchema.ts @@ -1,124 +1,4 @@ import { z } from "zod"; -export const potSchema = z.object({ - id: z.string().describe("Pot account ID."), - pot_factory: z.string().describe("Pot factory."), - deployer: z.string().describe("Pot deployer."), - deployed_at: z.string().datetime().describe("Pot deployment date."), - source_metadata: z.any(), - owner: z.string().describe("Pot owner."), - admins: z.array(z.string()).describe("Pot admins."), - chef: z.string().describe("Pot chef.").nullable().nullish(), - name: z.string().describe("Pot name."), - description: z.string().describe("Pot description."), - max_approved_applicants: z - .number() - .min(0) - .max(2147483647) - .describe("Max approved applicants."), - base_currency: z - .string() - .max(64) - .describe("Base currency.") - .nullable() - .nullish(), - application_start: z - .string() - .datetime() - .describe("Pot application start date."), - application_end: z.string().datetime().describe("Pot application end date."), - matching_round_start: z - .string() - .datetime() - .describe("Pot matching round start date."), - matching_round_end: z - .string() - .datetime() - .describe("Pot matching round end date."), - registry_provider: z - .string() - .max(64) - .describe("Registry provider.") - .nullable() - .nullish(), - min_matching_pool_donation_amount: z - .string() - .max(64) - .describe("Min matching pool donation amount."), - sybil_wrapper_provider: z - .string() - .max(64) - .describe("Sybil wrapper provider.") - .nullable() - .nullish(), - custom_sybil_checks: z - .string() - .max(64) - .describe("Custom sybil checks.") - .nullable() - .nullish(), - custom_min_threshold_score: z - .number() - .min(0) - .max(2147483647) - .describe("Custom min threshold score.") - .nullable() - .nullish(), - referral_fee_matching_pool_basis_points: z - .number() - .min(0) - .max(2147483647) - .describe("Referral fee matching pool basis points."), - referral_fee_public_round_basis_points: z - .number() - .min(0) - .max(2147483647) - .describe("Referral fee public round basis points."), - chef_fee_basis_points: z - .number() - .min(0) - .max(2147483647) - .describe("Chef fee basis points."), - total_matching_pool: z.string().max(64).describe("Total matching pool."), - total_matching_pool_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), - matching_pool_balance: z.string().max(64).describe("Matching pool balance."), - matching_pool_donations_count: z - .number() - .min(0) - .max(2147483647) - .describe("Matching pool donations count."), - total_public_donations: z - .string() - .max(64) - .describe("Total public donations."), - total_public_donations_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), - public_donations_count: z - .number() - .min(0) - .max(2147483647) - .describe("Public donations count."), - cooldown_end: z - .string() - .datetime() - .describe("Pot cooldown end date.") - .nullable() - .nullish(), - cooldown_period_ms: z - .number() - .min(0) - .max(2147483647) - .describe("Pot cooldown period in ms.") - .nullable() - .nullish(), - all_paid_out: z.boolean().describe("All paid out."), - protocol_config_provider: z - .string() - .max(64) - .describe("Protocol config provider.") - .nullable() - .nullish(), -}); + +export const potSchema = z.object({ "id": z.string().describe("Pot account ID."), "pot_factory": z.string().describe("Pot factory."), "deployer": z.string().describe("Pot deployer."), "deployed_at": z.string().datetime().describe("Pot deployment date."), "source_metadata": z.any(), "owner": z.string().describe("Pot owner."), "admins": z.array(z.string()).describe("Pot admins."), "chef": z.string().describe("Pot chef.").nullable().nullish(), "name": z.string().describe("Pot name."), "description": z.string().describe("Pot description."), "max_approved_applicants": z.number().min(0).max(2147483647).describe("Max approved applicants."), "base_currency": z.string().max(64).describe("Base currency.").nullable().nullish(), "application_start": z.string().datetime().describe("Pot application start date."), "application_end": z.string().datetime().describe("Pot application end date."), "matching_round_start": z.string().datetime().describe("Pot matching round start date."), "matching_round_end": z.string().datetime().describe("Pot matching round end date."), "registry_provider": z.string().max(64).describe("Registry provider.").nullable().nullish(), "min_matching_pool_donation_amount": z.string().max(64).describe("Min matching pool donation amount."), "sybil_wrapper_provider": z.string().max(64).describe("Sybil wrapper provider.").nullable().nullish(), "custom_sybil_checks": z.string().max(64).describe("Custom sybil checks.").nullable().nullish(), "custom_min_threshold_score": z.number().min(0).max(2147483647).describe("Custom min threshold score.").nullable().nullish(), "referral_fee_matching_pool_basis_points": z.number().min(0).max(2147483647).describe("Referral fee matching pool basis points."), "referral_fee_public_round_basis_points": z.number().min(0).max(2147483647).describe("Referral fee public round basis points."), "chef_fee_basis_points": z.number().min(0).max(2147483647).describe("Chef fee basis points."), "total_matching_pool": z.string().max(64).describe("Total matching pool."), "total_matching_pool_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "matching_pool_balance": z.string().max(64).describe("Matching pool balance."), "matching_pool_donations_count": z.number().min(0).max(2147483647).describe("Matching pool donations count."), "total_public_donations": z.string().max(64).describe("Total public donations."), "total_public_donations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "public_donations_count": z.number().min(0).max(2147483647).describe("Public donations count."), "cooldown_end": z.string().datetime().describe("Pot cooldown end date.").nullable().nullish(), "cooldown_period_ms": z.number().min(0).max(2147483647).describe("Pot cooldown period in ms.").nullable().nullish(), "all_paid_out": z.boolean().describe("All paid out."), "protocol_config_provider": z.string().max(64).describe("Protocol config provider.").nullable().nullish() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/statsResponseSchema.ts b/src/common/api/potlock/generated/zod/statsResponseSchema.ts index c009c24b..740a83f4 100644 --- a/src/common/api/potlock/generated/zod/statsResponseSchema.ts +++ b/src/common/api/potlock/generated/zod/statsResponseSchema.ts @@ -1,9 +1,4 @@ import { z } from "zod"; -export const statsResponseSchema = z.object({ - total_donations_usd: z.number(), - total_payouts_usd: z.number(), - total_donations_count: z.number(), - total_donors_count: z.number(), - total_recipients_count: z.number(), -}); + +export const statsResponseSchema = z.object({ "total_donations_usd": z.number(), "total_payouts_usd": z.number(), "total_donations_count": z.number(), "total_donors_count": z.number(), "total_recipients_count": z.number() }); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts index 33ce8e9a..fadb137a 100644 --- a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts +++ b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts @@ -1,10 +1,6 @@ import { z } from "zod"; -/** + /** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const statusF24EnumSchema = z - .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) - .describe( - "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", - ); +export const statusF24EnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts index 2805af8d..e8777c51 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts @@ -1,20 +1,14 @@ import { z } from "zod"; - import { potSchema } from "./potSchema"; -export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ - account_id: z.string(), -}); -export const v1AccountsActivePotsRetrieveQueryParamsSchema = z - .object({ status: z.string().describe("Filter by pot status").optional() }) - .optional(); +export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ "account_id": z.string() }); + + export const v1AccountsActivePotsRetrieveQueryParamsSchema = z.object({ "status": z.string().describe("Filter by pot status").optional() }).optional(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieve200Schema = z.array( - z.lazy(() => potSchema), -); +export const v1AccountsActivePotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); /** * @description Account not found */ @@ -26,6 +20,4 @@ export const v1AccountsActivePotsRetrieve500Schema = z.any(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array( - z.lazy(() => potSchema), -); +export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts index 0de9aa2a..c65eec24 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts @@ -1,10 +1,8 @@ import { z } from "zod"; - import { accountSchema } from "./accountSchema"; -export const v1AccountsRetrieve2PathParamsSchema = z.object({ - account_id: z.string(), -}); + +export const v1AccountsRetrieve2PathParamsSchema = z.object({ "account_id": z.string() }); /** * @description Returns account details */ @@ -20,6 +18,4 @@ export const v1AccountsRetrieve2500Schema = z.any(); /** * @description Returns account details */ -export const v1AccountsRetrieve2QueryResponseSchema = z.lazy( - () => accountSchema, -); +export const v1AccountsRetrieve2QueryResponseSchema = z.lazy(() => accountSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts index 7e391a3b..f9ac9afe 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts @@ -1,8 +1,7 @@ import { z } from "zod"; - import { accountSchema } from "./accountSchema"; -/** + /** * @description Returns a list of accounts */ export const v1AccountsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); @@ -13,6 +12,4 @@ export const v1AccountsRetrieve500Schema = z.any(); /** * @description Returns a list of accounts */ -export const v1AccountsRetrieveQueryResponseSchema = z.array( - z.lazy(() => accountSchema), -); +export const v1AccountsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts index 9f5762a5..0420a5e2 100644 --- a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts @@ -1,15 +1,8 @@ import { z } from "zod"; - import { accountSchema } from "./accountSchema"; -export const v1DonorsRetrieveQueryParamsSchema = z - .object({ - sort: z - .string() - .describe("Sort by field, e.g., most_donated_usd") - .optional(), - }) - .optional(); + +export const v1DonorsRetrieveQueryParamsSchema = z.object({ "sort": z.string().describe("Sort by field, e.g., most_donated_usd").optional() }).optional(); /** * @description Returns a list of donor accounts */ @@ -21,6 +14,4 @@ export const v1DonorsRetrieve500Schema = z.any(); /** * @description Returns a list of donor accounts */ -export const v1DonorsRetrieveQueryResponseSchema = z.array( - z.lazy(() => accountSchema), -); +export const v1DonorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts index 0adfaa5e..9e191236 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts @@ -1,16 +1,12 @@ import { z } from "zod"; - import { listRegistrationSchema } from "./listRegistrationSchema"; -export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ - list_id: z.number(), -}); + +export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ "list_id": z.number() }); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieve200Schema = z.array( - z.lazy(() => listRegistrationSchema), -); +export const v1ListsRegistrationsRetrieve200Schema = z.array(z.lazy(() => listRegistrationSchema)); /** * @description List not found */ @@ -22,6 +18,4 @@ export const v1ListsRegistrationsRetrieve500Schema = z.any(); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array( - z.lazy(() => listRegistrationSchema), -); +export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array(z.lazy(() => listRegistrationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts index ae5a0934..4e88ea9b 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts @@ -1,10 +1,8 @@ import { z } from "zod"; - import { listSchema } from "./listSchema"; -export const v1ListsRetrieve2PathParamsSchema = z.object({ - list_id: z.number(), -}); + +export const v1ListsRetrieve2PathParamsSchema = z.object({ "list_id": z.number() }); /** * @description Returns list details */ @@ -20,4 +18,4 @@ export const v1ListsRetrieve2500Schema = z.any(); /** * @description Returns list details */ -export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); +export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts index 7e13ceb9..a6578129 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts @@ -1,8 +1,7 @@ import { z } from "zod"; - import { listSchema } from "./listSchema"; -/** + /** * @description Returns a list of lists */ export const v1ListsRetrieve200Schema = z.array(z.lazy(() => listSchema)); @@ -13,6 +12,4 @@ export const v1ListsRetrieve500Schema = z.any(); /** * @description Returns a list of lists */ -export const v1ListsRetrieveQueryResponseSchema = z.array( - z.lazy(() => listSchema), -); +export const v1ListsRetrieveQueryResponseSchema = z.array(z.lazy(() => listSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts index 1dc33744..1392b571 100644 --- a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts @@ -1,16 +1,12 @@ import { z } from "zod"; - import { potApplicationSchema } from "./potApplicationSchema"; -export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ - pot_id: z.string(), -}); + +export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieve200Schema = z.array( - z.lazy(() => potApplicationSchema), -); +export const v1PotsApplicationsRetrieve200Schema = z.array(z.lazy(() => potApplicationSchema)); /** * @description Pot not found */ @@ -18,6 +14,4 @@ export const v1PotsApplicationsRetrieve404Schema = z.any(); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array( - z.lazy(() => potApplicationSchema), -); +export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array(z.lazy(() => potApplicationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts index cdb8b356..707a67b7 100644 --- a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts @@ -1,16 +1,12 @@ import { z } from "zod"; - import { donationSchema } from "./donationSchema"; -export const v1PotsDonationsRetrievePathParamsSchema = z.object({ - pot_id: z.string(), -}); + +export const v1PotsDonationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieve200Schema = z.array( - z.lazy(() => donationSchema), -); +export const v1PotsDonationsRetrieve200Schema = z.array(z.lazy(() => donationSchema)); /** * @description Pot not found */ @@ -18,6 +14,4 @@ export const v1PotsDonationsRetrieve404Schema = z.any(); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieveQueryResponseSchema = z.array( - z.lazy(() => donationSchema), -); +export const v1PotsDonationsRetrieveQueryResponseSchema = z.array(z.lazy(() => donationSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts index 3ff282f6..9892362f 100644 --- a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts @@ -1,16 +1,12 @@ import { z } from "zod"; - import { potPayoutSchema } from "./potPayoutSchema"; -export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ - pot_id: z.string(), -}); + +export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieve200Schema = z.array( - z.lazy(() => potPayoutSchema), -); +export const v1PotsPayoutsRetrieve200Schema = z.array(z.lazy(() => potPayoutSchema)); /** * @description Pot not found */ @@ -18,6 +14,4 @@ export const v1PotsPayoutsRetrieve404Schema = z.any(); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array( - z.lazy(() => potPayoutSchema), -); +export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array(z.lazy(() => potPayoutSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts index 26021f10..a9ebf834 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts @@ -1,8 +1,8 @@ import { z } from "zod"; - import { potSchema } from "./potSchema"; -export const v1PotsRetrieve2PathParamsSchema = z.object({ pot_id: z.string() }); + +export const v1PotsRetrieve2PathParamsSchema = z.object({ "pot_id": z.string() }); /** * @description Returns pot details */ @@ -14,4 +14,4 @@ export const v1PotsRetrieve2404Schema = z.any(); /** * @description Returns pot details */ -export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); +export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts index eee00c54..373724c1 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts @@ -1,14 +1,11 @@ import { z } from "zod"; - import { potSchema } from "./potSchema"; -/** + /** * @description Returns a list of pots */ export const v1PotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); /** * @description Returns a list of pots */ -export const v1PotsRetrieveQueryResponseSchema = z.array( - z.lazy(() => potSchema), -); +export const v1PotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts index e9bf09bc..1a0a53e2 100644 --- a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts @@ -1,16 +1,12 @@ import { z } from "zod"; - import { accountSchema } from "./accountSchema"; -export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ - pot_id: z.string(), -}); + +export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieve200Schema = z.array( - z.lazy(() => accountSchema), -); +export const v1PotsSponsorsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); /** * @description Pot not found */ @@ -18,6 +14,4 @@ export const v1PotsSponsorsRetrieve404Schema = z.any(); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array( - z.lazy(() => accountSchema), -); +export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts index ba4a5754..a74f954c 100644 --- a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts @@ -1,8 +1,7 @@ import { z } from "zod"; - import { statsResponseSchema } from "./statsResponseSchema"; -/** + /** * @description Returns statistics data */ export const v1StatsRetrieve200Schema = z.lazy(() => statsResponseSchema); @@ -13,6 +12,4 @@ export const v1StatsRetrieve500Schema = z.any(); /** * @description Returns statistics data */ -export const v1StatsRetrieveQueryResponseSchema = z.lazy( - () => statsResponseSchema, -); +export const v1StatsRetrieveQueryResponseSchema = z.lazy(() => statsResponseSchema); \ No newline at end of file diff --git a/src/common/api/potlock/generated/zodios.ts b/src/common/api/potlock/generated/zodios.ts deleted file mode 100644 index 6733f1f7..00000000 --- a/src/common/api/potlock/generated/zodios.ts +++ /dev/null @@ -1,380 +0,0 @@ -import { Zodios, makeApi } from "@zodios/core"; - -import { - v1AccountsActivePotsRetrieve404Schema, - v1AccountsActivePotsRetrieve500Schema, - v1AccountsActivePotsRetrievePathParamsSchema, - v1AccountsActivePotsRetrieveQueryParamsSchema, - v1AccountsActivePotsRetrieveQueryResponseSchema, -} from "./zod/v1AccountsActivePotsRetrieveSchema"; -import { - v1AccountsRetrieve2404Schema, - v1AccountsRetrieve2500Schema, - v1AccountsRetrieve2PathParamsSchema, - v1AccountsRetrieve2QueryResponseSchema, -} from "./zod/v1AccountsRetrieve2Schema"; -import { - v1AccountsRetrieve500Schema, - v1AccountsRetrieveQueryResponseSchema, -} from "./zod/v1AccountsRetrieveSchema"; -import { - v1DonorsRetrieve500Schema, - v1DonorsRetrieveQueryParamsSchema, - v1DonorsRetrieveQueryResponseSchema, -} from "./zod/v1DonorsRetrieveSchema"; -import { - v1ListsRegistrationsRetrieve404Schema, - v1ListsRegistrationsRetrieve500Schema, - v1ListsRegistrationsRetrievePathParamsSchema, - v1ListsRegistrationsRetrieveQueryResponseSchema, -} from "./zod/v1ListsRegistrationsRetrieveSchema"; -import { - v1ListsRetrieve2404Schema, - v1ListsRetrieve2500Schema, - v1ListsRetrieve2PathParamsSchema, - v1ListsRetrieve2QueryResponseSchema, -} from "./zod/v1ListsRetrieve2Schema"; -import { - v1ListsRetrieve500Schema, - v1ListsRetrieveQueryResponseSchema, -} from "./zod/v1ListsRetrieveSchema"; -import { - v1PotsApplicationsRetrieve404Schema, - v1PotsApplicationsRetrievePathParamsSchema, - v1PotsApplicationsRetrieveQueryResponseSchema, -} from "./zod/v1PotsApplicationsRetrieveSchema"; -import { - v1PotsDonationsRetrieve404Schema, - v1PotsDonationsRetrievePathParamsSchema, - v1PotsDonationsRetrieveQueryResponseSchema, -} from "./zod/v1PotsDonationsRetrieveSchema"; -import { - v1PotsPayoutsRetrieve404Schema, - v1PotsPayoutsRetrievePathParamsSchema, - v1PotsPayoutsRetrieveQueryResponseSchema, -} from "./zod/v1PotsPayoutsRetrieveSchema"; -import { - v1PotsRetrieve2404Schema, - v1PotsRetrieve2PathParamsSchema, - v1PotsRetrieve2QueryResponseSchema, -} from "./zod/v1PotsRetrieve2Schema"; -import { v1PotsRetrieveQueryResponseSchema } from "./zod/v1PotsRetrieveSchema"; -import { - v1PotsSponsorsRetrieve404Schema, - v1PotsSponsorsRetrievePathParamsSchema, - v1PotsSponsorsRetrieveQueryResponseSchema, -} from "./zod/v1PotsSponsorsRetrieveSchema"; -import { - v1StatsRetrieve500Schema, - v1StatsRetrieveQueryResponseSchema, -} from "./zod/v1StatsRetrieveSchema"; - -export const endpoints = makeApi([ - { - method: "get", - path: "/api/v1/accounts", - description: ``, - requestFormat: "json", - parameters: [], - response: v1AccountsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1AccountsRetrieve500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/accounts/:account_id", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "account_id", - description: ``, - type: "Path", - schema: v1AccountsRetrieve2PathParamsSchema.shape["account_id"], - }, - ], - response: v1AccountsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `Account not found`, - schema: v1AccountsRetrieve2404Schema, - }, - { - status: 500, - description: `Internal server error`, - schema: v1AccountsRetrieve2500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/accounts/:account_id/active_pots", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "account_id", - description: ``, - type: "Path", - schema: - v1AccountsActivePotsRetrievePathParamsSchema.shape["account_id"], - }, - { - name: "status", - description: `Filter by pot status`, - type: "Query", - schema: - v1AccountsActivePotsRetrieveQueryParamsSchema.unwrap().shape[ - "status" - ], - }, - ], - response: v1AccountsActivePotsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Account not found`, - schema: v1AccountsActivePotsRetrieve404Schema, - }, - { - status: 500, - description: `Internal server error`, - schema: v1AccountsActivePotsRetrieve500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/donors", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "sort", - description: `Sort by field, e.g., most_donated_usd`, - type: "Query", - schema: v1DonorsRetrieveQueryParamsSchema.unwrap().shape["sort"], - }, - ], - response: v1DonorsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1DonorsRetrieve500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/lists", - description: ``, - requestFormat: "json", - parameters: [], - response: v1ListsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1ListsRetrieve500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/lists/:list_id", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "list_id", - description: ``, - type: "Path", - schema: v1ListsRetrieve2PathParamsSchema.shape["list_id"], - }, - ], - response: v1ListsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `List not found`, - schema: v1ListsRetrieve2404Schema, - }, - { - status: 500, - description: `Internal server error`, - schema: v1ListsRetrieve2500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/lists/:list_id/registrations", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "list_id", - description: ``, - type: "Path", - schema: v1ListsRegistrationsRetrievePathParamsSchema.shape["list_id"], - }, - ], - response: v1ListsRegistrationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `List not found`, - schema: v1ListsRegistrationsRetrieve404Schema, - }, - { - status: 500, - description: `Internal server error`, - schema: v1ListsRegistrationsRetrieve500Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/pots", - description: ``, - requestFormat: "json", - parameters: [], - response: v1PotsRetrieveQueryResponseSchema, - errors: [], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsRetrieve2PathParamsSchema.shape["pot_id"], - }, - ], - response: v1PotsRetrieve2QueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsRetrieve2404Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/applications", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsApplicationsRetrievePathParamsSchema.shape["pot_id"], - }, - ], - response: v1PotsApplicationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsApplicationsRetrieve404Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/donations", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsDonationsRetrievePathParamsSchema.shape["pot_id"], - }, - ], - response: v1PotsDonationsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsDonationsRetrieve404Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/payouts", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsPayoutsRetrievePathParamsSchema.shape["pot_id"], - }, - ], - response: v1PotsPayoutsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsPayoutsRetrieve404Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/pots/:pot_id/sponsors", - description: ``, - requestFormat: "json", - parameters: [ - { - name: "pot_id", - description: ``, - type: "Path", - schema: v1PotsSponsorsRetrievePathParamsSchema.shape["pot_id"], - }, - ], - response: v1PotsSponsorsRetrieveQueryResponseSchema, - errors: [ - { - status: 404, - description: `Pot not found`, - schema: v1PotsSponsorsRetrieve404Schema, - }, - ], - }, - { - method: "get", - path: "/api/v1/stats", - description: ``, - requestFormat: "json", - parameters: [], - response: v1StatsRetrieveQueryResponseSchema, - errors: [ - { - status: 500, - description: `Internal server error`, - schema: v1StatsRetrieve500Schema, - }, - ], - }, -]); -export const getAPI = (baseUrl: string) => new Zodios(baseUrl, endpoints); -export const api = new Zodios(endpoints); -export default api; diff --git a/src/common/api/potlock/hooks.ts b/src/common/api/potlock/hooks.ts new file mode 100644 index 00000000..36470fef --- /dev/null +++ b/src/common/api/potlock/hooks.ts @@ -0,0 +1,14 @@ +import { REQUEST_CONFIG } from "@/common/constants"; + +import { swrHooks } from "./generated"; +import { ByAccountId, ByPotId } from "./types"; + +export const useAccount = ({ accountId }: ByAccountId) => + swrHooks.useV1AccountsRetrieve2(accountId, REQUEST_CONFIG); + +export const useAccounts = () => swrHooks.useV1AccountsRetrieve(REQUEST_CONFIG); + +export const usePot = ({ potId }: ByPotId) => + swrHooks.useV1PotsRetrieve2(potId, REQUEST_CONFIG); + +export const usePots = () => swrHooks.useV1PotsRetrieve(REQUEST_CONFIG); diff --git a/src/common/api/potlock/index.ts b/src/common/api/potlock/index.ts index eba0d7e8..869651af 100644 --- a/src/common/api/potlock/index.ts +++ b/src/common/api/potlock/index.ts @@ -1,20 +1,3 @@ -import { ZodiosHooks } from "@zodios/react"; -import { infer as FromSchema } from "zod"; - -import { accountSchema, potSchema } from "./generated"; -import { getAPI } from "./generated/zodios"; -import { POTLOCK_API_ENDPOINT } from "../../constants"; +export * as potlock from "./hooks"; export * from "./generated"; -export * from "./generated/zodios"; - -export type Account = FromSchema; - -export type AccountId = Account["id"]; - -export type Pot = FromSchema; - -export type PotId = Pot["id"]; - -const client = getAPI(POTLOCK_API_ENDPOINT); - -export const { useQuery: usePotlockQuery } = new ZodiosHooks("Potlock", client); +export * from "./types"; diff --git a/src/common/api/potlock/types.ts b/src/common/api/potlock/types.ts new file mode 100644 index 00000000..1fff46bc --- /dev/null +++ b/src/common/api/potlock/types.ts @@ -0,0 +1,13 @@ +import { Account, Pot } from "./generated"; + +export type AccountId = Account["id"]; + +export interface ByAccountId { + accountId: AccountId; +} + +export type PotId = Pot["id"]; + +export interface ByPotId { + potId: PotId; +} diff --git a/src/common/constants.ts b/src/common/constants.ts index e65c5e91..b2ee19e9 100644 --- a/src/common/constants.ts +++ b/src/common/constants.ts @@ -5,8 +5,11 @@ import { utils } from "near-api-js"; * Docs: https://dev.potlock.io/api/schema/swagger-ui/ */ export const POTLOCK_API_ENDPOINT = - process.env.NEXT_PUBLIC_API_ENDPOINT ?? - "http://ec2-100-27-57-47.compute-1.amazonaws.com/api/v1"; + "https://dev.potlock.io" ?? "https://test-dev.potlock.io"; + +export const REQUEST_CONFIG = { + client: { baseURL: POTLOCK_API_ENDPOINT }, +}; // NETWORK export const NETWORK = (process.env.NEXT_PUBLIC_NETWORK || diff --git a/src/common/hooks/useGetAccounts.ts b/src/common/hooks/useGetAccounts.ts deleted file mode 100644 index 2b249719..00000000 --- a/src/common/hooks/useGetAccounts.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { useQuery } from "@tanstack/react-query"; - -import { getAccounts } from "@/common/api/potlock/account"; - -const useGetAccounts = () => { - const accounts = useQuery({ - queryKey: ["getAccounts"], - queryFn: getAccounts, - }); - return accounts; -}; - -export default useGetAccounts; diff --git a/src/common/hooks/useIsClient.ts b/src/common/lib/useIsClient.ts similarity index 100% rename from src/common/hooks/useIsClient.ts rename to src/common/lib/useIsClient.ts diff --git a/src/modules/auth/providers/AuthProvider.tsx b/src/modules/auth/providers/AuthProvider.tsx index b0722869..31a6bb5b 100644 --- a/src/modules/auth/providers/AuthProvider.tsx +++ b/src/modules/auth/providers/AuthProvider.tsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react"; import { dispatch, resetStore } from "@/app/_store"; import { walletApi } from "@/common/contracts"; -import useIsClient from "@/common/hooks/useIsClient"; +import useIsClient from "@/common/lib/useIsClient"; import SuspenseLoading from "@/modules/auth/components/SuspenseLoading"; import { useAuth } from "../hooks/useAuth"; diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index e122640d..9984fd48 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -15,15 +15,15 @@ import { DonationToPot } from "./DonationToPot"; export type DonationModalProps = { accountId: AccountId } | { potId: PotId }; export const DonationModal = create((props: DonationModalProps) => { - const { hide, remove, visible } = useModal(); + const self = useModal(); const onCloseClick = useCallback(() => { - hide(); - remove(); - }, [hide, remove]); + self.hide(); + self.remove(); + }, [self]); return ( - + @@ -40,7 +40,13 @@ export const DonationModal = create((props: DonationModalProps) => { export const useDonationModal = (props: DonationModalProps) => { const { show } = useModal(DonationModal); - const openDonationModal = useCallback(() => show(props), [props, show]); + const openDonationModal = useCallback( + (event: React.MouseEvent) => { + event.preventDefault(); + show(props); + }, + [props, show], + ); return { openDonationModal }; }; diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index f8f9e494..327dd40c 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -1,38 +1,23 @@ -import { AccountId, usePotlockQuery } from "@/common/api/potlock"; +import { ByAccountId, potlock } from "@/common/api/potlock"; import { DialogDescription, DialogHeader, DialogTitle, } from "@/common/ui/components/dialog"; -export type DonationToAccountProps = { - accountId: AccountId; -}; - -export const DonationToAccount: React.FC = ({ - accountId, -}) => { - console.log(accountId); - - const { - isError, - isLoading, - data: account, - error, - } = usePotlockQuery("/api/v1/accounts/:account_id", { - params: { account_id: accountId }, - }); +export const DonationToAccount: React.FC = ({ accountId }) => { + const { isLoading, data: account, error } = potlock.useAccount({ accountId }); return isLoading ? ( "Loading..." ) : ( <> - {isError && error.message} + {error && error.message} {account !== undefined && ( <> - {`Donation to ${account.id}`} + {`Donation to ${account.near_social_profile_data.name}`} diff --git a/src/modules/donation/components/DonationToPot.tsx b/src/modules/donation/components/DonationToPot.tsx index 62b8c13b..550d336a 100644 --- a/src/modules/donation/components/DonationToPot.tsx +++ b/src/modules/donation/components/DonationToPot.tsx @@ -1,29 +1,20 @@ -import { PotId, usePotlockQuery } from "@/common/api/potlock"; +import { ByPotId, potlock } from "@/common/api/potlock"; import { DialogDescription, DialogHeader, DialogTitle, } from "@/common/ui/components/dialog"; -export type DonationToPotProps = { - potId: PotId; -}; - -export const DonationToPot: React.FC = ({ potId }) => { - const { - isError, - isLoading, - data: pot, - error, - } = usePotlockQuery("/api/v1/pots/:pot_id/", { params: { pot_id: potId } }); +export const DonationToPot: React.FC = ({ potId }) => { + const { isLoading, data: pot, error } = potlock.usePot({ potId }); return isLoading ? ( "Loading..." ) : ( <> - {isError && error.message} + {error && error.message} - {pot !== undefined && ( + {pot && ( <> {`Donation to Projects in ${pot.name}`} diff --git a/yarn.lock b/yarn.lock index de67e266..c4d1a677 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1135,7 +1135,7 @@ "@stoplight/yaml" "^4.3.0" remeda "^2.0.0" -"@kubb/react@2.19.5": +"@kubb/react@2.19.5", "@kubb/react@^2.19.5": version "2.19.5" resolved "https://registry.yarnpkg.com/@kubb/react/-/react-2.19.5.tgz#b3ff3dea8c3b2ba8d612e226d161c69dc6556a4d" integrity sha512-9reIEq0fyyAeCIUknhyjYTJGxRtnO2a70i5wBd80X3GHyT9dRA5eLDasd5m1NFGI8EsG+T77343IRg90z+YCag== @@ -1145,10 +1145,10 @@ "@kubb/parser-ts" "2.19.5" natural-orderby "^3.0.2" -"@kubb/swagger-ts@2.19.5": +"@kubb/swagger-client@2.19.5", "@kubb/swagger-client@^2.19.5": version "2.19.5" - resolved "https://registry.yarnpkg.com/@kubb/swagger-ts/-/swagger-ts-2.19.5.tgz#3eeb7b140eafba1496bf28b2a6f9c2d640bf4ae0" - integrity sha512-POjCRSPX4fKzZ+Ln0XEMeo6i7RM4RGm+n7nHo3iXP5ZxrD28fFgzWML7T7Eo6JT+2nNp+vG94NSkGDUo4PLpjQ== + resolved "https://registry.yarnpkg.com/@kubb/swagger-client/-/swagger-client-2.19.5.tgz#d4b5a7459e912af821ee2368fe82dfe73573714a" + integrity sha512-9TSoH1YfbBplim92MMsqNi2XLhLjXyOe3OXmb7MrtztvhafcsPhbUMC0lmy7pzl3OfAhOa537QSCyp6gv2r5rA== dependencies: "@kubb/core" "2.19.5" "@kubb/fs" "2.19.5" @@ -1156,12 +1156,12 @@ "@kubb/parser-ts" "2.19.5" "@kubb/plugin-oas" "2.19.5" "@kubb/react" "2.19.5" - "@kubb/types" "2.19.5" + "@kubb/swagger-ts" "2.19.5" -"@kubb/swagger-zod@2.19.5", "@kubb/swagger-zod@^2.19.5": +"@kubb/swagger-swr@^2.19.5": version "2.19.5" - resolved "https://registry.yarnpkg.com/@kubb/swagger-zod/-/swagger-zod-2.19.5.tgz#5cd8e41915a3be8fb799e6836245184f8a193476" - integrity sha512-tP/3HhopVHHbctR928vPGg4vWXlLfJmEKo948xD/CvLiq3G9G2K6b5VtiivwB20CjFvnofxWhYx6rYdJFWBC2g== + resolved "https://registry.yarnpkg.com/@kubb/swagger-swr/-/swagger-swr-2.19.5.tgz#b58da6480f5b40041bb79b447a10245a6549e7ac" + integrity sha512-UOqA/UCznf+op2PEmkcYmB9kMNqGHOp4G3O1llN2mgRTewZcUkLLzjxg3m4yboc6s8CWCwRGklyLntTio3PuyA== dependencies: "@kubb/core" "2.19.5" "@kubb/fs" "2.19.5" @@ -1169,12 +1169,14 @@ "@kubb/parser-ts" "2.19.5" "@kubb/plugin-oas" "2.19.5" "@kubb/react" "2.19.5" + "@kubb/swagger-client" "2.19.5" "@kubb/swagger-ts" "2.19.5" + "@kubb/swagger-zod" "2.19.5" -"@kubb/swagger-zodios@^2.19.5": +"@kubb/swagger-ts@2.19.5", "@kubb/swagger-ts@^2.19.5": version "2.19.5" - resolved "https://registry.yarnpkg.com/@kubb/swagger-zodios/-/swagger-zodios-2.19.5.tgz#8971576b4696b8e9b58af81bb67a5a7c7c0692ff" - integrity sha512-z5OcF4wD2RgWcrEK7lClsXy76BXUuPpq+ZXGtD2sKGQd3NIDqUQa8LMT4qWMDRwDBHrBV3FCDiFgxLU6JJnyTw== + resolved "https://registry.yarnpkg.com/@kubb/swagger-ts/-/swagger-ts-2.19.5.tgz#3eeb7b140eafba1496bf28b2a6f9c2d640bf4ae0" + integrity sha512-POjCRSPX4fKzZ+Ln0XEMeo6i7RM4RGm+n7nHo3iXP5ZxrD28fFgzWML7T7Eo6JT+2nNp+vG94NSkGDUo4PLpjQ== dependencies: "@kubb/core" "2.19.5" "@kubb/fs" "2.19.5" @@ -1182,7 +1184,20 @@ "@kubb/parser-ts" "2.19.5" "@kubb/plugin-oas" "2.19.5" "@kubb/react" "2.19.5" - "@kubb/swagger-zod" "2.19.5" + "@kubb/types" "2.19.5" + +"@kubb/swagger-zod@2.19.5", "@kubb/swagger-zod@^2.19.5": + version "2.19.5" + resolved "https://registry.yarnpkg.com/@kubb/swagger-zod/-/swagger-zod-2.19.5.tgz#5cd8e41915a3be8fb799e6836245184f8a193476" + integrity sha512-tP/3HhopVHHbctR928vPGg4vWXlLfJmEKo948xD/CvLiq3G9G2K6b5VtiivwB20CjFvnofxWhYx6rYdJFWBC2g== + dependencies: + "@kubb/core" "2.19.5" + "@kubb/fs" "2.19.5" + "@kubb/oas" "2.19.5" + "@kubb/parser-ts" "2.19.5" + "@kubb/plugin-oas" "2.19.5" + "@kubb/react" "2.19.5" + "@kubb/swagger-ts" "2.19.5" "@kubb/swagger@^2.19.5": version "2.19.5" @@ -3412,25 +3427,6 @@ dependencies: "@swc/counter" "^0.1.3" -"@tanstack/eslint-plugin-query@^5.35.6": - version "5.35.6" - resolved "https://registry.npmjs.org/@tanstack/eslint-plugin-query/-/eslint-plugin-query-5.35.6.tgz" - integrity sha512-XhVRLsJFJMWYNzArPzy1MWSpx2BSUnc8Zof+fvsgaAnWBy9tjNXH3DFftZoNMGA8Mw1dPIdDPkEQcSku3m80Jw== - dependencies: - "@typescript-eslint/utils" "^6.20.0" - -"@tanstack/query-core@5.40.0": - version "5.40.0" - resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.40.0.tgz#c74ae8303752ed4b5a0ab848ec71a0e6e8179f83" - integrity sha512-eD8K8jsOIq0Z5u/QbvOmfvKKE/XC39jA7yv4hgpl/1SRiU+J8QCIwgM/mEHuunQsL87dcvnHqSVLmf9pD4CiaA== - -"@tanstack/react-query@^5.40.1": - version "5.40.1" - resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.40.1.tgz#c1098791fea42bdc4c48938fb0131fa9ccc30fae" - integrity sha512-gOcmu+gpFd2taHrrgMM9RemLYYEDYfsCqszxCC0xtx+csDa4R8t7Hr7SfWXQP13S2sF+mOxySo/+FNXJFYBqcA== - dependencies: - "@tanstack/query-core" "5.40.0" - "@testing-library/dom@^10.0.0": version "10.1.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.1.0.tgz#2d073e49771ad614da999ca48f199919e5176fb6" @@ -3507,7 +3503,7 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3557,7 +3553,7 @@ "@types/prop-types" "*" csstype "^3.0.2" -"@types/semver@^7.3.12", "@types/semver@^7.5.0": +"@types/semver@^7.3.12": version "7.5.8" resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -3617,14 +3613,6 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@6.21.0": - version "6.21.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz" - integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== - dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - "@typescript-eslint/scope-manager@7.10.0": version "7.10.0" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.10.0.tgz" @@ -3656,11 +3644,6 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.21.0": - version "6.21.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz" - integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== - "@typescript-eslint/types@7.10.0": version "7.10.0" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.10.0.tgz" @@ -3684,20 +3667,6 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.21.0": - version "6.21.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz" - integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== - dependencies: - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/visitor-keys" "6.21.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - minimatch "9.0.3" - semver "^7.5.4" - ts-api-utils "^1.0.1" - "@typescript-eslint/typescript-estree@7.10.0": version "7.10.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.10.0.tgz" @@ -3750,19 +3719,6 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@^6.20.0": - version "6.21.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz" - integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== - dependencies: - "@eslint-community/eslint-utils" "^4.4.0" - "@types/json-schema" "^7.0.12" - "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.21.0" - "@typescript-eslint/types" "6.21.0" - "@typescript-eslint/typescript-estree" "6.21.0" - semver "^7.5.4" - "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" @@ -3771,14 +3727,6 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.21.0": - version "6.21.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz" - integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== - dependencies: - "@typescript-eslint/types" "6.21.0" - eslint-visitor-keys "^3.4.1" - "@typescript-eslint/visitor-keys@7.10.0": version "7.10.0" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.10.0.tgz" @@ -4122,16 +4070,6 @@ resolved "https://registry.yarnpkg.com/@zodios/core/-/core-10.9.6.tgz#64ad831216e6ffa71679ea6be8d1ed882bb04d83" integrity sha512-aH4rOdb3AcezN7ws8vDgBfGboZMk2JGGzEq/DtW65MhnRxyTGRuLJRWVQ/2KxDgWvV2F5oTkAS+5pnjKbl0n+A== -"@zodios/express@^10.6.1": - version "10.6.1" - resolved "https://registry.yarnpkg.com/@zodios/express/-/express-10.6.1.tgz#d5438f93fe907f283296f85c65df16456ed30b01" - integrity sha512-FNgOq8mvwvWP5B2howMKGm6EPp6i/0XFAsQnX5Ov3MLbanzD1oE4WJtBkTL3cmJYvD0nyykbWSeHOh51bCmhUA== - -"@zodios/react@^10.4.5": - version "10.4.5" - resolved "https://registry.yarnpkg.com/@zodios/react/-/react-10.4.5.tgz#e796152ee034f24facc5c8a156d98c81c43eaec5" - integrity sha512-2jisuquf30bEQg6KzhtYnoutXEQD9uD/I0vBO3d3AzL91SLhFTeHNSk2MwkBj0LL/wCIWt9v0sUL52OMv++EwQ== - abortcontroller-polyfill@^1.1.9: version "1.7.5" resolved "https://registry.npmjs.org/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz" @@ -4752,7 +4690,7 @@ cli-spinners@^2.9.2: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== -client-only@0.0.1: +client-only@0.0.1, client-only@^0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== @@ -8335,7 +8273,7 @@ react-dom@18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-dom@^18.2.0: +react-dom@^18.2.0, react-dom@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz" integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== @@ -8343,14 +8281,6 @@ react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.2" -react-dom@^18.3.1: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4" - integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw== - dependencies: - loose-envify "^1.1.0" - scheduler "^0.23.2" - react-error-overlay@6.0.9: version "6.0.9" resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz" @@ -8431,20 +8361,13 @@ react@18.2.0: dependencies: loose-envify "^1.1.0" -react@^18.2.0: +react@^18.2.0, react@^18.3.1: version "18.3.1" resolved "https://registry.npmjs.org/react/-/react-18.3.1.tgz" integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== dependencies: loose-envify "^1.1.0" -react@^18.3.1: - version "18.3.1" - resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891" - integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ== - dependencies: - loose-envify "^1.1.0" - read-cache@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz" @@ -9168,6 +9091,14 @@ swagger2openapi@^7.0.8: yaml "^1.10.0" yargs "^17.0.1" +swr@^2.2.5: + version "2.2.5" + resolved "https://registry.yarnpkg.com/swr/-/swr-2.2.5.tgz#063eea0e9939f947227d5ca760cc53696f46446b" + integrity sha512-QtxqyclFeAsxEUeZIYmsaQ0UjimSq1RZ9Un7I68/0ClKK/U3LoyQunwkQfJZr2fc22DfIXLNDc2wFyTEikCUpg== + dependencies: + client-only "^0.0.1" + use-sync-external-store "^1.2.0" + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -9664,7 +9595,7 @@ use-sidecar@^1.1.2: detect-node-es "^1.1.0" tslib "^2.0.0" -use-sync-external-store@^1.0.0: +use-sync-external-store@^1.0.0, use-sync-external-store@^1.2.0: version "1.2.2" resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz" integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== From 7a365a08ab05bc288a1843d304295578a28cb2e7 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Fri, 7 Jun 2024 20:05:16 +0400 Subject: [PATCH 07/84] fix: Use custom modal close callback --- src/common/ui/components/dialog.tsx | 11 ++++-- .../donation/components/DonationModal.tsx | 35 ++++++++----------- .../donation/components/DonationToAccount.tsx | 6 +++- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx index 073ef738..07d7656a 100644 --- a/src/common/ui/components/dialog.tsx +++ b/src/common/ui/components/dialog.tsx @@ -32,10 +32,16 @@ const DialogOverlay = forwardRef< )); DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; +export type DialogContentProps = React.ComponentPropsWithoutRef< + typeof DialogPrimitive.Content +> & { + onCloseClick: () => void; +}; + const DialogContent = forwardRef< React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( + DialogContentProps +>(({ className, children, onCloseClick, ...props }, ref) => ( { const self = useModal(); - const onCloseClick = useCallback(() => { + const close = useCallback(() => { self.hide(); self.remove(); }, [self]); return ( - - - + {"accountId" in props && ( )} @@ -38,15 +32,16 @@ export const DonationModal = create((props: DonationModalProps) => { }); export const useDonationModal = (props: DonationModalProps) => { - const { show } = useModal(DonationModal); - - const openDonationModal = useCallback( - (event: React.MouseEvent) => { - event.preventDefault(); - show(props); - }, - [props, show], - ); - - return { openDonationModal }; + const modal = useModal(DonationModal); + + return { + openDonationModal: useCallback( + (event: React.MouseEvent) => { + event.preventDefault(); + modal.show(props); + }, + + [modal, props], + ), + }; }; diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index 327dd40c..90fae8e4 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -5,7 +5,11 @@ import { DialogTitle, } from "@/common/ui/components/dialog"; -export const DonationToAccount: React.FC = ({ accountId }) => { +export type DonationToAccountProps = ByAccountId & {}; + +export const DonationToAccount: React.FC = ({ + accountId, +}) => { const { isLoading, data: account, error } = potlock.useAccount({ accountId }); return isLoading ? ( From 090fe07f1d6884f0f8b33983f2ac3f55cc363d2c Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Mon, 10 Jun 2024 01:58:48 +0400 Subject: [PATCH 08/84] wip: Update generated API bindings --- .../api/potlock/generated/hooks/index.ts | 2 +- .../hooks/useV1AccountsActivePotsRetrieve.ts | 112 ++-- .../generated/hooks/useV1AccountsRetrieve.ts | 97 ++-- .../generated/hooks/useV1AccountsRetrieve2.ts | 97 ++-- .../generated/hooks/useV1DonorsRetrieve.ts | 102 ++-- .../hooks/useV1ListsRegistrationsRetrieve.ts | 100 ++-- .../generated/hooks/useV1ListsRetrieve.ts | 97 ++-- .../generated/hooks/useV1ListsRetrieve2.ts | 97 ++-- .../hooks/useV1PotsApplicationsRetrieve.ts | 99 ++-- .../hooks/useV1PotsDonationsRetrieve.ts | 99 ++-- .../hooks/useV1PotsPayoutsRetrieve.ts | 99 ++-- .../generated/hooks/useV1PotsRetrieve.ts | 90 ++-- .../generated/hooks/useV1PotsRetrieve2.ts | 96 ++-- .../hooks/useV1PotsSponsorsRetrieve.ts | 99 ++-- .../generated/hooks/useV1StatsRetrieve.ts | 97 ++-- .../api/potlock/generated/types/Account.ts | 54 +- .../types/DefaultRegistrationStatusEnum.ts | 13 +- .../api/potlock/generated/types/Donation.ts | 222 ++++---- .../api/potlock/generated/types/List.ts | 102 ++-- .../generated/types/ListRegistration.ts | 102 ++-- src/common/api/potlock/generated/types/Pot.ts | 340 ++++++------ .../potlock/generated/types/PotApplication.ts | 82 +-- .../types/PotApplicationStatusEnum.ts | 11 +- .../api/potlock/generated/types/PotPayout.ts | 82 +-- .../potlock/generated/types/StatsResponse.ts | 42 +- .../potlock/generated/types/StatusF24Enum.ts | 12 +- .../types/V1AccountsActivePotsRetrieve.ts | 38 +- .../generated/types/V1AccountsRetrieve.ts | 14 +- .../generated/types/V1AccountsRetrieve2.ts | 26 +- .../generated/types/V1DonorsRetrieve.ts | 26 +- .../types/V1ListsRegistrationsRetrieve.ts | 26 +- .../generated/types/V1ListsRetrieve.ts | 14 +- .../generated/types/V1ListsRetrieve2.ts | 26 +- .../types/V1PotsApplicationsRetrieve.ts | 24 +- .../types/V1PotsDonationsRetrieve.ts | 24 +- .../generated/types/V1PotsPayoutsRetrieve.ts | 24 +- .../potlock/generated/types/V1PotsRetrieve.ts | 10 +- .../generated/types/V1PotsRetrieve2.ts | 24 +- .../generated/types/V1PotsSponsorsRetrieve.ts | 24 +- .../generated/types/V1StatsRetrieve.ts | 14 +- .../api/potlock/generated/types/index.ts | 2 +- .../potlock/generated/zod/accountSchema.ts | 27 +- .../defaultRegistrationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/donationSchema.ts | 65 ++- src/common/api/potlock/generated/zod/index.ts | 2 +- .../generated/zod/listRegistrationSchema.ts | 34 +- .../api/potlock/generated/zod/listSchema.ts | 30 +- .../api/potlock/generated/zod/operations.ts | 484 ++++++++++-------- .../generated/zod/potApplicationSchema.ts | 22 +- .../zod/potApplicationStatusEnumSchema.ts | 8 +- .../potlock/generated/zod/potPayoutSchema.ts | 17 +- .../api/potlock/generated/zod/potSchema.ts | 124 ++++- .../generated/zod/statsResponseSchema.ts | 9 +- .../generated/zod/statusF24EnumSchema.ts | 8 +- .../zod/v1AccountsActivePotsRetrieveSchema.ts | 18 +- .../zod/v1AccountsRetrieve2Schema.ts | 10 +- .../generated/zod/v1AccountsRetrieveSchema.ts | 7 +- .../generated/zod/v1DonorsRetrieveSchema.ts | 15 +- .../zod/v1ListsRegistrationsRetrieveSchema.ts | 14 +- .../generated/zod/v1ListsRetrieve2Schema.ts | 8 +- .../generated/zod/v1ListsRetrieveSchema.ts | 7 +- .../zod/v1PotsApplicationsRetrieveSchema.ts | 14 +- .../zod/v1PotsDonationsRetrieveSchema.ts | 14 +- .../zod/v1PotsPayoutsRetrieveSchema.ts | 14 +- .../generated/zod/v1PotsRetrieve2Schema.ts | 6 +- .../generated/zod/v1PotsRetrieveSchema.ts | 7 +- .../zod/v1PotsSponsorsRetrieveSchema.ts | 14 +- .../generated/zod/v1StatsRetrieveSchema.ts | 7 +- 68 files changed, 2278 insertions(+), 1476 deletions(-) diff --git a/src/common/api/potlock/generated/hooks/index.ts b/src/common/api/potlock/generated/hooks/index.ts index 5e2d3004..64f128a5 100644 --- a/src/common/api/potlock/generated/hooks/index.ts +++ b/src/common/api/potlock/generated/hooks/index.ts @@ -11,4 +11,4 @@ export * from "./useV1PotsPayoutsRetrieve"; export * from "./useV1PotsRetrieve"; export * from "./useV1PotsRetrieve2"; export * from "./useV1PotsSponsorsRetrieve"; -export * from "./useV1StatsRetrieve"; \ No newline at end of file +export * from "./useV1StatsRetrieve"; diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts index 919ed0cc..f0c895b7 100644 --- a/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1AccountsActivePotsRetrieve.ts @@ -1,52 +1,84 @@ -import { v1AccountsActivePotsRetrieveQueryResponseSchema } from "../zod/v1AccountsActivePotsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1AccountsActivePotsRetrieveQueryResponse, V1AccountsActivePotsRetrievePathParams, V1AccountsActivePotsRetrieveQueryParams, V1AccountsActivePotsRetrieve404, V1AccountsActivePotsRetrieve500 } from "../types/V1AccountsActivePotsRetrieve"; - type V1AccountsActivePotsRetrieveClient = typeof client; +import type { + V1AccountsActivePotsRetrieve404, + V1AccountsActivePotsRetrieve500, + V1AccountsActivePotsRetrievePathParams, + V1AccountsActivePotsRetrieveQueryParams, + V1AccountsActivePotsRetrieveQueryResponse, +} from "../types/V1AccountsActivePotsRetrieve"; +import { v1AccountsActivePotsRetrieveQueryResponseSchema } from "../zod/v1AccountsActivePotsRetrieveSchema"; + +type V1AccountsActivePotsRetrieveClient = typeof client< + V1AccountsActivePotsRetrieveQueryResponse, + V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500, + never +>; type V1AccountsActivePotsRetrieve = { - data: V1AccountsActivePotsRetrieveQueryResponse; - error: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; - request: never; - pathParams: V1AccountsActivePotsRetrievePathParams; - queryParams: V1AccountsActivePotsRetrieveQueryParams; - headerParams: never; - response: V1AccountsActivePotsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1AccountsActivePotsRetrieveQueryResponse; + error: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; + request: never; + pathParams: V1AccountsActivePotsRetrievePathParams; + queryParams: V1AccountsActivePotsRetrieveQueryParams; + headerParams: never; + response: V1AccountsActivePotsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1AccountsActivePotsRetrieveQueryOptions(accountId: V1AccountsActivePotsRetrievePathParams["account_id"], params?: V1AccountsActivePotsRetrieve["queryParams"], options: V1AccountsActivePotsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/accounts/${accountId}/active_pots`, - params, - ...options - }); - return v1AccountsActivePotsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1AccountsActivePotsRetrieveQueryOptions< + TData = V1AccountsActivePotsRetrieve["response"], +>( + accountId: V1AccountsActivePotsRetrievePathParams["account_id"], + params?: V1AccountsActivePotsRetrieve["queryParams"], + options: V1AccountsActivePotsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts/${accountId}/active_pots`, + params, + ...options, + }); + return v1AccountsActivePotsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/accounts/:account_id/active_pots */ -export function useV1AccountsActivePotsRetrieve(accountId: V1AccountsActivePotsRetrievePathParams["account_id"], params?: V1AccountsActivePotsRetrieve["queryParams"], options?: { +export function useV1AccountsActivePotsRetrieve< + TData = V1AccountsActivePotsRetrieve["response"], +>( + accountId: V1AccountsActivePotsRetrievePathParams["account_id"], + params?: V1AccountsActivePotsRetrieve["queryParams"], + options?: { query?: SWRConfiguration; client?: V1AccountsActivePotsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/accounts/${accountId}/active_pots`; - const query = useSWR(shouldFetch ? [url, params] : null, { - ...v1AccountsActivePotsRetrieveQueryOptions(accountId, params, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/accounts/${accountId}/active_pots`; + const query = useSWR< + TData, + V1AccountsActivePotsRetrieve["error"], + [typeof url, typeof params] | null + >(shouldFetch ? [url, params] : null, { + ...v1AccountsActivePotsRetrieveQueryOptions( + accountId, + params, + clientOptions, + ), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts index c544f965..e89eca1b 100644 --- a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve.ts @@ -1,48 +1,69 @@ -import { v1AccountsRetrieveQueryResponseSchema } from "../zod/v1AccountsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1AccountsRetrieveQueryResponse, V1AccountsRetrieve500 } from "../types/V1AccountsRetrieve"; - type V1AccountsRetrieveClient = typeof client; +import type { + V1AccountsRetrieve500, + V1AccountsRetrieveQueryResponse, +} from "../types/V1AccountsRetrieve"; +import { v1AccountsRetrieveQueryResponseSchema } from "../zod/v1AccountsRetrieveSchema"; + +type V1AccountsRetrieveClient = typeof client< + V1AccountsRetrieveQueryResponse, + V1AccountsRetrieve500, + never +>; type V1AccountsRetrieve = { - data: V1AccountsRetrieveQueryResponse; - error: V1AccountsRetrieve500; - request: never; - pathParams: never; - queryParams: never; - headerParams: never; - response: V1AccountsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1AccountsRetrieveQueryResponse; + error: V1AccountsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1AccountsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1AccountsRetrieveQueryOptions(options: V1AccountsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/accounts`, - ...options - }); - return v1AccountsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1AccountsRetrieveQueryOptions< + TData = V1AccountsRetrieve["response"], +>( + options: V1AccountsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts`, + ...options, + }); + return v1AccountsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/accounts */ -export function useV1AccountsRetrieve(options?: { - query?: SWRConfiguration; - client?: V1AccountsRetrieve["client"]["parameters"]; - shouldFetch?: boolean; +export function useV1AccountsRetrieve< + TData = V1AccountsRetrieve["response"], +>(options?: { + query?: SWRConfiguration; + client?: V1AccountsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; }): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/accounts`; - const query = useSWR(shouldFetch ? url : null, { - ...v1AccountsRetrieveQueryOptions(clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/accounts`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1AccountsRetrieveQueryOptions(clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts index be5943db..6c215b53 100644 --- a/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts +++ b/src/common/api/potlock/generated/hooks/useV1AccountsRetrieve2.ts @@ -1,48 +1,73 @@ -import { v1AccountsRetrieve2QueryResponseSchema } from "../zod/v1AccountsRetrieve2Schema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1AccountsRetrieve2QueryResponse, V1AccountsRetrieve2PathParams, V1AccountsRetrieve2404, V1AccountsRetrieve2500 } from "../types/V1AccountsRetrieve2"; - type V1AccountsRetrieve2Client = typeof client; +import type { + V1AccountsRetrieve2404, + V1AccountsRetrieve2500, + V1AccountsRetrieve2PathParams, + V1AccountsRetrieve2QueryResponse, +} from "../types/V1AccountsRetrieve2"; +import { v1AccountsRetrieve2QueryResponseSchema } from "../zod/v1AccountsRetrieve2Schema"; + +type V1AccountsRetrieve2Client = typeof client< + V1AccountsRetrieve2QueryResponse, + V1AccountsRetrieve2404 | V1AccountsRetrieve2500, + never +>; type V1AccountsRetrieve2 = { - data: V1AccountsRetrieve2QueryResponse; - error: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; - request: never; - pathParams: V1AccountsRetrieve2PathParams; - queryParams: never; - headerParams: never; - response: V1AccountsRetrieve2QueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1AccountsRetrieve2QueryResponse; + error: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; + request: never; + pathParams: V1AccountsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1AccountsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1AccountsRetrieve2QueryOptions(accountId: V1AccountsRetrieve2PathParams["account_id"], options: V1AccountsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/accounts/${accountId}`, - ...options - }); - return v1AccountsRetrieve2QueryResponseSchema.parse(res.data); - }, - }; +export function v1AccountsRetrieve2QueryOptions< + TData = V1AccountsRetrieve2["response"], +>( + accountId: V1AccountsRetrieve2PathParams["account_id"], + options: V1AccountsRetrieve2["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/accounts/${accountId}`, + ...options, + }); + return v1AccountsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/accounts/:account_id */ -export function useV1AccountsRetrieve2(accountId: V1AccountsRetrieve2PathParams["account_id"], options?: { +export function useV1AccountsRetrieve2( + accountId: V1AccountsRetrieve2PathParams["account_id"], + options?: { query?: SWRConfiguration; client?: V1AccountsRetrieve2["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/accounts/${accountId}`; - const query = useSWR(shouldFetch ? url : null, { - ...v1AccountsRetrieve2QueryOptions(accountId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/accounts/${accountId}`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1AccountsRetrieve2QueryOptions(accountId, clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts index 17b7ce0d..4736bad9 100644 --- a/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1DonorsRetrieve.ts @@ -1,52 +1,74 @@ -import { v1DonorsRetrieveQueryResponseSchema } from "../zod/v1DonorsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1DonorsRetrieveQueryResponse, V1DonorsRetrieveQueryParams, V1DonorsRetrieve500 } from "../types/V1DonorsRetrieve"; - type V1DonorsRetrieveClient = typeof client; +import type { + V1DonorsRetrieve500, + V1DonorsRetrieveQueryParams, + V1DonorsRetrieveQueryResponse, +} from "../types/V1DonorsRetrieve"; +import { v1DonorsRetrieveQueryResponseSchema } from "../zod/v1DonorsRetrieveSchema"; + +type V1DonorsRetrieveClient = typeof client< + V1DonorsRetrieveQueryResponse, + V1DonorsRetrieve500, + never +>; type V1DonorsRetrieve = { - data: V1DonorsRetrieveQueryResponse; - error: V1DonorsRetrieve500; - request: never; - pathParams: never; - queryParams: V1DonorsRetrieveQueryParams; - headerParams: never; - response: V1DonorsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1DonorsRetrieveQueryResponse; + error: V1DonorsRetrieve500; + request: never; + pathParams: never; + queryParams: V1DonorsRetrieveQueryParams; + headerParams: never; + response: V1DonorsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1DonorsRetrieveQueryOptions(params?: V1DonorsRetrieve["queryParams"], options: V1DonorsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/donors`, - params, - ...options - }); - return v1DonorsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1DonorsRetrieveQueryOptions< + TData = V1DonorsRetrieve["response"], +>( + params?: V1DonorsRetrieve["queryParams"], + options: V1DonorsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/donors`, + params, + ...options, + }); + return v1DonorsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/donors */ -export function useV1DonorsRetrieve(params?: V1DonorsRetrieve["queryParams"], options?: { +export function useV1DonorsRetrieve( + params?: V1DonorsRetrieve["queryParams"], + options?: { query?: SWRConfiguration; client?: V1DonorsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/donors`; - const query = useSWR(shouldFetch ? [url, params] : null, { - ...v1DonorsRetrieveQueryOptions(params, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/donors`; + const query = useSWR< + TData, + V1DonorsRetrieve["error"], + [typeof url, typeof params] | null + >(shouldFetch ? [url, params] : null, { + ...v1DonorsRetrieveQueryOptions(params, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts index 0294fcf6..9365c920 100644 --- a/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1ListsRegistrationsRetrieve.ts @@ -1,48 +1,76 @@ -import { v1ListsRegistrationsRetrieveQueryResponseSchema } from "../zod/v1ListsRegistrationsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1ListsRegistrationsRetrieveQueryResponse, V1ListsRegistrationsRetrievePathParams, V1ListsRegistrationsRetrieve404, V1ListsRegistrationsRetrieve500 } from "../types/V1ListsRegistrationsRetrieve"; - type V1ListsRegistrationsRetrieveClient = typeof client; +import type { + V1ListsRegistrationsRetrieve404, + V1ListsRegistrationsRetrieve500, + V1ListsRegistrationsRetrievePathParams, + V1ListsRegistrationsRetrieveQueryResponse, +} from "../types/V1ListsRegistrationsRetrieve"; +import { v1ListsRegistrationsRetrieveQueryResponseSchema } from "../zod/v1ListsRegistrationsRetrieveSchema"; + +type V1ListsRegistrationsRetrieveClient = typeof client< + V1ListsRegistrationsRetrieveQueryResponse, + V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500, + never +>; type V1ListsRegistrationsRetrieve = { - data: V1ListsRegistrationsRetrieveQueryResponse; - error: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; - request: never; - pathParams: V1ListsRegistrationsRetrievePathParams; - queryParams: never; - headerParams: never; - response: V1ListsRegistrationsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1ListsRegistrationsRetrieveQueryResponse; + error: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; + request: never; + pathParams: V1ListsRegistrationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1ListsRegistrationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1ListsRegistrationsRetrieveQueryOptions(listId: V1ListsRegistrationsRetrievePathParams["list_id"], options: V1ListsRegistrationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/lists/${listId}/registrations`, - ...options - }); - return v1ListsRegistrationsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1ListsRegistrationsRetrieveQueryOptions< + TData = V1ListsRegistrationsRetrieve["response"], +>( + listId: V1ListsRegistrationsRetrievePathParams["list_id"], + options: V1ListsRegistrationsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists/${listId}/registrations`, + ...options, + }); + return v1ListsRegistrationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/lists/:list_id/registrations */ -export function useV1ListsRegistrationsRetrieve(listId: V1ListsRegistrationsRetrievePathParams["list_id"], options?: { +export function useV1ListsRegistrationsRetrieve< + TData = V1ListsRegistrationsRetrieve["response"], +>( + listId: V1ListsRegistrationsRetrievePathParams["list_id"], + options?: { query?: SWRConfiguration; client?: V1ListsRegistrationsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/lists/${listId}/registrations`; - const query = useSWR(shouldFetch ? url : null, { - ...v1ListsRegistrationsRetrieveQueryOptions(listId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/lists/${listId}/registrations`; + const query = useSWR< + TData, + V1ListsRegistrationsRetrieve["error"], + typeof url | null + >(shouldFetch ? url : null, { + ...v1ListsRegistrationsRetrieveQueryOptions(listId, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts index 4e359141..1da9838e 100644 --- a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve.ts @@ -1,48 +1,69 @@ -import { v1ListsRetrieveQueryResponseSchema } from "../zod/v1ListsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1ListsRetrieveQueryResponse, V1ListsRetrieve500 } from "../types/V1ListsRetrieve"; - type V1ListsRetrieveClient = typeof client; +import type { + V1ListsRetrieve500, + V1ListsRetrieveQueryResponse, +} from "../types/V1ListsRetrieve"; +import { v1ListsRetrieveQueryResponseSchema } from "../zod/v1ListsRetrieveSchema"; + +type V1ListsRetrieveClient = typeof client< + V1ListsRetrieveQueryResponse, + V1ListsRetrieve500, + never +>; type V1ListsRetrieve = { - data: V1ListsRetrieveQueryResponse; - error: V1ListsRetrieve500; - request: never; - pathParams: never; - queryParams: never; - headerParams: never; - response: V1ListsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1ListsRetrieveQueryResponse; + error: V1ListsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1ListsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1ListsRetrieveQueryOptions(options: V1ListsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/lists`, - ...options - }); - return v1ListsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1ListsRetrieveQueryOptions< + TData = V1ListsRetrieve["response"], +>( + options: V1ListsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists`, + ...options, + }); + return v1ListsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/lists */ -export function useV1ListsRetrieve(options?: { - query?: SWRConfiguration; - client?: V1ListsRetrieve["client"]["parameters"]; - shouldFetch?: boolean; +export function useV1ListsRetrieve< + TData = V1ListsRetrieve["response"], +>(options?: { + query?: SWRConfiguration; + client?: V1ListsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; }): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/lists`; - const query = useSWR(shouldFetch ? url : null, { - ...v1ListsRetrieveQueryOptions(clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/lists`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1ListsRetrieveQueryOptions(clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts index bad7706e..571d404e 100644 --- a/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts +++ b/src/common/api/potlock/generated/hooks/useV1ListsRetrieve2.ts @@ -1,48 +1,73 @@ -import { v1ListsRetrieve2QueryResponseSchema } from "../zod/v1ListsRetrieve2Schema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1ListsRetrieve2QueryResponse, V1ListsRetrieve2PathParams, V1ListsRetrieve2404, V1ListsRetrieve2500 } from "../types/V1ListsRetrieve2"; - type V1ListsRetrieve2Client = typeof client; +import type { + V1ListsRetrieve2404, + V1ListsRetrieve2500, + V1ListsRetrieve2PathParams, + V1ListsRetrieve2QueryResponse, +} from "../types/V1ListsRetrieve2"; +import { v1ListsRetrieve2QueryResponseSchema } from "../zod/v1ListsRetrieve2Schema"; + +type V1ListsRetrieve2Client = typeof client< + V1ListsRetrieve2QueryResponse, + V1ListsRetrieve2404 | V1ListsRetrieve2500, + never +>; type V1ListsRetrieve2 = { - data: V1ListsRetrieve2QueryResponse; - error: V1ListsRetrieve2404 | V1ListsRetrieve2500; - request: never; - pathParams: V1ListsRetrieve2PathParams; - queryParams: never; - headerParams: never; - response: V1ListsRetrieve2QueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1ListsRetrieve2QueryResponse; + error: V1ListsRetrieve2404 | V1ListsRetrieve2500; + request: never; + pathParams: V1ListsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1ListsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1ListsRetrieve2QueryOptions(listId: V1ListsRetrieve2PathParams["list_id"], options: V1ListsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/lists/${listId}`, - ...options - }); - return v1ListsRetrieve2QueryResponseSchema.parse(res.data); - }, - }; +export function v1ListsRetrieve2QueryOptions< + TData = V1ListsRetrieve2["response"], +>( + listId: V1ListsRetrieve2PathParams["list_id"], + options: V1ListsRetrieve2["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/lists/${listId}`, + ...options, + }); + return v1ListsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/lists/:list_id */ -export function useV1ListsRetrieve2(listId: V1ListsRetrieve2PathParams["list_id"], options?: { +export function useV1ListsRetrieve2( + listId: V1ListsRetrieve2PathParams["list_id"], + options?: { query?: SWRConfiguration; client?: V1ListsRetrieve2["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/lists/${listId}`; - const query = useSWR(shouldFetch ? url : null, { - ...v1ListsRetrieve2QueryOptions(listId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/lists/${listId}`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1ListsRetrieve2QueryOptions(listId, clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts index 3e56aa9d..fe0269c0 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsApplicationsRetrieve.ts @@ -1,48 +1,75 @@ -import { v1PotsApplicationsRetrieveQueryResponseSchema } from "../zod/v1PotsApplicationsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1PotsApplicationsRetrieveQueryResponse, V1PotsApplicationsRetrievePathParams, V1PotsApplicationsRetrieve404 } from "../types/V1PotsApplicationsRetrieve"; - type V1PotsApplicationsRetrieveClient = typeof client; +import type { + V1PotsApplicationsRetrieve404, + V1PotsApplicationsRetrievePathParams, + V1PotsApplicationsRetrieveQueryResponse, +} from "../types/V1PotsApplicationsRetrieve"; +import { v1PotsApplicationsRetrieveQueryResponseSchema } from "../zod/v1PotsApplicationsRetrieveSchema"; + +type V1PotsApplicationsRetrieveClient = typeof client< + V1PotsApplicationsRetrieveQueryResponse, + V1PotsApplicationsRetrieve404, + never +>; type V1PotsApplicationsRetrieve = { - data: V1PotsApplicationsRetrieveQueryResponse; - error: V1PotsApplicationsRetrieve404; - request: never; - pathParams: V1PotsApplicationsRetrievePathParams; - queryParams: never; - headerParams: never; - response: V1PotsApplicationsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsApplicationsRetrieveQueryResponse; + error: V1PotsApplicationsRetrieve404; + request: never; + pathParams: V1PotsApplicationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsApplicationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsApplicationsRetrieveQueryOptions(potId: V1PotsApplicationsRetrievePathParams["pot_id"], options: V1PotsApplicationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots/${potId}/applications`, - ...options - }); - return v1PotsApplicationsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsApplicationsRetrieveQueryOptions< + TData = V1PotsApplicationsRetrieve["response"], +>( + potId: V1PotsApplicationsRetrievePathParams["pot_id"], + options: V1PotsApplicationsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/applications`, + ...options, + }); + return v1PotsApplicationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots/:pot_id/applications */ -export function useV1PotsApplicationsRetrieve(potId: V1PotsApplicationsRetrievePathParams["pot_id"], options?: { +export function useV1PotsApplicationsRetrieve< + TData = V1PotsApplicationsRetrieve["response"], +>( + potId: V1PotsApplicationsRetrievePathParams["pot_id"], + options?: { query?: SWRConfiguration; client?: V1PotsApplicationsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots/${potId}/applications`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsApplicationsRetrieveQueryOptions(potId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots/${potId}/applications`; + const query = useSWR< + TData, + V1PotsApplicationsRetrieve["error"], + typeof url | null + >(shouldFetch ? url : null, { + ...v1PotsApplicationsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts index 16ce675f..842238a8 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsDonationsRetrieve.ts @@ -1,48 +1,75 @@ -import { v1PotsDonationsRetrieveQueryResponseSchema } from "../zod/v1PotsDonationsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1PotsDonationsRetrieveQueryResponse, V1PotsDonationsRetrievePathParams, V1PotsDonationsRetrieve404 } from "../types/V1PotsDonationsRetrieve"; - type V1PotsDonationsRetrieveClient = typeof client; +import type { + V1PotsDonationsRetrieve404, + V1PotsDonationsRetrievePathParams, + V1PotsDonationsRetrieveQueryResponse, +} from "../types/V1PotsDonationsRetrieve"; +import { v1PotsDonationsRetrieveQueryResponseSchema } from "../zod/v1PotsDonationsRetrieveSchema"; + +type V1PotsDonationsRetrieveClient = typeof client< + V1PotsDonationsRetrieveQueryResponse, + V1PotsDonationsRetrieve404, + never +>; type V1PotsDonationsRetrieve = { - data: V1PotsDonationsRetrieveQueryResponse; - error: V1PotsDonationsRetrieve404; - request: never; - pathParams: V1PotsDonationsRetrievePathParams; - queryParams: never; - headerParams: never; - response: V1PotsDonationsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsDonationsRetrieveQueryResponse; + error: V1PotsDonationsRetrieve404; + request: never; + pathParams: V1PotsDonationsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsDonationsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsDonationsRetrieveQueryOptions(potId: V1PotsDonationsRetrievePathParams["pot_id"], options: V1PotsDonationsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots/${potId}/donations`, - ...options - }); - return v1PotsDonationsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsDonationsRetrieveQueryOptions< + TData = V1PotsDonationsRetrieve["response"], +>( + potId: V1PotsDonationsRetrievePathParams["pot_id"], + options: V1PotsDonationsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/donations`, + ...options, + }); + return v1PotsDonationsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots/:pot_id/donations */ -export function useV1PotsDonationsRetrieve(potId: V1PotsDonationsRetrievePathParams["pot_id"], options?: { +export function useV1PotsDonationsRetrieve< + TData = V1PotsDonationsRetrieve["response"], +>( + potId: V1PotsDonationsRetrievePathParams["pot_id"], + options?: { query?: SWRConfiguration; client?: V1PotsDonationsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots/${potId}/donations`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsDonationsRetrieveQueryOptions(potId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots/${potId}/donations`; + const query = useSWR< + TData, + V1PotsDonationsRetrieve["error"], + typeof url | null + >(shouldFetch ? url : null, { + ...v1PotsDonationsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts index 7c78bb38..b04daef5 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsPayoutsRetrieve.ts @@ -1,48 +1,75 @@ -import { v1PotsPayoutsRetrieveQueryResponseSchema } from "../zod/v1PotsPayoutsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1PotsPayoutsRetrieveQueryResponse, V1PotsPayoutsRetrievePathParams, V1PotsPayoutsRetrieve404 } from "../types/V1PotsPayoutsRetrieve"; - type V1PotsPayoutsRetrieveClient = typeof client; +import type { + V1PotsPayoutsRetrieve404, + V1PotsPayoutsRetrievePathParams, + V1PotsPayoutsRetrieveQueryResponse, +} from "../types/V1PotsPayoutsRetrieve"; +import { v1PotsPayoutsRetrieveQueryResponseSchema } from "../zod/v1PotsPayoutsRetrieveSchema"; + +type V1PotsPayoutsRetrieveClient = typeof client< + V1PotsPayoutsRetrieveQueryResponse, + V1PotsPayoutsRetrieve404, + never +>; type V1PotsPayoutsRetrieve = { - data: V1PotsPayoutsRetrieveQueryResponse; - error: V1PotsPayoutsRetrieve404; - request: never; - pathParams: V1PotsPayoutsRetrievePathParams; - queryParams: never; - headerParams: never; - response: V1PotsPayoutsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsPayoutsRetrieveQueryResponse; + error: V1PotsPayoutsRetrieve404; + request: never; + pathParams: V1PotsPayoutsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsPayoutsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsPayoutsRetrieveQueryOptions(potId: V1PotsPayoutsRetrievePathParams["pot_id"], options: V1PotsPayoutsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots/${potId}/payouts`, - ...options - }); - return v1PotsPayoutsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsPayoutsRetrieveQueryOptions< + TData = V1PotsPayoutsRetrieve["response"], +>( + potId: V1PotsPayoutsRetrievePathParams["pot_id"], + options: V1PotsPayoutsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/payouts`, + ...options, + }); + return v1PotsPayoutsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots/:pot_id/payouts */ -export function useV1PotsPayoutsRetrieve(potId: V1PotsPayoutsRetrievePathParams["pot_id"], options?: { +export function useV1PotsPayoutsRetrieve< + TData = V1PotsPayoutsRetrieve["response"], +>( + potId: V1PotsPayoutsRetrievePathParams["pot_id"], + options?: { query?: SWRConfiguration; client?: V1PotsPayoutsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots/${potId}/payouts`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsPayoutsRetrieveQueryOptions(potId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots/${potId}/payouts`; + const query = useSWR< + TData, + V1PotsPayoutsRetrieve["error"], + typeof url | null + >(shouldFetch ? url : null, { + ...v1PotsPayoutsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts index be06c39b..14569b3e 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve.ts @@ -1,48 +1,64 @@ -import { v1PotsRetrieveQueryResponseSchema } from "../zod/v1PotsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; + import type { V1PotsRetrieveQueryResponse } from "../types/V1PotsRetrieve"; +import { v1PotsRetrieveQueryResponseSchema } from "../zod/v1PotsRetrieveSchema"; - type V1PotsRetrieveClient = typeof client; +type V1PotsRetrieveClient = typeof client< + V1PotsRetrieveQueryResponse, + never, + never +>; type V1PotsRetrieve = { - data: V1PotsRetrieveQueryResponse; - error: never; - request: never; - pathParams: never; - queryParams: never; - headerParams: never; - response: V1PotsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsRetrieveQueryResponse; + error: never; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1PotsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsRetrieveQueryOptions(options: V1PotsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots`, - ...options - }); - return v1PotsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsRetrieveQueryOptions( + options: V1PotsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots`, + ...options, + }); + return v1PotsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots */ -export function useV1PotsRetrieve(options?: { - query?: SWRConfiguration; - client?: V1PotsRetrieve["client"]["parameters"]; - shouldFetch?: boolean; +export function useV1PotsRetrieve< + TData = V1PotsRetrieve["response"], +>(options?: { + query?: SWRConfiguration; + client?: V1PotsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; }): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsRetrieveQueryOptions(clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1PotsRetrieveQueryOptions(clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts index f3274012..b183be74 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsRetrieve2.ts @@ -1,48 +1,72 @@ -import { v1PotsRetrieve2QueryResponseSchema } from "../zod/v1PotsRetrieve2Schema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1PotsRetrieve2QueryResponse, V1PotsRetrieve2PathParams, V1PotsRetrieve2404 } from "../types/V1PotsRetrieve2"; - type V1PotsRetrieve2Client = typeof client; +import type { + V1PotsRetrieve2404, + V1PotsRetrieve2PathParams, + V1PotsRetrieve2QueryResponse, +} from "../types/V1PotsRetrieve2"; +import { v1PotsRetrieve2QueryResponseSchema } from "../zod/v1PotsRetrieve2Schema"; + +type V1PotsRetrieve2Client = typeof client< + V1PotsRetrieve2QueryResponse, + V1PotsRetrieve2404, + never +>; type V1PotsRetrieve2 = { - data: V1PotsRetrieve2QueryResponse; - error: V1PotsRetrieve2404; - request: never; - pathParams: V1PotsRetrieve2PathParams; - queryParams: never; - headerParams: never; - response: V1PotsRetrieve2QueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsRetrieve2QueryResponse; + error: V1PotsRetrieve2404; + request: never; + pathParams: V1PotsRetrieve2PathParams; + queryParams: never; + headerParams: never; + response: V1PotsRetrieve2QueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsRetrieve2QueryOptions(potId: V1PotsRetrieve2PathParams["pot_id"], options: V1PotsRetrieve2["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots/${potId}/`, - ...options - }); - return v1PotsRetrieve2QueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsRetrieve2QueryOptions< + TData = V1PotsRetrieve2["response"], +>( + potId: V1PotsRetrieve2PathParams["pot_id"], + options: V1PotsRetrieve2["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/`, + ...options, + }); + return v1PotsRetrieve2QueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots/:pot_id/ */ -export function useV1PotsRetrieve2(potId: V1PotsRetrieve2PathParams["pot_id"], options?: { +export function useV1PotsRetrieve2( + potId: V1PotsRetrieve2PathParams["pot_id"], + options?: { query?: SWRConfiguration; client?: V1PotsRetrieve2["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots/${potId}/`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsRetrieve2QueryOptions(potId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots/${potId}/`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1PotsRetrieve2QueryOptions(potId, clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts index 22bdeacc..5293e71e 100644 --- a/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1PotsSponsorsRetrieve.ts @@ -1,48 +1,75 @@ -import { v1PotsSponsorsRetrieveQueryResponseSchema } from "../zod/v1PotsSponsorsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1PotsSponsorsRetrieveQueryResponse, V1PotsSponsorsRetrievePathParams, V1PotsSponsorsRetrieve404 } from "../types/V1PotsSponsorsRetrieve"; - type V1PotsSponsorsRetrieveClient = typeof client; +import type { + V1PotsSponsorsRetrieve404, + V1PotsSponsorsRetrievePathParams, + V1PotsSponsorsRetrieveQueryResponse, +} from "../types/V1PotsSponsorsRetrieve"; +import { v1PotsSponsorsRetrieveQueryResponseSchema } from "../zod/v1PotsSponsorsRetrieveSchema"; + +type V1PotsSponsorsRetrieveClient = typeof client< + V1PotsSponsorsRetrieveQueryResponse, + V1PotsSponsorsRetrieve404, + never +>; type V1PotsSponsorsRetrieve = { - data: V1PotsSponsorsRetrieveQueryResponse; - error: V1PotsSponsorsRetrieve404; - request: never; - pathParams: V1PotsSponsorsRetrievePathParams; - queryParams: never; - headerParams: never; - response: V1PotsSponsorsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1PotsSponsorsRetrieveQueryResponse; + error: V1PotsSponsorsRetrieve404; + request: never; + pathParams: V1PotsSponsorsRetrievePathParams; + queryParams: never; + headerParams: never; + response: V1PotsSponsorsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1PotsSponsorsRetrieveQueryOptions(potId: V1PotsSponsorsRetrievePathParams["pot_id"], options: V1PotsSponsorsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/pots/${potId}/sponsors`, - ...options - }); - return v1PotsSponsorsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1PotsSponsorsRetrieveQueryOptions< + TData = V1PotsSponsorsRetrieve["response"], +>( + potId: V1PotsSponsorsRetrievePathParams["pot_id"], + options: V1PotsSponsorsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/pots/${potId}/sponsors`, + ...options, + }); + return v1PotsSponsorsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/pots/:pot_id/sponsors */ -export function useV1PotsSponsorsRetrieve(potId: V1PotsSponsorsRetrievePathParams["pot_id"], options?: { +export function useV1PotsSponsorsRetrieve< + TData = V1PotsSponsorsRetrieve["response"], +>( + potId: V1PotsSponsorsRetrievePathParams["pot_id"], + options?: { query?: SWRConfiguration; client?: V1PotsSponsorsRetrieve["client"]["parameters"]; shouldFetch?: boolean; -}): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/pots/${potId}/sponsors`; - const query = useSWR(shouldFetch ? url : null, { - ...v1PotsSponsorsRetrieveQueryOptions(potId, clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + }, +): SWRResponse { + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/pots/${potId}/sponsors`; + const query = useSWR< + TData, + V1PotsSponsorsRetrieve["error"], + typeof url | null + >(shouldFetch ? url : null, { + ...v1PotsSponsorsRetrieveQueryOptions(potId, clientOptions), + ...queryOptions, + }); + return query; +} diff --git a/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts b/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts index f995ef8e..727bb303 100644 --- a/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts +++ b/src/common/api/potlock/generated/hooks/useV1StatsRetrieve.ts @@ -1,48 +1,69 @@ -import { v1StatsRetrieveQueryResponseSchema } from "../zod/v1StatsRetrieveSchema"; -import useSWR from "swr"; import client from "@kubb/swagger-client/client"; +import useSWR from "swr"; import type { SWRConfiguration, SWRResponse } from "swr"; -import type { V1StatsRetrieveQueryResponse, V1StatsRetrieve500 } from "../types/V1StatsRetrieve"; - type V1StatsRetrieveClient = typeof client; +import type { + V1StatsRetrieve500, + V1StatsRetrieveQueryResponse, +} from "../types/V1StatsRetrieve"; +import { v1StatsRetrieveQueryResponseSchema } from "../zod/v1StatsRetrieveSchema"; + +type V1StatsRetrieveClient = typeof client< + V1StatsRetrieveQueryResponse, + V1StatsRetrieve500, + never +>; type V1StatsRetrieve = { - data: V1StatsRetrieveQueryResponse; - error: V1StatsRetrieve500; - request: never; - pathParams: never; - queryParams: never; - headerParams: never; - response: V1StatsRetrieveQueryResponse; - client: { - parameters: Partial[0]>; - return: Awaited>; - }; + data: V1StatsRetrieveQueryResponse; + error: V1StatsRetrieve500; + request: never; + pathParams: never; + queryParams: never; + headerParams: never; + response: V1StatsRetrieveQueryResponse; + client: { + parameters: Partial[0]>; + return: Awaited>; + }; }; -export function v1StatsRetrieveQueryOptions(options: V1StatsRetrieve["client"]["parameters"] = {}): SWRConfiguration { - return { - fetcher: async () => { - const res = await client({ - method: "get", - url: `/api/v1/stats`, - ...options - }); - return v1StatsRetrieveQueryResponseSchema.parse(res.data); - }, - }; +export function v1StatsRetrieveQueryOptions< + TData = V1StatsRetrieve["response"], +>( + options: V1StatsRetrieve["client"]["parameters"] = {}, +): SWRConfiguration { + return { + fetcher: async () => { + const res = await client({ + method: "get", + url: `/api/v1/stats`, + ...options, + }); + return v1StatsRetrieveQueryResponseSchema.parse(res.data); + }, + }; } /** * @link /api/v1/stats */ -export function useV1StatsRetrieve(options?: { - query?: SWRConfiguration; - client?: V1StatsRetrieve["client"]["parameters"]; - shouldFetch?: boolean; +export function useV1StatsRetrieve< + TData = V1StatsRetrieve["response"], +>(options?: { + query?: SWRConfiguration; + client?: V1StatsRetrieve["client"]["parameters"]; + shouldFetch?: boolean; }): SWRResponse { - const { query: queryOptions, client: clientOptions = {}, shouldFetch = true } = options ?? {}; - const url = `/api/v1/stats`; - const query = useSWR(shouldFetch ? url : null, { - ...v1StatsRetrieveQueryOptions(clientOptions), - ...queryOptions - }); - return query; -} \ No newline at end of file + const { + query: queryOptions, + client: clientOptions = {}, + shouldFetch = true, + } = options ?? {}; + const url = `/api/v1/stats`; + const query = useSWR( + shouldFetch ? url : null, + { + ...v1StatsRetrieveQueryOptions(clientOptions), + ...queryOptions, + }, + ); + return query; +} diff --git a/src/common/api/potlock/generated/types/Account.ts b/src/common/api/potlock/generated/types/Account.ts index caf8fbaf..4b570e28 100644 --- a/src/common/api/potlock/generated/types/Account.ts +++ b/src/common/api/potlock/generated/types/Account.ts @@ -1,28 +1,28 @@ export type Account = { - /** - * @description On-chain account address. - * @type string - */ - id: string; - /** - * @description Total donations received in USD. - * @type string | undefined, decimal - */ - total_donations_in_usd?: string; - /** - * @description Total donated in USD. - * @type string | undefined, decimal - */ - total_donations_out_usd?: string; - /** - * @description Total matching pool allocations in USD. - * @type string | undefined, decimal - */ - total_matching_pool_allocations_usd?: string; - /** - * @description Number of donors. - * @type integer | undefined - */ - donors_count?: number; - near_social_profile_data?: any; -}; \ No newline at end of file + /** + * @description On-chain account address. + * @type string + */ + id: string; + /** + * @description Total donations received in USD. + * @type string | undefined, decimal + */ + total_donations_in_usd?: string; + /** + * @description Total donated in USD. + * @type string | undefined, decimal + */ + total_donations_out_usd?: string; + /** + * @description Total matching pool allocations in USD. + * @type string | undefined, decimal + */ + total_matching_pool_allocations_usd?: string; + /** + * @description Number of donors. + * @type integer | undefined + */ + donors_count?: number; + near_social_profile_data?: any; +}; diff --git a/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts b/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts index 229e0fca..55d36b6a 100644 --- a/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts +++ b/src/common/api/potlock/generated/types/DefaultRegistrationStatusEnum.ts @@ -1,8 +1,9 @@ export const defaultRegistrationStatusEnum = { - "Pending": "Pending", - "Approved": "Approved", - "Rejected": "Rejected", - "Graylisted": "Graylisted", - "Blacklisted": "Blacklisted" + Pending: "Pending", + Approved: "Approved", + Rejected: "Rejected", + Graylisted: "Graylisted", + Blacklisted: "Blacklisted", } as const; -export type DefaultRegistrationStatusEnum = (typeof defaultRegistrationStatusEnum)[keyof typeof defaultRegistrationStatusEnum]; \ No newline at end of file +export type DefaultRegistrationStatusEnum = + (typeof defaultRegistrationStatusEnum)[keyof typeof defaultRegistrationStatusEnum]; diff --git a/src/common/api/potlock/generated/types/Donation.ts b/src/common/api/potlock/generated/types/Donation.ts index 582582fd..3ad638e3 100644 --- a/src/common/api/potlock/generated/types/Donation.ts +++ b/src/common/api/potlock/generated/types/Donation.ts @@ -1,112 +1,112 @@ export type Donation = { - /** - * @description Donation id. - * @type integer - */ - readonly id: number; - /** - * @description Donation id in contract - * @type integer - */ - on_chain_id: number; - /** - * @description Total amount. - * @type string - */ - total_amount: string; - /** - * @description Total amount in USD. - * @type string, decimal - */ - total_amount_usd?: string | null; - /** - * @description Net amount. - * @type string - */ - net_amount: string; - /** - * @description Net amount in USD. - * @type string, decimal - */ - net_amount_usd?: string | null; - /** - * @description Matching pool. - * @type boolean - */ - matching_pool: boolean; - /** - * @description Donation message. - * @type string - */ - message?: string | null; - /** - * @description Donation date. - * @type string, date-time - */ - donated_at: string; - /** - * @description Protocol fee. - * @type string - */ - protocol_fee: string; - /** - * @description Protocol fee in USD. - * @type string, decimal - */ - protocol_fee_usd?: string | null; - /** - * @description Referrer fee. - * @type string - */ - referrer_fee?: string | null; - /** - * @description Referrer fee in USD. - * @type string, decimal - */ - referrer_fee_usd?: string | null; - /** - * @description Chef fee. - * @type string - */ - chef_fee?: string | null; - /** - * @description Chef fee in USD. - * @type string, decimal - */ - chef_fee_usd?: string | null; - /** - * @description Transaction hash. - * @type string - */ - tx_hash: string; - /** - * @description Donor. - * @type string - */ - donor: string; - /** - * @description Donation FT. - * @type string - */ - ft: string; - /** - * @description Donation pot. - * @type string - */ - pot: string | null; - /** - * @description Donation recipient. - * @type string - */ - recipient?: string | null; - /** - * @description Donation referrer. - * @type string - */ - referrer?: string | null; - /** - * @description Donation chef. - * @type string - */ - chef?: string | null; -}; \ No newline at end of file + /** + * @description Donation id. + * @type integer + */ + readonly id: number; + /** + * @description Donation id in contract + * @type integer + */ + on_chain_id: number; + /** + * @description Total amount. + * @type string + */ + total_amount: string; + /** + * @description Total amount in USD. + * @type string, decimal + */ + total_amount_usd?: string | null; + /** + * @description Net amount. + * @type string + */ + net_amount: string; + /** + * @description Net amount in USD. + * @type string, decimal + */ + net_amount_usd?: string | null; + /** + * @description Matching pool. + * @type boolean + */ + matching_pool: boolean; + /** + * @description Donation message. + * @type string + */ + message?: string | null; + /** + * @description Donation date. + * @type string, date-time + */ + donated_at: string; + /** + * @description Protocol fee. + * @type string + */ + protocol_fee: string; + /** + * @description Protocol fee in USD. + * @type string, decimal + */ + protocol_fee_usd?: string | null; + /** + * @description Referrer fee. + * @type string + */ + referrer_fee?: string | null; + /** + * @description Referrer fee in USD. + * @type string, decimal + */ + referrer_fee_usd?: string | null; + /** + * @description Chef fee. + * @type string + */ + chef_fee?: string | null; + /** + * @description Chef fee in USD. + * @type string, decimal + */ + chef_fee_usd?: string | null; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Donor. + * @type string + */ + donor: string; + /** + * @description Donation FT. + * @type string + */ + ft: string; + /** + * @description Donation pot. + * @type string + */ + pot: string | null; + /** + * @description Donation recipient. + * @type string + */ + recipient?: string | null; + /** + * @description Donation referrer. + * @type string + */ + referrer?: string | null; + /** + * @description Donation chef. + * @type string + */ + chef?: string | null; +}; diff --git a/src/common/api/potlock/generated/types/List.ts b/src/common/api/potlock/generated/types/List.ts index 9ef6a664..eb068392 100644 --- a/src/common/api/potlock/generated/types/List.ts +++ b/src/common/api/potlock/generated/types/List.ts @@ -1,53 +1,53 @@ import { DefaultRegistrationStatusEnum } from "./DefaultRegistrationStatusEnum"; - export type List = { - /** - * @description List id. - * @type integer - */ - id: number; - /** - * @description List name. - * @type string - */ - name: string; - /** - * @description List description. - * @type string - */ - description?: string | null; - /** - * @description Cover image url. - * @type string, uri - */ - cover_image_url?: string | null; - /** - * @description Admin only registrations. - * @type boolean - */ - admin_only_registrations: boolean; - /** - * @description Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted - */ - default_registration_status: DefaultRegistrationStatusEnum; - /** - * @description List creation date. - * @type string, date-time - */ - created_at: string; - /** - * @description List last update date. - * @type string, date-time - */ - updated_at: string; - /** - * @description List owner. - * @type string - */ - owner: string; - /** - * @description List admins. - * @type array - */ - admins: string[]; -}; \ No newline at end of file +export type List = { + /** + * @description List id. + * @type integer + */ + id: number; + /** + * @description List name. + * @type string + */ + name: string; + /** + * @description List description. + * @type string + */ + description?: string | null; + /** + * @description Cover image url. + * @type string, uri + */ + cover_image_url?: string | null; + /** + * @description Admin only registrations. + * @type boolean + */ + admin_only_registrations: boolean; + /** + * @description Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ + default_registration_status: DefaultRegistrationStatusEnum; + /** + * @description List creation date. + * @type string, date-time + */ + created_at: string; + /** + * @description List last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description List owner. + * @type string + */ + owner: string; + /** + * @description List admins. + * @type array + */ + admins: string[]; +}; diff --git a/src/common/api/potlock/generated/types/ListRegistration.ts b/src/common/api/potlock/generated/types/ListRegistration.ts index 751e84d8..b8344426 100644 --- a/src/common/api/potlock/generated/types/ListRegistration.ts +++ b/src/common/api/potlock/generated/types/ListRegistration.ts @@ -1,53 +1,53 @@ import { StatusF24Enum } from "./StatusF24Enum"; - export type ListRegistration = { - /** - * @description Registration id. - * @type integer - */ - readonly id: number; - /** - * @description Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted - */ - status: StatusF24Enum; - /** - * @description Registration submission date. - * @type string, date-time - */ - submitted_at: string; - /** - * @description Registration last update date. - * @type string, date-time - */ - updated_at: string; - /** - * @description Registrant notes. - * @type string - */ - registrant_notes?: string | null; - /** - * @description Admin notes. - * @type string - */ - admin_notes?: string | null; - /** - * @description Transaction hash. - * @type string - */ - tx_hash?: string | null; - /** - * @description List registered. - * @type integer - */ - list: number; - /** - * @description Account that registered on the list. - * @type string - */ - registrant: string; - /** - * @description Account that did the registration. - * @type string - */ - registered_by: string; -}; \ No newline at end of file +export type ListRegistration = { + /** + * @description Registration id. + * @type integer + */ + readonly id: number; + /** + * @description Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted + */ + status: StatusF24Enum; + /** + * @description Registration submission date. + * @type string, date-time + */ + submitted_at: string; + /** + * @description Registration last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description Registrant notes. + * @type string + */ + registrant_notes?: string | null; + /** + * @description Admin notes. + * @type string + */ + admin_notes?: string | null; + /** + * @description Transaction hash. + * @type string + */ + tx_hash?: string | null; + /** + * @description List registered. + * @type integer + */ + list: number; + /** + * @description Account that registered on the list. + * @type string + */ + registrant: string; + /** + * @description Account that did the registration. + * @type string + */ + registered_by: string; +}; diff --git a/src/common/api/potlock/generated/types/Pot.ts b/src/common/api/potlock/generated/types/Pot.ts index b1932261..bc673ab4 100644 --- a/src/common/api/potlock/generated/types/Pot.ts +++ b/src/common/api/potlock/generated/types/Pot.ts @@ -1,171 +1,171 @@ export type Pot = { - /** - * @description Pot account ID. - * @type string - */ - id: string; - /** - * @description Pot factory. - * @type string - */ - pot_factory: string; - /** - * @description Pot deployer. - * @type string - */ - deployer: string; - /** - * @description Pot deployment date. - * @type string, date-time - */ - deployed_at: string; - source_metadata: any; - /** - * @description Pot owner. - * @type string - */ - owner: string; - /** - * @description Pot admins. - * @type array - */ - admins: string[]; - /** - * @description Pot chef. - * @type string - */ - chef?: string | null; - /** - * @description Pot name. - * @type string - */ - name: string; - /** - * @description Pot description. - * @type string - */ - description: string; - /** - * @description Max approved applicants. - * @type integer - */ - max_approved_applicants: number; - /** - * @description Base currency. - * @type string - */ - base_currency?: string | null; - /** - * @description Pot application start date. - * @type string, date-time - */ - application_start: string; - /** - * @description Pot application end date. - * @type string, date-time - */ - application_end: string; - /** - * @description Pot matching round start date. - * @type string, date-time - */ - matching_round_start: string; - /** - * @description Pot matching round end date. - * @type string, date-time - */ - matching_round_end: string; - /** - * @description Registry provider. - * @type string - */ - registry_provider?: string | null; - /** - * @description Min matching pool donation amount. - * @type string - */ - min_matching_pool_donation_amount: string; - /** - * @description Sybil wrapper provider. - * @type string - */ - sybil_wrapper_provider?: string | null; - /** - * @description Custom sybil checks. - * @type string - */ - custom_sybil_checks?: string | null; - /** - * @description Custom min threshold score. - * @type integer - */ - custom_min_threshold_score?: number | null; - /** - * @description Referral fee matching pool basis points. - * @type integer - */ - referral_fee_matching_pool_basis_points: number; - /** - * @description Referral fee public round basis points. - * @type integer - */ - referral_fee_public_round_basis_points: number; - /** - * @description Chef fee basis points. - * @type integer - */ - chef_fee_basis_points: number; - /** - * @description Total matching pool. - * @type string - */ - total_matching_pool: string; - /** - * @type string, decimal - */ - total_matching_pool_usd: string; - /** - * @description Matching pool balance. - * @type string - */ - matching_pool_balance: string; - /** - * @description Matching pool donations count. - * @type integer - */ - matching_pool_donations_count: number; - /** - * @description Total public donations. - * @type string - */ - total_public_donations: string; - /** - * @type string, decimal - */ - total_public_donations_usd: string; - /** - * @description Public donations count. - * @type integer - */ - public_donations_count: number; - /** - * @description Pot cooldown end date. - * @type string, date-time - */ - cooldown_end?: string | null; - /** - * @description Pot cooldown period in ms. - * @type integer - */ - cooldown_period_ms?: number | null; - /** - * @description All paid out. - * @type boolean - */ - all_paid_out: boolean; - /** - * @description Protocol config provider. - * @type string - */ - protocol_config_provider?: string | null; -}; \ No newline at end of file + /** + * @description Pot account ID. + * @type string + */ + id: string; + /** + * @description Pot factory. + * @type string + */ + pot_factory: string; + /** + * @description Pot deployer. + * @type string + */ + deployer: string; + /** + * @description Pot deployment date. + * @type string, date-time + */ + deployed_at: string; + source_metadata: any; + /** + * @description Pot owner. + * @type string + */ + owner: string; + /** + * @description Pot admins. + * @type array + */ + admins: string[]; + /** + * @description Pot chef. + * @type string + */ + chef?: string | null; + /** + * @description Pot name. + * @type string + */ + name: string; + /** + * @description Pot description. + * @type string + */ + description: string; + /** + * @description Max approved applicants. + * @type integer + */ + max_approved_applicants: number; + /** + * @description Base currency. + * @type string + */ + base_currency?: string | null; + /** + * @description Pot application start date. + * @type string, date-time + */ + application_start: string; + /** + * @description Pot application end date. + * @type string, date-time + */ + application_end: string; + /** + * @description Pot matching round start date. + * @type string, date-time + */ + matching_round_start: string; + /** + * @description Pot matching round end date. + * @type string, date-time + */ + matching_round_end: string; + /** + * @description Registry provider. + * @type string + */ + registry_provider?: string | null; + /** + * @description Min matching pool donation amount. + * @type string + */ + min_matching_pool_donation_amount: string; + /** + * @description Sybil wrapper provider. + * @type string + */ + sybil_wrapper_provider?: string | null; + /** + * @description Custom sybil checks. + * @type string + */ + custom_sybil_checks?: string | null; + /** + * @description Custom min threshold score. + * @type integer + */ + custom_min_threshold_score?: number | null; + /** + * @description Referral fee matching pool basis points. + * @type integer + */ + referral_fee_matching_pool_basis_points: number; + /** + * @description Referral fee public round basis points. + * @type integer + */ + referral_fee_public_round_basis_points: number; + /** + * @description Chef fee basis points. + * @type integer + */ + chef_fee_basis_points: number; + /** + * @description Total matching pool. + * @type string + */ + total_matching_pool: string; + /** + * @type string, decimal + */ + total_matching_pool_usd: string; + /** + * @description Matching pool balance. + * @type string + */ + matching_pool_balance: string; + /** + * @description Matching pool donations count. + * @type integer + */ + matching_pool_donations_count: number; + /** + * @description Total public donations. + * @type string + */ + total_public_donations: string; + /** + * @type string, decimal + */ + total_public_donations_usd: string; + /** + * @description Public donations count. + * @type integer + */ + public_donations_count: number; + /** + * @description Pot cooldown end date. + * @type string, date-time + */ + cooldown_end?: string | null; + /** + * @description Pot cooldown period in ms. + * @type integer + */ + cooldown_period_ms?: number | null; + /** + * @description All paid out. + * @type boolean + */ + all_paid_out: boolean; + /** + * @description Protocol config provider. + * @type string + */ + protocol_config_provider?: string | null; +}; diff --git a/src/common/api/potlock/generated/types/PotApplication.ts b/src/common/api/potlock/generated/types/PotApplication.ts index 3aeb4a06..ae5b3fff 100644 --- a/src/common/api/potlock/generated/types/PotApplication.ts +++ b/src/common/api/potlock/generated/types/PotApplication.ts @@ -1,43 +1,43 @@ import { PotApplicationStatusEnum } from "./PotApplicationStatusEnum"; - export type PotApplication = { - /** - * @description Application id. - * @type integer - */ - readonly id: number; - /** - * @description Application message. - * @type string - */ - message?: string | null; - /** - * @description Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview - */ - status: PotApplicationStatusEnum; - /** - * @description Application submission date. - * @type string, date-time - */ - submitted_at: string; - /** - * @description Application last update date. - * @type string, date-time - */ - updated_at: string; - /** - * @description Transaction hash. - * @type string - */ - tx_hash: string; - /** - * @description Pot applied to. - * @type string - */ - pot: string; - /** - * @description Account that applied to the pot. - * @type string - */ - applicant: string; -}; \ No newline at end of file +export type PotApplication = { + /** + * @description Application id. + * @type integer + */ + readonly id: number; + /** + * @description Application message. + * @type string + */ + message?: string | null; + /** + * @description Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview + */ + status: PotApplicationStatusEnum; + /** + * @description Application submission date. + * @type string, date-time + */ + submitted_at: string; + /** + * @description Application last update date. + * @type string, date-time + */ + updated_at: string; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Pot applied to. + * @type string + */ + pot: string; + /** + * @description Account that applied to the pot. + * @type string + */ + applicant: string; +}; diff --git a/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts b/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts index c354db62..057ccfa6 100644 --- a/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts +++ b/src/common/api/potlock/generated/types/PotApplicationStatusEnum.ts @@ -1,7 +1,8 @@ export const potApplicationStatusEnum = { - "Pending": "Pending", - "Approved": "Approved", - "Rejected": "Rejected", - "InReview": "InReview" + Pending: "Pending", + Approved: "Approved", + Rejected: "Rejected", + InReview: "InReview", } as const; -export type PotApplicationStatusEnum = (typeof potApplicationStatusEnum)[keyof typeof potApplicationStatusEnum]; \ No newline at end of file +export type PotApplicationStatusEnum = + (typeof potApplicationStatusEnum)[keyof typeof potApplicationStatusEnum]; diff --git a/src/common/api/potlock/generated/types/PotPayout.ts b/src/common/api/potlock/generated/types/PotPayout.ts index 8da1ebbf..de6c2a53 100644 --- a/src/common/api/potlock/generated/types/PotPayout.ts +++ b/src/common/api/potlock/generated/types/PotPayout.ts @@ -1,42 +1,42 @@ export type PotPayout = { - /** - * @description Payout id. - * @type integer - */ - readonly id: number; - /** - * @description Payout amount. - * @type string - */ - amount: string; - /** - * @description Payout amount in USD. - * @type string, decimal - */ - amount_paid_usd?: string | null; - /** - * @description Payout date. - * @type string, date-time - */ - paid_at: string; - /** - * @description Transaction hash. - * @type string - */ - tx_hash: string; - /** - * @description Pot that this payout is for. - * @type string - */ - pot: string; - /** - * @description Payout recipient. - * @type string - */ - recipient: string; - /** - * @description Payout FT. - * @type string - */ - ft: string; -}; \ No newline at end of file + /** + * @description Payout id. + * @type integer + */ + readonly id: number; + /** + * @description Payout amount. + * @type string + */ + amount: string; + /** + * @description Payout amount in USD. + * @type string, decimal + */ + amount_paid_usd?: string | null; + /** + * @description Payout date. + * @type string, date-time + */ + paid_at: string; + /** + * @description Transaction hash. + * @type string + */ + tx_hash: string; + /** + * @description Pot that this payout is for. + * @type string + */ + pot: string; + /** + * @description Payout recipient. + * @type string + */ + recipient: string; + /** + * @description Payout FT. + * @type string + */ + ft: string; +}; diff --git a/src/common/api/potlock/generated/types/StatsResponse.ts b/src/common/api/potlock/generated/types/StatsResponse.ts index e356db58..3114f896 100644 --- a/src/common/api/potlock/generated/types/StatsResponse.ts +++ b/src/common/api/potlock/generated/types/StatsResponse.ts @@ -1,22 +1,22 @@ export type StatsResponse = { - /** - * @type number, double - */ - total_donations_usd: number; - /** - * @type number, double - */ - total_payouts_usd: number; - /** - * @type integer - */ - total_donations_count: number; - /** - * @type integer - */ - total_donors_count: number; - /** - * @type integer - */ - total_recipients_count: number; -}; \ No newline at end of file + /** + * @type number, double + */ + total_donations_usd: number; + /** + * @type number, double + */ + total_payouts_usd: number; + /** + * @type integer + */ + total_donations_count: number; + /** + * @type integer + */ + total_donors_count: number; + /** + * @type integer + */ + total_recipients_count: number; +}; diff --git a/src/common/api/potlock/generated/types/StatusF24Enum.ts b/src/common/api/potlock/generated/types/StatusF24Enum.ts index ba36df1c..10be2936 100644 --- a/src/common/api/potlock/generated/types/StatusF24Enum.ts +++ b/src/common/api/potlock/generated/types/StatusF24Enum.ts @@ -1,8 +1,8 @@ export const statusF24Enum = { - "Pending": "Pending", - "Approved": "Approved", - "Rejected": "Rejected", - "Graylisted": "Graylisted", - "Blacklisted": "Blacklisted" + Pending: "Pending", + Approved: "Approved", + Rejected: "Rejected", + Graylisted: "Graylisted", + Blacklisted: "Blacklisted", } as const; -export type StatusF24Enum = (typeof statusF24Enum)[keyof typeof statusF24Enum]; \ No newline at end of file +export type StatusF24Enum = (typeof statusF24Enum)[keyof typeof statusF24Enum]; diff --git a/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts b/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts index 8c9326e4..81b5b37a 100644 --- a/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1AccountsActivePotsRetrieve.ts @@ -1,37 +1,37 @@ import type { Pot } from "./Pot"; - export type V1AccountsActivePotsRetrievePathParams = { - /** - * @type string - */ - account_id: string; +export type V1AccountsActivePotsRetrievePathParams = { + /** + * @type string + */ + account_id: string; }; export type V1AccountsActivePotsRetrieveQueryParams = { - /** - * @description Filter by pot status - * @type string | undefined - */ - status?: string; + /** + * @description Filter by pot status + * @type string | undefined + */ + status?: string; }; /** * @description Returns paginated active pots for the account -*/ + */ export type V1AccountsActivePotsRetrieve200 = Pot[]; /** * @description Account not found -*/ + */ export type V1AccountsActivePotsRetrieve404 = any; /** * @description Internal server error -*/ + */ export type V1AccountsActivePotsRetrieve500 = any; /** * @description Returns paginated active pots for the account -*/ + */ export type V1AccountsActivePotsRetrieveQueryResponse = Pot[]; export type V1AccountsActivePotsRetrieveQuery = { - Response: V1AccountsActivePotsRetrieveQueryResponse; - PathParams: V1AccountsActivePotsRetrievePathParams; - QueryParams: V1AccountsActivePotsRetrieveQueryParams; - Errors: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; -}; \ No newline at end of file + Response: V1AccountsActivePotsRetrieveQueryResponse; + PathParams: V1AccountsActivePotsRetrievePathParams; + QueryParams: V1AccountsActivePotsRetrieveQueryParams; + Errors: V1AccountsActivePotsRetrieve404 | V1AccountsActivePotsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts b/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts index e2970a4b..30993f82 100644 --- a/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1AccountsRetrieve.ts @@ -1,18 +1,18 @@ import type { Account } from "./Account"; - /** +/** * @description Returns a list of accounts -*/ + */ export type V1AccountsRetrieve200 = Account[]; /** * @description Internal server error -*/ + */ export type V1AccountsRetrieve500 = any; /** * @description Returns a list of accounts -*/ + */ export type V1AccountsRetrieveQueryResponse = Account[]; export type V1AccountsRetrieveQuery = { - Response: V1AccountsRetrieveQueryResponse; - Errors: V1AccountsRetrieve500; -}; \ No newline at end of file + Response: V1AccountsRetrieveQueryResponse; + Errors: V1AccountsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts b/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts index 1fbe0e8d..5d23302f 100644 --- a/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts +++ b/src/common/api/potlock/generated/types/V1AccountsRetrieve2.ts @@ -1,29 +1,29 @@ import type { Account } from "./Account"; - export type V1AccountsRetrieve2PathParams = { - /** - * @type string - */ - account_id: string; +export type V1AccountsRetrieve2PathParams = { + /** + * @type string + */ + account_id: string; }; /** * @description Returns account details -*/ + */ export type V1AccountsRetrieve2200 = Account; /** * @description Account not found -*/ + */ export type V1AccountsRetrieve2404 = any; /** * @description Internal server error -*/ + */ export type V1AccountsRetrieve2500 = any; /** * @description Returns account details -*/ + */ export type V1AccountsRetrieve2QueryResponse = Account; export type V1AccountsRetrieve2Query = { - Response: V1AccountsRetrieve2QueryResponse; - PathParams: V1AccountsRetrieve2PathParams; - Errors: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; -}; \ No newline at end of file + Response: V1AccountsRetrieve2QueryResponse; + PathParams: V1AccountsRetrieve2PathParams; + Errors: V1AccountsRetrieve2404 | V1AccountsRetrieve2500; +}; diff --git a/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts b/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts index edcf4b34..2534ac05 100644 --- a/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1DonorsRetrieve.ts @@ -1,26 +1,26 @@ import type { Account } from "./Account"; - export type V1DonorsRetrieveQueryParams = { - /** - * @description Sort by field, e.g., most_donated_usd - * @type string | undefined - */ - sort?: string; +export type V1DonorsRetrieveQueryParams = { + /** + * @description Sort by field, e.g., most_donated_usd + * @type string | undefined + */ + sort?: string; }; /** * @description Returns a list of donor accounts -*/ + */ export type V1DonorsRetrieve200 = Account[]; /** * @description Internal server error -*/ + */ export type V1DonorsRetrieve500 = any; /** * @description Returns a list of donor accounts -*/ + */ export type V1DonorsRetrieveQueryResponse = Account[]; export type V1DonorsRetrieveQuery = { - Response: V1DonorsRetrieveQueryResponse; - QueryParams: V1DonorsRetrieveQueryParams; - Errors: V1DonorsRetrieve500; -}; \ No newline at end of file + Response: V1DonorsRetrieveQueryResponse; + QueryParams: V1DonorsRetrieveQueryParams; + Errors: V1DonorsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts b/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts index 440d6ce7..8428bb2b 100644 --- a/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1ListsRegistrationsRetrieve.ts @@ -1,29 +1,29 @@ import type { ListRegistration } from "./ListRegistration"; - export type V1ListsRegistrationsRetrievePathParams = { - /** - * @type integer - */ - list_id: number; +export type V1ListsRegistrationsRetrievePathParams = { + /** + * @type integer + */ + list_id: number; }; /** * @description Returns registrations for the list -*/ + */ export type V1ListsRegistrationsRetrieve200 = ListRegistration[]; /** * @description List not found -*/ + */ export type V1ListsRegistrationsRetrieve404 = any; /** * @description Internal server error -*/ + */ export type V1ListsRegistrationsRetrieve500 = any; /** * @description Returns registrations for the list -*/ + */ export type V1ListsRegistrationsRetrieveQueryResponse = ListRegistration[]; export type V1ListsRegistrationsRetrieveQuery = { - Response: V1ListsRegistrationsRetrieveQueryResponse; - PathParams: V1ListsRegistrationsRetrievePathParams; - Errors: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; -}; \ No newline at end of file + Response: V1ListsRegistrationsRetrieveQueryResponse; + PathParams: V1ListsRegistrationsRetrievePathParams; + Errors: V1ListsRegistrationsRetrieve404 | V1ListsRegistrationsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/V1ListsRetrieve.ts b/src/common/api/potlock/generated/types/V1ListsRetrieve.ts index d9ef728c..291407bf 100644 --- a/src/common/api/potlock/generated/types/V1ListsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1ListsRetrieve.ts @@ -1,18 +1,18 @@ import type { List } from "./List"; - /** +/** * @description Returns a list of lists -*/ + */ export type V1ListsRetrieve200 = List[]; /** * @description Internal server error -*/ + */ export type V1ListsRetrieve500 = any; /** * @description Returns a list of lists -*/ + */ export type V1ListsRetrieveQueryResponse = List[]; export type V1ListsRetrieveQuery = { - Response: V1ListsRetrieveQueryResponse; - Errors: V1ListsRetrieve500; -}; \ No newline at end of file + Response: V1ListsRetrieveQueryResponse; + Errors: V1ListsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts b/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts index ef1aa84b..dca2cd13 100644 --- a/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts +++ b/src/common/api/potlock/generated/types/V1ListsRetrieve2.ts @@ -1,29 +1,29 @@ import type { List } from "./List"; - export type V1ListsRetrieve2PathParams = { - /** - * @type integer - */ - list_id: number; +export type V1ListsRetrieve2PathParams = { + /** + * @type integer + */ + list_id: number; }; /** * @description Returns list details -*/ + */ export type V1ListsRetrieve2200 = List; /** * @description List not found -*/ + */ export type V1ListsRetrieve2404 = any; /** * @description Internal server error -*/ + */ export type V1ListsRetrieve2500 = any; /** * @description Returns list details -*/ + */ export type V1ListsRetrieve2QueryResponse = List; export type V1ListsRetrieve2Query = { - Response: V1ListsRetrieve2QueryResponse; - PathParams: V1ListsRetrieve2PathParams; - Errors: V1ListsRetrieve2404 | V1ListsRetrieve2500; -}; \ No newline at end of file + Response: V1ListsRetrieve2QueryResponse; + PathParams: V1ListsRetrieve2PathParams; + Errors: V1ListsRetrieve2404 | V1ListsRetrieve2500; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts index c979a5e3..cf2cc898 100644 --- a/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1PotsApplicationsRetrieve.ts @@ -1,25 +1,25 @@ import type { PotApplication } from "./PotApplication"; - export type V1PotsApplicationsRetrievePathParams = { - /** - * @type string - */ - pot_id: string; +export type V1PotsApplicationsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; }; /** * @description Returns applications for the pot -*/ + */ export type V1PotsApplicationsRetrieve200 = PotApplication[]; /** * @description Pot not found -*/ + */ export type V1PotsApplicationsRetrieve404 = any; /** * @description Returns applications for the pot -*/ + */ export type V1PotsApplicationsRetrieveQueryResponse = PotApplication[]; export type V1PotsApplicationsRetrieveQuery = { - Response: V1PotsApplicationsRetrieveQueryResponse; - PathParams: V1PotsApplicationsRetrievePathParams; - Errors: V1PotsApplicationsRetrieve404; -}; \ No newline at end of file + Response: V1PotsApplicationsRetrieveQueryResponse; + PathParams: V1PotsApplicationsRetrievePathParams; + Errors: V1PotsApplicationsRetrieve404; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts index 5952562b..3677c8f1 100644 --- a/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1PotsDonationsRetrieve.ts @@ -1,25 +1,25 @@ import type { Donation } from "./Donation"; - export type V1PotsDonationsRetrievePathParams = { - /** - * @type string - */ - pot_id: string; +export type V1PotsDonationsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; }; /** * @description Returns donations for the pot -*/ + */ export type V1PotsDonationsRetrieve200 = Donation[]; /** * @description Pot not found -*/ + */ export type V1PotsDonationsRetrieve404 = any; /** * @description Returns donations for the pot -*/ + */ export type V1PotsDonationsRetrieveQueryResponse = Donation[]; export type V1PotsDonationsRetrieveQuery = { - Response: V1PotsDonationsRetrieveQueryResponse; - PathParams: V1PotsDonationsRetrievePathParams; - Errors: V1PotsDonationsRetrieve404; -}; \ No newline at end of file + Response: V1PotsDonationsRetrieveQueryResponse; + PathParams: V1PotsDonationsRetrievePathParams; + Errors: V1PotsDonationsRetrieve404; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts index fda3d00b..2aced1b8 100644 --- a/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1PotsPayoutsRetrieve.ts @@ -1,25 +1,25 @@ import type { PotPayout } from "./PotPayout"; - export type V1PotsPayoutsRetrievePathParams = { - /** - * @type string - */ - pot_id: string; +export type V1PotsPayoutsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; }; /** * @description Returns payouts for the pot -*/ + */ export type V1PotsPayoutsRetrieve200 = PotPayout[]; /** * @description Pot not found -*/ + */ export type V1PotsPayoutsRetrieve404 = any; /** * @description Returns payouts for the pot -*/ + */ export type V1PotsPayoutsRetrieveQueryResponse = PotPayout[]; export type V1PotsPayoutsRetrieveQuery = { - Response: V1PotsPayoutsRetrieveQueryResponse; - PathParams: V1PotsPayoutsRetrievePathParams; - Errors: V1PotsPayoutsRetrieve404; -}; \ No newline at end of file + Response: V1PotsPayoutsRetrieveQueryResponse; + PathParams: V1PotsPayoutsRetrievePathParams; + Errors: V1PotsPayoutsRetrieve404; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsRetrieve.ts index d586ba4a..6dcbc13d 100644 --- a/src/common/api/potlock/generated/types/V1PotsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1PotsRetrieve.ts @@ -1,13 +1,13 @@ import type { Pot } from "./Pot"; - /** +/** * @description Returns a list of pots -*/ + */ export type V1PotsRetrieve200 = Pot[]; /** * @description Returns a list of pots -*/ + */ export type V1PotsRetrieveQueryResponse = Pot[]; export type V1PotsRetrieveQuery = { - Response: V1PotsRetrieveQueryResponse; -}; \ No newline at end of file + Response: V1PotsRetrieveQueryResponse; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts b/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts index d20b8f3e..5e307579 100644 --- a/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts +++ b/src/common/api/potlock/generated/types/V1PotsRetrieve2.ts @@ -1,25 +1,25 @@ import type { Pot } from "./Pot"; - export type V1PotsRetrieve2PathParams = { - /** - * @type string - */ - pot_id: string; +export type V1PotsRetrieve2PathParams = { + /** + * @type string + */ + pot_id: string; }; /** * @description Returns pot details -*/ + */ export type V1PotsRetrieve2200 = Pot; /** * @description Pot not found -*/ + */ export type V1PotsRetrieve2404 = any; /** * @description Returns pot details -*/ + */ export type V1PotsRetrieve2QueryResponse = Pot; export type V1PotsRetrieve2Query = { - Response: V1PotsRetrieve2QueryResponse; - PathParams: V1PotsRetrieve2PathParams; - Errors: V1PotsRetrieve2404; -}; \ No newline at end of file + Response: V1PotsRetrieve2QueryResponse; + PathParams: V1PotsRetrieve2PathParams; + Errors: V1PotsRetrieve2404; +}; diff --git a/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts b/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts index d16581cd..0d4a287e 100644 --- a/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1PotsSponsorsRetrieve.ts @@ -1,25 +1,25 @@ import type { Account } from "./Account"; - export type V1PotsSponsorsRetrievePathParams = { - /** - * @type string - */ - pot_id: string; +export type V1PotsSponsorsRetrievePathParams = { + /** + * @type string + */ + pot_id: string; }; /** * @description Returns sponsors for the pot -*/ + */ export type V1PotsSponsorsRetrieve200 = Account[]; /** * @description Pot not found -*/ + */ export type V1PotsSponsorsRetrieve404 = any; /** * @description Returns sponsors for the pot -*/ + */ export type V1PotsSponsorsRetrieveQueryResponse = Account[]; export type V1PotsSponsorsRetrieveQuery = { - Response: V1PotsSponsorsRetrieveQueryResponse; - PathParams: V1PotsSponsorsRetrievePathParams; - Errors: V1PotsSponsorsRetrieve404; -}; \ No newline at end of file + Response: V1PotsSponsorsRetrieveQueryResponse; + PathParams: V1PotsSponsorsRetrievePathParams; + Errors: V1PotsSponsorsRetrieve404; +}; diff --git a/src/common/api/potlock/generated/types/V1StatsRetrieve.ts b/src/common/api/potlock/generated/types/V1StatsRetrieve.ts index 442cdea8..686bfd05 100644 --- a/src/common/api/potlock/generated/types/V1StatsRetrieve.ts +++ b/src/common/api/potlock/generated/types/V1StatsRetrieve.ts @@ -1,18 +1,18 @@ import type { StatsResponse } from "./StatsResponse"; - /** +/** * @description Returns statistics data -*/ + */ export type V1StatsRetrieve200 = StatsResponse; /** * @description Internal server error -*/ + */ export type V1StatsRetrieve500 = any; /** * @description Returns statistics data -*/ + */ export type V1StatsRetrieveQueryResponse = StatsResponse; export type V1StatsRetrieveQuery = { - Response: V1StatsRetrieveQueryResponse; - Errors: V1StatsRetrieve500; -}; \ No newline at end of file + Response: V1StatsRetrieveQueryResponse; + Errors: V1StatsRetrieve500; +}; diff --git a/src/common/api/potlock/generated/types/index.ts b/src/common/api/potlock/generated/types/index.ts index c92f1218..0ce166f9 100644 --- a/src/common/api/potlock/generated/types/index.ts +++ b/src/common/api/potlock/generated/types/index.ts @@ -22,4 +22,4 @@ export * from "./V1PotsPayoutsRetrieve"; export * from "./V1PotsRetrieve"; export * from "./V1PotsRetrieve2"; export * from "./V1PotsSponsorsRetrieve"; -export * from "./V1StatsRetrieve"; \ No newline at end of file +export * from "./V1StatsRetrieve"; diff --git a/src/common/api/potlock/generated/zod/accountSchema.ts b/src/common/api/potlock/generated/zod/accountSchema.ts index 2288fc08..cd632532 100644 --- a/src/common/api/potlock/generated/zod/accountSchema.ts +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -1,4 +1,27 @@ 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(), "near_social_profile_data": z.any().nullish() }); \ 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(), +}); diff --git a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts index 373dcb4d..548b7732 100644 --- a/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/defaultRegistrationStatusEnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const defaultRegistrationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file +export const defaultRegistrationStatusEnumSchema = z + .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ); diff --git a/src/common/api/potlock/generated/zod/donationSchema.ts b/src/common/api/potlock/generated/zod/donationSchema.ts index 2f0ca1a0..c4c26aa3 100644 --- a/src/common/api/potlock/generated/zod/donationSchema.ts +++ b/src/common/api/potlock/generated/zod/donationSchema.ts @@ -1,4 +1,65 @@ import { z } from "zod"; - -export const donationSchema = z.object({ "id": z.number().describe("Donation id."), "on_chain_id": z.number().min(-2147483648).max(2147483647).describe("Donation id in contract"), "total_amount": z.string().max(64).describe("Total amount."), "total_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Total amount in USD.").nullable().nullish(), "net_amount": z.string().max(64).describe("Net amount."), "net_amount_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Net amount in USD.").nullable().nullish(), "matching_pool": z.boolean().describe("Matching pool."), "message": z.string().max(1024).describe("Donation message.").nullable().nullish(), "donated_at": z.string().datetime().describe("Donation date."), "protocol_fee": z.string().max(64).describe("Protocol fee."), "protocol_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Protocol fee in USD.").nullable().nullish(), "referrer_fee": z.string().max(64).describe("Referrer fee.").nullable().nullish(), "referrer_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Referrer fee in USD.").nullable().nullish(), "chef_fee": z.string().max(64).describe("Chef fee.").nullable().nullish(), "chef_fee_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Chef fee in USD.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash."), "donor": z.string().describe("Donor."), "ft": z.string().describe("Donation FT."), "pot": z.string().describe("Donation pot.").nullable(), "recipient": z.string().describe("Donation recipient.").nullable().nullish(), "referrer": z.string().describe("Donation referrer.").nullable().nullish(), "chef": z.string().describe("Donation chef.").nullable().nullish() }); \ No newline at end of file +export const donationSchema = z.object({ + id: z.number().describe("Donation id."), + on_chain_id: z + .number() + .min(-2147483648) + .max(2147483647) + .describe("Donation id in contract"), + total_amount: z.string().max(64).describe("Total amount."), + total_amount_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Total amount in USD.") + .nullable() + .nullish(), + net_amount: z.string().max(64).describe("Net amount."), + net_amount_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Net amount in USD.") + .nullable() + .nullish(), + matching_pool: z.boolean().describe("Matching pool."), + message: z + .string() + .max(1024) + .describe("Donation message.") + .nullable() + .nullish(), + donated_at: z.string().datetime().describe("Donation date."), + protocol_fee: z.string().max(64).describe("Protocol fee."), + protocol_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Protocol fee in USD.") + .nullable() + .nullish(), + referrer_fee: z + .string() + .max(64) + .describe("Referrer fee.") + .nullable() + .nullish(), + referrer_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Referrer fee in USD.") + .nullable() + .nullish(), + chef_fee: z.string().max(64).describe("Chef fee.").nullable().nullish(), + chef_fee_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Chef fee in USD.") + .nullable() + .nullish(), + tx_hash: z.string().max(64).describe("Transaction hash."), + donor: z.string().describe("Donor."), + ft: z.string().describe("Donation FT."), + pot: z.string().describe("Donation pot.").nullable(), + recipient: z.string().describe("Donation recipient.").nullable().nullish(), + referrer: z.string().describe("Donation referrer.").nullable().nullish(), + chef: z.string().describe("Donation chef.").nullable().nullish(), +}); diff --git a/src/common/api/potlock/generated/zod/index.ts b/src/common/api/potlock/generated/zod/index.ts index ae4fe072..43c1cf05 100644 --- a/src/common/api/potlock/generated/zod/index.ts +++ b/src/common/api/potlock/generated/zod/index.ts @@ -22,4 +22,4 @@ export * from "./v1PotsPayoutsRetrieveSchema"; export * from "./v1PotsRetrieve2Schema"; export * from "./v1PotsRetrieveSchema"; export * from "./v1PotsSponsorsRetrieveSchema"; -export * from "./v1StatsRetrieveSchema"; \ No newline at end of file +export * from "./v1StatsRetrieveSchema"; diff --git a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts index 912e05eb..3da1f8df 100644 --- a/src/common/api/potlock/generated/zod/listRegistrationSchema.ts +++ b/src/common/api/potlock/generated/zod/listRegistrationSchema.ts @@ -1,5 +1,35 @@ -import { statusF24EnumSchema } from "./statusF24EnumSchema"; import { z } from "zod"; +import { statusF24EnumSchema } from "./statusF24EnumSchema"; -export const listRegistrationSchema = z.object({ "id": z.number().describe("Registration id."), "status": z.lazy(() => statusF24EnumSchema).describe("Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "submitted_at": z.string().datetime().describe("Registration submission date."), "updated_at": z.string().datetime().describe("Registration last update date."), "registrant_notes": z.string().max(1024).describe("Registrant notes.").nullable().nullish(), "admin_notes": z.string().max(1024).describe("Admin notes.").nullable().nullish(), "tx_hash": z.string().max(64).describe("Transaction hash.").nullable().nullish(), "list": z.number().min(0).max(2147483647).describe("List registered."), "registrant": z.string().describe("Account that registered on the list."), "registered_by": z.string().describe("Account that did the registration.") }); \ No newline at end of file +export const listRegistrationSchema = z.object({ + id: z.number().describe("Registration id."), + status: z + .lazy(() => statusF24EnumSchema) + .describe( + "Registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ), + submitted_at: z.string().datetime().describe("Registration submission date."), + updated_at: z.string().datetime().describe("Registration last update date."), + registrant_notes: z + .string() + .max(1024) + .describe("Registrant notes.") + .nullable() + .nullish(), + admin_notes: z + .string() + .max(1024) + .describe("Admin notes.") + .nullable() + .nullish(), + tx_hash: z + .string() + .max(64) + .describe("Transaction hash.") + .nullable() + .nullish(), + list: z.number().min(0).max(2147483647).describe("List registered."), + registrant: z.string().describe("Account that registered on the list."), + registered_by: z.string().describe("Account that did the registration."), +}); diff --git a/src/common/api/potlock/generated/zod/listSchema.ts b/src/common/api/potlock/generated/zod/listSchema.ts index dc978cf0..cfe2b5d3 100644 --- a/src/common/api/potlock/generated/zod/listSchema.ts +++ b/src/common/api/potlock/generated/zod/listSchema.ts @@ -1,5 +1,31 @@ -import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; import { z } from "zod"; +import { defaultRegistrationStatusEnumSchema } from "./defaultRegistrationStatusEnumSchema"; -export const listSchema = z.object({ "id": z.number().min(0).max(2147483647).describe("List id."), "name": z.string().max(64).describe("List name."), "description": z.string().max(256).describe("List description.").nullable().nullish(), "cover_image_url": z.string().url().max(200).describe("Cover image url.").nullable().nullish(), "admin_only_registrations": z.boolean().describe("Admin only registrations."), "default_registration_status": z.lazy(() => defaultRegistrationStatusEnumSchema).describe("Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"), "created_at": z.string().datetime().describe("List creation date."), "updated_at": z.string().datetime().describe("List last update date."), "owner": z.string().describe("List owner."), "admins": z.array(z.string()).describe("List admins.") }); \ No newline at end of file +export const listSchema = z.object({ + id: z.number().min(0).max(2147483647).describe("List id."), + name: z.string().max(64).describe("List name."), + description: z + .string() + .max(256) + .describe("List description.") + .nullable() + .nullish(), + cover_image_url: z + .string() + .url() + .max(200) + .describe("Cover image url.") + .nullable() + .nullish(), + admin_only_registrations: z.boolean().describe("Admin only registrations."), + default_registration_status: z + .lazy(() => defaultRegistrationStatusEnumSchema) + .describe( + "Default registration status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ), + created_at: z.string().datetime().describe("List creation date."), + updated_at: z.string().datetime().describe("List last update date."), + owner: z.string().describe("List owner."), + admins: z.array(z.string()).describe("List admins."), +}); diff --git a/src/common/api/potlock/generated/zod/operations.ts b/src/common/api/potlock/generated/zod/operations.ts index 3a01f9a8..29971b90 100644 --- a/src/common/api/potlock/generated/zod/operations.ts +++ b/src/common/api/potlock/generated/zod/operations.ts @@ -1,202 +1,286 @@ -import { v1AccountsRetrieveQueryResponseSchema, v1AccountsRetrieve500Schema } from "./v1AccountsRetrieveSchema"; -import { v1AccountsRetrieve2QueryResponseSchema, v1AccountsRetrieve2404Schema, v1AccountsRetrieve2500Schema, v1AccountsRetrieve2PathParamsSchema } from "./v1AccountsRetrieve2Schema"; -import { v1AccountsActivePotsRetrieveQueryResponseSchema, v1AccountsActivePotsRetrieve404Schema, v1AccountsActivePotsRetrieve500Schema, v1AccountsActivePotsRetrievePathParamsSchema, v1AccountsActivePotsRetrieveQueryParamsSchema } from "./v1AccountsActivePotsRetrieveSchema"; -import { v1DonorsRetrieveQueryResponseSchema, v1DonorsRetrieve500Schema, v1DonorsRetrieveQueryParamsSchema } from "./v1DonorsRetrieveSchema"; -import { v1ListsRetrieveQueryResponseSchema, v1ListsRetrieve500Schema } from "./v1ListsRetrieveSchema"; -import { v1ListsRetrieve2QueryResponseSchema, v1ListsRetrieve2404Schema, v1ListsRetrieve2500Schema, v1ListsRetrieve2PathParamsSchema } from "./v1ListsRetrieve2Schema"; -import { v1ListsRegistrationsRetrieveQueryResponseSchema, v1ListsRegistrationsRetrieve404Schema, v1ListsRegistrationsRetrieve500Schema, v1ListsRegistrationsRetrievePathParamsSchema } from "./v1ListsRegistrationsRetrieveSchema"; +import { + v1AccountsActivePotsRetrieve404Schema, + v1AccountsActivePotsRetrieve500Schema, + v1AccountsActivePotsRetrievePathParamsSchema, + v1AccountsActivePotsRetrieveQueryParamsSchema, + v1AccountsActivePotsRetrieveQueryResponseSchema, +} from "./v1AccountsActivePotsRetrieveSchema"; +import { + v1AccountsRetrieve2404Schema, + v1AccountsRetrieve2500Schema, + v1AccountsRetrieve2PathParamsSchema, + v1AccountsRetrieve2QueryResponseSchema, +} from "./v1AccountsRetrieve2Schema"; +import { + v1AccountsRetrieve500Schema, + v1AccountsRetrieveQueryResponseSchema, +} from "./v1AccountsRetrieveSchema"; +import { + v1DonorsRetrieve500Schema, + v1DonorsRetrieveQueryParamsSchema, + v1DonorsRetrieveQueryResponseSchema, +} from "./v1DonorsRetrieveSchema"; +import { + v1ListsRegistrationsRetrieve404Schema, + v1ListsRegistrationsRetrieve500Schema, + v1ListsRegistrationsRetrievePathParamsSchema, + v1ListsRegistrationsRetrieveQueryResponseSchema, +} from "./v1ListsRegistrationsRetrieveSchema"; +import { + v1ListsRetrieve2404Schema, + v1ListsRetrieve2500Schema, + v1ListsRetrieve2PathParamsSchema, + v1ListsRetrieve2QueryResponseSchema, +} from "./v1ListsRetrieve2Schema"; +import { + v1ListsRetrieve500Schema, + v1ListsRetrieveQueryResponseSchema, +} from "./v1ListsRetrieveSchema"; +import { + v1PotsApplicationsRetrieve404Schema, + v1PotsApplicationsRetrievePathParamsSchema, + v1PotsApplicationsRetrieveQueryResponseSchema, +} from "./v1PotsApplicationsRetrieveSchema"; +import { + v1PotsDonationsRetrieve404Schema, + v1PotsDonationsRetrievePathParamsSchema, + v1PotsDonationsRetrieveQueryResponseSchema, +} from "./v1PotsDonationsRetrieveSchema"; +import { + v1PotsPayoutsRetrieve404Schema, + v1PotsPayoutsRetrievePathParamsSchema, + v1PotsPayoutsRetrieveQueryResponseSchema, +} from "./v1PotsPayoutsRetrieveSchema"; +import { + v1PotsRetrieve2404Schema, + v1PotsRetrieve2PathParamsSchema, + v1PotsRetrieve2QueryResponseSchema, +} from "./v1PotsRetrieve2Schema"; import { v1PotsRetrieveQueryResponseSchema } from "./v1PotsRetrieveSchema"; -import { v1PotsRetrieve2QueryResponseSchema, v1PotsRetrieve2404Schema, v1PotsRetrieve2PathParamsSchema } from "./v1PotsRetrieve2Schema"; -import { v1PotsApplicationsRetrieveQueryResponseSchema, v1PotsApplicationsRetrieve404Schema, v1PotsApplicationsRetrievePathParamsSchema } from "./v1PotsApplicationsRetrieveSchema"; -import { v1PotsDonationsRetrieveQueryResponseSchema, v1PotsDonationsRetrieve404Schema, v1PotsDonationsRetrievePathParamsSchema } from "./v1PotsDonationsRetrieveSchema"; -import { v1PotsPayoutsRetrieveQueryResponseSchema, v1PotsPayoutsRetrieve404Schema, v1PotsPayoutsRetrievePathParamsSchema } from "./v1PotsPayoutsRetrieveSchema"; -import { v1PotsSponsorsRetrieveQueryResponseSchema, v1PotsSponsorsRetrieve404Schema, v1PotsSponsorsRetrievePathParamsSchema } from "./v1PotsSponsorsRetrieveSchema"; -import { v1StatsRetrieveQueryResponseSchema, v1StatsRetrieve500Schema } from "./v1StatsRetrieveSchema"; +import { + v1PotsSponsorsRetrieve404Schema, + v1PotsSponsorsRetrievePathParamsSchema, + v1PotsSponsorsRetrieveQueryResponseSchema, +} from "./v1PotsSponsorsRetrieveSchema"; +import { + v1StatsRetrieve500Schema, + v1StatsRetrieveQueryResponseSchema, +} from "./v1StatsRetrieveSchema"; - export const operations = { "v1_accounts_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1AccountsRetrieveQueryResponseSchema, - 500: v1AccountsRetrieve500Schema - } - }, "v1_accounts_retrieve_2": { - request: undefined, - parameters: { - path: v1AccountsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1AccountsRetrieve2QueryResponseSchema, - 404: v1AccountsRetrieve2404Schema, - 500: v1AccountsRetrieve2500Schema - } - }, "v1_accounts_active_pots_retrieve": { - request: undefined, - parameters: { - path: v1AccountsActivePotsRetrievePathParamsSchema, - query: v1AccountsActivePotsRetrieveQueryParamsSchema, - header: undefined - }, - responses: { - 200: v1AccountsActivePotsRetrieveQueryResponseSchema, - 404: v1AccountsActivePotsRetrieve404Schema, - 500: v1AccountsActivePotsRetrieve500Schema - } - }, "v1_donors_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: v1DonorsRetrieveQueryParamsSchema, - header: undefined - }, - responses: { - 200: v1DonorsRetrieveQueryResponseSchema, - 500: v1DonorsRetrieve500Schema - } - }, "v1_lists_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRetrieveQueryResponseSchema, - 500: v1ListsRetrieve500Schema - } - }, "v1_lists_retrieve_2": { - request: undefined, - parameters: { - path: v1ListsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRetrieve2QueryResponseSchema, - 404: v1ListsRetrieve2404Schema, - 500: v1ListsRetrieve2500Schema - } - }, "v1_lists_registrations_retrieve": { - request: undefined, - parameters: { - path: v1ListsRegistrationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1ListsRegistrationsRetrieveQueryResponseSchema, - 404: v1ListsRegistrationsRetrieve404Schema, - 500: v1ListsRegistrationsRetrieve500Schema - } - }, "v1_pots_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsRetrieveQueryResponseSchema - } - }, "v1_pots_retrieve_2": { - request: undefined, - parameters: { - path: v1PotsRetrieve2PathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsRetrieve2QueryResponseSchema, - 404: v1PotsRetrieve2404Schema - } - }, "v1_pots_applications_retrieve": { - request: undefined, - parameters: { - path: v1PotsApplicationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsApplicationsRetrieveQueryResponseSchema, - 404: v1PotsApplicationsRetrieve404Schema - } - }, "v1_pots_donations_retrieve": { - request: undefined, - parameters: { - path: v1PotsDonationsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsDonationsRetrieveQueryResponseSchema, - 404: v1PotsDonationsRetrieve404Schema - } - }, "v1_pots_payouts_retrieve": { - request: undefined, - parameters: { - path: v1PotsPayoutsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsPayoutsRetrieveQueryResponseSchema, - 404: v1PotsPayoutsRetrieve404Schema - } - }, "v1_pots_sponsors_retrieve": { - request: undefined, - parameters: { - path: v1PotsSponsorsRetrievePathParamsSchema, - query: undefined, - header: undefined - }, - responses: { - 200: v1PotsSponsorsRetrieveQueryResponseSchema, - 404: v1PotsSponsorsRetrieve404Schema - } - }, "v1_stats_retrieve": { - request: undefined, - parameters: { - path: undefined, - query: undefined, - header: undefined - }, - responses: { - 200: v1StatsRetrieveQueryResponseSchema, - 500: v1StatsRetrieve500Schema - } - } } as const; -export const paths = { "/api/v1/accounts": { - get: operations["v1_accounts_retrieve"] - }, "/api/v1/accounts/{account_id}": { - get: operations["v1_accounts_retrieve_2"] - }, "/api/v1/accounts/{account_id}/active_pots": { - get: operations["v1_accounts_active_pots_retrieve"] - }, "/api/v1/donors": { - get: operations["v1_donors_retrieve"] - }, "/api/v1/lists": { - get: operations["v1_lists_retrieve"] - }, "/api/v1/lists/{list_id}": { - get: operations["v1_lists_retrieve_2"] - }, "/api/v1/lists/{list_id}/registrations": { - get: operations["v1_lists_registrations_retrieve"] - }, "/api/v1/pots": { - get: operations["v1_pots_retrieve"] - }, "/api/v1/pots/{pot_id}/": { - get: operations["v1_pots_retrieve_2"] - }, "/api/v1/pots/{pot_id}/applications": { - get: operations["v1_pots_applications_retrieve"] - }, "/api/v1/pots/{pot_id}/donations": { - get: operations["v1_pots_donations_retrieve"] - }, "/api/v1/pots/{pot_id}/payouts": { - get: operations["v1_pots_payouts_retrieve"] - }, "/api/v1/pots/{pot_id}/sponsors": { - get: operations["v1_pots_sponsors_retrieve"] - }, "/api/v1/stats": { - get: operations["v1_stats_retrieve"] - } } as const; \ No newline at end of file +export const operations = { + v1_accounts_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1AccountsRetrieveQueryResponseSchema, + 500: v1AccountsRetrieve500Schema, + }, + }, + v1_accounts_retrieve_2: { + request: undefined, + parameters: { + path: v1AccountsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1AccountsRetrieve2QueryResponseSchema, + 404: v1AccountsRetrieve2404Schema, + 500: v1AccountsRetrieve2500Schema, + }, + }, + v1_accounts_active_pots_retrieve: { + request: undefined, + parameters: { + path: v1AccountsActivePotsRetrievePathParamsSchema, + query: v1AccountsActivePotsRetrieveQueryParamsSchema, + header: undefined, + }, + responses: { + 200: v1AccountsActivePotsRetrieveQueryResponseSchema, + 404: v1AccountsActivePotsRetrieve404Schema, + 500: v1AccountsActivePotsRetrieve500Schema, + }, + }, + v1_donors_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: v1DonorsRetrieveQueryParamsSchema, + header: undefined, + }, + responses: { + 200: v1DonorsRetrieveQueryResponseSchema, + 500: v1DonorsRetrieve500Schema, + }, + }, + v1_lists_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRetrieveQueryResponseSchema, + 500: v1ListsRetrieve500Schema, + }, + }, + v1_lists_retrieve_2: { + request: undefined, + parameters: { + path: v1ListsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRetrieve2QueryResponseSchema, + 404: v1ListsRetrieve2404Schema, + 500: v1ListsRetrieve2500Schema, + }, + }, + v1_lists_registrations_retrieve: { + request: undefined, + parameters: { + path: v1ListsRegistrationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1ListsRegistrationsRetrieveQueryResponseSchema, + 404: v1ListsRegistrationsRetrieve404Schema, + 500: v1ListsRegistrationsRetrieve500Schema, + }, + }, + v1_pots_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsRetrieveQueryResponseSchema, + }, + }, + v1_pots_retrieve_2: { + request: undefined, + parameters: { + path: v1PotsRetrieve2PathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsRetrieve2QueryResponseSchema, + 404: v1PotsRetrieve2404Schema, + }, + }, + v1_pots_applications_retrieve: { + request: undefined, + parameters: { + path: v1PotsApplicationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsApplicationsRetrieveQueryResponseSchema, + 404: v1PotsApplicationsRetrieve404Schema, + }, + }, + v1_pots_donations_retrieve: { + request: undefined, + parameters: { + path: v1PotsDonationsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsDonationsRetrieveQueryResponseSchema, + 404: v1PotsDonationsRetrieve404Schema, + }, + }, + v1_pots_payouts_retrieve: { + request: undefined, + parameters: { + path: v1PotsPayoutsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsPayoutsRetrieveQueryResponseSchema, + 404: v1PotsPayoutsRetrieve404Schema, + }, + }, + v1_pots_sponsors_retrieve: { + request: undefined, + parameters: { + path: v1PotsSponsorsRetrievePathParamsSchema, + query: undefined, + header: undefined, + }, + responses: { + 200: v1PotsSponsorsRetrieveQueryResponseSchema, + 404: v1PotsSponsorsRetrieve404Schema, + }, + }, + v1_stats_retrieve: { + request: undefined, + parameters: { + path: undefined, + query: undefined, + header: undefined, + }, + responses: { + 200: v1StatsRetrieveQueryResponseSchema, + 500: v1StatsRetrieve500Schema, + }, + }, +} as const; +export const paths = { + "/api/v1/accounts": { + get: operations["v1_accounts_retrieve"], + }, + "/api/v1/accounts/{account_id}": { + get: operations["v1_accounts_retrieve_2"], + }, + "/api/v1/accounts/{account_id}/active_pots": { + get: operations["v1_accounts_active_pots_retrieve"], + }, + "/api/v1/donors": { + get: operations["v1_donors_retrieve"], + }, + "/api/v1/lists": { + get: operations["v1_lists_retrieve"], + }, + "/api/v1/lists/{list_id}": { + get: operations["v1_lists_retrieve_2"], + }, + "/api/v1/lists/{list_id}/registrations": { + get: operations["v1_lists_registrations_retrieve"], + }, + "/api/v1/pots": { + get: operations["v1_pots_retrieve"], + }, + "/api/v1/pots/{pot_id}/": { + get: operations["v1_pots_retrieve_2"], + }, + "/api/v1/pots/{pot_id}/applications": { + get: operations["v1_pots_applications_retrieve"], + }, + "/api/v1/pots/{pot_id}/donations": { + get: operations["v1_pots_donations_retrieve"], + }, + "/api/v1/pots/{pot_id}/payouts": { + get: operations["v1_pots_payouts_retrieve"], + }, + "/api/v1/pots/{pot_id}/sponsors": { + get: operations["v1_pots_sponsors_retrieve"], + }, + "/api/v1/stats": { + get: operations["v1_stats_retrieve"], + }, +} as const; diff --git a/src/common/api/potlock/generated/zod/potApplicationSchema.ts b/src/common/api/potlock/generated/zod/potApplicationSchema.ts index 0121babc..98996388 100644 --- a/src/common/api/potlock/generated/zod/potApplicationSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationSchema.ts @@ -1,5 +1,23 @@ -import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; import { z } from "zod"; +import { potApplicationStatusEnumSchema } from "./potApplicationStatusEnumSchema"; -export const potApplicationSchema = z.object({ "id": z.number().describe("Application id."), "message": z.string().max(1024).describe("Application message.").nullable().nullish(), "status": z.lazy(() => potApplicationStatusEnumSchema).describe("Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"), "submitted_at": z.string().datetime().describe("Application submission date."), "updated_at": z.string().datetime().describe("Application last update date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot applied to."), "applicant": z.string().describe("Account that applied to the pot.") }); \ No newline at end of file +export const potApplicationSchema = z.object({ + id: z.number().describe("Application id."), + message: z + .string() + .max(1024) + .describe("Application message.") + .nullable() + .nullish(), + status: z + .lazy(() => potApplicationStatusEnumSchema) + .describe( + "Application status.\n\n* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", + ), + submitted_at: z.string().datetime().describe("Application submission date."), + updated_at: z.string().datetime().describe("Application last update date."), + tx_hash: z.string().max(64).describe("Transaction hash."), + pot: z.string().describe("Pot applied to."), + applicant: z.string().describe("Account that applied to the pot."), +}); diff --git a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts index b44597af..92b90896 100644 --- a/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts +++ b/src/common/api/potlock/generated/zod/potApplicationStatusEnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview */ -export const potApplicationStatusEnumSchema = z.enum(["Pending", "Approved", "Rejected", "InReview"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview"); \ No newline at end of file +export const potApplicationStatusEnumSchema = z + .enum(["Pending", "Approved", "Rejected", "InReview"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `InReview` - InReview", + ); diff --git a/src/common/api/potlock/generated/zod/potPayoutSchema.ts b/src/common/api/potlock/generated/zod/potPayoutSchema.ts index d7277212..627965e1 100644 --- a/src/common/api/potlock/generated/zod/potPayoutSchema.ts +++ b/src/common/api/potlock/generated/zod/potPayoutSchema.ts @@ -1,4 +1,17 @@ import { z } from "zod"; - -export const potPayoutSchema = z.object({ "id": z.number().describe("Payout id."), "amount": z.string().max(64).describe("Payout amount."), "amount_paid_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")).describe("Payout amount in USD.").nullable().nullish(), "paid_at": z.string().datetime().describe("Payout date."), "tx_hash": z.string().max(64).describe("Transaction hash."), "pot": z.string().describe("Pot that this payout is for."), "recipient": z.string().describe("Payout recipient."), "ft": z.string().describe("Payout FT.") }); \ No newline at end of file +export const potPayoutSchema = z.object({ + id: z.number().describe("Payout id."), + amount: z.string().max(64).describe("Payout amount."), + amount_paid_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) + .describe("Payout amount in USD.") + .nullable() + .nullish(), + paid_at: z.string().datetime().describe("Payout date."), + tx_hash: z.string().max(64).describe("Transaction hash."), + pot: z.string().describe("Pot that this payout is for."), + recipient: z.string().describe("Payout recipient."), + ft: z.string().describe("Payout FT."), +}); diff --git a/src/common/api/potlock/generated/zod/potSchema.ts b/src/common/api/potlock/generated/zod/potSchema.ts index a0c19ac6..1cd5f75c 100644 --- a/src/common/api/potlock/generated/zod/potSchema.ts +++ b/src/common/api/potlock/generated/zod/potSchema.ts @@ -1,4 +1,124 @@ import { z } from "zod"; - -export const potSchema = z.object({ "id": z.string().describe("Pot account ID."), "pot_factory": z.string().describe("Pot factory."), "deployer": z.string().describe("Pot deployer."), "deployed_at": z.string().datetime().describe("Pot deployment date."), "source_metadata": z.any(), "owner": z.string().describe("Pot owner."), "admins": z.array(z.string()).describe("Pot admins."), "chef": z.string().describe("Pot chef.").nullable().nullish(), "name": z.string().describe("Pot name."), "description": z.string().describe("Pot description."), "max_approved_applicants": z.number().min(0).max(2147483647).describe("Max approved applicants."), "base_currency": z.string().max(64).describe("Base currency.").nullable().nullish(), "application_start": z.string().datetime().describe("Pot application start date."), "application_end": z.string().datetime().describe("Pot application end date."), "matching_round_start": z.string().datetime().describe("Pot matching round start date."), "matching_round_end": z.string().datetime().describe("Pot matching round end date."), "registry_provider": z.string().max(64).describe("Registry provider.").nullable().nullish(), "min_matching_pool_donation_amount": z.string().max(64).describe("Min matching pool donation amount."), "sybil_wrapper_provider": z.string().max(64).describe("Sybil wrapper provider.").nullable().nullish(), "custom_sybil_checks": z.string().max(64).describe("Custom sybil checks.").nullable().nullish(), "custom_min_threshold_score": z.number().min(0).max(2147483647).describe("Custom min threshold score.").nullable().nullish(), "referral_fee_matching_pool_basis_points": z.number().min(0).max(2147483647).describe("Referral fee matching pool basis points."), "referral_fee_public_round_basis_points": z.number().min(0).max(2147483647).describe("Referral fee public round basis points."), "chef_fee_basis_points": z.number().min(0).max(2147483647).describe("Chef fee basis points."), "total_matching_pool": z.string().max(64).describe("Total matching pool."), "total_matching_pool_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "matching_pool_balance": z.string().max(64).describe("Matching pool balance."), "matching_pool_donations_count": z.number().min(0).max(2147483647).describe("Matching pool donations count."), "total_public_donations": z.string().max(64).describe("Total public donations."), "total_public_donations_usd": z.string().regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), "public_donations_count": z.number().min(0).max(2147483647).describe("Public donations count."), "cooldown_end": z.string().datetime().describe("Pot cooldown end date.").nullable().nullish(), "cooldown_period_ms": z.number().min(0).max(2147483647).describe("Pot cooldown period in ms.").nullable().nullish(), "all_paid_out": z.boolean().describe("All paid out."), "protocol_config_provider": z.string().max(64).describe("Protocol config provider.").nullable().nullish() }); \ No newline at end of file +export const potSchema = z.object({ + id: z.string().describe("Pot account ID."), + pot_factory: z.string().describe("Pot factory."), + deployer: z.string().describe("Pot deployer."), + deployed_at: z.string().datetime().describe("Pot deployment date."), + source_metadata: z.any(), + owner: z.string().describe("Pot owner."), + admins: z.array(z.string()).describe("Pot admins."), + chef: z.string().describe("Pot chef.").nullable().nullish(), + name: z.string().describe("Pot name."), + description: z.string().describe("Pot description."), + max_approved_applicants: z + .number() + .min(0) + .max(2147483647) + .describe("Max approved applicants."), + base_currency: z + .string() + .max(64) + .describe("Base currency.") + .nullable() + .nullish(), + application_start: z + .string() + .datetime() + .describe("Pot application start date."), + application_end: z.string().datetime().describe("Pot application end date."), + matching_round_start: z + .string() + .datetime() + .describe("Pot matching round start date."), + matching_round_end: z + .string() + .datetime() + .describe("Pot matching round end date."), + registry_provider: z + .string() + .max(64) + .describe("Registry provider.") + .nullable() + .nullish(), + min_matching_pool_donation_amount: z + .string() + .max(64) + .describe("Min matching pool donation amount."), + sybil_wrapper_provider: z + .string() + .max(64) + .describe("Sybil wrapper provider.") + .nullable() + .nullish(), + custom_sybil_checks: z + .string() + .max(64) + .describe("Custom sybil checks.") + .nullable() + .nullish(), + custom_min_threshold_score: z + .number() + .min(0) + .max(2147483647) + .describe("Custom min threshold score.") + .nullable() + .nullish(), + referral_fee_matching_pool_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Referral fee matching pool basis points."), + referral_fee_public_round_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Referral fee public round basis points."), + chef_fee_basis_points: z + .number() + .min(0) + .max(2147483647) + .describe("Chef fee basis points."), + total_matching_pool: z.string().max(64).describe("Total matching pool."), + total_matching_pool_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), + matching_pool_balance: z.string().max(64).describe("Matching pool balance."), + matching_pool_donations_count: z + .number() + .min(0) + .max(2147483647) + .describe("Matching pool donations count."), + total_public_donations: z + .string() + .max(64) + .describe("Total public donations."), + total_public_donations_usd: z + .string() + .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")), + public_donations_count: z + .number() + .min(0) + .max(2147483647) + .describe("Public donations count."), + cooldown_end: z + .string() + .datetime() + .describe("Pot cooldown end date.") + .nullable() + .nullish(), + cooldown_period_ms: z + .number() + .min(0) + .max(2147483647) + .describe("Pot cooldown period in ms.") + .nullable() + .nullish(), + all_paid_out: z.boolean().describe("All paid out."), + protocol_config_provider: z + .string() + .max(64) + .describe("Protocol config provider.") + .nullable() + .nullish(), +}); diff --git a/src/common/api/potlock/generated/zod/statsResponseSchema.ts b/src/common/api/potlock/generated/zod/statsResponseSchema.ts index 740a83f4..c009c24b 100644 --- a/src/common/api/potlock/generated/zod/statsResponseSchema.ts +++ b/src/common/api/potlock/generated/zod/statsResponseSchema.ts @@ -1,4 +1,9 @@ import { z } from "zod"; - -export const statsResponseSchema = z.object({ "total_donations_usd": z.number(), "total_payouts_usd": z.number(), "total_donations_count": z.number(), "total_donors_count": z.number(), "total_recipients_count": z.number() }); \ No newline at end of file +export const statsResponseSchema = z.object({ + total_donations_usd: z.number(), + total_payouts_usd: z.number(), + total_donations_count: z.number(), + total_donors_count: z.number(), + total_recipients_count: z.number(), +}); diff --git a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts index fadb137a..33ce8e9a 100644 --- a/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts +++ b/src/common/api/potlock/generated/zod/statusF24EnumSchema.ts @@ -1,6 +1,10 @@ import { z } from "zod"; - /** +/** * @description * `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted */ -export const statusF24EnumSchema = z.enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]).describe("* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted"); \ No newline at end of file +export const statusF24EnumSchema = z + .enum(["Pending", "Approved", "Rejected", "Graylisted", "Blacklisted"]) + .describe( + "* `Pending` - Pending\n* `Approved` - Approved\n* `Rejected` - Rejected\n* `Graylisted` - Graylisted\n* `Blacklisted` - Blacklisted", + ); diff --git a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts index e8777c51..2805af8d 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsActivePotsRetrieveSchema.ts @@ -1,14 +1,20 @@ import { z } from "zod"; -import { potSchema } from "./potSchema"; +import { potSchema } from "./potSchema"; -export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ "account_id": z.string() }); +export const v1AccountsActivePotsRetrievePathParamsSchema = z.object({ + account_id: z.string(), +}); - export const v1AccountsActivePotsRetrieveQueryParamsSchema = z.object({ "status": z.string().describe("Filter by pot status").optional() }).optional(); +export const v1AccountsActivePotsRetrieveQueryParamsSchema = z + .object({ status: z.string().describe("Filter by pot status").optional() }) + .optional(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); +export const v1AccountsActivePotsRetrieve200Schema = z.array( + z.lazy(() => potSchema), +); /** * @description Account not found */ @@ -20,4 +26,6 @@ export const v1AccountsActivePotsRetrieve500Schema = z.any(); /** * @description Returns paginated active pots for the account */ -export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file +export const v1AccountsActivePotsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts index c65eec24..0de9aa2a 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieve2Schema.ts @@ -1,8 +1,10 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1AccountsRetrieve2PathParamsSchema = z.object({ "account_id": z.string() }); +export const v1AccountsRetrieve2PathParamsSchema = z.object({ + account_id: z.string(), +}); /** * @description Returns account details */ @@ -18,4 +20,6 @@ export const v1AccountsRetrieve2500Schema = z.any(); /** * @description Returns account details */ -export const v1AccountsRetrieve2QueryResponseSchema = z.lazy(() => accountSchema); \ No newline at end of file +export const v1AccountsRetrieve2QueryResponseSchema = z.lazy( + () => accountSchema, +); diff --git a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts index f9ac9afe..7e391a3b 100644 --- a/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1AccountsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { accountSchema } from "./accountSchema"; - /** +/** * @description Returns a list of accounts */ export const v1AccountsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); @@ -12,4 +13,6 @@ export const v1AccountsRetrieve500Schema = z.any(); /** * @description Returns a list of accounts */ -export const v1AccountsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1AccountsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts index 0420a5e2..9f5762a5 100644 --- a/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1DonorsRetrieveSchema.ts @@ -1,8 +1,15 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1DonorsRetrieveQueryParamsSchema = z.object({ "sort": z.string().describe("Sort by field, e.g., most_donated_usd").optional() }).optional(); +export const v1DonorsRetrieveQueryParamsSchema = z + .object({ + sort: z + .string() + .describe("Sort by field, e.g., most_donated_usd") + .optional(), + }) + .optional(); /** * @description Returns a list of donor accounts */ @@ -14,4 +21,6 @@ export const v1DonorsRetrieve500Schema = z.any(); /** * @description Returns a list of donor accounts */ -export const v1DonorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1DonorsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts index 9e191236..0adfaa5e 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRegistrationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { listRegistrationSchema } from "./listRegistrationSchema"; +import { listRegistrationSchema } from "./listRegistrationSchema"; -export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ "list_id": z.number() }); +export const v1ListsRegistrationsRetrievePathParamsSchema = z.object({ + list_id: z.number(), +}); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieve200Schema = z.array(z.lazy(() => listRegistrationSchema)); +export const v1ListsRegistrationsRetrieve200Schema = z.array( + z.lazy(() => listRegistrationSchema), +); /** * @description List not found */ @@ -18,4 +22,6 @@ export const v1ListsRegistrationsRetrieve500Schema = z.any(); /** * @description Returns registrations for the list */ -export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array(z.lazy(() => listRegistrationSchema)); \ No newline at end of file +export const v1ListsRegistrationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => listRegistrationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts index 4e88ea9b..ae5a0934 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieve2Schema.ts @@ -1,8 +1,10 @@ import { z } from "zod"; -import { listSchema } from "./listSchema"; +import { listSchema } from "./listSchema"; -export const v1ListsRetrieve2PathParamsSchema = z.object({ "list_id": z.number() }); +export const v1ListsRetrieve2PathParamsSchema = z.object({ + list_id: z.number(), +}); /** * @description Returns list details */ @@ -18,4 +20,4 @@ export const v1ListsRetrieve2500Schema = z.any(); /** * @description Returns list details */ -export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); \ No newline at end of file +export const v1ListsRetrieve2QueryResponseSchema = z.lazy(() => listSchema); diff --git a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts index a6578129..7e13ceb9 100644 --- a/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1ListsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { listSchema } from "./listSchema"; - /** +/** * @description Returns a list of lists */ export const v1ListsRetrieve200Schema = z.array(z.lazy(() => listSchema)); @@ -12,4 +13,6 @@ export const v1ListsRetrieve500Schema = z.any(); /** * @description Returns a list of lists */ -export const v1ListsRetrieveQueryResponseSchema = z.array(z.lazy(() => listSchema)); \ No newline at end of file +export const v1ListsRetrieveQueryResponseSchema = z.array( + z.lazy(() => listSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts index 1392b571..1dc33744 100644 --- a/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsApplicationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { potApplicationSchema } from "./potApplicationSchema"; +import { potApplicationSchema } from "./potApplicationSchema"; -export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsApplicationsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieve200Schema = z.array(z.lazy(() => potApplicationSchema)); +export const v1PotsApplicationsRetrieve200Schema = z.array( + z.lazy(() => potApplicationSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsApplicationsRetrieve404Schema = z.any(); /** * @description Returns applications for the pot */ -export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array(z.lazy(() => potApplicationSchema)); \ No newline at end of file +export const v1PotsApplicationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potApplicationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts index 707a67b7..cdb8b356 100644 --- a/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsDonationsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { donationSchema } from "./donationSchema"; +import { donationSchema } from "./donationSchema"; -export const v1PotsDonationsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsDonationsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieve200Schema = z.array(z.lazy(() => donationSchema)); +export const v1PotsDonationsRetrieve200Schema = z.array( + z.lazy(() => donationSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsDonationsRetrieve404Schema = z.any(); /** * @description Returns donations for the pot */ -export const v1PotsDonationsRetrieveQueryResponseSchema = z.array(z.lazy(() => donationSchema)); \ No newline at end of file +export const v1PotsDonationsRetrieveQueryResponseSchema = z.array( + z.lazy(() => donationSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts index 9892362f..3ff282f6 100644 --- a/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsPayoutsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { potPayoutSchema } from "./potPayoutSchema"; +import { potPayoutSchema } from "./potPayoutSchema"; -export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsPayoutsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieve200Schema = z.array(z.lazy(() => potPayoutSchema)); +export const v1PotsPayoutsRetrieve200Schema = z.array( + z.lazy(() => potPayoutSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsPayoutsRetrieve404Schema = z.any(); /** * @description Returns payouts for the pot */ -export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array(z.lazy(() => potPayoutSchema)); \ No newline at end of file +export const v1PotsPayoutsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potPayoutSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts index a9ebf834..26021f10 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieve2Schema.ts @@ -1,8 +1,8 @@ import { z } from "zod"; -import { potSchema } from "./potSchema"; +import { potSchema } from "./potSchema"; -export const v1PotsRetrieve2PathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsRetrieve2PathParamsSchema = z.object({ pot_id: z.string() }); /** * @description Returns pot details */ @@ -14,4 +14,4 @@ export const v1PotsRetrieve2404Schema = z.any(); /** * @description Returns pot details */ -export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); \ No newline at end of file +export const v1PotsRetrieve2QueryResponseSchema = z.lazy(() => potSchema); diff --git a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts index 373724c1..eee00c54 100644 --- a/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsRetrieveSchema.ts @@ -1,11 +1,14 @@ import { z } from "zod"; + import { potSchema } from "./potSchema"; - /** +/** * @description Returns a list of pots */ export const v1PotsRetrieve200Schema = z.array(z.lazy(() => potSchema)); /** * @description Returns a list of pots */ -export const v1PotsRetrieveQueryResponseSchema = z.array(z.lazy(() => potSchema)); \ No newline at end of file +export const v1PotsRetrieveQueryResponseSchema = z.array( + z.lazy(() => potSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts index 1a0a53e2..e9bf09bc 100644 --- a/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1PotsSponsorsRetrieveSchema.ts @@ -1,12 +1,16 @@ import { z } from "zod"; -import { accountSchema } from "./accountSchema"; +import { accountSchema } from "./accountSchema"; -export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ "pot_id": z.string() }); +export const v1PotsSponsorsRetrievePathParamsSchema = z.object({ + pot_id: z.string(), +}); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieve200Schema = z.array(z.lazy(() => accountSchema)); +export const v1PotsSponsorsRetrieve200Schema = z.array( + z.lazy(() => accountSchema), +); /** * @description Pot not found */ @@ -14,4 +18,6 @@ export const v1PotsSponsorsRetrieve404Schema = z.any(); /** * @description Returns sponsors for the pot */ -export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array(z.lazy(() => accountSchema)); \ No newline at end of file +export const v1PotsSponsorsRetrieveQueryResponseSchema = z.array( + z.lazy(() => accountSchema), +); diff --git a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts index a74f954c..ba4a5754 100644 --- a/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts +++ b/src/common/api/potlock/generated/zod/v1StatsRetrieveSchema.ts @@ -1,7 +1,8 @@ import { z } from "zod"; + import { statsResponseSchema } from "./statsResponseSchema"; - /** +/** * @description Returns statistics data */ export const v1StatsRetrieve200Schema = z.lazy(() => statsResponseSchema); @@ -12,4 +13,6 @@ export const v1StatsRetrieve500Schema = z.any(); /** * @description Returns statistics data */ -export const v1StatsRetrieveQueryResponseSchema = z.lazy(() => statsResponseSchema); \ No newline at end of file +export const v1StatsRetrieveQueryResponseSchema = z.lazy( + () => statsResponseSchema, +); From cdb6726e1545100baa6d3419a3daaf772a99a110 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Mon, 10 Jun 2024 03:27:28 +0400 Subject: [PATCH 09/84] fix: Add missing UnoCSS configuration & Resolve type errors --- .vscode/settings.json | 1 + next.config.mjs => next.config.js | 9 + package.json | 10 +- src/app/_components/ActAsDao.tsx | 8 +- src/app/layout.tsx | 10 + src/modules/profile/models.ts | 2 +- uno.config.js | 13 - uno.config.ts | 24 ++ yarn.lock | 686 ++++++++++++++++++------------ 9 files changed, 479 insertions(+), 284 deletions(-) rename next.config.mjs => next.config.js (57%) delete mode 100644 uno.config.js create mode 100644 uno.config.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 9f0f25f1..cf8f420b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,6 +8,7 @@ "source.fixAll": "explicit" }, "cSpell.words": [ + "Attributify", "bitget", "camelcase", "colocation", diff --git a/next.config.mjs b/next.config.js similarity index 57% rename from next.config.mjs rename to next.config.js index 095e8b2c..0cba6d0c 100644 --- a/next.config.mjs +++ b/next.config.js @@ -1,3 +1,5 @@ +import UnoCSS from "@unocss/webpack"; + /** @type {import('next').NextConfig} */ const nextConfig = { images: { @@ -9,6 +11,13 @@ const nextConfig = { }, ], }, + + webpack: ({ plugins, ...config }) => ({ + ...config, + // Required for HMR support for UnoCSS + cache: false, + plugins: [...plugins, UnoCSS()], + }), }; export default nextConfig; diff --git a/package.json b/package.json index 5a25273e..69861c23 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,11 @@ "format": "yarn lint --fix", "typecheck": "tsc --noEmit", "generate:api": "kubb --config kubb.config.ts", - "test:unit": "vitest run", "dev:test": "yarn && yarn generate:api && vitest watch", "dev": "yarn && yarn generate:api; next dev", "build": "yarn generate:api; next build", - "start": "next start" + "start": "next start", + "test:unit": "vitest run" }, "dependencies": { "@ebay/nice-modal-react": "^1.2.13", @@ -60,6 +60,7 @@ "@rematch/immer": "^2.1.3", "@rematch/loading": "^2.1.2", "@rematch/persist": "^2.1.2", + "@unocss/reset": "^0.60.4", "@wpdas/naxios": "^2.1.0", "@zodios/core": "^10.9.6", "axios": "^1.7.2", @@ -89,7 +90,9 @@ "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^7.9.0", "@typescript-eslint/parser": "^7.9.0", + "@unocss/preset-attributify": "^0.60.4", "@unocss/preset-wind": "^0.60.4", + "@unocss/webpack": "^0.60.4", "@vitejs/plugin-react": "^4.3.0", "eslint": "^8", "eslint-config-next": "14.2.3", @@ -103,8 +106,9 @@ "prettier-plugin-tailwindcss": "^0.5.14", "tailwindcss": "^3.4.1", "typescript": "^5", - "unocss": "^0.60.2", + "unocss": "^0.60.4", "unocss-preset-animations": "^1.0.2", + "unocss-preset-autoprefixer": "^0.0.7", "unocss-preset-shadcn": "^0.3.0", "vite": "^5.2.12", "vite-tsconfig-paths": "^4.3.2", diff --git a/src/app/_components/ActAsDao.tsx b/src/app/_components/ActAsDao.tsx index 4ddbb978..05b25976 100644 --- a/src/app/_components/ActAsDao.tsx +++ b/src/app/_components/ActAsDao.tsx @@ -24,7 +24,7 @@ const ActAsDao = () => { const [inputActive, setInputActive] = useState(false); const { addresses, toggle, defaultAddress } = useTypedSelector( - (state) => state.nav, + (state) => state.nav.actAsDao, ); const { markDaoAsDefault, addOrRemoveDaoAddress } = dispatch.nav; @@ -41,11 +41,7 @@ const ActAsDao = () => { alt="info" /> - toggleDao(!toggle)} - /> +
{addresses?.map((address: string) => ( diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 5c299215..ff3d5527 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,17 @@ import "@near-wallet-selector/modal-ui/styles.css"; +import "@unocss/reset/normalize.css"; +import "@unocss/reset/sanitize/assets.css"; +import "@unocss/reset/sanitize/sanitize.css"; +import "@unocss/reset/tailwind.css"; import "./_layout/mona-sans-font.css"; import "./_layout/globals.css"; +/** + * ?INFO: This is a virtual import managed by Next + **/ +// eslint-disable-next-line import/no-unresolved +import "uno.css"; + import type { Metadata, Viewport } from "next"; import { Lora } from "next/font/google"; diff --git a/src/modules/profile/models.ts b/src/modules/profile/models.ts index 5bc13cda..23654165 100644 --- a/src/modules/profile/models.ts +++ b/src/modules/profile/models.ts @@ -100,7 +100,7 @@ export type ActAsDao = { addresses: string[]; }; -type NavState = { +export type NavState = { accountId: string; isNadabotVerified: boolean; actAsDao: ActAsDao; diff --git a/uno.config.js b/uno.config.js deleted file mode 100644 index 90f11030..00000000 --- a/uno.config.js +++ /dev/null @@ -1,13 +0,0 @@ -import { defineConfig, presetAttributify, presetUno } from "unocss"; -import presetAnimations from "unocss-preset-animations"; -import presetShadcn from "unocss-preset-shadcn"; - -export default defineConfig({ - // ...UnoCSS options - presets: [ - presetUno(), - presetAnimations(), - presetAttributify(), - presetShadcn({ color: "slate" }), - ], -}); diff --git a/uno.config.ts b/uno.config.ts new file mode 100644 index 00000000..115138fc --- /dev/null +++ b/uno.config.ts @@ -0,0 +1,24 @@ +//import presetAttributify from "@unocss/preset-attributify"; +import { + defineConfig, + presetAttributify, + presetTypography, + presetUno, +} from "unocss"; +import presetAnimations from "unocss-preset-animations"; +import presetAutoprefixer from "unocss-preset-autoprefixer"; +import presetShadcn from "unocss-preset-shadcn"; + +export default defineConfig({ + presets: [ + presetUno(), + presetAutoprefixer(), + presetAttributify({ prefix: "un-", prefixOnly: true }), + presetTypography(), + presetAnimations(), + + presetShadcn({ + color: "slate", + }), + ], +}); diff --git a/yarn.lock b/yarn.lock index c4d1a677..b5977999 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,7 +49,7 @@ "@babel/highlight" "^7.24.6" picocolors "^1.0.0" -"@babel/code-frame@^7.16.0": +"@babel/code-frame@^7.16.0", "@babel/code-frame@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== @@ -62,6 +62,11 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.4.tgz" integrity sha512-vg8Gih2MLK+kOkHJp4gBEIkyaIi00jgWot2D9QOmmfLC8jINSOzmCLta6Bvz/JSBCqnegV0L80jhxkol5GWNfQ== +"@babel/compat-data@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed" + integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw== + "@babel/core@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/core/-/core-7.24.5.tgz" @@ -83,6 +88,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.24.6": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4" + integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-compilation-targets" "^7.24.7" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helpers" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/template" "^7.24.7" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz" @@ -93,12 +119,22 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz" - integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== +"@babel/generator@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d" + integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA== dependencies: - "@babel/types" "^7.22.5" + "@babel/types" "^7.24.7" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^2.5.1" + +"@babel/helper-annotate-as-pure@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" + integrity sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg== + dependencies: + "@babel/types" "^7.24.7" "@babel/helper-compilation-targets@^7.23.6": version "7.23.6" @@ -111,19 +147,30 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.24.5": - version "7.24.5" - resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz" - integrity sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g== +"@babel/helper-compilation-targets@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9" + integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg== dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-member-expression-to-functions" "^7.24.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers" "^7.24.1" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.24.5" + "@babel/compat-data" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" + browserslist "^4.22.2" + lru-cache "^5.1.1" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.7.tgz#2eaed36b3a1c11c53bdf80d53838b293c52f5b3b" + integrity sha512-kTkaDl7c9vO80zeX1rJxnuRpEsD5tA81yh11X1gQo+PhSti3JS+7qeZo9U4RHobKRiFPKaGK3svUAeb8D0Q7eg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" + "@babel/helper-replace-supers" "^7.24.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" semver "^6.3.1" "@babel/helper-environment-visitor@^7.22.20": @@ -131,6 +178,13 @@ resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-environment-visitor@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9" + integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-function-name@^7.23.0": version "7.23.0" resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" @@ -139,6 +193,14 @@ "@babel/template" "^7.22.15" "@babel/types" "^7.23.0" +"@babel/helper-function-name@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2" + integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/helper-hoist-variables@^7.22.5": version "7.22.5" resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" @@ -146,12 +208,20 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-member-expression-to-functions@^7.23.0", "@babel/helper-member-expression-to-functions@^7.24.5": - version "7.24.5" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz" - integrity sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA== +"@babel/helper-hoist-variables@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee" + integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ== dependencies: - "@babel/types" "^7.24.5" + "@babel/types" "^7.24.7" + +"@babel/helper-member-expression-to-functions@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.7.tgz#67613d068615a70e4ed5101099affc7a41c5225f" + integrity sha512-LGeMaf5JN4hAT471eJdBs/GK1DoYIJ5GCtZN/EsL6KUiiDZOvO/eKE11AMZJa2zP4zk4qe9V2O/hxAmkRc8p6w== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/helper-module-imports@^7.24.3": version "7.24.3" @@ -160,7 +230,15 @@ dependencies: "@babel/types" "^7.24.0" -"@babel/helper-module-transforms@^7.23.3", "@babel/helper-module-transforms@^7.24.5": +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-module-transforms@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.5.tgz" integrity sha512-9GxeY8c2d2mdQUP1Dye0ks3VDyIMS98kt/llQ2nUId8IsWqTF0l1LkSX0/uP7l7MCDrzXS009Hyhe2gzTiGW8A== @@ -171,45 +249,65 @@ "@babel/helper-split-export-declaration" "^7.24.5" "@babel/helper-validator-identifier" "^7.24.5" -"@babel/helper-optimise-call-expression@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz" - integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== +"@babel/helper-module-transforms@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8" + integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ== dependencies: - "@babel/types" "^7.22.5" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" -"@babel/helper-plugin-utils@^7.24.0", "@babel/helper-plugin-utils@^7.24.5": - version "7.24.5" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz" - integrity sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ== +"@babel/helper-optimise-call-expression@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" + integrity sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A== + dependencies: + "@babel/types" "^7.24.7" "@babel/helper-plugin-utils@^7.24.6": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.6.tgz#fa02a32410a15a6e8f8185bcbf608f10528d2a24" integrity sha512-MZG/JcWfxybKwsA9N9PmtF2lOSFSEMVCpIRrbxccZFLJPrJciJdG/UhSh5W96GEteJI2ARqm5UAHxISwRDLSNg== -"@babel/helper-replace-supers@^7.24.1": - version "7.24.1" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz" - integrity sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ== +"@babel/helper-plugin-utils@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0" + integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg== + +"@babel/helper-replace-supers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.24.7.tgz#f933b7eed81a1c0265740edc91491ce51250f765" + integrity sha512-qTAxxBM81VEyoAY0TtLrx1oAEJc09ZK67Q9ljQToqCnA+55eNwCORaxlKyu+rNfX86o8OXRUSNUnrtsAZXM9sg== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-member-expression-to-functions" "^7.23.0" - "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-member-expression-to-functions" "^7.24.7" + "@babel/helper-optimise-call-expression" "^7.24.7" -"@babel/helper-simple-access@^7.22.5", "@babel/helper-simple-access@^7.24.5": +"@babel/helper-simple-access@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.5.tgz" integrity sha512-uH3Hmf5q5n7n8mz7arjUlDOCbttY/DW4DYhE6FUsjKJ/oYC1kQQUvwEQWxRwUpX9qQKRXeqLwWxrqilMrf32sQ== dependencies: "@babel/types" "^7.24.5" -"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz" - integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== dependencies: - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" + +"@babel/helper-skip-transparent-expression-wrappers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz#5f8fa83b69ed5c27adc56044f8be2b3ea96669d9" + integrity sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ== + dependencies: + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/helper-split-export-declaration@^7.24.5": version "7.24.5" @@ -218,6 +316,13 @@ dependencies: "@babel/types" "^7.24.5" +"@babel/helper-split-export-declaration@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856" + integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA== + dependencies: + "@babel/types" "^7.24.7" + "@babel/helper-string-parser@^7.24.1": version "7.24.1" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz" @@ -228,6 +333,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz#28583c28b15f2a3339cfafafeaad42f9a0e828df" integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q== +"@babel/helper-string-parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2" + integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg== + "@babel/helper-validator-identifier@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz" @@ -248,6 +358,11 @@ resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz" integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== +"@babel/helper-validator-option@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6" + integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw== + "@babel/helpers@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.5.tgz" @@ -257,6 +372,14 @@ "@babel/traverse" "^7.24.5" "@babel/types" "^7.24.5" +"@babel/helpers@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416" + integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg== + dependencies: + "@babel/template" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/highlight@^7.24.2": version "7.24.5" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz" @@ -297,28 +420,33 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz" integrity sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg== -"@babel/plugin-syntax-jsx@^7.24.1": - version "7.24.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.1.tgz" - integrity sha512-2eCtxZXf+kbkMIsXS4poTvT4Yu5rXiRa+9xGVT56raghjmBTKMpFNc9R4IDiB4emao9eO22Ox7CxuJG7BgExqA== +"@babel/parser@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85" + integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw== + +"@babel/plugin-syntax-jsx@^7.24.6", "@babel/plugin-syntax-jsx@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.24.7.tgz#39a1fa4a7e3d3d7f34e2acc6be585b718d30e02d" + integrity sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-syntax-typescript@^7.24.1": - version "7.24.1" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.1.tgz" - integrity sha512-Yhnmvy5HZEnHUty6i++gcfH1/l68AHnItFHnaCv6hn9dNh0hQvvQJsxpi4BMBFN5DLeHBuucT/0DgzXif/OyRw== +"@babel/plugin-syntax-typescript@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c" + integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA== dependencies: - "@babel/helper-plugin-utils" "^7.24.0" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-modules-commonjs@^7.24.1": - version "7.24.1" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.1.tgz" - integrity sha512-szog8fFTUxBfw0b98gEWPaEqF42ZUD/T3bkynW/wtgx2p/XCP55WEsb+VosKceRSd6njipdZvNogqdtI4Q0chw== +"@babel/plugin-transform-modules-commonjs@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.7.tgz#9fd5f7fdadee9085886b183f1ad13d1ab260f4ab" + integrity sha512-iFI8GDxtevHJ/Z22J5xQpVqFLlMNstcLXh994xifFwxxGslr2ZXXLWgtBeLctOD63UFDArdvN6Tg8RFw+aEmjQ== dependencies: - "@babel/helper-module-transforms" "^7.23.3" - "@babel/helper-plugin-utils" "^7.24.0" - "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-module-transforms" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" "@babel/plugin-transform-react-jsx-self@^7.24.5": version "7.24.6" @@ -334,26 +462,26 @@ dependencies: "@babel/helper-plugin-utils" "^7.24.6" -"@babel/plugin-transform-typescript@^7.24.1": - version "7.24.5" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.5.tgz" - integrity sha512-E0VWu/hk83BIFUWnsKZ4D81KXjN5L3MobvevOHErASk9IPwKHOkTgvqzvNo1yP/ePJWqqK2SpUR5z+KQbl6NVw== +"@babel/plugin-transform-typescript@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.24.7.tgz#b006b3e0094bf0813d505e0c5485679eeaf4a881" + integrity sha512-iLD3UNkgx2n/HrjBesVbYX6j0yqn/sJktvbtKKgcaLIQ4bTTQ8obAypc1VpyHPD2y4Phh9zHOaAt8e/L14wCpw== dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-create-class-features-plugin" "^7.24.5" - "@babel/helper-plugin-utils" "^7.24.5" - "@babel/plugin-syntax-typescript" "^7.24.1" + "@babel/helper-annotate-as-pure" "^7.24.7" + "@babel/helper-create-class-features-plugin" "^7.24.7" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/plugin-syntax-typescript" "^7.24.7" -"@babel/preset-typescript@^7.24.1": - version "7.24.1" - resolved "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.24.1.tgz" - integrity sha512-1DBaMmRDpuYQBPWD8Pf/WEwCrtgRHxsZnP4mIy9G/X+hFfbI47Q2G4t1Paakld84+qsk2fSsUPMKg71jkoOOaQ== +"@babel/preset-typescript@^7.24.6": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.24.7.tgz#66cd86ea8f8c014855671d5ea9a737139cbbfef1" + integrity sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ== dependencies: - "@babel/helper-plugin-utils" "^7.24.0" - "@babel/helper-validator-option" "^7.23.5" - "@babel/plugin-syntax-jsx" "^7.24.1" - "@babel/plugin-transform-modules-commonjs" "^7.24.1" - "@babel/plugin-transform-typescript" "^7.24.1" + "@babel/helper-plugin-utils" "^7.24.7" + "@babel/helper-validator-option" "^7.24.7" + "@babel/plugin-syntax-jsx" "^7.24.7" + "@babel/plugin-transform-modules-commonjs" "^7.24.7" + "@babel/plugin-transform-typescript" "^7.24.7" "@babel/runtime@^7.12.5": version "7.24.6" @@ -385,6 +513,15 @@ "@babel/parser" "^7.24.0" "@babel/types" "^7.24.0" +"@babel/template@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" + integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + "@babel/traverse@^7.24.5": version "7.24.5" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz" @@ -401,6 +538,22 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5" + integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.24.7" + "@babel/helper-environment-visitor" "^7.24.7" + "@babel/helper-function-name" "^7.24.7" + "@babel/helper-hoist-variables" "^7.24.7" + "@babel/helper-split-export-declaration" "^7.24.7" + "@babel/parser" "^7.24.7" + "@babel/types" "^7.24.7" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.20.7": version "7.24.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.6.tgz#ba4e1f59870c10dc2fa95a274ac4feec23b21912" @@ -419,6 +572,15 @@ "@babel/helper-validator-identifier" "^7.24.5" to-fast-properties "^2.0.0" +"@babel/types@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2" + integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q== + dependencies: + "@babel/helper-string-parser" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@ebay/nice-modal-react@^1.2.13": version "1.2.13" resolved "https://registry.yarnpkg.com/@ebay/nice-modal-react/-/nice-modal-react-1.2.13.tgz#7e8229fe3a48a11f27cd7f5e21190d82d6f609ce" @@ -983,10 +1145,10 @@ resolved "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz" integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== -"@iconify/utils@^2.1.23": - version "2.1.23" - resolved "https://registry.npmjs.org/@iconify/utils/-/utils-2.1.23.tgz" - integrity sha512-YGNbHKM5tyDvdWZ92y2mIkrfvm5Fvhe6WJSkWu7vvOFhMtYDP0casZpoRz0XEHZCrYsR4stdGT3cZ52yp5qZdQ== +"@iconify/utils@^2.1.24": + version "2.1.24" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.24.tgz#a9ac378eaccd654e5d6890e35a0104ba62b38386" + integrity sha512-H8r2KpL5uKyrkb3z9/3HD/22JcxqW3BJyjEWZhX2T7DehnYVZthEap1cNsEl/UtCDC3TlpNmwiPX8wg3y8E4dg== dependencies: "@antfu/install-pkg" "^0.1.1" "@antfu/utils" "^0.7.7" @@ -3748,25 +3910,25 @@ resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@unocss/astro@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/astro/-/astro-0.60.3.tgz" - integrity sha512-duFuyVhqYqQ15JZqx41UNgIxndqYRbOwDkJ7Y+R5N+u59a27vImz8B9eOFkHaZCFBWyH5jywkT8LVK1sfddFaw== +"@unocss/astro@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/astro/-/astro-0.60.4.tgz#8db5599c9e0b18239f4a3ae127eaf1d43e220246" + integrity sha512-mfWiEVCUP00gxrMewwPfnTuw+ur5b6uIBRH2tIGkvfI21rLyZw8TIF08w7USz9C/47rvzsixBtCqq7v0g3Tw9w== dependencies: - "@unocss/core" "0.60.3" - "@unocss/reset" "0.60.3" - "@unocss/vite" "0.60.3" + "@unocss/core" "0.60.4" + "@unocss/reset" "0.60.4" + "@unocss/vite" "0.60.4" -"@unocss/cli@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/cli/-/cli-0.60.3.tgz" - integrity sha512-bN829zn6k4hrvDTLnUcI2uAJnSevHwlkOCaYxN/C+v11uGxIewk5Xum6Vm5kZ8JTpCR1jEu/i7wIBNde3XKN5g== +"@unocss/cli@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/cli/-/cli-0.60.4.tgz#decb44e7c0f31e790788185995de5def9489af35" + integrity sha512-RFt3BOgtp5ZI+cS6grKKo1DqvUJ/e8iRPwn843u6qSw18guIc4CEVTe5jcDAGuLcL4va9hg2wd4NReUEnMCZ/g== dependencies: "@ampproject/remapping" "^2.3.0" "@rollup/pluginutils" "^5.1.0" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/preset-uno" "0.60.3" + "@unocss/config" "0.60.4" + "@unocss/core" "0.60.4" + "@unocss/preset-uno" "0.60.4" cac "^6.7.14" chokidar "^3.6.0" colorette "^2.0.20" @@ -3776,31 +3938,19 @@ pathe "^1.1.2" perfect-debounce "^1.0.0" -"@unocss/config@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/config/-/config-0.60.3.tgz" - integrity sha512-3RGD7h3bS4qZA/Khcqhn1EgLgyPc85FSz5rubdywHRdHlpY9sdmuGEJahvqSLMN4MmdYQDmqEIEAJjENrdgZeQ== +"@unocss/config@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/config/-/config-0.60.4.tgz#e21f7064d311bcfab73d18e254506f72a60d0ebc" + integrity sha512-ri9P2+YztD5JdPYSLiNjcLf6NgoBbwJDVutP/tQnfYYrE72DQ+j+4vepyxEBa1YaH/X4qsmLJCj+2tI/ufIiog== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" unconfig "^0.3.13" -"@unocss/core@0.60.3", "@unocss/core@^0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/core/-/core-0.60.3.tgz" - integrity sha512-4bBX1pavDl2DSCozEII7bxYGT0IkyO7kKlUuCtooTePWyLjf2F7essdzHkJ00EpNR64kkebR9V0lqBMBo07VPw== - "@unocss/core@0.60.4", "@unocss/core@^0.60.4": version "0.60.4" resolved "https://registry.yarnpkg.com/@unocss/core/-/core-0.60.4.tgz#01ff57305225beb0635f4686dea6806e4016abe4" integrity sha512-6tz8KTzC30oB0YikwRQoIpJ6Y6Dg+ZiK3NfCIsH+UX11bh2J2M53as2EL/5VQCqtiUn3YP0ZEzR2d1AWX78RCA== -"@unocss/extractor-arbitrary-variants@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.60.3.tgz" - integrity sha512-PnwNwkeAHmbJbrf5XN0xQG1KT1VQEye8neYn5yz1MHnT8Cj2nqjrqoCRGLCLhpOUg3/MNj+bpiA7hGnFbXWaCQ== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants@0.60.4": version "0.60.4" resolved "https://registry.yarnpkg.com/@unocss/extractor-arbitrary-variants/-/extractor-arbitrary-variants-0.60.4.tgz#d5b9194297108acdd8de0cc2338ac4c569ebdd2c" @@ -3808,54 +3958,45 @@ dependencies: "@unocss/core" "0.60.4" -"@unocss/inspector@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/inspector/-/inspector-0.60.3.tgz" - integrity sha512-2cXAPA1yddB79mmpMXxPpSpizn4TskAsB7aSocbprOTYIU2Ff53gfkkijnLixrBvbG8xw91d9oPuI5Hm9GCyMQ== +"@unocss/inspector@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/inspector/-/inspector-0.60.4.tgz#8a4a88c0a3dfc41e0762b78976b15ab4ab461388" + integrity sha512-PcnrEQ2H7osZho4Nh0+84O4IXzlkF7pvTUe/7FTJYF1HQGWHB/PfOSoyKn7/sF5sED8hMK9RlSJ9YGUH9ioY+g== dependencies: - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.60.4" + "@unocss/rule-utils" "0.60.4" gzip-size "^6.0.0" sirv "^2.0.4" -"@unocss/postcss@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/postcss/-/postcss-0.60.3.tgz" - integrity sha512-7jRsKgMz4wr3Rvnr/RpK/7g6o8bMrqjTb01imgHeaw7cmQsa9sH1HPCp+4lvHh2/QKKLwwRAC+fdnNmsf8JKjA== +"@unocss/postcss@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/postcss/-/postcss-0.60.4.tgz#bc6b8604fc8d7a351b0cf4f43a4729c800bde39f" + integrity sha512-mHha4BoOpCWRRL5EFJqsj+BiYxOBPXUZDFbSWmA8oAMBwcA/yqtnaRF2tqI9CK+CDfhmtbYF64KdTLh9pf6BvQ== dependencies: - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/config" "0.60.4" + "@unocss/core" "0.60.4" + "@unocss/rule-utils" "0.60.4" css-tree "^2.3.1" fast-glob "^3.3.2" magic-string "^0.30.10" postcss "^8.4.38" -"@unocss/preset-attributify@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-attributify/-/preset-attributify-0.60.3.tgz" - integrity sha512-G/Lx9xq/tVKvjp/CcACyLU+p3mcrpgkMvy+Z3NSHfBAZAmbieBMFhwROxt5R8Bny66q3fYDtxxx+likpokpOAQ== +"@unocss/preset-attributify@0.60.4", "@unocss/preset-attributify@^0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-attributify/-/preset-attributify-0.60.4.tgz#17a97733c4138ba61d1793106f9e54a82676ad91" + integrity sha512-J2GWUC0bcmZSXlBGLYUXwWQos/dNzKbq2CKweWVBAmAH9XyfM0mA5CTNBRv05PN1g6C/0z5st7ntUjV6KHJuTg== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" -"@unocss/preset-icons@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-icons/-/preset-icons-0.60.3.tgz" - integrity sha512-L3Ecr36xC+Y8v5WMQcNsGoOzu0HpgNLh5RlC2abs8OyBDGn1k3UqdEFdrhRt3bXpln9b8JkstHO7ZwYPgr2/Cg== +"@unocss/preset-icons@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-icons/-/preset-icons-0.60.4.tgz#8241967f81931be886b7a335b546c8a1699c5e44" + integrity sha512-UN/dj+nhI3+S06YxCZQPLw3GZy780iaE71dysyhDMdh+Qq2KFVs3d94mr1427fjz/3Y8ZyXkgqyhCFr7UT0bMQ== dependencies: - "@iconify/utils" "^2.1.23" - "@unocss/core" "0.60.3" + "@iconify/utils" "^2.1.24" + "@unocss/core" "0.60.4" ofetch "^1.3.4" -"@unocss/preset-mini@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-mini/-/preset-mini-0.60.3.tgz" - integrity sha512-7en8KBX3lN1Y6eCprbzA1QVfyXZD03B+oAxFXH8QPv5jRIL8Lm8sbXqE+VTsSME/OVp4DnS6LdGtDAm9mvIOSw== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants" "0.60.3" - "@unocss/rule-utils" "0.60.3" - "@unocss/preset-mini@0.60.4": version "0.60.4" resolved "https://registry.yarnpkg.com/@unocss/preset-mini/-/preset-mini-0.60.4.tgz#5f6d1c8fbe7299acf401c59e6c78cf37554cd817" @@ -3865,49 +4006,40 @@ "@unocss/extractor-arbitrary-variants" "0.60.4" "@unocss/rule-utils" "0.60.4" -"@unocss/preset-tagify@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-tagify/-/preset-tagify-0.60.3.tgz" - integrity sha512-pzD6bgtGuIk7M1n/JQiR6EpwnVvafSTHoM70Jhf+T8MSuatDb+KFJCn3VELV2v38aikcUY5cTf95jqHQdzOAhQ== +"@unocss/preset-tagify@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-tagify/-/preset-tagify-0.60.4.tgz#cd5d2b47baef1ebac37c7f5b43caf753e87f572d" + integrity sha512-GxL/W3qkdWWDqXi43qyLbp/BpEj7gMw99KqkO7bmbVi3BVlFggreTFwmQu89pB6iatxGjxnAsc+TsQZqxKftZA== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" -"@unocss/preset-typography@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-typography/-/preset-typography-0.60.3.tgz" - integrity sha512-cOXOnxkgH0ZiYg/oHBbabzXi1q6oTZWgQ4fqrVxGI2CD4oiWYaPU/wzKsx930D6uBSIlBVDX/cov2j0dPWjgJg== +"@unocss/preset-typography@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-typography/-/preset-typography-0.60.4.tgz#4b01522647ca69c22dbcc764ce752bd356752f38" + integrity sha512-6j8ySZYEAwMBy9a3Lw3EEfRlcAClti4zvaV0kBtkP4BDZCwlgX2eE1pmw2mTUy+E1yVlXm3NnRzKfDudQUzraA== dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" + "@unocss/core" "0.60.4" + "@unocss/preset-mini" "0.60.4" -"@unocss/preset-uno@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-uno/-/preset-uno-0.60.3.tgz" - integrity sha512-PJSR78uaIRTsD9RFSQLwsrGAsjQoW5nWenU4n4GyZeskDsyQVgOcaKtvh+0aYjYdWBa1UvxeUL8Y+m29K4HnAA== +"@unocss/preset-uno@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-uno/-/preset-uno-0.60.4.tgz#39c631264caed80e239563deac39a1fcba30fd6a" + integrity sha512-AN8ZTtiKSaZNGKZZIqt/JAhMzSY2hHLwhGEOFDrXgjWFr85UlwZzODMDoT58PrU04VlbhN8+0N4lHfLmZCKpiQ== dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/preset-wind" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.60.4" + "@unocss/preset-mini" "0.60.4" + "@unocss/preset-wind" "0.60.4" + "@unocss/rule-utils" "0.60.4" -"@unocss/preset-web-fonts@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-web-fonts/-/preset-web-fonts-0.60.3.tgz" - integrity sha512-uYHvnqgLDawG3o9oBbasPWbSZ93kzk2JQBcH6xmHh7xqYtRdHqVbUjVU1zIqSjXm19SxFriSrNTl4ct2+/pJIg== +"@unocss/preset-web-fonts@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/preset-web-fonts/-/preset-web-fonts-0.60.4.tgz#5a4f611ae0d8b7cdd14d9ec45eefdd4b17742cd8" + integrity sha512-COfxOQcREFgpsm6nw234pxrr1EV1zWUVYXBZjlH+vk7x8EhaS5BPAXqN6SneIVTTDvEE9U4opAaoEYz5A3XWaQ== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" ofetch "^1.3.4" -"@unocss/preset-wind@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/preset-wind/-/preset-wind-0.60.3.tgz" - integrity sha512-q7yDJ/SyEkPmPBJvIeHd9Bt50LAu65q7WwKxJYfJkjfJvJUMj6DO8FgPnpeiwBeJh9897m2Ap6zoQ3JqBjPLHQ== - dependencies: - "@unocss/core" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/rule-utils" "0.60.3" - -"@unocss/preset-wind@^0.60.4": +"@unocss/preset-wind@0.60.4", "@unocss/preset-wind@^0.60.4": version "0.60.4" resolved "https://registry.yarnpkg.com/@unocss/preset-wind/-/preset-wind-0.60.4.tgz#1ec849e04020d0c86b2180d18f72a0f734a8a224" integrity sha512-dT/U+RkbL21lDTOP7/mlFZxlBbUAefUzQZINC0BX7vTKvO57G4HxRq62u9xvMGFv38lQ+qXXzKhABVsEPDNpUA== @@ -3916,18 +4048,10 @@ "@unocss/preset-mini" "0.60.4" "@unocss/rule-utils" "0.60.4" -"@unocss/reset@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/reset/-/reset-0.60.3.tgz" - integrity sha512-EuC8gkh8L8WvPOcjS/KqprEJXIKcpBPm+ou5G9D6WgDmJ+TgQrri5oR+QUmOmEnueQkVL7bnkFkIKeg71SJLFA== - -"@unocss/rule-utils@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/rule-utils/-/rule-utils-0.60.3.tgz" - integrity sha512-I47/DcKQ2z12W80+Ffth0K6LzNvqcQPYRWk7KwVemVoEiGYamMV8/s+SbB26Fk9KUFjh+Ns/pGAo4iJZo0ueUQ== - dependencies: - "@unocss/core" "^0.60.3" - magic-string "^0.30.10" +"@unocss/reset@0.60.4", "@unocss/reset@^0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/reset/-/reset-0.60.4.tgz#1156b8a19547d7a8b12b2ef8ffad8265ad4e09c0" + integrity sha512-MEngG4byIHnfb0osvxqU2gBdBkXPPE4z+G9HeEt3JUadWAp2gggm8ojC1/1PoJF5M31loxGEVVrB0FLSKACw3g== "@unocss/rule-utils@0.60.4": version "0.60.4" @@ -3937,67 +4061,82 @@ "@unocss/core" "^0.60.4" magic-string "^0.30.10" -"@unocss/scope@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/scope/-/scope-0.60.3.tgz" - integrity sha512-uDUcBkFe8nRwNiU4YQyrOCjY7/+qFJI/Qr0eouMPOSEsQ6uIXQEWjykqUBJg2fvm0S2vbfBGO9tO/wCDIk5O3w== +"@unocss/scope@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/scope/-/scope-0.60.4.tgz#8f1def31f540ec0863ab7c035ad73cac219957e0" + integrity sha512-AOu/qvi4agy0XfGF3QEBbuxVHkVZHpmU0NMBYuxa0B869YZENT87sTM6DVwtvr75CZvACWxv/hcL3lR68uKBjw== -"@unocss/transformer-attributify-jsx-babel@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/transformer-attributify-jsx-babel/-/transformer-attributify-jsx-babel-0.60.3.tgz" - integrity sha512-6WcEFPSaxscGR22dRUcNqY0ippC3/Q/LBVFVSCJh++hoIPVCZbxF505cPq/bOdF2bpNzj9yXW0OJt03nB505Hg== +"@unocss/transformer-attributify-jsx-babel@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-attributify-jsx-babel/-/transformer-attributify-jsx-babel-0.60.4.tgz#62ee633c86eb846d892ff25c141f368973b2da19" + integrity sha512-BL4g2gyLpbseu+fOhkAHKNxYcHcn7brQAjXj5k5Yyy6wpwm43lzHYPZtRPrbLVLniqqAN21FzEbtJXCPIHKlHA== dependencies: - "@babel/core" "^7.24.5" - "@babel/plugin-syntax-jsx" "^7.24.1" - "@babel/preset-typescript" "^7.24.1" - "@unocss/core" "0.60.3" + "@babel/core" "^7.24.6" + "@babel/plugin-syntax-jsx" "^7.24.6" + "@babel/preset-typescript" "^7.24.6" + "@unocss/core" "0.60.4" -"@unocss/transformer-attributify-jsx@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-0.60.3.tgz" - integrity sha512-zcPu4tUm/1EnqcFpf6+XzUzfb2BzJBcfNMkFzl/5BSTMECEDgdj4QGBWxnTuSlSZs4digRABGtuAHUO7k1qfgA== +"@unocss/transformer-attributify-jsx@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-attributify-jsx/-/transformer-attributify-jsx-0.60.4.tgz#36798e835e0f4419e5500f391b99da8ce93cfdca" + integrity sha512-tQwD1T8Juz5F4JHYxTgekCv5olEegAPRZwAgx75pP+X2+PkV670pdXv8zbK0t5q6bvyF53vEVBrgQ9q1xSH9yQ== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" -"@unocss/transformer-compile-class@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/transformer-compile-class/-/transformer-compile-class-0.60.3.tgz" - integrity sha512-j6wiYgtNqMlrctaZUuN4S+vANW0DMb9wW3KbJ2XvB7lXftfY1bbZ3IKenAyFp0ZLdKs69B6irJbCbIS5OAKKXQ== +"@unocss/transformer-compile-class@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-compile-class/-/transformer-compile-class-0.60.4.tgz#81053fae6d4721afb3f4f7e7c41e3d3fc975f5b3" + integrity sha512-zIqKQ7javiCb9Q3fbMvx1QVln8OqvAzWwgCVHsPINzDrDi73KXa3eeCU6GNlsd46tzy0Y9ryRIvW73YS+9Oj1w== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" -"@unocss/transformer-directives@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/transformer-directives/-/transformer-directives-0.60.3.tgz" - integrity sha512-JuFpxyB1yvS2YoiguO5+8Ou6k9yyojZCnnDYXXZqMGLp1KdLiDcAPZQyShoD5HLzPGHtAbQELUz9TcX3VMLEoQ== +"@unocss/transformer-directives@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-directives/-/transformer-directives-0.60.4.tgz#fd18a7a7d7da114479aee427c85dcc23c882c522" + integrity sha512-u3fQI8RszMhUevhJICtQ/bNpAfbh8MEXQf7YNnzUvLvbXGkkoieyU5mj0ray6fbToqxfxVceQtXYcFYIuf4aNg== dependencies: - "@unocss/core" "0.60.3" - "@unocss/rule-utils" "0.60.3" + "@unocss/core" "0.60.4" + "@unocss/rule-utils" "0.60.4" css-tree "^2.3.1" -"@unocss/transformer-variant-group@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/transformer-variant-group/-/transformer-variant-group-0.60.3.tgz" - integrity sha512-jQg0+W49jA7Z+4mRQbZWZKV6aXJXQfAHRC3oo4C9vEyTXL2jb952K12XVcJhXnbLYpnUKwytR+vbshXMIHWZwA== +"@unocss/transformer-variant-group@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/transformer-variant-group/-/transformer-variant-group-0.60.4.tgz#453dd4bf5e6d094c54b591de385fb1949c09c638" + integrity sha512-R4d16G7s3fDXj9prUNFnJi8cZvH8/XZsqiKDzCBjXNKrbf9zp7YnWD2VaMFjUISgW5kSQjQNSWK84soVNWq3UQ== dependencies: - "@unocss/core" "0.60.3" + "@unocss/core" "0.60.4" -"@unocss/vite@0.60.3": - version "0.60.3" - resolved "https://registry.npmjs.org/@unocss/vite/-/vite-0.60.3.tgz" - integrity sha512-I3EOR3g245IGDp3DS17AQAMwNQrh6L6kIlXG3+wt5IZ1zu1ahZmKA8/xxh6oo2TNdu4rI6nQbcLIRn+8eSyfQw== +"@unocss/vite@0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/vite/-/vite-0.60.4.tgz#561851aceefe33e030e65c7ad1ad61bb70fed248" + integrity sha512-af9hhtW11geF56cotKUE16Fr+FirTdV/Al/usjKJ6P5hnCEQnqSHXQDFXL5Y6vXwcvLDmOhHYNrVR8duKgC8Mw== dependencies: "@ampproject/remapping" "^2.3.0" "@rollup/pluginutils" "^5.1.0" - "@unocss/config" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/inspector" "0.60.3" - "@unocss/scope" "0.60.3" - "@unocss/transformer-directives" "0.60.3" + "@unocss/config" "0.60.4" + "@unocss/core" "0.60.4" + "@unocss/inspector" "0.60.4" + "@unocss/scope" "0.60.4" + "@unocss/transformer-directives" "0.60.4" chokidar "^3.6.0" fast-glob "^3.3.2" magic-string "^0.30.10" +"@unocss/webpack@^0.60.4": + version "0.60.4" + resolved "https://registry.yarnpkg.com/@unocss/webpack/-/webpack-0.60.4.tgz#ee227cb66606fbd6bf91919c2fc3e8469e76fa44" + integrity sha512-TcPuiAZZO+a+xiahrCm7eEHlP8o667n+CWv+kpz4bidY5V8Xyxs1MjzJAPVOk8Kwz86HvQZyf2CG+3powNTwKA== + dependencies: + "@ampproject/remapping" "^2.3.0" + "@rollup/pluginutils" "^5.1.0" + "@unocss/config" "0.60.4" + "@unocss/core" "0.60.4" + chokidar "^3.6.0" + fast-glob "^3.3.2" + magic-string "^0.30.10" + unplugin "^1.10.1" + webpack-sources "^3.2.3" + "@vitejs/plugin-react@^4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.3.0.tgz#f20ec2369a92d8abaaefa60da8b7157819d20481" @@ -9521,36 +9660,51 @@ unocss-preset-animations@^1.0.2: resolved "https://registry.npmjs.org/unocss-preset-animations/-/unocss-preset-animations-1.0.2.tgz" integrity sha512-AacFdOvHwvKZKqjn9/paKQ50LmU0qk4n6350/toQcSX3XEQIE7rTZwm/68Aag5jP2Z8M4Y8IvDf8Q7Qc0MNdTw== +unocss-preset-autoprefixer@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/unocss-preset-autoprefixer/-/unocss-preset-autoprefixer-0.0.7.tgz#c639eecc7d96bf64706e6d1f410b3f07a756c455" + integrity sha512-e1C+M2b2VqwM3JOiXp/huJNibubrU31NtDR65xeXio5GCIj4i1DNbQP0DDdP9SUIzczOuIdfeENwHkk9lQkfKA== + unocss-preset-shadcn@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/unocss-preset-shadcn/-/unocss-preset-shadcn-0.3.0.tgz" integrity sha512-GCtp2o/9LZL0xl11T9mE35UMIhow8mmkvMvGEKGD8TiienAXM9I7lf5vSOgJd9ywyuGYV3Av5DZ+sR4GX5KRvA== -unocss@^0.60.2: - version "0.60.3" - resolved "https://registry.npmjs.org/unocss/-/unocss-0.60.3.tgz" - integrity sha512-pUBbpgGRKCa6oB/LrGEFBWP2/2E1ZOY8XO7aVJKo2x10rqLS8tGykn1VoBUgbGJsv/8W8tskTVz+RFbCyKP+kA== - dependencies: - "@unocss/astro" "0.60.3" - "@unocss/cli" "0.60.3" - "@unocss/core" "0.60.3" - "@unocss/extractor-arbitrary-variants" "0.60.3" - "@unocss/postcss" "0.60.3" - "@unocss/preset-attributify" "0.60.3" - "@unocss/preset-icons" "0.60.3" - "@unocss/preset-mini" "0.60.3" - "@unocss/preset-tagify" "0.60.3" - "@unocss/preset-typography" "0.60.3" - "@unocss/preset-uno" "0.60.3" - "@unocss/preset-web-fonts" "0.60.3" - "@unocss/preset-wind" "0.60.3" - "@unocss/reset" "0.60.3" - "@unocss/transformer-attributify-jsx" "0.60.3" - "@unocss/transformer-attributify-jsx-babel" "0.60.3" - "@unocss/transformer-compile-class" "0.60.3" - "@unocss/transformer-directives" "0.60.3" - "@unocss/transformer-variant-group" "0.60.3" - "@unocss/vite" "0.60.3" +unocss@^0.60.4: + version "0.60.4" + resolved "https://registry.yarnpkg.com/unocss/-/unocss-0.60.4.tgz#47fe97de3bedfc1750f3c54f6e75f0994fa5f921" + integrity sha512-KtYVzm1sV1J7hpXFvILPZiJVTni+XzC2vJzKYFTEe80fEGsrL+572YjS3QjZB52TMSppLYJk6WIVTb4mE4RmvQ== + dependencies: + "@unocss/astro" "0.60.4" + "@unocss/cli" "0.60.4" + "@unocss/core" "0.60.4" + "@unocss/extractor-arbitrary-variants" "0.60.4" + "@unocss/postcss" "0.60.4" + "@unocss/preset-attributify" "0.60.4" + "@unocss/preset-icons" "0.60.4" + "@unocss/preset-mini" "0.60.4" + "@unocss/preset-tagify" "0.60.4" + "@unocss/preset-typography" "0.60.4" + "@unocss/preset-uno" "0.60.4" + "@unocss/preset-web-fonts" "0.60.4" + "@unocss/preset-wind" "0.60.4" + "@unocss/reset" "0.60.4" + "@unocss/transformer-attributify-jsx" "0.60.4" + "@unocss/transformer-attributify-jsx-babel" "0.60.4" + "@unocss/transformer-compile-class" "0.60.4" + "@unocss/transformer-directives" "0.60.4" + "@unocss/transformer-variant-group" "0.60.4" + "@unocss/vite" "0.60.4" + +unplugin@^1.10.1: + version "1.10.1" + resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-1.10.1.tgz#8ceda065dc71bc67d923dea0920f05c67f2cd68c" + integrity sha512-d6Mhq8RJeGA8UfKCu54Um4lFA0eSaRa3XxdAJg8tIdxbu1ubW0hBCZUL7yI2uGyYCRndvbK8FLHzqy2XKfeMsg== + dependencies: + acorn "^8.11.3" + chokidar "^3.6.0" + webpack-sources "^3.2.3" + webpack-virtual-modules "^0.6.1" unraw@^3.0.0: version "3.0.0" @@ -9724,6 +9878,16 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack-virtual-modules@^0.6.1: + version "0.6.2" + resolved "https://registry.yarnpkg.com/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz#057faa9065c8acf48f24cb57ac0e77739ab9a7e8" + integrity sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ== + whatwg-encoding@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz#d0f4ef769905d426e1688f3e34381a99b60b76e5" From 8e71bcd689fcf9a4f271bb5f0fd54c9adfdee373 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Mon, 10 Jun 2024 09:16:12 +0400 Subject: [PATCH 10/84] feat: Create input field component --- src/app/_layout/globals.css | 2 +- src/common/ui/components/input-field.tsx | 93 +++++++++++++++++++ src/common/ui/components/select.tsx | 2 +- .../donation/components/DonationToAccount.tsx | 40 +++++++- 4 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 src/common/ui/components/input-field.tsx diff --git a/src/app/_layout/globals.css b/src/app/_layout/globals.css index 2e3d48d8..8e545611 100644 --- a/src/app/_layout/globals.css +++ b/src/app/_layout/globals.css @@ -59,7 +59,7 @@ --border: 214.3 31.8% 91.4%; --input: 0 0% 92%; - --ring: 222.2 84% 4.9%; + --ring: 0 0% 78%; --radius: 0.5rem; } diff --git a/src/common/ui/components/input-field.tsx b/src/common/ui/components/input-field.tsx new file mode 100644 index 00000000..e74945f0 --- /dev/null +++ b/src/common/ui/components/input-field.tsx @@ -0,0 +1,93 @@ +import { forwardRef } from "react"; + +import { cn } from "../utils"; + +export interface InputFieldProps + extends React.InputHTMLAttributes { + label: string; + labelExtension?: React.ReactNode; + fieldExtension?: React.ReactNode; + appendix?: string; +} + +export const InputField = forwardRef( + ( + { + className, + disabled, + label, + labelExtension, + fieldExtension = null, + appendix, + ...props + }, + ref, + ) => { + const appendixElement = appendix ? ( + + {appendix} + + ) : null; + + const fieldProps = { disabled, ref, ...props }; + + const fieldExtensionElement = fieldExtension ? ( +
+ {fieldExtension} +
+ ) : null; + + return ( +
+
+ + {label} + + + {labelExtension} +
+ +
+ {fieldExtensionElement} + + + + {appendixElement} +
+
+ ); + }, +); + +InputField.displayName = "InputField"; diff --git a/src/common/ui/components/select.tsx b/src/common/ui/components/select.tsx index a6696209..6e788624 100644 --- a/src/common/ui/components/select.tsx +++ b/src/common/ui/components/select.tsx @@ -25,7 +25,7 @@ const SelectTrigger = React.forwardRef< span]:line-clamp-1", + "flex h-10 w-full items-center justify-between gap-2 rounded-md bg-background py-2 pl-3 pr-2 text-sm shadow-[0px_0px_0px_1px_#00000038_inset,0px_-1px_1px_0px_#00000038_inset] ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className, )} {...props} diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index 90fae8e4..e654fc73 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -4,6 +4,16 @@ import { DialogHeader, DialogTitle, } from "@/common/ui/components/dialog"; +import { InputField } from "@/common/ui/components/input-field"; +import { + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectTrigger, + SelectValue, +} from "@/common/ui/components/select"; export type DonationToAccountProps = ByAccountId & {}; @@ -24,7 +34,35 @@ export const DonationToAccount: React.FC = ({ {`Donation to ${account.near_social_profile_data.name}`} - + + + 200 NEAR available + + } + fieldExtension={ + + } + type="number" + placeholder="0.00" + min={0} + step={0.01} + appendix="$ 0.00" + /> + )} From d6d7fe3d533aa5fd8d98024364f27ce292b57645 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Mon, 10 Jun 2024 19:25:54 +0400 Subject: [PATCH 11/84] Rename to TextField and restrict type options --- .../ui/components/{input-field.tsx => text-field.tsx} | 7 ++++--- src/modules/donation/components/DonationToAccount.tsx | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) rename src/common/ui/components/{input-field.tsx => text-field.tsx} (92%) diff --git a/src/common/ui/components/input-field.tsx b/src/common/ui/components/text-field.tsx similarity index 92% rename from src/common/ui/components/input-field.tsx rename to src/common/ui/components/text-field.tsx index e74945f0..03cc159a 100644 --- a/src/common/ui/components/input-field.tsx +++ b/src/common/ui/components/text-field.tsx @@ -2,15 +2,16 @@ import { forwardRef } from "react"; import { cn } from "../utils"; -export interface InputFieldProps +export interface TextFieldProps extends React.InputHTMLAttributes { + type: "email" | "text" | "number" | "tel" | "url"; label: string; labelExtension?: React.ReactNode; fieldExtension?: React.ReactNode; appendix?: string; } -export const InputField = forwardRef( +export const TextField = forwardRef( ( { className, @@ -90,4 +91,4 @@ export const InputField = forwardRef( }, ); -InputField.displayName = "InputField"; +TextField.displayName = "TextField"; diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index e654fc73..ba07951e 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -4,7 +4,6 @@ import { DialogHeader, DialogTitle, } from "@/common/ui/components/dialog"; -import { InputField } from "@/common/ui/components/input-field"; import { Select, SelectContent, @@ -14,6 +13,7 @@ import { SelectTrigger, SelectValue, } from "@/common/ui/components/select"; +import { TextField } from "@/common/ui/components/text-field"; export type DonationToAccountProps = ByAccountId & {}; @@ -35,7 +35,7 @@ export const DonationToAccount: React.FC = ({ - From 7a97c58b9d0ddba698ff35a0babcfab1cad25e9e Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 11 Jun 2024 07:35:40 +0400 Subject: [PATCH 12/84] Barrel export named UI primitives & Install radio components --- package.json | 3 +- src/app/_components/ActAsDao.tsx | 14 +++--- src/app/_components/AllProjects.tsx | 11 +++-- src/app/_components/Hero.tsx | 7 ++- src/app/_components/UserDropdown.tsx | 6 +-- src/app/_layout/Nav.tsx | 2 +- src/common/ui/components/Filter.tsx | 4 +- src/common/ui/components/InfiniteScroll.tsx | 4 +- src/common/ui/components/SearchBar.tsx | 4 +- src/common/ui/components/SortSelect.tsx | 4 +- src/common/ui/components/index.ts | 20 ++++++++ src/common/ui/components/radio-group.tsx | 47 +++++++++++++++++++ .../donation/components/DonationModal.tsx | 2 +- .../donation/components/DonationToAccount.tsx | 44 ++++++++++++++--- .../donation/components/DonationToPot.tsx | 2 +- .../profile/components/ProfileBanner.tsx | 4 +- .../project/components/CardSkeleton.tsx | 2 +- .../project/components/ProjectCard.tsx | 2 +- yarn.lock | 17 +++++++ 19 files changed, 155 insertions(+), 44 deletions(-) create mode 100644 src/common/ui/components/index.ts create mode 100644 src/common/ui/components/radio-group.tsx diff --git a/package.json b/package.json index 69861c23..e3e52b8c 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@radix-ui/react-dropdown-menu": "^2.0.6", "@radix-ui/react-label": "^2.0.2", "@radix-ui/react-popover": "^1.0.7", + "@radix-ui/react-radio-group": "^1.1.3", "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-slot": "^1.0.2", "@radix-ui/react-switch": "^1.0.3", @@ -114,4 +115,4 @@ "vite-tsconfig-paths": "^4.3.2", "vitest": "^1.6.0" } -} \ No newline at end of file +} diff --git a/src/app/_components/ActAsDao.tsx b/src/app/_components/ActAsDao.tsx index 05b25976..4ebe8381 100644 --- a/src/app/_components/ActAsDao.tsx +++ b/src/app/_components/ActAsDao.tsx @@ -9,13 +9,13 @@ import { AccordionContent, AccordionItem, AccordionTrigger, -} from "@/common/ui/components/accordion"; -import { Button } from "@/common/ui/components/button"; -import { Checkbox } from "@/common/ui/components/checkbox"; -import { DropdownMenuLabel } from "@/common/ui/components/dropdown-menu"; -import { Input } from "@/common/ui/components/input"; -import { Label } from "@/common/ui/components/label"; -import { Switch } from "@/common/ui/components/switch"; + Button, + Checkbox, + DropdownMenuLabel, + Input, + Label, + Switch, +} from "@/common/ui/components"; import { toggleDao } from "@/modules/profile/utils"; import { dispatch, useTypedSelector } from "../_store"; diff --git a/src/app/_components/AllProjects.tsx b/src/app/_components/AllProjects.tsx index ed53ae97..54cc33f7 100644 --- a/src/app/_components/AllProjects.tsx +++ b/src/app/_components/AllProjects.tsx @@ -6,10 +6,13 @@ import { RegistrationStatus, } from "@/common/contracts/potlock/interfaces/lists.interfaces"; import { getRegistrations } from "@/common/contracts/potlock/lists"; -import Filter, { Group } from "@/common/ui/components/Filter"; -import InfiniteScroll from "@/common/ui/components/InfiniteScroll"; -import SearchBar from "@/common/ui/components/SearchBar"; -import SortSelect from "@/common/ui/components/SortSelect"; +import { + Filter, + Group, + InfiniteScroll, + SearchBar, + SortSelect, +} from "@/common/ui/components"; import { Profile } from "@/modules/profile/models"; import { ProjectCard } from "@/modules/project"; import { categories, statuses } from "@/modules/project/constants"; diff --git a/src/app/_components/Hero.tsx b/src/app/_components/Hero.tsx index 871cc372..6bbe97e5 100644 --- a/src/app/_components/Hero.tsx +++ b/src/app/_components/Hero.tsx @@ -1,9 +1,8 @@ import Link from "next/link"; -import { Button } from "@/common/ui/components/button"; - -import useWallet from "../../modules/auth/hooks/useWallet"; -import useRegistration from "../../modules/core/hooks/useRegistration"; +import { Button } from "@/common/ui/components"; +import useWallet from "@/modules/auth/hooks/useWallet"; +import useRegistration from "@/modules/core/hooks/useRegistration"; const Hero = () => { const wallet = useWallet(); diff --git a/src/app/_components/UserDropdown.tsx b/src/app/_components/UserDropdown.tsx index 5506b30b..2497af2a 100644 --- a/src/app/_components/UserDropdown.tsx +++ b/src/app/_components/UserDropdown.tsx @@ -8,15 +8,15 @@ import { walletApi } from "@/common/contracts"; import { NEARSocialUserProfile } from "@/common/contracts/social"; import { getIsHuman } from "@/common/contracts/sybil.nadabot"; import { _address } from "@/common/lib"; -import { Button } from "@/common/ui/components/button"; import { + Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger, -} from "@/common/ui/components/dropdown-menu"; -import { Skeleton } from "@/common/ui/components/skeleton"; + Skeleton, +} from "@/common/ui/components"; import useWallet from "@/modules/auth/hooks/useWallet"; import { statusesIcons } from "@/modules/core/constants"; import useRegistration from "@/modules/core/hooks/useRegistration"; diff --git a/src/app/_layout/Nav.tsx b/src/app/_layout/Nav.tsx index 872490ef..dc6508ea 100644 --- a/src/app/_layout/Nav.tsx +++ b/src/app/_layout/Nav.tsx @@ -8,7 +8,7 @@ import { usePathname } from "next/navigation"; import { walletApi } from "@/common/contracts"; import useIsClient from "@/common/lib/useIsClient"; -import { Button } from "@/common/ui/components/button"; +import { Button } from "@/common/ui/components"; import { useAuth } from "@/modules/auth/hooks/useAuth"; import routesPath from "@/modules/core/routes"; diff --git a/src/common/ui/components/Filter.tsx b/src/common/ui/components/Filter.tsx index f8cb1a0e..d2320608 100644 --- a/src/common/ui/components/Filter.tsx +++ b/src/common/ui/components/Filter.tsx @@ -25,7 +25,7 @@ type Props = { groups: Group[]; }; -const Filter = ({ groups, popoverProps }: Props) => { +export const Filter = ({ groups, popoverProps }: Props) => { return ( @@ -63,5 +63,3 @@ const Filter = ({ groups, popoverProps }: Props) => { ); }; - -export default Filter; diff --git a/src/common/ui/components/InfiniteScroll.tsx b/src/common/ui/components/InfiniteScroll.tsx index c43730c4..41173338 100644 --- a/src/common/ui/components/InfiniteScroll.tsx +++ b/src/common/ui/components/InfiniteScroll.tsx @@ -12,7 +12,7 @@ type Props = Partial & { renderItem: (props: any) => ReactNode; }; -const InfiniteScroll = ({ +export const InfiniteScroll = ({ items, size, index, @@ -38,5 +38,3 @@ const InfiniteScroll = ({ ); }; - -export default InfiniteScroll; diff --git a/src/common/ui/components/SearchBar.tsx b/src/common/ui/components/SearchBar.tsx index ebe872d2..e589cc39 100644 --- a/src/common/ui/components/SearchBar.tsx +++ b/src/common/ui/components/SearchBar.tsx @@ -9,7 +9,7 @@ type Props = InputProps & { className?: string; }; -const SearchBar = ({ className, ...inputProps }: Props) => { +export const SearchBar = ({ className, ...inputProps }: Props) => { return (
@@ -27,5 +27,3 @@ const SearchBar = ({ className, ...inputProps }: Props) => {
); }; - -export default SearchBar; diff --git a/src/common/ui/components/SortSelect.tsx b/src/common/ui/components/SortSelect.tsx index 63797067..e3ef3e67 100644 --- a/src/common/ui/components/SortSelect.tsx +++ b/src/common/ui/components/SortSelect.tsx @@ -7,7 +7,7 @@ import Image from "next/image"; import { Button } from "./button"; import { Select, SelectContent, SelectItem } from "./select"; -const SortSelect = ({ +export const SortSelect = ({ options, onValueChange, ...selectProps @@ -44,5 +44,3 @@ const SortSelect = ({ ); }; - -export default SortSelect; diff --git a/src/common/ui/components/index.ts b/src/common/ui/components/index.ts new file mode 100644 index 00000000..7881feb2 --- /dev/null +++ b/src/common/ui/components/index.ts @@ -0,0 +1,20 @@ +export * from "./accordion"; +export * from "./avatar"; +export * from "./button"; +export * from "./checkbox"; +export * from "./dialog"; +export * from "./dropdown-menu"; +export * from "./Filter"; +export * from "./InfiniteScroll"; +export * from "./input"; +export * from "./label"; +export * from "./popover"; +export * from "./radio-group"; +export * from "./SearchBar"; +export * from "./select"; +export * from "./skeleton"; +export * from "./SortSelect"; +export * from "./switch"; +export * from "./text-field"; +export * from "./toggle"; +export * from "./toggle-group"; diff --git a/src/common/ui/components/radio-group.tsx b/src/common/ui/components/radio-group.tsx new file mode 100644 index 00000000..27fc92b0 --- /dev/null +++ b/src/common/ui/components/radio-group.tsx @@ -0,0 +1,47 @@ +"use client"; + +import { forwardRef } from "react"; + +import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; +import { Circle } from "lucide-react"; + +import { cn } from "@/common/ui/utils"; + +export const RadioGroup = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + ); +}); + +RadioGroup.displayName = RadioGroupPrimitive.Root.displayName; + +export const RadioGroupItem = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + + + + + ); +}); + +RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName; diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index 15e98c35..dfe0489d 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -3,7 +3,7 @@ import { useCallback } from "react"; import { create, useModal } from "@ebay/nice-modal-react"; import { AccountId, PotId } from "@/common/api/potlock"; -import { Dialog, DialogContent } from "@/common/ui/components/dialog"; +import { Dialog, DialogContent } from "@/common/ui/components"; import { DonationToAccount } from "./DonationToAccount"; import { DonationToPot } from "./DonationToPot"; diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index ba07951e..66779e54 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -1,10 +1,13 @@ import { ByAccountId, potlock } from "@/common/api/potlock"; import { + Button, DialogDescription, + DialogFooter, DialogHeader, DialogTitle, -} from "@/common/ui/components/dialog"; -import { + Label, + RadioGroup, + RadioGroupItem, Select, SelectContent, SelectGroup, @@ -12,8 +15,8 @@ import { SelectLabel, SelectTrigger, SelectValue, -} from "@/common/ui/components/select"; -import { TextField } from "@/common/ui/components/text-field"; + TextField, +} from "@/common/ui/components"; export type DonationToAccountProps = ByAccountId & {}; @@ -33,8 +36,31 @@ export const DonationToAccount: React.FC = ({ {`Donation to ${account.near_social_profile_data.name}`} - - + + + Donate to projects in [Pot Name] + + + +
+ How do you want to allocate funds? +
+
+
+ + + + +
+
+ + + + +
+
= ({ appendix="$ 0.00" />
+ + + + )} diff --git a/src/modules/donation/components/DonationToPot.tsx b/src/modules/donation/components/DonationToPot.tsx index 550d336a..dc49d654 100644 --- a/src/modules/donation/components/DonationToPot.tsx +++ b/src/modules/donation/components/DonationToPot.tsx @@ -3,7 +3,7 @@ import { DialogDescription, DialogHeader, DialogTitle, -} from "@/common/ui/components/dialog"; +} from "@/common/ui/components"; export const DonationToPot: React.FC = ({ potId }) => { const { isLoading, data: pot, error } = potlock.usePot({ potId }); diff --git a/src/modules/profile/components/ProfileBanner.tsx b/src/modules/profile/components/ProfileBanner.tsx index 13aff6f3..67b230e9 100644 --- a/src/modules/profile/components/ProfileBanner.tsx +++ b/src/modules/profile/components/ProfileBanner.tsx @@ -9,8 +9,8 @@ import { Avatar, AvatarFallback, AvatarImage, -} from "@/common/ui/components/avatar"; -import { Skeleton } from "@/common/ui/components/skeleton"; + Skeleton, +} from "@/common/ui/components"; import useIsHuman from "@/modules/core/hooks/useIsHuman"; import useRegistration from "@/modules/core/hooks/useRegistration"; import { fetchSocialImages } from "@/modules/core/services/socialImages"; diff --git a/src/modules/project/components/CardSkeleton.tsx b/src/modules/project/components/CardSkeleton.tsx index 39650736..7d8e2dfb 100644 --- a/src/modules/project/components/CardSkeleton.tsx +++ b/src/modules/project/components/CardSkeleton.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from "@/common/ui/components/skeleton"; +import { Skeleton } from "@/common/ui/components"; const CardSkeleton = () => { return ( diff --git a/src/modules/project/components/ProjectCard.tsx b/src/modules/project/components/ProjectCard.tsx index b273a9a8..ef9c601a 100644 --- a/src/modules/project/components/ProjectCard.tsx +++ b/src/modules/project/components/ProjectCard.tsx @@ -6,7 +6,7 @@ import Link from "next/link"; import { dispatch } from "@/app/_store"; import { PayoutDetailed } from "@/common/contracts/potlock/interfaces/pot.interfaces"; import { _address, yoctosToNear } from "@/common/lib"; -import { Button } from "@/common/ui/components/button"; +import { Button } from "@/common/ui/components"; import { useDonationModal } from "@/modules/donation"; import { useProfile } from "@/modules/profile/utils"; diff --git a/yarn.lock b/yarn.lock index b5977999..da2b8bb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3055,6 +3055,23 @@ "@babel/runtime" "^7.13.10" "@radix-ui/react-slot" "1.0.2" +"@radix-ui/react-radio-group@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@radix-ui/react-radio-group/-/react-radio-group-1.1.3.tgz#3197f5dcce143bcbf961471bf89320735c0212d3" + integrity sha512-x+yELayyefNeKeTx4fjK6j99Fs6c4qKm3aY38G3swQVTN6xMpsrbigC0uHs2L//g8q4qR7qOcww8430jJmi2ag== + dependencies: + "@babel/runtime" "^7.13.10" + "@radix-ui/primitive" "1.0.1" + "@radix-ui/react-compose-refs" "1.0.1" + "@radix-ui/react-context" "1.0.1" + "@radix-ui/react-direction" "1.0.1" + "@radix-ui/react-presence" "1.0.1" + "@radix-ui/react-primitive" "1.0.3" + "@radix-ui/react-roving-focus" "1.0.4" + "@radix-ui/react-use-controllable-state" "1.0.1" + "@radix-ui/react-use-previous" "1.0.1" + "@radix-ui/react-use-size" "1.0.1" + "@radix-ui/react-roving-focus@1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@radix-ui/react-roving-focus/-/react-roving-focus-1.0.4.tgz#e90c4a6a5f6ac09d3b8c1f5b5e81aab2f0db1974" From e453b16d2b8df3ba5262d1d6fde5bb7415d269ff Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 11 Jun 2024 09:08:44 +0400 Subject: [PATCH 13/84] wip: Update modals --- src/common/ui/components/dialog.tsx | 8 +- .../donation/components/DonationModal.tsx | 6 +- .../donation/components/DonationToAccount.tsx | 88 +++++++++++++------ .../donation/components/DonationToPot.tsx | 9 +- 4 files changed, 76 insertions(+), 35 deletions(-) diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx index 07d7656a..4012759f 100644 --- a/src/common/ui/components/dialog.tsx +++ b/src/common/ui/components/dialog.tsx @@ -48,7 +48,7 @@ const DialogContent = forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg sm:rounded-lg", - "translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg", + "translate-x-[-50%] translate-y-[-50%] gap-4 bg-background shadow-lg", "duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", @@ -63,13 +63,13 @@ const DialogContent = forwardRef< - + Close @@ -83,7 +83,7 @@ const DialogHeader = ({ }: React.HTMLAttributes) => (
{ {"accountId" in props && ( - + )} - {"potId" in props && } + {"potId" in props && ( + + )} ); diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index 66779e54..efaeca08 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -1,3 +1,5 @@ +import { useMemo, useState } from "react"; + import { ByAccountId, potlock } from "@/common/api/potlock"; import { Button, @@ -18,49 +20,46 @@ import { TextField, } from "@/common/ui/components"; -export type DonationToAccountProps = ByAccountId & {}; +export type DonationToAccountProps = ByAccountId & { + closeDialog: VoidFunction; +}; export const DonationToAccount: React.FC = ({ accountId, + closeDialog: _, }) => { const { isLoading, data: account, error } = potlock.useAccount({ accountId }); - return isLoading ? ( - "Loading..." - ) : ( - <> - {error && error.message} + const [currentScreenIndex, setCurrentScreenIndex] = useState< + "start" | "allocation" | "confirmation" | "done" + >("start"); - {account !== undefined && ( - <> - - {`Donation to ${account.near_social_profile_data.name}`} - - - - Donate to projects in [Pot Name] - - - + const currentScreen = useMemo(() => { + switch (currentScreenIndex) { + case "start": + return ( + <>
How do you want to allocate funds?
+
-
- + +
- -
-
- +
+ +
+ - -
+
+
+ = ({ step={0.01} appendix="$ 0.00" /> + + ); + case "allocation": + return <>; + case "confirmation": + return <>; + case "done": + return <>; + default: + return "Error: Unable to proceed with the next step"; + } + }, [currentScreenIndex]); + + return isLoading ? ( + "Loading..." + ) : ( + <> + {error && error.message} + + {account !== undefined && ( + <> + + + {`Donation to ${account.near_social_profile_data.name}`} + + + + + {currentScreen} - - - + + diff --git a/src/modules/donation/components/DonationToPot.tsx b/src/modules/donation/components/DonationToPot.tsx index dc49d654..2d791ff4 100644 --- a/src/modules/donation/components/DonationToPot.tsx +++ b/src/modules/donation/components/DonationToPot.tsx @@ -5,7 +5,14 @@ import { DialogTitle, } from "@/common/ui/components"; -export const DonationToPot: React.FC = ({ potId }) => { +export type DonationToPotProps = ByPotId & { + closeDialog: VoidFunction; +}; + +export const DonationToPot: React.FC = ({ + potId, + closeDialog: _, +}) => { const { isLoading, data: pot, error } = potlock.usePot({ potId }); return isLoading ? ( From acca0861e5d4cd513d82d25201e45608fa9f7a73 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Wed, 12 Jun 2024 19:27:08 +0400 Subject: [PATCH 14/84] api: Sync with backend schema --- .../potlock/generated/schemas/Account.json | 2 +- .../api/potlock/generated/schemas/Image.json | 1 + .../potlock/generated/schemas/Linktree.json | 1 + .../api/potlock/generated/schemas/NFT.json | 1 + .../schemas/NearSocialProfileData.json | 1 + .../api/potlock/generated/types/Account.ts | 24 +++++----- .../api/potlock/generated/types/Image.ts | 13 ++++++ .../api/potlock/generated/types/Linktree.ts | 18 ++++++++ .../generated/types/NearSocialProfileData.ts | 45 +++++++++++++++++++ src/common/api/potlock/generated/types/Nft.ts | 18 ++++++++ .../api/potlock/generated/types/index.ts | 4 ++ .../potlock/generated/zod/accountSchema.ts | 30 ++++++------- .../api/potlock/generated/zod/imageSchema.ts | 9 ++++ src/common/api/potlock/generated/zod/index.ts | 4 ++ .../potlock/generated/zod/linktreeSchema.ts | 8 ++++ .../zod/nearSocialProfileDataSchema.ts | 35 +++++++++++++++ .../api/potlock/generated/zod/nftSchema.ts | 8 ++++ 17 files changed, 191 insertions(+), 31 deletions(-) create mode 100644 src/common/api/potlock/generated/schemas/Image.json create mode 100644 src/common/api/potlock/generated/schemas/Linktree.json create mode 100644 src/common/api/potlock/generated/schemas/NFT.json create mode 100644 src/common/api/potlock/generated/schemas/NearSocialProfileData.json create mode 100644 src/common/api/potlock/generated/types/Image.ts create mode 100644 src/common/api/potlock/generated/types/Linktree.ts create mode 100644 src/common/api/potlock/generated/types/NearSocialProfileData.ts create mode 100644 src/common/api/potlock/generated/types/Nft.ts create mode 100644 src/common/api/potlock/generated/zod/imageSchema.ts create mode 100644 src/common/api/potlock/generated/zod/linktreeSchema.ts create mode 100644 src/common/api/potlock/generated/zod/nearSocialProfileDataSchema.ts create mode 100644 src/common/api/potlock/generated/zod/nftSchema.ts diff --git a/src/common/api/potlock/generated/schemas/Account.json b/src/common/api/potlock/generated/schemas/Account.json index f97e5de2..3d92a614 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},"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 +{"type":"object","properties":{"id":{"description":"On-chain account address.","type":"string","maxLength":64,"title":"Address"},"total_donations_in_usd":{"type":"number","format":"double","exclusiveMaximum":true,"exclusiveMinimum":true,"maximum":1000000000000000000,"minimum":-1000000000000000000},"total_donations_out_usd":{"type":"number","format":"double","exclusiveMaximum":true,"exclusiveMinimum":true,"maximum":1000000000000000000,"minimum":-1000000000000000000},"total_matching_pool_allocations_usd":{"type":"number","format":"double","exclusiveMaximum":true,"exclusiveMinimum":true,"maximum":1000000000000000000,"minimum":-1000000000000000000},"donors_count":{"type":"integer"},"near_social_profile_data":{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"ipfs_cid":{"type":"string"},"nft":{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"}},"x-readme-ref-name":"Image"},"backgroundImage":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"ipfs_cid":{"type":"string"},"nft":{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"}},"x-readme-ref-name":"Image"},"description":{"type":"string"},"linktree":{"type":"object","properties":{"github":{"type":"string"},"twitter":{"type":"string"},"website":{"type":"string"},"telegram":{"type":"string"}},"x-readme-ref-name":"Linktree"},"plPublicGoodReason":{"type":"string"},"plCategories":{"description":"JSON-stringified array of category strings","type":"string"},"plGithubRepos":{"description":"JSON-stringified array of URLs","type":"string"},"plSmartContracts":{"description":"JSON-stringified object with chain names as keys that map to nested objects of contract addresses","type":"string"},"plFundingSources":{"description":"JSON-stringified array of funding source objects","type":"string"},"plTeam":{"description":"JSON-stringified array of team member account ID strings","type":"string"}},"x-readme-ref-name":"NearSocialProfileData"}},"required":["donors_count","id","total_donations_in_usd","total_donations_out_usd","total_matching_pool_allocations_usd"],"x-readme-ref-name":"Account"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/Image.json b/src/common/api/potlock/generated/schemas/Image.json new file mode 100644 index 00000000..8191c366 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/Image.json @@ -0,0 +1 @@ +{"type":"object","properties":{"url":{"type":"string","format":"uri"},"ipfs_cid":{"type":"string"},"nft":{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"}},"x-readme-ref-name":"Image"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/Linktree.json b/src/common/api/potlock/generated/schemas/Linktree.json new file mode 100644 index 00000000..f8e2d2a9 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/Linktree.json @@ -0,0 +1 @@ +{"type":"object","properties":{"github":{"type":"string"},"twitter":{"type":"string"},"website":{"type":"string"},"telegram":{"type":"string"}},"x-readme-ref-name":"Linktree"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/NFT.json b/src/common/api/potlock/generated/schemas/NFT.json new file mode 100644 index 00000000..94dbff0c --- /dev/null +++ b/src/common/api/potlock/generated/schemas/NFT.json @@ -0,0 +1 @@ +{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/schemas/NearSocialProfileData.json b/src/common/api/potlock/generated/schemas/NearSocialProfileData.json new file mode 100644 index 00000000..aa20c865 --- /dev/null +++ b/src/common/api/potlock/generated/schemas/NearSocialProfileData.json @@ -0,0 +1 @@ +{"type":"object","properties":{"name":{"type":"string"},"image":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"ipfs_cid":{"type":"string"},"nft":{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"}},"x-readme-ref-name":"Image"},"backgroundImage":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"ipfs_cid":{"type":"string"},"nft":{"type":"object","properties":{"media":{"type":"string","format":"uri"},"baseUri":{"type":"string","format":"uri"},"tokenId":{"type":"string"},"contractId":{"type":"string"}},"x-readme-ref-name":"NFT"}},"x-readme-ref-name":"Image"},"description":{"type":"string"},"linktree":{"type":"object","properties":{"github":{"type":"string"},"twitter":{"type":"string"},"website":{"type":"string"},"telegram":{"type":"string"}},"x-readme-ref-name":"Linktree"},"plPublicGoodReason":{"type":"string"},"plCategories":{"description":"JSON-stringified array of category strings","type":"string"},"plGithubRepos":{"description":"JSON-stringified array of URLs","type":"string"},"plSmartContracts":{"description":"JSON-stringified object with chain names as keys that map to nested objects of contract addresses","type":"string"},"plFundingSources":{"description":"JSON-stringified array of funding source objects","type":"string"},"plTeam":{"description":"JSON-stringified array of team member account ID strings","type":"string"}},"x-readme-ref-name":"NearSocialProfileData"} \ No newline at end of file diff --git a/src/common/api/potlock/generated/types/Account.ts b/src/common/api/potlock/generated/types/Account.ts index 4b570e28..71a0acb4 100644 --- a/src/common/api/potlock/generated/types/Account.ts +++ b/src/common/api/potlock/generated/types/Account.ts @@ -1,3 +1,5 @@ +import { NearSocialProfileData } from "./NearSocialProfileData"; + export type Account = { /** * @description On-chain account address. @@ -5,24 +7,20 @@ export type Account = { */ id: string; /** - * @description Total donations received in USD. - * @type string | undefined, decimal + * @type number, double */ - total_donations_in_usd?: string; + total_donations_in_usd: number; /** - * @description Total donated in USD. - * @type string | undefined, decimal + * @type number, double */ - total_donations_out_usd?: string; + total_donations_out_usd: number; /** - * @description Total matching pool allocations in USD. - * @type string | undefined, decimal + * @type number, double */ - total_matching_pool_allocations_usd?: string; + total_matching_pool_allocations_usd: number; /** - * @description Number of donors. - * @type integer | undefined + * @type integer */ - donors_count?: number; - near_social_profile_data?: any; + donors_count: number; + near_social_profile_data?: NearSocialProfileData; }; diff --git a/src/common/api/potlock/generated/types/Image.ts b/src/common/api/potlock/generated/types/Image.ts new file mode 100644 index 00000000..c717b929 --- /dev/null +++ b/src/common/api/potlock/generated/types/Image.ts @@ -0,0 +1,13 @@ +import { Nft } from "./Nft"; + +export type Image = { + /** + * @type string | undefined, uri + */ + url?: string; + /** + * @type string | undefined + */ + ipfs_cid?: string; + nft?: Nft; +}; diff --git a/src/common/api/potlock/generated/types/Linktree.ts b/src/common/api/potlock/generated/types/Linktree.ts new file mode 100644 index 00000000..e26c8afe --- /dev/null +++ b/src/common/api/potlock/generated/types/Linktree.ts @@ -0,0 +1,18 @@ +export type Linktree = { + /** + * @type string | undefined + */ + github?: string; + /** + * @type string | undefined + */ + twitter?: string; + /** + * @type string | undefined + */ + website?: string; + /** + * @type string | undefined + */ + telegram?: string; +}; diff --git a/src/common/api/potlock/generated/types/NearSocialProfileData.ts b/src/common/api/potlock/generated/types/NearSocialProfileData.ts new file mode 100644 index 00000000..cd7dc6db --- /dev/null +++ b/src/common/api/potlock/generated/types/NearSocialProfileData.ts @@ -0,0 +1,45 @@ +import { Image } from "./Image"; +import { Linktree } from "./Linktree"; + +export type NearSocialProfileData = { + /** + * @type string | undefined + */ + name?: string; + image?: Image; + backgroundImage?: Image; + /** + * @type string | undefined + */ + description?: string; + linktree?: Linktree; + /** + * @type string | undefined + */ + plPublicGoodReason?: string; + /** + * @description JSON-stringified array of category strings + * @type string | undefined + */ + plCategories?: string; + /** + * @description JSON-stringified array of URLs + * @type string | undefined + */ + plGithubRepos?: string; + /** + * @description JSON-stringified object with chain names as keys that map to nested objects of contract addresses + * @type string | undefined + */ + plSmartContracts?: string; + /** + * @description JSON-stringified array of funding source objects + * @type string | undefined + */ + plFundingSources?: string; + /** + * @description JSON-stringified array of team member account ID strings + * @type string | undefined + */ + plTeam?: string; +}; diff --git a/src/common/api/potlock/generated/types/Nft.ts b/src/common/api/potlock/generated/types/Nft.ts new file mode 100644 index 00000000..947bcf50 --- /dev/null +++ b/src/common/api/potlock/generated/types/Nft.ts @@ -0,0 +1,18 @@ +export type Nft = { + /** + * @type string | undefined, uri + */ + media?: string; + /** + * @type string | undefined, uri + */ + baseUri?: string; + /** + * @type string | undefined + */ + tokenId?: string; + /** + * @type string | undefined + */ + contractId?: string; +}; diff --git a/src/common/api/potlock/generated/types/index.ts b/src/common/api/potlock/generated/types/index.ts index 0ce166f9..cc09fe68 100644 --- a/src/common/api/potlock/generated/types/index.ts +++ b/src/common/api/potlock/generated/types/index.ts @@ -1,8 +1,12 @@ export * from "./Account"; export * from "./DefaultRegistrationStatusEnum"; export * from "./Donation"; +export * from "./Image"; +export * from "./Linktree"; export * from "./List"; export * from "./ListRegistration"; +export * from "./NearSocialProfileData"; +export * from "./Nft"; export * from "./Pot"; export * from "./PotApplication"; export * from "./PotApplicationStatusEnum"; diff --git a/src/common/api/potlock/generated/zod/accountSchema.ts b/src/common/api/potlock/generated/zod/accountSchema.ts index cd632532..422c08b4 100644 --- a/src/common/api/potlock/generated/zod/accountSchema.ts +++ b/src/common/api/potlock/generated/zod/accountSchema.ts @@ -1,27 +1,23 @@ import { z } from "zod"; +import { nearSocialProfileDataSchema } from "./nearSocialProfileDataSchema"; + 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(), + .number() + .min(-1000000000000000000) + .max(1000000000000000000), total_donations_out_usd: z - .string() - .regex(new RegExp("^-?\\d{0,18}(?:\\.\\d{0,2})?$")) - .describe("Total donated in USD.") - .optional(), + .number() + .min(-1000000000000000000) + .max(1000000000000000000), 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.") + .min(-1000000000000000000) + .max(1000000000000000000), + donors_count: z.number(), + near_social_profile_data: z + .lazy(() => nearSocialProfileDataSchema) .optional(), - near_social_profile_data: z.any().nullish(), }); diff --git a/src/common/api/potlock/generated/zod/imageSchema.ts b/src/common/api/potlock/generated/zod/imageSchema.ts new file mode 100644 index 00000000..299d0ea9 --- /dev/null +++ b/src/common/api/potlock/generated/zod/imageSchema.ts @@ -0,0 +1,9 @@ +import { z } from "zod"; + +import { nftSchema } from "./nftSchema"; + +export const imageSchema = z.object({ + url: z.string().url().optional(), + ipfs_cid: z.string().optional(), + nft: z.lazy(() => nftSchema).optional(), +}); diff --git a/src/common/api/potlock/generated/zod/index.ts b/src/common/api/potlock/generated/zod/index.ts index 43c1cf05..551a1cae 100644 --- a/src/common/api/potlock/generated/zod/index.ts +++ b/src/common/api/potlock/generated/zod/index.ts @@ -1,8 +1,12 @@ export * from "./accountSchema"; export * from "./defaultRegistrationStatusEnumSchema"; export * from "./donationSchema"; +export * from "./imageSchema"; +export * from "./linktreeSchema"; export * from "./listRegistrationSchema"; export * from "./listSchema"; +export * from "./nearSocialProfileDataSchema"; +export * from "./nftSchema"; export * from "./potApplicationSchema"; export * from "./potApplicationStatusEnumSchema"; export * from "./potPayoutSchema"; diff --git a/src/common/api/potlock/generated/zod/linktreeSchema.ts b/src/common/api/potlock/generated/zod/linktreeSchema.ts new file mode 100644 index 00000000..3448839a --- /dev/null +++ b/src/common/api/potlock/generated/zod/linktreeSchema.ts @@ -0,0 +1,8 @@ +import { z } from "zod"; + +export const linktreeSchema = z.object({ + github: z.string().optional(), + twitter: z.string().optional(), + website: z.string().optional(), + telegram: z.string().optional(), +}); diff --git a/src/common/api/potlock/generated/zod/nearSocialProfileDataSchema.ts b/src/common/api/potlock/generated/zod/nearSocialProfileDataSchema.ts new file mode 100644 index 00000000..58782677 --- /dev/null +++ b/src/common/api/potlock/generated/zod/nearSocialProfileDataSchema.ts @@ -0,0 +1,35 @@ +import { z } from "zod"; + +import { imageSchema } from "./imageSchema"; +import { linktreeSchema } from "./linktreeSchema"; + +export const nearSocialProfileDataSchema = z.object({ + name: z.string().optional(), + image: z.lazy(() => imageSchema).optional(), + backgroundImage: z.lazy(() => imageSchema).optional(), + description: z.string().optional(), + linktree: z.lazy(() => linktreeSchema).optional(), + plPublicGoodReason: z.string().optional(), + plCategories: z + .string() + .describe("JSON-stringified array of category strings") + .optional(), + plGithubRepos: z + .string() + .describe("JSON-stringified array of URLs") + .optional(), + plSmartContracts: z + .string() + .describe( + "JSON-stringified object with chain names as keys that map to nested objects of contract addresses", + ) + .optional(), + plFundingSources: z + .string() + .describe("JSON-stringified array of funding source objects") + .optional(), + plTeam: z + .string() + .describe("JSON-stringified array of team member account ID strings") + .optional(), +}); diff --git a/src/common/api/potlock/generated/zod/nftSchema.ts b/src/common/api/potlock/generated/zod/nftSchema.ts new file mode 100644 index 00000000..e6b6189e --- /dev/null +++ b/src/common/api/potlock/generated/zod/nftSchema.ts @@ -0,0 +1,8 @@ +import { z } from "zod"; + +export const nftSchema = z.object({ + media: z.string().url().optional(), + baseUri: z.string().url().optional(), + tokenId: z.string().optional(), + contractId: z.string().optional(), +}); From db306e964203b1aa612faf0a5c853714ec26e7f0 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Wed, 12 Jun 2024 22:14:42 +0400 Subject: [PATCH 15/84] Adjust TextField styles --- src/common/ui/components/text-field.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ui/components/text-field.tsx b/src/common/ui/components/text-field.tsx index 03cc159a..06d3beb8 100644 --- a/src/common/ui/components/text-field.tsx +++ b/src/common/ui/components/text-field.tsx @@ -47,7 +47,7 @@ export const TextField = forwardRef( return (
- + {label} From 3673b3674e177f1774871008163d2ed77d5b2ac8 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Thu, 13 Jun 2024 00:13:10 +0400 Subject: [PATCH 16/84] Update styles --- .vscode/extensions.json | 3 +- src/common/ui/components/button.tsx | 68 ++++++++++++++++++-------- src/common/ui/components/dialog.tsx | 76 +++++++++++++++++++++++++++-- 3 files changed, 124 insertions(+), 23 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 09402639..eceb9a91 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "antfu.unocss", "aaron-bond.better-comments", "streetsidesoftware.code-spell-checker", - "gruntfuggly.todo-tree" + "gruntfuggly.todo-tree", + "naumovs.color-highlight" ] } \ No newline at end of file diff --git a/src/common/ui/components/button.tsx b/src/common/ui/components/button.tsx index bfd3c14f..fda45b76 100644 --- a/src/common/ui/components/button.tsx +++ b/src/common/ui/components/button.tsx @@ -5,43 +5,72 @@ import { type VariantProps, cva } from "class-variance-authority"; import { cn } from "../utils"; -// TODO: add hover effects correctly & disabled styling +// TODO: add correct hover effects const buttonVariants = cva( - "flex text-sm leading-[157%] items-center justify-center text-[#292929] gap-2 font-medium no-underline cursor-pointer transition-all duration-200 ease-in-out w-fit rounded-md border-none focus:shadow-button-focus", + cn( + "flex text-sm leading-[157%] items-center justify-center text-[#292929] gap-2 font-medium", + "no-underline cursor-pointer transition-all duration-200 ease-in-out w-fit rounded-md", + "border-none focus:shadow-button-focus", + ), + { variants: { variant: { // Brand - "brand-filled": - "bg-[var(--primary-600)] translate-y-[-1.5px] text-white shadow-button-primary hover:translate-y-0 hover:shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_rgba(246,118,122,0.5)_inset,0px_0px_0px_2px_rgba(246,118,122,0.5)_inset]", - "brand-tonal": - "translate-y-[-1.5px] bg-[var(--peach-50)] shadow-button-tonal hover:shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_#fff_inset,0px_0px_0px_2px_rgba(255,255,255,0.8)_inset] hover:translate-y-0", - "brand-plain": + "brand-filled": cn( + "bg-[var(--primary-600)] translate-y-[-1.5px] text-white shadow-button-primary hover:translate-y-0", + "hover:shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_rgba(246,118,122,0.5)_inset,0px_0px_0px_2px_rgba(246,118,122,0.5)_inset]", + "disabled:text-[#a6a6a6] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] disabled:bg-[var(--neutral-100)]", + ), + + "brand-tonal": cn( + "translate-y-[-1.5px] bg-[var(--peach-50)] shadow-button-tonal hover:translate-y-0", + "hover:shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_#fff_inset,0px_0px_0px_2px_rgba(255,255,255,0.8)_inset]", + "disabled:text-[#a6a6a6] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] disabled:bg-[var(--neutral-100)]", + ), + + "brand-plain": cn( "text-[color:var(--primary-600)] p-0 hover:text-[color:var(--Primary-400)]", - "brand-outline": - "bg-[rgba(255,255,255,0.01)] text-[color:var(--primary-600)] shadow-[0px_0px_0px_1px_rgba(243,78,95,0.78)_inset,0px_-1px_0px_0px_rgba(73,8,19,0.5)_inset,0px_1px_2px_-0.5px_rgba(73,8,19,0.2)] hover:bg-[#fef3f2]", + "disabled:text-[#a6a6a6] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] disabled:bg-[var(--neutral-100)]", + ), + + "brand-outline": cn( + "bg-[rgba(255,255,255,0.01)] text-[color:var(--primary-600)] hover:bg-[#fef3f2]", + "shadow-[0px_0px_0px_1px_rgba(243,78,95,0.78)_inset,0px_-1px_0px_0px_rgba(73,8,19,0.5)_inset,0px_1px_2px_-0.5px_rgba(73,8,19,0.2)]", + "disabled:text-[#c7c7c7] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset]", + ), + // Standard - "standard-filled": - "text-[white] bg-[var(--neutral-800)] shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_rgba(166,166,166,0.4)_inset,0px_0px_0px_2px_rgba(166,166,166,0.4)_inset,0px_1px_2px_0px_rgba(15,15,15,0.15),0px_1px_3px_-1px_rgba(5,5,5,0.08)]", - "standard-outline": - "bg-white bg shadow-[0px_0px_0px_1px_rgba(0,0,0,0.22)_inset,0px_-1px_0px_0px_rgba(15,15,15,0.15)_inset,0px_1px_2px_-0.5px_rgba(5,5,5,0.08)] hover:bg-[var(--neutral-50)", - "standard-plain": "p-0 hover:text-[color:var(--neutral-500)]", - // Disabled - "filled-disabled": - "text-[#a6a6a6] shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] bg-[var(--neutral-100)]", - "plain-disabled": - "bg-white text-[#c7c7c7] shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset]", + "standard-filled": cn( + "text-[white] bg-[var(--neutral-800)]", + "shadow-[0px_0px_0px_1px_rgba(0,0,0,0.84)_inset,0px_1px_1px_1px_rgba(166,166,166,0.4)_inset,0px_0px_0px_2px_rgba(166,166,166,0.4)_inset,0px_1px_2px_0px_rgba(15,15,15,0.15),0px_1px_3px_-1px_rgba(5,5,5,0.08)]", + "disabled:text-[#a6a6a6] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] disabled:bg-[var(--neutral-100)]", + ), + + "standard-outline": cn( + "bg-white hover:bg-[var(--neutral-50)", + "shadow-[0px_0px_0px_1px_rgba(0,0,0,0.22)_inset,0px_-1px_0px_0px_rgba(15,15,15,0.15)_inset,0px_1px_2px_-0.5px_rgba(5,5,5,0.08)]", + "disabled:text-[#c7c7c7] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset]", + ), + + "standard-plain": cn( + "p-0 hover:text-[color:var(--neutral-500)]", + "disabled:text-[#a6a6a6] disabled:shadow-[0px_0px_0px_1px_rgba(15,15,15,0.15)_inset] disabled:bg-[var(--neutral-100)]", + ), }, + size: { default: "px-4 py-[9px]", icon: "h-10 w-10", }, + font: { default: "font-medium", bold: "font-bold", semibold: "font-semibold", }, }, + defaultVariants: { font: "default", variant: "brand-filled", @@ -68,6 +97,7 @@ const Button = React.forwardRef( ); }, ); + Button.displayName = "Button"; export { Button, buttonVariants }; diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx index 4012759f..2dcacc47 100644 --- a/src/common/ui/components/dialog.tsx +++ b/src/common/ui/components/dialog.tsx @@ -22,7 +22,7 @@ const DialogOverlay = forwardRef< = (props) => ( + + + + + + + + + + + +); + const DialogHeader = ({ className, + children, ...props }: React.HTMLAttributes) => (
+ > +
+ + +
+ + {children} +
); DialogHeader.displayName = "DialogHeader"; @@ -112,7 +182,7 @@ const DialogTitle = forwardRef< Date: Thu, 13 Jun 2024 00:13:35 +0400 Subject: [PATCH 17/84] wip: Update styles --- .../donation/components/DonationToAccount.tsx | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/modules/donation/components/DonationToAccount.tsx b/src/modules/donation/components/DonationToAccount.tsx index efaeca08..485251f7 100644 --- a/src/modules/donation/components/DonationToAccount.tsx +++ b/src/modules/donation/components/DonationToAccount.tsx @@ -39,7 +39,7 @@ export const DonationToAccount: React.FC = ({ case "start": return ( <> -
+
How do you want to allocate funds?
@@ -63,9 +63,19 @@ export const DonationToAccount: React.FC = ({ - 200 NEAR available - +
+ + 200 NEAR + + + + available + +
} fieldExtension={ + + + + + + + + + Available tokens + NEAR + + + + } + type="number" + placeholder="0.00" + min={tokenId === NEAR_TOKEN_DENOM ? DONATION_MIN_NEAR_AMOUNT : 0.0} + step={0.01} + appendix="$ 0.00" + /> + + ); +}; diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index 1f57b4e1..970d3401 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -33,7 +33,7 @@ export const DonationModal = create((props: DonationModalProps) => { = ({ error: accountError, } = potlock.useAccount({ accountId }); - const { data: activePots } = potlock.useAccountActivePots({ accountId }); - const hasMatchingPots = (activePots?.length ?? 0) > 0; - - const { availableBalance, form, onSubmit, values } = useDonationForm({}); - - console.table(availableBalance); + const { form, onSubmit } = useDonationForm({}); const content = useMemo(() => { switch (currentStep) { case "allocation": - return ( - <> -
-
- How do you want to allocate funds? -
- - - - - - -
- - - - {"200 NEAR"} - - - - available - -
- } - fieldExtension={ - - } - type="number" - placeholder="0.00" - min={ - values.tokenId === NEAR_TOKEN_DENOM - ? DONATION_MIN_NEAR_AMOUNT - : 0.0 - } - step={0.01} - appendix="$ 0.00" - /> - - ); + return ; case "confirmation": return <>; - case "done": + case "success": return <>; default: return "Error: Unable to proceed with the next step"; } - }, [currentStep, hasMatchingPots, values.tokenId]); + }, [currentStep, form]); return isAccountLoading ? ( = ({ Loading... ) : ( - <> - {accountError && accountError.message} - - {account !== undefined && ( - <> - {currentStep !== "done" && ( - - - {currentStep === "confirmation" - ? "Confirm donation" - : `Donation to ${account.near_social_profile_data?.name}`} - - - )} - -
- - {content} -
- +
+ + {accountError && accountError.message} - - - - - - - )} - + {account !== undefined && ( + <> + {currentStep !== "success" && ( + + + {currentStep === "confirmation" + ? "Confirm donation" + : `Donation to ${account.near_social_profile_data?.name}`} + + + )} + + {content} + + + + + + + + )} +
+ ); }; diff --git a/src/modules/donation/hooks/forms.ts b/src/modules/donation/hooks/forms.ts index 1ebab9a9..c3ccd1ce 100644 --- a/src/modules/donation/hooks/forms.ts +++ b/src/modules/donation/hooks/forms.ts @@ -1,63 +1,43 @@ -import { useCallback, useMemo } from "react"; +import { useCallback } from "react"; import { zodResolver } from "@hookform/resolvers/zod"; import { SubmitHandler, useForm } from "react-hook-form"; import { dispatch } from "@/app/_store"; -import { pagoda } from "@/common/api/pagoda"; -import { NEAR_TOKEN_DENOM } from "@/common/constants"; +import { ByAccountId, ByPotId } from "@/common/api/potlock"; import { walletApi } from "@/common/contracts"; import useIsHuman from "@/modules/core/hooks/useIsHuman"; -import { DonationInputs, donationSchema } from "../models"; +import { + DonationAllocationType, + DonationInputs, + donationSchema, +} from "../models"; -export type DonationFormParameters = {}; - -export const useDonationForm = (_: DonationFormParameters) => { - const { data: { balance: availableNearBalance = null } = {} } = - pagoda.useNearAccountBalance({ - accountId: walletApi.accountId ?? "unknown", - }); - - const { data: { balances: availableFtBalances = null } = {} } = - pagoda.useFtAccountBalances({ - accountId: walletApi.accountId ?? "unknown", - }); +export type DonationFormParameters = + | (ByAccountId & { allocation: DonationAllocationType.direct }) + | (ByPotId & { allocation: DonationAllocationType.pot }); +export const useDonationForm = (params: DonationFormParameters) => { const form = useForm({ resolver: zodResolver(donationSchema), }); - const values = form.watch(); - const isFtDonation = values.tokenId !== NEAR_TOKEN_DENOM; + const tokenId = form.watch("tokenId"); const isSenderHumanVerified = useIsHuman(walletApi.accountId ?? "unknown"); - console.log(values.tokenId); - - const availableBalance = useMemo( - () => - (isFtDonation - ? availableFtBalances?.find( - (ftBalance) => ftBalance.contract_account_id === values.tokenId, - ) - : availableNearBalance) ?? null, - - [availableFtBalances, availableNearBalance, isFtDonation, values.tokenId], - ); + console.log(tokenId); const onSubmit: SubmitHandler = useCallback( - (data) => dispatch.donation.submit(data), - [], + (values) => dispatch.donation.submit({ ...values, ...params }), + [params], ); console.table(form.getValues()); return { - availableBalance, - isFtDonation, isSenderHumanVerified, form, onSubmit: form.handleSubmit(onSubmit), - values, }; }; diff --git a/src/modules/donation/models.ts b/src/modules/donation/models.ts index b691e304..0a8bcf18 100644 --- a/src/modules/donation/models.ts +++ b/src/modules/donation/models.ts @@ -20,41 +20,44 @@ import { DONATION_MIN_NEAR_AMOUNT, } from "./constants"; -export type DonationParameters = ByAccountId | ByPotId; - -export enum DonationType { +export enum DonationAllocationType { direct = "direct", pot = "pot", } -export type DonationOption = { +export type DonationParameters = + | (ByAccountId & { allocation: DonationAllocationType.direct }) + | (ByPotId & { allocation: DonationAllocationType.pot }); + +export type DonationAllocationOption = { title: string; - value: DonationType; + value: DonationAllocationType; hint?: string; hintIfDisabled?: string; }; -export const donationOptions: Record = { - [DonationType.direct]: { +export const donationAllocationOptions: Record< + DonationAllocationType, + DonationAllocationOption +> = { + [DonationAllocationType.direct]: { title: "Direct donation", - value: DonationType.direct, + value: DonationAllocationType.direct, }, - [DonationType.pot]: { + [DonationAllocationType.pot]: { title: "Quadratically matched donation", hintIfDisabled: "(no pots available)", - value: DonationType.pot, + value: DonationAllocationType.pot, }, }; -export type DonationStep = "allocation" | "confirmation" | "done"; +export type DonationStep = "allocation" | "confirmation" | "success"; export const donationSchema = object({ - recipientAccountId: string(), - - donationType: nativeEnum(DonationType, { + donationType: nativeEnum(DonationAllocationType, { message: "Incorrect donation type", - }).default(DonationType.direct), + }).default(DonationAllocationType.direct), tokenId: literal(NEAR_TOKEN_DENOM) .or(string().min(6)) @@ -119,7 +122,7 @@ export const donationModel = createModel()({ return handleStep(state, "confirmation"); case "confirmation": - return handleStep(state, "done"); + return handleStep(state, "success"); } }, @@ -143,7 +146,7 @@ export const donationModel = createModel()({ effects: (dispatch) => ({ submit({ amount, donationType, recipientAccountId }: DonationInputs) { switch (donationType) { - case DonationType.direct: + case DonationAllocationType.direct: return donateNearDirectly( { recipient_id: recipientAccountId }, amount, diff --git a/src/modules/project/components/ProjectCard.tsx b/src/modules/project/components/ProjectCard.tsx index 51e6ed56..bbc5ed71 100644 --- a/src/modules/project/components/ProjectCard.tsx +++ b/src/modules/project/components/ProjectCard.tsx @@ -26,7 +26,10 @@ export const ProjectCard = ({ payoutDetails?: PayoutDetailed; }) => { const allowDonate = _allowDonate === undefined ? true : _allowDonate; - const { openDonationModal } = useDonation({ accountId: projectId }); + const { openDonationModal } = useDonation({ + allocation: "direct", + accountId: projectId, + }); const { socialData, socialImages, tags, totalAmountNear } = useProfile(projectId); From ef5eddbf484d27e9e100e369ef3cbc53723fd104 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 06:43:28 +0400 Subject: [PATCH 37/84] wip --- src/modules/donation/components/DonationToProject.tsx | 5 ++++- src/modules/donation/models.ts | 4 +--- src/modules/project/components/ProjectCard.tsx | 5 +---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/modules/donation/components/DonationToProject.tsx b/src/modules/donation/components/DonationToProject.tsx index a57333df..c79a11e9 100644 --- a/src/modules/donation/components/DonationToProject.tsx +++ b/src/modules/donation/components/DonationToProject.tsx @@ -31,7 +31,10 @@ export const DonationToProject: React.FC = ({ error: accountError, } = potlock.useAccount({ accountId }); - const { form, onSubmit } = useDonationForm({}); + const { form, onSubmit } = useDonationForm({ + allocation: "direct", + accountId, + }); const content = useMemo(() => { switch (currentStep) { diff --git a/src/modules/donation/models.ts b/src/modules/donation/models.ts index 0a8bcf18..1c08b335 100644 --- a/src/modules/donation/models.ts +++ b/src/modules/donation/models.ts @@ -25,9 +25,7 @@ export enum DonationAllocationType { pot = "pot", } -export type DonationParameters = - | (ByAccountId & { allocation: DonationAllocationType.direct }) - | (ByPotId & { allocation: DonationAllocationType.pot }); +export type DonationParameters = ByAccountId | ByPotId; export type DonationAllocationOption = { title: string; diff --git a/src/modules/project/components/ProjectCard.tsx b/src/modules/project/components/ProjectCard.tsx index bbc5ed71..51e6ed56 100644 --- a/src/modules/project/components/ProjectCard.tsx +++ b/src/modules/project/components/ProjectCard.tsx @@ -26,10 +26,7 @@ export const ProjectCard = ({ payoutDetails?: PayoutDetailed; }) => { const allowDonate = _allowDonate === undefined ? true : _allowDonate; - const { openDonationModal } = useDonation({ - allocation: "direct", - accountId: projectId, - }); + const { openDonationModal } = useDonation({ accountId: projectId }); const { socialData, socialImages, tags, totalAmountNear } = useProfile(projectId); From 6d11a71927cc58566cbe3b1f96a647ac0be75869 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 09:49:35 +0400 Subject: [PATCH 38/84] wip: Restructure donation flow --- .../components/DonationAllocation.tsx | 119 ------------- .../donation/components/DonationFlow.tsx | 71 ++++++++ .../donation/components/DonationModal.tsx | 15 +- .../components/DonationPotAllocation.tsx | 154 +++++++++++++++++ .../components/DonationProjectAllocation.tsx | 158 ++++++++++++++++++ .../donation/components/DonationToPot.tsx | 38 ----- .../donation/components/DonationToProject.tsx | 109 ------------ src/modules/donation/hooks/forms.ts | 9 +- src/modules/donation/models.ts | 78 ++++++--- 9 files changed, 444 insertions(+), 307 deletions(-) delete mode 100644 src/modules/donation/components/DonationAllocation.tsx create mode 100644 src/modules/donation/components/DonationFlow.tsx create mode 100644 src/modules/donation/components/DonationPotAllocation.tsx create mode 100644 src/modules/donation/components/DonationProjectAllocation.tsx delete mode 100644 src/modules/donation/components/DonationToPot.tsx delete mode 100644 src/modules/donation/components/DonationToProject.tsx diff --git a/src/modules/donation/components/DonationAllocation.tsx b/src/modules/donation/components/DonationAllocation.tsx deleted file mode 100644 index 89b08f46..00000000 --- a/src/modules/donation/components/DonationAllocation.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import { useMemo } from "react"; - -import { UseFormReturn } from "react-hook-form"; - -import { pagoda } from "@/common/api/pagoda"; -import { potlock } from "@/common/api/potlock"; -import { NEAR_TOKEN_DENOM } from "@/common/constants"; -import { walletApi } from "@/common/contracts"; -import { - RadioGroup, - RadioGroupItem, - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectLabel, - SelectTrigger, - SelectValue, - TextField, -} from "@/common/ui/components"; - -import { DONATION_MIN_NEAR_AMOUNT } from "../constants"; -import { DonationInputs } from "../models"; - -export type DonationAllocationProps = { form: UseFormReturn }; - -export const DonationAllocation: React.FC = ({ - form, -}) => { - const tokenId = form.watch("tokenId"); - const accountId = form.watch("recipientAccountId"); - const { data: activePots } = potlock.useAccountActivePots({ accountId }); - const hasMatchingPots = (activePots?.length ?? 0) > 0; - const isFtDonation = tokenId !== NEAR_TOKEN_DENOM; - - const { data: { balance: availableNearBalance = null } = {} } = - pagoda.useNearAccountBalance({ - accountId: walletApi.accountId ?? "unknown", - }); - - const { data: { balances: availableFtBalances = null } = {} } = - pagoda.useFtAccountBalances({ - accountId: walletApi.accountId ?? "unknown", - }); - - const availableBalance = useMemo( - () => - (isFtDonation - ? availableFtBalances?.find( - (ftBalance) => ftBalance.contract_account_id === tokenId, - ) - : availableNearBalance) ?? null, - - [availableFtBalances, availableNearBalance, isFtDonation, tokenId], - ); - - console.table(availableBalance); - - return ( - <> -
-
- How do you want to allocate funds? -
- - - - - - -
- - - - {"200 NEAR"} - - - - available - -
- } - fieldExtension={ - - } - type="number" - placeholder="0.00" - min={tokenId === NEAR_TOKEN_DENOM ? DONATION_MIN_NEAR_AMOUNT : 0.0} - step={0.01} - appendix="$ 0.00" - /> - - ); -}; diff --git a/src/modules/donation/components/DonationFlow.tsx b/src/modules/donation/components/DonationFlow.tsx new file mode 100644 index 00000000..b2d84eb9 --- /dev/null +++ b/src/modules/donation/components/DonationFlow.tsx @@ -0,0 +1,71 @@ +import { useMemo } from "react"; + +import { dispatch } from "@/app/_store"; +import { Button, DialogFooter, Form } from "@/common/ui/components"; + +import { DonationPotAllocation } from "./DonationPotAllocation"; +import { DonationProjectAllocation } from "./DonationProjectAllocation"; +import { useDonationForm } from "../hooks/forms"; +import { DonationState, DonationSubmissionInputs } from "../models"; + +export type DonationFlowProps = DonationSubmissionInputs & + DonationState & { + closeDialog: VoidFunction; + }; + +export const DonationFlow: React.FC = ({ + closeDialog: _, + currentStep, + ...props +}) => { + const { form, onSubmit } = useDonationForm(props); + + const content = useMemo(() => { + switch (currentStep) { + case "allocation": + return "accountId" in props ? ( + + ) : ( + + ); + + case "confirmation": + return <>; + + case "success": + return <>; + + default: + return "Error: Unable to proceed with the next step"; + } + }, [currentStep, form, props]); + + return ( +
+ + {content} + + + + + + +
+ + ); +}; diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index 970d3401..a1a92531 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -12,8 +12,7 @@ import { DialogHeader, } from "@/common/ui/components"; -import { DonationToPot } from "./DonationToPot"; -import { DonationToProject } from "./DonationToProject"; +import { DonationFlow } from "./DonationFlow"; import { DonationParameters } from "../models"; export type DonationModalProps = DonationParameters & {}; @@ -39,15 +38,7 @@ export const DonationModal = create((props: DonationModalProps) => { } onCloseClick={close} > - {"accountId" in props && ( - - )} - - {"potId" in props && ( - - )} - - {!("accountId" in props) && !("potId" in props) && ( + {!("accountId" in props) && !("potId" in props) ? ( Runtime error! @@ -57,6 +48,8 @@ export const DonationModal = create((props: DonationModalProps) => { + ) : ( + )} diff --git a/src/modules/donation/components/DonationPotAllocation.tsx b/src/modules/donation/components/DonationPotAllocation.tsx new file mode 100644 index 00000000..4d55c2f2 --- /dev/null +++ b/src/modules/donation/components/DonationPotAllocation.tsx @@ -0,0 +1,154 @@ +import { useMemo } from "react"; + +import { UseFormReturn } from "react-hook-form"; + +import { pagoda } from "@/common/api/pagoda"; +import { ByAccountId, ByPotId, potlock } from "@/common/api/potlock"; +import { NEAR_TOKEN_DENOM } from "@/common/constants"; +import { walletApi } from "@/common/contracts"; +import { + DialogDescription, + DialogHeader, + DialogTitle, + RadioGroup, + RadioGroupItem, + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectTrigger, + SelectValue, + TextField, +} from "@/common/ui/components"; + +import { DONATION_MIN_NEAR_AMOUNT } from "../constants"; +import { DonationInputs } from "../models"; + +export type DonationPotAllocationProps = ByPotId & { + form: UseFormReturn; +}; + +export const DonationPotAllocation: React.FC = ({ + potId, + form, +}) => { + const tokenId = form.watch("tokenId"); + const isFtDonation = tokenId !== NEAR_TOKEN_DENOM; + + const { + isLoading: isPotLoading, + data: pot, + error: potError, + } = potlock.usePot({ potId }); + + const { data: { balance: availableNearBalance = null } = {} } = + pagoda.useNearAccountBalance({ + accountId: walletApi.accountId ?? "unknown", + }); + + const { data: { balances: availableFtBalances = null } = {} } = + pagoda.useFtAccountBalances({ + accountId: walletApi.accountId ?? "unknown", + }); + + const availableBalance = useMemo( + () => + (isFtDonation + ? availableFtBalances?.find( + (ftBalance) => ftBalance.contract_account_id === tokenId, + ) + : availableNearBalance) ?? null, + + [availableFtBalances, availableNearBalance, isFtDonation, tokenId], + ); + + return isPotLoading || availableBalance === null ? ( + + Loading... + + ) : ( + <> + {potError && potError.message} + + {pot !== undefined && ( + <> + + {`Donation to Projects in ${pot.name}`} + + + +
+
+ How do you want to allocate funds? +
+ + + + + + +
+ + + + {`${availableBalance.amount} ${availableBalance.metadata.symbol}`} + + + + available + +
+ } + fieldExtension={ + + } + type="number" + placeholder="0.00" + min={ + tokenId === NEAR_TOKEN_DENOM ? DONATION_MIN_NEAR_AMOUNT : 0.0 + } + step={0.01} + appendix="$ 0.00" + /> +
+ + )} + + ); +}; diff --git a/src/modules/donation/components/DonationProjectAllocation.tsx b/src/modules/donation/components/DonationProjectAllocation.tsx new file mode 100644 index 00000000..91c55674 --- /dev/null +++ b/src/modules/donation/components/DonationProjectAllocation.tsx @@ -0,0 +1,158 @@ +import { useMemo } from "react"; + +import { UseFormReturn } from "react-hook-form"; + +import { pagoda } from "@/common/api/pagoda"; +import { ByAccountId, potlock } from "@/common/api/potlock"; +import { NEAR_TOKEN_DENOM } from "@/common/constants"; +import { walletApi } from "@/common/contracts"; +import { + DialogDescription, + DialogHeader, + DialogTitle, + RadioGroup, + RadioGroupItem, + Select, + SelectContent, + SelectGroup, + SelectItem, + SelectLabel, + SelectTrigger, + SelectValue, + TextField, +} from "@/common/ui/components"; + +import { DONATION_MIN_NEAR_AMOUNT } from "../constants"; +import { DonationInputs } from "../models"; + +export type DonationProjectAllocationProps = ByAccountId & { + form: UseFormReturn; +}; + +export const DonationProjectAllocation: React.FC< + DonationProjectAllocationProps +> = ({ accountId, form }) => { + const tokenId = form.watch("tokenId"); + const { data: activePots } = potlock.useAccountActivePots({ accountId }); + const hasMatchingPots = (activePots?.length ?? 0) > 0; + const isFtDonation = tokenId !== NEAR_TOKEN_DENOM; + + const { + isLoading: isAccountLoading, + data: account, + error: accountError, + } = potlock.useAccount({ accountId }); + + const { data: { balance: availableNearBalance = null } = {} } = + pagoda.useNearAccountBalance({ + accountId: walletApi.accountId ?? "unknown", + }); + + const { data: { balances: availableFtBalances = null } = {} } = + pagoda.useFtAccountBalances({ + accountId: walletApi.accountId ?? "unknown", + }); + + const availableBalance = useMemo( + () => + (isFtDonation + ? availableFtBalances?.find( + (ftBalance) => ftBalance.contract_account_id === tokenId, + ) + : availableNearBalance) ?? null, + + [availableFtBalances, availableNearBalance, isFtDonation, tokenId], + ); + + return isAccountLoading || availableBalance === null ? ( + + Loading... + + ) : ( + <> + {accountError && accountError.message} + + {account !== undefined && ( + <> + + + {`Donation to ${account.near_social_profile_data?.name}`} + + + + +
+
+ How do you want to allocate funds? +
+ + + + + + +
+ + + + {`${availableBalance.amount} ${availableBalance.metadata.symbol}`} + + + + available + +
+ } + fieldExtension={ + + } + type="number" + placeholder="0.00" + min={ + tokenId === NEAR_TOKEN_DENOM ? DONATION_MIN_NEAR_AMOUNT : 0.0 + } + step={0.01} + appendix="$ 0.00" + /> +
+ + )} + + ); +}; diff --git a/src/modules/donation/components/DonationToPot.tsx b/src/modules/donation/components/DonationToPot.tsx deleted file mode 100644 index aede0acd..00000000 --- a/src/modules/donation/components/DonationToPot.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import { ByPotId, potlock } from "@/common/api/potlock"; -import { - DialogDescription, - DialogHeader, - DialogTitle, -} from "@/common/ui/components"; - -import { DonationState } from "../models"; - -export type DonationToPotProps = ByPotId & - DonationState & { - closeDialog: VoidFunction; - }; - -export const DonationToPot: React.FC = ({ - potId, - closeDialog: _, -}) => { - const { isLoading, data: pot, error } = potlock.usePot({ potId }); - - return isLoading ? ( - "Loading..." - ) : ( - <> - {error && error.message} - - {pot && ( - <> - - {`Donation to Projects in ${pot.name}`} - - - - - )} - - ); -}; diff --git a/src/modules/donation/components/DonationToProject.tsx b/src/modules/donation/components/DonationToProject.tsx deleted file mode 100644 index c79a11e9..00000000 --- a/src/modules/donation/components/DonationToProject.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { useMemo } from "react"; - -import { dispatch } from "@/app/_store"; -import { ByAccountId, potlock } from "@/common/api/potlock"; -import { - Button, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, - Form, -} from "@/common/ui/components"; - -import { DonationAllocation } from "./DonationAllocation"; -import { useDonationForm } from "../hooks/forms"; -import { DonationState } from "../models"; - -export type DonationToProjectProps = ByAccountId & - DonationState & { - closeDialog: VoidFunction; - }; - -export const DonationToProject: React.FC = ({ - accountId, - closeDialog: _, - currentStep, -}) => { - const { - isLoading: isAccountLoading, - data: account, - error: accountError, - } = potlock.useAccount({ accountId }); - - const { form, onSubmit } = useDonationForm({ - allocation: "direct", - accountId, - }); - - const content = useMemo(() => { - switch (currentStep) { - case "allocation": - return ; - case "confirmation": - return <>; - case "success": - return <>; - default: - return "Error: Unable to proceed with the next step"; - } - }, [currentStep, form]); - - return isAccountLoading ? ( - - Loading... - - ) : ( -
- - {accountError && accountError.message} - - {account !== undefined && ( - <> - {currentStep !== "success" && ( - - - {currentStep === "confirmation" - ? "Confirm donation" - : `Donation to ${account.near_social_profile_data?.name}`} - - - )} - - {content} - - - - - - - - )} -
- - ); -}; diff --git a/src/modules/donation/hooks/forms.ts b/src/modules/donation/hooks/forms.ts index c3ccd1ce..32f4abf2 100644 --- a/src/modules/donation/hooks/forms.ts +++ b/src/modules/donation/hooks/forms.ts @@ -4,21 +4,16 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { SubmitHandler, useForm } from "react-hook-form"; import { dispatch } from "@/app/_store"; -import { ByAccountId, ByPotId } from "@/common/api/potlock"; import { walletApi } from "@/common/contracts"; import useIsHuman from "@/modules/core/hooks/useIsHuman"; import { - DonationAllocationType, DonationInputs, + DonationSubmissionInputs, donationSchema, } from "../models"; -export type DonationFormParameters = - | (ByAccountId & { allocation: DonationAllocationType.direct }) - | (ByPotId & { allocation: DonationAllocationType.pot }); - -export const useDonationForm = (params: DonationFormParameters) => { +export const useDonationForm = (params: DonationSubmissionInputs) => { const form = useForm({ resolver: zodResolver(donationSchema), }); diff --git a/src/modules/donation/models.ts b/src/modules/donation/models.ts index 1c08b335..4ccc9aac 100644 --- a/src/modules/donation/models.ts +++ b/src/modules/donation/models.ts @@ -20,42 +20,57 @@ import { DONATION_MIN_NEAR_AMOUNT, } from "./constants"; -export enum DonationAllocationType { +export type DonationParameters = ByAccountId | ByPotId; + +export enum DonationAllocationStrategyEnum { direct = "direct", pot = "pot", } -export type DonationParameters = ByAccountId | ByPotId; +export type DonationAllocationStrategy = + keyof typeof DonationAllocationStrategyEnum; + +export enum DonationPotDistributionStrategyEnum { + evenly = "evenly", + manually = "manually", +} + +export type DonationPotDistributionStrategy = + keyof typeof DonationPotDistributionStrategyEnum; -export type DonationAllocationOption = { +export type DonationAllocationStrategyOption = { title: string; - value: DonationAllocationType; + value: DonationAllocationStrategy; hint?: string; hintIfDisabled?: string; }; -export const donationAllocationOptions: Record< - DonationAllocationType, - DonationAllocationOption +export const donationAllocationStrategies: Record< + DonationAllocationStrategyEnum, + DonationAllocationStrategyOption > = { - [DonationAllocationType.direct]: { + [DonationAllocationStrategyEnum.direct]: { title: "Direct donation", - value: DonationAllocationType.direct, + value: "direct", }, - [DonationAllocationType.pot]: { + [DonationAllocationStrategyEnum.pot]: { title: "Quadratically matched donation", hintIfDisabled: "(no pots available)", - value: DonationAllocationType.pot, + value: "pot", }, }; export type DonationStep = "allocation" | "confirmation" | "success"; export const donationSchema = object({ - donationType: nativeEnum(DonationAllocationType, { - message: "Incorrect donation type", - }).default(DonationAllocationType.direct), + allocationStrategy: nativeEnum(DonationAllocationStrategyEnum, { + message: "Incorrect allocation strategy.", + }).default(DonationAllocationStrategyEnum.direct), + + potDistributionStrategy: nativeEnum(DonationPotDistributionStrategyEnum, { + message: "Incorrect donation distribution strategy.", + }).default(DonationPotDistributionStrategyEnum.evenly), tokenId: literal(NEAR_TOKEN_DENOM) .or(string().min(6)) @@ -106,6 +121,8 @@ const handleStep = (state: DonationState, step: DonationStep) => ({ currentStep: step, }); +export type DonationSubmissionInputs = ByAccountId | ByPotId; + export const donationModel = createModel()({ state: donationStateDefaults, @@ -142,15 +159,30 @@ export const donationModel = createModel()({ }, effects: (dispatch) => ({ - submit({ amount, donationType, recipientAccountId }: DonationInputs) { - switch (donationType) { - case DonationAllocationType.direct: - return donateNearDirectly( - { recipient_id: recipientAccountId }, - amount, - ) - .then(dispatch.success) - .catch(dispatch.failure); + submit({ + amount, + allocationStrategy, + potDistributionStrategy, + ...props + }: DonationSubmissionInputs & DonationInputs) { + if ("accountId" in props) { + switch (allocationStrategy) { + case DonationAllocationStrategyEnum.direct: + return donateNearDirectly({ recipient_id: props.accountId }, amount) + .then(dispatch.success) + .catch(dispatch.failure); + + case DonationAllocationStrategyEnum.pot: + return dispatch.failure; + } + } else if ("potId" in props) { + switch (potDistributionStrategy) { + case DonationPotDistributionStrategyEnum.evenly: + return dispatch.failure; + + case DonationPotDistributionStrategyEnum.manually: + return dispatch.failure; + } } }, }), From 1a58110f898e3fae59abaa0195683082d061739b Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 10:03:09 +0400 Subject: [PATCH 39/84] wip: Restructure donation flow --- .../components/DonationConfirmation.tsx | 17 +++++++++++++++++ .../donation/components/DonationFlow.tsx | 12 +++++++----- .../donation/components/DonationModal.tsx | 2 +- .../components/DonationPotAllocation.tsx | 2 +- .../donation/components/DonationSuccess.tsx | 12 ++++++++++++ 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 src/modules/donation/components/DonationConfirmation.tsx create mode 100644 src/modules/donation/components/DonationSuccess.tsx diff --git a/src/modules/donation/components/DonationConfirmation.tsx b/src/modules/donation/components/DonationConfirmation.tsx new file mode 100644 index 00000000..7d5c56a6 --- /dev/null +++ b/src/modules/donation/components/DonationConfirmation.tsx @@ -0,0 +1,17 @@ +import { UseFormReturn } from "react-hook-form"; + +import { DonationInputs } from "../models"; + +export type DonationConfirmationProps = { + form: UseFormReturn; +}; + +export const DonationConfirmation = ({ + form: _, +}: DonationConfirmationProps) => { + return ( +
+

Confirm donation

+
+ ); +}; diff --git a/src/modules/donation/components/DonationFlow.tsx b/src/modules/donation/components/DonationFlow.tsx index b2d84eb9..4d9bae20 100644 --- a/src/modules/donation/components/DonationFlow.tsx +++ b/src/modules/donation/components/DonationFlow.tsx @@ -3,18 +3,20 @@ import { useMemo } from "react"; import { dispatch } from "@/app/_store"; import { Button, DialogFooter, Form } from "@/common/ui/components"; +import { DonationConfirmation } from "./DonationConfirmation"; import { DonationPotAllocation } from "./DonationPotAllocation"; import { DonationProjectAllocation } from "./DonationProjectAllocation"; +import { DonationSuccess } from "./DonationSuccess"; import { useDonationForm } from "../hooks/forms"; import { DonationState, DonationSubmissionInputs } from "../models"; export type DonationFlowProps = DonationSubmissionInputs & DonationState & { - closeDialog: VoidFunction; + closeModal: VoidFunction; }; export const DonationFlow: React.FC = ({ - closeDialog: _, + closeModal, currentStep, ...props }) => { @@ -33,15 +35,15 @@ export const DonationFlow: React.FC = ({ ); case "confirmation": - return <>; + return ; case "success": - return <>; + return ; default: return "Error: Unable to proceed with the next step"; } - }, [currentStep, form, props]); + }, [closeModal, currentStep, form, props]); return (
diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index a1a92531..f8f53f82 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -49,7 +49,7 @@ export const DonationModal = create((props: DonationModalProps) => { ) : ( - + )} diff --git a/src/modules/donation/components/DonationPotAllocation.tsx b/src/modules/donation/components/DonationPotAllocation.tsx index 4d55c2f2..9c85898c 100644 --- a/src/modules/donation/components/DonationPotAllocation.tsx +++ b/src/modules/donation/components/DonationPotAllocation.tsx @@ -3,7 +3,7 @@ import { useMemo } from "react"; import { UseFormReturn } from "react-hook-form"; import { pagoda } from "@/common/api/pagoda"; -import { ByAccountId, ByPotId, potlock } from "@/common/api/potlock"; +import { ByPotId, potlock } from "@/common/api/potlock"; import { NEAR_TOKEN_DENOM } from "@/common/constants"; import { walletApi } from "@/common/contracts"; import { diff --git a/src/modules/donation/components/DonationSuccess.tsx b/src/modules/donation/components/DonationSuccess.tsx new file mode 100644 index 00000000..718b4bc5 --- /dev/null +++ b/src/modules/donation/components/DonationSuccess.tsx @@ -0,0 +1,12 @@ +export type DonationSuccessProps = { + closeModal: VoidFunction; +}; + +export const DonationSuccess = ({ closeModal }: DonationSuccessProps) => { + return ( +
+

Donation successful!

+ +
+ ); +}; From f7984a9d6088a18b4b7ae01fcc19f464ea8e3707 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 11:08:28 +0400 Subject: [PATCH 40/84] wip --- .../core/components/RuntimeErrorAlert.tsx | 19 ++++++ src/modules/core/index.ts | 1 + .../donation/components/DonationFlow.tsx | 14 +++- .../donation/components/DonationModal.tsx | 18 +---- .../components/DonationProjectAllocation.tsx | 67 ++++++++++++------- src/modules/donation/hooks/forms.ts | 5 +- src/modules/donation/models.ts | 10 +-- 7 files changed, 86 insertions(+), 48 deletions(-) create mode 100644 src/modules/core/components/RuntimeErrorAlert.tsx diff --git a/src/modules/core/components/RuntimeErrorAlert.tsx b/src/modules/core/components/RuntimeErrorAlert.tsx new file mode 100644 index 00000000..ed9d9a04 --- /dev/null +++ b/src/modules/core/components/RuntimeErrorAlert.tsx @@ -0,0 +1,19 @@ +import { Alert, AlertDescription, AlertTitle } from "@/common/ui/components"; + +export type RuntimeErrorAlertProps = { + customMessage?: string; +}; + +export const RuntimeErrorAlert: React.FC = ({ + customMessage, +}) => ( + + Runtime error! + + + {customMessage} + + Please contact PotLock team for help. + + +); diff --git a/src/modules/core/index.ts b/src/modules/core/index.ts index 178cd64f..ef542ee8 100644 --- a/src/modules/core/index.ts +++ b/src/modules/core/index.ts @@ -1 +1,2 @@ export * from "./utils"; +export * from "./components/RuntimeErrorAlert"; diff --git a/src/modules/donation/components/DonationFlow.tsx b/src/modules/donation/components/DonationFlow.tsx index 4d9bae20..4dbd5754 100644 --- a/src/modules/donation/components/DonationFlow.tsx +++ b/src/modules/donation/components/DonationFlow.tsx @@ -1,7 +1,13 @@ import { useMemo } from "react"; import { dispatch } from "@/app/_store"; -import { Button, DialogFooter, Form } from "@/common/ui/components"; +import { + Button, + DialogFooter, + DialogHeader, + Form, +} from "@/common/ui/components"; +import { RuntimeErrorAlert } from "@/modules/core"; import { DonationConfirmation } from "./DonationConfirmation"; import { DonationPotAllocation } from "./DonationPotAllocation"; @@ -41,7 +47,11 @@ export const DonationFlow: React.FC = ({ return ; default: - return "Error: Unable to proceed with the next step"; + return ( + + + + ); } }, [closeModal, currentStep, form, props]); diff --git a/src/modules/donation/components/DonationModal.tsx b/src/modules/donation/components/DonationModal.tsx index f8f53f82..51f7b993 100644 --- a/src/modules/donation/components/DonationModal.tsx +++ b/src/modules/donation/components/DonationModal.tsx @@ -3,14 +3,8 @@ import { useCallback } from "react"; import { create, useModal } from "@ebay/nice-modal-react"; import { dispatch, useTypedSelector } from "@/app/_store"; -import { - Alert, - AlertDescription, - AlertTitle, - Dialog, - DialogContent, - DialogHeader, -} from "@/common/ui/components"; +import { Dialog, DialogContent, DialogHeader } from "@/common/ui/components"; +import { RuntimeErrorAlert } from "@/modules/core"; import { DonationFlow } from "./DonationFlow"; import { DonationParameters } from "../models"; @@ -40,13 +34,7 @@ export const DonationModal = create((props: DonationModalProps) => { > {!("accountId" in props) && !("potId" in props) ? ( - - Runtime error! - - - Please contact PotLock team for help. - - + ) : ( diff --git a/src/modules/donation/components/DonationProjectAllocation.tsx b/src/modules/donation/components/DonationProjectAllocation.tsx index 91c55674..6d80dd3b 100644 --- a/src/modules/donation/components/DonationProjectAllocation.tsx +++ b/src/modules/donation/components/DonationProjectAllocation.tsx @@ -21,9 +21,10 @@ import { SelectValue, TextField, } from "@/common/ui/components"; +import { RuntimeErrorAlert } from "@/modules/core"; import { DONATION_MIN_NEAR_AMOUNT } from "../constants"; -import { DonationInputs } from "../models"; +import { DonationInputs, tokenIdSchema } from "../models"; export type DonationProjectAllocationProps = ByAccountId & { form: UseFormReturn; @@ -43,15 +44,23 @@ export const DonationProjectAllocation: React.FC< error: accountError, } = potlock.useAccount({ accountId }); - const { data: { balance: availableNearBalance = null } = {} } = - pagoda.useNearAccountBalance({ - accountId: walletApi.accountId ?? "unknown", - }); + const { + isLoading: isNearBalanceLoading, + data: { balance: availableNearBalance = null } = {}, + error: nearBalanceError, + } = pagoda.useNearAccountBalance({ + accountId: walletApi.accountId ?? "unknown", + }); + + const { + isLoading: isFtBalanceLoading, + data: { balances: availableFtBalances = null } = {}, + error: ftBalancesError, + } = pagoda.useFtAccountBalances({ + accountId: walletApi.accountId ?? "unknown", + }); - const { data: { balances: availableFtBalances = null } = {} } = - pagoda.useFtAccountBalances({ - accountId: walletApi.accountId ?? "unknown", - }); + const dataFetchError = accountError ?? nearBalanceError ?? ftBalancesError; const availableBalance = useMemo( () => @@ -64,7 +73,7 @@ export const DonationProjectAllocation: React.FC< [availableFtBalances, availableNearBalance, isFtDonation, tokenId], ); - return isAccountLoading || availableBalance === null ? ( + return isAccountLoading || isNearBalanceLoading || isFtBalanceLoading ? ( ) : ( <> - {accountError && accountError.message} + {dataFetchError && ( + + + + )} {account !== undefined && ( <> @@ -114,22 +127,28 @@ export const DonationProjectAllocation: React.FC< - - {`${availableBalance.amount} ${availableBalance.metadata.symbol}`} - - - - available + availableBalance === null ? ( + + Unable to load available balance! -
+ ) : ( +
+ + {`${availableBalance.amount} ${availableBalance.metadata.symbol}`} + + + + available + +
+ ) } fieldExtension={ - diff --git a/src/modules/donation/hooks/forms.ts b/src/modules/donation/hooks/forms.ts index 32f4abf2..e8f98cbe 100644 --- a/src/modules/donation/hooks/forms.ts +++ b/src/modules/donation/hooks/forms.ts @@ -11,18 +11,17 @@ import { DonationInputs, DonationSubmissionInputs, donationSchema, + tokenIdSchema, } from "../models"; export const useDonationForm = (params: DonationSubmissionInputs) => { const form = useForm({ resolver: zodResolver(donationSchema), + defaultValues: { tokenId: tokenIdSchema.parse(undefined) }, }); - const tokenId = form.watch("tokenId"); const isSenderHumanVerified = useIsHuman(walletApi.accountId ?? "unknown"); - console.log(tokenId); - const onSubmit: SubmitHandler = useCallback( (values) => dispatch.donation.submit({ ...values, ...params }), [params], diff --git a/src/modules/donation/models.ts b/src/modules/donation/models.ts index 4ccc9aac..a7eec69c 100644 --- a/src/modules/donation/models.ts +++ b/src/modules/donation/models.ts @@ -63,6 +63,11 @@ export const donationAllocationStrategies: Record< export type DonationStep = "allocation" | "confirmation" | "success"; +export const tokenIdSchema = literal(NEAR_TOKEN_DENOM) + .or(string().min(6)) + .default(NEAR_TOKEN_DENOM) + .describe('Either "NEAR" or FT contract account id.'); + export const donationSchema = object({ allocationStrategy: nativeEnum(DonationAllocationStrategyEnum, { message: "Incorrect allocation strategy.", @@ -72,10 +77,7 @@ export const donationSchema = object({ message: "Incorrect donation distribution strategy.", }).default(DonationPotDistributionStrategyEnum.evenly), - tokenId: literal(NEAR_TOKEN_DENOM) - .or(string().min(6)) - .default(NEAR_TOKEN_DENOM) - .describe('Either "NEAR" or FT contract account id.'), + tokenId: tokenIdSchema, amount: number() .positive() From 93c1cc88289020709f1edd3483d46e33f75ec85e Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 11:15:47 +0400 Subject: [PATCH 41/84] wip --- .../components/DonationConfirmation.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/modules/donation/components/DonationConfirmation.tsx b/src/modules/donation/components/DonationConfirmation.tsx index 7d5c56a6..552f865b 100644 --- a/src/modules/donation/components/DonationConfirmation.tsx +++ b/src/modules/donation/components/DonationConfirmation.tsx @@ -1,17 +1,23 @@ import { UseFormReturn } from "react-hook-form"; +import { DialogHeader, DialogTitle } from "@/common/ui/components"; + import { DonationInputs } from "../models"; export type DonationConfirmationProps = { form: UseFormReturn; }; -export const DonationConfirmation = ({ - form: _, -}: DonationConfirmationProps) => { +export const DonationConfirmation = ({ form }: DonationConfirmationProps) => { + const values = form.watch(); + + console.log(values); + return ( -
-

Confirm donation

-
+ <> + + {"Confirm donation"} + + ); }; From 86c2a185c93e65edcbee80a2fb8edfc44f7a9e8e Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Tue, 18 Jun 2024 11:20:38 +0400 Subject: [PATCH 42/84] wip --- .../donation/components/DonationFlow.tsx | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/modules/donation/components/DonationFlow.tsx b/src/modules/donation/components/DonationFlow.tsx index 4dbd5754..387763b7 100644 --- a/src/modules/donation/components/DonationFlow.tsx +++ b/src/modules/donation/components/DonationFlow.tsx @@ -7,6 +7,7 @@ import { DialogHeader, Form, } from "@/common/ui/components"; +import { cn } from "@/common/ui/utils"; import { RuntimeErrorAlert } from "@/modules/core"; import { DonationConfirmation } from "./DonationConfirmation"; @@ -61,9 +62,16 @@ export const DonationFlow: React.FC = ({ {content} - + {currentStep === "allocation" && ( + + )} From 021764fa4f02a760bbfb5e6cae92b4d0745fc14a Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Wed, 19 Jun 2024 05:57:30 +0400 Subject: [PATCH 43/84] wip --- src/common/ui/components/dialog.tsx | 11 +-- src/common/ui/components/form.tsx | 6 +- .../components/DonationProjectAllocation.tsx | 69 ++++++++++++------- src/modules/donation/hooks/forms.ts | 7 +- src/modules/donation/models.ts | 30 ++++---- 5 files changed, 79 insertions(+), 44 deletions(-) diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx index a72104e8..fb0ac0eb 100644 --- a/src/common/ui/components/dialog.tsx +++ b/src/common/ui/components/dialog.tsx @@ -196,7 +196,7 @@ const DialogFooter = ({ ...props }: React.HTMLAttributes) => (
); @@ -222,15 +222,18 @@ DialogTitle.displayName = DialogPrimitive.Title.displayName; const DialogDescription = forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, ...props }, ref) => ( +>(({ className, children, ...props }, ref) => ( + asChild + > +
{children}
+
)); DialogDescription.displayName = DialogPrimitive.Description.displayName; diff --git a/src/common/ui/components/form.tsx b/src/common/ui/components/form.tsx index acdc27fb..05589c92 100644 --- a/src/common/ui/components/form.tsx +++ b/src/common/ui/components/form.tsx @@ -94,7 +94,11 @@ const FormLabel = forwardRef< return (
+
- +
From 06b3b9264a3a72900e06b87b89a9dc0cc2d0e112 Mon Sep 17 00:00:00 2001 From: "Carina.Akaia.io" Date: Wed, 19 Jun 2024 11:46:45 +0400 Subject: [PATCH 47/84] wip --- src/common/ui/components/dialog.tsx | 2 +- src/common/ui/components/index.ts | 1 + src/common/ui/components/textarea.tsx | 23 ++++ .../donation/components/DonationBreakdown.tsx | 58 ++++++++++ .../components/DonationConfirmation.tsx | 102 +++++++++++++++++- .../components/DonationProjectAllocation.tsx | 2 +- src/modules/donation/hooks/forms.ts | 4 +- src/modules/donation/models.ts | 1 - 8 files changed, 188 insertions(+), 5 deletions(-) create mode 100644 src/common/ui/components/textarea.tsx create mode 100644 src/modules/donation/components/DonationBreakdown.tsx diff --git a/src/common/ui/components/dialog.tsx b/src/common/ui/components/dialog.tsx index fb0ac0eb..74f13f88 100644 --- a/src/common/ui/components/dialog.tsx +++ b/src/common/ui/components/dialog.tsx @@ -226,7 +226,7 @@ const DialogDescription = forwardRef< {} + +export const Textarea = forwardRef( + ({ className, ...props }, ref) => { + return ( +