update generated files

This commit is contained in:
SwiftyOS
2025-07-02 09:41:45 +02:00
parent 4f057c5b72
commit 31aaabc1eb
40 changed files with 0 additions and 23327 deletions

View File

@@ -1,184 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getPostV1LogRawMetricResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1LogRawAnalyticsResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1LogRawMetricMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/analytics/log_raw_metric", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1LogRawMetricMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/analytics/log_raw_metric", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1LogRawMetricMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/analytics/log_raw_metric", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1LogRawMetricResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1LogRawAnalyticsMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/analytics/log_raw_analytics", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1LogRawAnalyticsMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/analytics/log_raw_analytics", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1LogRawAnalyticsMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/analytics/log_raw_analytics", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1LogRawAnalyticsResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getAnalyticsMock = () => [
getPostV1LogRawMetricMockHandler(),
getPostV1LogRawAnalyticsMockHandler(),
];

View File

@@ -1,906 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import { APIKeyPermission } from "../../models/aPIKeyPermission";
import { APIKeyStatus } from "../../models/aPIKeyStatus";
import type { APIKeyWithoutHash } from "../../models/aPIKeyWithoutHash";
import type { CreateAPIKeyResponse } from "../../models/createAPIKeyResponse";
import type { GetV1ListUserApiKeys200 } from "../../models/getV1ListUserApiKeys200";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getGetV1ListUserApiKeysResponseMock =
(): GetV1ListUserApiKeys200 =>
faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(
Object.values(APIKeyPermission),
),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
{
[faker.string.alphanumeric(5)]: faker.string.alpha({
length: { min: 10, max: 20 },
}),
},
]);
export const getGetV1ListUserApiKeysResponseMock200 =
(): GetV1ListUserApiKeys200 =>
faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(
Object.values(APIKeyPermission),
),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
{
[faker.string.alphanumeric(5)]: faker.string.alpha({
length: { min: 10, max: 20 },
}),
},
]);
export const getPostV1CreateNewApiKeyResponseMock = (
overrideResponse: Partial<CreateAPIKeyResponse> = {},
): CreateAPIKeyResponse => ({
api_key: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
},
plain_text_key: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1CreateNewApiKeyResponseMock200 = (
overrideResponse: Partial<CreateAPIKeyResponse> = {},
): CreateAPIKeyResponse => ({
api_key: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
},
plain_text_key: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1CreateNewApiKeyResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1GetSpecificApiKeyResponseMock = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getGetV1GetSpecificApiKeyResponseMock200 = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getGetV1GetSpecificApiKeyResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getDeleteV1RevokeApiKeyResponseMock = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getDeleteV1RevokeApiKeyResponseMock200 = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getDeleteV1RevokeApiKeyResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1SuspendApiKeyResponseMock = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1SuspendApiKeyResponseMock200 = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1SuspendApiKeyResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPutV1UpdateKeyPermissionsResponseMock = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPutV1UpdateKeyPermissionsResponseMock200 = (
overrideResponse: Partial<APIKeyWithoutHash> = {},
): APIKeyWithoutHash => ({
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
prefix: faker.string.alpha({ length: { min: 10, max: 20 } }),
postfix: faker.string.alpha({ length: { min: 10, max: 20 } }),
status: faker.helpers.arrayElement(Object.values(APIKeyStatus)),
permissions: faker.helpers.arrayElements(Object.values(APIKeyPermission)),
created_at: `${faker.date.past().toISOString().split(".")[0]}Z`,
last_used_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
revoked_at: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
null,
]),
description: faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPutV1UpdateKeyPermissionsResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1ListUserApiKeysMockHandler = (
overrideResponse?:
| GetV1ListUserApiKeys200
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GetV1ListUserApiKeys200> | GetV1ListUserApiKeys200),
) => {
return http.get("*/api/api-keys", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListUserApiKeysResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListUserApiKeysMockHandler200 = (
overrideResponse?:
| GetV1ListUserApiKeys200
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GetV1ListUserApiKeys200> | GetV1ListUserApiKeys200),
) => {
return http.get("*/api/api-keys", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListUserApiKeysResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1CreateNewApiKeyMockHandler = (
overrideResponse?:
| CreateAPIKeyResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<CreateAPIKeyResponse> | CreateAPIKeyResponse),
) => {
return http.post("*/api/api-keys", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateNewApiKeyResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1CreateNewApiKeyMockHandler200 = (
overrideResponse?:
| CreateAPIKeyResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<CreateAPIKeyResponse> | CreateAPIKeyResponse),
) => {
return http.post("*/api/api-keys", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateNewApiKeyResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1CreateNewApiKeyMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/api-keys", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateNewApiKeyResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetSpecificApiKeyMockHandler = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.get("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1GetSpecificApiKeyResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetSpecificApiKeyMockHandler200 = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.get("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1GetSpecificApiKeyResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetSpecificApiKeyMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.get("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1GetSpecificApiKeyResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1RevokeApiKeyMockHandler = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.delete("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1RevokeApiKeyResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1RevokeApiKeyMockHandler200 = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.delete("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1RevokeApiKeyResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1RevokeApiKeyMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.delete("*/api/api-keys/:keyId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1RevokeApiKeyResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1SuspendApiKeyMockHandler = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.post("*/api/api-keys/:keyId/suspend", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1SuspendApiKeyResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1SuspendApiKeyMockHandler200 = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.post("*/api/api-keys/:keyId/suspend", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1SuspendApiKeyResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1SuspendApiKeyMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/api-keys/:keyId/suspend", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1SuspendApiKeyResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPutV1UpdateKeyPermissionsMockHandler = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.put>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.put("*/api/api-keys/:keyId/permissions", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPutV1UpdateKeyPermissionsResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPutV1UpdateKeyPermissionsMockHandler200 = (
overrideResponse?:
| APIKeyWithoutHash
| ((
info: Parameters<Parameters<typeof http.put>[1]>[0],
) => Promise<APIKeyWithoutHash> | APIKeyWithoutHash),
) => {
return http.put("*/api/api-keys/:keyId/permissions", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPutV1UpdateKeyPermissionsResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPutV1UpdateKeyPermissionsMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.put>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.put("*/api/api-keys/:keyId/permissions", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPutV1UpdateKeyPermissionsResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getApiKeysMock = () => [
getGetV1ListUserApiKeysMockHandler(),
getPostV1CreateNewApiKeyMockHandler(),
getGetV1GetSpecificApiKeyMockHandler(),
getDeleteV1RevokeApiKeyMockHandler(),
getPostV1SuspendApiKeyMockHandler(),
getPutV1UpdateKeyPermissionsMockHandler(),
];

View File

@@ -1,414 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
import type { NotificationPreference } from "../../models/notificationPreference";
import type { PostV1UpdateUserEmail200 } from "../../models/postV1UpdateUserEmail200";
export const getPostV1UpdateUserEmailResponseMock =
(): PostV1UpdateUserEmail200 => ({
[faker.string.alphanumeric(5)]: faker.string.alpha({
length: { min: 10, max: 20 },
}),
});
export const getPostV1UpdateUserEmailResponseMock200 =
(): PostV1UpdateUserEmail200 => ({
[faker.string.alphanumeric(5)]: faker.string.alpha({
length: { min: 10, max: 20 },
}),
});
export const getPostV1UpdateUserEmailResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1GetNotificationPreferencesResponseMock = (
overrideResponse: Partial<NotificationPreference> = {},
): NotificationPreference => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
email: faker.internet.email(),
preferences: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: faker.datatype.boolean(),
},
undefined,
]),
daily_limit: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
emails_sent_today: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
last_reset_date: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
undefined,
]),
...overrideResponse,
});
export const getGetV1GetNotificationPreferencesResponseMock200 = (
overrideResponse: Partial<NotificationPreference> = {},
): NotificationPreference => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
email: faker.internet.email(),
preferences: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: faker.datatype.boolean(),
},
undefined,
]),
daily_limit: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
emails_sent_today: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
last_reset_date: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
undefined,
]),
...overrideResponse,
});
export const getPostV1UpdateNotificationPreferencesResponseMock = (
overrideResponse: Partial<NotificationPreference> = {},
): NotificationPreference => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
email: faker.internet.email(),
preferences: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: faker.datatype.boolean(),
},
undefined,
]),
daily_limit: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
emails_sent_today: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
last_reset_date: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
undefined,
]),
...overrideResponse,
});
export const getPostV1UpdateNotificationPreferencesResponseMock200 = (
overrideResponse: Partial<NotificationPreference> = {},
): NotificationPreference => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
email: faker.internet.email(),
preferences: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: faker.datatype.boolean(),
},
undefined,
]),
daily_limit: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
emails_sent_today: faker.helpers.arrayElement([
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
undefined,
]),
last_reset_date: faker.helpers.arrayElement([
`${faker.date.past().toISOString().split(".")[0]}Z`,
undefined,
]),
...overrideResponse,
});
export const getPostV1UpdateNotificationPreferencesResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1GetOrCreateUserMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/auth/user", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1GetOrCreateUserMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/auth/user", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1UpdateUserEmailMockHandler = (
overrideResponse?:
| PostV1UpdateUserEmail200
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<PostV1UpdateUserEmail200> | PostV1UpdateUserEmail200),
) => {
return http.post("*/api/auth/user/email", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateUserEmailResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1UpdateUserEmailMockHandler200 = (
overrideResponse?:
| PostV1UpdateUserEmail200
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<PostV1UpdateUserEmail200> | PostV1UpdateUserEmail200),
) => {
return http.post("*/api/auth/user/email", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateUserEmailResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1UpdateUserEmailMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/auth/user/email", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateUserEmailResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetNotificationPreferencesMockHandler = (
overrideResponse?:
| NotificationPreference
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<NotificationPreference> | NotificationPreference),
) => {
return http.get("*/api/auth/user/preferences", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1GetNotificationPreferencesResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetNotificationPreferencesMockHandler200 = (
overrideResponse?:
| NotificationPreference
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<NotificationPreference> | NotificationPreference),
) => {
return http.get("*/api/auth/user/preferences", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1GetNotificationPreferencesResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1UpdateNotificationPreferencesMockHandler = (
overrideResponse?:
| NotificationPreference
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<NotificationPreference> | NotificationPreference),
) => {
return http.post("*/api/auth/user/preferences", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateNotificationPreferencesResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1UpdateNotificationPreferencesMockHandler200 = (
overrideResponse?:
| NotificationPreference
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<NotificationPreference> | NotificationPreference),
) => {
return http.post("*/api/auth/user/preferences", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateNotificationPreferencesResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1UpdateNotificationPreferencesMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/auth/user/preferences", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1UpdateNotificationPreferencesResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getAuthMock = () => [
getPostV1GetOrCreateUserMockHandler(),
getPostV1UpdateUserEmailMockHandler(),
getGetV1GetNotificationPreferencesMockHandler(),
getPostV1UpdateNotificationPreferencesMockHandler(),
];

View File

@@ -1,198 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { GetV1ListAvailableBlocks200Item } from "../../models/getV1ListAvailableBlocks200Item";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
import type { PostV1ExecuteGraphBlock200 } from "../../models/postV1ExecuteGraphBlock200";
export const getGetV1ListAvailableBlocksResponseMock =
(): GetV1ListAvailableBlocks200Item[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({}));
export const getGetV1ListAvailableBlocksResponseMock200 =
(): GetV1ListAvailableBlocks200Item[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({}));
export const getPostV1ExecuteGraphBlockResponseMock =
(): PostV1ExecuteGraphBlock200 => ({
[faker.string.alphanumeric(5)]: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({})),
});
export const getPostV1ExecuteGraphBlockResponseMock200 =
(): PostV1ExecuteGraphBlock200 => ({
[faker.string.alphanumeric(5)]: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({})),
});
export const getPostV1ExecuteGraphBlockResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1ListAvailableBlocksMockHandler = (
overrideResponse?:
| GetV1ListAvailableBlocks200Item[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) =>
| Promise<GetV1ListAvailableBlocks200Item[]>
| GetV1ListAvailableBlocks200Item[]),
) => {
return http.get("*/api/blocks", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListAvailableBlocksResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListAvailableBlocksMockHandler200 = (
overrideResponse?:
| GetV1ListAvailableBlocks200Item[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) =>
| Promise<GetV1ListAvailableBlocks200Item[]>
| GetV1ListAvailableBlocks200Item[]),
) => {
return http.get("*/api/blocks", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListAvailableBlocksResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1ExecuteGraphBlockMockHandler = (
overrideResponse?:
| PostV1ExecuteGraphBlock200
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<PostV1ExecuteGraphBlock200> | PostV1ExecuteGraphBlock200),
) => {
return http.post("*/api/blocks/:blockId/execute", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1ExecuteGraphBlockResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1ExecuteGraphBlockMockHandler200 = (
overrideResponse?:
| PostV1ExecuteGraphBlock200
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<PostV1ExecuteGraphBlock200> | PostV1ExecuteGraphBlock200),
) => {
return http.post("*/api/blocks/:blockId/execute", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1ExecuteGraphBlockResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1ExecuteGraphBlockMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/blocks/:blockId/execute", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1ExecuteGraphBlockResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getBlocksMock = () => [
getGetV1ListAvailableBlocksMockHandler(),
getPostV1ExecuteGraphBlockMockHandler(),
];

View File

@@ -1,184 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getPostV1OneClickEmailUnsubscribeResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1HandlePostmarkEmailWebhooksResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1OneClickEmailUnsubscribeMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/email/unsubscribe", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1OneClickEmailUnsubscribeMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/email/unsubscribe", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1OneClickEmailUnsubscribeMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/email/unsubscribe", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1OneClickEmailUnsubscribeResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1HandlePostmarkEmailWebhooksMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/email/", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1HandlePostmarkEmailWebhooksMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.post("*/api/email/", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPostV1HandlePostmarkEmailWebhooksMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/email/", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1HandlePostmarkEmailWebhooksResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getEmailMock = () => [
getPostV1OneClickEmailUnsubscribeMockHandler(),
getPostV1HandlePostmarkEmailWebhooksMockHandler(),
];

View File

@@ -1,41 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { HttpResponse, delay, http } from "msw";
export const getGetHealthHealthMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/health", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getGetHealthHealthMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/health", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getHealthMock = () => [getGetHealthHealthMockHandler()];

View File

@@ -1,198 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getPatchV1UpdateOnboardingProgressResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1GetOnboardingStatusMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getGetV1GetOnboardingStatusMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPatchV1UpdateOnboardingProgressMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.patch>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.patch("*/api/onboarding", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPatchV1UpdateOnboardingProgressMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.patch>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.patch("*/api/onboarding", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getPatchV1UpdateOnboardingProgressMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.patch>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.patch("*/api/onboarding", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPatchV1UpdateOnboardingProgressResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1GetRecommendedAgentsMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding/agents", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getGetV1GetRecommendedAgentsMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding/agents", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getGetV1CheckOnboardingEnabledMockHandler = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding/enabled", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getGetV1CheckOnboardingEnabledMockHandler200 = (
overrideResponse?:
| unknown
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<unknown> | unknown),
) => {
return http.get("*/api/onboarding/enabled", async (info) => {
await delay(1000);
if (typeof overrideResponse === "function") {
await overrideResponse(info);
}
return new HttpResponse(null, { status: 200 });
});
};
export const getOnboardingMock = () => [
getGetV1GetOnboardingStatusMockHandler(),
getPatchV1UpdateOnboardingProgressMockHandler(),
getGetV1GetRecommendedAgentsMockHandler(),
getGetV1CheckOnboardingEnabledMockHandler(),
];

View File

@@ -1,151 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { ApiResponse } from "../../models/apiResponse";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getPostV2ProxyOttoChatRequestResponseMock = (
overrideResponse: Partial<ApiResponse> = {},
): ApiResponse => ({
answer: faker.string.alpha({ length: { min: 10, max: 20 } }),
documents: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
url: faker.string.alpha({ length: { min: 10, max: 20 } }),
relevance_score: faker.number.float({
min: undefined,
max: undefined,
fractionDigits: 2,
}),
})),
success: faker.datatype.boolean(),
...overrideResponse,
});
export const getPostV2ProxyOttoChatRequestResponseMock200 = (
overrideResponse: Partial<ApiResponse> = {},
): ApiResponse => ({
answer: faker.string.alpha({ length: { min: 10, max: 20 } }),
documents: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
url: faker.string.alpha({ length: { min: 10, max: 20 } }),
relevance_score: faker.number.float({
min: undefined,
max: undefined,
fractionDigits: 2,
}),
})),
success: faker.datatype.boolean(),
...overrideResponse,
});
export const getPostV2ProxyOttoChatRequestResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV2ProxyOttoChatRequestMockHandler = (
overrideResponse?:
| ApiResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<ApiResponse> | ApiResponse),
) => {
return http.post("*/api/otto/ask", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2ProxyOttoChatRequestResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV2ProxyOttoChatRequestMockHandler200 = (
overrideResponse?:
| ApiResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<ApiResponse> | ApiResponse),
) => {
return http.post("*/api/otto/ask", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2ProxyOttoChatRequestResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV2ProxyOttoChatRequestMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/otto/ask", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2ProxyOttoChatRequestResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getOttoMock = () => [getPostV2ProxyOttoChatRequestMockHandler()];

View File

@@ -1,620 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { DeleteV1DeleteExecutionSchedule200 } from "../../models/deleteV1DeleteExecutionSchedule200";
import type { GraphExecutionJobInfo } from "../../models/graphExecutionJobInfo";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
export const getPostV1CreateExecutionScheduleResponseMock = (
overrideResponse: Partial<GraphExecutionJobInfo> = {},
): GraphExecutionJobInfo => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1CreateExecutionScheduleResponseMock200 = (
overrideResponse: Partial<GraphExecutionJobInfo> = {},
): GraphExecutionJobInfo => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
...overrideResponse,
});
export const getPostV1CreateExecutionScheduleResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1ListExecutionSchedulesForAGraphResponseMock =
(): GraphExecutionJobInfo[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
}));
export const getGetV1ListExecutionSchedulesForAGraphResponseMock200 =
(): GraphExecutionJobInfo[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
}));
export const getGetV1ListExecutionSchedulesForAGraphResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getGetV1ListExecutionSchedulesForAUserResponseMock =
(): GraphExecutionJobInfo[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
}));
export const getGetV1ListExecutionSchedulesForAUserResponseMock200 =
(): GraphExecutionJobInfo[] =>
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
user_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_id: faker.string.alpha({ length: { min: 10, max: 20 } }),
graph_version: faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
cron: faker.string.alpha({ length: { min: 10, max: 20 } }),
input_data: {},
input_credentials: faker.helpers.arrayElement([
{
[faker.string.alphanumeric(5)]: {
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
title: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
provider: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.helpers.arrayElement([
"api_key",
"oauth2",
"user_password",
"host_scoped",
] as const),
},
},
undefined,
]),
id: faker.string.alpha({ length: { min: 10, max: 20 } }),
name: faker.string.alpha({ length: { min: 10, max: 20 } }),
next_run_time: faker.string.alpha({ length: { min: 10, max: 20 } }),
}));
export const getDeleteV1DeleteExecutionScheduleResponseMock =
(): DeleteV1DeleteExecutionSchedule200 => ({});
export const getDeleteV1DeleteExecutionScheduleResponseMock200 =
(): DeleteV1DeleteExecutionSchedule200 => ({});
export const getDeleteV1DeleteExecutionScheduleResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV1CreateExecutionScheduleMockHandler = (
overrideResponse?:
| GraphExecutionJobInfo
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<GraphExecutionJobInfo> | GraphExecutionJobInfo),
) => {
return http.post("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateExecutionScheduleResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1CreateExecutionScheduleMockHandler200 = (
overrideResponse?:
| GraphExecutionJobInfo
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<GraphExecutionJobInfo> | GraphExecutionJobInfo),
) => {
return http.post("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateExecutionScheduleResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV1CreateExecutionScheduleMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV1CreateExecutionScheduleResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListExecutionSchedulesForAGraphMockHandler = (
overrideResponse?:
| GraphExecutionJobInfo[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GraphExecutionJobInfo[]> | GraphExecutionJobInfo[]),
) => {
return http.get("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListExecutionSchedulesForAGraphResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListExecutionSchedulesForAGraphMockHandler200 = (
overrideResponse?:
| GraphExecutionJobInfo[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GraphExecutionJobInfo[]> | GraphExecutionJobInfo[]),
) => {
return http.get("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListExecutionSchedulesForAGraphResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListExecutionSchedulesForAGraphMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.get("*/api/graphs/:graphId/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListExecutionSchedulesForAGraphResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListExecutionSchedulesForAUserMockHandler = (
overrideResponse?:
| GraphExecutionJobInfo[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GraphExecutionJobInfo[]> | GraphExecutionJobInfo[]),
) => {
return http.get("*/api/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListExecutionSchedulesForAUserResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getGetV1ListExecutionSchedulesForAUserMockHandler200 = (
overrideResponse?:
| GraphExecutionJobInfo[]
| ((
info: Parameters<Parameters<typeof http.get>[1]>[0],
) => Promise<GraphExecutionJobInfo[]> | GraphExecutionJobInfo[]),
) => {
return http.get("*/api/schedules", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getGetV1ListExecutionSchedulesForAUserResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1DeleteExecutionScheduleMockHandler = (
overrideResponse?:
| DeleteV1DeleteExecutionSchedule200
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) =>
| Promise<DeleteV1DeleteExecutionSchedule200>
| DeleteV1DeleteExecutionSchedule200),
) => {
return http.delete("*/api/schedules/:scheduleId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1DeleteExecutionScheduleResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1DeleteExecutionScheduleMockHandler200 = (
overrideResponse?:
| DeleteV1DeleteExecutionSchedule200
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) =>
| Promise<DeleteV1DeleteExecutionSchedule200>
| DeleteV1DeleteExecutionSchedule200),
) => {
return http.delete("*/api/schedules/:scheduleId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1DeleteExecutionScheduleResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getDeleteV1DeleteExecutionScheduleMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.delete>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.delete("*/api/schedules/:scheduleId", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getDeleteV1DeleteExecutionScheduleResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getSchedulesMock = () => [
getPostV1CreateExecutionScheduleMockHandler(),
getGetV1ListExecutionSchedulesForAGraphMockHandler(),
getGetV1ListExecutionSchedulesForAUserMockHandler(),
getDeleteV1DeleteExecutionScheduleMockHandler(),
];

View File

@@ -1,185 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { faker } from "@faker-js/faker";
import { HttpResponse, delay, http } from "msw";
import type { HTTPValidationError } from "../../models/hTTPValidationError";
import type { TurnstileVerifyResponse } from "../../models/turnstileVerifyResponse";
export const getPostV2VerifyTurnstileTokenResponseMock = (
overrideResponse: Partial<TurnstileVerifyResponse> = {},
): TurnstileVerifyResponse => ({
success: faker.datatype.boolean(),
error: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
challenge_timestamp: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
hostname: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
action: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
...overrideResponse,
});
export const getPostV2VerifyTurnstileTokenResponseMock200 = (
overrideResponse: Partial<TurnstileVerifyResponse> = {},
): TurnstileVerifyResponse => ({
success: faker.datatype.boolean(),
error: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
challenge_timestamp: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
hostname: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
action: faker.helpers.arrayElement([
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
null,
]),
undefined,
]),
...overrideResponse,
});
export const getPostV2VerifyTurnstileTokenResponseMock422 = (
overrideResponse: Partial<HTTPValidationError> = {},
): HTTPValidationError => ({
detail: faker.helpers.arrayElement([
Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() => ({
loc: Array.from(
{ length: faker.number.int({ min: 1, max: 10 }) },
(_, i) => i + 1,
).map(() =>
faker.helpers.arrayElement([
faker.string.alpha({ length: { min: 10, max: 20 } }),
faker.number.int({
min: undefined,
max: undefined,
multipleOf: undefined,
}),
]),
),
msg: faker.string.alpha({ length: { min: 10, max: 20 } }),
type: faker.string.alpha({ length: { min: 10, max: 20 } }),
})),
undefined,
]),
...overrideResponse,
});
export const getPostV2VerifyTurnstileTokenMockHandler = (
overrideResponse?:
| TurnstileVerifyResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<TurnstileVerifyResponse> | TurnstileVerifyResponse),
) => {
return http.post("*/api/turnstile/verify", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2VerifyTurnstileTokenResponseMock(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV2VerifyTurnstileTokenMockHandler200 = (
overrideResponse?:
| TurnstileVerifyResponse
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<TurnstileVerifyResponse> | TurnstileVerifyResponse),
) => {
return http.post("*/api/turnstile/verify", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2VerifyTurnstileTokenResponseMock200(),
),
{ status: 200, headers: { "Content-Type": "application/json" } },
);
});
};
export const getPostV2VerifyTurnstileTokenMockHandler422 = (
overrideResponse?:
| HTTPValidationError
| ((
info: Parameters<Parameters<typeof http.post>[1]>[0],
) => Promise<HTTPValidationError> | HTTPValidationError),
) => {
return http.post("*/api/turnstile/verify", async (info) => {
await delay(1000);
return new HttpResponse(
JSON.stringify(
overrideResponse !== undefined
? typeof overrideResponse === "function"
? await overrideResponse(info)
: overrideResponse
: getPostV2VerifyTurnstileTokenResponseMock422(),
),
{ status: 422, headers: { "Content-Type": "application/json" } },
);
});
};
export const getTurnstileMock = () => [
getPostV2VerifyTurnstileTokenMockHandler(),
];

