mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
- #11603 ### Changes 🏗️ Frontend: - Make `okData` infer the response data type instead of casting - Generalize infinite query utilities from `SidebarRunsList/helpers.ts` - Move to `@/app/api/helpers` and use wherever possible - Simplify/replace boilerplate checks and conditions with `okData` in many places - Add `useUserTimezone` hook to replace all the boilerplate timezone queries Backend: - Fix response type annotation of `GET /api/store/graph/{store_listing_version_id}` endpoint - Fix documentation and error behavior of `GET /api/review/execution/{graph_exec_id}` endpoint ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: - CI passes - [x] Clicking around the app manually -> no obvious issues - [x] Test Onboarding step 5 (run) - [x] Library runs list loads normally
110 lines
2.8 KiB
TypeScript
110 lines
2.8 KiB
TypeScript
import { defineConfig } from "orval";
|
|
|
|
export default defineConfig({
|
|
autogpt_api_client: {
|
|
input: {
|
|
target: `./src/app/api/openapi.json`,
|
|
override: {
|
|
transformer: "./src/app/api/transformers/fix-tags.mjs",
|
|
},
|
|
},
|
|
output: {
|
|
workspace: "./src/app/api",
|
|
target: `./__generated__/endpoints`,
|
|
schemas: "./__generated__/models",
|
|
mode: "tags-split",
|
|
client: "react-query",
|
|
httpClient: "fetch",
|
|
indexFiles: false,
|
|
override: {
|
|
mutator: {
|
|
path: "./mutators/custom-mutator.ts",
|
|
name: "customMutator",
|
|
},
|
|
query: {
|
|
useQuery: true,
|
|
useMutation: true,
|
|
usePrefetch: true,
|
|
// Will add more as their use cases arise
|
|
},
|
|
useDates: true,
|
|
operations: {
|
|
"getV2List library agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2List favorite library agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2List presets": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV1List graph executions": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2Get builder blocks": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
useQuery: true,
|
|
},
|
|
},
|
|
"getV2Get builder integration providers": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
"getV2List store agents": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
useQuery: true,
|
|
},
|
|
},
|
|
"getV2Builder search": {
|
|
query: {
|
|
useInfinite: true,
|
|
useInfiniteQueryParam: "page",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
hooks: {
|
|
afterAllFilesWrite:
|
|
"prettier --ignore-path= --write ./src/app/api/__generated__",
|
|
},
|
|
},
|
|
// autogpt_zod_schema: {
|
|
// input: {
|
|
// target: `./src/app/api/openapi.json`,
|
|
// override: {
|
|
// transformer: "./src/app/api/transformers/fix-tags.mjs",
|
|
// },
|
|
// },
|
|
// output: {
|
|
// workspace: "./src/app/api",
|
|
// target: `./__generated__/zod-schema`,
|
|
// schemas: "./__generated__/models",
|
|
// mode: "tags-split",
|
|
// client: "zod",
|
|
// indexFiles: false,
|
|
// },
|
|
// hooks: {
|
|
// afterAllFilesWrite: "prettier --write",
|
|
// },
|
|
// },
|
|
});
|