mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-20 04:28:09 -05:00
Compare commits
1 Commits
fix/undefi
...
chore/gene
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ccac6881a |
5
autogpt_platform/frontend/.gitignore
vendored
5
autogpt_platform/frontend/.gitignore
vendored
@@ -54,7 +54,4 @@ storybook-static
|
|||||||
*.ignore.*
|
*.ignore.*
|
||||||
*.ign.*
|
*.ign.*
|
||||||
!.npmrc
|
!.npmrc
|
||||||
.cursorrules
|
.cursorrules
|
||||||
|
|
||||||
# Generated API files
|
|
||||||
src/app/api/__generated__/
|
|
||||||
1060
autogpt_platform/frontend/src/app/api/__generated__/endpoints/admin/admin.ts
generated
Normal file
1060
autogpt_platform/frontend/src/app/api/__generated__/endpoints/admin/admin.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
263
autogpt_platform/frontend/src/app/api/__generated__/endpoints/analytics/analytics.ts
generated
Normal file
263
autogpt_platform/frontend/src/app/api/__generated__/endpoints/analytics/analytics.ts
generated
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 postV1LogRawMetricResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1LogRawMetricResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1LogRawMetricResponseComposite =
|
||||||
|
| postV1LogRawMetricResponse200
|
||||||
|
| postV1LogRawMetricResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Log Raw Metric
|
||||||
|
*/
|
||||||
|
export const usePostV1LogRawMetric = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 postV1LogRawAnalyticsResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1LogRawAnalyticsResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1LogRawAnalyticsResponseComposite =
|
||||||
|
| postV1LogRawAnalyticsResponse200
|
||||||
|
| postV1LogRawAnalyticsResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Log Raw Analytics
|
||||||
|
*/
|
||||||
|
export const usePostV1LogRawAnalytics = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
959
autogpt_platform/frontend/src/app/api/__generated__/endpoints/api-keys/api-keys.ts
generated
Normal file
959
autogpt_platform/frontend/src/app/api/__generated__/endpoints/api-keys/api-keys.ts
generated
Normal file
@@ -0,0 +1,959 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 getV1ListUserApiKeysResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1ListUserApiKeysResponseComposite =
|
||||||
|
| getV1ListUserApiKeysResponse200
|
||||||
|
| getV1ListUserApiKeysResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1ListUserApiKeys<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1ListUserApiKeys>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 postV1CreateNewApiKeyResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1CreateNewApiKeyResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1CreateNewApiKeyResponseComposite =
|
||||||
|
| postV1CreateNewApiKeyResponse200
|
||||||
|
| postV1CreateNewApiKeyResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Create new API key
|
||||||
|
*/
|
||||||
|
export const usePostV1CreateNewApiKey = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 getV1GetSpecificApiKeyResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetSpecificApiKeyResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetSpecificApiKeyResponseComposite =
|
||||||
|
| getV1GetSpecificApiKeyResponse200
|
||||||
|
| getV1GetSpecificApiKeyResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
export function useGetV1GetSpecificApiKey<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetSpecificApiKey>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 deleteV1RevokeApiKeyResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type deleteV1RevokeApiKeyResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type deleteV1RevokeApiKeyResponseComposite =
|
||||||
|
| deleteV1RevokeApiKeyResponse200
|
||||||
|
| deleteV1RevokeApiKeyResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Revoke API key
|
||||||
|
*/
|
||||||
|
export const useDeleteV1RevokeApiKey = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 postV1SuspendApiKeyResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1SuspendApiKeyResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1SuspendApiKeyResponseComposite =
|
||||||
|
| postV1SuspendApiKeyResponse200
|
||||||
|
| postV1SuspendApiKeyResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Suspend API key
|
||||||
|
*/
|
||||||
|
export const usePostV1SuspendApiKey = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 putV1UpdateKeyPermissionsResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type putV1UpdateKeyPermissionsResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type putV1UpdateKeyPermissionsResponseComposite =
|
||||||
|
| putV1UpdateKeyPermissionsResponse200
|
||||||
|
| putV1UpdateKeyPermissionsResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Update key permissions
|
||||||
|
*/
|
||||||
|
export const usePutV1UpdateKeyPermissions = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
927
autogpt_platform/frontend/src/app/api/__generated__/endpoints/auth/auth.ts
generated
Normal file
927
autogpt_platform/frontend/src/app/api/__generated__/endpoints/auth/auth.ts
generated
Normal file
@@ -0,0 +1,927 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 type { TimezoneResponse } from "../../models/timezoneResponse";
|
||||||
|
|
||||||
|
import type { UpdateTimezoneRequest } from "../../models/updateTimezoneRequest";
|
||||||
|
|
||||||
|
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 postV1GetOrCreateUserResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1GetOrCreateUserResponseComposite =
|
||||||
|
| postV1GetOrCreateUserResponse200
|
||||||
|
| postV1GetOrCreateUserResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Get or create user
|
||||||
|
*/
|
||||||
|
export const usePostV1GetOrCreateUser = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
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 postV1UpdateUserEmailResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateUserEmailResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateUserEmailResponseComposite =
|
||||||
|
| postV1UpdateUserEmailResponse200
|
||||||
|
| postV1UpdateUserEmailResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Update user email
|
||||||
|
*/
|
||||||
|
export const usePostV1UpdateUserEmail = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Get user timezone setting.
|
||||||
|
* @summary Get user timezone
|
||||||
|
*/
|
||||||
|
export type getV1GetUserTimezoneResponse200 = {
|
||||||
|
data: TimezoneResponse;
|
||||||
|
status: 200;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetUserTimezoneResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetUserTimezoneResponseComposite =
|
||||||
|
| getV1GetUserTimezoneResponse200
|
||||||
|
| getV1GetUserTimezoneResponse401;
|
||||||
|
|
||||||
|
export type getV1GetUserTimezoneResponse =
|
||||||
|
getV1GetUserTimezoneResponseComposite & {
|
||||||
|
headers: Headers;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getGetV1GetUserTimezoneUrl = () => {
|
||||||
|
return `/api/auth/user/timezone`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getV1GetUserTimezone = async (
|
||||||
|
options?: RequestInit,
|
||||||
|
): Promise<getV1GetUserTimezoneResponse> => {
|
||||||
|
return customMutator<getV1GetUserTimezoneResponse>(
|
||||||
|
getGetV1GetUserTimezoneUrl(),
|
||||||
|
{
|
||||||
|
...options,
|
||||||
|
method: "GET",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getGetV1GetUserTimezoneQueryKey = () => {
|
||||||
|
return [`/api/auth/user/timezone`] as const;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getGetV1GetUserTimezoneQueryOptions = <
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(options?: {
|
||||||
|
query?: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
}) => {
|
||||||
|
const { query: queryOptions, request: requestOptions } = options ?? {};
|
||||||
|
|
||||||
|
const queryKey = queryOptions?.queryKey ?? getGetV1GetUserTimezoneQueryKey();
|
||||||
|
|
||||||
|
const queryFn: QueryFunction<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>
|
||||||
|
> = ({ signal }) => getV1GetUserTimezone({ signal, ...requestOptions });
|
||||||
|
|
||||||
|
return { queryKey, queryFn, ...queryOptions } as UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
|
};
|
||||||
|
|
||||||
|
export type GetV1GetUserTimezoneQueryResult = NonNullable<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>
|
||||||
|
>;
|
||||||
|
export type GetV1GetUserTimezoneQueryError =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1GetUserTimezone<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
options: {
|
||||||
|
query: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
> &
|
||||||
|
Pick<
|
||||||
|
DefinedInitialDataOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>
|
||||||
|
>,
|
||||||
|
"initialData"
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
queryClient?: QueryClient,
|
||||||
|
): DefinedUseQueryResult<TData, TError> & {
|
||||||
|
queryKey: DataTag<QueryKey, TData, TError>;
|
||||||
|
};
|
||||||
|
export function useGetV1GetUserTimezone<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
options?: {
|
||||||
|
query?: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
> &
|
||||||
|
Pick<
|
||||||
|
UndefinedInitialDataOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>
|
||||||
|
>,
|
||||||
|
"initialData"
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
queryClient?: QueryClient,
|
||||||
|
): UseQueryResult<TData, TError> & {
|
||||||
|
queryKey: DataTag<QueryKey, TData, TError>;
|
||||||
|
};
|
||||||
|
export function useGetV1GetUserTimezone<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
options?: {
|
||||||
|
query?: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
queryClient?: QueryClient,
|
||||||
|
): UseQueryResult<TData, TError> & {
|
||||||
|
queryKey: DataTag<QueryKey, TData, TError>;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @summary Get user timezone
|
||||||
|
*/
|
||||||
|
|
||||||
|
export function useGetV1GetUserTimezone<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
options?: {
|
||||||
|
query?: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
queryClient?: QueryClient,
|
||||||
|
): UseQueryResult<TData, TError> & {
|
||||||
|
queryKey: DataTag<QueryKey, TData, TError>;
|
||||||
|
} {
|
||||||
|
const queryOptions = getGetV1GetUserTimezoneQueryOptions(options);
|
||||||
|
|
||||||
|
const query = useQuery(queryOptions, queryClient) as UseQueryResult<
|
||||||
|
TData,
|
||||||
|
TError
|
||||||
|
> & { queryKey: DataTag<QueryKey, TData, TError> };
|
||||||
|
|
||||||
|
query.queryKey = queryOptions.queryKey;
|
||||||
|
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Get user timezone
|
||||||
|
*/
|
||||||
|
export const prefetchGetV1GetUserTimezoneQuery = async <
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
queryClient: QueryClient,
|
||||||
|
options?: {
|
||||||
|
query?: Partial<
|
||||||
|
UseQueryOptions<
|
||||||
|
Awaited<ReturnType<typeof getV1GetUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
TData
|
||||||
|
>
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
): Promise<QueryClient> => {
|
||||||
|
const queryOptions = getGetV1GetUserTimezoneQueryOptions(options);
|
||||||
|
|
||||||
|
await queryClient.prefetchQuery(queryOptions);
|
||||||
|
|
||||||
|
return queryClient;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update user timezone. The timezone should be a valid IANA timezone identifier.
|
||||||
|
* @summary Update user timezone
|
||||||
|
*/
|
||||||
|
export type postV1UpdateUserTimezoneResponse200 = {
|
||||||
|
data: TimezoneResponse;
|
||||||
|
status: 200;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateUserTimezoneResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateUserTimezoneResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateUserTimezoneResponseComposite =
|
||||||
|
| postV1UpdateUserTimezoneResponse200
|
||||||
|
| postV1UpdateUserTimezoneResponse401
|
||||||
|
| postV1UpdateUserTimezoneResponse422;
|
||||||
|
|
||||||
|
export type postV1UpdateUserTimezoneResponse =
|
||||||
|
postV1UpdateUserTimezoneResponseComposite & {
|
||||||
|
headers: Headers;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getPostV1UpdateUserTimezoneUrl = () => {
|
||||||
|
return `/api/auth/user/timezone`;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const postV1UpdateUserTimezone = async (
|
||||||
|
updateTimezoneRequest: UpdateTimezoneRequest,
|
||||||
|
options?: RequestInit,
|
||||||
|
): Promise<postV1UpdateUserTimezoneResponse> => {
|
||||||
|
return customMutator<postV1UpdateUserTimezoneResponse>(
|
||||||
|
getPostV1UpdateUserTimezoneUrl(),
|
||||||
|
{
|
||||||
|
...options,
|
||||||
|
method: "POST",
|
||||||
|
headers: { "Content-Type": "application/json", ...options?.headers },
|
||||||
|
body: JSON.stringify(updateTimezoneRequest),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getPostV1UpdateUserTimezoneMutationOptions = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | HTTPValidationError,
|
||||||
|
TContext = unknown,
|
||||||
|
>(options?: {
|
||||||
|
mutation?: UseMutationOptions<
|
||||||
|
Awaited<ReturnType<typeof postV1UpdateUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
{ data: UpdateTimezoneRequest },
|
||||||
|
TContext
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
}): UseMutationOptions<
|
||||||
|
Awaited<ReturnType<typeof postV1UpdateUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
{ data: UpdateTimezoneRequest },
|
||||||
|
TContext
|
||||||
|
> => {
|
||||||
|
const mutationKey = ["postV1UpdateUserTimezone"];
|
||||||
|
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 postV1UpdateUserTimezone>>,
|
||||||
|
{ data: UpdateTimezoneRequest }
|
||||||
|
> = (props) => {
|
||||||
|
const { data } = props ?? {};
|
||||||
|
|
||||||
|
return postV1UpdateUserTimezone(data, requestOptions);
|
||||||
|
};
|
||||||
|
|
||||||
|
return { mutationFn, ...mutationOptions };
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PostV1UpdateUserTimezoneMutationResult = NonNullable<
|
||||||
|
Awaited<ReturnType<typeof postV1UpdateUserTimezone>>
|
||||||
|
>;
|
||||||
|
export type PostV1UpdateUserTimezoneMutationBody = UpdateTimezoneRequest;
|
||||||
|
export type PostV1UpdateUserTimezoneMutationError =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Update user timezone
|
||||||
|
*/
|
||||||
|
export const usePostV1UpdateUserTimezone = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | HTTPValidationError,
|
||||||
|
TContext = unknown,
|
||||||
|
>(
|
||||||
|
options?: {
|
||||||
|
mutation?: UseMutationOptions<
|
||||||
|
Awaited<ReturnType<typeof postV1UpdateUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
{ data: UpdateTimezoneRequest },
|
||||||
|
TContext
|
||||||
|
>;
|
||||||
|
request?: SecondParameter<typeof customMutator>;
|
||||||
|
},
|
||||||
|
queryClient?: QueryClient,
|
||||||
|
): UseMutationResult<
|
||||||
|
Awaited<ReturnType<typeof postV1UpdateUserTimezone>>,
|
||||||
|
TError,
|
||||||
|
{ data: UpdateTimezoneRequest },
|
||||||
|
TContext
|
||||||
|
> => {
|
||||||
|
const mutationOptions = getPostV1UpdateUserTimezoneMutationOptions(options);
|
||||||
|
|
||||||
|
return useMutation(mutationOptions, queryClient);
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* @summary Get notification preferences
|
||||||
|
*/
|
||||||
|
export type getV1GetNotificationPreferencesResponse200 = {
|
||||||
|
data: NotificationPreference;
|
||||||
|
status: 200;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetNotificationPreferencesResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetNotificationPreferencesResponseComposite =
|
||||||
|
| getV1GetNotificationPreferencesResponse200
|
||||||
|
| getV1GetNotificationPreferencesResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1GetNotificationPreferences<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetNotificationPreferences>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 postV1UpdateNotificationPreferencesResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateNotificationPreferencesResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UpdateNotificationPreferencesResponseComposite =
|
||||||
|
| postV1UpdateNotificationPreferencesResponse200
|
||||||
|
| postV1UpdateNotificationPreferencesResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Update notification preferences
|
||||||
|
*/
|
||||||
|
export const usePostV1UpdateNotificationPreferences = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
365
autogpt_platform/frontend/src/app/api/__generated__/endpoints/blocks/blocks.ts
generated
Normal file
365
autogpt_platform/frontend/src/app/api/__generated__/endpoints/blocks/blocks.ts
generated
Normal file
@@ -0,0 +1,365 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 getV1ListAvailableBlocksResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1ListAvailableBlocksResponseComposite =
|
||||||
|
| getV1ListAvailableBlocksResponse200
|
||||||
|
| getV1ListAvailableBlocksResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1ListAvailableBlocks<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1ListAvailableBlocks>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 postV1ExecuteGraphBlockResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1ExecuteGraphBlockResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1ExecuteGraphBlockResponseComposite =
|
||||||
|
| postV1ExecuteGraphBlockResponse200
|
||||||
|
| postV1ExecuteGraphBlockResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Execute graph block
|
||||||
|
*/
|
||||||
|
export const usePostV1ExecuteGraphBlock = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
1680
autogpt_platform/frontend/src/app/api/__generated__/endpoints/credits/credits.ts
generated
Normal file
1680
autogpt_platform/frontend/src/app/api/__generated__/endpoints/credits/credits.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
1633
autogpt_platform/frontend/src/app/api/__generated__/endpoints/default/default.ts
generated
Normal file
1633
autogpt_platform/frontend/src/app/api/__generated__/endpoints/default/default.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
265
autogpt_platform/frontend/src/app/api/__generated__/endpoints/email/email.ts
generated
Normal file
265
autogpt_platform/frontend/src/app/api/__generated__/endpoints/email/email.ts
generated
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
};
|
||||||
194
autogpt_platform/frontend/src/app/api/__generated__/endpoints/files/files.ts
generated
Normal file
194
autogpt_platform/frontend/src/app/api/__generated__/endpoints/files/files.ts
generated
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 postV1UploadFileToCloudStorageResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UploadFileToCloudStorageResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1UploadFileToCloudStorageResponseComposite =
|
||||||
|
| postV1UploadFileToCloudStorageResponse200
|
||||||
|
| postV1UploadFileToCloudStorageResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Upload file to cloud storage
|
||||||
|
*/
|
||||||
|
export const usePostV1UploadFileToCloudStorage = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
2901
autogpt_platform/frontend/src/app/api/__generated__/endpoints/graphs/graphs.ts
generated
Normal file
2901
autogpt_platform/frontend/src/app/api/__generated__/endpoints/graphs/graphs.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
213
autogpt_platform/frontend/src/app/api/__generated__/endpoints/health/health.ts
generated
Normal file
213
autogpt_platform/frontend/src/app/api/__generated__/endpoints/health/health.ts
generated
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
};
|
||||||
2627
autogpt_platform/frontend/src/app/api/__generated__/endpoints/integrations/integrations.ts
generated
Normal file
2627
autogpt_platform/frontend/src/app/api/__generated__/endpoints/integrations/integrations.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
1837
autogpt_platform/frontend/src/app/api/__generated__/endpoints/library/library.ts
generated
Normal file
1837
autogpt_platform/frontend/src/app/api/__generated__/endpoints/library/library.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
775
autogpt_platform/frontend/src/app/api/__generated__/endpoints/onboarding/onboarding.ts
generated
Normal file
775
autogpt_platform/frontend/src/app/api/__generated__/endpoints/onboarding/onboarding.ts
generated
Normal file
@@ -0,0 +1,775 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 getV1GetOnboardingStatusResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetOnboardingStatusResponseComposite =
|
||||||
|
| getV1GetOnboardingStatusResponse200
|
||||||
|
| getV1GetOnboardingStatusResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1GetOnboardingStatus<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetOnboardingStatus>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 patchV1UpdateOnboardingProgressResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type patchV1UpdateOnboardingProgressResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type patchV1UpdateOnboardingProgressResponseComposite =
|
||||||
|
| patchV1UpdateOnboardingProgressResponse200
|
||||||
|
| patchV1UpdateOnboardingProgressResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Update onboarding progress
|
||||||
|
*/
|
||||||
|
export const usePatchV1UpdateOnboardingProgress = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 getV1GetRecommendedAgentsResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1GetRecommendedAgentsResponseComposite =
|
||||||
|
| getV1GetRecommendedAgentsResponse200
|
||||||
|
| getV1GetRecommendedAgentsResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1GetRecommendedAgents<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1GetRecommendedAgents>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 getV1CheckOnboardingEnabledResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1CheckOnboardingEnabledResponseComposite =
|
||||||
|
| getV1CheckOnboardingEnabledResponse200
|
||||||
|
| getV1CheckOnboardingEnabledResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1CheckOnboardingEnabled<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1CheckOnboardingEnabled>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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;
|
||||||
|
};
|
||||||
149
autogpt_platform/frontend/src/app/api/__generated__/endpoints/otto/otto.ts
generated
Normal file
149
autogpt_platform/frontend/src/app/api/__generated__/endpoints/otto/otto.ts
generated
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 postV2ProxyOttoChatRequestResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV2ProxyOttoChatRequestResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV2ProxyOttoChatRequestResponseComposite =
|
||||||
|
| postV2ProxyOttoChatRequestResponse200
|
||||||
|
| postV2ProxyOttoChatRequestResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Proxy Otto Chat Request
|
||||||
|
*/
|
||||||
|
export const usePostV2ProxyOttoChatRequest = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
1124
autogpt_platform/frontend/src/app/api/__generated__/endpoints/presets/presets.ts
generated
Normal file
1124
autogpt_platform/frontend/src/app/api/__generated__/endpoints/presets/presets.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
729
autogpt_platform/frontend/src/app/api/__generated__/endpoints/schedules/schedules.ts
generated
Normal file
729
autogpt_platform/frontend/src/app/api/__generated__/endpoints/schedules/schedules.ts
generated
Normal file
@@ -0,0 +1,729 @@
|
|||||||
|
/**
|
||||||
|
* 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 { HTTP401NotAuthenticatedErrorResponse } from "../../models/hTTP401NotAuthenticatedErrorResponse";
|
||||||
|
|
||||||
|
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 postV1CreateExecutionScheduleResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1CreateExecutionScheduleResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type postV1CreateExecutionScheduleResponseComposite =
|
||||||
|
| postV1CreateExecutionScheduleResponse200
|
||||||
|
| postV1CreateExecutionScheduleResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Create execution schedule
|
||||||
|
*/
|
||||||
|
export const usePostV1CreateExecutionSchedule = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 getV1ListExecutionSchedulesForAGraphResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1ListExecutionSchedulesForAGraphResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1ListExecutionSchedulesForAGraphResponseComposite =
|
||||||
|
| getV1ListExecutionSchedulesForAGraphResponse200
|
||||||
|
| getV1ListExecutionSchedulesForAGraphResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
export function useGetV1ListExecutionSchedulesForAGraph<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAGraph>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 = HTTP401NotAuthenticatedErrorResponse | 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 getV1ListExecutionSchedulesForAUserResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type getV1ListExecutionSchedulesForAUserResponseComposite =
|
||||||
|
| getV1ListExecutionSchedulesForAUserResponse200
|
||||||
|
| getV1ListExecutionSchedulesForAUserResponse401;
|
||||||
|
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(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 =
|
||||||
|
HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
|
||||||
|
export function useGetV1ListExecutionSchedulesForAUser<
|
||||||
|
TData = Awaited<ReturnType<typeof getV1ListExecutionSchedulesForAUser>>,
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 = HTTP401NotAuthenticatedErrorResponse,
|
||||||
|
>(
|
||||||
|
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 deleteV1DeleteExecutionScheduleResponse401 = {
|
||||||
|
data: HTTP401NotAuthenticatedErrorResponse;
|
||||||
|
status: 401;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type deleteV1DeleteExecutionScheduleResponse422 = {
|
||||||
|
data: HTTPValidationError;
|
||||||
|
status: 422;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type deleteV1DeleteExecutionScheduleResponseComposite =
|
||||||
|
| deleteV1DeleteExecutionScheduleResponse200
|
||||||
|
| deleteV1DeleteExecutionScheduleResponse401
|
||||||
|
| 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 = HTTP401NotAuthenticatedErrorResponse | 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 =
|
||||||
|
| HTTP401NotAuthenticatedErrorResponse
|
||||||
|
| HTTPValidationError;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @summary Delete execution schedule
|
||||||
|
*/
|
||||||
|
export const useDeleteV1DeleteExecutionSchedule = <
|
||||||
|
TError = HTTP401NotAuthenticatedErrorResponse | 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);
|
||||||
|
};
|
||||||
3740
autogpt_platform/frontend/src/app/api/__generated__/endpoints/store/store.ts
generated
Normal file
3740
autogpt_platform/frontend/src/app/api/__generated__/endpoints/store/store.ts
generated
Normal file
File diff suppressed because it is too large
Load Diff
140
autogpt_platform/frontend/src/app/api/__generated__/endpoints/turnstile/turnstile.ts
generated
Normal file
140
autogpt_platform/frontend/src/app/api/__generated__/endpoints/turnstile/turnstile.ts
generated
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
/**
|
||||||
|
* 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);
|
||||||
|
};
|
||||||
19
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentials.ts
generated
Normal file
19
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentials.ts
generated
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentialsExpiresAt.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentialsExpiresAt.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentialsTitle.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyCredentialsTitle.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
18
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyPermission.ts
generated
Normal file
18
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyPermission.ts
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
16
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyStatus.ts
generated
Normal file
16
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyStatus.ts
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
26
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHash.ts
generated
Normal file
26
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHash.ts
generated
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/**
|
||||||
|
* 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: Date;
|
||||||
|
last_used_at: APIKeyWithoutHashLastUsedAt;
|
||||||
|
revoked_at: APIKeyWithoutHashRevokedAt;
|
||||||
|
description: APIKeyWithoutHashDescription;
|
||||||
|
user_id: string;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashDescription.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashDescription.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashLastUsedAt.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashLastUsedAt.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 = Date | null;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashRevokedAt.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/aPIKeyWithoutHashRevokedAt.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 = Date | null;
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/addUserCreditsResponse.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/addUserCreditsResponse.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
20
autogpt_platform/frontend/src/app/api/__generated__/models/agentExecutionStatus.ts
generated
Normal file
20
autogpt_platform/frontend/src/app/api/__generated__/models/agentExecutionStatus.ts
generated
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/apiResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/apiResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/autoTopUpConfig.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/autoTopUpConfig.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/ayrshareSSOResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/ayrshareSSOResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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: Date;
|
||||||
|
}
|
||||||
25
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInput.ts
generated
Normal file
25
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInput.ts
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BaseGraphInputRecommendedScheduleCron } from "./baseGraphInputRecommendedScheduleCron";
|
||||||
|
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;
|
||||||
|
recommended_schedule_cron?: BaseGraphInputRecommendedScheduleCron;
|
||||||
|
nodes?: Node[];
|
||||||
|
links?: Link[];
|
||||||
|
forked_from_id?: BaseGraphInputForkedFromId;
|
||||||
|
forked_from_version?: BaseGraphInputForkedFromVersion;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInputForkedFromId.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInputForkedFromId.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInputForkedFromVersion.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphInputForkedFromVersion.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BaseGraphInputRecommendedScheduleCron = string | null;
|
||||||
32
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutput.ts
generated
Normal file
32
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutput.ts
generated
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BaseGraphOutputRecommendedScheduleCron } from "./baseGraphOutputRecommendedScheduleCron";
|
||||||
|
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";
|
||||||
|
import type { BaseGraphOutputTriggerSetupInfo } from "./baseGraphOutputTriggerSetupInfo";
|
||||||
|
|
||||||
|
export interface BaseGraphOutput {
|
||||||
|
id?: string;
|
||||||
|
version?: number;
|
||||||
|
is_active?: boolean;
|
||||||
|
name: string;
|
||||||
|
description: string;
|
||||||
|
recommended_schedule_cron?: BaseGraphOutputRecommendedScheduleCron;
|
||||||
|
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;
|
||||||
|
readonly trigger_setup_info: BaseGraphOutputTriggerSetupInfo;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputForkedFromId.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputForkedFromId.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputForkedFromVersion.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputForkedFromVersion.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputInputSchema.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputInputSchema.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputOutputSchema.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputOutputSchema.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BaseGraphOutputRecommendedScheduleCron = string | null;
|
||||||
10
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputTriggerSetupInfo.ts
generated
Normal file
10
autogpt_platform/frontend/src/app/api/__generated__/models/baseGraphOutputTriggerSetupInfo.ts
generated
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/**
|
||||||
|
* 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 { GraphTriggerInfo } from "./graphTriggerInfo";
|
||||||
|
|
||||||
|
export type BaseGraphOutputTriggerSetupInfo = GraphTriggerInfo | null;
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/blockCategoryResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/blockCategoryResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BlockInfo } from "./blockInfo";
|
||||||
|
|
||||||
|
export interface BlockCategoryResponse {
|
||||||
|
name: string;
|
||||||
|
total_blocks: number;
|
||||||
|
blocks: BlockInfo[];
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockCategoryResponseBlocksItem.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockCategoryResponseBlocksItem.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockCategoryResponseBlocksItem = { [key: string]: unknown };
|
||||||
15
autogpt_platform/frontend/src/app/api/__generated__/models/blockCost.ts
generated
Normal file
15
autogpt_platform/frontend/src/app/api/__generated__/models/blockCost.ts
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BlockCostCostFilter } from "./blockCostCostFilter";
|
||||||
|
import type { BlockCostType } from "./blockCostType";
|
||||||
|
|
||||||
|
export interface BlockCost {
|
||||||
|
cost_amount: number;
|
||||||
|
cost_filter: BlockCostCostFilter;
|
||||||
|
cost_type: BlockCostType;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockCostCostFilter.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockCostCostFilter.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockCostCostFilter = { [key: string]: unknown };
|
||||||
16
autogpt_platform/frontend/src/app/api/__generated__/models/blockCostType.ts
generated
Normal file
16
autogpt_platform/frontend/src/app/api/__generated__/models/blockCostType.ts
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockCostType = (typeof BlockCostType)[keyof typeof BlockCostType];
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
||||||
|
export const BlockCostType = {
|
||||||
|
run: "run",
|
||||||
|
byte: "byte",
|
||||||
|
second: "second",
|
||||||
|
} as const;
|
||||||
25
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfo.ts
generated
Normal file
25
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfo.ts
generated
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BlockInfoInputSchema } from "./blockInfoInputSchema";
|
||||||
|
import type { BlockInfoOutputSchema } from "./blockInfoOutputSchema";
|
||||||
|
import type { BlockCost } from "./blockCost";
|
||||||
|
import type { BlockInfoCategoriesItem } from "./blockInfoCategoriesItem";
|
||||||
|
import type { BlockInfoContributorsItem } from "./blockInfoContributorsItem";
|
||||||
|
|
||||||
|
export interface BlockInfo {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
inputSchema: BlockInfoInputSchema;
|
||||||
|
outputSchema: BlockInfoOutputSchema;
|
||||||
|
costs: BlockCost[];
|
||||||
|
description: string;
|
||||||
|
categories: BlockInfoCategoriesItem[];
|
||||||
|
contributors: BlockInfoContributorsItem[];
|
||||||
|
staticOutput: boolean;
|
||||||
|
uiType: string;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoCategoriesItem.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoCategoriesItem.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockInfoCategoriesItem = { [key: string]: string };
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoContributorsItem.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoContributorsItem.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockInfoContributorsItem = { [key: string]: unknown };
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoInputSchema.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoInputSchema.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockInfoInputSchema = { [key: string]: unknown };
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoOutputSchema.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockInfoOutputSchema.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockInfoOutputSchema = { [key: string]: unknown };
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/blockResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/blockResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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 { BlockInfo } from "./blockInfo";
|
||||||
|
import type { Pagination } from "./pagination";
|
||||||
|
|
||||||
|
export interface BlockResponse {
|
||||||
|
blocks: BlockInfo[];
|
||||||
|
pagination: Pagination;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockResponseBlocksItem.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/blockResponseBlocksItem.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 BlockResponseBlocksItem = { [key: string]: unknown };
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1Callback.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1Callback.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1ExecuteGraphAgent.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1ExecuteGraphAgent.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
};
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1ExecuteGraphAgentInputs.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1ExecuteGraphAgentInputs.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
16
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1LogRawAnalytics.ts
generated
Normal file
16
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1LogRawAnalytics.ts
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1LogRawAnalyticsData.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1LogRawAnalyticsData.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1UploadFileToCloudStorage.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV1UploadFileToCloudStorage.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
13
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2AddCreditsToUser.ts
generated
Normal file
13
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2AddCreditsToUser.ts
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2AddMarketplaceAgent.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2AddMarketplaceAgent.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2ExecuteAPreset.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2ExecuteAPreset.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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";
|
||||||
|
import type { BodyPostV2ExecuteAPresetCredentialInputs } from "./bodyPostV2ExecuteAPresetCredentialInputs";
|
||||||
|
|
||||||
|
export interface BodyPostV2ExecuteAPreset {
|
||||||
|
inputs?: BodyPostV2ExecuteAPresetInputs;
|
||||||
|
credential_inputs?: BodyPostV2ExecuteAPresetCredentialInputs;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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 BodyPostV2ExecuteAPresetCredentialInputs = {
|
||||||
|
[key: string]: CredentialsMetaInput;
|
||||||
|
};
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2ExecuteAPresetInputs.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2ExecuteAPresetInputs.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2UploadSubmissionMedia.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/bodyPostV2UploadSubmissionMedia.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
17
autogpt_platform/frontend/src/app/api/__generated__/models/chatRequest.ts
generated
Normal file
17
autogpt_platform/frontend/src/app/api/__generated__/models/chatRequest.ts
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/chatRequestGraphId.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/chatRequestGraphId.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
17
autogpt_platform/frontend/src/app/api/__generated__/models/countResponse.ts
generated
Normal file
17
autogpt_platform/frontend/src/app/api/__generated__/models/countResponse.ts
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 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 CountResponse {
|
||||||
|
all_blocks: number;
|
||||||
|
input_blocks: number;
|
||||||
|
action_blocks: number;
|
||||||
|
output_blocks: number;
|
||||||
|
integrations: number;
|
||||||
|
marketplace_agents: number;
|
||||||
|
my_agents: number;
|
||||||
|
}
|
||||||
15
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyRequest.ts
generated
Normal file
15
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyRequest.ts
generated
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyRequestDescription.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyRequestDescription.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
13
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyResponse.ts
generated
Normal file
13
autogpt_platform/frontend/src/app/api/__generated__/models/createAPIKeyResponse.ts
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/createGraph.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/createGraph.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
18
autogpt_platform/frontend/src/app/api/__generated__/models/creator.ts
generated
Normal file
18
autogpt_platform/frontend/src/app/api/__generated__/models/creator.ts
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
18
autogpt_platform/frontend/src/app/api/__generated__/models/creatorDetails.ts
generated
Normal file
18
autogpt_platform/frontend/src/app/api/__generated__/models/creatorDetails.ts
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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[];
|
||||||
|
}
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/creatorsResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/creatorsResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
14
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsDeletionResponse.ts
generated
Normal file
14
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsDeletionResponse.ts
generated
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsDeletionResponseRevoked.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsDeletionResponseRevoked.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
17
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInput.ts
generated
Normal file
17
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInput.ts
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInputTitle.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInputTitle.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
18
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInputType.ts
generated
Normal file
18
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaInputType.ts
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
23
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponse.ts
generated
Normal file
23
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponse.ts
generated
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseHost.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseHost.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseScopes.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseScopes.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseTitle.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseTitle.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
18
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseType.ts
generated
Normal file
18
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseType.ts
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseUsername.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/credentialsMetaResponseUsername.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
19
autogpt_platform/frontend/src/app/api/__generated__/models/creditTransactionType.ts
generated
Normal file
19
autogpt_platform/frontend/src/app/api/__generated__/models/creditTransactionType.ts
generated
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/deleteGraphResponse.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/deleteGraphResponse.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
13
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteCredentials200.ts
generated
Normal file
13
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteCredentials200.ts
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteCredentialsParams.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteCredentialsParams.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
};
|
||||||
9
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteExecutionSchedule200.ts
generated
Normal file
9
autogpt_platform/frontend/src/app/api/__generated__/models/deleteV1DeleteExecutionSchedule200.ts
generated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* 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 };
|
||||||
12
autogpt_platform/frontend/src/app/api/__generated__/models/document.ts
generated
Normal file
12
autogpt_platform/frontend/src/app/api/__generated__/models/document.ts
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
11
autogpt_platform/frontend/src/app/api/__generated__/models/executeGraphResponse.ts
generated
Normal file
11
autogpt_platform/frontend/src/app/api/__generated__/models/executeGraphResponse.ts
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
17
autogpt_platform/frontend/src/app/api/__generated__/models/getV1GetCredential200.ts
generated
Normal file
17
autogpt_platform/frontend/src/app/api/__generated__/models/getV1GetCredential200.ts
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user