View File

@@ -1,53 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 CompleteProviderNames =
(typeof CompleteProviderNames)[keyof typeof CompleteProviderNames];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const CompleteProviderNames = {
aiml_api: "aiml_api",
anthropic: "anthropic",
apollo: "apollo",
compass: "compass",
d_id: "d_id",
discord: "discord",
e2b: "e2b",
fal: "fal",
generic_webhook: "generic_webhook",
github: "github",
google: "google",
google_maps: "google_maps",
groq: "groq",
http: "http",
hubspot: "hubspot",
ideogram: "ideogram",
jina: "jina",
linear: "linear",
llama_api: "llama_api",
medium: "medium",
mem0: "mem0",
notion: "notion",
nvidia: "nvidia",
ollama: "ollama",
open_router: "open_router",
openai: "openai",
openweathermap: "openweathermap",
pinecone: "pinecone",
reddit: "reddit",
replicate: "replicate",
revid: "revid",
screenshotone: "screenshotone",
slant3d: "slant3d",
smartlead: "smartlead",
smtp: "smtp",
todoist: "todoist",
twitter: "twitter",
unreal_speech: "unreal_speech",
zerobounce: "zerobounce",
} as const;

View File

@@ -1,10 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { ProviderDetails } from "./providerDetails";
export type GetV1GetProvidersDetails200 = { [key: string]: ProviderDetails };

