diff --git a/.changeset/vast-tires-tickle.md b/.changeset/vast-tires-tickle.md new file mode 100644 index 00000000000..d0da3fe7021 --- /dev/null +++ b/.changeset/vast-tires-tickle.md @@ -0,0 +1,5 @@ +--- +"@thirdweb-dev/nebula": minor +--- + +Initial release of the Nebula TS sdk diff --git a/package.json b/package.json index 0e780159c7b..fc9e3c0ff93 100644 --- a/package.json +++ b/package.json @@ -55,16 +55,16 @@ "build": "turbo run build --filter=./packages/*", "build:release": "turbo run build --filter=./packages/* --force", "changeset": "changeset", - "dashboard": "turbo run dev --filter=./apps/dashboard --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/vault-sdk --filter=./packages/engine", + "dashboard": "turbo run dev --filter=./apps/dashboard --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/vault-sdk --filter=./packages/engine --filter=./packages/nebula", "dashboard:build": "turbo run build --filter=./apps/dashboard", "e2e": "turbo run e2e --filter=./packages/*", "fix": "turbo run fix", "hotlink-init": "node ./scripts/hotlink/hotlink-init.mjs", "hotlink-revert": "node ./scripts/hotlink/hotlink-revert.mjs", "lint": "pnpm dlx sherif@latest -i remark-gfm -i eslint && turbo run lint", - "playground": "turbo run dev --filter=./apps/playground-web --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", + "playground": "turbo run dev --filter=./apps/playground-web --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula", "playground:build": "turbo run build --filter=./apps/playground-web", - "portal": "turbo run dev --filter=./apps/portal --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", + "portal": "turbo run dev --filter=./apps/portal --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula", "portal:build": "turbo run build --filter=./apps/portal", "prefix": "pnpm dlx sherif@latest -i remark-gfm -i eslint --fix", "preinstall": "npx only-allow pnpm", @@ -75,8 +75,9 @@ "typedoc": "turbo run typedoc", "version-packages": "changeset version", "version-packages:nightly": "node scripts/pre-nightly.mjs && changeset version --snapshot nightly", - "wallet-ui": "turbo run dev --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine", - "wallet-ui:build": "turbo run build --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine" + "wallet-ui": "turbo run dev --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula", + "wallet-ui:build": "turbo run build --filter=./apps/wallet-ui --filter=./packages/thirdweb --filter=./packages/insight --filter=./packages/engine --filter=./packages/nebula" }, + "version": "1.0.0" } diff --git a/packages/nebula/README.md b/packages/nebula/README.md new file mode 100644 index 00000000000..46d461c6376 --- /dev/null +++ b/packages/nebula/README.md @@ -0,0 +1,46 @@ +# Nebula OpenAPI TypeScript wrapper + +This package is a thin OpenAPI wrapper for Nebula, our AI agent service. + +## Configuration + +```ts +import { configure } from "@thirdweb-dev/nebula"; + +// call this once at the startup of your application +configure({ + secretKey: "", +}); +``` + +You can also configure the client with a Thirdweb client instance: + +```ts +import { configureWithClient } from "@thirdweb-dev/nebula"; +import { twClient } from "./thirdwebClient"; + +// call this once at the startup of your application +configureWithClient(twClient); +``` + +## Example Usage + +```ts +import { getModels } from "@thirdweb-dev/nebula"; + +const models = await getModels(); +``` + +You can also use this package on a client application (eg. NextJS) by retrieving the Nebula API client first. + +```ts +import { getNebulaClient, getAgents } from "@thirdweb-dev/nebula"; + +// retrieve the Nebula auth token +const nebulaClient = getNebulaClient(authToken); + +// pass the client inside the methods +const agentsResult = await getAgents({ client: nebulaClient }); +``` + +This package was autogenerated from the [Nebula openAPI spec](https://nebula-api.thirdweb.com/docs) using [@hey-api/openapi-ts](https://github.com/hey-api/openapi-ts) diff --git a/packages/nebula/biome.json b/packages/nebula/biome.json new file mode 100644 index 00000000000..780bbdcd1af --- /dev/null +++ b/packages/nebula/biome.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", + "extends": "//" +} diff --git a/packages/nebula/openapi-ts.config.ts b/packages/nebula/openapi-ts.config.ts new file mode 100644 index 00000000000..1a7cfdd4b94 --- /dev/null +++ b/packages/nebula/openapi-ts.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "@hey-api/openapi-ts"; + +export default defineConfig({ + input: "https://nebula-api.thirdweb-dev.com/openapi.json", + output: { format: "biome", lint: "biome", path: "src/client" }, + plugins: ["@hey-api/client-fetch"], +}); diff --git a/packages/nebula/package.json b/packages/nebula/package.json new file mode 100644 index 00000000000..352e808ad3c --- /dev/null +++ b/packages/nebula/package.json @@ -0,0 +1,62 @@ +{ + "name": "@thirdweb-dev/nebula", + "version": "0.0.0", + "repository": { + "type": "git", + "url": "git+https://github.com/thirdweb-dev/js.git#main" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/thirdweb-dev/js/issues" + }, + "author": "thirdweb eng ", + "type": "module", + "main": "./dist/cjs/exports/thirdweb.js", + "module": "./dist/esm/exports/thirdweb.js", + "types": "./dist/types/exports/thirdweb.d.ts", + "typings": "./dist/types/exports/thirdweb.d.ts", + "exports": { + ".": { + "types": "./dist/types/exports/thirdweb.d.ts", + "import": "./dist/esm/exports/thirdweb.js", + "default": "./dist/cjs/exports/thirdweb.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist/*", + "src/*" + ], + "dependencies": { + "@hey-api/client-fetch": "0.10.0", + "thirdweb": "workspace:*" + }, + "devDependencies": { + "@biomejs/biome": "2.0.0", + "@hey-api/openapi-ts": "0.72.1", + "rimraf": "6.0.1", + "tslib": "^2.8.1" + }, + "peerDependencies": { + "typescript": ">=5.0.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + }, + "scripts": { + "format": "biome format ./src --write", + "lint": "biome check ./src", + "fix": "biome check ./src --fix", + "build": "pnpm clean && pnpm build:cjs && pnpm build:esm && pnpm build:types", + "build:cjs": "tsc --project ./tsconfig.build.json --module commonjs --outDir ./dist/cjs --verbatimModuleSyntax false && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", + "build:esm": "tsc --project ./tsconfig.build.json --module es2020 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json", + "build:types": "tsc --project ./tsconfig.build.json --module esnext --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap", + "clean": "rimraf dist", + "build:generate": "openapi-ts && pnpm format" + }, + "engines": { + "node": ">=18" + } +} diff --git a/packages/nebula/src/client/client.gen.ts b/packages/nebula/src/client/client.gen.ts new file mode 100644 index 00000000000..942b097f334 --- /dev/null +++ b/packages/nebula/src/client/client.gen.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { + type Config, + createClient, + createConfig, + type ClientOptions as DefaultClientOptions, +} from "@hey-api/client-fetch"; +import type { ClientOptions } from "./types.gen.js"; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = + ( + override?: Config, + ) => Config & T>; + +export const client = createClient( + createConfig({ + baseUrl: "https://nebula-api.thirdweb-dev.com", + }), +); diff --git a/packages/nebula/src/client/index.ts b/packages/nebula/src/client/index.ts new file mode 100644 index 00000000000..58ea430d932 --- /dev/null +++ b/packages/nebula/src/client/index.ts @@ -0,0 +1,4 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export * from "./sdk.gen.js"; +export * from "./types.gen.js"; diff --git a/packages/nebula/src/client/sdk.gen.ts b/packages/nebula/src/client/sdk.gen.ts new file mode 100644 index 00000000000..a00f41eb487 --- /dev/null +++ b/packages/nebula/src/client/sdk.gen.ts @@ -0,0 +1,1213 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { + Client, + Options as ClientOptions, + TDataShape, +} from "@hey-api/client-fetch"; +import { client as _heyApiClient } from "./client.gen.js"; +import type { + AuthDelegateLoginData, + AuthDelegateLoginErrors, + AuthDelegateLoginResponses, + CreateAgentData, + CreateAgentErrors, + CreateAgentResponses, + CreateAgentToolData, + CreateAgentToolErrors, + CreateAgentToolResponses, + CreateAgentTriggerData, + CreateAgentTriggerErrors, + CreateAgentTriggerResponses, + CreateConversationData, + CreateConversationErrors, + CreateConversationMessageData, + CreateConversationMessageErrors, + CreateConversationMessageResponses, + CreateConversationResponses, + CreateUserWalletData, + CreateUserWalletErrors, + CreateUserWalletResponses, + DeleteAgentData, + DeleteAgentErrors, + DeleteAgentResponses, + DeleteAgentToolData, + DeleteAgentToolErrors, + DeleteAgentToolResponses, + DeleteAgentTriggerData, + DeleteAgentTriggerErrors, + DeleteAgentTriggerResponses, + DeleteConversationData, + DeleteConversationErrors, + DeleteConversationResponses, + DeleteUserWalletData, + DeleteUserWalletErrors, + DeleteUserWalletResponses, + DeprecatedChatCompletionsData, + DeprecatedChatCompletionsErrors, + DeprecatedChatCompletionsResponses, + DeprecatedChatData, + DeprecatedChatErrors, + DeprecatedChatResponses, + DeprecatedClearSessionData, + DeprecatedClearSessionErrors, + DeprecatedClearSessionResponses, + DeprecatedCreateSessionData, + DeprecatedCreateSessionErrors, + DeprecatedCreateSessionResponses, + DeprecatedDeleteSessionData, + DeprecatedDeleteSessionErrors, + DeprecatedDeleteSessionResponses, + DeprecatedExecuteData, + DeprecatedExecuteErrors, + DeprecatedExecuteResponses, + DeprecatedGetSessionData, + DeprecatedGetSessionErrors, + DeprecatedGetSessionResponses, + DeprecatedGetSessionsData, + DeprecatedGetSessionsResponses, + DeprecatedUpdateSessionData, + DeprecatedUpdateSessionErrors, + DeprecatedUpdateSessionResponses, + FeedbackData, + FeedbackErrors, + FeedbackResponses, + GetAgentData, + GetAgentErrors, + GetAgentResponses, + GetAgentsData, + GetAgentsResponses, + GetAgentToolData, + GetAgentToolErrors, + GetAgentToolResponses, + GetAgentTriggerData, + GetAgentTriggerErrors, + GetAgentTriggerResponses, + GetAgentWalletData, + GetAgentWalletErrors, + GetAgentWalletResponses, + GetAgentWalletsData, + GetAgentWalletsErrors, + GetAgentWalletsResponses, + GetAuthDelegatePayloadData, + GetAuthDelegatePayloadErrors, + GetAuthDelegatePayloadResponses, + GetConversationData, + GetConversationErrors, + GetConversationResponses, + GetConversationsData, + GetConversationsErrors, + GetConversationsResponses, + GetModelsData, + GetModelsResponses, + GetRegistryAgentsData, + GetRegistryAgentsErrors, + GetRegistryAgentsResponses, + GetUserData, + GetUserResponses, + GetUserWalletData, + GetUserWalletErrors, + GetUserWalletResponses, + GetUserWalletsData, + GetUserWalletsResponses, + UpdateAgentData, + UpdateAgentErrors, + UpdateAgentResponses, + UpdateAgentToolData, + UpdateAgentToolErrors, + UpdateAgentToolResponses, + UpdateAgentTriggerData, + UpdateAgentTriggerErrors, + UpdateAgentTriggerResponses, + UpdateConversationData, + UpdateConversationErrors, + UpdateConversationMessageData, + UpdateConversationMessageErrors, + UpdateConversationMessageResponses, + UpdateConversationResponses, + UpdateUserWalletData, + UpdateUserWalletErrors, + UpdateUserWalletResponses, + VerifyAuthData, + VerifyAuthResponses, +} from "./types.gen.js"; + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, +> = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +/** + * Get Session List + */ +export const deprecatedGetSessions = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + DeprecatedGetSessionsResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session/list", + ...options, + }); +}; + +/** + * Delete Session + */ +export const deprecatedDeleteSession = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeprecatedDeleteSessionResponses, + DeprecatedDeleteSessionErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session/{session_id}", + ...options, + }); +}; + +/** + * Get Session + */ +export const deprecatedGetSession = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + DeprecatedGetSessionResponses, + DeprecatedGetSessionErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session/{session_id}", + ...options, + }); +}; + +/** + * Update Session + */ +export const deprecatedUpdateSession = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + DeprecatedUpdateSessionResponses, + DeprecatedUpdateSessionErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session/{session_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Session + */ +export const deprecatedCreateSession = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + DeprecatedCreateSessionResponses, + DeprecatedCreateSessionErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Clear Session + */ +export const deprecatedClearSession = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + DeprecatedClearSessionResponses, + DeprecatedClearSessionErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/session/{session_id}/clear", + ...options, + }); +}; + +/** + * Chat + * Process a chat message and return the response + */ +export const deprecatedChat = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + DeprecatedChatResponses, + DeprecatedChatErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/chat", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Chat Completions + * Process a chat message and return the response + */ +export const deprecatedChatCompletions = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + DeprecatedChatCompletionsResponses, + DeprecatedChatCompletionsErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/chat/completions", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Execute + * Process an execute request and return the response + */ +export const deprecatedExecute = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + DeprecatedExecuteResponses, + DeprecatedExecuteErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/execute", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Feedback + * Process a feedback request and return the response + */ +export const feedback = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + FeedbackResponses, + FeedbackErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/feedback", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Get Models + * Get all models + */ +export const getModels = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetModelsResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/models", + ...options, + }); +}; + +/** + * Get Delegate Payload + * Get a delegate payload + */ +export const getAuthDelegatePayload = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + GetAuthDelegatePayloadResponses, + GetAuthDelegatePayloadErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/auth/delegate/payload", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Login Delegate + * Login with SIWE + */ +export const authDelegateLogin = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + AuthDelegateLoginResponses, + AuthDelegateLoginErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/auth/delegate/login", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Verify Auth + * Verify a delegate payload + */ +export const verifyAuth = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + VerifyAuthResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/auth/verify", + ...options, + }); +}; + +/** + * Get User + * Get the current user + */ +export const getUser = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetUserResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user", + ...options, + }); +}; + +/** + * Get User Wallets + * Get all user wallets + */ +export const getUserWallets = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetUserWalletsResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user/wallets", + ...options, + }); +}; + +/** + * Delete User Wallet + * Delete a user wallet + */ +export const deleteUserWallet = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteUserWalletResponses, + DeleteUserWalletErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user/wallet/{wallet_id}", + ...options, + }); +}; + +/** + * Get User Wallet + * Get a user wallet + */ +export const getUserWallet = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetUserWalletResponses, + GetUserWalletErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user/wallet/{wallet_id}", + ...options, + }); +}; + +/** + * Put User Wallet + * Update a user wallet + */ +export const updateUserWallet = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateUserWalletResponses, + UpdateUserWalletErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user/wallet/{wallet_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Post User Wallet + * Create a user wallet + */ +export const createUserWallet = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateUserWalletResponses, + CreateUserWalletErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/user/wallet", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Get Agents + * Get all agents + */ +export const getAgents = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetAgentsResponses, + unknown, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agents", + ...options, + }); +}; + +/** + * Delete Agent + * Delete an agent + */ +export const deleteAgent = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteAgentResponses, + DeleteAgentErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}", + ...options, + }); +}; + +/** + * Get Agent + * Get an agent + */ +export const getAgent = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetAgentResponses, + GetAgentErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}", + ...options, + }); +}; + +/** + * Update Agent + * Update an agent + */ +export const updateAgent = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateAgentResponses, + UpdateAgentErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Agent + * Create an agent + */ +export const createAgent = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateAgentResponses, + CreateAgentErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Delete Agent Trigger + * Delete an agent trigger + */ +export const deleteAgentTrigger = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteAgentTriggerResponses, + DeleteAgentTriggerErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/trigger/{trigger_id}", + ...options, + }); +}; + +/** + * Get Agent Trigger + * Get an agent trigger + */ +export const getAgentTrigger = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetAgentTriggerResponses, + GetAgentTriggerErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/trigger/{trigger_id}", + ...options, + }); +}; + +/** + * Update Agent Trigger + * Update an agent trigger + */ +export const updateAgentTrigger = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateAgentTriggerResponses, + UpdateAgentTriggerErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/trigger/{trigger_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Agent Trigger + * Create an agent trigger + */ +export const createAgentTrigger = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateAgentTriggerResponses, + CreateAgentTriggerErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/trigger", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Delete Agent Tool + * Delete an agent tool + */ +export const deleteAgentTool = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteAgentToolResponses, + DeleteAgentToolErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/tool/{tool_id}", + ...options, + }); +}; + +/** + * Get Agent Tool + * Get an agent tool + */ +export const getAgentTool = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetAgentToolResponses, + GetAgentToolErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/tool/{tool_id}", + ...options, + }); +}; + +/** + * Update Agent Tool + * Update an agent tool + */ +export const updateAgentTool = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateAgentToolResponses, + UpdateAgentToolErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/tool/{tool_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Agent Tool + * Create an agent tool + */ +export const createAgentTool = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateAgentToolResponses, + CreateAgentToolErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/tool", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Get Agent Wallets + * Get all agent wallets + */ +export const getAgentWallets = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetAgentWalletsResponses, + GetAgentWalletsErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/wallets", + ...options, + }); +}; + +/** + * Get Agent Wallet + * Get an agent wallet + */ +export const getAgentWallet = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetAgentWalletResponses, + GetAgentWalletErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/agent/{agent_id}/wallet/{wallet_id}", + ...options, + }); +}; + +/** + * Get Conversations + * Get all conversations + */ +export const getConversations = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetConversationsResponses, + GetConversationsErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversations", + ...options, + }); +}; + +/** + * Delete Conversation + * Delete a conversation + */ +export const deleteConversation = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).delete< + DeleteConversationResponses, + DeleteConversationErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation/{conversation_id}", + ...options, + }); +}; + +/** + * Get Conversation + * Get a conversation + */ +export const getConversation = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).get< + GetConversationResponses, + GetConversationErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation/{conversation_id}", + ...options, + }); +}; + +/** + * Update Conversation + * Update a conversation + */ +export const updateConversation = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateConversationResponses, + UpdateConversationErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation/{conversation_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Conversation + * Create a conversation + */ +export const createConversation = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateConversationResponses, + CreateConversationErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Create Conversation Message + * Create a message for a conversation + */ +export const createConversationMessage = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).post< + CreateConversationMessageResponses, + CreateConversationMessageErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation/{conversation_id}/message", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Update Conversation Message + * Update a message for a conversation + */ +export const updateConversationMessage = ( + options: Options, +) => { + return (options.client ?? _heyApiClient).put< + UpdateConversationMessageResponses, + UpdateConversationMessageErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/conversation/{conversation_id}/message/{message_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, + }); +}; + +/** + * Get Registry Agents + * Get all agents from the registry + */ +export const getRegistryAgents = ( + options?: Options, +) => { + return (options?.client ?? _heyApiClient).get< + GetRegistryAgentsResponses, + GetRegistryAgentsErrors, + ThrowOnError + >({ + security: [ + { + name: "x-secret-key", + type: "apiKey", + }, + ], + url: "/registry/agents", + ...options, + }); +}; diff --git a/packages/nebula/src/client/types.gen.ts b/packages/nebula/src/client/types.gen.ts new file mode 100644 index 00000000000..d0a4485bf1b --- /dev/null +++ b/packages/nebula/src/client/types.gen.ts @@ -0,0 +1,4270 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * AbiDocFormatted + */ +export type AbiDocFormatted = { + /** + * Abi + */ + abi: { + [key: string]: unknown; + }; + /** + * Abi Inputs Parameters Description + */ + abi_inputs_parameters_description: { + [key: string]: string; + } | null; + /** + * Abi Inputs Description + */ + abi_inputs_description: string | null; + /** + * Abi Outputs Parameters Description + */ + abi_outputs_parameters_description: { + [key: string]: string; + } | null; + /** + * Function Description + */ + function_description: string | null; + /** + * Function Signature + */ + function_signature: string; + /** + * Full Signature + */ + full_signature: string; +}; + +/** + * AgentActionContext + */ +export type AgentActionContext = { + /** + * Type + */ + type?: "context"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data: CompletionContextOutput | string; +}; + +/** + * AgentActionEval + */ +export type AgentActionEval = { + /** + * Type + */ + type?: "eval"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data: string; +}; + +/** + * AgentActionExecution + */ +export type AgentActionExecution = { + /** + * Type + */ + type?: "execution"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + data: AgentTransactionExecution; +}; + +/** + * AgentActionImage + */ +export type AgentActionImage = { + /** + * Type + */ + type?: "image"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + data: AgentActionImageData; +}; + +/** + * AgentActionImageData + */ +export type AgentActionImageData = { + /** + * Url + */ + url: string; + /** + * Width + */ + width: number; + /** + * Height + */ + height: number; +}; + +/** + * AgentActionInit + */ +export type AgentActionInit = { + /** + * Type + */ + type?: "init"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data?: null; +}; + +/** + * AgentActionPresence + */ +export type AgentActionPresence = { + /** + * Type + */ + type?: "presence"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data: string; +}; + +/** + * AgentActionSignSwap + */ +export type AgentActionSignSwap = { + /** + * Type + */ + type?: "sign_swap"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data: AgentActionSignSwapData | string; +}; + +/** + * AgentActionSignSwapData + */ +export type AgentActionSignSwapData = { + transaction: AgentActionSignTransactionData; + /** + * Action + */ + action: string | null; + intent: AgentActionSignSwapDataIntent; + from: AgentActionSignSwapDataToken; + to: AgentActionSignSwapDataToken; +}; + +/** + * AgentActionSignSwapDataIntent + */ +export type AgentActionSignSwapDataIntent = { + /** + * Originchainid + */ + originChainId: number; + /** + * Origintokenaddress + */ + originTokenAddress: string; + /** + * Destinationchainid + */ + destinationChainId: number; + /** + * Destinationtokenaddress + */ + destinationTokenAddress: string; + /** + * Amount + */ + amount: string; + /** + * Sender + */ + sender: string; + /** + * Receiver + */ + receiver: string; + /** + * Maxsteps + */ + maxSteps: number; +}; + +/** + * AgentActionSignSwapDataToken + */ +export type AgentActionSignSwapDataToken = { + /** + * Address + */ + address: string; + /** + * Chain Id + */ + chain_id: number; + /** + * Amount + */ + amount: string; + /** + * Symbol + */ + symbol: string; + /** + * Decimals + */ + decimals: number; + /** + * Price + */ + price: number | null; +}; + +/** + * AgentActionSignTransaction + */ +export type AgentActionSignTransaction = { + /** + * Type + */ + type?: "sign_transaction"; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Source + */ + source?: string; + /** + * Tool Name + */ + tool_name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Kwargs + */ + kwargs?: { + [key: string]: unknown; + } | null; + /** + * Data + */ + data: AgentActionSignTransactionData | string; +}; + +/** + * AgentActionSignTransactionData + */ +export type AgentActionSignTransactionData = { + /** + * Chainid + */ + chainId: number; + /** + * Function + */ + function?: string | null; + /** + * To + */ + to: string; + /** + * Value + */ + value: string; + /** + * Data + */ + data: string; +}; + +/** + * AgentListResponse + */ +export type AgentListResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * AgentMemoryResponse + */ +export type AgentMemoryResponse = { + /** + * Id + */ + id: string; +}; + +/** + * AgentResponse + */ +export type AgentResponse = { + /** + * Id + */ + id: string; + /** + * User Id + */ + user_id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Model Name + */ + model_name: string; + /** + * Is Public + */ + is_public: boolean; + context: AgentTaskContext; + /** + * Prompts + */ + prompts?: Array; + /** + * Tools + */ + tools?: Array; + /** + * Triggers + */ + triggers?: Array; + /** + * Memories + */ + memories?: Array; + /** + * Wallets + */ + wallets?: Array; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * AgentStepImage + */ +export type AgentStepImage = { + /** + * Type + */ + type?: "image"; + image: AgentActionImageData; +}; + +/** + * AgentStepText + */ +export type AgentStepText = { + /** + * Type + */ + type?: "text"; + /** + * Text + */ + text: string; +}; + +/** + * AgentTaskContext + */ +export type AgentTaskContext = { + /** + * Chain Ids + */ + chain_ids?: Array | null; + /** + * Chain Type + */ + chain_type?: "all" | "mainnet" | "testnet"; + /** + * Automatic Execution + */ + automatic_execution?: boolean; +}; + +/** + * AgentTaskOptions + */ +export type AgentTaskOptions = { + /** + * Temperature + */ + temperature?: number | null; + /** + * Max Tokens + */ + max_tokens?: number | null; + /** + * Seed + */ + seed?: number | null; +}; + +/** + * AgentTaskUsage + */ +export type AgentTaskUsageReadable = { + /** + * Input Cached Tokens + */ + input_cached_tokens: number; + /** + * Input Text Tokens + */ + input_text_tokens: number; + /** + * Input Image Tokens + */ + input_image_tokens: number; + /** + * Output Text Tokens + */ + output_text_tokens: number; + /** + * Output Image Tokens + */ + output_image_tokens: number; + /** + * Output Reasoning Tokens + */ + output_reasoning_tokens: number; + /** + * Tool Read Tokens + */ + tool_read_tokens: number; + /** + * Tool Write Tokens + */ + tool_write_tokens: number; + /** + * Tool Requests + */ + tool_requests: number; + /** + * Input Tokens + */ + readonly input_tokens: number; + /** + * Output Tokens + */ + readonly output_tokens: number; + /** + * Total Tokens + */ + readonly total_tokens: number; + /** + * Tool Tokens + */ + readonly tool_tokens: number; +}; + +/** + * AgentTaskUsage + */ +export type AgentTaskUsageWritable = { + /** + * Input Cached Tokens + */ + input_cached_tokens: number; + /** + * Input Text Tokens + */ + input_text_tokens: number; + /** + * Input Image Tokens + */ + input_image_tokens: number; + /** + * Output Text Tokens + */ + output_text_tokens: number; + /** + * Output Image Tokens + */ + output_image_tokens: number; + /** + * Output Reasoning Tokens + */ + output_reasoning_tokens: number; + /** + * Tool Read Tokens + */ + tool_read_tokens: number; + /** + * Tool Write Tokens + */ + tool_write_tokens: number; + /** + * Tool Requests + */ + tool_requests: number; +}; + +/** + * AgentToolDataAgent + */ +export type AgentToolDataAgent = { + /** + * Type + */ + type?: "agent"; + /** + * Agent Id + */ + agent_id: string; +}; + +/** + * AgentToolDataMcp + */ +export type AgentToolDataMcp = { + /** + * Type + */ + type?: "mcp"; + config: McpConfig; +}; + +/** + * AgentToolDescription + */ +export type AgentToolDescription = { + /** + * Agent Id + */ + agent_id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; +}; + +/** + * AgentToolResponse + */ +export type AgentToolResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string | null; + /** + * Description + */ + description: string | null; + /** + * Data + */ + data: + | ({ + type: "agent"; + } & AgentToolDataAgent) + | ({ + type: "mcp"; + } & AgentToolDataMcp); + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * AgentTransaction + */ +export type AgentTransaction = { + /** + * Action + */ + action: string; + /** + * Transactions + */ + transactions: Array; + simulation?: AgentTransactionDataSimulation | null; + /** + * Description + */ + description?: string | null; +}; + +/** + * AgentTransactionDataSimulation + */ +export type AgentTransactionDataSimulation = { + /** + * Success + */ + success: boolean; + /** + * Message + */ + message: string; + /** + * Chains + */ + chains: Array; + /** + * Contracts + */ + contracts?: Array | null; + /** + * Tokens + */ + tokens?: Array | null; +}; + +/** + * AgentTransactionDataSimulationChain + */ +export type AgentTransactionDataSimulationChain = { + /** + * Chain Id + */ + chain_id: number; + /** + * Name + */ + name: string; +}; + +/** + * AgentTransactionDataSimulationContract + */ +export type AgentTransactionDataSimulationContract = { + /** + * Chain Id + */ + chain_id: number; + /** + * Address + */ + address: string; + /** + * Name + */ + name: string; + /** + * Type + */ + type: "call" | "create"; + /** + * Function Name + */ + function_name?: string | null; + /** + * Function Args + */ + function_args?: { + [key: string]: unknown; + } | null; +}; + +/** + * AgentTransactionDataSimulationToken + */ +export type AgentTransactionDataSimulationToken = { + /** + * Chain Id + */ + chain_id: number; + /** + * Address + */ + address: string; + /** + * Name + */ + name: string; + /** + * Symbol + */ + symbol: string; + /** + * Decimals + */ + decimals: number; + /** + * Amount + */ + amount: number; +}; + +/** + * AgentTransactionDataTransaction + */ +export type AgentTransactionDataTransaction = { + /** + * To + */ + to: string; + /** + * Value + */ + value: string; + /** + * Data + */ + data: string; + /** + * Chain Id + */ + chain_id: number; +}; + +/** + * AgentTransactionExecution + */ +export type AgentTransactionExecution = { + /** + * Id + */ + id: string; + /** + * Wallet Address + */ + wallet_address: string; + /** + * Chain Id + */ + chain_id: number; + /** + * Status + */ + status: "pending" | "confirmed" | "failed"; + /** + * Transaction Hash + */ + transaction_hash?: string | null; + /** + * Error Message + */ + error_message?: string | null; + /** + * Transactions + */ + transactions?: Array | null; +}; + +/** + * AgentTriggerData + */ +export type AgentTriggerData = { + /** + * Type + */ + type: unknown; +}; + +/** + * AgentTriggerDataContinuous + */ +export type AgentTriggerDataContinuous = { + /** + * Type + */ + type?: "continuous"; +}; + +/** + * AgentTriggerDataTime + */ +export type AgentTriggerDataTime = { + /** + * Type + */ + type?: "time"; + /** + * Cron Expression + */ + cron_expression?: string | null; +}; + +/** + * AgentTriggerResponse + */ +export type AgentTriggerResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + type: AgentTriggerType; + data: AgentTriggerData; + /** + * Prompts + */ + prompts: Array; + /** + * Is Paused + */ + is_paused: boolean; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * AgentTriggerType + */ +export type AgentTriggerType = "continuous" | "time"; + +/** + * AgentWalletResponse + */ +export type AgentWalletResponse = { + /** + * Id + */ + id: string; + type: WalletType; + /** + * Address + */ + address: string; + /** + * Data + */ + data: + | ({ + type: "server"; + } & WalletDataServer) + | ({ + type: "eip4337"; + } & WalletDataEip4337); + /** + * Transactions + */ + transactions?: Array; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * BlockchainEntity + * Base class for all blockchain entities tracked in memory. + */ +export type BlockchainEntity = { + /** + * Chain Id + */ + chain_id: number; + /** + * Address + */ + address: string; + /** + * Roles + */ + roles?: Array; + /** + * First Mentioned At + */ + first_mentioned_at?: string; + /** + * Last Mentioned At + */ + last_mentioned_at?: string; +}; + +/** + * ChatContentImage + */ +export type ChatContentImage = { + /** + * Type + */ + type?: "image"; + /** + * Image Url + */ + image_url?: string | null; + /** + * B64 + */ + b64?: string | null; +}; + +/** + * ChatContentText + */ +export type ChatContentText = { + /** + * Type + */ + type?: "text"; + /** + * Text + */ + text: string; +}; + +/** + * ChatContentTransaction + */ +export type ChatContentTransaction = { + /** + * Type + */ + type?: "transaction"; + /** + * Chain Id + */ + chain_id: number; + /** + * Transaction Hash + */ + transaction_hash: string; +}; + +/** + * ChatMessage + */ +export type ChatMessage = { + /** + * Role + */ + role: "system" | "user" | "assistant"; + /** + * Content + */ + content: + | string + | Array< + | ({ + type: "image"; + } & ChatContentImage) + | ({ + type: "text"; + } & ChatContentText) + | ({ + type: "transaction"; + } & ChatContentTransaction) + >; +}; + +/** + * ChatParamsMultiMessages + */ +export type ChatParamsMultiMessages = { + /** + * Stream + */ + stream?: boolean | null; + /** + * Model Name + */ + model_name?: string | null; + /** + * Session Id + */ + session_id?: string | null; + context?: CompletionContextInput | null; + /** + * Max Tokens + */ + max_tokens?: number | null; + /** + * Max Completion Tokens + */ + max_completion_tokens?: number | null; + /** + * Frequency Penalty + */ + frequency_penalty?: number | null; + /** + * Presence Penalty + */ + presence_penalty?: number | null; + /** + * Temperature + */ + temperature?: number | null; + /** + * Top P + */ + top_p?: number | null; + /** + * Response Format + */ + response_format?: + | ( + | ({ + type: "json_object"; + } & CompletionResponseFormatJsonObject) + | ({ + type: "json_schema"; + } & CompletionResponseFormatJsonSchema) + ) + | null; + /** + * Messages + */ + messages: Array; +}; + +/** + * ChatParamsSingleMessage + */ +export type ChatParamsSingleMessage = { + /** + * Stream + */ + stream?: boolean | null; + /** + * Model Name + */ + model_name?: string | null; + /** + * Session Id + */ + session_id?: string | null; + context?: CompletionContextInput | null; + /** + * Max Tokens + */ + max_tokens?: number | null; + /** + * Max Completion Tokens + */ + max_completion_tokens?: number | null; + /** + * Frequency Penalty + */ + frequency_penalty?: number | null; + /** + * Presence Penalty + */ + presence_penalty?: number | null; + /** + * Temperature + */ + temperature?: number | null; + /** + * Top P + */ + top_p?: number | null; + /** + * Response Format + */ + response_format?: + | ( + | ({ + type: "json_object"; + } & CompletionResponseFormatJsonObject) + | ({ + type: "json_schema"; + } & CompletionResponseFormatJsonSchema) + ) + | null; + /** + * Message + */ + message: string; +}; + +/** + * ChatResponse + */ +export type ChatResponse = { + /** + * Message + */ + message: string; + /** + * Actions + */ + actions: Array< + | ({ + type: "init"; + } & AgentActionInit) + | ({ + type: "eval"; + } & AgentActionEval) + | ({ + type: "presence"; + } & AgentActionPresence) + | ({ + type: "context"; + } & AgentActionContext) + | ({ + type: "image"; + } & AgentActionImage) + | ({ + type: "execution"; + } & AgentActionExecution) + | ({ + type: "sign_transaction"; + } & AgentActionSignTransaction) + | ({ + type: "sign_swap"; + } & AgentActionSignSwap) + > | null; + /** + * Session Id + */ + session_id: string | null; + /** + * Request Id + */ + request_id: string | null; +}; + +/** + * CompletionChoice + */ +export type CompletionChoice = { + message: CompletionChoiceChatMessage; + /** + * Finish Reason + */ + finish_reason: "stop" | "length"; + /** + * Index + */ + index: number; +}; + +/** + * CompletionChoiceChatMessage + */ +export type CompletionChoiceChatMessage = { + /** + * Role + */ + role: "user" | "assistant"; + /** + * Content + */ + content: string; +}; + +/** + * CompletionContext + */ +export type CompletionContextInput = { + /** + * Session Id + */ + session_id?: string | null; + /** + * Wallet Address + */ + wallet_address?: + | string + | ({ + type: "server_wallet"; + } & ContextFilterServerWallet) + | null; + /** + * Chain Ids + */ + chain_ids?: Array | null; + /** + * Networks + */ + networks?: "all" | "mainnet" | "testnet"; + /** + * Prompts + */ + prompts?: Array; + /** + * Mcp Tools + */ + mcp_tools?: Array | null; + /** + * Agent Tools + */ + agent_tools?: Array | null; + /** + * Deployed Contracts + */ + deployed_contracts?: Array; + /** + * Entities + */ + entities?: { + [key: string]: BlockchainEntity; + }; +}; + +/** + * CompletionContext + */ +export type CompletionContextOutput = { + /** + * Session Id + */ + session_id?: string | null; + /** + * Wallet Address + */ + wallet_address?: + | string + | ({ + type: "server_wallet"; + } & ContextFilterServerWallet) + | null; + /** + * Chain Ids + */ + chain_ids?: Array | null; + /** + * Networks + */ + networks?: "all" | "mainnet" | "testnet"; + /** + * Prompts + */ + prompts?: Array; +}; + +/** + * CompletionParams + */ +export type CompletionParams = { + /** + * Messages + */ + messages: Array; + /** + * Model + */ + model?: string | null; + /** + * Stream + */ + stream?: boolean; + /** + * Max Tokens + */ + max_tokens?: number | null; + /** + * Max Completion Tokens + */ + max_completion_tokens?: number | null; + /** + * Frequency Penalty + */ + frequency_penalty?: number | null; + /** + * Presence Penalty + */ + presence_penalty?: number | null; + /** + * Temperature + */ + temperature?: number | null; + /** + * Top P + */ + top_p?: number | null; + /** + * Response Format + */ + response_format?: + | ( + | ({ + type: "json_object"; + } & CompletionResponseFormatJsonObject) + | ({ + type: "json_schema"; + } & CompletionResponseFormatJsonSchema) + ) + | null; + context?: CompletionContextInput | null; +}; + +/** + * CompletionResponse + */ +export type CompletionResponse = { + /** + * Id + */ + id: string; + /** + * Choices + */ + choices: Array; + /** + * Created + */ + created: number; + /** + * Object + */ + object: "chat.completion"; + usage: CompletionUsage; + /** + * Actions + */ + actions: Array< + | ({ + type: "init"; + } & AgentActionInit) + | ({ + type: "eval"; + } & AgentActionEval) + | ({ + type: "presence"; + } & AgentActionPresence) + | ({ + type: "context"; + } & AgentActionContext) + | ({ + type: "image"; + } & AgentActionImage) + | ({ + type: "execution"; + } & AgentActionExecution) + | ({ + type: "sign_transaction"; + } & AgentActionSignTransaction) + | ({ + type: "sign_swap"; + } & AgentActionSignSwap) + > | null; + context: CompletionContextOutput | null; +}; + +/** + * CompletionResponseFormatJsonObject + */ +export type CompletionResponseFormatJsonObject = { + /** + * Type + */ + type: "json_object"; +}; + +/** + * CompletionResponseFormatJsonSchema + */ +export type CompletionResponseFormatJsonSchema = { + /** + * Type + */ + type: "json_schema"; + /** + * Json Schema + */ + json_schema: { + [key: string]: unknown; + }; +}; + +/** + * CompletionUsage + */ +export type CompletionUsage = { + /** + * Prompt Tokens + */ + prompt_tokens: number; + /** + * Completion Tokens + */ + completion_tokens: number; + /** + * Total Tokens + */ + total_tokens: number; +}; + +/** + * ContextFilterServerWallet + */ +export type ContextFilterServerWallet = { + /** + * Type + */ + type: "server_wallet"; + /** + * Server Wallet Id + */ + server_wallet_id?: string | null; + /** + * Server Wallet Address + */ + server_wallet_address?: string | null; +}; + +/** + * ContractBase + * Base class for contract-like entities that can be processed by ContractMetadata. + */ +export type ContractBase = { + /** + * Chain Id + */ + chain_id: number; + /** + * Address + */ + address: string; + /** + * Roles + */ + roles?: Array; + /** + * First Mentioned At + */ + first_mentioned_at?: string; + /** + * Last Mentioned At + */ + last_mentioned_at?: string; + /** + * Name + */ + name?: string | null; + /** + * Symbol + */ + symbol?: string | null; + /** + * Standard + */ + standard?: ("ERC20" | "ERC721" | "ERC1155" | "Unknown") | null; + /** + * Description + */ + description?: string | null; + /** + * Total Supply + */ + total_supply?: number | null; + /** + * Price + */ + price?: string | null; + /** + * Abi + */ + abi?: Array | null; + deployment_status?: DeploymentStatus; +}; + +/** + * ConversationListResponse + */ +export type ConversationListResponse = { + /** + * Id + */ + id: string; + /** + * Title + */ + title?: string; +}; + +/** + * ConversationMessageResponse + */ +export type ConversationMessageResponseReadable = { + /** + * Id + */ + id: string; + /** + * Inputs + */ + inputs?: Array; + /** + * Responses + */ + responses?: Array; + /** + * Steps + */ + steps?: Array< + | ({ + type: "text"; + } & AgentStepText) + | ({ + type: "image"; + } & AgentStepImage) + >; + /** + * Transactions + */ + transactions?: Array; + usage?: AgentTaskUsageReadable | null; +}; + +/** + * ConversationMessageResponse + */ +export type ConversationMessageResponseWritable = { + /** + * Id + */ + id: string; + /** + * Inputs + */ + inputs?: Array; + /** + * Responses + */ + responses?: Array; + /** + * Steps + */ + steps?: Array< + | ({ + type: "text"; + } & AgentStepText) + | ({ + type: "image"; + } & AgentStepImage) + >; + /** + * Transactions + */ + transactions?: Array; + usage?: AgentTaskUsageWritable | null; +}; + +/** + * ConversationResponse + */ +export type ConversationResponseReadable = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string; + /** + * User Id + */ + user_id: string; + /** + * Agent Id + */ + agent_id: string; + /** + * Is Public + */ + is_public: boolean; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; + /** + * Messages + */ + messages?: Array; +}; + +/** + * ConversationResponse + */ +export type ConversationResponseWritable = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string; + /** + * User Id + */ + user_id: string; + /** + * Agent Id + */ + agent_id: string; + /** + * Is Public + */ + is_public: boolean; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; + /** + * Messages + */ + messages?: Array; +}; + +/** + * CreateAgentHandlerParams + * inherits from CreateAgentParams, but adds triggers and tools + */ +export type CreateAgentHandlerParams = { + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Prompts + */ + prompts?: Array | null; + /** + * Triggers + */ + triggers?: Array | null; + /** + * Tools + */ + tools?: Array | null; +}; + +/** + * CreateAgentToolParams + */ +export type CreateAgentToolParams = { + /** + * Name + */ + name: string; + /** + * Data + */ + data: + | ({ + type: "agent"; + } & AgentToolDataAgent) + | ({ + type: "mcp"; + } & AgentToolDataMcp); + /** + * Description + */ + description?: string | null; +}; + +/** + * CreateAgentTriggerParams + */ +export type CreateAgentTriggerParams = { + /** + * Name + */ + name: string; + /** + * Data + */ + data: + | ({ + type: "continuous"; + } & AgentTriggerDataContinuous) + | ({ + type: "time"; + } & AgentTriggerDataTime); + /** + * Prompts + */ + prompts?: Array | null; +}; + +/** + * CreateConversationHandlerParams + */ +export type CreateConversationHandlerParams = { + /** + * Title + */ + title?: string | null; + /** + * Is Public + */ + is_public?: boolean | null; + /** + * Agent Id + */ + agent_id: string; +}; + +/** + * CreateMessageHandlerParams + */ +export type CreateMessageHandlerParams = { + /** + * Inputs + */ + inputs: Array; + options?: AgentTaskOptions | null; + context?: AgentTaskContext | null; + /** + * Stream + */ + stream?: boolean; +}; + +/** + * CreateSessionParams + */ +export type CreateSessionParams = { + /** + * Model Name + */ + model_name?: string; + /** + * Title + */ + title?: string | null; + /** + * Is Public + */ + is_public?: boolean | null; + context?: CompletionContextInput | null; +}; + +/** + * CreateUserWalletParams + */ +export type CreateUserWalletParams = { + type: WalletType; + /** + * Data + */ + data?: WalletDataServer | WalletDataEip4337 | null; +}; + +/** + * DeploymentStatus + */ +export type DeploymentStatus = "unknown" | "pending" | "deployed" | "failed"; + +/** + * EntityRole + */ +export type EntityRole = "mentioned" | "deployed" | "user"; + +/** + * Feedback + */ +export type Feedback = { + /** + * Id + */ + id: string; + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Feedback Rating + */ + feedback_rating: number | null; + /** + * Feedback Response + */ + feedback_response: string | null; + /** + * Comment + */ + comment: string | null; + /** + * Created At + */ + created_at: string | null; + /** + * Updated At + */ + updated_at: string | null; +}; + +/** + * FeedbackParams + */ +export type FeedbackParams = { + /** + * Session Id + */ + session_id: string; + /** + * Request Id + */ + request_id: string; + /** + * Feedback Rating + */ + feedback_rating?: number | null; + /** + * Feedback Response + */ + feedback_response?: string | null; + /** + * Comment + */ + comment?: string | null; +}; + +/** + * GetPayloadParams + */ +export type GetPayloadParams = { + /** + * Address + */ + address: string; + /** + * Chain Id + */ + chain_id?: number | string | null; +}; + +/** + * GetPayloadResponse + */ +export type GetPayloadResponse = { + payload: Payload; +}; + +/** + * HTTPValidationError + */ +export type HttpValidationError = { + /** + * Detail + */ + detail?: Array; +}; + +/** + * LoginParams + */ +export type LoginParams = { + payload: Payload; + /** + * Signature + */ + signature?: string | null; + /** + * Token + */ + token?: string | null; +}; + +/** + * LoginResponse + */ +export type LoginResponse = { + /** + * Token + */ + token: string; +}; + +/** + * McpConfig + */ +export type McpConfig = { + /** + * Url + */ + url: string; + /** + * Headers + */ + headers?: { + [key: string]: unknown; + } | null; +}; + +/** + * McpTool + */ +export type McpTool = { + /** + * Url + */ + url: string; + /** + * Headers + */ + headers?: { + [key: string]: string; + } | null; +}; + +/** + * Model + */ +export type Model = { + /** + * Id + */ + id: string; + /** + * Object + */ + object: "model"; + /** + * Created + */ + created: number; + /** + * Owned By + */ + owned_by: "thirdweb"; +}; + +/** + * ModelResponse + */ +export type ModelResponse = { + /** + * Object + */ + object: "list"; + /** + * Data + */ + data: Array; +}; + +/** + * Payload + */ +export type Payload = { + /** + * Address + */ + address: string; + /** + * Chain Id + */ + chain_id: number | null; + /** + * Domain + */ + domain: string; + /** + * Expiration Time + */ + expiration_time: string; + /** + * Invalid Before + */ + invalid_before: string; + /** + * Issued At + */ + issued_at: string; + /** + * Nonce + */ + nonce: string; + /** + * Statement + */ + statement: string; + /** + * Version + */ + version: string; + /** + * Resources + */ + resources: Array | null; + /** + * Uri + */ + uri: string; +}; + +/** + * RegistryAgentListResponse + */ +export type RegistryAgentListResponse = { + /** + * Id + */ + id: string; + /** + * User Id + */ + user_id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description: string; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * ResponseModel[AgentResponse] + */ +export type ResponseModelAgentResponse = { + result: AgentResponse; +}; + +/** + * ResponseModel[AgentToolResponse] + */ +export type ResponseModelAgentToolResponse = { + result: AgentToolResponse; +}; + +/** + * ResponseModel[AgentTriggerResponse] + */ +export type ResponseModelAgentTriggerResponse = { + result: AgentTriggerResponse; +}; + +/** + * ResponseModel[AgentWalletResponse] + */ +export type ResponseModelAgentWalletResponse = { + result: AgentWalletResponse; +}; + +/** + * ResponseModel[ConversationMessageResponse] + */ +export type ResponseModelConversationMessageResponseReadable = { + result: ConversationMessageResponseReadable; +}; + +/** + * ResponseModel[ConversationMessageResponse] + */ +export type ResponseModelConversationMessageResponseWritable = { + result: ConversationMessageResponseWritable; +}; + +/** + * ResponseModel[ConversationResponse] + */ +export type ResponseModelConversationResponseReadable = { + result: ConversationResponseReadable; +}; + +/** + * ResponseModel[ConversationResponse] + */ +export type ResponseModelConversationResponseWritable = { + result: ConversationResponseWritable; +}; + +/** + * ResponseModel[Feedback] + */ +export type ResponseModelFeedback = { + result: Feedback; +}; + +/** + * ResponseModel[GetPayloadResponse] + */ +export type ResponseModelGetPayloadResponse = { + result: GetPayloadResponse; +}; + +/** + * ResponseModel[LoginResponse] + */ +export type ResponseModelLoginResponse = { + result: LoginResponse; +}; + +/** + * ResponseModel[SessionDeleteResponse] + */ +export type ResponseModelSessionDeleteResponse = { + result: SessionDeleteResponse; +}; + +/** + * ResponseModel[Session] + */ +export type ResponseModelSession = { + result: Session; +}; + +/** + * ResponseModel[UUID] + */ +export type ResponseModelUuid = { + /** + * Result + */ + result: string; +}; + +/** + * ResponseModel[UserResponse] + */ +export type ResponseModelUserResponse = { + result: UserResponse; +}; + +/** + * ResponseModel[UserWalletResponse] + */ +export type ResponseModelUserWalletResponse = { + result: UserWalletResponse; +}; + +/** + * ResponseModel[VerifyJwtResponse] + */ +export type ResponseModelVerifyJwtResponse = { + result: VerifyJwtResponse; +}; + +/** + * ResponseModel[list[AgentListResponse]] + */ +export type ResponseModelListAgentListResponse = { + /** + * Result + */ + result: Array; +}; + +/** + * ResponseModel[list[AgentWalletResponse]] + */ +export type ResponseModelListAgentWalletResponse = { + /** + * Result + */ + result: Array; +}; + +/** + * ResponseModel[list[ConversationListResponse]] + */ +export type ResponseModelListConversationListResponse = { + /** + * Result + */ + result: Array; +}; + +/** + * ResponseModel[list[RegistryAgentListResponse]] + */ +export type ResponseModelListRegistryAgentListResponse = { + /** + * Result + */ + result: Array; +}; + +/** + * ResponseModel[list[SessionList]] + */ +export type ResponseModelListSessionList = { + /** + * Result + */ + result: Array; +}; + +/** + * ResponseModel[list[UserWalletResponse]] + */ +export type ResponseModelListUserWalletResponse = { + /** + * Result + */ + result: Array; +}; + +/** + * Session + */ +export type Session = { + /** + * Id + */ + id: string; + /** + * Team Id + */ + team_id: string; + /** + * Project Id + */ + project_id: string | null; + /** + * Model Name + */ + model_name: string; + /** + * Is Public + */ + is_public: boolean | null; + /** + * Title + */ + title: string | null; + /** + * Memory + */ + memory: Array<{ + [key: string]: unknown; + }> | null; + /** + * History + */ + history: Array<{ + [key: string]: unknown; + }> | null; + /** + * Action + */ + action: Array<{ + [key: string]: unknown; + }> | null; + context?: CompletionContextOutput | null; + /** + * Archive At + */ + archive_at: string | null; + /** + * Deleted At + */ + deleted_at: string | null; + /** + * Created At + */ + created_at: string | null; + /** + * Updated At + */ + updated_at: string | null; +}; + +/** + * SessionDeleteResponse + */ +export type SessionDeleteResponse = { + /** + * Id + */ + id: string; + /** + * Deleted At + */ + deleted_at: string; +}; + +/** + * SessionList + */ +export type SessionList = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string | null; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * TransactionParams + */ +export type TransactionParams = { + /** + * To + */ + to: string; + /** + * Value + */ + value: string; + /** + * Data + */ + data: string; +}; + +/** + * UpdateAgentHandlerParams + */ +export type UpdateAgentHandlerParams = { + /** + * Name + */ + name?: string | null; + /** + * Description + */ + description?: string | null; + /** + * Prompts + */ + prompts?: Array | null; +}; + +/** + * UpdateAgentToolParams + */ +export type UpdateAgentToolParams = { + /** + * Name + */ + name?: string | null; + /** + * Data + */ + data?: + | ( + | ({ + type: "agent"; + } & AgentToolDataAgent) + | ({ + type: "mcp"; + } & AgentToolDataMcp) + ) + | null; + /** + * Description + */ + description?: string | null; +}; + +/** + * UpdateAgentTriggerParams + */ +export type UpdateAgentTriggerParams = { + /** + * Name + */ + name?: string | null; + /** + * Data + */ + data?: + | ( + | ({ + type: "continuous"; + } & AgentTriggerDataContinuous) + | ({ + type: "time"; + } & AgentTriggerDataTime) + ) + | null; + /** + * Is Paused + */ + is_paused?: boolean | null; + /** + * Prompts + */ + prompts?: Array | null; +}; + +/** + * UpdateConversationHandlerParams + */ +export type UpdateConversationHandlerParams = { + /** + * Title + */ + title?: string | null; + /** + * Is Public + */ + is_public?: boolean | null; +}; + +/** + * UpdateMessageHandlerParams + */ +export type UpdateMessageHandlerParams = { + /** + * Inputs + */ + inputs?: Array | null; + options?: AgentTaskOptions | null; + /** + * Stream + */ + stream?: boolean; +}; + +/** + * UpdateSessionParams + */ +export type UpdateSessionParams = { + /** + * Title + */ + title?: string | null; + /** + * Model Name + */ + model_name?: string | null; + /** + * Is Public + */ + is_public?: boolean | null; + context?: CompletionContextInput | null; +}; + +/** + * UpdateUserWalletParams + */ +export type UpdateUserWalletParams = { + type?: WalletType | null; + /** + * Data + */ + data?: WalletDataServer | WalletDataEip4337 | null; +}; + +/** + * UserAgentResponse + */ +export type UserAgentResponse = { + /** + * Id + */ + id: string; + /** + * Name + */ + name: string; + /** + * Description + */ + description?: string | null; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * UserConversationResponse + */ +export type UserConversationResponse = { + /** + * Id + */ + id: string; + /** + * Title + */ + title: string; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; + /** + * Agent Id + */ + agent_id: string; +}; + +/** + * UserMemoryResponse + */ +export type UserMemoryResponse = { + /** + * Id + */ + id: string; +}; + +/** + * UserResponse + */ +export type UserResponse = { + /** + * Id + */ + id: string; + /** + * Agents + */ + agents: Array; + /** + * Memories + */ + memories: Array; + /** + * Conversations + */ + conversations: Array; + /** + * Wallets + */ + wallets: Array; +}; + +/** + * UserWalletResponse + */ +export type UserWalletResponse = { + /** + * Id + */ + id: string; + type: WalletType; + /** + * Address + */ + address: string; + /** + * Data + */ + data: + | ({ + type: "server"; + } & WalletDataServer) + | ({ + type: "eip4337"; + } & WalletDataEip4337); + /** + * Transactions + */ + transactions?: Array; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * ValidationError + */ +export type ValidationError = { + /** + * Location + */ + loc: Array; + /** + * Message + */ + msg: string; + /** + * Error Type + */ + type: string; +}; + +/** + * VerifyJwtResponse + */ +export type VerifyJwtResponse = { + /** + * Address + */ + address: string; + /** + * Is Valid + */ + is_valid: boolean; +}; + +/** + * WalletDataEIP4337 + */ +export type WalletDataEip4337 = { + /** + * Type + */ + type?: "eip4337"; + /** + * Signer Address + */ + signer_address: string; + /** + * Factory Address + */ + factory_address: string; + /** + * Smart Account Address + */ + smart_account_address: string; + /** + * Entrypoint Address + */ + entrypoint_address: string; + /** + * Sponsor Gas + */ + sponsor_gas?: boolean; + /** + * Chain Ids + */ + chain_ids?: Array | null; +}; + +/** + * WalletDataServer + */ +export type WalletDataServer = { + /** + * Type + */ + type?: "server"; + /** + * Smart Account Address + */ + smart_account_address: string; +}; + +/** + * WalletTransaction + */ +export type WalletTransaction = { + /** + * Id + */ + id: string; + /** + * Chain Id + */ + chain_id: number; + /** + * Params + */ + params: Array; + /** + * Hash + */ + hash: string | null; + /** + * Submitted At + */ + submitted_at: string | null; + /** + * Cancelled At + */ + cancelled_at: string | null; + /** + * Errored At + */ + errored_at: string | null; + /** + * Error Message + */ + error_message: string | null; + /** + * Created At + */ + created_at: string; + /** + * Updated At + */ + updated_at: string; +}; + +/** + * WalletType + */ +export type WalletType = "eoa" | "server" | "eip4337" | "eip7702"; + +export type DeprecatedGetSessionsData = { + body?: never; + path?: never; + query?: never; + url: "/session/list"; +}; + +export type DeprecatedGetSessionsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListSessionList; +}; + +export type DeprecatedGetSessionsResponse = + DeprecatedGetSessionsResponses[keyof DeprecatedGetSessionsResponses]; + +export type DeprecatedDeleteSessionData = { + body?: never; + path: { + /** + * The id of the session to delete + */ + session_id: string; + }; + query?: never; + url: "/session/{session_id}"; +}; + +export type DeprecatedDeleteSessionErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedDeleteSessionError = + DeprecatedDeleteSessionErrors[keyof DeprecatedDeleteSessionErrors]; + +export type DeprecatedDeleteSessionResponses = { + /** + * Successful Response + */ + 200: ResponseModelSessionDeleteResponse; +}; + +export type DeprecatedDeleteSessionResponse = + DeprecatedDeleteSessionResponses[keyof DeprecatedDeleteSessionResponses]; + +export type DeprecatedGetSessionData = { + body?: never; + path: { + /** + * The id of the session to fetch + */ + session_id: string; + }; + query?: never; + url: "/session/{session_id}"; +}; + +export type DeprecatedGetSessionErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedGetSessionError = + DeprecatedGetSessionErrors[keyof DeprecatedGetSessionErrors]; + +export type DeprecatedGetSessionResponses = { + /** + * Successful Response + */ + 200: ResponseModelSession; +}; + +export type DeprecatedGetSessionResponse = + DeprecatedGetSessionResponses[keyof DeprecatedGetSessionResponses]; + +export type DeprecatedUpdateSessionData = { + body: UpdateSessionParams; + path: { + /** + * The id of the session to update + */ + session_id: string; + }; + query?: never; + url: "/session/{session_id}"; +}; + +export type DeprecatedUpdateSessionErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedUpdateSessionError = + DeprecatedUpdateSessionErrors[keyof DeprecatedUpdateSessionErrors]; + +export type DeprecatedUpdateSessionResponses = { + /** + * Successful Response + */ + 200: ResponseModelSession; +}; + +export type DeprecatedUpdateSessionResponse = + DeprecatedUpdateSessionResponses[keyof DeprecatedUpdateSessionResponses]; + +export type DeprecatedCreateSessionData = { + body: CreateSessionParams; + path?: never; + query?: never; + url: "/session"; +}; + +export type DeprecatedCreateSessionErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedCreateSessionError = + DeprecatedCreateSessionErrors[keyof DeprecatedCreateSessionErrors]; + +export type DeprecatedCreateSessionResponses = { + /** + * Successful Response + */ + 200: ResponseModelSession; +}; + +export type DeprecatedCreateSessionResponse = + DeprecatedCreateSessionResponses[keyof DeprecatedCreateSessionResponses]; + +export type DeprecatedClearSessionData = { + body?: never; + path: { + /** + * The id of the session to update + */ + session_id: string; + }; + query?: never; + url: "/session/{session_id}/clear"; +}; + +export type DeprecatedClearSessionErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedClearSessionError = + DeprecatedClearSessionErrors[keyof DeprecatedClearSessionErrors]; + +export type DeprecatedClearSessionResponses = { + /** + * Successful Response + */ + 200: ResponseModelSession; +}; + +export type DeprecatedClearSessionResponse = + DeprecatedClearSessionResponses[keyof DeprecatedClearSessionResponses]; + +export type DeprecatedChatData = { + /** + * Req + */ + body: ChatParamsSingleMessage | ChatParamsMultiMessages; + path?: never; + query?: never; + url: "/chat"; +}; + +export type DeprecatedChatErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedChatError = + DeprecatedChatErrors[keyof DeprecatedChatErrors]; + +export type DeprecatedChatResponses = { + /** + * Successful Response + */ + 200: ChatResponse; +}; + +export type DeprecatedChatResponse = + DeprecatedChatResponses[keyof DeprecatedChatResponses]; + +export type DeprecatedChatCompletionsData = { + body: CompletionParams; + path?: never; + query?: never; + url: "/chat/completions"; +}; + +export type DeprecatedChatCompletionsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedChatCompletionsError = + DeprecatedChatCompletionsErrors[keyof DeprecatedChatCompletionsErrors]; + +export type DeprecatedChatCompletionsResponses = { + /** + * Successful Response + */ + 200: CompletionResponse; +}; + +export type DeprecatedChatCompletionsResponse = + DeprecatedChatCompletionsResponses[keyof DeprecatedChatCompletionsResponses]; + +export type DeprecatedExecuteData = { + /** + * Req + */ + body: ChatParamsSingleMessage | ChatParamsMultiMessages; + path?: never; + query?: never; + url: "/execute"; +}; + +export type DeprecatedExecuteErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeprecatedExecuteError = + DeprecatedExecuteErrors[keyof DeprecatedExecuteErrors]; + +export type DeprecatedExecuteResponses = { + /** + * Successful Response + */ + 200: ChatResponse; +}; + +export type DeprecatedExecuteResponse = + DeprecatedExecuteResponses[keyof DeprecatedExecuteResponses]; + +export type FeedbackData = { + body: FeedbackParams; + path?: never; + query?: never; + url: "/feedback"; +}; + +export type FeedbackErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type FeedbackError = FeedbackErrors[keyof FeedbackErrors]; + +export type FeedbackResponses = { + /** + * Successful Response + */ + 200: ResponseModelFeedback; +}; + +export type FeedbackResponse = FeedbackResponses[keyof FeedbackResponses]; + +export type GetModelsData = { + body?: never; + path?: never; + query?: never; + url: "/models"; +}; + +export type GetModelsResponses = { + /** + * Successful Response + */ + 200: ModelResponse; +}; + +export type GetModelsResponse = GetModelsResponses[keyof GetModelsResponses]; + +export type GetAuthDelegatePayloadData = { + body: GetPayloadParams; + path?: never; + query?: never; + url: "/auth/delegate/payload"; +}; + +export type GetAuthDelegatePayloadErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAuthDelegatePayloadError = + GetAuthDelegatePayloadErrors[keyof GetAuthDelegatePayloadErrors]; + +export type GetAuthDelegatePayloadResponses = { + /** + * Successful Response + */ + 200: ResponseModelGetPayloadResponse; +}; + +export type GetAuthDelegatePayloadResponse = + GetAuthDelegatePayloadResponses[keyof GetAuthDelegatePayloadResponses]; + +export type AuthDelegateLoginData = { + body: LoginParams; + path?: never; + query?: never; + url: "/auth/delegate/login"; +}; + +export type AuthDelegateLoginErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type AuthDelegateLoginError = + AuthDelegateLoginErrors[keyof AuthDelegateLoginErrors]; + +export type AuthDelegateLoginResponses = { + /** + * Successful Response + */ + 200: ResponseModelLoginResponse; +}; + +export type AuthDelegateLoginResponse = + AuthDelegateLoginResponses[keyof AuthDelegateLoginResponses]; + +export type VerifyAuthData = { + body?: never; + path?: never; + query?: never; + url: "/auth/verify"; +}; + +export type VerifyAuthResponses = { + /** + * Successful Response + */ + 200: ResponseModelVerifyJwtResponse; +}; + +export type VerifyAuthResponse = VerifyAuthResponses[keyof VerifyAuthResponses]; + +export type GetUserData = { + body?: never; + path?: never; + query?: never; + url: "/user"; +}; + +export type GetUserResponses = { + /** + * Successful Response + */ + 200: ResponseModelUserResponse; +}; + +export type GetUserResponse = GetUserResponses[keyof GetUserResponses]; + +export type GetUserWalletsData = { + body?: never; + path?: never; + query?: never; + url: "/user/wallets"; +}; + +export type GetUserWalletsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListUserWalletResponse; +}; + +export type GetUserWalletsResponse = + GetUserWalletsResponses[keyof GetUserWalletsResponses]; + +export type DeleteUserWalletData = { + body?: never; + path: { + /** + * Wallet Id + */ + wallet_id: string; + }; + query?: never; + url: "/user/wallet/{wallet_id}"; +}; + +export type DeleteUserWalletErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteUserWalletError = + DeleteUserWalletErrors[keyof DeleteUserWalletErrors]; + +export type DeleteUserWalletResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type GetUserWalletData = { + body?: never; + path: { + /** + * Wallet Id + */ + wallet_id: string; + }; + query?: never; + url: "/user/wallet/{wallet_id}"; +}; + +export type GetUserWalletErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetUserWalletError = GetUserWalletErrors[keyof GetUserWalletErrors]; + +export type GetUserWalletResponses = { + /** + * Successful Response + */ + 200: ResponseModelUserWalletResponse; +}; + +export type GetUserWalletResponse = + GetUserWalletResponses[keyof GetUserWalletResponses]; + +export type UpdateUserWalletData = { + body: UpdateUserWalletParams; + path: { + /** + * Wallet Id + */ + wallet_id: string; + }; + query?: never; + url: "/user/wallet/{wallet_id}"; +}; + +export type UpdateUserWalletErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateUserWalletError = + UpdateUserWalletErrors[keyof UpdateUserWalletErrors]; + +export type UpdateUserWalletResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type CreateUserWalletData = { + body: CreateUserWalletParams; + path?: never; + query?: never; + url: "/user/wallet"; +}; + +export type CreateUserWalletErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateUserWalletError = + CreateUserWalletErrors[keyof CreateUserWalletErrors]; + +export type CreateUserWalletResponses = { + /** + * Successful Response + */ + 200: unknown; +}; + +export type GetAgentsData = { + body?: never; + path?: never; + query?: never; + url: "/agents"; +}; + +export type GetAgentsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListAgentListResponse; +}; + +export type GetAgentsResponse = GetAgentsResponses[keyof GetAgentsResponses]; + +export type DeleteAgentData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}"; +}; + +export type DeleteAgentErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteAgentError = DeleteAgentErrors[keyof DeleteAgentErrors]; + +export type DeleteAgentResponses = { + /** + * Successful Response + */ + 200: ResponseModelUuid; +}; + +export type DeleteAgentResponse = + DeleteAgentResponses[keyof DeleteAgentResponses]; + +export type GetAgentData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}"; +}; + +export type GetAgentErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAgentError = GetAgentErrors[keyof GetAgentErrors]; + +export type GetAgentResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentResponse; +}; + +export type GetAgentResponse = GetAgentResponses[keyof GetAgentResponses]; + +export type UpdateAgentData = { + body: UpdateAgentHandlerParams; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}"; +}; + +export type UpdateAgentErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateAgentError = UpdateAgentErrors[keyof UpdateAgentErrors]; + +export type UpdateAgentResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentResponse; +}; + +export type UpdateAgentResponse = + UpdateAgentResponses[keyof UpdateAgentResponses]; + +export type CreateAgentData = { + body: CreateAgentHandlerParams; + path?: never; + query?: never; + url: "/agent"; +}; + +export type CreateAgentErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateAgentError = CreateAgentErrors[keyof CreateAgentErrors]; + +export type CreateAgentResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentResponse; +}; + +export type CreateAgentResponse = + CreateAgentResponses[keyof CreateAgentResponses]; + +export type DeleteAgentTriggerData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Trigger Id + */ + trigger_id: string; + }; + query?: never; + url: "/agent/{agent_id}/trigger/{trigger_id}"; +}; + +export type DeleteAgentTriggerErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteAgentTriggerError = + DeleteAgentTriggerErrors[keyof DeleteAgentTriggerErrors]; + +export type DeleteAgentTriggerResponses = { + /** + * Successful Response + */ + 200: ResponseModelUuid; +}; + +export type DeleteAgentTriggerResponse = + DeleteAgentTriggerResponses[keyof DeleteAgentTriggerResponses]; + +export type GetAgentTriggerData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Trigger Id + */ + trigger_id: string; + }; + query?: never; + url: "/agent/{agent_id}/trigger/{trigger_id}"; +}; + +export type GetAgentTriggerErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAgentTriggerError = + GetAgentTriggerErrors[keyof GetAgentTriggerErrors]; + +export type GetAgentTriggerResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentTriggerResponse; +}; + +export type GetAgentTriggerResponse = + GetAgentTriggerResponses[keyof GetAgentTriggerResponses]; + +export type UpdateAgentTriggerData = { + body: UpdateAgentTriggerParams; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Trigger Id + */ + trigger_id: string; + }; + query?: never; + url: "/agent/{agent_id}/trigger/{trigger_id}"; +}; + +export type UpdateAgentTriggerErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateAgentTriggerError = + UpdateAgentTriggerErrors[keyof UpdateAgentTriggerErrors]; + +export type UpdateAgentTriggerResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentTriggerResponse; +}; + +export type UpdateAgentTriggerResponse = + UpdateAgentTriggerResponses[keyof UpdateAgentTriggerResponses]; + +export type CreateAgentTriggerData = { + body: CreateAgentTriggerParams; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}/trigger"; +}; + +export type CreateAgentTriggerErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateAgentTriggerError = + CreateAgentTriggerErrors[keyof CreateAgentTriggerErrors]; + +export type CreateAgentTriggerResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentTriggerResponse; +}; + +export type CreateAgentTriggerResponse = + CreateAgentTriggerResponses[keyof CreateAgentTriggerResponses]; + +export type DeleteAgentToolData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Tool Id + */ + tool_id: string; + }; + query?: never; + url: "/agent/{agent_id}/tool/{tool_id}"; +}; + +export type DeleteAgentToolErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteAgentToolError = + DeleteAgentToolErrors[keyof DeleteAgentToolErrors]; + +export type DeleteAgentToolResponses = { + /** + * Successful Response + */ + 200: ResponseModelUuid; +}; + +export type DeleteAgentToolResponse = + DeleteAgentToolResponses[keyof DeleteAgentToolResponses]; + +export type GetAgentToolData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Tool Id + */ + tool_id: string; + }; + query?: never; + url: "/agent/{agent_id}/tool/{tool_id}"; +}; + +export type GetAgentToolErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAgentToolError = GetAgentToolErrors[keyof GetAgentToolErrors]; + +export type GetAgentToolResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentToolResponse; +}; + +export type GetAgentToolResponse = + GetAgentToolResponses[keyof GetAgentToolResponses]; + +export type UpdateAgentToolData = { + body: UpdateAgentToolParams; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Tool Id + */ + tool_id: string; + }; + query?: never; + url: "/agent/{agent_id}/tool/{tool_id}"; +}; + +export type UpdateAgentToolErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateAgentToolError = + UpdateAgentToolErrors[keyof UpdateAgentToolErrors]; + +export type UpdateAgentToolResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentToolResponse; +}; + +export type UpdateAgentToolResponse = + UpdateAgentToolResponses[keyof UpdateAgentToolResponses]; + +export type CreateAgentToolData = { + body: CreateAgentToolParams; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}/tool"; +}; + +export type CreateAgentToolErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateAgentToolError = + CreateAgentToolErrors[keyof CreateAgentToolErrors]; + +export type CreateAgentToolResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentToolResponse; +}; + +export type CreateAgentToolResponse = + CreateAgentToolResponses[keyof CreateAgentToolResponses]; + +export type GetAgentWalletsData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + }; + query?: never; + url: "/agent/{agent_id}/wallets"; +}; + +export type GetAgentWalletsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAgentWalletsError = + GetAgentWalletsErrors[keyof GetAgentWalletsErrors]; + +export type GetAgentWalletsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListAgentWalletResponse; +}; + +export type GetAgentWalletsResponse = + GetAgentWalletsResponses[keyof GetAgentWalletsResponses]; + +export type GetAgentWalletData = { + body?: never; + path: { + /** + * Agent Id + */ + agent_id: string; + /** + * Wallet Id + */ + wallet_id: string; + }; + query?: never; + url: "/agent/{agent_id}/wallet/{wallet_id}"; +}; + +export type GetAgentWalletErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetAgentWalletError = + GetAgentWalletErrors[keyof GetAgentWalletErrors]; + +export type GetAgentWalletResponses = { + /** + * Successful Response + */ + 200: ResponseModelAgentWalletResponse; +}; + +export type GetAgentWalletResponse = + GetAgentWalletResponses[keyof GetAgentWalletResponses]; + +export type GetConversationsData = { + body?: never; + path?: never; + query?: { + /** + * Agent Id + */ + agent_id?: string | null; + }; + url: "/conversations"; +}; + +export type GetConversationsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetConversationsError = + GetConversationsErrors[keyof GetConversationsErrors]; + +export type GetConversationsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListConversationListResponse; +}; + +export type GetConversationsResponse = + GetConversationsResponses[keyof GetConversationsResponses]; + +export type DeleteConversationData = { + body?: never; + path: { + /** + * Conversation Id + */ + conversation_id: string; + }; + query?: never; + url: "/conversation/{conversation_id}"; +}; + +export type DeleteConversationErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type DeleteConversationError = + DeleteConversationErrors[keyof DeleteConversationErrors]; + +export type DeleteConversationResponses = { + /** + * Successful Response + */ + 200: ResponseModelUuid; +}; + +export type DeleteConversationResponse = + DeleteConversationResponses[keyof DeleteConversationResponses]; + +export type GetConversationData = { + body?: never; + path: { + /** + * Conversation Id + */ + conversation_id: string; + }; + query?: never; + url: "/conversation/{conversation_id}"; +}; + +export type GetConversationErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetConversationError = + GetConversationErrors[keyof GetConversationErrors]; + +export type GetConversationResponses = { + /** + * Successful Response + */ + 200: ResponseModelConversationResponseReadable; +}; + +export type GetConversationResponse = + GetConversationResponses[keyof GetConversationResponses]; + +export type UpdateConversationData = { + body: UpdateConversationHandlerParams; + path: { + /** + * Conversation Id + */ + conversation_id: string; + }; + query?: never; + url: "/conversation/{conversation_id}"; +}; + +export type UpdateConversationErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateConversationError = + UpdateConversationErrors[keyof UpdateConversationErrors]; + +export type UpdateConversationResponses = { + /** + * Successful Response + */ + 200: ResponseModelConversationResponseReadable; +}; + +export type UpdateConversationResponse = + UpdateConversationResponses[keyof UpdateConversationResponses]; + +export type CreateConversationData = { + body: CreateConversationHandlerParams; + path?: never; + query?: never; + url: "/conversation"; +}; + +export type CreateConversationErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateConversationError = + CreateConversationErrors[keyof CreateConversationErrors]; + +export type CreateConversationResponses = { + /** + * Successful Response + */ + 200: ResponseModelConversationResponseReadable; +}; + +export type CreateConversationResponse = + CreateConversationResponses[keyof CreateConversationResponses]; + +export type CreateConversationMessageData = { + body: CreateMessageHandlerParams; + path: { + /** + * Conversation Id + */ + conversation_id: string; + }; + query?: never; + url: "/conversation/{conversation_id}/message"; +}; + +export type CreateConversationMessageErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type CreateConversationMessageError = + CreateConversationMessageErrors[keyof CreateConversationMessageErrors]; + +export type CreateConversationMessageResponses = { + /** + * Successful Response + */ + 200: ResponseModelConversationMessageResponseReadable; +}; + +export type CreateConversationMessageResponse = + CreateConversationMessageResponses[keyof CreateConversationMessageResponses]; + +export type UpdateConversationMessageData = { + body: UpdateMessageHandlerParams; + path: { + /** + * Conversation Id + */ + conversation_id: string; + /** + * Message Id + */ + message_id: string; + }; + query?: never; + url: "/conversation/{conversation_id}/message/{message_id}"; +}; + +export type UpdateConversationMessageErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type UpdateConversationMessageError = + UpdateConversationMessageErrors[keyof UpdateConversationMessageErrors]; + +export type UpdateConversationMessageResponses = { + /** + * Successful Response + */ + 200: ResponseModelConversationMessageResponseReadable; +}; + +export type UpdateConversationMessageResponse = + UpdateConversationMessageResponses[keyof UpdateConversationMessageResponses]; + +export type GetRegistryAgentsData = { + body?: never; + path?: never; + query?: { + /** + * User Id + */ + user_id?: string | null; + /** + * Search Name + */ + search_name?: string | null; + /** + * Search Description + */ + search_description?: string | null; + /** + * Created After + */ + created_after?: string | null; + /** + * Created Before + */ + created_before?: string | null; + /** + * Updated After + */ + updated_after?: string | null; + /** + * Updated Before + */ + updated_before?: string | null; + /** + * Sort By + */ + sort_by?: "created_at" | "updated_at" | "name"; + /** + * Sort Order + */ + sort_order?: "asc" | "desc"; + /** + * Limit + */ + limit?: number; + /** + * Offset + */ + offset?: number; + }; + url: "/registry/agents"; +}; + +export type GetRegistryAgentsErrors = { + /** + * Validation Error + */ + 422: HttpValidationError; +}; + +export type GetRegistryAgentsError = + GetRegistryAgentsErrors[keyof GetRegistryAgentsErrors]; + +export type GetRegistryAgentsResponses = { + /** + * Successful Response + */ + 200: ResponseModelListRegistryAgentListResponse; +}; + +export type GetRegistryAgentsResponse = + GetRegistryAgentsResponses[keyof GetRegistryAgentsResponses]; + +export type ClientOptions = { + baseUrl: "http://localhost:4242" | (string & {}); +}; diff --git a/packages/nebula/src/configure.ts b/packages/nebula/src/configure.ts new file mode 100644 index 00000000000..0c532036462 --- /dev/null +++ b/packages/nebula/src/configure.ts @@ -0,0 +1,76 @@ +import { type Config, createClient, createConfig } from "@hey-api/client-fetch"; +import type { ThirdwebClient } from "thirdweb"; +import { client } from "./client/client.gen.js"; + +export type NebulaClientOptions = { + readonly clientId?: string; + readonly secretKey?: string; + readonly authToken?: string; +}; + +export function getNebulaClient(baseUrl: string, options: NebulaClientOptions) { + return createClient( + createConfig({ + baseUrl, + headers: { + ...(options.clientId && { "x-client-id": options.clientId }), + ...(options.secretKey && { "x-secret-key": options.secretKey }), + ...(options.authToken && { + authorization: `Bearer ${options.authToken}`, + }), + }, + }), + ); +} + +export function configure( + options: NebulaClientOptions & { override?: Config }, +) { + client.setConfig({ + bodySerializer: stringify, + headers: { + ...(options.clientId && { "x-client-id": options.clientId }), + ...(options.secretKey && { "x-secret-key": options.secretKey }), + ...(options.authToken && { + authorization: `Bearer ${options.authToken}`, + }), + }, + ...(options.override ?? {}), + }); +} + +export function configureWithClient( + twClient: ThirdwebClient, + options?: NebulaClientOptions, + override?: Config, +) { + client.setConfig({ + bodySerializer: stringify, + headers: { + ...(twClient.clientId && { "x-client-id": twClient.clientId }), + ...(twClient.secretKey && { "x-secret-key": twClient.secretKey }), + ...(options?.authToken && { + authorization: `Bearer ${options.authToken}`, + }), + }, + ...(override ?? {}), + }); +} + +function stringify( + // biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature + value: any, + // biome-ignore lint/suspicious/noExplicitAny: JSON.stringify signature + replacer?: ((this: any, key: string, value: any) => any) | null, + space?: string | number, +) { + const res = JSON.stringify( + value, + (key, value_) => { + const value__ = typeof value_ === "bigint" ? value_.toString() : value_; + return typeof replacer === "function" ? replacer(key, value__) : value__; + }, + space, + ); + return res; +} diff --git a/packages/nebula/src/exports/thirdweb.ts b/packages/nebula/src/exports/thirdweb.ts new file mode 100644 index 00000000000..a52f62aba29 --- /dev/null +++ b/packages/nebula/src/exports/thirdweb.ts @@ -0,0 +1,8 @@ +export type { CreateClientConfig } from "../client/client.gen.js"; +export * from "../client/index.js"; +export { + configure, + configureWithClient, + getNebulaClient, + type NebulaClientOptions, +} from "../configure.js"; diff --git a/packages/nebula/tsconfig.base.json b/packages/nebula/tsconfig.base.json new file mode 100644 index 00000000000..25c55988d49 --- /dev/null +++ b/packages/nebula/tsconfig.base.json @@ -0,0 +1,48 @@ +{ + // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. + "compilerOptions": { + // Incremental builds + // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. + "allowJs": false, + "allowSyntheticDefaultImports": true, + "checkJs": false, + + // Interop constraints + "esModuleInterop": false, + "exactOptionalPropertyTypes": false, + "forceConsistentCasingInFileNames": true, + "importHelpers": true, + // Incremental builds + // NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. + "incremental": false, + + // jsx for "/react" portion + "jsx": "react-jsx", + "lib": [ + "ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. + "DOM" // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped. + ], + "module": "NodeNext", + + // Language and environment + "moduleResolution": "NodeNext", + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + + // Skip type checking for node modules + "skipLibCheck": true, + + // Type checking + "strict": true, + "target": "ES2021", + "useDefineForClassFields": true, + "useUnknownInCatchVariables": true, + "verbatimModuleSyntax": true + }, + // This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. + "include": [] +} diff --git a/packages/nebula/tsconfig.build.json b/packages/nebula/tsconfig.build.json new file mode 100644 index 00000000000..63325457c67 --- /dev/null +++ b/packages/nebula/tsconfig.build.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "moduleResolution": "node", + "rootDir": "./src", + "sourceMap": true + }, + "exclude": [ + "src/**/*.test.ts", + "src/**/*.test.tsx", + "src/**/*.test-d.ts", + "src/**/*.bench.ts", + "src/**/*.macro.ts" + ], + "extends": "./tsconfig.base.json", + "include": ["src"] +} diff --git a/packages/nebula/tsconfig.json b/packages/nebula/tsconfig.json new file mode 100644 index 00000000000..bd4c14699e3 --- /dev/null +++ b/packages/nebula/tsconfig.json @@ -0,0 +1,13 @@ +{ + // This configuration is used for local development and type checking. + "compilerOptions": { + "baseUrl": ".", + "paths": { + "~test/*": ["./test/src/*"] + } + }, + "exclude": [], + // This configuration is used for local development and type checking. + "extends": "./tsconfig.base.json", + "include": ["src", "test"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b424d902e0d..7fb817bda30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,33 +5,33 @@ settings: excludeLinksFromLockfile: false overrides: - got@<11.8.5: '>=11.8.5' - glob-parent@<5.1.2: '>=5.1.2' - nth-check@<2.0.1: '>=2.0.1' - socket.io-parser@>=4.0.4 <4.2.3: '>=4.2.3' - fast-xml-parser@<=4.2.4: '>4.2.4' + '@ethereumjs/util@<9.0.0': '>=9.0.0' + '@grpc/grpc-js@<1.10.9': 1.10.9 '@openzeppelin/contracts@>=4.3.0 <4.9.1': '>=4.9.1' '@openzeppelin/contracts@>=4.7.0 <4.9.2': '>=4.9.2' - xml2js@<0.5.0: '>=0.5.0' - engine.io@>=5.1.0 <6.4.2: '>=6.4.2' - semver@<7.5.2: '>=7.5.2' - json5@<1.0.2: '>=1.0.2' - protobufjs@>=6.10.0 <7.2.4: '>=7.2.4' - tough-cookie@<4.1.3: '>=4.1.3' - '@ethereumjs/util@<9.0.0': '>=9.0.0' axios@<0.28.0: '>=0.28.0' - '@grpc/grpc-js@<1.10.9': 1.10.9 - braces@<3.0.3: 3.0.3 - ws@>=8.0.0 <8.17.1: 8.17.1 - ws@>=7.0.0 <7.5.10: 7.5.10 - ws@>=6.0.0 <6.2.3: 6.2.3 axios@<1.7.4: ^1.7.4 - send@<0.19.0: ^0.19.0 - elliptic@<6.5.7: ^6.5.7 + braces@<3.0.3: 3.0.3 cookie@<0.7.0: ^0.7.0 - elliptic@<6.6.0: ^6.6.0 cross-spawn@<6.0.6: ^6.0.6 + elliptic@<6.5.7: ^6.5.7 + elliptic@<6.6.0: ^6.6.0 + engine.io@>=5.1.0 <6.4.2: '>=6.4.2' + fast-xml-parser@<=4.2.4: '>4.2.4' + glob-parent@<5.1.2: '>=5.1.2' + got@<11.8.5: '>=11.8.5' + json5@<1.0.2: '>=1.0.2' + nth-check@<2.0.1: '>=2.0.1' + protobufjs@>=6.10.0 <7.2.4: '>=7.2.4' + semver@<7.5.2: '>=7.5.2' + send@<0.19.0: ^0.19.0 smol-toml@<1.3.1: ^1.3.1 + socket.io-parser@>=4.0.4 <4.2.3: '>=4.2.3' + tough-cookie@<4.1.3: '>=4.1.3' + ws@>=6.0.0 <6.2.3: 6.2.3 + ws@>=7.0.0 <7.5.10: 7.5.10 + ws@>=8.0.0 <8.17.1: 8.17.1 + xml2js@<0.5.0: '>=0.5.0' importers: @@ -1095,6 +1095,31 @@ importers: specifier: ^2.8.1 version: 2.8.1 + packages/nebula: + dependencies: + '@hey-api/client-fetch': + specifier: 0.10.0 + version: 0.10.0(@hey-api/openapi-ts@0.72.1(magicast@0.3.5)(typescript@5.8.3)) + thirdweb: + specifier: workspace:* + version: link:../thirdweb + typescript: + specifier: '>=5.0.4' + version: 5.8.3 + devDependencies: + '@biomejs/biome': + specifier: 2.0.0 + version: 2.0.0 + '@hey-api/openapi-ts': + specifier: 0.72.1 + version: 0.72.1(magicast@0.3.5)(typescript@5.8.3) + rimraf: + specifier: 6.0.1 + version: 6.0.1 + tslib: + specifier: ^2.8.1 + version: 2.8.1 + packages/react-native-adapter: dependencies: '@aws-sdk/client-kms': @@ -11051,17 +11076,17 @@ packages: isomorphic-ws@4.0.1: resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} peerDependencies: - ws: 8.17.1 + ws: 6.2.3 isows@1.0.6: resolution: {integrity: sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==} peerDependencies: - ws: 8.17.1 + ws: 6.2.3 isows@1.0.7: resolution: {integrity: sha512-I1fSfDCZL5P0v33sVqeTDSpcstAg/N+wF5HS033mogOVIp4B+oHC7oOCsA3axAbBSGTJ8QubbNmnIRN/h8U7hg==} peerDependencies: - ws: 8.17.1 + ws: 6.2.3 istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} @@ -29139,8 +29164,8 @@ snapshots: '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.8.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.0) eslint-plugin-react: 7.37.5(eslint@8.57.0) eslint-plugin-react-hooks: 5.2.0(eslint@8.57.0) @@ -29159,7 +29184,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.0): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.1(supports-color@8.1.1) @@ -29170,7 +29195,7 @@ snapshots: tinyglobby: 0.2.14 unrs-resolver: 1.9.0 optionalDependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -29195,18 +29220,18 @@ snapshots: - bluebird - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.8.3) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@8.57.0): dependencies: '@rtsao/scc': 1.1.0 array-includes: 3.1.9 @@ -29217,7 +29242,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.31.0)(eslint@8.57.0))(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3