mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-05 05:14:14 -05:00
ci(frontend): query generation on dev and ci check (#10417)
## Changes 🏗️ - Run the API query generation as part of the `dev` command - update the `README` to reflect so - Add CI job to generate queries and type-check to make sure we are not out of sync - the job is run both in Front-end and Back-end changes - Generate the files via script to load the BE URL dynamically from the env - Remove generated files from Git - rename the `type-check` command to `types` ## 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: - [x] CI passes - [x] `README` updates make sense #### For configuration changes: None --------- Co-authored-by: Zamil Majdy <zamil.majdy@agpt.co>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
# Platform - Frontend
|
||||
!autogpt_platform/frontend/src/
|
||||
!autogpt_platform/frontend/public/
|
||||
!autogpt_platform/frontend/scripts/
|
||||
!autogpt_platform/frontend/package.json
|
||||
!autogpt_platform/frontend/pnpm-lock.yaml
|
||||
!autogpt_platform/frontend/tsconfig.json
|
||||
|
||||
31
.github/workflows/platform-frontend-ci.yml
vendored
31
.github/workflows/platform-frontend-ci.yml
vendored
@@ -82,37 +82,6 @@ jobs:
|
||||
- name: Run lint
|
||||
run: pnpm lint
|
||||
|
||||
type-check:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "21"
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Restore dependencies cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ needs.setup.outputs.cache-key }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-${{ hashFiles('autogpt_platform/frontend/pnpm-lock.yaml') }}
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Run tsc check
|
||||
run: pnpm type-check
|
||||
|
||||
chromatic:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
|
||||
132
.github/workflows/platform-fullstack-ci.yml
vendored
Normal file
132
.github/workflows/platform-fullstack-ci.yml
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
name: AutoGPT Platform - Frontend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, dev]
|
||||
paths:
|
||||
- ".github/workflows/platform-fullstack-ci.yml"
|
||||
- "autogpt_platform/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/platform-fullstack-ci.yml"
|
||||
- "autogpt_platform/**"
|
||||
merge_group:
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
working-directory: autogpt_platform/frontend
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
cache-key: ${{ steps.cache-key.outputs.key }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "21"
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Generate cache key
|
||||
id: cache-key
|
||||
run: echo "key=${{ runner.os }}-pnpm-${{ hashFiles('autogpt_platform/frontend/pnpm-lock.yaml', 'autogpt_platform/frontend/package.json') }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ steps.cache-key.outputs.key }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-${{ hashFiles('autogpt_platform/frontend/pnpm-lock.yaml') }}
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
types:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "21"
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Copy default supabase .env
|
||||
run: |
|
||||
cp ../.env.default ../.env
|
||||
|
||||
- name: Copy backend .env
|
||||
run: |
|
||||
cp ../backend/.env.default ../backend/.env
|
||||
|
||||
- name: Run docker compose
|
||||
run: |
|
||||
docker compose -f ../docker-compose.yml --profile local --profile deps_backend up -d
|
||||
|
||||
- name: Restore dependencies cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ needs.setup.outputs.cache-key }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Setup .env
|
||||
run: cp .env.default .env
|
||||
|
||||
- name: Wait for services to be ready
|
||||
run: |
|
||||
echo "Waiting for rest_server to be ready..."
|
||||
timeout 60 sh -c 'until curl -f http://localhost:8006/health 2>/dev/null; do sleep 2; done' || echo "Rest server health check timeout, continuing..."
|
||||
echo "Waiting for database to be ready..."
|
||||
timeout 60 sh -c 'until docker compose -f ../docker-compose.yml exec -T db pg_isready -U postgres 2>/dev/null; do sleep 2; done' || echo "Database ready check timeout, continuing..."
|
||||
|
||||
- name: Generate API queries
|
||||
run: pnpm generate:api:force
|
||||
|
||||
- name: Check for API schema changes
|
||||
run: |
|
||||
if ! git diff --exit-code src/app/api/openapi.json; then
|
||||
echo "❌ API schema changes detected in src/app/api/openapi.json"
|
||||
echo ""
|
||||
echo "The openapi.json file has been modified after running 'pnpm generate:api-all'."
|
||||
echo "This usually means changes have been made in the BE endpoints without updating the Frontend."
|
||||
echo "The API schema is now out of sync with the Front-end queries."
|
||||
echo ""
|
||||
echo "To fix this:"
|
||||
echo "1. Pull the backend 'docker compose pull && docker compose up -d --build --force-recreate'"
|
||||
echo "2. Run 'pnpm generate:api' locally"
|
||||
echo "3. Run 'pnpm types' locally"
|
||||
echo "4. Fix any TypeScript errors that may have been introduced"
|
||||
echo "5. Commit and push your changes"
|
||||
echo ""
|
||||
exit 1
|
||||
else
|
||||
echo "✅ No API schema changes detected"
|
||||
fi
|
||||
|
||||
- name: Run Typescript checks
|
||||
run: pnpm types
|
||||
@@ -235,7 +235,7 @@ repos:
|
||||
hooks:
|
||||
- id: tsc
|
||||
name: Typecheck - AutoGPT Platform - Frontend
|
||||
entry: bash -c 'cd autogpt_platform/frontend && pnpm type-check'
|
||||
entry: bash -c 'cd autogpt_platform/frontend && pnpm types'
|
||||
files: ^autogpt_platform/frontend/
|
||||
types: [file]
|
||||
language: system
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Repository Overview
|
||||
|
||||
AutoGPT Platform is a monorepo containing:
|
||||
|
||||
- **Backend** (`/backend`): Python FastAPI server with async support
|
||||
- **Frontend** (`/frontend`): Next.js React application
|
||||
- **Shared Libraries** (`/autogpt_libs`): Common Python utilities
|
||||
@@ -11,6 +13,7 @@ AutoGPT Platform is a monorepo containing:
|
||||
## Essential Commands
|
||||
|
||||
### Backend Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
cd backend && poetry install
|
||||
@@ -41,6 +44,7 @@ poetry run pytest 'backend/blocks/test/test_block.py::test_available_blocks[GetC
|
||||
poetry run format # Black + isort
|
||||
poetry run lint # ruff
|
||||
```
|
||||
|
||||
More details can be found in TESTING.md
|
||||
|
||||
#### Creating/Updating Snapshots
|
||||
@@ -53,8 +57,8 @@ poetry run pytest path/to/test.py --snapshot-update
|
||||
|
||||
⚠️ **Important**: Always review snapshot changes before committing! Use `git diff` to verify the changes are expected.
|
||||
|
||||
|
||||
### Frontend Development
|
||||
|
||||
```bash
|
||||
# Install dependencies
|
||||
cd frontend && npm install
|
||||
@@ -72,12 +76,13 @@ npm run storybook
|
||||
npm run build
|
||||
|
||||
# Type checking
|
||||
npm run type-check
|
||||
npm run types
|
||||
```
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### Backend Architecture
|
||||
|
||||
- **API Layer**: FastAPI with REST and WebSocket endpoints
|
||||
- **Database**: PostgreSQL with Prisma ORM, includes pgvector for embeddings
|
||||
- **Queue System**: RabbitMQ for async task processing
|
||||
@@ -86,6 +91,7 @@ npm run type-check
|
||||
- **Security**: Cache protection middleware prevents sensitive data caching in browsers/proxies
|
||||
|
||||
### Frontend Architecture
|
||||
|
||||
- **Framework**: Next.js App Router with React Server Components
|
||||
- **State Management**: React hooks + Supabase client for real-time updates
|
||||
- **Workflow Builder**: Visual graph editor using @xyflow/react
|
||||
@@ -93,6 +99,7 @@ npm run type-check
|
||||
- **Feature Flags**: LaunchDarkly integration
|
||||
|
||||
### Key Concepts
|
||||
|
||||
1. **Agent Graphs**: Workflow definitions stored as JSON, executed by the backend
|
||||
2. **Blocks**: Reusable components in `/backend/blocks/` that perform specific tasks
|
||||
3. **Integrations**: OAuth and API connections stored per user
|
||||
@@ -100,13 +107,16 @@ npm run type-check
|
||||
5. **Virus Scanning**: ClamAV integration for file upload security
|
||||
|
||||
### Testing Approach
|
||||
|
||||
- Backend uses pytest with snapshot testing for API responses
|
||||
- Test files are colocated with source files (`*_test.py`)
|
||||
- Frontend uses Playwright for E2E tests
|
||||
- Component testing via Storybook
|
||||
|
||||
### Database Schema
|
||||
|
||||
Key models (defined in `/backend/schema.prisma`):
|
||||
|
||||
- `User`: Authentication and profile data
|
||||
- `AgentGraph`: Workflow definitions with version control
|
||||
- `AgentGraphExecution`: Execution history and results
|
||||
@@ -118,7 +128,7 @@ Key models (defined in `/backend/schema.prisma`):
|
||||
#### Configuration Files
|
||||
|
||||
- **Backend**: `/backend/.env.default` (defaults) → `/backend/.env` (user overrides)
|
||||
- **Frontend**: `/frontend/.env.default` (defaults) → `/frontend/.env` (user overrides)
|
||||
- **Frontend**: `/frontend/.env.default` (defaults) → `/frontend/.env` (user overrides)
|
||||
- **Platform**: `/.env.default` (Supabase/shared defaults) → `/.env` (user overrides)
|
||||
|
||||
#### Docker Environment Loading Order
|
||||
@@ -150,12 +160,14 @@ Note: when making many new blocks analyze the interfaces for each of these blcok
|
||||
ex: do the inputs and outputs tie well together?
|
||||
|
||||
**Modifying the API:**
|
||||
|
||||
1. Update route in `/backend/backend/server/routers/`
|
||||
2. Add/update Pydantic models in same directory
|
||||
3. Write tests alongside the route file
|
||||
4. Run `poetry run test` to verify
|
||||
|
||||
**Frontend feature development:**
|
||||
|
||||
1. Components go in `/frontend/src/components/`
|
||||
2. Use existing UI components from `/frontend/src/components/ui/`
|
||||
3. Add Storybook stories for new components
|
||||
@@ -164,6 +176,7 @@ ex: do the inputs and outputs tie well together?
|
||||
### Security Implementation
|
||||
|
||||
**Cache Protection Middleware:**
|
||||
|
||||
- Located in `/backend/backend/server/middleware/security.py`
|
||||
- Default behavior: Disables caching for ALL endpoints with `Cache-Control: no-store, no-cache, must-revalidate, private`
|
||||
- Uses an allow list approach - only explicitly permitted paths can be cached
|
||||
@@ -172,8 +185,8 @@ ex: do the inputs and outputs tie well together?
|
||||
- To allow caching for a new endpoint, add it to `CACHEABLE_PATHS` in the middleware
|
||||
- Applied to both main API server and external API applications
|
||||
|
||||
|
||||
### Creating Pull Requests
|
||||
|
||||
- Create the PR aginst the `dev` branch of the repository.
|
||||
- Ensure the branch name is descriptive (e.g., `feature/add-new-block`)/
|
||||
- Use conventional commit messages (see below)/
|
||||
@@ -181,6 +194,7 @@ ex: do the inputs and outputs tie well together?
|
||||
- Run the github pre-commit hooks to ensure code quality.
|
||||
|
||||
### Reviewing/Revising Pull Requests
|
||||
|
||||
- When the user runs /pr-comments or tries to fetch them, also run gh api /repos/Significant-Gravitas/AutoGPT/pulls/[issuenum]/reviews to get the reviews
|
||||
- Use gh api /repos/Significant-Gravitas/AutoGPT/pulls/[issuenum]/reviews/[review_id]/comments to get the review contents
|
||||
- Use gh api /repos/Significant-Gravitas/AutoGPT/issues/9924/comments to get the pr specific comments
|
||||
|
||||
@@ -139,7 +139,7 @@ The platform includes scripts for generating and managing the API client:
|
||||
|
||||
- `pnpm fetch:openapi`: Fetches the OpenAPI specification from the backend service (requires backend to be running on port 8006)
|
||||
- `pnpm generate:api-client`: Generates the TypeScript API client from the OpenAPI specification using Orval
|
||||
- `pnpm generate:api-all`: Runs both fetch and generate commands in sequence
|
||||
- `pnpm generate:api`: Runs both fetch and generate commands in sequence
|
||||
|
||||
#### Manual API Client Updates
|
||||
|
||||
@@ -153,7 +153,7 @@ If you need to update the API client after making changes to the backend API:
|
||||
|
||||
2. Generate the updated API client:
|
||||
```
|
||||
pnpm generate:api-all
|
||||
pnpm generate:api
|
||||
```
|
||||
|
||||
This will fetch the latest OpenAPI specification and regenerate the TypeScript client code.
|
||||
|
||||
5
autogpt_platform/frontend/.gitignore
vendored
5
autogpt_platform/frontend/.gitignore
vendored
@@ -54,4 +54,7 @@ storybook-static
|
||||
*.ignore.*
|
||||
*.ign.*
|
||||
!.npmrc
|
||||
.cursorrules
|
||||
.cursorrules
|
||||
|
||||
# Generated API files
|
||||
src/app/api/__generated__/
|
||||
@@ -5,24 +5,17 @@ RUN corepack enable
|
||||
COPY autogpt_platform/frontend/package.json autogpt_platform/frontend/pnpm-lock.yaml ./
|
||||
RUN --mount=type=cache,target=/root/.local/share/pnpm pnpm install --frozen-lockfile
|
||||
|
||||
# Dev stage
|
||||
FROM base AS dev
|
||||
ENV NODE_ENV=development
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
COPY autogpt_platform/frontend/ .
|
||||
EXPOSE 3000
|
||||
CMD ["pnpm", "run", "dev", "--hostname", "0.0.0.0"]
|
||||
|
||||
# Build stage for prod
|
||||
FROM base AS build
|
||||
|
||||
COPY autogpt_platform/frontend/ .
|
||||
ENV SKIP_STORYBOOK_TESTS=true
|
||||
RUN if [ -f .env ]; then \
|
||||
cat .env.default .env > .env.merged && mv .env.merged .env; \
|
||||
else \
|
||||
cp .env.default .env; \
|
||||
fi
|
||||
RUN pnpm build --turbo
|
||||
RUN pnpm run generate:api
|
||||
RUN pnpm build
|
||||
|
||||
# Prod stage - based on NextJS reference Dockerfile https://github.com/vercel/next.js/blob/64271354533ed16da51be5dce85f0dbd15f17517/examples/with-docker/Dockerfile
|
||||
FROM node:21-alpine AS prod
|
||||
|
||||
@@ -87,12 +87,12 @@ Every time a new Front-end dependency is added by you or others, you will need t
|
||||
- `pnpm start` - Start production server
|
||||
- `pnpm lint` - Run ESLint and Prettier checks
|
||||
- `pnpm format` - Format code with Prettier
|
||||
- `pnpm type-check` - Run TypeScript type checking
|
||||
- `pnpm types` - Run TypeScript type checking
|
||||
- `pnpm test` - Run Playwright tests
|
||||
- `pnpm test-ui` - Run Playwright tests with UI
|
||||
- `pnpm fetch:openapi` - Fetch OpenAPI spec from backend
|
||||
- `pnpm generate:api-client` - Generate API client from OpenAPI spec
|
||||
- `pnpm generate:api-all` - Fetch OpenAPI spec and generate API client
|
||||
- `pnpm generate:api` - Fetch OpenAPI spec and generate API client
|
||||
|
||||
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
|
||||
|
||||
@@ -115,7 +115,7 @@ This project uses an auto-generated API client powered by [**Orval**](https://or
|
||||
|
||||
```bash
|
||||
# Fetch OpenAPI spec from backend and generate client
|
||||
pnpm generate:api-all
|
||||
pnpm generate:api
|
||||
|
||||
# Only fetch the OpenAPI spec
|
||||
pnpm fetch:openapi
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
"version": "0.3.4",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbo",
|
||||
"build": "cross-env pnpm run generate:api-client && SKIP_STORYBOOK_TESTS=true next build",
|
||||
"dev": "pnpm run generate:api:force && next dev --turbo",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"start:standalone": "cd .next/standalone && node server.js",
|
||||
"lint": "next lint && prettier --check .",
|
||||
"format": "next lint --fix; prettier --write .",
|
||||
"type-check": "tsc --noEmit",
|
||||
"types": "tsc --noEmit",
|
||||
"test": "next build --turbo && playwright test",
|
||||
"test-ui": "next build --turbo && playwright test --ui",
|
||||
"test:no-build": "playwright test",
|
||||
@@ -18,9 +18,8 @@
|
||||
"build-storybook": "storybook build",
|
||||
"test-storybook": "test-storybook",
|
||||
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"pnpm run build-storybook -- --quiet && npx http-server storybook-static --port 6006 --silent\" \"wait-on tcp:6006 && pnpm run test-storybook\"",
|
||||
"fetch:openapi": "curl http://localhost:8006/openapi.json > ./src/app/api/openapi.json && prettier --write ./src/app/api/openapi.json",
|
||||
"generate:api-client": "orval --config ./orval.config.ts",
|
||||
"generate:api-all": "pnpm run fetch:openapi && pnpm run generate:api-client"
|
||||
"generate:api": "npx --yes tsx ./scripts/generate-api-queries.ts && orval --config ./orval.config.ts",
|
||||
"generate:api:force": "npx --yes tsx ./scripts/generate-api-queries.ts --force && orval --config ./orval.config.ts"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
|
||||
61
autogpt_platform/frontend/scripts/generate-api-queries.ts
Normal file
61
autogpt_platform/frontend/scripts/generate-api-queries.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { getAgptServerBaseUrl } from "@/lib/env-config";
|
||||
import { execSync } from "child_process";
|
||||
import * as path from "path";
|
||||
import * as fs from "fs";
|
||||
|
||||
function fetchOpenApiSpec(): void {
|
||||
const args = process.argv.slice(2);
|
||||
const forceFlag = args.includes("--force");
|
||||
|
||||
const baseUrl = getAgptServerBaseUrl();
|
||||
const openApiUrl = `${baseUrl}/openapi.json`;
|
||||
const outputPath = path.join(
|
||||
__dirname,
|
||||
"..",
|
||||
"src",
|
||||
"app",
|
||||
"api",
|
||||
"openapi.json",
|
||||
);
|
||||
|
||||
console.log(`Output path: ${outputPath}`);
|
||||
console.log(`Force flag: ${forceFlag}`);
|
||||
|
||||
// Check if local file exists
|
||||
const localFileExists = fs.existsSync(outputPath);
|
||||
|
||||
if (!forceFlag && localFileExists) {
|
||||
console.log("✅ Using existing local OpenAPI spec file");
|
||||
console.log("💡 Use --force flag to fetch from server");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!localFileExists) {
|
||||
console.log("📄 No local OpenAPI spec found, fetching from server...");
|
||||
} else {
|
||||
console.log(
|
||||
"🔄 Force flag detected, fetching fresh OpenAPI spec from server...",
|
||||
);
|
||||
}
|
||||
|
||||
console.log(`Fetching OpenAPI spec from: ${openApiUrl}`);
|
||||
|
||||
try {
|
||||
// Fetch the OpenAPI spec
|
||||
execSync(`curl "${openApiUrl}" > "${outputPath}"`, { stdio: "inherit" });
|
||||
|
||||
// Format with prettier
|
||||
execSync(`prettier --write "${outputPath}"`, { stdio: "inherit" });
|
||||
|
||||
console.log("✅ OpenAPI spec fetched and formatted successfully");
|
||||
} catch (error) {
|
||||
console.error("❌ Failed to fetch OpenAPI spec:", error);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (require.main === module) {
|
||||
fetchOpenApiSpec();
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,245 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { BodyPostV1LogRawAnalytics } from "../../models/bodyPostV1LogRawAnalytics";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { LogRawMetricRequest } from "../../models/logRawMetricRequest";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Log Raw Metric
|
||||
*/
|
||||
export type postV1LogRawMetricResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1LogRawMetricResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1LogRawMetricResponseComposite =
|
||||
| postV1LogRawMetricResponse200
|
||||
| postV1LogRawMetricResponse422;
|
||||
|
||||
export type postV1LogRawMetricResponse = postV1LogRawMetricResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1LogRawMetricUrl = () => {
|
||||
return `/api/analytics/log_raw_metric`;
|
||||
};
|
||||
|
||||
export const postV1LogRawMetric = async (
|
||||
logRawMetricRequest: LogRawMetricRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1LogRawMetricResponse> => {
|
||||
return customMutator<postV1LogRawMetricResponse>(getPostV1LogRawMetricUrl(), {
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(logRawMetricRequest),
|
||||
});
|
||||
};
|
||||
|
||||
export const getPostV1LogRawMetricMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>,
|
||||
TError,
|
||||
{ data: LogRawMetricRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>,
|
||||
TError,
|
||||
{ data: LogRawMetricRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1LogRawMetric"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>,
|
||||
{ data: LogRawMetricRequest }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1LogRawMetric(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1LogRawMetricMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>
|
||||
>;
|
||||
export type PostV1LogRawMetricMutationBody = LogRawMetricRequest;
|
||||
export type PostV1LogRawMetricMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Log Raw Metric
|
||||
*/
|
||||
export const usePostV1LogRawMetric = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>,
|
||||
TError,
|
||||
{ data: LogRawMetricRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1LogRawMetric>>,
|
||||
TError,
|
||||
{ data: LogRawMetricRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1LogRawMetricMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary Log Raw Analytics
|
||||
*/
|
||||
export type postV1LogRawAnalyticsResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1LogRawAnalyticsResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1LogRawAnalyticsResponseComposite =
|
||||
| postV1LogRawAnalyticsResponse200
|
||||
| postV1LogRawAnalyticsResponse422;
|
||||
|
||||
export type postV1LogRawAnalyticsResponse =
|
||||
postV1LogRawAnalyticsResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1LogRawAnalyticsUrl = () => {
|
||||
return `/api/analytics/log_raw_analytics`;
|
||||
};
|
||||
|
||||
export const postV1LogRawAnalytics = async (
|
||||
bodyPostV1LogRawAnalytics: BodyPostV1LogRawAnalytics,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1LogRawAnalyticsResponse> => {
|
||||
return customMutator<postV1LogRawAnalyticsResponse>(
|
||||
getPostV1LogRawAnalyticsUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(bodyPostV1LogRawAnalytics),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1LogRawAnalyticsMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>,
|
||||
TError,
|
||||
{ data: BodyPostV1LogRawAnalytics },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>,
|
||||
TError,
|
||||
{ data: BodyPostV1LogRawAnalytics },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1LogRawAnalytics"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>,
|
||||
{ data: BodyPostV1LogRawAnalytics }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1LogRawAnalytics(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1LogRawAnalyticsMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>
|
||||
>;
|
||||
export type PostV1LogRawAnalyticsMutationBody = BodyPostV1LogRawAnalytics;
|
||||
export type PostV1LogRawAnalyticsMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Log Raw Analytics
|
||||
*/
|
||||
export const usePostV1LogRawAnalytics = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>,
|
||||
TError,
|
||||
{ data: BodyPostV1LogRawAnalytics },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1LogRawAnalytics>>,
|
||||
TError,
|
||||
{ data: BodyPostV1LogRawAnalytics },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1LogRawAnalyticsMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@@ -1,910 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { APIKeyWithoutHash } from "../../models/aPIKeyWithoutHash";
|
||||
|
||||
import type { CreateAPIKeyRequest } from "../../models/createAPIKeyRequest";
|
||||
|
||||
import type { CreateAPIKeyResponse } from "../../models/createAPIKeyResponse";
|
||||
|
||||
import type { GetV1ListUserApiKeys200 } from "../../models/getV1ListUserApiKeys200";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { UpdatePermissionsRequest } from "../../models/updatePermissionsRequest";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* List all API keys for the user
|
||||
* @summary List user API keys
|
||||
*/
|
||||
export type getV1ListUserApiKeysResponse200 = {
|
||||
data: GetV1ListUserApiKeys200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1ListUserApiKeysResponseComposite =
|
||||
getV1ListUserApiKeysResponse200;
|
||||
|
||||
export type getV1ListUserApiKeysResponse =
|
||||
getV1ListUserApiKeysResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1ListUserApiKeysUrl = () => {
|
||||
return `/api/api-keys`;
|
||||
};
|
||||
|
||||
export const getV1ListUserApiKeys = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1ListUserApiKeysResponse> => {
|
||||
return customMutator<getV1ListUserApiKeysResponse>(
|
||||
getGetV1ListUserApiKeysUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1ListUserApiKeysQueryKey = () => {
|
||||
return [`/api/api-keys`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1ListUserApiKeysQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetV1ListUserApiKeysQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>
|
||||
> = ({ signal }) => getV1ListUserApiKeys({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1ListUserApiKeysQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>
|
||||
>;
|
||||
export type GetV1ListUserApiKeysQueryError = unknown;
|
||||
|
||||
export function useGetV1ListUserApiKeys<
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListUserApiKeys<
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListUserApiKeys<
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List user API keys
|
||||
*/
|
||||
|
||||
export function useGetV1ListUserApiKeys<
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1ListUserApiKeysQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List user API keys
|
||||
*/
|
||||
export const prefetchGetV1ListUserApiKeysQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1ListUserApiKeysQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new API key
|
||||
* @summary Create new API key
|
||||
*/
|
||||
export type postV1CreateNewApiKeyResponse200 = {
|
||||
data: CreateAPIKeyResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1CreateNewApiKeyResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1CreateNewApiKeyResponseComposite =
|
||||
| postV1CreateNewApiKeyResponse200
|
||||
| postV1CreateNewApiKeyResponse422;
|
||||
|
||||
export type postV1CreateNewApiKeyResponse =
|
||||
postV1CreateNewApiKeyResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1CreateNewApiKeyUrl = () => {
|
||||
return `/api/api-keys`;
|
||||
};
|
||||
|
||||
export const postV1CreateNewApiKey = async (
|
||||
createAPIKeyRequest: CreateAPIKeyRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1CreateNewApiKeyResponse> => {
|
||||
return customMutator<postV1CreateNewApiKeyResponse>(
|
||||
getPostV1CreateNewApiKeyUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(createAPIKeyRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1CreateNewApiKeyMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>,
|
||||
TError,
|
||||
{ data: CreateAPIKeyRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>,
|
||||
TError,
|
||||
{ data: CreateAPIKeyRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1CreateNewApiKey"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>,
|
||||
{ data: CreateAPIKeyRequest }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1CreateNewApiKey(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1CreateNewApiKeyMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>
|
||||
>;
|
||||
export type PostV1CreateNewApiKeyMutationBody = CreateAPIKeyRequest;
|
||||
export type PostV1CreateNewApiKeyMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Create new API key
|
||||
*/
|
||||
export const usePostV1CreateNewApiKey = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>,
|
||||
TError,
|
||||
{ data: CreateAPIKeyRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1CreateNewApiKey>>,
|
||||
TError,
|
||||
{ data: CreateAPIKeyRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1CreateNewApiKeyMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* Get a specific API key
|
||||
* @summary Get specific API key
|
||||
*/
|
||||
export type getV1GetSpecificApiKeyResponse200 = {
|
||||
data: APIKeyWithoutHash;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1GetSpecificApiKeyResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getV1GetSpecificApiKeyResponseComposite =
|
||||
| getV1GetSpecificApiKeyResponse200
|
||||
| getV1GetSpecificApiKeyResponse422;
|
||||
|
||||
export type getV1GetSpecificApiKeyResponse =
|
||||
getV1GetSpecificApiKeyResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1GetSpecificApiKeyUrl = (keyId: string) => {
|
||||
return `/api/api-keys/${keyId}`;
|
||||
};
|
||||
|
||||
export const getV1GetSpecificApiKey = async (
|
||||
keyId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getV1GetSpecificApiKeyResponse> => {
|
||||
return customMutator<getV1GetSpecificApiKeyResponse>(
|
||||
getGetV1GetSpecificApiKeyUrl(keyId),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1GetSpecificApiKeyQueryKey = (keyId?: string) => {
|
||||
return [`/api/api-keys/${keyId}`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1GetSpecificApiKeyQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
keyId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1GetSpecificApiKeyQueryKey(keyId);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>
|
||||
> = ({ signal }) =>
|
||||
getV1GetSpecificApiKey(keyId, { signal, ...requestOptions });
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!keyId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1GetSpecificApiKeyQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>
|
||||
>;
|
||||
export type GetV1GetSpecificApiKeyQueryError = HTTPValidationError;
|
||||
|
||||
export function useGetV1GetSpecificApiKey<
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
keyId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetSpecificApiKey<
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
keyId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetSpecificApiKey<
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
keyId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get specific API key
|
||||
*/
|
||||
|
||||
export function useGetV1GetSpecificApiKey<
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
keyId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1GetSpecificApiKeyQueryOptions(keyId, options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get specific API key
|
||||
*/
|
||||
export const prefetchGetV1GetSpecificApiKeyQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
keyId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1GetSpecificApiKeyQueryOptions(keyId, options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* Revoke an API key
|
||||
* @summary Revoke API key
|
||||
*/
|
||||
export type deleteV1RevokeApiKeyResponse200 = {
|
||||
data: APIKeyWithoutHash;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteV1RevokeApiKeyResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteV1RevokeApiKeyResponseComposite =
|
||||
| deleteV1RevokeApiKeyResponse200
|
||||
| deleteV1RevokeApiKeyResponse422;
|
||||
|
||||
export type deleteV1RevokeApiKeyResponse =
|
||||
deleteV1RevokeApiKeyResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getDeleteV1RevokeApiKeyUrl = (keyId: string) => {
|
||||
return `/api/api-keys/${keyId}`;
|
||||
};
|
||||
|
||||
export const deleteV1RevokeApiKey = async (
|
||||
keyId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteV1RevokeApiKeyResponse> => {
|
||||
return customMutator<deleteV1RevokeApiKeyResponse>(
|
||||
getDeleteV1RevokeApiKeyUrl(keyId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteV1RevokeApiKeyMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteV1RevokeApiKey"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>,
|
||||
{ keyId: string }
|
||||
> = (props) => {
|
||||
const { keyId } = props ?? {};
|
||||
|
||||
return deleteV1RevokeApiKey(keyId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteV1RevokeApiKeyMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>
|
||||
>;
|
||||
|
||||
export type DeleteV1RevokeApiKeyMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Revoke API key
|
||||
*/
|
||||
export const useDeleteV1RevokeApiKey = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteV1RevokeApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getDeleteV1RevokeApiKeyMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* Suspend an API key
|
||||
* @summary Suspend API key
|
||||
*/
|
||||
export type postV1SuspendApiKeyResponse200 = {
|
||||
data: APIKeyWithoutHash;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1SuspendApiKeyResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1SuspendApiKeyResponseComposite =
|
||||
| postV1SuspendApiKeyResponse200
|
||||
| postV1SuspendApiKeyResponse422;
|
||||
|
||||
export type postV1SuspendApiKeyResponse =
|
||||
postV1SuspendApiKeyResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1SuspendApiKeyUrl = (keyId: string) => {
|
||||
return `/api/api-keys/${keyId}/suspend`;
|
||||
};
|
||||
|
||||
export const postV1SuspendApiKey = async (
|
||||
keyId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1SuspendApiKeyResponse> => {
|
||||
return customMutator<postV1SuspendApiKeyResponse>(
|
||||
getPostV1SuspendApiKeyUrl(keyId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1SuspendApiKeyMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1SuspendApiKey"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>,
|
||||
{ keyId: string }
|
||||
> = (props) => {
|
||||
const { keyId } = props ?? {};
|
||||
|
||||
return postV1SuspendApiKey(keyId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1SuspendApiKeyMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>
|
||||
>;
|
||||
|
||||
export type PostV1SuspendApiKeyMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Suspend API key
|
||||
*/
|
||||
export const usePostV1SuspendApiKey = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1SuspendApiKey>>,
|
||||
TError,
|
||||
{ keyId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1SuspendApiKeyMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* Update API key permissions
|
||||
* @summary Update key permissions
|
||||
*/
|
||||
export type putV1UpdateKeyPermissionsResponse200 = {
|
||||
data: APIKeyWithoutHash;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type putV1UpdateKeyPermissionsResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type putV1UpdateKeyPermissionsResponseComposite =
|
||||
| putV1UpdateKeyPermissionsResponse200
|
||||
| putV1UpdateKeyPermissionsResponse422;
|
||||
|
||||
export type putV1UpdateKeyPermissionsResponse =
|
||||
putV1UpdateKeyPermissionsResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPutV1UpdateKeyPermissionsUrl = (keyId: string) => {
|
||||
return `/api/api-keys/${keyId}/permissions`;
|
||||
};
|
||||
|
||||
export const putV1UpdateKeyPermissions = async (
|
||||
keyId: string,
|
||||
updatePermissionsRequest: UpdatePermissionsRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<putV1UpdateKeyPermissionsResponse> => {
|
||||
return customMutator<putV1UpdateKeyPermissionsResponse>(
|
||||
getPutV1UpdateKeyPermissionsUrl(keyId),
|
||||
{
|
||||
...options,
|
||||
method: "PUT",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(updatePermissionsRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPutV1UpdateKeyPermissionsMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>,
|
||||
TError,
|
||||
{ keyId: string; data: UpdatePermissionsRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>,
|
||||
TError,
|
||||
{ keyId: string; data: UpdatePermissionsRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["putV1UpdateKeyPermissions"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>,
|
||||
{ keyId: string; data: UpdatePermissionsRequest }
|
||||
> = (props) => {
|
||||
const { keyId, data } = props ?? {};
|
||||
|
||||
return putV1UpdateKeyPermissions(keyId, data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PutV1UpdateKeyPermissionsMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>
|
||||
>;
|
||||
export type PutV1UpdateKeyPermissionsMutationBody = UpdatePermissionsRequest;
|
||||
export type PutV1UpdateKeyPermissionsMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update key permissions
|
||||
*/
|
||||
export const usePutV1UpdateKeyPermissions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>,
|
||||
TError,
|
||||
{ keyId: string; data: UpdatePermissionsRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof putV1UpdateKeyPermissions>>,
|
||||
TError,
|
||||
{ keyId: string; data: UpdatePermissionsRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPutV1UpdateKeyPermissionsMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@@ -1,561 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { NotificationPreference } from "../../models/notificationPreference";
|
||||
|
||||
import type { NotificationPreferenceDTO } from "../../models/notificationPreferenceDTO";
|
||||
|
||||
import type { PostV1UpdateUserEmail200 } from "../../models/postV1UpdateUserEmail200";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Get or create user
|
||||
*/
|
||||
export type postV1GetOrCreateUserResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1GetOrCreateUserResponseComposite =
|
||||
postV1GetOrCreateUserResponse200;
|
||||
|
||||
export type postV1GetOrCreateUserResponse =
|
||||
postV1GetOrCreateUserResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1GetOrCreateUserUrl = () => {
|
||||
return `/api/auth/user`;
|
||||
};
|
||||
|
||||
export const postV1GetOrCreateUser = async (
|
||||
options?: RequestInit,
|
||||
): Promise<postV1GetOrCreateUserResponse> => {
|
||||
return customMutator<postV1GetOrCreateUserResponse>(
|
||||
getPostV1GetOrCreateUserUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1GetOrCreateUserMutationOptions = <
|
||||
TError = unknown,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1GetOrCreateUser"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>,
|
||||
void
|
||||
> = () => {
|
||||
return postV1GetOrCreateUser(requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1GetOrCreateUserMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>
|
||||
>;
|
||||
|
||||
export type PostV1GetOrCreateUserMutationError = unknown;
|
||||
|
||||
/**
|
||||
* @summary Get or create user
|
||||
*/
|
||||
export const usePostV1GetOrCreateUser = <TError = unknown, TContext = unknown>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1GetOrCreateUser>>,
|
||||
TError,
|
||||
void,
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1GetOrCreateUserMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary Update user email
|
||||
*/
|
||||
export type postV1UpdateUserEmailResponse200 = {
|
||||
data: PostV1UpdateUserEmail200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1UpdateUserEmailResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1UpdateUserEmailResponseComposite =
|
||||
| postV1UpdateUserEmailResponse200
|
||||
| postV1UpdateUserEmailResponse422;
|
||||
|
||||
export type postV1UpdateUserEmailResponse =
|
||||
postV1UpdateUserEmailResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1UpdateUserEmailUrl = () => {
|
||||
return `/api/auth/user/email`;
|
||||
};
|
||||
|
||||
export const postV1UpdateUserEmail = async (
|
||||
postV1UpdateUserEmailBody: string,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1UpdateUserEmailResponse> => {
|
||||
return customMutator<postV1UpdateUserEmailResponse>(
|
||||
getPostV1UpdateUserEmailUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(postV1UpdateUserEmailBody),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1UpdateUserEmailMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>,
|
||||
TError,
|
||||
{ data: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>,
|
||||
TError,
|
||||
{ data: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1UpdateUserEmail"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>,
|
||||
{ data: string }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1UpdateUserEmail(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1UpdateUserEmailMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>
|
||||
>;
|
||||
export type PostV1UpdateUserEmailMutationBody = string;
|
||||
export type PostV1UpdateUserEmailMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update user email
|
||||
*/
|
||||
export const usePostV1UpdateUserEmail = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>,
|
||||
TError,
|
||||
{ data: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1UpdateUserEmail>>,
|
||||
TError,
|
||||
{ data: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1UpdateUserEmailMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary Get notification preferences
|
||||
*/
|
||||
export type getV1GetNotificationPreferencesResponse200 = {
|
||||
data: NotificationPreference;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1GetNotificationPreferencesResponseComposite =
|
||||
getV1GetNotificationPreferencesResponse200;
|
||||
|
||||
export type getV1GetNotificationPreferencesResponse =
|
||||
getV1GetNotificationPreferencesResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1GetNotificationPreferencesUrl = () => {
|
||||
return `/api/auth/user/preferences`;
|
||||
};
|
||||
|
||||
export const getV1GetNotificationPreferences = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1GetNotificationPreferencesResponse> => {
|
||||
return customMutator<getV1GetNotificationPreferencesResponse>(
|
||||
getGetV1GetNotificationPreferencesUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1GetNotificationPreferencesQueryKey = () => {
|
||||
return [`/api/auth/user/preferences`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1GetNotificationPreferencesQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1GetNotificationPreferencesQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>
|
||||
> = ({ signal }) =>
|
||||
getV1GetNotificationPreferences({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1GetNotificationPreferencesQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>
|
||||
>;
|
||||
export type GetV1GetNotificationPreferencesQueryError = unknown;
|
||||
|
||||
export function useGetV1GetNotificationPreferences<
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetNotificationPreferences<
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetNotificationPreferences<
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get notification preferences
|
||||
*/
|
||||
|
||||
export function useGetV1GetNotificationPreferences<
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1GetNotificationPreferencesQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get notification preferences
|
||||
*/
|
||||
export const prefetchGetV1GetNotificationPreferencesQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1GetNotificationPreferencesQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update notification preferences
|
||||
*/
|
||||
export type postV1UpdateNotificationPreferencesResponse200 = {
|
||||
data: NotificationPreference;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1UpdateNotificationPreferencesResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1UpdateNotificationPreferencesResponseComposite =
|
||||
| postV1UpdateNotificationPreferencesResponse200
|
||||
| postV1UpdateNotificationPreferencesResponse422;
|
||||
|
||||
export type postV1UpdateNotificationPreferencesResponse =
|
||||
postV1UpdateNotificationPreferencesResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1UpdateNotificationPreferencesUrl = () => {
|
||||
return `/api/auth/user/preferences`;
|
||||
};
|
||||
|
||||
export const postV1UpdateNotificationPreferences = async (
|
||||
notificationPreferenceDTO: NotificationPreferenceDTO,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1UpdateNotificationPreferencesResponse> => {
|
||||
return customMutator<postV1UpdateNotificationPreferencesResponse>(
|
||||
getPostV1UpdateNotificationPreferencesUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(notificationPreferenceDTO),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1UpdateNotificationPreferencesMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>,
|
||||
TError,
|
||||
{ data: NotificationPreferenceDTO },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>,
|
||||
TError,
|
||||
{ data: NotificationPreferenceDTO },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1UpdateNotificationPreferences"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>,
|
||||
{ data: NotificationPreferenceDTO }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1UpdateNotificationPreferences(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1UpdateNotificationPreferencesMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>
|
||||
>;
|
||||
export type PostV1UpdateNotificationPreferencesMutationBody =
|
||||
NotificationPreferenceDTO;
|
||||
export type PostV1UpdateNotificationPreferencesMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update notification preferences
|
||||
*/
|
||||
export const usePostV1UpdateNotificationPreferences = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>,
|
||||
TError,
|
||||
{ data: NotificationPreferenceDTO },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1UpdateNotificationPreferences>>,
|
||||
TError,
|
||||
{ data: NotificationPreferenceDTO },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPostV1UpdateNotificationPreferencesMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@@ -1,348 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { GetV1ListAvailableBlocks200Item } from "../../models/getV1ListAvailableBlocks200Item";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { PostV1ExecuteGraphBlock200 } from "../../models/postV1ExecuteGraphBlock200";
|
||||
|
||||
import type { PostV1ExecuteGraphBlockBody } from "../../models/postV1ExecuteGraphBlockBody";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary List available blocks
|
||||
*/
|
||||
export type getV1ListAvailableBlocksResponse200 = {
|
||||
data: GetV1ListAvailableBlocks200Item[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1ListAvailableBlocksResponseComposite =
|
||||
getV1ListAvailableBlocksResponse200;
|
||||
|
||||
export type getV1ListAvailableBlocksResponse =
|
||||
getV1ListAvailableBlocksResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1ListAvailableBlocksUrl = () => {
|
||||
return `/api/blocks`;
|
||||
};
|
||||
|
||||
export const getV1ListAvailableBlocks = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1ListAvailableBlocksResponse> => {
|
||||
return customMutator<getV1ListAvailableBlocksResponse>(
|
||||
getGetV1ListAvailableBlocksUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1ListAvailableBlocksQueryKey = () => {
|
||||
return [`/api/blocks`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1ListAvailableBlocksQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1ListAvailableBlocksQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>
|
||||
> = ({ signal }) => getV1ListAvailableBlocks({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1ListAvailableBlocksQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>
|
||||
>;
|
||||
export type GetV1ListAvailableBlocksQueryError = unknown;
|
||||
|
||||
export function useGetV1ListAvailableBlocks<
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListAvailableBlocks<
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListAvailableBlocks<
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List available blocks
|
||||
*/
|
||||
|
||||
export function useGetV1ListAvailableBlocks<
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1ListAvailableBlocksQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List available blocks
|
||||
*/
|
||||
export const prefetchGetV1ListAvailableBlocksQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1ListAvailableBlocksQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Execute graph block
|
||||
*/
|
||||
export type postV1ExecuteGraphBlockResponse200 = {
|
||||
data: PostV1ExecuteGraphBlock200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1ExecuteGraphBlockResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1ExecuteGraphBlockResponseComposite =
|
||||
| postV1ExecuteGraphBlockResponse200
|
||||
| postV1ExecuteGraphBlockResponse422;
|
||||
|
||||
export type postV1ExecuteGraphBlockResponse =
|
||||
postV1ExecuteGraphBlockResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1ExecuteGraphBlockUrl = (blockId: string) => {
|
||||
return `/api/blocks/${blockId}/execute`;
|
||||
};
|
||||
|
||||
export const postV1ExecuteGraphBlock = async (
|
||||
blockId: string,
|
||||
postV1ExecuteGraphBlockBody: PostV1ExecuteGraphBlockBody,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1ExecuteGraphBlockResponse> => {
|
||||
return customMutator<postV1ExecuteGraphBlockResponse>(
|
||||
getPostV1ExecuteGraphBlockUrl(blockId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(postV1ExecuteGraphBlockBody),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1ExecuteGraphBlockMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>,
|
||||
TError,
|
||||
{ blockId: string; data: PostV1ExecuteGraphBlockBody },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>,
|
||||
TError,
|
||||
{ blockId: string; data: PostV1ExecuteGraphBlockBody },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1ExecuteGraphBlock"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>,
|
||||
{ blockId: string; data: PostV1ExecuteGraphBlockBody }
|
||||
> = (props) => {
|
||||
const { blockId, data } = props ?? {};
|
||||
|
||||
return postV1ExecuteGraphBlock(blockId, data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1ExecuteGraphBlockMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>
|
||||
>;
|
||||
export type PostV1ExecuteGraphBlockMutationBody = PostV1ExecuteGraphBlockBody;
|
||||
export type PostV1ExecuteGraphBlockMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Execute graph block
|
||||
*/
|
||||
export const usePostV1ExecuteGraphBlock = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>,
|
||||
TError,
|
||||
{ blockId: string; data: PostV1ExecuteGraphBlockBody },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1ExecuteGraphBlock>>,
|
||||
TError,
|
||||
{ blockId: string; data: PostV1ExecuteGraphBlockBody },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV1ExecuteGraphBlockMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,265 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { PostV1HandlePostmarkEmailWebhooksBody } from "../../models/postV1HandlePostmarkEmailWebhooksBody";
|
||||
|
||||
import type { PostV1OneClickEmailUnsubscribeParams } from "../../models/postV1OneClickEmailUnsubscribeParams";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary One Click Email Unsubscribe
|
||||
*/
|
||||
export type postV1OneClickEmailUnsubscribeResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1OneClickEmailUnsubscribeResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1OneClickEmailUnsubscribeResponseComposite =
|
||||
| postV1OneClickEmailUnsubscribeResponse200
|
||||
| postV1OneClickEmailUnsubscribeResponse422;
|
||||
|
||||
export type postV1OneClickEmailUnsubscribeResponse =
|
||||
postV1OneClickEmailUnsubscribeResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1OneClickEmailUnsubscribeUrl = (
|
||||
params: PostV1OneClickEmailUnsubscribeParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/api/email/unsubscribe?${stringifiedParams}`
|
||||
: `/api/email/unsubscribe`;
|
||||
};
|
||||
|
||||
export const postV1OneClickEmailUnsubscribe = async (
|
||||
params: PostV1OneClickEmailUnsubscribeParams,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1OneClickEmailUnsubscribeResponse> => {
|
||||
return customMutator<postV1OneClickEmailUnsubscribeResponse>(
|
||||
getPostV1OneClickEmailUnsubscribeUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1OneClickEmailUnsubscribeMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>,
|
||||
TError,
|
||||
{ params: PostV1OneClickEmailUnsubscribeParams },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>,
|
||||
TError,
|
||||
{ params: PostV1OneClickEmailUnsubscribeParams },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1OneClickEmailUnsubscribe"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>,
|
||||
{ params: PostV1OneClickEmailUnsubscribeParams }
|
||||
> = (props) => {
|
||||
const { params } = props ?? {};
|
||||
|
||||
return postV1OneClickEmailUnsubscribe(params, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1OneClickEmailUnsubscribeMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>
|
||||
>;
|
||||
|
||||
export type PostV1OneClickEmailUnsubscribeMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary One Click Email Unsubscribe
|
||||
*/
|
||||
export const usePostV1OneClickEmailUnsubscribe = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>,
|
||||
TError,
|
||||
{ params: PostV1OneClickEmailUnsubscribeParams },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1OneClickEmailUnsubscribe>>,
|
||||
TError,
|
||||
{ params: PostV1OneClickEmailUnsubscribeParams },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPostV1OneClickEmailUnsubscribeMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary Handle Postmark Email Webhooks
|
||||
*/
|
||||
export type postV1HandlePostmarkEmailWebhooksResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1HandlePostmarkEmailWebhooksResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1HandlePostmarkEmailWebhooksResponseComposite =
|
||||
| postV1HandlePostmarkEmailWebhooksResponse200
|
||||
| postV1HandlePostmarkEmailWebhooksResponse422;
|
||||
|
||||
export type postV1HandlePostmarkEmailWebhooksResponse =
|
||||
postV1HandlePostmarkEmailWebhooksResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1HandlePostmarkEmailWebhooksUrl = () => {
|
||||
return `/api/email/`;
|
||||
};
|
||||
|
||||
export const postV1HandlePostmarkEmailWebhooks = async (
|
||||
postV1HandlePostmarkEmailWebhooksBody: PostV1HandlePostmarkEmailWebhooksBody,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1HandlePostmarkEmailWebhooksResponse> => {
|
||||
return customMutator<postV1HandlePostmarkEmailWebhooksResponse>(
|
||||
getPostV1HandlePostmarkEmailWebhooksUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(postV1HandlePostmarkEmailWebhooksBody),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1HandlePostmarkEmailWebhooksMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>,
|
||||
TError,
|
||||
{ data: PostV1HandlePostmarkEmailWebhooksBody },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>,
|
||||
TError,
|
||||
{ data: PostV1HandlePostmarkEmailWebhooksBody },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1HandlePostmarkEmailWebhooks"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>,
|
||||
{ data: PostV1HandlePostmarkEmailWebhooksBody }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV1HandlePostmarkEmailWebhooks(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1HandlePostmarkEmailWebhooksMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>
|
||||
>;
|
||||
export type PostV1HandlePostmarkEmailWebhooksMutationBody =
|
||||
PostV1HandlePostmarkEmailWebhooksBody;
|
||||
export type PostV1HandlePostmarkEmailWebhooksMutationError =
|
||||
HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Handle Postmark Email Webhooks
|
||||
*/
|
||||
export const usePostV1HandlePostmarkEmailWebhooks = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>,
|
||||
TError,
|
||||
{ data: PostV1HandlePostmarkEmailWebhooksBody },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1HandlePostmarkEmailWebhooks>>,
|
||||
TError,
|
||||
{ data: PostV1HandlePostmarkEmailWebhooksBody },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPostV1HandlePostmarkEmailWebhooksMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@@ -1,184 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { BodyPostV1UploadFileToCloudStorage } from "../../models/bodyPostV1UploadFileToCloudStorage";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { PostV1UploadFileToCloudStorageParams } from "../../models/postV1UploadFileToCloudStorageParams";
|
||||
|
||||
import type { UploadFileResponse } from "../../models/uploadFileResponse";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* Upload a file to cloud storage and return a storage key that can be used
|
||||
with FileStoreBlock and AgentFileInputBlock.
|
||||
|
||||
Args:
|
||||
file: The file to upload
|
||||
user_id: The user ID
|
||||
provider: Cloud storage provider ("gcs", "s3", "azure")
|
||||
expiration_hours: Hours until file expires (1-48)
|
||||
|
||||
Returns:
|
||||
Dict containing the cloud storage path and signed URL
|
||||
* @summary Upload file to cloud storage
|
||||
*/
|
||||
export type postV1UploadFileToCloudStorageResponse200 = {
|
||||
data: UploadFileResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1UploadFileToCloudStorageResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1UploadFileToCloudStorageResponseComposite =
|
||||
| postV1UploadFileToCloudStorageResponse200
|
||||
| postV1UploadFileToCloudStorageResponse422;
|
||||
|
||||
export type postV1UploadFileToCloudStorageResponse =
|
||||
postV1UploadFileToCloudStorageResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1UploadFileToCloudStorageUrl = (
|
||||
params?: PostV1UploadFileToCloudStorageParams,
|
||||
) => {
|
||||
const normalizedParams = new URLSearchParams();
|
||||
|
||||
Object.entries(params || {}).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
normalizedParams.append(key, value === null ? "null" : value.toString());
|
||||
}
|
||||
});
|
||||
|
||||
const stringifiedParams = normalizedParams.toString();
|
||||
|
||||
return stringifiedParams.length > 0
|
||||
? `/api/files/upload?${stringifiedParams}`
|
||||
: `/api/files/upload`;
|
||||
};
|
||||
|
||||
export const postV1UploadFileToCloudStorage = async (
|
||||
bodyPostV1UploadFileToCloudStorage: BodyPostV1UploadFileToCloudStorage,
|
||||
params?: PostV1UploadFileToCloudStorageParams,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1UploadFileToCloudStorageResponse> => {
|
||||
const formData = new FormData();
|
||||
formData.append(`file`, bodyPostV1UploadFileToCloudStorage.file);
|
||||
|
||||
return customMutator<postV1UploadFileToCloudStorageResponse>(
|
||||
getPostV1UploadFileToCloudStorageUrl(params),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
body: formData,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1UploadFileToCloudStorageMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>,
|
||||
TError,
|
||||
{
|
||||
data: BodyPostV1UploadFileToCloudStorage;
|
||||
params?: PostV1UploadFileToCloudStorageParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>,
|
||||
TError,
|
||||
{
|
||||
data: BodyPostV1UploadFileToCloudStorage;
|
||||
params?: PostV1UploadFileToCloudStorageParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1UploadFileToCloudStorage"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>,
|
||||
{
|
||||
data: BodyPostV1UploadFileToCloudStorage;
|
||||
params?: PostV1UploadFileToCloudStorageParams;
|
||||
}
|
||||
> = (props) => {
|
||||
const { data, params } = props ?? {};
|
||||
|
||||
return postV1UploadFileToCloudStorage(data, params, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1UploadFileToCloudStorageMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>
|
||||
>;
|
||||
export type PostV1UploadFileToCloudStorageMutationBody =
|
||||
BodyPostV1UploadFileToCloudStorage;
|
||||
export type PostV1UploadFileToCloudStorageMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Upload file to cloud storage
|
||||
*/
|
||||
export const usePostV1UploadFileToCloudStorage = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>,
|
||||
TError,
|
||||
{
|
||||
data: BodyPostV1UploadFileToCloudStorage;
|
||||
params?: PostV1UploadFileToCloudStorageParams;
|
||||
},
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1UploadFileToCloudStorage>>,
|
||||
TError,
|
||||
{
|
||||
data: BodyPostV1UploadFileToCloudStorage;
|
||||
params?: PostV1UploadFileToCloudStorageParams;
|
||||
},
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPostV1UploadFileToCloudStorageMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,213 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
export type getHealthHealthResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getHealthHealthResponseComposite = getHealthHealthResponse200;
|
||||
|
||||
export type getHealthHealthResponse = getHealthHealthResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetHealthHealthUrl = () => {
|
||||
return `/health`;
|
||||
};
|
||||
|
||||
export const getHealthHealth = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getHealthHealthResponse> => {
|
||||
return customMutator<getHealthHealthResponse>(getGetHealthHealthUrl(), {
|
||||
...options,
|
||||
method: "GET",
|
||||
});
|
||||
};
|
||||
|
||||
export const getGetHealthHealthQueryKey = () => {
|
||||
return [`/health`] as const;
|
||||
};
|
||||
|
||||
export const getGetHealthHealthQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<Awaited<ReturnType<typeof getHealthHealth>>, TError, TData>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey = queryOptions?.queryKey ?? getGetHealthHealthQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<Awaited<ReturnType<typeof getHealthHealth>>> = ({
|
||||
signal,
|
||||
}) => getHealthHealth({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetHealthHealthQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>
|
||||
>;
|
||||
export type GetHealthHealthQueryError = unknown;
|
||||
|
||||
export function useGetHealthHealth<
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getHealthHealth>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetHealthHealth<
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getHealthHealth>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetHealthHealth<
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
|
||||
export function useGetHealthHealth<
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetHealthHealthQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Health
|
||||
*/
|
||||
export const prefetchGetHealthHealthQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getHealthHealth>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetHealthHealthQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,744 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { UserOnboardingUpdate } from "../../models/userOnboardingUpdate";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Get onboarding status
|
||||
*/
|
||||
export type getV1GetOnboardingStatusResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1GetOnboardingStatusResponseComposite =
|
||||
getV1GetOnboardingStatusResponse200;
|
||||
|
||||
export type getV1GetOnboardingStatusResponse =
|
||||
getV1GetOnboardingStatusResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1GetOnboardingStatusUrl = () => {
|
||||
return `/api/onboarding`;
|
||||
};
|
||||
|
||||
export const getV1GetOnboardingStatus = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1GetOnboardingStatusResponse> => {
|
||||
return customMutator<getV1GetOnboardingStatusResponse>(
|
||||
getGetV1GetOnboardingStatusUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1GetOnboardingStatusQueryKey = () => {
|
||||
return [`/api/onboarding`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1GetOnboardingStatusQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1GetOnboardingStatusQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>
|
||||
> = ({ signal }) => getV1GetOnboardingStatus({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1GetOnboardingStatusQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>
|
||||
>;
|
||||
export type GetV1GetOnboardingStatusQueryError = unknown;
|
||||
|
||||
export function useGetV1GetOnboardingStatus<
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetOnboardingStatus<
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetOnboardingStatus<
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get onboarding status
|
||||
*/
|
||||
|
||||
export function useGetV1GetOnboardingStatus<
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1GetOnboardingStatusQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get onboarding status
|
||||
*/
|
||||
export const prefetchGetV1GetOnboardingStatusQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1GetOnboardingStatusQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Update onboarding progress
|
||||
*/
|
||||
export type patchV1UpdateOnboardingProgressResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type patchV1UpdateOnboardingProgressResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type patchV1UpdateOnboardingProgressResponseComposite =
|
||||
| patchV1UpdateOnboardingProgressResponse200
|
||||
| patchV1UpdateOnboardingProgressResponse422;
|
||||
|
||||
export type patchV1UpdateOnboardingProgressResponse =
|
||||
patchV1UpdateOnboardingProgressResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPatchV1UpdateOnboardingProgressUrl = () => {
|
||||
return `/api/onboarding`;
|
||||
};
|
||||
|
||||
export const patchV1UpdateOnboardingProgress = async (
|
||||
userOnboardingUpdate: UserOnboardingUpdate,
|
||||
options?: RequestInit,
|
||||
): Promise<patchV1UpdateOnboardingProgressResponse> => {
|
||||
return customMutator<patchV1UpdateOnboardingProgressResponse>(
|
||||
getPatchV1UpdateOnboardingProgressUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "PATCH",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(userOnboardingUpdate),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPatchV1UpdateOnboardingProgressMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>,
|
||||
TError,
|
||||
{ data: UserOnboardingUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>,
|
||||
TError,
|
||||
{ data: UserOnboardingUpdate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["patchV1UpdateOnboardingProgress"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>,
|
||||
{ data: UserOnboardingUpdate }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return patchV1UpdateOnboardingProgress(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PatchV1UpdateOnboardingProgressMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>
|
||||
>;
|
||||
export type PatchV1UpdateOnboardingProgressMutationBody = UserOnboardingUpdate;
|
||||
export type PatchV1UpdateOnboardingProgressMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Update onboarding progress
|
||||
*/
|
||||
export const usePatchV1UpdateOnboardingProgress = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>,
|
||||
TError,
|
||||
{ data: UserOnboardingUpdate },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof patchV1UpdateOnboardingProgress>>,
|
||||
TError,
|
||||
{ data: UserOnboardingUpdate },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPatchV1UpdateOnboardingProgressMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary Get recommended agents
|
||||
*/
|
||||
export type getV1GetRecommendedAgentsResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1GetRecommendedAgentsResponseComposite =
|
||||
getV1GetRecommendedAgentsResponse200;
|
||||
|
||||
export type getV1GetRecommendedAgentsResponse =
|
||||
getV1GetRecommendedAgentsResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1GetRecommendedAgentsUrl = () => {
|
||||
return `/api/onboarding/agents`;
|
||||
};
|
||||
|
||||
export const getV1GetRecommendedAgents = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1GetRecommendedAgentsResponse> => {
|
||||
return customMutator<getV1GetRecommendedAgentsResponse>(
|
||||
getGetV1GetRecommendedAgentsUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1GetRecommendedAgentsQueryKey = () => {
|
||||
return [`/api/onboarding/agents`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1GetRecommendedAgentsQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1GetRecommendedAgentsQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>
|
||||
> = ({ signal }) => getV1GetRecommendedAgents({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1GetRecommendedAgentsQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>
|
||||
>;
|
||||
export type GetV1GetRecommendedAgentsQueryError = unknown;
|
||||
|
||||
export function useGetV1GetRecommendedAgents<
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetRecommendedAgents<
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1GetRecommendedAgents<
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Get recommended agents
|
||||
*/
|
||||
|
||||
export function useGetV1GetRecommendedAgents<
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1GetRecommendedAgentsQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Get recommended agents
|
||||
*/
|
||||
export const prefetchGetV1GetRecommendedAgentsQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1GetRecommendedAgentsQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Check onboarding enabled
|
||||
*/
|
||||
export type getV1CheckOnboardingEnabledResponse200 = {
|
||||
data: unknown;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1CheckOnboardingEnabledResponseComposite =
|
||||
getV1CheckOnboardingEnabledResponse200;
|
||||
|
||||
export type getV1CheckOnboardingEnabledResponse =
|
||||
getV1CheckOnboardingEnabledResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1CheckOnboardingEnabledUrl = () => {
|
||||
return `/api/onboarding/enabled`;
|
||||
};
|
||||
|
||||
export const getV1CheckOnboardingEnabled = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1CheckOnboardingEnabledResponse> => {
|
||||
return customMutator<getV1CheckOnboardingEnabledResponse>(
|
||||
getGetV1CheckOnboardingEnabledUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1CheckOnboardingEnabledQueryKey = () => {
|
||||
return [`/api/onboarding/enabled`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1CheckOnboardingEnabledQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1CheckOnboardingEnabledQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>
|
||||
> = ({ signal }) =>
|
||||
getV1CheckOnboardingEnabled({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1CheckOnboardingEnabledQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>
|
||||
>;
|
||||
export type GetV1CheckOnboardingEnabledQueryError = unknown;
|
||||
|
||||
export function useGetV1CheckOnboardingEnabled<
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1CheckOnboardingEnabled<
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1CheckOnboardingEnabled<
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary Check onboarding enabled
|
||||
*/
|
||||
|
||||
export function useGetV1CheckOnboardingEnabled<
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1CheckOnboardingEnabledQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary Check onboarding enabled
|
||||
*/
|
||||
export const prefetchGetV1CheckOnboardingEnabledQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1CheckOnboardingEnabledQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
@@ -1,139 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { ApiResponse } from "../../models/apiResponse";
|
||||
|
||||
import type { ChatRequest } from "../../models/chatRequest";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* Proxy requests to Otto API while adding necessary security headers and logging.
|
||||
Requires an authenticated user.
|
||||
* @summary Proxy Otto Chat Request
|
||||
*/
|
||||
export type postV2ProxyOttoChatRequestResponse200 = {
|
||||
data: ApiResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV2ProxyOttoChatRequestResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV2ProxyOttoChatRequestResponseComposite =
|
||||
| postV2ProxyOttoChatRequestResponse200
|
||||
| postV2ProxyOttoChatRequestResponse422;
|
||||
|
||||
export type postV2ProxyOttoChatRequestResponse =
|
||||
postV2ProxyOttoChatRequestResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV2ProxyOttoChatRequestUrl = () => {
|
||||
return `/api/otto/ask`;
|
||||
};
|
||||
|
||||
export const postV2ProxyOttoChatRequest = async (
|
||||
chatRequest: ChatRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<postV2ProxyOttoChatRequestResponse> => {
|
||||
return customMutator<postV2ProxyOttoChatRequestResponse>(
|
||||
getPostV2ProxyOttoChatRequestUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(chatRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV2ProxyOttoChatRequestMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>,
|
||||
TError,
|
||||
{ data: ChatRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>,
|
||||
TError,
|
||||
{ data: ChatRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV2ProxyOttoChatRequest"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>,
|
||||
{ data: ChatRequest }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV2ProxyOttoChatRequest(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV2ProxyOttoChatRequestMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>
|
||||
>;
|
||||
export type PostV2ProxyOttoChatRequestMutationBody = ChatRequest;
|
||||
export type PostV2ProxyOttoChatRequestMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Proxy Otto Chat Request
|
||||
*/
|
||||
export const usePostV2ProxyOttoChatRequest = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>,
|
||||
TError,
|
||||
{ data: ChatRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV2ProxyOttoChatRequest>>,
|
||||
TError,
|
||||
{ data: ChatRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV2ProxyOttoChatRequestMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,697 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import type {
|
||||
DataTag,
|
||||
DefinedInitialDataOptions,
|
||||
DefinedUseQueryResult,
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
QueryFunction,
|
||||
QueryKey,
|
||||
UndefinedInitialDataOptions,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
UseQueryOptions,
|
||||
UseQueryResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { DeleteV1DeleteExecutionSchedule200 } from "../../models/deleteV1DeleteExecutionSchedule200";
|
||||
|
||||
import type { GraphExecutionJobInfo } from "../../models/graphExecutionJobInfo";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { ScheduleCreationRequest } from "../../models/scheduleCreationRequest";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* @summary Create execution schedule
|
||||
*/
|
||||
export type postV1CreateExecutionScheduleResponse200 = {
|
||||
data: GraphExecutionJobInfo;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV1CreateExecutionScheduleResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV1CreateExecutionScheduleResponseComposite =
|
||||
| postV1CreateExecutionScheduleResponse200
|
||||
| postV1CreateExecutionScheduleResponse422;
|
||||
|
||||
export type postV1CreateExecutionScheduleResponse =
|
||||
postV1CreateExecutionScheduleResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV1CreateExecutionScheduleUrl = (graphId: string) => {
|
||||
return `/api/graphs/${graphId}/schedules`;
|
||||
};
|
||||
|
||||
export const postV1CreateExecutionSchedule = async (
|
||||
graphId: string,
|
||||
scheduleCreationRequest: ScheduleCreationRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<postV1CreateExecutionScheduleResponse> => {
|
||||
return customMutator<postV1CreateExecutionScheduleResponse>(
|
||||
getPostV1CreateExecutionScheduleUrl(graphId),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(scheduleCreationRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV1CreateExecutionScheduleMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>,
|
||||
TError,
|
||||
{ graphId: string; data: ScheduleCreationRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>,
|
||||
TError,
|
||||
{ graphId: string; data: ScheduleCreationRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV1CreateExecutionSchedule"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>,
|
||||
{ graphId: string; data: ScheduleCreationRequest }
|
||||
> = (props) => {
|
||||
const { graphId, data } = props ?? {};
|
||||
|
||||
return postV1CreateExecutionSchedule(graphId, data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV1CreateExecutionScheduleMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>
|
||||
>;
|
||||
export type PostV1CreateExecutionScheduleMutationBody = ScheduleCreationRequest;
|
||||
export type PostV1CreateExecutionScheduleMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Create execution schedule
|
||||
*/
|
||||
export const usePostV1CreateExecutionSchedule = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>,
|
||||
TError,
|
||||
{ graphId: string; data: ScheduleCreationRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV1CreateExecutionSchedule>>,
|
||||
TError,
|
||||
{ graphId: string; data: ScheduleCreationRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getPostV1CreateExecutionScheduleMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
/**
|
||||
* @summary List execution schedules for a graph
|
||||
*/
|
||||
export type getV1ListExecutionSchedulesForAGraphResponse200 = {
|
||||
data: GraphExecutionJobInfo[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1ListExecutionSchedulesForAGraphResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type getV1ListExecutionSchedulesForAGraphResponseComposite =
|
||||
| getV1ListExecutionSchedulesForAGraphResponse200
|
||||
| getV1ListExecutionSchedulesForAGraphResponse422;
|
||||
|
||||
export type getV1ListExecutionSchedulesForAGraphResponse =
|
||||
getV1ListExecutionSchedulesForAGraphResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAGraphUrl = (graphId: string) => {
|
||||
return `/api/graphs/${graphId}/schedules`;
|
||||
};
|
||||
|
||||
export const getV1ListExecutionSchedulesForAGraph = async (
|
||||
graphId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<getV1ListExecutionSchedulesForAGraphResponse> => {
|
||||
return customMutator<getV1ListExecutionSchedulesForAGraphResponse>(
|
||||
getGetV1ListExecutionSchedulesForAGraphUrl(graphId),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAGraphQueryKey = (
|
||||
graphId?: string,
|
||||
) => {
|
||||
return [`/api/graphs/${graphId}/schedules`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAGraphQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
graphId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ??
|
||||
getGetV1ListExecutionSchedulesForAGraphQueryKey(graphId);
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>
|
||||
> = ({ signal }) =>
|
||||
getV1ListExecutionSchedulesForAGraph(graphId, {
|
||||
signal,
|
||||
...requestOptions,
|
||||
});
|
||||
|
||||
return {
|
||||
queryKey,
|
||||
queryFn,
|
||||
enabled: !!graphId,
|
||||
...queryOptions,
|
||||
} as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1ListExecutionSchedulesForAGraphQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>
|
||||
>;
|
||||
export type GetV1ListExecutionSchedulesForAGraphQueryError =
|
||||
HTTPValidationError;
|
||||
|
||||
export function useGetV1ListExecutionSchedulesForAGraph<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
graphId: string,
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListExecutionSchedulesForAGraph<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
graphId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListExecutionSchedulesForAGraph<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
graphId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List execution schedules for a graph
|
||||
*/
|
||||
|
||||
export function useGetV1ListExecutionSchedulesForAGraph<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
graphId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions = getGetV1ListExecutionSchedulesForAGraphQueryOptions(
|
||||
graphId,
|
||||
options,
|
||||
);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List execution schedules for a graph
|
||||
*/
|
||||
export const prefetchGetV1ListExecutionSchedulesForAGraphQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError = HTTPValidationError,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
graphId: string,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions = getGetV1ListExecutionSchedulesForAGraphQueryOptions(
|
||||
graphId,
|
||||
options,
|
||||
);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary List execution schedules for a user
|
||||
*/
|
||||
export type getV1ListExecutionSchedulesForAUserResponse200 = {
|
||||
data: GraphExecutionJobInfo[];
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type getV1ListExecutionSchedulesForAUserResponseComposite =
|
||||
getV1ListExecutionSchedulesForAUserResponse200;
|
||||
|
||||
export type getV1ListExecutionSchedulesForAUserResponse =
|
||||
getV1ListExecutionSchedulesForAUserResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAUserUrl = () => {
|
||||
return `/api/schedules`;
|
||||
};
|
||||
|
||||
export const getV1ListExecutionSchedulesForAUser = async (
|
||||
options?: RequestInit,
|
||||
): Promise<getV1ListExecutionSchedulesForAUserResponse> => {
|
||||
return customMutator<getV1ListExecutionSchedulesForAUserResponse>(
|
||||
getGetV1ListExecutionSchedulesForAUserUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "GET",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAUserQueryKey = () => {
|
||||
return [`/api/schedules`] as const;
|
||||
};
|
||||
|
||||
export const getGetV1ListExecutionSchedulesForAUserQueryOptions = <
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}) => {
|
||||
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||
|
||||
const queryKey =
|
||||
queryOptions?.queryKey ?? getGetV1ListExecutionSchedulesForAUserQueryKey();
|
||||
|
||||
const queryFn: QueryFunction<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>
|
||||
> = ({ signal }) =>
|
||||
getV1ListExecutionSchedulesForAUser({ signal, ...requestOptions });
|
||||
|
||||
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
};
|
||||
|
||||
export type GetV1ListExecutionSchedulesForAUserQueryResult = NonNullable<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>
|
||||
>;
|
||||
export type GetV1ListExecutionSchedulesForAUserQueryError = unknown;
|
||||
|
||||
export function useGetV1ListExecutionSchedulesForAUser<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options: {
|
||||
query: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
DefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): DefinedUseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListExecutionSchedulesForAUser<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
> &
|
||||
Pick<
|
||||
UndefinedInitialDataOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>
|
||||
>,
|
||||
"initialData"
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
export function useGetV1ListExecutionSchedulesForAUser<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
};
|
||||
/**
|
||||
* @summary List execution schedules for a user
|
||||
*/
|
||||
|
||||
export function useGetV1ListExecutionSchedulesForAUser<
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseQueryResult<TData, TError> & {
|
||||
queryKey: DataTag<QueryKey, TData, TError>;
|
||||
} {
|
||||
const queryOptions =
|
||||
getGetV1ListExecutionSchedulesForAUserQueryOptions(options);
|
||||
|
||||
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||
TData,
|
||||
TError
|
||||
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||
|
||||
query.queryKey = queryOptions.queryKey;
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
/**
|
||||
* @summary List execution schedules for a user
|
||||
*/
|
||||
export const prefetchGetV1ListExecutionSchedulesForAUserQuery = async <
|
||||
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError = unknown,
|
||||
>(
|
||||
queryClient: QueryClient,
|
||||
options?: {
|
||||
query?: Partial<
|
||||
UseQueryOptions<
|
||||
Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||
TError,
|
||||
TData
|
||||
>
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
): Promise<QueryClient> => {
|
||||
const queryOptions =
|
||||
getGetV1ListExecutionSchedulesForAUserQueryOptions(options);
|
||||
|
||||
await queryClient.prefetchQuery(queryOptions);
|
||||
|
||||
return queryClient;
|
||||
};
|
||||
|
||||
/**
|
||||
* @summary Delete execution schedule
|
||||
*/
|
||||
export type deleteV1DeleteExecutionScheduleResponse200 = {
|
||||
data: DeleteV1DeleteExecutionSchedule200;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type deleteV1DeleteExecutionScheduleResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type deleteV1DeleteExecutionScheduleResponseComposite =
|
||||
| deleteV1DeleteExecutionScheduleResponse200
|
||||
| deleteV1DeleteExecutionScheduleResponse422;
|
||||
|
||||
export type deleteV1DeleteExecutionScheduleResponse =
|
||||
deleteV1DeleteExecutionScheduleResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getDeleteV1DeleteExecutionScheduleUrl = (scheduleId: string) => {
|
||||
return `/api/schedules/${scheduleId}`;
|
||||
};
|
||||
|
||||
export const deleteV1DeleteExecutionSchedule = async (
|
||||
scheduleId: string,
|
||||
options?: RequestInit,
|
||||
): Promise<deleteV1DeleteExecutionScheduleResponse> => {
|
||||
return customMutator<deleteV1DeleteExecutionScheduleResponse>(
|
||||
getDeleteV1DeleteExecutionScheduleUrl(scheduleId),
|
||||
{
|
||||
...options,
|
||||
method: "DELETE",
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getDeleteV1DeleteExecutionScheduleMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>,
|
||||
TError,
|
||||
{ scheduleId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>,
|
||||
TError,
|
||||
{ scheduleId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["deleteV1DeleteExecutionSchedule"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>,
|
||||
{ scheduleId: string }
|
||||
> = (props) => {
|
||||
const { scheduleId } = props ?? {};
|
||||
|
||||
return deleteV1DeleteExecutionSchedule(scheduleId, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type DeleteV1DeleteExecutionScheduleMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>
|
||||
>;
|
||||
|
||||
export type DeleteV1DeleteExecutionScheduleMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Delete execution schedule
|
||||
*/
|
||||
export const useDeleteV1DeleteExecutionSchedule = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>,
|
||||
TError,
|
||||
{ scheduleId: string },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof deleteV1DeleteExecutionSchedule>>,
|
||||
TError,
|
||||
{ scheduleId: string },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions =
|
||||
getDeleteV1DeleteExecutionScheduleMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import type {
|
||||
MutationFunction,
|
||||
QueryClient,
|
||||
UseMutationOptions,
|
||||
UseMutationResult,
|
||||
} from "@tanstack/react-query";
|
||||
|
||||
import type { HTTPValidationError } from "../../models/hTTPValidationError";
|
||||
|
||||
import type { TurnstileVerifyRequest } from "../../models/turnstileVerifyRequest";
|
||||
|
||||
import type { TurnstileVerifyResponse } from "../../models/turnstileVerifyResponse";
|
||||
|
||||
import { customMutator } from "../../../mutators/custom-mutator";
|
||||
|
||||
type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
|
||||
|
||||
/**
|
||||
* Verify a Cloudflare Turnstile token.
|
||||
This endpoint verifies a token returned by the Cloudflare Turnstile challenge
|
||||
on the client side. It returns whether the verification was successful.
|
||||
* @summary Verify Turnstile Token
|
||||
*/
|
||||
export type postV2VerifyTurnstileTokenResponse200 = {
|
||||
data: TurnstileVerifyResponse;
|
||||
status: 200;
|
||||
};
|
||||
|
||||
export type postV2VerifyTurnstileTokenResponse422 = {
|
||||
data: HTTPValidationError;
|
||||
status: 422;
|
||||
};
|
||||
|
||||
export type postV2VerifyTurnstileTokenResponseComposite =
|
||||
| postV2VerifyTurnstileTokenResponse200
|
||||
| postV2VerifyTurnstileTokenResponse422;
|
||||
|
||||
export type postV2VerifyTurnstileTokenResponse =
|
||||
postV2VerifyTurnstileTokenResponseComposite & {
|
||||
headers: Headers;
|
||||
};
|
||||
|
||||
export const getPostV2VerifyTurnstileTokenUrl = () => {
|
||||
return `/api/turnstile/verify`;
|
||||
};
|
||||
|
||||
export const postV2VerifyTurnstileToken = async (
|
||||
turnstileVerifyRequest: TurnstileVerifyRequest,
|
||||
options?: RequestInit,
|
||||
): Promise<postV2VerifyTurnstileTokenResponse> => {
|
||||
return customMutator<postV2VerifyTurnstileTokenResponse>(
|
||||
getPostV2VerifyTurnstileTokenUrl(),
|
||||
{
|
||||
...options,
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||
body: JSON.stringify(turnstileVerifyRequest),
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
export const getPostV2VerifyTurnstileTokenMutationOptions = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>,
|
||||
TError,
|
||||
{ data: TurnstileVerifyRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
}): UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>,
|
||||
TError,
|
||||
{ data: TurnstileVerifyRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationKey = ["postV2VerifyTurnstileToken"];
|
||||
const { mutation: mutationOptions, request: requestOptions } = options
|
||||
? options.mutation &&
|
||||
"mutationKey" in options.mutation &&
|
||||
options.mutation.mutationKey
|
||||
? options
|
||||
: { ...options, mutation: { ...options.mutation, mutationKey } }
|
||||
: { mutation: { mutationKey }, request: undefined };
|
||||
|
||||
const mutationFn: MutationFunction<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>,
|
||||
{ data: TurnstileVerifyRequest }
|
||||
> = (props) => {
|
||||
const { data } = props ?? {};
|
||||
|
||||
return postV2VerifyTurnstileToken(data, requestOptions);
|
||||
};
|
||||
|
||||
return { mutationFn, ...mutationOptions };
|
||||
};
|
||||
|
||||
export type PostV2VerifyTurnstileTokenMutationResult = NonNullable<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>
|
||||
>;
|
||||
export type PostV2VerifyTurnstileTokenMutationBody = TurnstileVerifyRequest;
|
||||
export type PostV2VerifyTurnstileTokenMutationError = HTTPValidationError;
|
||||
|
||||
/**
|
||||
* @summary Verify Turnstile Token
|
||||
*/
|
||||
export const usePostV2VerifyTurnstileToken = <
|
||||
TError = HTTPValidationError,
|
||||
TContext = unknown,
|
||||
>(
|
||||
options?: {
|
||||
mutation?: UseMutationOptions<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>,
|
||||
TError,
|
||||
{ data: TurnstileVerifyRequest },
|
||||
TContext
|
||||
>;
|
||||
request?: SecondParameter<typeof customMutator>;
|
||||
},
|
||||
queryClient?: QueryClient,
|
||||
): UseMutationResult<
|
||||
Awaited<ReturnType<typeof postV2VerifyTurnstileToken>>,
|
||||
TError,
|
||||
{ data: TurnstileVerifyRequest },
|
||||
TContext
|
||||
> => {
|
||||
const mutationOptions = getPostV2VerifyTurnstileTokenMutationOptions(options);
|
||||
|
||||
return useMutation(mutationOptions, queryClient);
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { APIKeyCredentialsTitle } from "./aPIKeyCredentialsTitle";
|
||||
import type { APIKeyCredentialsExpiresAt } from "./aPIKeyCredentialsExpiresAt";
|
||||
|
||||
export interface APIKeyCredentials {
|
||||
id?: string;
|
||||
provider: string;
|
||||
title?: APIKeyCredentialsTitle;
|
||||
type?: "api_key";
|
||||
api_key: string;
|
||||
/** Unix timestamp (seconds) indicating when the API key expires (if at all) */
|
||||
expires_at?: APIKeyCredentialsExpiresAt;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Unix timestamp (seconds) indicating when the API key expires (if at all)
|
||||
*/
|
||||
export type APIKeyCredentialsExpiresAt = number | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyCredentialsTitle = string | null;
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyPermission =
|
||||
(typeof APIKeyPermission)[keyof typeof APIKeyPermission];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const APIKeyPermission = {
|
||||
EXECUTE_GRAPH: "EXECUTE_GRAPH",
|
||||
READ_GRAPH: "READ_GRAPH",
|
||||
EXECUTE_BLOCK: "EXECUTE_BLOCK",
|
||||
READ_BLOCK: "READ_BLOCK",
|
||||
} as const;
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyStatus = (typeof APIKeyStatus)[keyof typeof APIKeyStatus];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const APIKeyStatus = {
|
||||
ACTIVE: "ACTIVE",
|
||||
REVOKED: "REVOKED",
|
||||
SUSPENDED: "SUSPENDED",
|
||||
} as const;
|
||||
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { APIKeyStatus } from "./aPIKeyStatus";
|
||||
import type { APIKeyPermission } from "./aPIKeyPermission";
|
||||
import type { APIKeyWithoutHashLastUsedAt } from "./aPIKeyWithoutHashLastUsedAt";
|
||||
import type { APIKeyWithoutHashRevokedAt } from "./aPIKeyWithoutHashRevokedAt";
|
||||
import type { APIKeyWithoutHashDescription } from "./aPIKeyWithoutHashDescription";
|
||||
|
||||
export interface APIKeyWithoutHash {
|
||||
id: string;
|
||||
name: string;
|
||||
prefix: string;
|
||||
postfix: string;
|
||||
status: APIKeyStatus;
|
||||
permissions: APIKeyPermission[];
|
||||
created_at: string;
|
||||
last_used_at: APIKeyWithoutHashLastUsedAt;
|
||||
revoked_at: APIKeyWithoutHashRevokedAt;
|
||||
description: APIKeyWithoutHashDescription;
|
||||
user_id: string;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyWithoutHashDescription = string | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyWithoutHashLastUsedAt = string | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type APIKeyWithoutHashRevokedAt = string | null;
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface AddUserCreditsResponse {
|
||||
new_balance: number;
|
||||
transaction_key: string;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type AgentExecutionStatus =
|
||||
(typeof AgentExecutionStatus)[keyof typeof AgentExecutionStatus];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const AgentExecutionStatus = {
|
||||
INCOMPLETE: "INCOMPLETE",
|
||||
QUEUED: "QUEUED",
|
||||
RUNNING: "RUNNING",
|
||||
COMPLETED: "COMPLETED",
|
||||
TERMINATED: "TERMINATED",
|
||||
FAILED: "FAILED",
|
||||
} as const;
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Document } from "./document";
|
||||
|
||||
export interface ApiResponse {
|
||||
answer: string;
|
||||
documents: Document[];
|
||||
success: boolean;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface AutoTopUpConfig {
|
||||
amount: number;
|
||||
threshold: number;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface AyrshareSSOResponse {
|
||||
/** The SSO URL for Ayrshare integration */
|
||||
sso_url: string;
|
||||
/** ISO timestamp when the URL expires */
|
||||
expires_at: string;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Node } from "./node";
|
||||
import type { Link } from "./link";
|
||||
import type { BaseGraphInputForkedFromId } from "./baseGraphInputForkedFromId";
|
||||
import type { BaseGraphInputForkedFromVersion } from "./baseGraphInputForkedFromVersion";
|
||||
|
||||
export interface BaseGraphInput {
|
||||
id?: string;
|
||||
version?: number;
|
||||
is_active?: boolean;
|
||||
name: string;
|
||||
description: string;
|
||||
nodes?: Node[];
|
||||
links?: Link[];
|
||||
forked_from_id?: BaseGraphInputForkedFromId;
|
||||
forked_from_version?: BaseGraphInputForkedFromVersion;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphInputForkedFromId = string | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphInputForkedFromVersion = number | null;
|
||||
@@ -1,28 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Node } from "./node";
|
||||
import type { Link } from "./link";
|
||||
import type { BaseGraphOutputForkedFromId } from "./baseGraphOutputForkedFromId";
|
||||
import type { BaseGraphOutputForkedFromVersion } from "./baseGraphOutputForkedFromVersion";
|
||||
import type { BaseGraphOutputInputSchema } from "./baseGraphOutputInputSchema";
|
||||
import type { BaseGraphOutputOutputSchema } from "./baseGraphOutputOutputSchema";
|
||||
|
||||
export interface BaseGraphOutput {
|
||||
id?: string;
|
||||
version?: number;
|
||||
is_active?: boolean;
|
||||
name: string;
|
||||
description: string;
|
||||
nodes?: Node[];
|
||||
links?: Link[];
|
||||
forked_from_id?: BaseGraphOutputForkedFromId;
|
||||
forked_from_version?: BaseGraphOutputForkedFromVersion;
|
||||
readonly input_schema: BaseGraphOutputInputSchema;
|
||||
readonly output_schema: BaseGraphOutputOutputSchema;
|
||||
readonly has_external_trigger: boolean;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphOutputForkedFromId = string | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphOutputForkedFromVersion = number | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphOutputInputSchema = { [key: string]: unknown };
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BaseGraphOutputOutputSchema = { [key: string]: unknown };
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface BodyPostV1Callback {
|
||||
code: string;
|
||||
state_token: string;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { BodyPostV1ExecuteGraphAgentInputs } from "./bodyPostV1ExecuteGraphAgentInputs";
|
||||
import type { BodyPostV1ExecuteGraphAgentCredentialsInputs } from "./bodyPostV1ExecuteGraphAgentCredentialsInputs";
|
||||
|
||||
export interface BodyPostV1ExecuteGraphAgent {
|
||||
inputs?: BodyPostV1ExecuteGraphAgentInputs;
|
||||
credentials_inputs?: BodyPostV1ExecuteGraphAgentCredentialsInputs;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { CredentialsMetaInput } from "./credentialsMetaInput";
|
||||
|
||||
export type BodyPostV1ExecuteGraphAgentCredentialsInputs = {
|
||||
[key: string]: CredentialsMetaInput;
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BodyPostV1ExecuteGraphAgentInputs = { [key: string]: unknown };
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { BodyPostV1LogRawAnalyticsData } from "./bodyPostV1LogRawAnalyticsData";
|
||||
|
||||
export interface BodyPostV1LogRawAnalytics {
|
||||
type: string;
|
||||
/** The data to log */
|
||||
data: BodyPostV1LogRawAnalyticsData;
|
||||
/** Indexable field for any count based analytical measures like page order clicking, tutorial step completion, etc. */
|
||||
data_index: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* The data to log
|
||||
*/
|
||||
export type BodyPostV1LogRawAnalyticsData = { [key: string]: unknown };
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface BodyPostV1UploadFileToCloudStorage {
|
||||
file: Blob;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface BodyPostV2AddCreditsToUser {
|
||||
user_id: string;
|
||||
amount: number;
|
||||
comments: string;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface BodyPostV2AddMarketplaceAgent {
|
||||
store_listing_version_id: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { BodyPostV2ExecuteAPresetInputs } from "./bodyPostV2ExecuteAPresetInputs";
|
||||
|
||||
export interface BodyPostV2ExecuteAPreset {
|
||||
inputs?: BodyPostV2ExecuteAPresetInputs;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type BodyPostV2ExecuteAPresetInputs = { [key: string]: unknown };
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface BodyPostV2UploadSubmissionMedia {
|
||||
file: Blob;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Message } from "./message";
|
||||
import type { ChatRequestGraphId } from "./chatRequestGraphId";
|
||||
|
||||
export interface ChatRequest {
|
||||
query: string;
|
||||
conversation_history: Message[];
|
||||
message_id: string;
|
||||
include_graph_data?: boolean;
|
||||
graph_id?: ChatRequestGraphId;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type ChatRequestGraphId = string | null;
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { APIKeyPermission } from "./aPIKeyPermission";
|
||||
import type { CreateAPIKeyRequestDescription } from "./createAPIKeyRequestDescription";
|
||||
|
||||
export interface CreateAPIKeyRequest {
|
||||
name: string;
|
||||
permissions: APIKeyPermission[];
|
||||
description?: CreateAPIKeyRequestDescription;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CreateAPIKeyRequestDescription = string | null;
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { APIKeyWithoutHash } from "./aPIKeyWithoutHash";
|
||||
|
||||
export interface CreateAPIKeyResponse {
|
||||
api_key: APIKeyWithoutHash;
|
||||
plain_text_key: string;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Graph } from "./graph";
|
||||
|
||||
export interface CreateGraph {
|
||||
graph: Graph;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface Creator {
|
||||
name: string;
|
||||
username: string;
|
||||
description: string;
|
||||
avatar_url: string;
|
||||
num_agents: number;
|
||||
agent_rating: number;
|
||||
agent_runs: number;
|
||||
is_featured: boolean;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface CreatorDetails {
|
||||
name: string;
|
||||
username: string;
|
||||
description: string;
|
||||
links: string[];
|
||||
avatar_url: string;
|
||||
agent_rating: number;
|
||||
agent_runs: number;
|
||||
top_categories: string[];
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { Creator } from "./creator";
|
||||
import type { Pagination } from "./pagination";
|
||||
|
||||
export interface CreatorsResponse {
|
||||
creators: Creator[];
|
||||
pagination: Pagination;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface CredentialsDeletionNeedsConfirmationResponse {
|
||||
deleted?: false;
|
||||
need_confirmation?: true;
|
||||
message: string;
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { CredentialsDeletionResponseRevoked } from "./credentialsDeletionResponseRevoked";
|
||||
|
||||
export interface CredentialsDeletionResponse {
|
||||
deleted?: true;
|
||||
/** Indicates whether the credentials were also revoked by their provider. `None`/`null` if not applicable, e.g. when deleting non-revocable credentials such as API keys. */
|
||||
revoked: CredentialsDeletionResponseRevoked;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Indicates whether the credentials were also revoked by their provider. `None`/`null` if not applicable, e.g. when deleting non-revocable credentials such as API keys.
|
||||
*/
|
||||
export type CredentialsDeletionResponseRevoked = boolean | null;
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { CredentialsMetaInputTitle } from "./credentialsMetaInputTitle";
|
||||
import type { CredentialsMetaInputType } from "./credentialsMetaInputType";
|
||||
|
||||
export interface CredentialsMetaInput {
|
||||
id: string;
|
||||
title?: CredentialsMetaInputTitle;
|
||||
/** Provider name for integrations. Can be any string value, including custom provider names. */
|
||||
provider: string;
|
||||
type: CredentialsMetaInputType;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaInputTitle = string | null;
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaInputType =
|
||||
(typeof CredentialsMetaInputType)[keyof typeof CredentialsMetaInputType];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const CredentialsMetaInputType = {
|
||||
api_key: "api_key",
|
||||
oauth2: "oauth2",
|
||||
user_password: "user_password",
|
||||
host_scoped: "host_scoped",
|
||||
} as const;
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { CredentialsMetaResponseType } from "./credentialsMetaResponseType";
|
||||
import type { CredentialsMetaResponseTitle } from "./credentialsMetaResponseTitle";
|
||||
import type { CredentialsMetaResponseScopes } from "./credentialsMetaResponseScopes";
|
||||
import type { CredentialsMetaResponseUsername } from "./credentialsMetaResponseUsername";
|
||||
import type { CredentialsMetaResponseHost } from "./credentialsMetaResponseHost";
|
||||
|
||||
export interface CredentialsMetaResponse {
|
||||
id: string;
|
||||
provider: string;
|
||||
type: CredentialsMetaResponseType;
|
||||
title: CredentialsMetaResponseTitle;
|
||||
scopes: CredentialsMetaResponseScopes;
|
||||
username: CredentialsMetaResponseUsername;
|
||||
/** Host pattern for host-scoped credentials */
|
||||
host?: CredentialsMetaResponseHost;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* Host pattern for host-scoped credentials
|
||||
*/
|
||||
export type CredentialsMetaResponseHost = string | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaResponseScopes = string[] | null;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaResponseTitle = string | null;
|
||||
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaResponseType =
|
||||
(typeof CredentialsMetaResponseType)[keyof typeof CredentialsMetaResponseType];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const CredentialsMetaResponseType = {
|
||||
api_key: "api_key",
|
||||
oauth2: "oauth2",
|
||||
user_password: "user_password",
|
||||
host_scoped: "host_scoped",
|
||||
} as const;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CredentialsMetaResponseUsername = string | null;
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type CreditTransactionType =
|
||||
(typeof CreditTransactionType)[keyof typeof CreditTransactionType];
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||
export const CreditTransactionType = {
|
||||
TOP_UP: "TOP_UP",
|
||||
USAGE: "USAGE",
|
||||
GRANT: "GRANT",
|
||||
REFUND: "REFUND",
|
||||
CARD_CHECK: "CARD_CHECK",
|
||||
} as const;
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface DeleteGraphResponse {
|
||||
version_counts: number;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { CredentialsDeletionResponse } from "./credentialsDeletionResponse";
|
||||
import type { CredentialsDeletionNeedsConfirmationResponse } from "./credentialsDeletionNeedsConfirmationResponse";
|
||||
|
||||
export type DeleteV1DeleteCredentials200 =
|
||||
| CredentialsDeletionResponse
|
||||
| CredentialsDeletionNeedsConfirmationResponse;
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type DeleteV1DeleteCredentialsParams = {
|
||||
force?: boolean;
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type DeleteV1DeleteExecutionSchedule200 = { [key: string]: unknown };
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface Document {
|
||||
url: string;
|
||||
relevance_score: number;
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export interface ExecuteGraphResponse {
|
||||
graph_exec_id: string;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { OAuth2Credentials } from "./oAuth2Credentials";
|
||||
import type { APIKeyCredentials } from "./aPIKeyCredentials";
|
||||
import type { UserPasswordCredentials } from "./userPasswordCredentials";
|
||||
import type { HostScopedCredentialsOutput } from "./hostScopedCredentialsOutput";
|
||||
|
||||
export type GetV1GetCredential200 =
|
||||
| OAuth2Credentials
|
||||
| APIKeyCredentials
|
||||
| UserPasswordCredentials
|
||||
| HostScopedCredentialsOutput;
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1GetCreditHistoryParams = {
|
||||
transaction_time?: string | null;
|
||||
transaction_type?: string | null;
|
||||
transaction_count_limit?: number;
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { GraphExecution } from "./graphExecution";
|
||||
import type { GraphExecutionWithNodes } from "./graphExecutionWithNodes";
|
||||
|
||||
export type GetV1GetExecutionDetails200 =
|
||||
| GraphExecution
|
||||
| GraphExecutionWithNodes;
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1GetGraphVersionParams = {
|
||||
for_export?: boolean;
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1GetSpecificGraphParams = {
|
||||
version?: number | null;
|
||||
for_export?: boolean;
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1GetUserCredits200 = { [key: string]: number };
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1ListAvailableBlocks200Item = { [key: string]: unknown };
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
import type { APIKeyWithoutHash } from "./aPIKeyWithoutHash";
|
||||
import type { GetV1ListUserApiKeys200AnyOf } from "./getV1ListUserApiKeys200AnyOf";
|
||||
|
||||
export type GetV1ListUserApiKeys200 =
|
||||
| APIKeyWithoutHash[]
|
||||
| GetV1ListUserApiKeys200AnyOf;
|
||||
@@ -1,9 +0,0 @@
|
||||
/**
|
||||
* Generated by orval v7.11.2 🍺
|
||||
* Do not edit manually.
|
||||
* AutoGPT Agent Server
|
||||
* This server is used to execute agents that are created by the AutoGPT system.
|
||||
* OpenAPI spec version: 0.1
|
||||
*/
|
||||
|
||||
export type GetV1ListUserApiKeys200AnyOf = { [key: string]: string };
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user