View File

@@ -1,17 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { ProviderDetailsSource } from "./providerDetailsSource";
import type { ProviderDetailsSupportedCredentialTypesItem } from "./providerDetailsSupportedCredentialTypesItem";
export interface ProviderDetails {
name: string;
source: ProviderDetailsSource;
has_oauth: boolean;
has_webhooks: boolean;
supported_credential_types?: ProviderDetailsSupportedCredentialTypesItem[];
}

View File

@@ -1,17 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 ProviderDetailsSource =
(typeof ProviderDetailsSource)[keyof typeof ProviderDetailsSource];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ProviderDetailsSource = {
static: "static",
dynamic: "dynamic",
both: "both",
} as const;

View File

@@ -1,18 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 ProviderDetailsSupportedCredentialTypesItem =
(typeof ProviderDetailsSupportedCredentialTypesItem)[keyof typeof ProviderDetailsSupportedCredentialTypesItem];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ProviderDetailsSupportedCredentialTypesItem = {
api_key: "api_key",
oauth2: "oauth2",
user_password: "user_password",
host_scoped: "host_scoped",
} as const;

View File

@@ -1,53 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 ProviderName = (typeof ProviderName)[keyof typeof ProviderName];
// eslint-disable-next-line @typescript-eslint/no-redeclare
export const ProviderName = {
aiml_api: "aiml_api",
anthropic: "anthropic",
apollo: "apollo",
compass: "compass",
discord: "discord",
d_id: "d_id",
e2b: "e2b",
exa: "exa",
fal: "fal",
generic_webhook: "generic_webhook",
github: "github",
google: "google",
google_maps: "google_maps",
groq: "groq",
http: "http",
hubspot: "hubspot",
ideogram: "ideogram",
jina: "jina",
linear: "linear",
llama_api: "llama_api",
medium: "medium",
mem0: "mem0",
notion: "notion",
nvidia: "nvidia",
ollama: "ollama",
openai: "openai",
openweathermap: "openweathermap",
open_router: "open_router",
pinecone: "pinecone",
reddit: "reddit",
replicate: "replicate",
revid: "revid",
screenshotone: "screenshotone",
slant3d: "slant3d",
smartlead: "smartlead",
smtp: "smtp",
twitter: "twitter",
todoist: "todoist",
unreal_speech: "unreal_speech",
zerobounce: "zerobounce",
} as const;

View File

@@ -1,272 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* Get store listings with their version history for admins.
This provides a consolidated view of listings with their versions,
allowing for an expandable UI in the admin dashboard.
Args:
status: Filter by submission status (PENDING, APPROVED, REJECTED)
search: Search by name, description, or user email
page: Page number for pagination
page_size: Number of items per page
Returns:
StoreListingsWithVersionsResponse with listings and their versions
* @summary Get Admin Listings History
*/
export const getV2GetAdminListingsHistoryQueryPageDefault = 1;
export const getV2GetAdminListingsHistoryQueryPageSizeDefault = 20;
export const getV2GetAdminListingsHistoryQueryParams = zod.object({
status: zod
.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"])
.or(zod.null())
.optional(),
search: zod.string().or(zod.null()).optional(),
page: zod.number().default(getV2GetAdminListingsHistoryQueryPageDefault),
page_size: zod
.number()
.default(getV2GetAdminListingsHistoryQueryPageSizeDefault),
});
export const getV2GetAdminListingsHistoryResponseListingsItemHasApprovedVersionDefault = false;
export const getV2GetAdminListingsHistoryResponseListingsItemVersionsDefault =
[];
export const getV2GetAdminListingsHistoryResponse = zod
.object({
listings: zod.array(
zod
.object({
listing_id: zod.string(),
slug: zod.string(),
agent_id: zod.string(),
agent_version: zod.number(),
active_version_id: zod.string().or(zod.null()).optional(),
has_approved_version: zod.boolean().optional(),
creator_email: zod.string().or(zod.null()).optional(),
latest_version: zod
.object({
agent_id: zod.string(),
agent_version: zod.number(),
name: zod.string(),
sub_heading: zod.string(),
slug: zod.string(),
description: zod.string(),
image_urls: zod.array(zod.string()),
date_submitted: zod.string().datetime({}),
status: zod.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"]),
runs: zod.number(),
rating: zod.number(),
store_listing_version_id: zod.string().or(zod.null()).optional(),
version: zod.number().or(zod.null()).optional(),
reviewer_id: zod.string().or(zod.null()).optional(),
review_comments: zod.string().or(zod.null()).optional(),
internal_comments: zod.string().or(zod.null()).optional(),
reviewed_at: zod.string().datetime({}).or(zod.null()).optional(),
changes_summary: zod.string().or(zod.null()).optional(),
})
.or(zod.null())
.optional(),
versions: zod
.array(
zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
name: zod.string(),
sub_heading: zod.string(),
slug: zod.string(),
description: zod.string(),
image_urls: zod.array(zod.string()),
date_submitted: zod.string().datetime({}),
status: zod.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"]),
runs: zod.number(),
rating: zod.number(),
store_listing_version_id: zod
.string()
.or(zod.null())
.optional(),
version: zod.number().or(zod.null()).optional(),
reviewer_id: zod.string().or(zod.null()).optional(),
review_comments: zod.string().or(zod.null()).optional(),
internal_comments: zod.string().or(zod.null()).optional(),
reviewed_at: zod
.string()
.datetime({})
.or(zod.null())
.optional(),
changes_summary: zod.string().or(zod.null()).optional(),
}),
)
.default(
getV2GetAdminListingsHistoryResponseListingsItemVersionsDefault,
),
})
.describe("A store listing with its version history"),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
})
.describe("Response model for listings with version history");
/**
* Review a store listing submission.
Args:
store_listing_version_id: ID of the submission to review
request: Review details including approval status and comments
user: Authenticated admin user performing the review
Returns:
StoreSubmission with updated review information
* @summary Review Store Submission
*/
export const postV2ReviewStoreSubmissionParams = zod.object({
store_listing_version_id: zod.string(),
});
export const postV2ReviewStoreSubmissionBody = zod.object({
store_listing_version_id: zod.string(),
is_approved: zod.boolean(),
comments: zod.string(),
internal_comments: zod.string().or(zod.null()).optional(),
});
export const postV2ReviewStoreSubmissionResponse = zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
name: zod.string(),
sub_heading: zod.string(),
slug: zod.string(),
description: zod.string(),
image_urls: zod.array(zod.string()),
date_submitted: zod.string().datetime({}),
status: zod.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"]),
runs: zod.number(),
rating: zod.number(),
store_listing_version_id: zod.string().or(zod.null()).optional(),
version: zod.number().or(zod.null()).optional(),
reviewer_id: zod.string().or(zod.null()).optional(),
review_comments: zod.string().or(zod.null()).optional(),
internal_comments: zod.string().or(zod.null()).optional(),
reviewed_at: zod.string().datetime({}).or(zod.null()).optional(),
changes_summary: zod.string().or(zod.null()).optional(),
});
/**
* Download the agent file by streaming its content.
Args:
store_listing_version_id (str): The ID of the agent to download
Returns:
StreamingResponse: A streaming response containing the agent's graph data.
Raises:
HTTPException: If the agent is not found or an unexpected error occurs.
* @summary Admin Download Agent File
*/
export const getV2AdminDownloadAgentFileParams = zod.object({
store_listing_version_id: zod
.string()
.describe("The ID of the agent to download"),
});
export const getV2AdminDownloadAgentFileResponse = zod.any();
/**
* @summary Add Credits to User
*/
export const postV2AddCreditsToUserBody = zod.object({
user_id: zod.string(),
amount: zod.number(),
comments: zod.string(),
});
export const postV2AddCreditsToUserResponse = zod.object({
new_balance: zod.number(),
transaction_key: zod.string(),
});
/**
* @summary Get All Users History
*/
export const getV2GetAllUsersHistoryQueryPageDefault = 1;
export const getV2GetAllUsersHistoryQueryPageSizeDefault = 20;
export const getV2GetAllUsersHistoryQueryParams = zod.object({
search: zod.string().or(zod.null()).optional(),
page: zod.number().default(getV2GetAllUsersHistoryQueryPageDefault),
page_size: zod.number().default(getV2GetAllUsersHistoryQueryPageSizeDefault),
transaction_filter: zod
.enum(["TOP_UP", "USAGE", "GRANT", "REFUND", "CARD_CHECK"])
.or(zod.null())
.optional(),
});
export const getV2GetAllUsersHistoryResponseHistoryItemTransactionKeyDefault =
"";
export const getV2GetAllUsersHistoryResponseHistoryItemTransactionTimeDefault =
"0001-01-01T00:00:00Z";
export const getV2GetAllUsersHistoryResponseHistoryItemAmountDefault = 0;
export const getV2GetAllUsersHistoryResponseHistoryItemRunningBalanceDefault = 0;
export const getV2GetAllUsersHistoryResponseHistoryItemCurrentBalanceDefault = 0;
export const getV2GetAllUsersHistoryResponseHistoryItemUsageNodeCountDefault = 0;
export const getV2GetAllUsersHistoryResponseHistoryItemUsageStartTimeDefault =
"9999-12-31T23:59:59.999999Z";
export const getV2GetAllUsersHistoryResponse = zod
.object({
history: zod.array(
zod.object({
transaction_key: zod.string().optional(),
transaction_time: zod
.string()
.datetime({})
.default(
getV2GetAllUsersHistoryResponseHistoryItemTransactionTimeDefault,
),
transaction_type: zod
.enum(["TOP_UP", "USAGE", "GRANT", "REFUND", "CARD_CHECK"])
.optional(),
amount: zod.number().optional(),
running_balance: zod.number().optional(),
current_balance: zod.number().optional(),
description: zod.string().or(zod.null()).optional(),
usage_graph_id: zod.string().or(zod.null()).optional(),
usage_execution_id: zod.string().or(zod.null()).optional(),
usage_node_count: zod.number().optional(),
usage_start_time: zod
.string()
.datetime({})
.default(
getV2GetAllUsersHistoryResponseHistoryItemUsageStartTimeDefault,
),
user_id: zod.string(),
user_email: zod.string().or(zod.null()).optional(),
reason: zod.string().or(zod.null()).optional(),
admin_email: zod.string().or(zod.null()).optional(),
extra_data: zod.string().or(zod.null()).optional(),
}),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
})
.describe("Response model for listings with version history");

View File

@@ -1,34 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Log Raw Metric
*/
export const postV1LogRawMetricBody = zod.object({
metric_name: zod.string().min(1),
metric_value: zod.number(),
data_string: zod.string().min(1),
});
export const postV1LogRawMetricResponse = zod.any();
/**
* @summary Log Raw Analytics
*/
export const postV1LogRawAnalyticsBody = zod.object({
type: zod.string(),
data: zod.record(zod.string(), zod.any()).describe("The data to log"),
data_index: zod
.string()
.describe(
"Indexable field for any count based analytical measures like page order clicking, tutorial step completion, etc.",
),
});
export const postV1LogRawAnalyticsResponse = zod.any();

View File

@@ -1,170 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* List all API keys for the user
* @summary List user API keys
*/
export const getV1ListUserApiKeysResponse = zod
.array(
zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum([
"EXECUTE_GRAPH",
"READ_GRAPH",
"EXECUTE_BLOCK",
"READ_BLOCK",
]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
}),
)
.or(zod.record(zod.string(), zod.string()));
/**
* Create a new API key
* @summary Create new API key
*/
export const postV1CreateNewApiKeyBody = zod.object({
name: zod.string(),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
description: zod.string().or(zod.null()).optional(),
});
export const postV1CreateNewApiKeyResponse = zod.object({
api_key: zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
}),
plain_text_key: zod.string(),
});
/**
* Get a specific API key
* @summary Get specific API key
*/
export const getV1GetSpecificApiKeyParams = zod.object({
key_id: zod.string(),
});
export const getV1GetSpecificApiKeyResponse = zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
});
/**
* Revoke an API key
* @summary Revoke API key
*/
export const deleteV1RevokeApiKeyParams = zod.object({
key_id: zod.string(),
});
export const deleteV1RevokeApiKeyResponse = zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
});
/**
* Suspend an API key
* @summary Suspend API key
*/
export const postV1SuspendApiKeyParams = zod.object({
key_id: zod.string(),
});
export const postV1SuspendApiKeyResponse = zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
});
/**
* Update API key permissions
* @summary Update key permissions
*/
export const putV1UpdateKeyPermissionsParams = zod.object({
key_id: zod.string(),
});
export const putV1UpdateKeyPermissionsBody = zod.object({
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
});
export const putV1UpdateKeyPermissionsResponse = zod.object({
id: zod.string(),
name: zod.string(),
prefix: zod.string(),
postfix: zod.string(),
status: zod.enum(["ACTIVE", "REVOKED", "SUSPENDED"]),
permissions: zod.array(
zod.enum(["EXECUTE_GRAPH", "READ_GRAPH", "EXECUTE_BLOCK", "READ_BLOCK"]),
),
created_at: zod.string().datetime({}),
last_used_at: zod.string().datetime({}).or(zod.null()),
revoked_at: zod.string().datetime({}).or(zod.null()),
description: zod.string().or(zod.null()),
user_id: zod.string(),
});

View File

@@ -1,71 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Get or create user
*/
export const postV1GetOrCreateUserResponse = zod.any();
/**
* @summary Update user email
*/
export const postV1UpdateUserEmailBody = zod.string();
export const postV1UpdateUserEmailResponse = zod.record(
zod.string(),
zod.string(),
);
/**
* @summary Get notification preferences
*/
export const getV1GetNotificationPreferencesResponseDailyLimitDefault = 10;
export const getV1GetNotificationPreferencesResponseEmailsSentTodayDefault = 0;
export const getV1GetNotificationPreferencesResponse = zod.object({
user_id: zod.string(),
email: zod.string().email(),
preferences: zod
.record(zod.string(), zod.boolean())
.optional()
.describe("Which notifications the user wants"),
daily_limit: zod
.number()
.default(getV1GetNotificationPreferencesResponseDailyLimitDefault),
emails_sent_today: zod.number().optional(),
last_reset_date: zod.string().datetime({}).optional(),
});
/**
* @summary Update notification preferences
*/
export const postV1UpdateNotificationPreferencesBody = zod.object({
email: zod.string().email().describe("User's email address"),
preferences: zod
.record(zod.string(), zod.boolean())
.describe("Which notifications the user wants"),
daily_limit: zod.number().describe("Max emails per day"),
});
export const postV1UpdateNotificationPreferencesResponseDailyLimitDefault = 10;
export const postV1UpdateNotificationPreferencesResponseEmailsSentTodayDefault = 0;
export const postV1UpdateNotificationPreferencesResponse = zod.object({
user_id: zod.string(),
email: zod.string().email(),
preferences: zod
.record(zod.string(), zod.boolean())
.optional()
.describe("Which notifications the user wants"),
daily_limit: zod
.number()
.default(postV1UpdateNotificationPreferencesResponseDailyLimitDefault),
emails_sent_today: zod.number().optional(),
last_reset_date: zod.string().datetime({}).optional(),
});

View File

@@ -1,33 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary List available blocks
*/
export const getV1ListAvailableBlocksResponseItem = zod.record(
zod.string(),
zod.any(),
);
export const getV1ListAvailableBlocksResponse = zod.array(
getV1ListAvailableBlocksResponseItem,
);
/**
* @summary Execute graph block
*/
export const postV1ExecuteGraphBlockParams = zod.object({
block_id: zod.string(),
});
export const postV1ExecuteGraphBlockBody = zod.record(zod.string(), zod.any());
export const postV1ExecuteGraphBlockResponse = zod.record(
zod.string(),
zod.array(zod.any()),
);

View File

@@ -1,153 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Get user credits
*/
export const getV1GetUserCreditsResponse = zod.record(
zod.string(),
zod.number(),
);
/**
* @summary Request credit top up
*/
export const postV1RequestCreditTopUpBody = zod.object({
credit_amount: zod.number(),
});
export const postV1RequestCreditTopUpResponse = zod.any();
/**
* @summary Fulfill checkout session
*/
export const patchV1FulfillCheckoutSessionResponse = zod.any();
/**
* @summary Refund credit transaction
*/
export const postV1RefundCreditTransactionParams = zod.object({
transaction_key: zod.string(),
});
export const postV1RefundCreditTransactionBody = zod.record(
zod.string(),
zod.string(),
);
export const postV1RefundCreditTransactionResponse = zod.number();
/**
* @summary Get auto top up
*/
export const getV1GetAutoTopUpResponse = zod.object({
amount: zod.number(),
threshold: zod.number(),
});
/**
* @summary Configure auto top up
*/
export const postV1ConfigureAutoTopUpBody = zod.object({
amount: zod.number(),
threshold: zod.number(),
});
export const postV1ConfigureAutoTopUpResponse = zod.string();
/**
* @summary Handle Stripe webhooks
*/
export const postV1HandleStripeWebhooksResponse = zod.any();
/**
* @summary Manage payment methods
*/
export const getV1ManagePaymentMethodsResponse = zod.record(
zod.string(),
zod.string(),
);
/**
* @summary Get credit history
*/
export const getV1GetCreditHistoryQueryTransactionCountLimitDefault = 100;
export const getV1GetCreditHistoryQueryParams = zod.object({
transaction_time: zod.string().datetime({}).or(zod.null()).optional(),
transaction_type: zod.string().or(zod.null()).optional(),
transaction_count_limit: zod
.number()
.default(getV1GetCreditHistoryQueryTransactionCountLimitDefault),
});
export const getV1GetCreditHistoryResponseTransactionsItemTransactionKeyDefault =
"";
export const getV1GetCreditHistoryResponseTransactionsItemTransactionTimeDefault =
"0001-01-01T00:00:00Z";
export const getV1GetCreditHistoryResponseTransactionsItemAmountDefault = 0;
export const getV1GetCreditHistoryResponseTransactionsItemRunningBalanceDefault = 0;
export const getV1GetCreditHistoryResponseTransactionsItemCurrentBalanceDefault = 0;
export const getV1GetCreditHistoryResponseTransactionsItemUsageNodeCountDefault = 0;
export const getV1GetCreditHistoryResponseTransactionsItemUsageStartTimeDefault =
"9999-12-31T23:59:59.999999Z";
export const getV1GetCreditHistoryResponse = zod.object({
transactions: zod.array(
zod.object({
transaction_key: zod.string().optional(),
transaction_time: zod
.string()
.datetime({})
.default(
getV1GetCreditHistoryResponseTransactionsItemTransactionTimeDefault,
),
transaction_type: zod
.enum(["TOP_UP", "USAGE", "GRANT", "REFUND", "CARD_CHECK"])
.optional(),
amount: zod.number().optional(),
running_balance: zod.number().optional(),
current_balance: zod.number().optional(),
description: zod.string().or(zod.null()).optional(),
usage_graph_id: zod.string().or(zod.null()).optional(),
usage_execution_id: zod.string().or(zod.null()).optional(),
usage_node_count: zod.number().optional(),
usage_start_time: zod
.string()
.datetime({})
.default(
getV1GetCreditHistoryResponseTransactionsItemUsageStartTimeDefault,
),
user_id: zod.string(),
user_email: zod.string().or(zod.null()).optional(),
reason: zod.string().or(zod.null()).optional(),
admin_email: zod.string().or(zod.null()).optional(),
extra_data: zod.string().or(zod.null()).optional(),
}),
),
next_transaction_time: zod.string().datetime({}).or(zod.null()),
});
/**
* @summary Get refund requests
*/
export const getV1GetRefundRequestsResponseItem = zod.object({
id: zod.string(),
user_id: zod.string(),
transaction_key: zod.string(),
amount: zod.number(),
reason: zod.string(),
result: zod.string().or(zod.null()).optional(),
status: zod.string(),
created_at: zod.string().datetime({}),
updated_at: zod.string().datetime({}),
});
export const getV1GetRefundRequestsResponse = zod.array(
getV1GetRefundRequestsResponseItem,
);

View File

@@ -1,181 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary One Click Email Unsubscribe
*/
export const postV1OneClickEmailUnsubscribeQueryParams = zod.object({
token: zod.string(),
});
export const postV1OneClickEmailUnsubscribeResponse = zod.any();
/**
* @summary Handle Postmark Email Webhooks
*/
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefault =
"Delivery";
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultOne =
"Bounce";
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultTwo =
"SpamComplaint";
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultThree =
"Open";
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultFour =
"Click";
export const postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultFive =
"SubscriptionChange";
export const postV1HandlePostmarkEmailWebhooksBody = zod
.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefault),
ServerID: zod.number(),
MessageStream: zod.string(),
MessageID: zod.string(),
Recipient: zod.string(),
Tag: zod.string(),
DeliveredAt: zod.string(),
Details: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
})
.or(
zod.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultOne),
ID: zod.number(),
Type: zod.string(),
TypeCode: zod
.literal(1)
.or(zod.literal(2))
.or(zod.literal(16))
.or(zod.literal(32))
.or(zod.literal(64))
.or(zod.literal(128))
.or(zod.literal(256))
.or(zod.literal(512))
.or(zod.literal(1024))
.or(zod.literal(2048))
.or(zod.literal(4096))
.or(zod.literal(8192))
.or(zod.literal(16384))
.or(zod.literal(100000))
.or(zod.literal(100001))
.or(zod.literal(100002))
.or(zod.literal(100003))
.or(zod.literal(100006))
.or(zod.literal(100007))
.or(zod.literal(100008))
.or(zod.literal(100009))
.or(zod.literal(100010)),
Tag: zod.string(),
MessageID: zod.string(),
Details: zod.string(),
Email: zod.string(),
From: zod.string(),
BouncedAt: zod.string(),
Inactive: zod.boolean(),
DumpAvailable: zod.boolean(),
CanActivate: zod.boolean(),
Subject: zod.string(),
ServerID: zod.number(),
MessageStream: zod.string(),
Content: zod.string(),
Name: zod.string(),
Description: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
}),
)
.or(
zod.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultTwo),
ID: zod.number(),
Type: zod.string(),
TypeCode: zod.number(),
Tag: zod.string(),
MessageID: zod.string(),
Details: zod.string(),
Email: zod.string(),
From: zod.string(),
BouncedAt: zod.string(),
Inactive: zod.boolean(),
DumpAvailable: zod.boolean(),
CanActivate: zod.boolean(),
Subject: zod.string(),
ServerID: zod.number(),
MessageStream: zod.string(),
Content: zod.string(),
Name: zod.string(),
Description: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
}),
)
.or(
zod.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultThree),
MessageStream: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
FirstOpen: zod.boolean(),
Recipient: zod.string(),
MessageID: zod.string(),
ReceivedAt: zod.string(),
Platform: zod.string(),
ReadSeconds: zod.number(),
Tag: zod.string(),
UserAgent: zod.string(),
OS: zod.record(zod.string(), zod.string()),
Client: zod.record(zod.string(), zod.string()),
Geo: zod.record(zod.string(), zod.string()),
}),
)
.or(
zod.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultFour),
MessageStream: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
Recipient: zod.string(),
MessageID: zod.string(),
ReceivedAt: zod.string(),
Platform: zod.string(),
ClickLocation: zod.string(),
OriginalLink: zod.string(),
Tag: zod.string(),
UserAgent: zod.string(),
OS: zod.record(zod.string(), zod.string()),
Client: zod.record(zod.string(), zod.string()),
Geo: zod.record(zod.string(), zod.string()),
}),
)
.or(
zod.object({
RecordType: zod
.string()
.default(postV1HandlePostmarkEmailWebhooksBodyRecordTypeDefaultFive),
MessageID: zod.string(),
ServerID: zod.number(),
MessageStream: zod.string(),
ChangedAt: zod.string(),
Recipient: zod.string(),
Origin: zod.string(),
SuppressSending: zod.boolean(),
SuppressionReason: zod.string(),
Tag: zod.string(),
Metadata: zod.record(zod.string(), zod.string()),
}),
);
export const postV1HandlePostmarkEmailWebhooksResponse = zod.any();

View File

@@ -1,13 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Health
*/
export const getHealthHealthResponse = zod.any();

View File

@@ -1,324 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Login
*/
export const getV1LoginParams = zod.object({
provider: zod.string(),
});
export const getV1LoginQueryScopesDefault = "";
export const getV1LoginQueryParams = zod.object({
scopes: zod.string().optional(),
});
export const getV1LoginResponse = zod.object({
login_url: zod.string(),
state_token: zod.string(),
});
/**
* @summary Callback
*/
export const postV1CallbackParams = zod.object({
provider: zod.string(),
});
export const postV1CallbackBody = zod.object({
code: zod.string(),
state_token: zod.string(),
});
export const postV1CallbackResponse = zod.object({
id: zod.string(),
provider: zod.string(),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
title: zod.string().or(zod.null()),
scopes: zod.array(zod.string()).or(zod.null()),
username: zod.string().or(zod.null()),
host: zod
.string()
.or(zod.null())
.optional()
.describe("Host pattern for host-scoped credentials"),
});
/**
* @summary List Credentials
*/
export const getV1ListCredentialsResponseItem = zod.object({
id: zod.string(),
provider: zod.string(),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
title: zod.string().or(zod.null()),
scopes: zod.array(zod.string()).or(zod.null()),
username: zod.string().or(zod.null()),
host: zod
.string()
.or(zod.null())
.optional()
.describe("Host pattern for host-scoped credentials"),
});
export const getV1ListCredentialsResponse = zod.array(
getV1ListCredentialsResponseItem,
);
/**
* @summary List Credentials By Provider
*/
export const getV1ListCredentialsByProviderParams = zod.object({
provider: zod.string(),
});
export const getV1ListCredentialsByProviderResponseItem = zod.object({
id: zod.string(),
provider: zod.string(),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
title: zod.string().or(zod.null()),
scopes: zod.array(zod.string()).or(zod.null()),
username: zod.string().or(zod.null()),
host: zod
.string()
.or(zod.null())
.optional()
.describe("Host pattern for host-scoped credentials"),
});
export const getV1ListCredentialsByProviderResponse = zod.array(
getV1ListCredentialsByProviderResponseItem,
);
/**
* @summary Create Credentials
*/
export const postV1CreateCredentialsParams = zod.object({
provider: zod.string(),
});
export const postV1CreateCredentialsBodyTypeDefault = "oauth2";
export const postV1CreateCredentialsBodyTypeDefaultOne = "api_key";
export const postV1CreateCredentialsBodyTypeDefaultTwo = "user_password";
export const postV1CreateCredentialsBodyTypeDefaultThree = "host_scoped";
export const postV1CreateCredentialsBody = zod
.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(postV1CreateCredentialsBodyTypeDefault),
username: zod.string().or(zod.null()).optional(),
access_token: zod.string(),
access_token_expires_at: zod.number().or(zod.null()).optional(),
refresh_token: zod.string().or(zod.null()).optional(),
refresh_token_expires_at: zod.number().or(zod.null()).optional(),
scopes: zod.array(zod.string()),
metadata: zod.record(zod.string(), zod.any()).optional(),
})
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(postV1CreateCredentialsBodyTypeDefaultOne),
api_key: zod.string(),
expires_at: zod
.number()
.or(zod.null())
.optional()
.describe(
"Unix timestamp (seconds) indicating when the API key expires (if at all)",
),
}),
)
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(postV1CreateCredentialsBodyTypeDefaultTwo),
username: zod.string(),
password: zod.string(),
}),
)
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(postV1CreateCredentialsBodyTypeDefaultThree),
host: zod
.string()
.describe("The host/URI pattern to match against request URLs"),
headers: zod
.record(zod.string(), zod.string())
.optional()
.describe("Key-value header map to add to matching requests"),
}),
);
/**
* @summary Get Credential
*/
export const getV1GetCredentialParams = zod.object({
provider: zod.string(),
cred_id: zod.string(),
});
export const getV1GetCredentialResponseTypeDefault = "oauth2";
export const getV1GetCredentialResponseTypeDefaultOne = "api_key";
export const getV1GetCredentialResponseTypeDefaultTwo = "user_password";
export const getV1GetCredentialResponseTypeDefaultThree = "host_scoped";
export const getV1GetCredentialResponse = zod
.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(getV1GetCredentialResponseTypeDefault),
username: zod.string().or(zod.null()).optional(),
access_token: zod.string(),
access_token_expires_at: zod.number().or(zod.null()).optional(),
refresh_token: zod.string().or(zod.null()).optional(),
refresh_token_expires_at: zod.number().or(zod.null()).optional(),
scopes: zod.array(zod.string()),
metadata: zod.record(zod.string(), zod.any()).optional(),
})
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(getV1GetCredentialResponseTypeDefaultOne),
api_key: zod.string(),
expires_at: zod
.number()
.or(zod.null())
.optional()
.describe(
"Unix timestamp (seconds) indicating when the API key expires (if at all)",
),
}),
)
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(getV1GetCredentialResponseTypeDefaultTwo),
username: zod.string(),
password: zod.string(),
}),
)
.or(
zod.object({
id: zod.string().optional(),
provider: zod.string(),
title: zod.string().or(zod.null()).optional(),
type: zod.string().default(getV1GetCredentialResponseTypeDefaultThree),
host: zod
.string()
.describe("The host/URI pattern to match against request URLs"),
headers: zod
.record(zod.string(), zod.string())
.optional()
.describe("Key-value header map to add to matching requests"),
}),
);
/**
* @summary Delete Credentials
*/
export const deleteV1DeleteCredentialsParams = zod.object({
provider: zod.string(),
cred_id: zod.string(),
});
export const deleteV1DeleteCredentialsQueryForceDefault = false;
export const deleteV1DeleteCredentialsQueryParams = zod.object({
force: zod.boolean().optional(),
});
export const deleteV1DeleteCredentialsResponseDeletedDefault = true;
export const deleteV1DeleteCredentialsResponseDeletedDefaultOne = false;
export const deleteV1DeleteCredentialsResponseNeedConfirmationDefault = true;
export const deleteV1DeleteCredentialsResponse = zod
.object({
deleted: zod
.boolean()
.default(deleteV1DeleteCredentialsResponseDeletedDefault),
revoked: zod
.boolean()
.or(zod.null())
.describe(
"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.",
),
})
.or(
zod.object({
deleted: zod.boolean().optional(),
need_confirmation: zod
.boolean()
.default(deleteV1DeleteCredentialsResponseNeedConfirmationDefault),
message: zod.string(),
}),
);
/**
* @summary Webhook Ingress Generic
*/
export const postV1WebhookIngressGenericParams = zod.object({
provider: zod.string(),
webhook_id: zod.string(),
});
export const postV1WebhookIngressGenericResponse = zod.any();
/**
* @summary Webhook Ping
*/
export const postV1WebhookPingParams = zod.object({
webhook_id: zod.string(),
});
export const postV1WebhookPingResponse = zod.any();
/**
* Get a list of all available provider names.
Returns both statically defined providers (from ProviderName enum)
and dynamically registered providers (from SDK decorators).
* @summary List Providers
*/
export const getV1ListProvidersResponseItem = zod.string();
export const getV1ListProvidersResponse = zod.array(
getV1ListProvidersResponseItem,
);
/**
* Get detailed information about all providers.
Returns a dictionary mapping provider names to their details,
including supported credential types and other metadata.
* @summary Get Providers Details
*/
export const getV1GetProvidersDetailsResponse = zod.record(
zod.string(),
zod.object({
name: zod.string(),
source: zod.enum(["static", "dynamic", "both"]),
has_oauth: zod.boolean(),
has_webhooks: zod.boolean(),
supported_credential_types: zod
.array(zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]))
.optional(),
}),
);

View File

@@ -1,497 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* Get all agents in the user's library (both created and saved).
Args:
user_id: ID of the authenticated user.
search_term: Optional search term to filter agents by name/description.
filter_by: List of filters to apply (favorites, created by user).
sort_by: List of sorting criteria (created date, updated date).
page: Page number to retrieve.
page_size: Number of agents per page.
Returns:
A LibraryAgentResponse containing agents and pagination metadata.
Raises:
HTTPException: If a server/database error occurs.
* @summary List Library Agents
*/
export const getV2ListLibraryAgentsQueryPageDefault = 1;
export const getV2ListLibraryAgentsQueryPageSizeDefault = 15;
export const getV2ListLibraryAgentsQueryParams = zod.object({
search_term: zod
.string()
.or(zod.null())
.optional()
.describe("Search term to filter agents"),
sort_by: zod
.enum(["createdAt", "updatedAt"])
.optional()
.describe("Criteria to sort results by"),
page: zod
.number()
.min(1)
.default(getV2ListLibraryAgentsQueryPageDefault)
.describe("Page number to retrieve (must be >= 1)"),
page_size: zod
.number()
.min(1)
.default(getV2ListLibraryAgentsQueryPageSizeDefault)
.describe("Number of agents per page (must be >= 1)"),
});
export const getV2ListLibraryAgentsResponse = zod
.object({
agents: zod.array(
zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
})
.describe(
"Response schema for a list of library agents and pagination info.",
);
/**
* Add an agent from the marketplace to the user's library.
Args:
store_listing_version_id: ID of the store listing version to add.
user_id: ID of the authenticated user.
Returns:
library_model.LibraryAgent: Agent added to the library
Raises:
HTTPException(404): If the listing version is not found.
HTTPException(500): If a server/database error occurs.
* @summary Add Marketplace Agent
*/
export const postV2AddMarketplaceAgentBody = zod.object({
store_listing_version_id: zod.string(),
});
/**
* @summary Get Library Agent
*/
export const getV2GetLibraryAgentParams = zod.object({
library_agent_id: zod.string(),
});
export const getV2GetLibraryAgentResponse = zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
);
/**
* Update the library agent with the given fields.
Args:
library_agent_id: ID of the library agent to update.
payload: Fields to update (auto_update_version, is_favorite, etc.).
user_id: ID of the authenticated user.
Raises:
HTTPException(500): If a server/database error occurs.
* @summary Update Library Agent
*/
export const patchV2UpdateLibraryAgentParams = zod.object({
library_agent_id: zod.string(),
});
export const patchV2UpdateLibraryAgentBody = zod
.object({
auto_update_version: zod
.boolean()
.or(zod.null())
.optional()
.describe("Auto-update the agent version"),
is_favorite: zod
.boolean()
.or(zod.null())
.optional()
.describe("Mark the agent as a favorite"),
is_archived: zod
.boolean()
.or(zod.null())
.optional()
.describe("Archive the agent"),
})
.describe(
"Schema for updating a library agent via PUT.\n\nIncludes flags for auto-updating version, marking as favorite,\narchiving, or deleting.",
);
export const patchV2UpdateLibraryAgentResponse = zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
);
/**
* Soft-delete the specified library agent.
Args:
library_agent_id: ID of the library agent to delete.
user_id: ID of the authenticated user.
Returns:
204 No Content if successful.
Raises:
HTTPException(404): If the agent does not exist.
HTTPException(500): If a server/database error occurs.
* @summary Delete Library Agent
*/
export const deleteV2DeleteLibraryAgentParams = zod.object({
library_agent_id: zod.string(),
});
export const deleteV2DeleteLibraryAgentResponse = zod.any();
/**
* @summary Get Library Agent By Graph Id
*/
export const getV2GetLibraryAgentByGraphIdParams = zod.object({
graph_id: zod.string(),
});
export const getV2GetLibraryAgentByGraphIdQueryParams = zod.object({
version: zod.number().or(zod.null()).optional(),
});
export const getV2GetLibraryAgentByGraphIdResponse = zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
);
/**
* Get Library Agent from Store Listing Version ID.
* @summary Get Agent By Store ID
*/
export const getV2GetAgentByStoreIdParams = zod.object({
store_listing_version_id: zod.string(),
});
export const getV2GetAgentByStoreIdResponse = zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
)
.or(zod.null());
/**
* @summary Fork Library Agent
*/
export const postV2ForkLibraryAgentParams = zod.object({
library_agent_id: zod.string(),
});
export const postV2ForkLibraryAgentResponse = zod
.object({
id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
image_url: zod.string().or(zod.null()),
creator_name: zod.string(),
creator_image_url: zod.string(),
status: zod.enum(["COMPLETED", "HEALTHY", "WAITING", "ERROR"]),
updated_at: zod.string().datetime({}),
name: zod.string(),
description: zod.string(),
input_schema: zod.record(zod.string(), zod.any()),
credentials_input_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for credentials required by the agent"),
has_external_trigger: zod
.boolean()
.describe(
"Whether the agent has an external trigger (e.g. webhook) node",
),
trigger_setup_info: zod
.object({
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
config_schema: zod
.record(zod.string(), zod.any())
.describe("Input schema for the trigger block"),
credentials_input_name: zod.string().or(zod.null()),
})
.or(zod.null())
.optional(),
new_output: zod.boolean(),
can_access_graph: zod.boolean(),
is_latest_version: zod.boolean(),
})
.describe(
"Represents an agent in the library, including metadata for display and\nuser interaction within the system.",
);
/**
* Sets up a webhook-triggered `LibraryAgentPreset` for a `LibraryAgent`.
Returns the correspondingly created `LibraryAgentPreset` with `webhook_id` set.
* @summary Setup Trigger
*/
export const postV2SetupTriggerParams = zod.object({
library_agent_id: zod.string().describe("ID of the library agent"),
});
export const postV2SetupTriggerBodyDescriptionDefault = "";
export const postV2SetupTriggerBody = zod.object({
name: zod.string(),
description: zod.string().optional(),
trigger_config: zod.record(zod.string(), zod.any()),
agent_credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.optional(),
});
export const postV2SetupTriggerResponseIsActiveDefault = true;
export const postV2SetupTriggerResponse = zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod.boolean().default(postV2SetupTriggerResponseIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
id: zod.string(),
user_id: zod.string(),
updated_at: zod.string().datetime({}),
})
.describe("Represents a preset configuration for a library agent.");

View File

@@ -1,83 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Get onboarding status
*/
export const getV1GetOnboardingStatusResponse = zod.any();
/**
* @summary Update onboarding progress
*/
export const patchV1UpdateOnboardingProgressBody = zod.object({
completedSteps: zod
.array(
zod.enum([
"WELCOME",
"USAGE_REASON",
"INTEGRATIONS",
"AGENT_CHOICE",
"AGENT_NEW_RUN",
"AGENT_INPUT",
"CONGRATS",
"GET_RESULTS",
"RUN_AGENTS",
"MARKETPLACE_VISIT",
"MARKETPLACE_ADD_AGENT",
"MARKETPLACE_RUN_AGENT",
"BUILDER_OPEN",
"BUILDER_SAVE_AGENT",
"BUILDER_RUN_AGENT",
]),
)
.or(zod.null())
.optional(),
notificationDot: zod.boolean().or(zod.null()).optional(),
notified: zod
.array(
zod.enum([
"WELCOME",
"USAGE_REASON",
"INTEGRATIONS",
"AGENT_CHOICE",
"AGENT_NEW_RUN",
"AGENT_INPUT",
"CONGRATS",
"GET_RESULTS",
"RUN_AGENTS",
"MARKETPLACE_VISIT",
"MARKETPLACE_ADD_AGENT",
"MARKETPLACE_RUN_AGENT",
"BUILDER_OPEN",
"BUILDER_SAVE_AGENT",
"BUILDER_RUN_AGENT",
]),
)
.or(zod.null())
.optional(),
usageReason: zod.string().or(zod.null()).optional(),
integrations: zod.array(zod.string()).or(zod.null()).optional(),
otherIntegrations: zod.string().or(zod.null()).optional(),
selectedStoreListingVersionId: zod.string().or(zod.null()).optional(),
agentInput: zod.record(zod.string(), zod.any()).or(zod.null()).optional(),
onboardingAgentExecutionId: zod.string().or(zod.null()).optional(),
agentRuns: zod.number().or(zod.null()).optional(),
});
export const patchV1UpdateOnboardingProgressResponse = zod.any();
/**
* @summary Get recommended agents
*/
export const getV1GetRecommendedAgentsResponse = zod.any();
/**
* @summary Check onboarding enabled
*/
export const getV1CheckOnboardingEnabledResponse = zod.any();

View File

@@ -1,39 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* Proxy requests to Otto API while adding necessary security headers and logging.
Requires an authenticated user.
* @summary Proxy Otto Chat Request
*/
export const postV2ProxyOttoChatRequestBodyIncludeGraphDataDefault = false;
export const postV2ProxyOttoChatRequestBody = zod.object({
query: zod.string(),
conversation_history: zod.array(
zod.object({
query: zod.string(),
response: zod.string(),
}),
),
message_id: zod.string(),
include_graph_data: zod.boolean().optional(),
graph_id: zod.string().or(zod.null()).optional(),
});
export const postV2ProxyOttoChatRequestResponse = zod.object({
answer: zod.string(),
documents: zod.array(
zod.object({
url: zod.string(),
relevance_score: zod.number(),
}),
),
success: zod.boolean(),
});

View File

@@ -1,280 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* Retrieve a paginated list of presets for the current user.
* @summary List presets
*/
export const getV2ListPresetsQueryPageDefault = 1;
export const getV2ListPresetsQueryPageSizeDefault = 10;
export const getV2ListPresetsQueryParams = zod.object({
page: zod.number().min(1).default(getV2ListPresetsQueryPageDefault),
page_size: zod.number().min(1).default(getV2ListPresetsQueryPageSizeDefault),
graph_id: zod
.string()
.or(zod.null())
.describe("Allows to filter presets by a specific agent graph"),
});
export const getV2ListPresetsResponsePresetsItemIsActiveDefault = true;
export const getV2ListPresetsResponse = zod
.object({
presets: zod.array(
zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum([
"api_key",
"oauth2",
"user_password",
"host_scoped",
]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod
.boolean()
.default(getV2ListPresetsResponsePresetsItemIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
id: zod.string(),
user_id: zod.string(),
updated_at: zod.string().datetime({}),
})
.describe("Represents a preset configuration for a library agent."),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
})
.describe("Response schema for a list of agent presets and pagination info.");
/**
* Create a new preset for the current user.
* @summary Create a new preset
*/
export const postV2CreateANewPresetBodyIsActiveDefault = true;
export const postV2CreateANewPresetBodyIsActiveDefaultOne = true;
export const postV2CreateANewPresetBody = zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod.boolean().default(postV2CreateANewPresetBodyIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
})
.describe(
"Request model used when creating a new preset for a library agent.",
)
.or(
zod
.object({
graph_execution_id: zod.string(),
name: zod.string(),
description: zod.string(),
is_active: zod
.boolean()
.default(postV2CreateANewPresetBodyIsActiveDefaultOne),
})
.describe(
"Request model used when creating a new preset for a library agent.",
),
);
export const postV2CreateANewPresetResponseIsActiveDefault = true;
export const postV2CreateANewPresetResponse = zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod
.boolean()
.default(postV2CreateANewPresetResponseIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
id: zod.string(),
user_id: zod.string(),
updated_at: zod.string().datetime({}),
})
.describe("Represents a preset configuration for a library agent.");
/**
* Retrieve details for a specific preset by its ID.
* @summary Get a specific preset
*/
export const getV2GetASpecificPresetParams = zod.object({
preset_id: zod.string(),
});
export const getV2GetASpecificPresetResponseIsActiveDefault = true;
export const getV2GetASpecificPresetResponse = zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod
.boolean()
.default(getV2GetASpecificPresetResponseIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
id: zod.string(),
user_id: zod.string(),
updated_at: zod.string().datetime({}),
})
.describe("Represents a preset configuration for a library agent.");
/**
* Update an existing preset by its ID.
* @summary Update an existing preset
*/
export const patchV2UpdateAnExistingPresetParams = zod.object({
preset_id: zod.string(),
});
export const patchV2UpdateAnExistingPresetBody = zod
.object({
inputs: zod.record(zod.string(), zod.any()).or(zod.null()).optional(),
credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.or(zod.null())
.optional(),
name: zod.string().or(zod.null()).optional(),
description: zod.string().or(zod.null()).optional(),
is_active: zod.boolean().or(zod.null()).optional(),
})
.describe("Request model used when updating a preset for a library agent.");
export const patchV2UpdateAnExistingPresetResponseIsActiveDefault = true;
export const patchV2UpdateAnExistingPresetResponse = zod
.object({
graph_id: zod.string(),
graph_version: zod.number(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
),
name: zod.string(),
description: zod.string(),
is_active: zod
.boolean()
.default(patchV2UpdateAnExistingPresetResponseIsActiveDefault),
webhook_id: zod.string().or(zod.null()).optional(),
id: zod.string(),
user_id: zod.string(),
updated_at: zod.string().datetime({}),
})
.describe("Represents a preset configuration for a library agent.");
/**
* Delete an existing preset by its ID.
* @summary Delete a preset
*/
export const deleteV2DeleteAPresetParams = zod.object({
preset_id: zod.string(),
});
/**
* Execute a preset with the given graph and node input for the current user.
* @summary Execute a preset
*/
export const postV2ExecuteAPresetParams = zod.object({
preset_id: zod.string(),
});
export const postV2ExecuteAPresetBody = zod.object({
inputs: zod.record(zod.string(), zod.any()).optional(),
});
export const postV2ExecuteAPresetResponse = zod.record(zod.string(), zod.any());

View File

@@ -1,143 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* @summary Create execution schedule
*/
export const postV1CreateExecutionScheduleParams = zod.object({
graph_id: zod.string().describe("ID of the graph to schedule"),
});
export const postV1CreateExecutionScheduleBody = zod.object({
graph_version: zod.number().or(zod.null()).optional(),
name: zod.string(),
cron: zod.string(),
inputs: zod.record(zod.string(), zod.any()),
credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.optional(),
});
export const postV1CreateExecutionScheduleResponse = zod.object({
user_id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
cron: zod.string(),
input_data: zod.record(zod.string(), zod.any()),
input_credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.optional(),
id: zod.string(),
name: zod.string(),
next_run_time: zod.string(),
});
/**
* @summary List execution schedules for a graph
*/
export const getV1ListExecutionSchedulesForAGraphParams = zod.object({
graph_id: zod.string(),
});
export const getV1ListExecutionSchedulesForAGraphResponseItem = zod.object({
user_id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
cron: zod.string(),
input_data: zod.record(zod.string(), zod.any()),
input_credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.optional(),
id: zod.string(),
name: zod.string(),
next_run_time: zod.string(),
});
export const getV1ListExecutionSchedulesForAGraphResponse = zod.array(
getV1ListExecutionSchedulesForAGraphResponseItem,
);
/**
* @summary List execution schedules for a user
*/
export const getV1ListExecutionSchedulesForAUserResponseItem = zod.object({
user_id: zod.string(),
graph_id: zod.string(),
graph_version: zod.number(),
cron: zod.string(),
input_data: zod.record(zod.string(), zod.any()),
input_credentials: zod
.record(
zod.string(),
zod.object({
id: zod.string(),
title: zod.string().or(zod.null()).optional(),
provider: zod
.string()
.describe(
"Provider name for integrations. Can be any string value, including custom provider names.",
),
type: zod.enum(["api_key", "oauth2", "user_password", "host_scoped"]),
}),
)
.optional(),
id: zod.string(),
name: zod.string(),
next_run_time: zod.string(),
});
export const getV1ListExecutionSchedulesForAUserResponse = zod.array(
getV1ListExecutionSchedulesForAUserResponseItem,
);
/**
* @summary Delete execution schedule
*/
export const deleteV1DeleteExecutionScheduleParams = zod.object({
schedule_id: zod.string().describe("ID of the schedule to delete"),
});
export const deleteV1DeleteExecutionScheduleResponse = zod.record(
zod.string(),
zod.any(),
);

View File

@@ -1,492 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* Get the profile details for the authenticated user.
* @summary Get user profile
*/
export const getV2GetUserProfileResponse = zod.object({
name: zod.string(),
username: zod.string(),
description: zod.string(),
links: zod.array(zod.string()),
avatar_url: zod.string().or(zod.null()).optional(),
});
/**
* Update the store profile for the authenticated user.
Args:
profile (Profile): The updated profile details
user_id (str): ID of the authenticated user
Returns:
CreatorDetails: The updated profile
Raises:
HTTPException: If there is an error updating the profile
* @summary Update user profile
*/
export const postV2UpdateUserProfileBodyIsFeaturedDefault = false;
export const postV2UpdateUserProfileBody = zod.object({
name: zod.string(),
username: zod.string(),
description: zod.string(),
links: zod.array(zod.string()),
avatar_url: zod.string(),
is_featured: zod.boolean().optional(),
});
export const postV2UpdateUserProfileResponse = zod.object({
name: zod.string(),
username: zod.string(),
description: zod.string(),
links: zod.array(zod.string()),
avatar_url: zod.string(),
agent_rating: zod.number(),
agent_runs: zod.number(),
top_categories: zod.array(zod.string()),
});
/**
* Get a paginated list of agents from the store with optional filtering and sorting.
Args:
featured (bool, optional): Filter to only show featured agents. Defaults to False.
creator (str | None, optional): Filter agents by creator username. Defaults to None.
sorted_by (str | None, optional): Sort agents by "runs" or "rating". Defaults to None.
search_query (str | None, optional): Search agents by name, subheading and description. Defaults to None.
category (str | None, optional): Filter agents by category. Defaults to None.
page (int, optional): Page number for pagination. Defaults to 1.
page_size (int, optional): Number of agents per page. Defaults to 20.
Returns:
StoreAgentsResponse: Paginated list of agents matching the filters
Raises:
HTTPException: If page or page_size are less than 1
Used for:
- Home Page Featured Agents
- Home Page Top Agents
- Search Results
- Agent Details - Other Agents By Creator
- Agent Details - Similar Agents
- Creator Details - Agents By Creator
* @summary List store agents
*/
export const getV2ListStoreAgentsQueryFeaturedDefault = false;
export const getV2ListStoreAgentsQueryPageDefault = 1;
export const getV2ListStoreAgentsQueryPageSizeDefault = 20;
export const getV2ListStoreAgentsQueryParams = zod.object({
featured: zod.boolean().optional(),
creator: zod.string().or(zod.null()).optional(),
sorted_by: zod.string().or(zod.null()).optional(),
search_query: zod.string().or(zod.null()).optional(),
category: zod.string().or(zod.null()).optional(),
page: zod.number().default(getV2ListStoreAgentsQueryPageDefault),
page_size: zod.number().default(getV2ListStoreAgentsQueryPageSizeDefault),
});
export const getV2ListStoreAgentsResponse = zod.object({
agents: zod.array(
zod.object({
slug: zod.string(),
agent_name: zod.string(),
agent_image: zod.string(),
creator: zod.string(),
creator_avatar: zod.string(),
sub_heading: zod.string(),
description: zod.string(),
runs: zod.number(),
rating: zod.number(),
}),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
});
/**
* This is only used on the AgentDetails Page
It returns the store listing agents details.
* @summary Get specific agent
*/
export const getV2GetSpecificAgentParams = zod.object({
username: zod.string(),
agent_name: zod.string(),
});
export const getV2GetSpecificAgentResponseHasApprovedVersionDefault = false;
export const getV2GetSpecificAgentResponse = zod.object({
store_listing_version_id: zod.string(),
slug: zod.string(),
agent_name: zod.string(),
agent_video: zod.string(),
agent_image: zod.array(zod.string()),
creator: zod.string(),
creator_avatar: zod.string(),
sub_heading: zod.string(),
description: zod.string(),
categories: zod.array(zod.string()),
runs: zod.number(),
rating: zod.number(),
versions: zod.array(zod.string()),
last_updated: zod.string().datetime({}),
active_version_id: zod.string().or(zod.null()).optional(),
has_approved_version: zod.boolean().optional(),
});
/**
* Get Agent Graph from Store Listing Version ID.
* @summary Get agent graph
*/
export const getV2GetAgentGraphParams = zod.object({
store_listing_version_id: zod.string(),
});
export const getV2GetAgentGraphResponse = zod.any();
/**
* Get Store Agent Details from Store Listing Version ID.
* @summary Get agent by version
*/
export const getV2GetAgentByVersionParams = zod.object({
store_listing_version_id: zod.string(),
});
export const getV2GetAgentByVersionResponseHasApprovedVersionDefault = false;
export const getV2GetAgentByVersionResponse = zod.object({
store_listing_version_id: zod.string(),
slug: zod.string(),
agent_name: zod.string(),
agent_video: zod.string(),
agent_image: zod.array(zod.string()),
creator: zod.string(),
creator_avatar: zod.string(),
sub_heading: zod.string(),
description: zod.string(),
categories: zod.array(zod.string()),
runs: zod.number(),
rating: zod.number(),
versions: zod.array(zod.string()),
last_updated: zod.string().datetime({}),
active_version_id: zod.string().or(zod.null()).optional(),
has_approved_version: zod.boolean().optional(),
});
/**
* Create a review for a store agent.
Args:
username: Creator's username
agent_name: Name/slug of the agent
review: Review details including score and optional comments
user_id: ID of authenticated user creating the review
Returns:
The created review
* @summary Create agent review
*/
export const postV2CreateAgentReviewParams = zod.object({
username: zod.string(),
agent_name: zod.string(),
});
export const postV2CreateAgentReviewBody = zod.object({
store_listing_version_id: zod.string(),
score: zod.number(),
comments: zod.string().or(zod.null()).optional(),
});
export const postV2CreateAgentReviewResponse = zod.object({
score: zod.number(),
comments: zod.string().or(zod.null()).optional(),
});
/**
* This is needed for:
- Home Page Featured Creators
- Search Results Page
---
To support this functionality we need:
- featured: bool - to limit the list to just featured agents
- search_query: str - vector search based on the creators profile description.
- sorted_by: [agent_rating, agent_runs] -
* @summary List store creators
*/
export const getV2ListStoreCreatorsQueryFeaturedDefault = false;
export const getV2ListStoreCreatorsQueryPageDefault = 1;
export const getV2ListStoreCreatorsQueryPageSizeDefault = 20;
export const getV2ListStoreCreatorsQueryParams = zod.object({
featured: zod.boolean().optional(),
search_query: zod.string().or(zod.null()).optional(),
sorted_by: zod.string().or(zod.null()).optional(),
page: zod.number().default(getV2ListStoreCreatorsQueryPageDefault),
page_size: zod.number().default(getV2ListStoreCreatorsQueryPageSizeDefault),
});
export const getV2ListStoreCreatorsResponse = zod.object({
creators: zod.array(
zod.object({
name: zod.string(),
username: zod.string(),
description: zod.string(),
avatar_url: zod.string(),
num_agents: zod.number(),
agent_rating: zod.number(),
agent_runs: zod.number(),
is_featured: zod.boolean(),
}),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
});
/**
* Get the details of a creator
- Creator Details Page
* @summary Get creator details
*/
export const getV2GetCreatorDetailsParams = zod.object({
username: zod.string(),
});
export const getV2GetCreatorDetailsResponse = zod.object({
name: zod.string(),
username: zod.string(),
description: zod.string(),
links: zod.array(zod.string()),
avatar_url: zod.string(),
agent_rating: zod.number(),
agent_runs: zod.number(),
top_categories: zod.array(zod.string()),
});
/**
* @summary Get my agents
*/
export const getV2GetMyAgentsResponse = zod.object({
agents: zod.array(
zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
agent_name: zod.string(),
agent_image: zod.string().or(zod.null()).optional(),
description: zod.string(),
last_edited: zod.string().datetime({}),
}),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
});
/**
* Delete a store listing submission.
Args:
user_id (str): ID of the authenticated user
submission_id (str): ID of the submission to be deleted
Returns:
bool: True if the submission was successfully deleted, False otherwise
* @summary Delete store submission
*/
export const deleteV2DeleteStoreSubmissionParams = zod.object({
submission_id: zod.string(),
});
export const deleteV2DeleteStoreSubmissionResponse = zod.boolean();
/**
* Get a paginated list of store submissions for the authenticated user.
Args:
user_id (str): ID of the authenticated user
page (int, optional): Page number for pagination. Defaults to 1.
page_size (int, optional): Number of submissions per page. Defaults to 20.
Returns:
StoreListingsResponse: Paginated list of store submissions
Raises:
HTTPException: If page or page_size are less than 1
* @summary List my submissions
*/
export const getV2ListMySubmissionsQueryPageDefault = 1;
export const getV2ListMySubmissionsQueryPageSizeDefault = 20;
export const getV2ListMySubmissionsQueryParams = zod.object({
page: zod.number().default(getV2ListMySubmissionsQueryPageDefault),
page_size: zod.number().default(getV2ListMySubmissionsQueryPageSizeDefault),
});
export const getV2ListMySubmissionsResponse = zod.object({
submissions: zod.array(
zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
name: zod.string(),
sub_heading: zod.string(),
slug: zod.string(),
description: zod.string(),
image_urls: zod.array(zod.string()),
date_submitted: zod.string().datetime({}),
status: zod.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"]),
runs: zod.number(),
rating: zod.number(),
store_listing_version_id: zod.string().or(zod.null()).optional(),
version: zod.number().or(zod.null()).optional(),
reviewer_id: zod.string().or(zod.null()).optional(),
review_comments: zod.string().or(zod.null()).optional(),
internal_comments: zod.string().or(zod.null()).optional(),
reviewed_at: zod.string().datetime({}).or(zod.null()).optional(),
changes_summary: zod.string().or(zod.null()).optional(),
}),
),
pagination: zod.object({
total_items: zod.number().describe("Total number of items."),
total_pages: zod.number().describe("Total number of pages."),
current_page: zod.number().describe("Current_page page number."),
page_size: zod.number().describe("Number of items per page."),
}),
});
/**
* Create a new store listing submission.
Args:
submission_request (StoreSubmissionRequest): The submission details
user_id (str): ID of the authenticated user submitting the listing
Returns:
StoreSubmission: The created store submission
Raises:
HTTPException: If there is an error creating the submission
* @summary Create store submission
*/
export const postV2CreateStoreSubmissionBodyImageUrlsDefault = [];
export const postV2CreateStoreSubmissionBodyDescriptionDefault = "";
export const postV2CreateStoreSubmissionBodyCategoriesDefault = [];
export const postV2CreateStoreSubmissionBody = zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
slug: zod.string(),
name: zod.string(),
sub_heading: zod.string(),
video_url: zod.string().or(zod.null()).optional(),
image_urls: zod
.array(zod.string())
.default(postV2CreateStoreSubmissionBodyImageUrlsDefault),
description: zod.string().optional(),
categories: zod
.array(zod.string())
.default(postV2CreateStoreSubmissionBodyCategoriesDefault),
changes_summary: zod.string().or(zod.null()).optional(),
});
export const postV2CreateStoreSubmissionResponse = zod.object({
agent_id: zod.string(),
agent_version: zod.number(),
name: zod.string(),
sub_heading: zod.string(),
slug: zod.string(),
description: zod.string(),
image_urls: zod.array(zod.string()),
date_submitted: zod.string().datetime({}),
status: zod.enum(["DRAFT", "PENDING", "APPROVED", "REJECTED"]),
runs: zod.number(),
rating: zod.number(),
store_listing_version_id: zod.string().or(zod.null()).optional(),
version: zod.number().or(zod.null()).optional(),
reviewer_id: zod.string().or(zod.null()).optional(),
review_comments: zod.string().or(zod.null()).optional(),
internal_comments: zod.string().or(zod.null()).optional(),
reviewed_at: zod.string().datetime({}).or(zod.null()).optional(),
changes_summary: zod.string().or(zod.null()).optional(),
});
/**
* Upload media (images/videos) for a store listing submission.
Args:
file (UploadFile): The media file to upload
user_id (str): ID of the authenticated user uploading the media
Returns:
str: URL of the uploaded media file
Raises:
HTTPException: If there is an error uploading the media
* @summary Upload submission media
*/
export const postV2UploadSubmissionMediaBody = zod.object({
file: zod.instanceof(File),
});
export const postV2UploadSubmissionMediaResponse = zod.any();
/**
* Generate an image for a store listing submission.
Args:
agent_id (str): ID of the agent to generate an image for
user_id (str): ID of the authenticated user
Returns:
JSONResponse: JSON containing the URL of the generated image
* @summary Generate submission image
*/
export const postV2GenerateSubmissionImageQueryParams = zod.object({
agent_id: zod.string(),
});
export const postV2GenerateSubmissionImageResponse = zod.any();
/**
* Download the agent file by streaming its content.
Args:
store_listing_version_id (str): The ID of the agent to download
Returns:
StreamingResponse: A streaming response containing the agent's graph data.
Raises:
HTTPException: If the agent is not found or an unexpected error occurs.
* @summary Download agent file
*/
export const getV2DownloadAgentFileParams = zod.object({
store_listing_version_id: zod
.string()
.describe("The ID of the agent to download"),
});
export const getV2DownloadAgentFileResponse = zod.any();

View File

@@ -1,53 +0,0 @@
/**
* Generated by orval v7.10.0 🍺
* 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 { z as zod } from "zod";
/**
* 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 const postV2VerifyTurnstileTokenBody = zod
.object({
token: zod.string().describe("The Turnstile token to verify"),
action: zod
.string()
.or(zod.null())
.optional()
.describe("The action that the user is attempting to perform"),
})
.describe("Request model for verifying a Turnstile token.");
export const postV2VerifyTurnstileTokenResponse = zod
.object({
success: zod
.boolean()
.describe("Whether the token verification was successful"),
error: zod
.string()
.or(zod.null())
.optional()
.describe("Error message if verification failed"),
challenge_timestamp: zod
.string()
.or(zod.null())
.optional()
.describe("Timestamp of the challenge (ISO format)"),
hostname: zod
.string()
.or(zod.null())
.optional()
.describe("Hostname of the site where the challenge was solved"),
action: zod
.string()
.or(zod.null())
.optional()
.describe("The action associated with this verification"),
})
.describe("Response model for the Turnstile verification endpoint.");