diff --git a/README.md b/README.md index 22e75c01b..d0dfb4d81 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,15 @@ npm i @digitalocean/dots https://digitaloceandots.readthedocs.io/en/latest/ +#### **Action Gateway** + +Use `@digitalocean/dots/action_gateway` for session-bound tools with Chat +Completions, Messages, and Responses. Toolbelt CRUD is generated from the +public DigitalOcean OpenAPI specification, with a `createToolbelt` convenience +method on `ActionGatewayClient`. + +See the [Action Gateway guide and TypeScript examples](./examples/action-gateway). + ## **Basic Usage** > A quick guide to getting started with client #### Authenticating diff --git a/examples/action-gateway/README.md b/examples/action-gateway/README.md new file mode 100644 index 000000000..437b35d13 --- /dev/null +++ b/examples/action-gateway/README.md @@ -0,0 +1,83 @@ +# Action Gateway + +The TypeScript SDK uses a session-first Action Gateway flow. Create a session +on the DigitalOcean public API, then discover or invoke tools through the +returned session MCP URL with authentication and actor headers managed by the +SDK. + +```ts +import { ActionGatewayClient } from "@digitalocean/dots/action_gateway"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const session = await gateway.session.create({ actorId: "end-user-123" }); +``` + +Session creation sends `actor_id`, `name`, and typed `policy` to +`POST /v2/action-gateway/sessions`. The default policy action is `ask`. Use the +optional `tools` field to select tools (omit it for all tools, or pass `[]` for +none) and `config.preloadTools` to expose concrete tools alongside the three +meta-tools on the returned MCP endpoint. + +```ts +const session = await gateway.session.create({ + actorId: "end-user-123", + tools: ["exa_web_search@v1"], + config: { preloadTools: ["exa_web_search@v1"] }, +}); + +console.log(session.url); // API-returned mcpUrl +``` + +The controls are complementary: top-level `tools` selects the catalog visible +to `action_search` and callable through `action_invoke`, `config.preloadTools` +also exposes selected concrete tools directly, and `permissions` applies +`allow`, `ask`, or `deny` when any selected tool is invoked. See +[`session-controls.ts`](./session-controls.ts) for a complete configuration. + +Because gateway requests carry the DigitalOcean API token, the SDK rejects a +returned `mcpUrl` that is not `https` (loopback hosts excepted for local +gateway development). + +If a policy returns a pending approval, decide it and retry the invocation: + +```ts +await session.approve(approvalId); +// or: await session.deny(approvalId); +``` + +## Toolbelts + +Toolbelts are public DigitalOcean API resources, so CRUD operations are +generated from the public OpenAPI specification under `gateway.toolbelts`. +`createToolbelt` is the Action Gateway convenience wrapper: + +```ts +const toolbelt = await gateway.createToolbelt({ + name: "search-toolbelt", + tools: ["exa_web_search", "exa_web_fetch"], +}); + +const session = await gateway.session.create({ + actorId: "end-user-123", + permissions: { + defaultAction: "ask", + rules: [{ tool: `toolbelt:${toolbelt.ref}`, action: "allow" }], + }, +}); +``` + +## Examples + +| Example | Description | +| --- | --- | +| [`chat-completions.ts`](./chat-completions.ts) | Chat Completions tool loop | +| [`messages.ts`](./messages.ts) | Messages tool loop | +| [`responses.ts`](./responses.ts) | Responses tool loop | +| [`direct-tools.ts`](./direct-tools.ts) | Direct tool search, invoke, and code execution | +| [`async.ts`](./async.ts) | Asynchronous usage | +| [`session-controls.ts`](./session-controls.ts) | Tool selection, preloading, and permissions | +| [`create-toolbelt.ts`](./create-toolbelt.ts) | Toolbelt creation | +| [`toolbelt-policy.ts`](./toolbelt-policy.ts) | Pinned toolbelt references in session policy | +| [`public-api.ts`](./public-api.ts) | Generated public API surface | diff --git a/examples/action-gateway/async.ts b/examples/action-gateway/async.ts new file mode 100644 index 000000000..e268c3cfe --- /dev/null +++ b/examples/action-gateway/async.ts @@ -0,0 +1,13 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const session = await gateway.session.create({ actorId: "end-user-123" }); + +const [tools, catalog] = await Promise.all([ + session.tools(), + session.toolsOperations.list({ includeAll: true }), +]); + +console.log(`Loaded ${tools.length} model tools and ${catalog.length} session tools.`); diff --git a/examples/action-gateway/chat-completions.ts b/examples/action-gateway/chat-completions.ts new file mode 100644 index 000000000..a87055164 --- /dev/null +++ b/examples/action-gateway/chat-completions.ts @@ -0,0 +1,36 @@ +import { Client } from "../../src/inference-gen/inference.js"; +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const apiKey = process.env.DIGITALOCEAN_TOKEN!; +const inference = new Client({ apiKey }); +const gateway = new ActionGatewayClient({ apiKey }); +const session = await gateway.session.create({ + actorId: "end-user-123", + permissions: { + defaultAction: "ask", + rules: [ + { tool: "exa_web_search", action: "allow" }, + { tool: "exa_web_fetch", action: "allow" }, + ], + }, +}); + +const messages: Record[] = [{ + role: "user", + content: "Find the latest DigitalOcean news and summarize it.", +}]; + +while (true) { + const response = await inference.chat.completions.create({ + model: "llama3.3-70b-instruct", + messages, + tools: await session.tools(), + }); + const message = response.choices[0].message; + messages.push(message); + if (!message.tool_calls?.length) { + console.log(message.content); + break; + } + messages.push(...await session.handleToolCalls(response)); +} diff --git a/examples/action-gateway/create-toolbelt.ts b/examples/action-gateway/create-toolbelt.ts new file mode 100644 index 000000000..2fc536d62 --- /dev/null +++ b/examples/action-gateway/create-toolbelt.ts @@ -0,0 +1,27 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); + +const toolbelt = await gateway.createToolbelt({ + name: "search-toolbelt", + tools: ["exa_web_search", "exa_web_fetch"], +}); + +console.log(toolbelt.ref); // search-toolbelt@1 + +// The base CRUD surface is generated from the public OpenAPI specification. +await gateway.toolbelts.get({ queryParameters: { status: "active" } }); +await gateway.toolbelts.byName("search-toolbelt").get({ + queryParameters: { version: "1" }, +}); +await gateway.toolbelts.byName("search-toolbelt").tools.add.post({ + tools: ["jira_create_issue"], +}); +await gateway.toolbelts.byName("search-toolbelt").tools.remove.post({ + tools: ["exa_web_fetch"], +}); + +// Delete the toolbelt when it is no longer needed. +// await gateway.toolbelts.byName("search-toolbelt").delete(); diff --git a/examples/action-gateway/direct-tools.ts b/examples/action-gateway/direct-tools.ts new file mode 100644 index 000000000..93e0486e5 --- /dev/null +++ b/examples/action-gateway/direct-tools.ts @@ -0,0 +1,26 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const session = await gateway.session.create({ + actorId: "end-user-123", + tools: ["exa_web_search@v1", "execute_code@v1"], + config: { preloadTools: ["exa_web_search@v1"] }, + permissions: { + defaultAction: "ask", + rules: [ + { tool: "exa_web_search", action: "allow" }, + { tool: "execute_code", action: "allow" }, + ], + }, +}); + +const search = await session.toolsOperations.search("search the web for DigitalOcean news"); +const result = await session.toolsOperations.invokeOne("exa_web_search", { + query: "DigitalOcean news", + max_results: 5, +}); +const code = await session.code.execute("print(sum(range(10)))"); + +console.dir({ search, result, code }, { depth: null }); diff --git a/examples/action-gateway/messages.ts b/examples/action-gateway/messages.ts new file mode 100644 index 000000000..a36320a2a --- /dev/null +++ b/examples/action-gateway/messages.ts @@ -0,0 +1,31 @@ +import { Client } from "../../src/inference-gen/inference.js"; +import { + ActionGatewayClient, + MessagesProvider, +} from "../../src/action-gateway/index.js"; + +const apiKey = process.env.DIGITALOCEAN_TOKEN!; +const inference = new Client({ apiKey }); +const gateway = new ActionGatewayClient({ + apiKey, + provider: new MessagesProvider(), +}); +const session = await gateway.session.create({ + actorId: "end-user-123", + permissions: { + defaultAction: "ask", + rules: [ + { tool: "exa_web_search", action: "allow" }, + { tool: "exa_web_fetch", action: "allow" }, + ], + }, +}); + +const response = await inference.messages.create({ + model: "anthropic-claude-sonnet-4", + max_tokens: 1024, + messages: [{ role: "user", content: "Find the latest DigitalOcean news." }], + tools: await session.tools(), +}); + +console.dir(await session.handleToolCalls(response), { depth: null }); diff --git a/examples/action-gateway/public-api.ts b/examples/action-gateway/public-api.ts new file mode 100644 index 000000000..0b6e7413d --- /dev/null +++ b/examples/action-gateway/public-api.ts @@ -0,0 +1,78 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; +import type { Create_connection_request } from "../../src/dots/models/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const actorId = process.env.ACTOR_ID ?? "example-user"; + +// Public Tool Registry APIs are generated from DigitalOcean's OpenAPI spec. +console.log("Tools:", await gateway.tools.get({ + queryParameters: { toolkitId: "exa" }, +})); +console.log("Toolkits:", await gateway.tools.toolkits.get()); +console.log("Providers:", await gateway.tools.providers.get()); +console.log("Definition:", await gateway.tools.byName("exa_web_search").definition.get({ + queryParameters: { version: "v1" }, +})); + +// Toolbelts support create, list, get, membership changes, and delete. +console.log("Created toolbelt:", await gateway.toolbelts.post({ + name: "search-toolbelt", + tools: ["exa_web_search"], +})); +console.log("Toolbelts:", await gateway.toolbelts.get({ + queryParameters: { status: "active" }, +})); +const toolbelt = gateway.toolbelts.byName("search-toolbelt"); +console.log("Toolbelt:", await toolbelt.get()); +await toolbelt.tools.add.post({ tools: ["exa_web_fetch"] }); +await toolbelt.tools.remove.post({ tools: ["exa_web_fetch"] }); + +// Connections support create, list, get, parameter updates, and delete. +const connectionRequest: Create_connection_request = { + provider: "github", + userId: actorId, + scopes: ["repo"], +}; +console.log("Created connection:", await gateway.connections.post(connectionRequest)); +console.log("Connections:", await gateway.connections.get({ + queryParameters: { userId: actorId }, +})); + +const connectionId = process.env.CONNECTION_ID; +if (connectionId) { + const connection = gateway.connections.byId(connectionId); + console.log("Connection:", await connection.get()); + await connection.patch({ + connectionParameters: { + additionalData: { site_url: "https://github.com" }, + }, + }); + await connection.delete(); +} + +// Users are derived from their sessions and connections. +console.log("Users:", await gateway.users.get()); +console.log("User:", await gateway.users.byUser_id(actorId).get()); + +// The convenience API delegates session creation to the generated resource +// and returns a session bound to response.mcpUrl. +console.log("Sessions:", await gateway.sessionsApi.get({ + queryParameters: { endUserId: actorId }, +})); +const session = await gateway.session.create({ + actorId, + tools: ["exa_web_search@v1"], + config: { preloadTools: ["exa_web_search@v1"] }, + permissions: { defaultAction: "ask" }, +}); +console.log("Session MCP URL:", session.url); + +const sessionUrn = process.env.SESSION_URN; +if (sessionUrn) { + await gateway.sessionsApi.bySession_urn(sessionUrn).delete(); +} + +// Uncomment when the example toolbelt is no longer needed. +// await toolbelt.delete(); diff --git a/examples/action-gateway/responses.ts b/examples/action-gateway/responses.ts new file mode 100644 index 000000000..93e0a1d72 --- /dev/null +++ b/examples/action-gateway/responses.ts @@ -0,0 +1,27 @@ +import { Client } from "../../src/inference-gen/inference.js"; +import { + ActionGatewayClient, + ResponsesProvider, +} from "../../src/action-gateway/index.js"; + +const apiKey = process.env.DIGITALOCEAN_TOKEN!; +const inference = new Client({ apiKey }); +const gateway = new ActionGatewayClient({ + apiKey, + provider: new ResponsesProvider(), +}); +const session = await gateway.session.create({ + actorId: "end-user-123", + permissions: { + defaultAction: "ask", + rules: [{ tool: "exa_web_search", action: "allow" }], + }, +}); + +const response = await inference.responses.create({ + model: "openai-gpt-4o", + input: "Find the latest DigitalOcean news and summarize it.", + tools: await session.tools(), +}); + +console.dir(await session.handleToolCalls(response), { depth: null }); diff --git a/examples/action-gateway/session-controls.ts b/examples/action-gateway/session-controls.ts new file mode 100644 index 000000000..4e44b6c6a --- /dev/null +++ b/examples/action-gateway/session-controls.ts @@ -0,0 +1,28 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const session = await gateway.session.create({ + actorId: "end-user-123", + + tools: ["exa_web_search@v1", "exa_web_fetch@v1"], + config: { preloadTools: ["exa_web_search@v1"] }, + permissions: { + defaultAction: "deny", + rules: [ + { tool: "exa_web_search", action: "allow" }, + { tool: "exa_web_fetch", action: "ask" }, + ], + }, +}); + +console.log("MCP URL:", session.url); +console.log("Selected for search/invoke:", session.selectedTools); +console.log( + "Exposed directly:", + (await session.toolsOperations.list({ includeAll: true })).map((tool) => tool.name), +); + +const results = await session.toolsOperations.search("search or fetch a public web page"); +console.dir(results, { depth: null }); diff --git a/examples/action-gateway/toolbelt-policy.ts b/examples/action-gateway/toolbelt-policy.ts new file mode 100644 index 000000000..1ed78cbfa --- /dev/null +++ b/examples/action-gateway/toolbelt-policy.ts @@ -0,0 +1,19 @@ +import { ActionGatewayClient } from "../../src/action-gateway/index.js"; + +const gateway = new ActionGatewayClient({ + apiKey: process.env.DIGITALOCEAN_TOKEN!, +}); +const toolbelt = await gateway.createToolbelt({ + name: "search-toolbelt", + tools: ["exa_web_search", "exa_web_fetch"], +}); + +const session = await gateway.session.create({ + actorId: "end-user-123", + permissions: { + defaultAction: "ask", + rules: [{ tool: `toolbelt:${toolbelt.ref}`, action: "allow" }], + }, +}); + +console.log(session.url); diff --git a/package.json b/package.json index 6ad4315e3..37f069a93 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "main": "index.js", "exports": { ".": "./index.js", + "./action_gateway": "./src/action-gateway/index.js", "./inference": "./src/inference-gen/inference.js", "./package.json": "./package.json", "./*": "./*" diff --git a/src/action-gateway/index.ts b/src/action-gateway/index.ts new file mode 100644 index 000000000..f1cff9fc6 --- /dev/null +++ b/src/action-gateway/index.ts @@ -0,0 +1,840 @@ +import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary"; + +import { DigitalOceanApiKeyAuthenticationProvider } from "../dots/DigitalOceanApiKeyAuthenticationProvider.js"; +import { createDigitalOceanClient } from "../dots/digitalOceanClient.js"; +import type { + Create_session_request, + Create_session_request_config, + Session_policy_rule, + Session_policy_spec, + Toolbelt, + Toolbelt_create, +} from "../dots/models/index.js"; +import type { ConnectionsRequestBuilder } from "../dots/v2/actionGateway/connections/index.js"; +import type { SessionsRequestBuilder } from "../dots/v2/actionGateway/sessions/index.js"; +import type { ToolbeltsRequestBuilder } from "../dots/v2/actionGateway/toolbelts/index.js"; +import type { ToolsRequestBuilder } from "../dots/v2/actionGateway/tools/index.js"; +import type { UsersRequestBuilder } from "../dots/v2/actionGateway/users/index.js"; +import { + InferenceClient, + type InferenceClientOptions, +} from "../inference-gen/InferenceClient.js"; + +export const DEFAULT_API_BASE_URL = "https://api.digitalocean.com"; +export const SESSION_ID_HEADER = "X-Session-Id"; +export const ACTOR_ID_HEADER = "X-Actor-Id"; +export const MCP_PROTOCOL_VERSION = "2025-06-18"; + +export const META_SEARCH = "action_search"; +export const META_INVOKE = "action_invoke"; +export const META_CODE = "action_code"; + +type JsonObject = Record; + +export interface PermissionRule { + tool: string; + action?: "allow" | "ask" | "deny" | string; + match?: Record; +} + +export interface Permissions { + defaultAction?: "allow" | "ask" | "deny" | string; + default_action?: "allow" | "ask" | "deny" | string; + rules?: PermissionRule[]; +} + +export interface CreateSessionOptions { + actorId: string; + name?: string; + permissions?: Permissions; + tools?: string[]; + config?: JsonObject; +} + +export interface CreateToolbeltOptions { + name: string; + tools: string[]; + version?: string; + displayName?: string; + description?: string; +} + +export type ToolbeltWithRef = Toolbelt & { readonly ref: string }; + +export interface ActionGatewayClientOptions extends InferenceClientOptions { + apiBaseURL?: string; + provider?: GatewayProvider; +} + +export interface ToolDefinition { + name: string; + title?: string; + description?: string; + inputSchema?: JsonObject; + [key: string]: unknown; +} + +export interface ToolCall { + callId: string; + name: string; + arguments: JsonObject; +} + +export interface SessionToolsOptions { + includeAll?: boolean; + names?: string[]; + search?: string | SearchQuery | Array; + providers?: string[]; + tags?: string[]; + limit?: number; +} + +export interface SearchQuery { + use_case: string; + known_fields?: string; +} + +export interface SearchOptions { + providers?: string[]; + tags?: string[]; + limit?: number; +} + +export interface InvokeTool { + tool?: string; + toolSlug?: string; + /** Snake-case alias advertised by the {@link META_INVOKE} JSON schema. */ + tool_slug?: string; + arguments?: JsonObject; +} + +export interface InvokeOptions { + rationale?: string; +} + +export type ToolResultMessage = JsonObject; + +export interface GatewayProvider { + readonly name: string; + wrapTools(tools: ToolDefinition[]): JsonObject[]; + extractToolCalls(response: unknown): ToolCall[]; + formatToolResults(calls: ToolCall[], results: unknown[]): ToolResultMessage[]; +} + +export class GatewayError extends Error { + public constructor( + message: string, + public readonly status?: number, + public readonly body?: unknown, + ) { + super(message); + this.name = "GatewayError"; + } +} + +function asObject(value: unknown): JsonObject { + return value !== null && typeof value === "object" ? value as JsonObject : {}; +} + +function asArray(value: unknown): unknown[] { + return Array.isArray(value) ? value : []; +} + +function parseArguments(value: unknown): JsonObject { + if (typeof value === "string") { + if (!value.trim()) return {}; + return asObject(JSON.parse(value)); + } + return asObject(value); +} + +function stringifyResult(value: unknown): string { + return typeof value === "string" ? value : JSON.stringify(value); +} + +function simplifySchema(schema: unknown): JsonObject { + const simplified = structuredClone(asObject(schema)); + for (const key of ["oneOf", "allOf", "anyOf", "enum", "const", "not"]) { + delete simplified[key]; + } + simplified.type ??= "object"; + if (simplified.type === "object") simplified.properties ??= {}; + return simplified; +} + +function toolFields(tool: ToolDefinition): JsonObject { + return { + name: tool.name, + description: tool.description ?? tool.title ?? "", + parameters: simplifySchema(tool.inputSchema), + }; +} + +export class ChatCompletionsProvider implements GatewayProvider { + public readonly name = "chat.completions"; + + public wrapTools(tools: ToolDefinition[]): JsonObject[] { + return tools.map((tool) => ({ type: "function", function: toolFields(tool) })); + } + + public extractToolCalls(response: unknown): ToolCall[] { + const choice = asObject(asArray(asObject(response).choices)[0]); + const message = asObject(choice.message); + return asArray(message.tool_calls).map((value) => { + const call = asObject(value); + const functionCall = asObject(call.function); + return { + callId: String(call.id ?? ""), + name: String(functionCall.name ?? ""), + arguments: parseArguments(functionCall.arguments), + }; + }); + } + + public formatToolResults(calls: ToolCall[], results: unknown[]): ToolResultMessage[] { + return calls.map((call, index) => ({ + role: "tool", + tool_call_id: call.callId, + content: stringifyResult(results[index]), + })); + } +} + +export class MessagesProvider implements GatewayProvider { + public readonly name = "messages"; + + public wrapTools(tools: ToolDefinition[]): JsonObject[] { + return tools.map((tool) => { + const fields = toolFields(tool); + return { + name: fields.name, + description: fields.description, + input_schema: fields.parameters, + }; + }); + } + + public extractToolCalls(response: unknown): ToolCall[] { + return asArray(asObject(response).content) + .map(asObject) + .filter((block) => block.type === "tool_use") + .map((block) => ({ + callId: String(block.id ?? ""), + name: String(block.name ?? ""), + arguments: parseArguments(block.input), + })); + } + + public formatToolResults(calls: ToolCall[], results: unknown[]): ToolResultMessage[] { + if (calls.length === 0) return []; + return [{ + role: "user", + content: calls.map((call, index) => ({ + type: "tool_result", + tool_use_id: call.callId, + content: stringifyResult(results[index]), + })), + }]; + } +} + +export class ResponsesProvider implements GatewayProvider { + public readonly name = "responses"; + + public wrapTools(tools: ToolDefinition[]): JsonObject[] { + return tools.map((tool) => ({ type: "function", ...toolFields(tool) })); + } + + public extractToolCalls(response: unknown): ToolCall[] { + return asArray(asObject(response).output) + .map(asObject) + .filter((item) => item.type === "function_call") + .map((item) => ({ + callId: String(item.call_id ?? item.id ?? ""), + name: String(item.name ?? ""), + arguments: parseArguments(item.arguments), + })); + } + + public formatToolResults(calls: ToolCall[], results: unknown[]): ToolResultMessage[] { + return calls.map((call, index) => ({ + type: "function_call_output", + call_id: call.callId, + output: stringifyResult(results[index]), + })); + } +} + +function normalizeBaseURL(value: string): string { + const url = value.trim().replace(/\/+$/, ""); + return url.includes("://") ? url : `https://${url}`; +} + +function externalSessionId(sessionUrn: string): string { + return sessionUrn.split(":").at(-1) ?? sessionUrn; +} + +function isLoopbackHost(hostname: string): boolean { + return hostname === "localhost" + || hostname === "127.0.0.1" + || hostname === "[::1]" + || hostname.endsWith(".localhost"); +} + +/** + * Gateway requests carry the DigitalOcean API token, so refuse an `mcpUrl` that + * would put it on the wire in cleartext. Loopback endpoints stay usable for + * local gateway development. + */ +function assertTransportURL(mcpURL: string, payload: unknown): void { + let url: URL; + try { + url = new URL(mcpURL); + } catch { + throw new GatewayError(`session create response returned an invalid mcpUrl: ${mcpURL}`, undefined, payload); + } + if (url.protocol === "https:") return; + if (url.protocol === "http:" && isLoopbackHost(url.hostname)) return; + throw new GatewayError( + `session create response returned a non-HTTPS mcpUrl: ${mcpURL}`, + undefined, + payload, + ); +} + +function normalizePermissions(permissions?: Permissions): Required> { + const rules = (permissions?.rules ?? []).map((rule) => { + if (!rule.tool) throw new Error("each permissions rule requires tool"); + return { + tool: rule.tool, + action: rule.action ?? "allow", + ...(rule.match ? { match: rule.match } : {}), + }; + }); + return { + defaultAction: permissions?.defaultAction ?? permissions?.default_action ?? "ask", + rules, + }; +} + +function toSessionPolicy(policy: Required>): Session_policy_spec { + return { + defaultAction: policy.defaultAction as Session_policy_spec["defaultAction"], + rules: policy.rules.map((rule): Session_policy_rule => ({ + tool: rule.tool, + action: rule.action as Session_policy_rule["action"], + ...(rule.match ? { match: { additionalData: rule.match } } : {}), + })), + }; +} + +function toSessionConfig(config: JsonObject): Create_session_request_config { + const { preloadTools, ...additionalData } = config; + return { + ...(preloadTools === undefined ? {} : { preloadTools: preloadTools as string[] }), + ...(Object.keys(additionalData).length === 0 ? {} : { additionalData }), + }; +} + +async function requestJSON( + url: string, + apiKey: string | undefined, + init: RequestInit, +): Promise { + const response = await fetch(url, { + ...init, + headers: { + ...(apiKey ? { Authorization: `Bearer ${apiKey}` } : {}), + Accept: "application/json", + "Content-Type": "application/json", + ...init.headers, + }, + }); + const text = await response.text(); + let body: unknown; + try { + body = text ? JSON.parse(text) : undefined; + } catch { + body = text; + } + if (!response.ok) { + const message = String(asObject(body).message ?? response.statusText ?? "request failed"); + throw new GatewayError(message, response.status, body); + } + return body; +} + +const META_TOOLS: ToolDefinition[] = [ + { + name: META_SEARCH, + title: "Action Search", + description: "Discover catalog tools for one or more use cases.", + inputSchema: { + type: "object", + properties: { + queries: { + type: "array", + minItems: 1, + maxItems: 5, + items: { + type: "object", + properties: { + use_case: { type: "string" }, + known_fields: { type: "string" }, + }, + required: ["use_case"], + }, + }, + providers: { type: "array", items: { type: "string" } }, + tags: { type: "array", items: { type: "string" } }, + limit: { type: "integer" }, + }, + required: ["queries"], + }, + }, + { + name: META_INVOKE, + title: "Action Invoke", + description: "Invoke one to ten catalog tools in parallel.", + inputSchema: { + type: "object", + properties: { + tools: { + type: "array", + minItems: 1, + maxItems: 10, + items: { + type: "object", + properties: { + tool: { type: "string" }, + tool_slug: { type: "string" }, + arguments: { type: "object" }, + }, + }, + }, + rationale: { type: "string", maxLength: 512 }, + }, + required: ["tools"], + }, + }, + { + name: META_CODE, + title: "Action Code", + description: "Run Python in an ephemeral sandbox.", + inputSchema: { + type: "object", + properties: { + code: { type: "string" }, + code_to_execute: { type: "string" }, + thought: { type: "string" }, + }, + }, + }, +]; + +class GatewayTransport { + public readonly sessionId: string; + private nextRequestId = 1; + + public constructor( + private readonly apiKey: string, + private readonly endpointURL: string, + sessionUrn: string, + private readonly actorId: string, + ) { + this.sessionId = externalSessionId(sessionUrn); + } + + public async callTool(name: string, arguments_: JsonObject): Promise { + const result = await this.rpc("tools/call", { name, arguments: arguments_ }); + return unwrapMCPToolResult(result); + } + + public async listTools(): Promise { + const result = asObject(await this.rpc("tools/list")); + return asArray(result.tools) as ToolDefinition[]; + } + + public async decideApproval(approvalId: string, decision: "approve" | "deny"): Promise { + const normalizedApprovalId = approvalId.trim(); + if (!normalizedApprovalId) throw new Error("approvalId is required"); + const origin = new URL(this.endpointURL).origin; + return requestJSON(`${origin}/approvals/${encodeURIComponent(normalizedApprovalId)}`, this.apiKey, { + method: "POST", + headers: { + [SESSION_ID_HEADER]: this.sessionId, + [ACTOR_ID_HEADER]: this.actorId, + }, + body: JSON.stringify({ decision }), + }); + } + + private async rpc(method: string, params?: JsonObject): Promise { + const response = await fetch(this.endpointURL, { + method: "POST", + headers: { + Authorization: `Bearer ${this.apiKey}`, + Accept: "application/json, text/event-stream", + "Content-Type": "application/json", + "MCP-Protocol-Version": MCP_PROTOCOL_VERSION, + [SESSION_ID_HEADER]: this.sessionId, + [ACTOR_ID_HEADER]: this.actorId, + }, + body: JSON.stringify({ + jsonrpc: "2.0", + id: this.nextRequestId++, + method, + ...(params === undefined ? {} : { params }), + }), + }); + const text = await response.text(); + const envelope = parseMCPEnvelope(text); + if (!response.ok) { + throw new GatewayError( + String(asObject(envelope).message ?? response.statusText ?? "request failed"), + response.status, + envelope, + ); + } + const error = asObject(asObject(envelope).error); + if (Object.keys(error).length > 0) { + throw new GatewayError(String(error.message ?? "MCP request failed"), undefined, error); + } + if (!("result" in asObject(envelope))) { + throw new GatewayError("MCP response is missing result", undefined, envelope); + } + return asObject(envelope).result; + } +} + +function parseMCPEnvelope(text: string): unknown { + if (!text.trim()) return undefined; + if (!text.split("\n").some((line) => line.startsWith("data:"))) return JSON.parse(text); + const events = text.split(/\r?\n\r?\n/); + for (const event of events) { + const data = event.split(/\r?\n/) + .filter((line) => line.startsWith("data:")) + .map((line) => line.slice(5).trimStart()) + .join("\n"); + if (!data) continue; + const candidate = JSON.parse(data); + if ("result" in asObject(candidate) || "error" in asObject(candidate)) return candidate; + } + throw new GatewayError("MCP response did not contain a JSON-RPC result"); +} + +function unwrapMCPToolResult(payload: unknown): unknown { + const result = asObject(payload); + if (result.isError) { + const structured = asObject(result.structuredContent); + const error = asObject(structured.error); + throw new GatewayError(String(error.message ?? contentText(result.content) ?? "tool call failed"), undefined, payload); + } + if ("structuredContent" in result) return result.structuredContent; + const text = contentText(result.content); + if (text === undefined) return payload; + try { + return JSON.parse(text); + } catch { + return text; + } +} + +function contentText(content: unknown): string | undefined { + const text = asArray(content) + .map(asObject) + .filter((item) => item.type === "text" && typeof item.text === "string") + .map((item) => String(item.text)) + .join("\n"); + return text || undefined; +} + +function unwrapToolResult(payload: unknown): unknown { + const result = asObject(payload); + if (result.status && result.status !== "succeeded") { + const error = asObject(result.error); + throw new GatewayError(String(error.message ?? "tool call failed"), undefined, payload); + } + if ("output" in result) { + if (typeof result.output === "string") { + try { + return JSON.parse(result.output); + } catch { + return result.output; + } + } + return result.output; + } + return payload; +} + +function toolErrorResult(error: GatewayError): JsonObject { + const body = asObject(error.body); + const structured = asObject(body.structuredContent); + const structuredError = asObject(structured.error); + const bodyError = asObject(body.error); + const details = Object.keys(structuredError).length > 0 ? structuredError : bodyError; + return { + error: Object.keys(details).length > 0 + ? { ...details, message: details.message ?? error.message } + : { message: error.message }, + ...(body._meta === undefined ? {} : { _meta: body._meta }), + }; +} + +function normalizeQueries(input: string | SearchQuery | Array): SearchQuery[] { + const queries = Array.isArray(input) ? input : [input]; + if (queries.length < 1 || queries.length > 5) { + throw new Error("search accepts between 1 and 5 queries"); + } + return queries.map((query) => typeof query === "string" ? { use_case: query } : query); +} + +export class ToolsOperations { + public constructor( + private readonly transport: GatewayTransport, + private readonly provider: GatewayProvider, + ) {} + + public async list(options: { includeAll?: boolean } = {}): Promise { + if (!options.includeAll) return structuredClone(META_TOOLS); + return this.transport.listTools(); + } + + public async search( + queries: string | SearchQuery | Array, + options: SearchOptions = {}, + ): Promise { + return this.transport.callTool(META_SEARCH, { + queries: normalizeQueries(queries), + ...(options.providers?.length ? { providers: options.providers } : {}), + ...(options.tags?.length ? { tags: options.tags } : {}), + ...(options.limit !== undefined ? { limit: options.limit } : {}), + }); + } + + public async invoke(tools: InvokeTool[], options: InvokeOptions = {}): Promise { + if (tools.length < 1 || tools.length > 10) { + throw new Error("invoke accepts between 1 and 10 tools"); + } + const normalized = tools.map((tool) => { + const name = tool.tool ?? tool.toolSlug ?? tool.tool_slug; + if (!name) throw new Error("each invoke entry requires tool"); + return { tool: name, arguments: tool.arguments ?? {} }; + }); + return this.transport.callTool(META_INVOKE, { + tools: normalized, + ...(options.rationale ? { rationale: options.rationale } : {}), + }); + } + + public async invokeOne(name: string, arguments_: JsonObject = {}, options: InvokeOptions = {}): Promise { + const envelope = asObject(await this.invoke([{ tool: name, arguments: arguments_ }], options)); + const first = asObject(asArray(envelope.results)[0]); + if (Object.keys(first).length === 0) throw new GatewayError(`invoke of ${name} returned no results`); + return unwrapToolResult(first.result ?? first); + } + + public async definitions(options: SessionToolsOptions = {}): Promise { + let catalog: ToolDefinition[]; + if (options.search !== undefined) { + catalog = flattenSearchResults(await this.search(options.search, options)); + } else { + catalog = await this.list({ includeAll: options.includeAll || Boolean(options.names?.length) }); + } + if (options.names?.length) { + const names = new Set(options.names); + catalog = catalog.filter((tool) => names.has(tool.name)); + const missing = options.names.filter((name) => !catalog.some((tool) => tool.name === name)); + if (missing.length) throw new Error(`tools not found in catalog: ${missing.join(", ")}`); + } + return this.provider.wrapTools(catalog); + } +} + +function flattenSearchResults(payload: unknown): ToolDefinition[] { + const found = new Map(); + for (const group of asArray(asObject(payload).results)) { + for (const match of asArray(asObject(group).results)) { + const tool = asObject(match) as ToolDefinition; + if (tool.name && !found.has(tool.name)) found.set(tool.name, tool); + } + } + return [...found.values()]; +} + +export class CodeOperations { + public constructor(private readonly transport: GatewayTransport) {} + + public async execute(code: string, options: { thought?: string } = {}): Promise { + if (!code.trim()) throw new Error("code is empty"); + return this.transport.callTool(META_CODE, { + code, + ...(options.thought ? { thought: options.thought } : {}), + }); + } +} + +export class Session { + public readonly id: string; + public readonly toolsOperations: ToolsOperations; + public readonly code: CodeOperations; + private readonly transport: GatewayTransport; + + public constructor( + public readonly sessionUrn: string, + public readonly actorId: string, + public readonly name: string, + public readonly policy: Required>, + private readonly mcpURL: string, + private readonly provider: GatewayProvider, + transport: GatewayTransport, + public readonly raw: JsonObject, + public readonly selectedTools: string[], + ) { + this.id = externalSessionId(sessionUrn); + this.transport = transport; + this.toolsOperations = new ToolsOperations(transport, provider); + this.code = new CodeOperations(transport); + } + + public get url(): string { + return this.mcpURL; + } + + public approve(approvalId: string): Promise { + return this.transport.decideApproval(approvalId, "approve"); + } + + public deny(approvalId: string): Promise { + return this.transport.decideApproval(approvalId, "deny"); + } + + public tools(options: SessionToolsOptions = {}): Promise { + return this.toolsOperations.definitions(options); + } + + public async handleToolCalls(response: unknown, options: InvokeOptions = {}): Promise { + const calls = this.provider.extractToolCalls(response); + const results = await this.executeToolCalls(calls, options); + return this.provider.formatToolResults(calls, results); + } + + public async executeToolCalls(calls: ToolCall[], options: InvokeOptions = {}): Promise { + return Promise.all(calls.map(async (call) => { + try { + if (call.name === META_SEARCH) return await this.toolsOperations.search(asArray(call.arguments.queries) as SearchQuery[], call.arguments as SearchOptions); + if (call.name === META_INVOKE) return await this.toolsOperations.invoke(asArray(call.arguments.tools) as InvokeTool[], { + rationale: String(call.arguments.rationale ?? options.rationale ?? "") || undefined, + }); + if (call.name === META_CODE) { + const code = String(call.arguments.code ?? call.arguments.code_to_execute ?? ""); + return await this.code.execute(code, { thought: String(call.arguments.thought ?? "") || undefined }); + } + return await this.toolsOperations.invokeOne(call.name, call.arguments, options); + } catch (error) { + if (error instanceof GatewayError) return toolErrorResult(error); + throw error; + } + })); + } +} + +export class SessionsOperations { + public constructor( + private readonly apiKey: string, + private readonly provider: GatewayProvider, + private readonly sessionsApi: SessionsRequestBuilder, + ) {} + + public async create(options: CreateSessionOptions): Promise { + const actorId = options.actorId?.trim(); + if (!actorId) throw new Error("actorId is required"); + const suffix = Math.random().toString(16).slice(2, 10); + const name = options.name ?? `dots-session-${suffix}`; + const policy = normalizePermissions(options.permissions); + if (options.tools !== undefined && !Array.isArray(options.tools)) { + throw new TypeError("tools must be an array of tool references"); + } + const body: Create_session_request = { + actorId, + name, + policy: toSessionPolicy(policy), + ...(options.tools === undefined ? {} : { tools: options.tools }), + ...(options.config === undefined ? {} : { config: toSessionConfig(options.config) }), + }; + const payload = await this.sessionsApi.post(body); + const raw = asObject(payload?.session); + const sessionUrn = String(payload?.session?.sessionUrn ?? ""); + if (!sessionUrn) throw new GatewayError("session create response is missing sessionUrn", undefined, payload); + const mcpURL = String(payload?.mcpUrl ?? ""); + if (!mcpURL) throw new GatewayError("session create response is missing mcpUrl", undefined, payload); + assertTransportURL(mcpURL, payload); + const selectedTools = (payload?.tools ?? []).map(String); + const transport = new GatewayTransport(this.apiKey, mcpURL, sessionUrn, actorId); + return new Session( + sessionUrn, + actorId, + String(raw.name ?? name), + policy, + mcpURL, + this.provider, + transport, + raw, + selectedTools, + ); + } +} + +export class ActionGatewayClient extends InferenceClient { + public readonly session: SessionsOperations; + public readonly sessions: SessionsOperations; + public readonly sessionsApi: SessionsRequestBuilder; + public readonly tools: ToolsRequestBuilder; + public readonly toolbelts: ToolbeltsRequestBuilder; + public readonly connections: ConnectionsRequestBuilder; + public readonly users: UsersRequestBuilder; + public readonly provider: GatewayProvider; + + public constructor(options: ActionGatewayClientOptions) { + super(options); + const apiKey = options.apiKey?.trim(); + if (!apiKey) throw new Error("apiKey is required"); + const apiBaseURL = normalizeBaseURL(options.apiBaseURL ?? DEFAULT_API_BASE_URL); + this.provider = options.provider ?? new ChatCompletionsProvider(); + + const authProvider = new DigitalOceanApiKeyAuthenticationProvider(apiKey); + const adapter = new FetchRequestAdapter(authProvider); + adapter.baseUrl = apiBaseURL; + const publicApi = createDigitalOceanClient(adapter).v2.actionGateway; + this.sessionsApi = publicApi.sessions; + this.tools = publicApi.tools; + this.toolbelts = publicApi.toolbelts; + this.connections = publicApi.connections; + this.users = publicApi.users; + this.session = new SessionsOperations(apiKey, this.provider, this.sessionsApi); + this.sessions = this.session; + } + + public async createToolbelt(options: CreateToolbeltOptions): Promise { + if (!Array.isArray(options.tools)) throw new TypeError("tools must be an array of tool names"); + const body: Toolbelt_create = { + name: options.name, + tools: options.tools, + version: options.version, + displayName: options.displayName, + description: options.description, + }; + const response = await this.toolbelts.post(body); + const toolbelt = response?.toolbelt; + if (!toolbelt?.reference) throw new GatewayError("toolbelt create response is missing reference"); + return Object.defineProperty(toolbelt, "ref", { + configurable: true, + enumerable: true, + get: () => toolbelt.reference, + }) as ToolbeltWithRef; + } +} + +export { ActionGatewayClient as Client }; +export default ActionGatewayClient; diff --git a/src/dots/kiota-lock.json b/src/dots/kiota-lock.json index 492e2081f..f95c56c4f 100644 --- a/src/dots/kiota-lock.json +++ b/src/dots/kiota-lock.json @@ -1,8 +1,8 @@ { - "descriptionHash": "FCF3FAE743C3959028DFDD1A29D6EF0FE6012C7376EA690463662E3D63B8A68A9B22B85AB7F432CD36EC84BADCDDFD1EAF9D2850622C93A60C325EA671346D78", + "descriptionHash": "8C210F6E7D540499F1C7482C2B55618EB8733F26159BBE3CCE21CB612869C08DE2F279FCF229F45498F3DA604EAD82171B952D8B2EDC47AADFE090C946A9D6AF", "descriptionLocation": "../../DigitalOcean-public.v2.yaml", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.31.1", + "kiotaVersion": "1.34.1", "clientClassName": "DigitalOceanClient", "typeAccessModifier": "Public", "clientNamespaceName": "ApiSdk", @@ -30,5 +30,6 @@ ], "includePatterns": [], "excludePatterns": [], - "disabledValidationRules": [] + "disabledValidationRules": [], + "allowedExternalOrigins": [] } \ No newline at end of file diff --git a/src/dots/models/index.ts b/src/dots/models/index.ts index 2d21cb3ab..c8a3c1fbc 100644 --- a/src/dots/models/index.ts +++ b/src/dots/models/index.ts @@ -7372,7 +7372,7 @@ export interface App_event_autoscaling_components extends AdditionalDataHolder, } export type App_event_autoscaling_phase = (typeof App_event_autoscaling_phaseObject)[keyof typeof App_event_autoscaling_phaseObject]; export type App_event_type = (typeof App_event_typeObject)[keyof typeof App_event_typeObject]; -export interface App_events extends Pagination, Parsable { +export interface App_events extends Pages_pagination, Parsable { /** * The events property */ @@ -7719,7 +7719,7 @@ export interface App_job_invocation_trigger_scheduled_schedule extends Additiona timeZone?: string | null; } export type App_job_invocation_trigger_type = (typeof App_job_invocation_trigger_typeObject)[keyof typeof App_job_invocation_trigger_typeObject]; -export interface App_job_invocations extends Pagination, Parsable { +export interface App_job_invocations extends Pages_pagination, Parsable { /** * The job_invocations property */ @@ -8409,7 +8409,7 @@ export interface Apps_cors_policy extends AdditionalDataHolder, Parsable { } export interface Apps_create_app_request extends AdditionalDataHolder, Parsable { /** - * The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project.

Requires `project:update` scope. + * The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project.

Requires `project:assign_resource` scope. */ projectId?: string | null; /** @@ -9178,6 +9178,54 @@ export interface Async_invoke_response extends AdditionalDataHolder, Parsable { export interface Async_invoke_response_output extends AdditionalDataHolder, Parsable { } export type Async_invoke_response_status = (typeof Async_invoke_response_statusObject)[keyof typeof Async_invoke_response_statusObject]; +export interface Auth_injection extends Parsable { + /** + * The location property + */ + location?: string | null; + /** + * The name property + */ + name?: string | null; + /** + * The scheme property + */ + scheme?: string | null; +} +export interface Auth_spec extends Parsable { + /** + * BaseURLResolution declaratively describes a post-token-exchange lookup anOAuth-backed tool needs to compute its real request base_url (e.g. JiraCloud's per-site cloudId indirection). strategy is a oneof so exactly oneresolution kind can ever be set at a time; "http_lookup" is the only kindimplemented today, see action-executor/internal/credentials for thegeneric resolver that executes this recipe. + */ + baseUrlResolution?: Base_url_resolution | null; + /** + * The credentialBinding property + */ + credentialBinding?: string | null; + /** + * The credentialRefSource property + */ + credentialRefSource?: string | null; + /** + * The doManagedCredentialRef property + */ + doManagedCredentialRef?: string | null; + /** + * The injection property + */ + injection?: Auth_injection | null; + /** + * The modes property + */ + modes?: string[] | null; + /** + * The provider property + */ + provider?: string | null; + /** + * The scopes property + */ + scopes?: string[] | null; +} export interface Autoscale_pool extends AdditionalDataHolder, Parsable { /** * The number of active Droplets in the autoscale pool. @@ -9354,6 +9402,15 @@ export interface Balance extends AdditionalDataHolder, Parsable { */ monthToDateUsage?: string | null; } +/** + * BaseURLResolution declaratively describes a post-token-exchange lookup anOAuth-backed tool needs to compute its real request base_url (e.g. JiraCloud's per-site cloudId indirection). strategy is a oneof so exactly oneresolution kind can ever be set at a time; "http_lookup" is the only kindimplemented today, see action-executor/internal/credentials for thegeneric resolver that executes this recipe. + */ +export interface Base_url_resolution extends Parsable { + /** + * HTTPLookupSpec resolves a base_url by calling url (bearer-authenticatedwith the just-exchanged access token), selecting an entry in the JSON array,extracting extract_field from that entry, and substituting it for "{value}"in base_url_template. When match_field and match_value are both set, theyselect the entry. When both are empty, exactly one entry whose own "scopes"array contains required_scopes must exist. Configuring only one match fieldis invalid. Resolution fails fast on zero or multiple compatible entries. + */ + httpLookup?: Http_lookup_spec | null; +} /** * A Batch Inference job. */ @@ -10271,6 +10328,20 @@ export interface Check_updatable extends AdditionalDataHolder, Parsable { } export type Check_updatable_regions = (typeof Check_updatable_regionsObject)[keyof typeof Check_updatable_regionsObject]; export type Check_updatable_type = (typeof Check_updatable_typeObject)[keyof typeof Check_updatable_typeObject]; +export interface Classification extends Parsable { + /** + * The dataClasses property + */ + dataClasses?: string[] | null; + /** + * The operation property + */ + operation?: string | null; + /** + * The risk property + */ + risk?: string | null; +} export interface Cluster extends AdditionalDataHolder, Parsable { /** * An object specifying whether the AMD Device Metrics Exporter should be enabled in the Kubernetes cluster. @@ -10336,6 +10407,10 @@ export interface Cluster extends AdditionalDataHolder, Parsable { * An object specifying whether the Nvidia GPU Device Plugin should be enabled in the Kubernetes cluster. It's enabled by default for clusters with an Nvidia GPU node pool. */ nvidiaGpuDevicePlugin?: Nvidia_gpu_device_plugin | null; + /** + * An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster. + */ + p2pOciRegistryPlugin?: P2p_oci_registry_plugin | null; /** * An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster. */ @@ -10472,6 +10547,10 @@ export interface Cluster_read extends AdditionalDataHolder, Parsable { * An object specifying whether the Nvidia GPU Device Plugin should be enabled in the Kubernetes cluster. It's enabled by default for clusters with an Nvidia GPU node pool. */ nvidiaGpuDevicePlugin?: Nvidia_gpu_device_plugin | null; + /** + * An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster. + */ + p2pOciRegistryPlugin?: P2p_oci_registry_plugin | null; /** * An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster. */ @@ -10614,6 +10693,10 @@ export interface Cluster_update extends AdditionalDataHolder, Parsable { * An object specifying whether the Nvidia GPU Device Plugin should be enabled in the Kubernetes cluster. It's enabled by default for clusters with an Nvidia GPU node pool. */ nvidiaGpuDevicePlugin?: Nvidia_gpu_device_plugin | null; + /** + * An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster. + */ + p2pOciRegistryPlugin?: P2p_oci_registry_plugin | null; /** * An object specifying whether the RDMA shared device plugin should be enabled in the Kubernetes cluster. */ @@ -10748,6 +10831,68 @@ export interface Completion_usage_cache_creation extends AdditionalDataHolder, P */ ephemeral5mInputTokens?: number | null; } +/** + * ConnectionAuthorization is present only while a connection is pending. TheUI sends the user to connect_url and polls GetConnection until the connectionbecomes active or expires. The Secrets Manager poll URL is never exposed. + */ +export interface Connection_authorization extends Parsable { + /** + * The connect_url property + */ + connectUrl?: string | null; + /** + * The expires_at property + */ + expiresAt?: Date | null; + /** + * The status property + */ + status?: string | null; + /** + * The verification_code property + */ + verificationCode?: string | null; +} +/** + * ConnectionParameterSpec describes one non-sensitive value collected whileconfiguring a provider connection. The UI and MCP clients render thesespecifications generically. + */ +export interface Connection_parameter_spec extends Parsable { + /** + * The allowed_host_suffixes property + */ + allowedHostSuffixes?: string[] | null; + /** + * The allowed_values property + */ + allowedValues?: string[] | null; + /** + * The description property + */ + description?: string | null; + /** + * The input_kind property + */ + inputKind?: string | null; + /** + * The key property + */ + key?: string | null; + /** + * The label property + */ + label?: string | null; + /** + * The max_length property + */ + maxLength?: number | null; + /** + * The normalization property + */ + normalization?: string | null; + /** + * The required property + */ + required?: boolean | null; +} export interface Connection_pool extends AdditionalDataHolder, Parsable { /** * The connection property @@ -10832,6 +10977,36 @@ export interface Coredns_autoscaler extends AdditionalDataHolder, Parsable { */ enabled?: boolean | null; } +export interface Create_connection_request extends Parsable { + /** + * The connection_parameters property + */ + connectionParameters?: Create_connection_request_connection_parameters | null; + /** + * The provider property + */ + provider?: string | null; + /** + * The scopes property + */ + scopes?: string[] | null; + /** + * The user_id property + */ + userId?: string | null; +} +export interface Create_connection_request_connection_parameters extends AdditionalDataHolder, Parsable { +} +export interface Create_connection_response extends Parsable { + /** + * ConnectionAuthorization is present only while a connection is pending. TheUI sends the user to connect_url and polls GetConnection until the connectionbecomes active or expires. The Secrets Manager poll URL is never exposed. + */ + authorization?: Connection_authorization | null; + /** + * -----------------------------------------------------------------------------OAuth connection resources-----------------------------------------------------------------------------OAuthConnection is the public, team-scoped connection metadata returned tothe UI. It deliberately excludes the team ID, Secrets Manager assignment,actor identifiers, poll URL, and authorization handle. + */ + connection?: Oauth_connection | null; +} /** * Request body for image generation. */ @@ -11162,6 +11337,51 @@ export interface Create_secret_response extends AdditionalDataHolder, Parsable { */ version?: number | null; } +export interface Create_session_request extends Parsable { + /** + * The actor_id property + */ + actorId?: string | null; + /** + * Opaque session options. config.preloadTools may contain concrete toolnames (optionally version-pinned) and version-pinned toolbelt references. + */ + config?: Create_session_request_config | null; + /** + * The name property + */ + name?: string | null; + /** + * Invocation policy. Omit to use a default action of ask. + */ + policy?: Session_policy_spec | null; + /** + * Omitted enables every tool. An explicit empty array enables no tools.Direct tools may be or @; toolbelt references mustbe version-pinned as toolbelt:@. + */ + tools?: string[] | null; +} +/** + * Opaque session options. config.preloadTools may contain concrete toolnames (optionally version-pinned) and version-pinned toolbelt references. + */ +export interface Create_session_request_config extends AdditionalDataHolder, Parsable { + /** + * Concrete tools or pinned toolbelts to expose directly beside the session meta-tools. + */ + preloadTools?: string[] | null; +} +export interface Create_session_response extends Parsable { + /** + * Public session-pinned MCP URL. + */ + mcpUrl?: string | null; + /** + * A session and the tool-permission policy bound to it. + */ + session?: Public_session_policy | null; + /** + * Canonical, version-pinned selected tool references. + */ + tools?: string[] | null; +} export interface Create_trigger extends AdditionalDataHolder, Parsable { /** * Name of function(action) that exists in the given namespace. @@ -15234,6 +15454,24 @@ export function createAsync_invoke_response_outputFromDiscriminatorValue(parseNo export function createAsync_invoke_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoAsync_invoke_response; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Auth_injection} + */ +// @ts-ignore +export function createAuth_injectionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoAuth_injection; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Auth_spec} + */ +// @ts-ignore +export function createAuth_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoAuth_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -15324,6 +15562,15 @@ export function createBackward_linksFromDiscriminatorValue(parseNode: ParseNode export function createBalanceFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoBalance; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Base_url_resolution} + */ +// @ts-ignore +export function createBase_url_resolutionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoBase_url_resolution; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -15738,6 +15985,15 @@ export function createCheck_updatableFromDiscriminatorValue(parseNode: ParseNode export function createCheckFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoCheck; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Classification} + */ +// @ts-ignore +export function createClassificationFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoClassification; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -15864,6 +16120,24 @@ export function createCompletion_usage_cache_creationFromDiscriminatorValue(pars export function createCompletion_usageFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoCompletion_usage; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Connection_authorization} + */ +// @ts-ignore +export function createConnection_authorizationFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoConnection_authorization; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Connection_parameter_spec} + */ +// @ts-ignore +export function createConnection_parameter_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoConnection_parameter_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -15909,6 +16183,33 @@ export function createControl_plane_firewallFromDiscriminatorValue(parseNode: Pa export function createCoredns_autoscalerFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoCoredns_autoscaler; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_connection_request_connection_parameters} + */ +// @ts-ignore +export function createCreate_connection_request_connection_parametersFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_connection_request_connection_parameters; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_connection_request} + */ +// @ts-ignore +export function createCreate_connection_requestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_connection_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_connection_response} + */ +// @ts-ignore +export function createCreate_connection_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_connection_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -16080,6 +16381,33 @@ export function createCreate_response_responseFromDiscriminatorValue(parseNode: export function createCreate_secret_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoCreate_secret_response; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_session_request_config} + */ +// @ts-ignore +export function createCreate_session_request_configFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_session_request_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_session_request} + */ +// @ts-ignore +export function createCreate_session_requestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_session_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Create_session_response} + */ +// @ts-ignore +export function createCreate_session_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoCreate_session_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -16467,6 +16795,24 @@ export function createDedicated_inference_update_requestFromDiscriminatorValue(p export function createDedicated_inferenceFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoDedicated_inference; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Delete_connection_response} + */ +// @ts-ignore +export function createDelete_connection_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoDelete_connection_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Delete_session_response} + */ +// @ts-ignore +export function createDelete_session_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoDelete_session_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -16944,6 +17290,15 @@ export function createErrorEscapedFromDiscriminatorValue(parseNode: ParseNode | export function createEvents_logsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoEvents_logs; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Execution_spec} + */ +// @ts-ignore +export function createExecution_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoExecution_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -17146,6 +17501,24 @@ export function createGenaiapiRegionFromDiscriminatorValue(parseNode: ParseNode export function createGenerated_imageFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoGenerated_image; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Get_connection_response} + */ +// @ts-ignore +export function createGet_connection_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoGet_connection_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Get_user_response} + */ +// @ts-ignore +export function createGet_user_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoGet_user_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -17218,6 +17591,33 @@ export function createHealth_checkFromDiscriminatorValue(parseNode: ParseNode | export function createHistoryFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoHistory; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Hook_spec} + */ +// @ts-ignore +export function createHook_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoHook_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Http_execution} + */ +// @ts-ignore +export function createHttp_executionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoHttp_execution; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Http_lookup_spec} + */ +// @ts-ignore +export function createHttp_lookup_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoHttp_lookup_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -17587,6 +17987,15 @@ export function createKubernetes_versionFromDiscriminatorValue(parseNode: ParseN export function createLb_firewallFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoLb_firewall; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_connections_response} + */ +// @ts-ignore +export function createList_connections_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_connections_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -17596,6 +18005,51 @@ export function createLb_firewallFromDiscriminatorValue(parseNode: ParseNode | u export function createList_models_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoList_models_response; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_providers_response} + */ +// @ts-ignore +export function createList_providers_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_providers_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_sessions_response} + */ +// @ts-ignore +export function createList_sessions_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_sessions_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_toolkits_response} + */ +// @ts-ignore +export function createList_toolkits_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_toolkits_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_tools_response} + */ +// @ts-ignore +export function createList_tools_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_tools_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {List_users_response} + */ +// @ts-ignore +export function createList_users_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoList_users_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -17713,6 +18167,15 @@ export function createLogsink_verboseFromDiscriminatorValue(parseNode: ParseNode export function createMaintenance_policyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoMaintenance_policy; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Mcp_execution} + */ +// @ts-ignore +export function createMcp_executionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoMcp_execution; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18334,6 +18797,24 @@ export function createNotificationFromDiscriminatorValue(parseNode: ParseNode | export function createNvidia_gpu_device_pluginFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoNvidia_gpu_device_plugin; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Oauth_connection_connection_parameters} + */ +// @ts-ignore +export function createOauth_connection_connection_parametersFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoOauth_connection_connection_parameters; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Oauth_connection} + */ +// @ts-ignore +export function createOauth_connectionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoOauth_connection; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18559,6 +19040,15 @@ export function createOptions_version_availabilityFromDiscriminatorValue(parseNo export function createOptionsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoOptions; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {P2p_oci_registry_plugin} + */ +// @ts-ignore +export function createP2p_oci_registry_pluginFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoP2p_oci_registry_plugin; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18586,6 +19076,15 @@ export function createPage_links_pagesMember1FromDiscriminatorValue(parseNode: P export function createPage_linksFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoPage_links; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Pages_pagination} + */ +// @ts-ignore +export function createPages_paginationFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoPages_pagination; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18703,6 +19202,15 @@ export function createPending_deployment_specFromDiscriminatorValue(parseNode: P export function createPgbouncer_advanced_configFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoPgbouncer_advanced_config; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Policy_spec} + */ +// @ts-ignore +export function createPolicy_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoPolicy_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18766,6 +19274,33 @@ export function createProject_baseFromDiscriminatorValue(parseNode: ParseNode | export function createProjectFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoProject; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Provider_summary} + */ +// @ts-ignore +export function createProvider_summaryFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoProvider_summary; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Public_session_policy_config} + */ +// @ts-ignore +export function createPublic_session_policy_configFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoPublic_session_policy_config; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Public_session_policy} + */ +// @ts-ignore +export function createPublic_session_policyFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoPublic_session_policy; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -18856,6 +19391,15 @@ export function createRegistry_run_gcFromDiscriminatorValue(parseNode: ParseNode export function createRegistryFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoRegistry; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Reliability_spec} + */ +// @ts-ignore +export function createReliability_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoReliability_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -19071,6 +19615,15 @@ export function createResponse_usage_output_tokens_detailsFromDiscriminatorValue export function createResponse_usageFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoResponse_usage; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Retry_spec} + */ +// @ts-ignore +export function createRetry_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoRetry_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -19188,6 +19741,51 @@ export function createSecretFromDiscriminatorValue(parseNode: ParseNode | undefi export function createSelective_destroy_associated_resourceFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoSelective_destroy_associated_resource; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Session_policy_rule_match} + */ +// @ts-ignore +export function createSession_policy_rule_matchFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoSession_policy_rule_match; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Session_policy_rule} + */ +// @ts-ignore +export function createSession_policy_ruleFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoSession_policy_rule; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Session_policy_spec} + */ +// @ts-ignore +export function createSession_policy_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoSession_policy_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Session_tool_reference} + */ +// @ts-ignore +export function createSession_tool_referenceFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoSession_tool_reference; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Session_tool_selection} + */ +// @ts-ignore +export function createSession_tool_selectionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoSession_tool_selection; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -19485,6 +20083,159 @@ export function createTagsFromDiscriminatorValue(parseNode: ParseNode | undefine export function createTimescaledb_advanced_configFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoTimescaledb_advanced_config; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_annotations} + */ +// @ts-ignore +export function createTool_annotationsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_annotations; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_definition_inputSchema} + */ +// @ts-ignore +export function createTool_definition_inputSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_definition_inputSchema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_definition_outputSchema} + */ +// @ts-ignore +export function createTool_definition_outputSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_definition_outputSchema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_definition} + */ +// @ts-ignore +export function createTool_definitionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_definition; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_inputSchema} + */ +// @ts-ignore +export function createTool_inputSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_inputSchema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool_outputSchema} + */ +// @ts-ignore +export function createTool_outputSchemaFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool_outputSchema; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelt_create} + */ +// @ts-ignore +export function createToolbelt_createFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelt_create; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelt_response} + */ +// @ts-ignore +export function createToolbelt_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelt_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelt_summary} + */ +// @ts-ignore +export function createToolbelt_summaryFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelt_summary; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelt_tools} + */ +// @ts-ignore +export function createToolbelt_toolsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelt_tools; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelt} + */ +// @ts-ignore +export function createToolbeltFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelt; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolbelts_response} + */ +// @ts-ignore +export function createToolbelts_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolbelts_response; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Tool} + */ +// @ts-ignore +export function createToolFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTool; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Toolkit} + */ +// @ts-ignore +export function createToolkitFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoToolkit; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Transform_spec_input} + */ +// @ts-ignore +export function createTransform_spec_inputFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTransform_spec_input; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Transform_spec_output} + */ +// @ts-ignore +export function createTransform_spec_outputFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTransform_spec_output; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Transform_spec} + */ +// @ts-ignore +export function createTransform_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoTransform_spec; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -19503,6 +20254,33 @@ export function createTrigger_info_scheduled_runsFromDiscriminatorValue(parseNod export function createTrigger_infoFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoTrigger_info; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_connection_parameters_request_connection_parameters} + */ +// @ts-ignore +export function createUpdate_connection_parameters_request_connection_parametersFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUpdate_connection_parameters_request_connection_parameters; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_connection_parameters_request} + */ +// @ts-ignore +export function createUpdate_connection_parameters_requestFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUpdate_connection_parameters_request; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Update_connection_parameters_response} + */ +// @ts-ignore +export function createUpdate_connection_parameters_responseFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUpdate_connection_parameters_response; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -19533,11 +20311,29 @@ export function createUpdate_triggerFromDiscriminatorValue(parseNode: ParseNode /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object - * @returns {User_kubernetes_cluster_user} + * @returns {Usage_meter} + */ +// @ts-ignore +export function createUsage_meterFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUsage_meter; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {Usage_spec} + */ +// @ts-ignore +export function createUsage_specFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUsage_spec; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User_session} */ // @ts-ignore -export function createUser_kubernetes_cluster_userFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { - return deserializeIntoUser_kubernetes_cluster_user; +export function createUser_sessionFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUser_session; } /** * Creates a new instance of the appropriate class based on discriminator value @@ -19575,6 +20371,24 @@ export function createUser_settings_opensearch_aclFromDiscriminatorValue(parseNo export function createUser_settingsFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { return deserializeIntoUser_settings; } +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User2_kubernetes_cluster_user} + */ +// @ts-ignore +export function createUser2_kubernetes_cluster_userFromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUser2_kubernetes_cluster_user; +} +/** + * Creates a new instance of the appropriate class based on discriminator value + * @param parseNode The parse node to use to read the discriminator value and create the object + * @returns {User2} + */ +// @ts-ignore +export function createUser2FromDiscriminatorValue(parseNode: ParseNode | undefined) : ((instance?: Parsable) => Record void>) { + return deserializeIntoUser2; +} /** * Creates a new instance of the appropriate class based on discriminator value * @param parseNode The parse node to use to read the discriminator value and create the object @@ -20177,7 +20991,7 @@ export interface Database_cluster extends AdditionalDataHolder, Parsable { */ privateNetworkUuid?: string | null; /** - * The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.

Requires `project:update` scope. + * The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project.

Requires `project:assign_resource` scope. */ projectId?: Guid | null; /** @@ -20897,6 +21711,14 @@ export interface Dedicated_inference_update_request_access_tokens extends Parsab */ huggingFaceToken?: string | null; } +export interface Delete_connection_response extends Parsable { + /** + * -----------------------------------------------------------------------------OAuth connection resources-----------------------------------------------------------------------------OAuthConnection is the public, team-scoped connection metadata returned tothe UI. It deliberately excludes the team ID, Secrets Manager assignment,actor identifiers, poll URL, and authorization handle. + */ + connection?: Oauth_connection | null; +} +export interface Delete_session_response extends Parsable { +} /** * The deserialization information for the current model * @param Accelerator_config_spec The instance to deserialize into. @@ -25835,7 +26657,7 @@ export function deserializeIntoApp_event_autoscaling_components(app_event_autosc // @ts-ignore export function deserializeIntoApp_events(app_events: Partial | undefined = {}) : Record void> { return { - ...deserializeIntoPagination(app_events), + ...deserializeIntoPages_pagination(app_events), "events": n => { app_events.events = n.getCollectionOfObjectValues(createApp_eventFromDiscriminatorValue); }, } } @@ -26124,7 +26946,7 @@ export function deserializeIntoApp_job_invocation_trigger_scheduled_schedule(app // @ts-ignore export function deserializeIntoApp_job_invocations(app_job_invocations: Partial | undefined = {}) : Record void> { return { - ...deserializeIntoPagination(app_job_invocations), + ...deserializeIntoPages_pagination(app_job_invocations), "job_invocations": n => { app_job_invocations.jobInvocations = n.getCollectionOfObjectValues(createApp_job_invocationFromDiscriminatorValue); }, } } @@ -27216,6 +28038,37 @@ export function deserializeIntoAsync_invoke_response_output(async_invoke_respons return { } } +/** + * The deserialization information for the current model + * @param Auth_injection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAuth_injection(auth_injection: Partial | undefined = {}) : Record void> { + return { + "location": n => { auth_injection.location = n.getStringValue(); }, + "name": n => { auth_injection.name = n.getStringValue(); }, + "scheme": n => { auth_injection.scheme = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Auth_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoAuth_spec(auth_spec: Partial | undefined = {}) : Record void> { + return { + "baseUrlResolution": n => { auth_spec.baseUrlResolution = n.getObjectValue(createBase_url_resolutionFromDiscriminatorValue); }, + "credentialBinding": n => { auth_spec.credentialBinding = n.getStringValue(); }, + "credentialRefSource": n => { auth_spec.credentialRefSource = n.getStringValue(); }, + "doManagedCredentialRef": n => { auth_spec.doManagedCredentialRef = n.getStringValue(); }, + "injection": n => { auth_spec.injection = n.getObjectValue(createAuth_injectionFromDiscriminatorValue); }, + "modes": n => { auth_spec.modes = n.getCollectionOfPrimitiveValues(); }, + "provider": n => { auth_spec.provider = n.getStringValue(); }, + "scopes": n => { auth_spec.scopes = n.getCollectionOfPrimitiveValues(); }, + } +} /** * The deserialization information for the current model * @param Autoscale_pool The instance to deserialize into. @@ -27359,6 +28212,17 @@ export function deserializeIntoBalance(balance: Partial | undefined = { "month_to_date_usage": n => { balance.monthToDateUsage = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Base_url_resolution The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoBase_url_resolution(base_url_resolution: Partial | undefined = {}) : Record void> { + return { + "httpLookup": n => { base_url_resolution.httpLookup = n.getObjectValue(createHttp_lookup_specFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Batch The instance to deserialize into. @@ -28012,6 +28876,19 @@ export function deserializeIntoCheck_updatable(check_updatable: Partial { check_updatable.type = n.getEnumValue(Check_updatable_typeObject); }, } } +/** + * The deserialization information for the current model + * @param Classification The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoClassification(classification: Partial | undefined = {}) : Record void> { + return { + "dataClasses": n => { classification.dataClasses = n.getCollectionOfPrimitiveValues(); }, + "operation": n => { classification.operation = n.getStringValue(); }, + "risk": n => { classification.risk = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Cluster The instance to deserialize into. @@ -28036,6 +28913,7 @@ export function deserializeIntoCluster(cluster: Partial | undefined = { "name": n => { cluster.name = n.getStringValue(); }, "node_pools": n => { cluster.nodePools = n.getCollectionOfObjectValues(createKubernetes_node_poolFromDiscriminatorValue); }, "nvidia_gpu_device_plugin": n => { cluster.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "p2p_oci_registry_plugin": n => { cluster.p2pOciRegistryPlugin = n.getObjectValue(createP2p_oci_registry_pluginFromDiscriminatorValue); }, "rdma_shared_dev_plugin": n => { cluster.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, "region": n => { cluster.region = n.getStringValue(); }, "registry_enabled": n => { cluster.registryEnabled = n.getBooleanValue(); }, @@ -28088,6 +28966,7 @@ export function deserializeIntoCluster_read(cluster_read: Partial "name": n => { cluster_read.name = n.getStringValue(); }, "node_pools": n => { cluster_read.nodePools = n.getCollectionOfObjectValues(createKubernetes_node_poolFromDiscriminatorValue); }, "nvidia_gpu_device_plugin": n => { cluster_read.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "p2p_oci_registry_plugin": n => { cluster_read.p2pOciRegistryPlugin = n.getObjectValue(createP2p_oci_registry_pluginFromDiscriminatorValue); }, "rdma_shared_dev_plugin": n => { cluster_read.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, "region": n => { cluster_read.region = n.getStringValue(); }, "registries": n => { cluster_read.registries = n.getCollectionOfPrimitiveValues(); }, @@ -28169,6 +29048,7 @@ export function deserializeIntoCluster_update(cluster_update: Partial { cluster_update.maintenancePolicy = n.getObjectValue(createMaintenance_policyFromDiscriminatorValue); }, "name": n => { cluster_update.name = n.getStringValue(); }, "nvidia_gpu_device_plugin": n => { cluster_update.nvidiaGpuDevicePlugin = n.getObjectValue(createNvidia_gpu_device_pluginFromDiscriminatorValue); }, + "p2p_oci_registry_plugin": n => { cluster_update.p2pOciRegistryPlugin = n.getObjectValue(createP2p_oci_registry_pluginFromDiscriminatorValue); }, "rdma_shared_dev_plugin": n => { cluster_update.rdmaSharedDevPlugin = n.getObjectValue(createRdma_shared_dev_pluginFromDiscriminatorValue); }, "routing_agent": n => { cluster_update.routingAgent = n.getObjectValue(createRouting_agentFromDiscriminatorValue); }, "sso": n => { cluster_update.sso = n.getObjectValue(createSsoFromDiscriminatorValue); }, @@ -28259,6 +29139,39 @@ export function deserializeIntoCompletion_usage_cache_creation(completion_usage_ "ephemeral_5m_input_tokens": n => { completion_usage_cache_creation.ephemeral5mInputTokens = n.getNumberValue(); }, } } +/** + * The deserialization information for the current model + * @param Connection_authorization The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoConnection_authorization(connection_authorization: Partial | undefined = {}) : Record void> { + return { + "connect_url": n => { connection_authorization.connectUrl = n.getStringValue(); }, + "expires_at": n => { connection_authorization.expiresAt = n.getDateValue(); }, + "status": n => { connection_authorization.status = n.getStringValue(); }, + "verification_code": n => { connection_authorization.verificationCode = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Connection_parameter_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoConnection_parameter_spec(connection_parameter_spec: Partial | undefined = {}) : Record void> { + return { + "allowed_host_suffixes": n => { connection_parameter_spec.allowedHostSuffixes = n.getCollectionOfPrimitiveValues(); }, + "allowed_values": n => { connection_parameter_spec.allowedValues = n.getCollectionOfPrimitiveValues(); }, + "description": n => { connection_parameter_spec.description = n.getStringValue(); }, + "input_kind": n => { connection_parameter_spec.inputKind = n.getStringValue(); }, + "key": n => { connection_parameter_spec.key = n.getStringValue(); }, + "label": n => { connection_parameter_spec.label = n.getStringValue(); }, + "max_length": n => { connection_parameter_spec.maxLength = n.getNumberValue(); }, + "normalization": n => { connection_parameter_spec.normalization = n.getStringValue(); }, + "required": n => { connection_parameter_spec.required = n.getBooleanValue(); }, + } +} /** * The deserialization information for the current model * @param Connection_pool The instance to deserialize into. @@ -28326,6 +29239,42 @@ export function deserializeIntoCoredns_autoscaler(coredns_autoscaler: Partial { coredns_autoscaler.enabled = n.getBooleanValue(); }, } } +/** + * The deserialization information for the current model + * @param Create_connection_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_connection_request(create_connection_request: Partial | undefined = {}) : Record void> { + return { + "connection_parameters": n => { create_connection_request.connectionParameters = n.getObjectValue(createCreate_connection_request_connection_parametersFromDiscriminatorValue); }, + "provider": n => { create_connection_request.provider = n.getStringValue(); }, + "scopes": n => { create_connection_request.scopes = n.getCollectionOfPrimitiveValues(); }, + "user_id": n => { create_connection_request.userId = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Create_connection_request_connection_parameters The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_connection_request_connection_parameters(create_connection_request_connection_parameters: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Create_connection_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_connection_response(create_connection_response: Partial | undefined = {}) : Record void> { + return { + "authorization": n => { create_connection_response.authorization = n.getObjectValue(createConnection_authorizationFromDiscriminatorValue); }, + "connection": n => { create_connection_response.connection = n.getObjectValue(createOauth_connectionFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Create_image_request The instance to deserialize into. @@ -28587,6 +29536,45 @@ export function deserializeIntoCreate_secret_response(create_secret_response: Pa "version": n => { create_secret_response.version = n.getNumberValue(); }, } } +/** + * The deserialization information for the current model + * @param Create_session_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_session_request(create_session_request: Partial | undefined = {}) : Record void> { + return { + "actor_id": n => { create_session_request.actorId = n.getStringValue(); }, + "config": n => { create_session_request.config = n.getObjectValue(createCreate_session_request_configFromDiscriminatorValue); }, + "name": n => { create_session_request.name = n.getStringValue(); }, + "policy": n => { create_session_request.policy = n.getObjectValue(createSession_policy_specFromDiscriminatorValue); }, + "tools": n => { create_session_request.tools = n.getCollectionOfPrimitiveValues(); }, + } +} +/** + * The deserialization information for the current model + * @param Create_session_request_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_session_request_config(create_session_request_config: Partial | undefined = {}) : Record void> { + return { + "preloadTools": n => { create_session_request_config.preloadTools = n.getCollectionOfPrimitiveValues(); }, + } +} +/** + * The deserialization information for the current model + * @param Create_session_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoCreate_session_response(create_session_response: Partial | undefined = {}) : Record void> { + return { + "mcpUrl": n => { create_session_response.mcpUrl = n.getStringValue(); }, + "session": n => { create_session_response.session = n.getObjectValue(createPublic_session_policyFromDiscriminatorValue); }, + "tools": n => { create_session_response.tools = n.getCollectionOfPrimitiveValues(); }, + } +} /** * The deserialization information for the current model * @param Create_trigger The instance to deserialize into. @@ -29225,6 +30213,27 @@ export function deserializeIntoDedicated_inference_update_request_access_tokens( "hugging_face_token": n => { dedicated_inference_update_request_access_tokens.huggingFaceToken = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Delete_connection_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDelete_connection_response(delete_connection_response: Partial | undefined = {}) : Record void> { + return { + "connection": n => { delete_connection_response.connection = n.getObjectValue(createOauth_connectionFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Delete_session_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoDelete_session_response(delete_session_response: Partial | undefined = {}) : Record void> { + return { + } +} /** * The deserialization information for the current model * @param Destination The instance to deserialize into. @@ -29893,6 +30902,21 @@ export function deserializeIntoEvents_logs(events_logs: Partial | u "id": n => { events_logs.id = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Execution_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoExecution_spec(execution_spec: Partial | undefined = {}) : Record void> { + return { + "adapterVersion": n => { execution_spec.adapterVersion = n.getStringValue(); }, + "configRef": n => { execution_spec.configRef = n.getStringValue(); }, + "http": n => { execution_spec.http = n.getObjectValue(createHttp_executionFromDiscriminatorValue); }, + "mcp": n => { execution_spec.mcp = n.getObjectValue(createMcp_executionFromDiscriminatorValue); }, + "type": n => { execution_spec.type = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Firewall The instance to deserialize into. @@ -30170,6 +31194,29 @@ export function deserializeIntoGenerated_image(generated_image: Partial { generated_image.revisedPrompt = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Get_connection_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGet_connection_response(get_connection_response: Partial | undefined = {}) : Record void> { + return { + "authorization": n => { get_connection_response.authorization = n.getObjectValue(createConnection_authorizationFromDiscriminatorValue); }, + "connection": n => { get_connection_response.connection = n.getObjectValue(createOauth_connectionFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Get_user_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoGet_user_response(get_user_response: Partial | undefined = {}) : Record void> { + return { + "user": n => { get_user_response.user = n.getObjectValue(createUserFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Glb_settings The instance to deserialize into. @@ -30277,6 +31324,53 @@ export function deserializeIntoHistory(history: Partial | undefined = { "updated_at": n => { history.updatedAt = n.getDateValue(); }, } } +/** + * The deserialization information for the current model + * @param Hook_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoHook_spec(hook_spec: Partial | undefined = {}) : Record void> { + return { + "usage": n => { hook_spec.usage = n.getObjectValue(createUsage_specFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Http_execution The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoHttp_execution(http_execution: Partial | undefined = {}) : Record void> { + return { + "allowedHosts": n => { http_execution.allowedHosts = n.getCollectionOfPrimitiveValues(); }, + "baseUrl": n => { http_execution.baseUrl = n.getStringValue(); }, + "method": n => { http_execution.method = n.getStringValue(); }, + "path": n => { http_execution.path = n.getStringValue(); }, + "requestEncoding": n => { http_execution.requestEncoding = n.getStringValue(); }, + "responseFormat": n => { http_execution.responseFormat = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Http_lookup_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoHttp_lookup_spec(http_lookup_spec: Partial | undefined = {}) : Record void> { + return { + "baseUrlTemplate": n => { http_lookup_spec.baseUrlTemplate = n.getStringValue(); }, + "caseInsensitive": n => { http_lookup_spec.caseInsensitive = n.getBooleanValue(); }, + "extractField": n => { http_lookup_spec.extractField = n.getStringValue(); }, + "matchField": n => { http_lookup_spec.matchField = n.getStringValue(); }, + "matchValue": n => { http_lookup_spec.matchValue = n.getStringValue(); }, + "match_value_parameter": n => { http_lookup_spec.matchValueParameter = n.getStringValue(); }, + "method": n => { http_lookup_spec.method = n.getStringValue(); }, + "requiredScopes": n => { http_lookup_spec.requiredScopes = n.getCollectionOfPrimitiveValues(); }, + "trimTrailingSlash": n => { http_lookup_spec.trimTrailingSlash = n.getBooleanValue(); }, + "url": n => { http_lookup_spec.url = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Image The instance to deserialize into. @@ -30896,6 +31990,18 @@ export function deserializeIntoLb_firewall(lb_firewall: Partial | u "deny": n => { lb_firewall.deny = n.getCollectionOfPrimitiveValues(); }, } } +/** + * The deserialization information for the current model + * @param List_connections_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_connections_response(list_connections_response: Partial | undefined = {}) : Record void> { + return { + "connections": n => { list_connections_response.connections = n.getCollectionOfObjectValues(createOauth_connectionFromDiscriminatorValue); }, + "pagination": n => { list_connections_response.pagination = n.getObjectValue(createPaginationFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param List_models_response The instance to deserialize into. @@ -30908,6 +32014,67 @@ export function deserializeIntoList_models_response(list_models_response: Partia "object": n => { list_models_response.object = n.getEnumValue(List_models_response_objectObject); }, } } +/** + * The deserialization information for the current model + * @param List_providers_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_providers_response(list_providers_response: Partial | undefined = {}) : Record void> { + return { + "providers": n => { list_providers_response.providers = n.getCollectionOfObjectValues(createProvider_summaryFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param List_sessions_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_sessions_response(list_sessions_response: Partial | undefined = {}) : Record void> { + return { + "pagination": n => { list_sessions_response.pagination = n.getObjectValue(createPaginationFromDiscriminatorValue); }, + "sessions": n => { list_sessions_response.sessions = n.getCollectionOfObjectValues(createPublic_session_policyFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param List_toolkits_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_toolkits_response(list_toolkits_response: Partial | undefined = {}) : Record void> { + return { + "toolkits": n => { list_toolkits_response.toolkits = n.getCollectionOfObjectValues(createToolkitFromDiscriminatorValue); }, + "version": n => { list_toolkits_response.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param List_tools_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_tools_response(list_tools_response: Partial | undefined = {}) : Record void> { + return { + "definitions": n => { list_tools_response.definitions = n.getCollectionOfObjectValues(createTool_definitionFromDiscriminatorValue); }, + "pagination": n => { list_tools_response.pagination = n.getObjectValue(createPaginationFromDiscriminatorValue); }, + "tools": n => { list_tools_response.tools = n.getCollectionOfObjectValues(createToolFromDiscriminatorValue); }, + "version": n => { list_tools_response.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param List_users_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoList_users_response(list_users_response: Partial | undefined = {}) : Record void> { + return { + "pagination": n => { list_users_response.pagination = n.getObjectValue(createPaginationFromDiscriminatorValue); }, + "user_ids": n => { list_users_response.userIds = n.getCollectionOfPrimitiveValues(); }, + } +} /** * The deserialization information for the current model * @param Load_balancer The instance to deserialize into. @@ -31096,6 +32263,21 @@ export function deserializeIntoMaintenance_policy(maintenance_policy: Partial { maintenance_policy.startTime = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Mcp_execution The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoMcp_execution(mcp_execution: Partial | undefined = {}) : Record void> { + return { + "allowedHosts": n => { mcp_execution.allowedHosts = n.getCollectionOfPrimitiveValues(); }, + "endpoint": n => { mcp_execution.endpoint = n.getStringValue(); }, + "serverRef": n => { mcp_execution.serverRef = n.getStringValue(); }, + "toolName": n => { mcp_execution.toolName = n.getStringValue(); }, + "transport": n => { mcp_execution.transport = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Member The instance to deserialize into. @@ -31523,20 +32705,30 @@ export function deserializeIntoMultiregistry_create(multiregistry_create: Partia // @ts-ignore export function deserializeIntoMysql_advanced_config(mysql_advanced_config: Partial | undefined = {}) : Record void> { return { + "automatic_sp_privileges": n => { mysql_advanced_config.automaticSpPrivileges = n.getBooleanValue(); }, "backup_hour": n => { mysql_advanced_config.backupHour = n.getNumberValue(); }, "backup_minute": n => { mysql_advanced_config.backupMinute = n.getNumberValue(); }, "binlog_retention_period": n => { mysql_advanced_config.binlogRetentionPeriod = n.getNumberValue(); }, "connect_timeout": n => { mysql_advanced_config.connectTimeout = n.getNumberValue(); }, "default_time_zone": n => { mysql_advanced_config.defaultTimeZone = n.getStringValue(); }, + "div_precision_increment": n => { mysql_advanced_config.divPrecisionIncrement = n.getNumberValue(); }, + "end_markers_in_json": n => { mysql_advanced_config.endMarkersInJson = n.getBooleanValue(); }, + "eq_range_index_dive_limit": n => { mysql_advanced_config.eqRangeIndexDiveLimit = n.getNumberValue(); }, "group_concat_max_len": n => { mysql_advanced_config.groupConcatMaxLen = n.getNumberValue(); }, "information_schema_stats_expiry": n => { mysql_advanced_config.informationSchemaStatsExpiry = n.getNumberValue(); }, "innodb_change_buffer_max_size": n => { mysql_advanced_config.innodbChangeBufferMaxSize = n.getNumberValue(); }, "innodb_flush_neighbors": n => { mysql_advanced_config.innodbFlushNeighbors = n.getNumberValue(); }, + "innodb_ft_enable_stopword": n => { mysql_advanced_config.innodbFtEnableStopword = n.getBooleanValue(); }, + "innodb_ft_max_token_size": n => { mysql_advanced_config.innodbFtMaxTokenSize = n.getNumberValue(); }, "innodb_ft_min_token_size": n => { mysql_advanced_config.innodbFtMinTokenSize = n.getNumberValue(); }, + "innodb_ft_num_word_optimize": n => { mysql_advanced_config.innodbFtNumWordOptimize = n.getNumberValue(); }, + "innodb_ft_result_cache_limit": n => { mysql_advanced_config.innodbFtResultCacheLimit = n.getNumberValue(); }, "innodb_ft_server_stopword_table": n => { mysql_advanced_config.innodbFtServerStopwordTable = n.getStringValue(); }, + "innodb_ft_user_stopword_table": n => { mysql_advanced_config.innodbFtUserStopwordTable = n.getStringValue(); }, "innodb_lock_wait_timeout": n => { mysql_advanced_config.innodbLockWaitTimeout = n.getNumberValue(); }, "innodb_log_buffer_size": n => { mysql_advanced_config.innodbLogBufferSize = n.getNumberValue(); }, "innodb_online_alter_log_max_size": n => { mysql_advanced_config.innodbOnlineAlterLogMaxSize = n.getNumberValue(); }, + "innodb_optimize_fulltext_only": n => { mysql_advanced_config.innodbOptimizeFulltextOnly = n.getBooleanValue(); }, "innodb_print_all_deadlocks": n => { mysql_advanced_config.innodbPrintAllDeadlocks = n.getBooleanValue(); }, "innodb_read_io_threads": n => { mysql_advanced_config.innodbReadIoThreads = n.getNumberValue(); }, "innodb_rollback_on_timeout": n => { mysql_advanced_config.innodbRollbackOnTimeout = n.getBooleanValue(); }, @@ -31547,17 +32739,23 @@ export function deserializeIntoMysql_advanced_config(mysql_advanced_config: Part "log_output": n => { mysql_advanced_config.logOutput = n.getEnumValue(Mysql_advanced_config_log_outputObject) ?? Mysql_advanced_config_log_outputObject.NONE; }, "long_query_time": n => { mysql_advanced_config.longQueryTime = n.getNumberValue(); }, "max_allowed_packet": n => { mysql_advanced_config.maxAllowedPacket = n.getNumberValue(); }, + "max_execution_time": n => { mysql_advanced_config.maxExecutionTime = n.getNumberValue(); }, "max_heap_table_size": n => { mysql_advanced_config.maxHeapTableSize = n.getNumberValue(); }, + "max_seeks_for_key": n => { mysql_advanced_config.maxSeeksForKey = n.getNumberValue(); }, "mysql_incremental_backup": n => { mysql_advanced_config.mysqlIncrementalBackup = n.getObjectValue(createMysql_incremental_backupFromDiscriminatorValue); }, "net_buffer_length": n => { mysql_advanced_config.netBufferLength = n.getNumberValue(); }, "net_read_timeout": n => { mysql_advanced_config.netReadTimeout = n.getNumberValue(); }, "net_write_timeout": n => { mysql_advanced_config.netWriteTimeout = n.getNumberValue(); }, + "optimizer_prune_level": n => { mysql_advanced_config.optimizerPruneLevel = n.getNumberValue(); }, + "optimizer_search_depth": n => { mysql_advanced_config.optimizerSearchDepth = n.getNumberValue(); }, + "optimizer_switch": n => { mysql_advanced_config.optimizerSwitch = n.getStringValue(); }, "slow_query_log": n => { mysql_advanced_config.slowQueryLog = n.getBooleanValue(); }, "sort_buffer_size": n => { mysql_advanced_config.sortBufferSize = n.getNumberValue(); }, "sql_mode": n => { mysql_advanced_config.sqlMode = n.getStringValue(); }, "sql_require_primary_key": n => { mysql_advanced_config.sqlRequirePrimaryKey = n.getBooleanValue(); }, "tmp_table_size": n => { mysql_advanced_config.tmpTableSize = n.getNumberValue(); }, "wait_timeout": n => { mysql_advanced_config.waitTimeout = n.getNumberValue(); }, + "windowing_use_high_precision": n => { mysql_advanced_config.windowingUseHighPrecision = n.getBooleanValue(); }, } } /** @@ -32001,6 +33199,37 @@ export function deserializeIntoNvidia_gpu_device_plugin(nvidia_gpu_device_plugin "enabled": n => { nvidia_gpu_device_plugin.enabled = n.getBooleanValue(); }, } } +/** + * The deserialization information for the current model + * @param Oauth_connection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOauth_connection(oauth_connection: Partial | undefined = {}) : Record void> { + return { + "connection_parameters": n => { oauth_connection.connectionParameters = n.getObjectValue(createOauth_connection_connection_parametersFromDiscriminatorValue); }, + "created_at": n => { oauth_connection.createdAt = n.getDateValue(); }, + "granted_at": n => { oauth_connection.grantedAt = n.getDateValue(); }, + "id": n => { oauth_connection.id = n.getStringValue(); }, + "provider": n => { oauth_connection.provider = n.getStringValue(); }, + "provider_display_name": n => { oauth_connection.providerDisplayName = n.getStringValue(); }, + "revoked_at": n => { oauth_connection.revokedAt = n.getDateValue(); }, + "scopes": n => { oauth_connection.scopes = n.getCollectionOfPrimitiveValues(); }, + "status": n => { oauth_connection.status = n.getStringValue(); }, + "updated_at": n => { oauth_connection.updatedAt = n.getDateValue(); }, + "user_id": n => { oauth_connection.userId = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Oauth_connection_connection_parameters The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoOauth_connection_connection_parameters(oauth_connection_connection_parameters: Partial | undefined = {}) : Record void> { + return { + } +} /** * The deserialization information for the current model * @param OneClicks The instance to deserialize into. @@ -32388,6 +33617,17 @@ export function deserializeIntoOptions_version_availability(options_version_avai "valkey": n => { options_version_availability.valkey = n.getCollectionOfObjectValues(createDatabase_version_availabilityFromDiscriminatorValue); }, } } +/** + * The deserialization information for the current model + * @param P2p_oci_registry_plugin The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoP2p_oci_registry_plugin(p2p_oci_registry_plugin: Partial | undefined = {}) : Record void> { + return { + "enabled": n => { p2p_oci_registry_plugin.enabled = n.getBooleanValue(); }, + } +} /** * The deserialization information for the current model * @param Page_links The instance to deserialize into. @@ -32422,6 +33662,17 @@ export function deserializeIntoPage_links_pagesMember1(page_links_pagesMember1: return { } } +/** + * The deserialization information for the current model + * @param Pages_pagination The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPages_pagination(pages_pagination: Partial | undefined = {}) : Record void> { + return { + "links": n => { pages_pagination.links = n.getObjectValue(createPage_linksFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Pagination The instance to deserialize into. @@ -32430,7 +33681,9 @@ export function deserializeIntoPage_links_pagesMember1(page_links_pagesMember1: // @ts-ignore export function deserializeIntoPagination(pagination: Partial | undefined = {}) : Record void> { return { - "links": n => { pagination.links = n.getObjectValue(createPage_linksFromDiscriminatorValue); }, + "page": n => { pagination.page = n.getNumberValue(); }, + "per_page": n => { pagination.perPage = n.getNumberValue(); }, + "total": n => { pagination.total = n.getNumberValue(); }, } } /** @@ -32607,6 +33860,17 @@ export function deserializeIntoPgbouncer_advanced_config(pgbouncer_advanced_conf "server_reset_query_always": n => { pgbouncer_advanced_config.serverResetQueryAlways = n.getBooleanValue(); }, } } +/** + * The deserialization information for the current model + * @param Policy_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPolicy_spec(policy_spec: Partial | undefined = {}) : Record void> { + return { + "permission": n => { policy_spec.permission = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Postgres_advanced_config The instance to deserialize into. @@ -32755,6 +34019,50 @@ export function deserializeIntoProject_base(project_base: Partial "updated_at": n => { project_base.updatedAt = n.getDateValue(); }, } } +/** + * The deserialization information for the current model + * @param Provider_summary The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoProvider_summary(provider_summary: Partial | undefined = {}) : Record void> { + return { + "auth_type": n => { provider_summary.authType = n.getStringValue(); }, + "connection_parameters": n => { provider_summary.connectionParameters = n.getCollectionOfObjectValues(createConnection_parameter_specFromDiscriminatorValue); }, + "description": n => { provider_summary.description = n.getStringValue(); }, + "display_name": n => { provider_summary.displayName = n.getStringValue(); }, + "name": n => { provider_summary.name = n.getStringValue(); }, + "scopes": n => { provider_summary.scopes = n.getCollectionOfPrimitiveValues(); }, + } +} +/** + * The deserialization information for the current model + * @param Public_session_policy The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPublic_session_policy(public_session_policy: Partial | undefined = {}) : Record void> { + return { + "actorId": n => { public_session_policy.actorId = n.getStringValue(); }, + "config": n => { public_session_policy.config = n.getObjectValue(createPublic_session_policy_configFromDiscriminatorValue); }, + "createdAt": n => { public_session_policy.createdAt = n.getDateValue(); }, + "name": n => { public_session_policy.name = n.getStringValue(); }, + "policy": n => { public_session_policy.policy = n.getObjectValue(createSession_policy_specFromDiscriminatorValue); }, + "sessionUrn": n => { public_session_policy.sessionUrn = n.getStringValue(); }, + "tools": n => { public_session_policy.tools = n.getObjectValue(createSession_tool_selectionFromDiscriminatorValue); }, + "updatedAt": n => { public_session_policy.updatedAt = n.getDateValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Public_session_policy_config The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoPublic_session_policy_config(public_session_policy_config: Partial | undefined = {}) : Record void> { + return { + } +} /** * The deserialization information for the current model * @param Purge_cache The instance to deserialize into. @@ -32889,6 +34197,19 @@ export function deserializeIntoRegistry_run_gc(registry_run_gc: Partial { registry_run_gc.type = n.getEnumValue(Registry_run_gc_typeObject); }, } } +/** + * The deserialization information for the current model + * @param Reliability_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoReliability_spec(reliability_spec: Partial | undefined = {}) : Record void> { + return { + "maxOutputBytes": n => { reliability_spec.maxOutputBytes = n.getStringValue(); }, + "retry": n => { reliability_spec.retry = n.getObjectValue(createRetry_specFromDiscriminatorValue); }, + "timeoutMs": n => { reliability_spec.timeoutMs = n.getNumberValue(); }, + } +} /** * The deserialization information for the current model * @param Repository The instance to deserialize into. @@ -33159,6 +34480,19 @@ export function deserializeIntoResponse_usage_output_tokens_details(response_usa "tool_output_tokens": n => { response_usage_output_tokens_details.toolOutputTokens = n.getNumberValue(); }, } } +/** + * The deserialization information for the current model + * @param Retry_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoRetry_spec(retry_spec: Partial | undefined = {}) : Record void> { + return { + "backoff": n => { retry_spec.backoff = n.getStringValue(); }, + "maxAttempts": n => { retry_spec.maxAttempts = n.getNumberValue(); }, + "retryOn": n => { retry_spec.retryOn = n.getCollectionOfPrimitiveValues(); }, + } +} /** * The deserialization information for the current model * @param Routing_agent The instance to deserialize into. @@ -33345,6 +34679,65 @@ export function deserializeIntoSelective_destroy_associated_resource(selective_d "volume_snapshots": n => { selective_destroy_associated_resource.volumeSnapshots = n.getCollectionOfPrimitiveValues(); }, } } +/** + * The deserialization information for the current model + * @param Session_policy_rule The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSession_policy_rule(session_policy_rule: Partial | undefined = {}) : Record void> { + return { + "action": n => { session_policy_rule.action = n.getEnumValue(Session_policy_actionObject) ?? Session_policy_actionObject.Ask; }, + "match": n => { session_policy_rule.match = n.getObjectValue(createSession_policy_rule_matchFromDiscriminatorValue); }, + "tool": n => { session_policy_rule.tool = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Session_policy_rule_match The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSession_policy_rule_match(session_policy_rule_match: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Session_policy_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSession_policy_spec(session_policy_spec: Partial | undefined = {}) : Record void> { + return { + "defaultAction": n => { session_policy_spec.defaultAction = n.getEnumValue(Session_policy_actionObject) ?? Session_policy_actionObject.Ask; }, + "rules": n => { session_policy_spec.rules = n.getCollectionOfObjectValues(createSession_policy_ruleFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Session_tool_reference The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSession_tool_reference(session_tool_reference: Partial | undefined = {}) : Record void> { + return { + "kind": n => { session_tool_reference.kind = n.getEnumValue(Session_tool_reference_kindObject); }, + "name": n => { session_tool_reference.name = n.getStringValue(); }, + "version": n => { session_tool_reference.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Session_tool_selection The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoSession_tool_selection(session_tool_selection: Partial | undefined = {}) : Record void> { + return { + "references": n => { session_tool_selection.references = n.getCollectionOfObjectValues(createSession_tool_referenceFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Settings The instance to deserialize into. @@ -33779,6 +35172,250 @@ export function deserializeIntoTimescaledb_advanced_config(timescaledb_advanced_ "max_background_workers": n => { timescaledb_advanced_config.maxBackgroundWorkers = n.getNumberValue(); }, } } +/** + * The deserialization information for the current model + * @param Tool The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool(tool: Partial | undefined = {}) : Record void> { + return { + "annotations": n => { tool.annotations = n.getObjectValue(createTool_annotationsFromDiscriminatorValue); }, + "description": n => { tool.description = n.getStringValue(); }, + "inputSchema": n => { tool.inputSchema = n.getObjectValue(createTool_inputSchemaFromDiscriminatorValue); }, + "name": n => { tool.name = n.getStringValue(); }, + "outputSchema": n => { tool.outputSchema = n.getObjectValue(createTool_outputSchemaFromDiscriminatorValue); }, + "parallelizable": n => { tool.parallelizable = n.getBooleanValue(); }, + "streamingSafe": n => { tool.streamingSafe = n.getBooleanValue(); }, + "title": n => { tool.title = n.getStringValue(); }, + "toolkitId": n => { tool.toolkitId = n.getStringValue(); }, + "toolSlug": n => { tool.toolSlug = n.getStringValue(); }, + "version": n => { tool.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Tool_annotations The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_annotations(tool_annotations: Partial | undefined = {}) : Record void> { + return { + "destructiveHint": n => { tool_annotations.destructiveHint = n.getBooleanValue(); }, + "idempotentHint": n => { tool_annotations.idempotentHint = n.getBooleanValue(); }, + "openWorldHint": n => { tool_annotations.openWorldHint = n.getBooleanValue(); }, + "readOnlyHint": n => { tool_annotations.readOnlyHint = n.getBooleanValue(); }, + "title": n => { tool_annotations.title = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Tool_definition The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_definition(tool_definition: Partial | undefined = {}) : Record void> { + return { + "annotations": n => { tool_definition.annotations = n.getObjectValue(createTool_annotationsFromDiscriminatorValue); }, + "auth": n => { tool_definition.auth = n.getObjectValue(createAuth_specFromDiscriminatorValue); }, + "classification": n => { tool_definition.classification = n.getObjectValue(createClassificationFromDiscriminatorValue); }, + "description": n => { tool_definition.description = n.getStringValue(); }, + "execution": n => { tool_definition.execution = n.getObjectValue(createExecution_specFromDiscriminatorValue); }, + "flipperName": n => { tool_definition.flipperName = n.getStringValue(); }, + "hooks": n => { tool_definition.hooks = n.getObjectValue(createHook_specFromDiscriminatorValue); }, + "inputSchema": n => { tool_definition.inputSchema = n.getObjectValue(createTool_definition_inputSchemaFromDiscriminatorValue); }, + "name": n => { tool_definition.name = n.getStringValue(); }, + "outputSchema": n => { tool_definition.outputSchema = n.getObjectValue(createTool_definition_outputSchemaFromDiscriminatorValue); }, + "parallelizable": n => { tool_definition.parallelizable = n.getBooleanValue(); }, + "policy": n => { tool_definition.policy = n.getObjectValue(createPolicy_specFromDiscriminatorValue); }, + "reliability": n => { tool_definition.reliability = n.getObjectValue(createReliability_specFromDiscriminatorValue); }, + "schemaVersion": n => { tool_definition.schemaVersion = n.getStringValue(); }, + "status": n => { tool_definition.status = n.getStringValue(); }, + "streamingSafe": n => { tool_definition.streamingSafe = n.getBooleanValue(); }, + "tags": n => { tool_definition.tags = n.getCollectionOfPrimitiveValues(); }, + "title": n => { tool_definition.title = n.getStringValue(); }, + "toolId": n => { tool_definition.toolId = n.getStringValue(); }, + "toolkitId": n => { tool_definition.toolkitId = n.getStringValue(); }, + "toolSlug": n => { tool_definition.toolSlug = n.getStringValue(); }, + "transform": n => { tool_definition.transform = n.getObjectValue(createTransform_specFromDiscriminatorValue); }, + "version": n => { tool_definition.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Tool_definition_inputSchema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_definition_inputSchema(tool_definition_inputSchema: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Tool_definition_outputSchema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_definition_outputSchema(tool_definition_outputSchema: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Tool_inputSchema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_inputSchema(tool_inputSchema: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Tool_outputSchema The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTool_outputSchema(tool_outputSchema: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Toolbelt The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelt(toolbelt: Partial | undefined = {}) : Record void> { + return { + "created_at": n => { toolbelt.createdAt = n.getDateValue(); }, + "description": n => { toolbelt.description = n.getStringValue(); }, + "display_name": n => { toolbelt.displayName = n.getStringValue(); }, + "name": n => { toolbelt.name = n.getStringValue(); }, + "reference": n => { toolbelt.reference = n.getStringValue(); }, + "reference_latest": n => { toolbelt.referenceLatest = n.getStringValue(); }, + "status": n => { toolbelt.status = n.getEnumValue(Toolbelt_statusObject); }, + "tool_count": n => { toolbelt.toolCount = n.getNumberValue(); }, + "tools": n => { toolbelt.tools = n.getCollectionOfPrimitiveValues(); }, + "updated_at": n => { toolbelt.updatedAt = n.getDateValue(); }, + "version": n => { toolbelt.version = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Toolbelt_create The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelt_create(toolbelt_create: Partial | undefined = {}) : Record void> { + return { + "description": n => { toolbelt_create.description = n.getStringValue(); }, + "display_name": n => { toolbelt_create.displayName = n.getStringValue(); }, + "name": n => { toolbelt_create.name = n.getStringValue(); }, + "tools": n => { toolbelt_create.tools = n.getCollectionOfPrimitiveValues(); }, + "version": n => { toolbelt_create.version = n.getStringValue() ?? "1"; }, + } +} +/** + * The deserialization information for the current model + * @param Toolbelt_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelt_response(toolbelt_response: Partial | undefined = {}) : Record void> { + return { + "toolbelt": n => { toolbelt_response.toolbelt = n.getObjectValue(createToolbeltFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Toolbelt_summary The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelt_summary(toolbelt_summary: Partial | undefined = {}) : Record void> { + return { + "description": n => { toolbelt_summary.description = n.getStringValue(); }, + "display_name": n => { toolbelt_summary.displayName = n.getStringValue(); }, + "latest_version": n => { toolbelt_summary.latestVersion = n.getStringValue(); }, + "name": n => { toolbelt_summary.name = n.getStringValue(); }, + "reference_latest": n => { toolbelt_summary.referenceLatest = n.getStringValue(); }, + "status": n => { toolbelt_summary.status = n.getEnumValue(Toolbelt_summary_statusObject); }, + "tool_count": n => { toolbelt_summary.toolCount = n.getNumberValue(); }, + "updated_at": n => { toolbelt_summary.updatedAt = n.getDateValue(); }, + "version_count": n => { toolbelt_summary.versionCount = n.getNumberValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Toolbelt_tools The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelt_tools(toolbelt_tools: Partial | undefined = {}) : Record void> { + return { + "tools": n => { toolbelt_tools.tools = n.getCollectionOfPrimitiveValues(); }, + } +} +/** + * The deserialization information for the current model + * @param Toolbelts_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolbelts_response(toolbelts_response: Partial | undefined = {}) : Record void> { + return { + "pagination": n => { toolbelts_response.pagination = n.getObjectValue(createPaginationFromDiscriminatorValue); }, + "toolbelts": n => { toolbelts_response.toolbelts = n.getCollectionOfObjectValues(createToolbelt_summaryFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Toolkit The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoToolkit(toolkit: Partial | undefined = {}) : Record void> { + return { + "description": n => { toolkit.description = n.getStringValue(); }, + "id": n => { toolkit.id = n.getStringValue(); }, + "name": n => { toolkit.name = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Transform_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTransform_spec(transform_spec: Partial | undefined = {}) : Record void> { + return { + "input": n => { transform_spec.input = n.getObjectValue(createTransform_spec_inputFromDiscriminatorValue); }, + "language": n => { transform_spec.language = n.getStringValue(); }, + "output": n => { transform_spec.output = n.getObjectValue(createTransform_spec_outputFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param Transform_spec_input The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTransform_spec_input(transform_spec_input: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Transform_spec_output The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoTransform_spec_output(transform_spec_output: Partial | undefined = {}) : Record void> { + return { + } +} /** * The deserialization information for the current model * @param Trigger_info The instance to deserialize into. @@ -33810,6 +35447,39 @@ export function deserializeIntoTrigger_info_scheduled_runs(trigger_info_schedule "next_run_at": n => { trigger_info_scheduled_runs.nextRunAt = n.getStringValue(); }, } } +/** + * The deserialization information for the current model + * @param Update_connection_parameters_request The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_connection_parameters_request(update_connection_parameters_request: Partial | undefined = {}) : Record void> { + return { + "connection_parameters": n => { update_connection_parameters_request.connectionParameters = n.getObjectValue(createUpdate_connection_parameters_request_connection_parametersFromDiscriminatorValue); }, + "id": n => { update_connection_parameters_request.id = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Update_connection_parameters_request_connection_parameters The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_connection_parameters_request_connection_parameters(update_connection_parameters_request_connection_parameters: Partial | undefined = {}) : Record void> { + return { + } +} +/** + * The deserialization information for the current model + * @param Update_connection_parameters_response The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUpdate_connection_parameters_response(update_connection_parameters_response: Partial | undefined = {}) : Record void> { + return { + "connection": n => { update_connection_parameters_response.connection = n.getObjectValue(createOauth_connectionFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param Update_endpoint The instance to deserialize into. @@ -33846,6 +35516,31 @@ export function deserializeIntoUpdate_trigger(update_trigger: Partial { update_trigger.scheduledDetails = n.getObjectValue(createScheduled_detailsFromDiscriminatorValue); }, } } +/** + * The deserialization information for the current model + * @param Usage_meter The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUsage_meter(usage_meter: Partial | undefined = {}) : Record void> { + return { + "quantitySource": n => { usage_meter.quantitySource = n.getStringValue(); }, + "sku": n => { usage_meter.sku = n.getStringValue(); }, + "unit": n => { usage_meter.unit = n.getStringValue(); }, + } +} +/** + * The deserialization information for the current model + * @param Usage_spec The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUsage_spec(usage_spec: Partial | undefined = {}) : Record void> { + return { + "billable": n => { usage_spec.billable = n.getBooleanValue(); }, + "meters": n => { usage_spec.meters = n.getCollectionOfObjectValues(createUsage_meterFromDiscriminatorValue); }, + } +} /** * The deserialization information for the current model * @param User The instance to deserialize into. @@ -33854,19 +35549,23 @@ export function deserializeIntoUpdate_trigger(update_trigger: Partial | undefined = {}) : Record void> { return { - "kubernetes_cluster_user": n => { user.kubernetesClusterUser = n.getObjectValue(createUser_kubernetes_cluster_userFromDiscriminatorValue); }, + "connections": n => { user.connections = n.getCollectionOfObjectValues(createOauth_connectionFromDiscriminatorValue); }, + "sessions": n => { user.sessions = n.getCollectionOfObjectValues(createUser_sessionFromDiscriminatorValue); }, + "user_id": n => { user.userId = n.getStringValue(); }, } } /** * The deserialization information for the current model - * @param User_kubernetes_cluster_user The instance to deserialize into. + * @param User_session The instance to deserialize into. * @returns {Record void>} */ // @ts-ignore -export function deserializeIntoUser_kubernetes_cluster_user(user_kubernetes_cluster_user: Partial | undefined = {}) : Record void> { +export function deserializeIntoUser_session(user_session: Partial | undefined = {}) : Record void> { return { - "groups": n => { user_kubernetes_cluster_user.groups = n.getCollectionOfPrimitiveValues(); }, - "username": n => { user_kubernetes_cluster_user.username = n.getStringValue(); }, + "created_at": n => { user_session.createdAt = n.getDateValue(); }, + "name": n => { user_session.name = n.getStringValue(); }, + "session_urn": n => { user_session.sessionUrn = n.getStringValue(); }, + "updated_at": n => { user_session.updatedAt = n.getDateValue(); }, } } /** @@ -33920,6 +35619,29 @@ export function deserializeIntoUser_settings_opensearch_acl(user_settings_opense "permission": n => { user_settings_opensearch_acl.permission = n.getEnumValue(User_settings_opensearch_acl_permissionObject); }, } } +/** + * The deserialization information for the current model + * @param User2 The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser2(user2: Partial | undefined = {}) : Record void> { + return { + "kubernetes_cluster_user": n => { user2.kubernetesClusterUser = n.getObjectValue(createUser2_kubernetes_cluster_userFromDiscriminatorValue); }, + } +} +/** + * The deserialization information for the current model + * @param User2_kubernetes_cluster_user The instance to deserialize into. + * @returns {Record void>} + */ +// @ts-ignore +export function deserializeIntoUser2_kubernetes_cluster_user(user2_kubernetes_cluster_user: Partial | undefined = {}) : Record void> { + return { + "groups": n => { user2_kubernetes_cluster_user.groups = n.getCollectionOfPrimitiveValues(); }, + "username": n => { user2_kubernetes_cluster_user.username = n.getStringValue(); }, + } +} /** * The deserialization information for the current model * @param Validate_registry The instance to deserialize into. @@ -34609,7 +36331,7 @@ export interface Disk_info extends AdditionalDataHolder, Parsable { */ size?: Disk_info_size | null; /** - * The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. + * The type of disk. All Droplets contain a `local` or `remote` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. */ type?: Disk_info_type | null; } @@ -35205,6 +36927,28 @@ export interface Events_logs extends AdditionalDataHolder, Parsable { } export type Events_logs_event_type = (typeof Events_logs_event_typeObject)[keyof typeof Events_logs_event_typeObject]; export type Eviction_policy_model = (typeof Eviction_policy_modelObject)[keyof typeof Eviction_policy_modelObject]; +export interface Execution_spec extends Parsable { + /** + * The adapterVersion property + */ + adapterVersion?: string | null; + /** + * The configRef property + */ + configRef?: string | null; + /** + * The http property + */ + http?: Http_execution | null; + /** + * MCPExecution describes how to invoke a tool that is fronted by a remoteMCP server (as opposed to a plain HTTP endpoint). endpoint is the remoteMCP server's URL, tool_name is the name the remote server expects ontools/call (may differ from this tool's registry name), transportselects the wire protocol ("streamable_http" is the only kind implementedtoday), and server_ref is an opaque label identifying the remote serverfor logging/metrics/allowlisting. + */ + mcp?: Mcp_execution | null; + /** + * The type property + */ + type?: string | null; +} export interface Firewall extends Firewall_rules, Parsable { /** * A time value given in ISO8601 combined date and time format that represents when the firewall was created. @@ -35514,6 +37258,22 @@ export interface Generated_image extends AdditionalDataHolder, Parsable { */ revisedPrompt?: string | null; } +export interface Get_connection_response extends Parsable { + /** + * ConnectionAuthorization is present only while a connection is pending. TheUI sends the user to connect_url and polls GetConnection until the connectionbecomes active or expires. The Secrets Manager poll URL is never exposed. + */ + authorization?: Connection_authorization | null; + /** + * -----------------------------------------------------------------------------OAuth connection resources-----------------------------------------------------------------------------OAuthConnection is the public, team-scoped connection metadata returned tothe UI. It deliberately excludes the team ID, Secrets Manager assignment,actor identifiers, poll URL, and authorization handle. + */ + connection?: Oauth_connection | null; +} +export interface Get_user_response extends Parsable { + /** + * User is a derived, team-scoped view across sessions and OAuth connections. + */ + user?: User | null; +} /** * An object specifying forwarding configurations for a Global load balancer. */ @@ -35657,6 +37417,83 @@ export interface History extends AdditionalDataHolder, Parsable { } export type History_reason = (typeof History_reasonObject)[keyof typeof History_reasonObject]; export type History_status = (typeof History_statusObject)[keyof typeof History_statusObject]; +export interface Hook_spec extends Parsable { + /** + * The usage property + */ + usage?: Usage_spec | null; +} +export interface Http_execution extends Parsable { + /** + * The allowedHosts property + */ + allowedHosts?: string[] | null; + /** + * The baseUrl property + */ + baseUrl?: string | null; + /** + * The method property + */ + method?: string | null; + /** + * The path property + */ + path?: string | null; + /** + * The requestEncoding property + */ + requestEncoding?: string | null; + /** + * The responseFormat property + */ + responseFormat?: string | null; +} +/** + * HTTPLookupSpec resolves a base_url by calling url (bearer-authenticatedwith the just-exchanged access token), selecting an entry in the JSON array,extracting extract_field from that entry, and substituting it for "{value}"in base_url_template. When match_field and match_value are both set, theyselect the entry. When both are empty, exactly one entry whose own "scopes"array contains required_scopes must exist. Configuring only one match fieldis invalid. Resolution fails fast on zero or multiple compatible entries. + */ +export interface Http_lookup_spec extends Parsable { + /** + * The baseUrlTemplate property + */ + baseUrlTemplate?: string | null; + /** + * The caseInsensitive property + */ + caseInsensitive?: boolean | null; + /** + * The extractField property + */ + extractField?: string | null; + /** + * The matchField property + */ + matchField?: string | null; + /** + * The matchValue property + */ + matchValue?: string | null; + /** + * The match_value_parameter property + */ + matchValueParameter?: string | null; + /** + * The method property + */ + method?: string | null; + /** + * The requiredScopes property + */ + requiredScopes?: string[] | null; + /** + * The trimTrailingSlash property + */ + trimTrailingSlash?: boolean | null; + /** + * The url property + */ + url?: string | null; +} export interface Image extends AdditionalDataHolder, Parsable { /** * A time value given in ISO8601 combined date and time format that represents when the image was created. @@ -36596,6 +38433,16 @@ export interface Lb_firewall extends AdditionalDataHolder, Parsable { */ deny?: string[] | null; } +export interface List_connections_response extends Parsable { + /** + * The connections property + */ + connections?: Oauth_connection[] | null; + /** + * The pagination property + */ + pagination?: Pagination | null; +} /** * Response listing available models. */ @@ -36610,6 +38457,60 @@ export interface List_models_response extends AdditionalDataHolder, Parsable { object?: List_models_response_object | null; } export type List_models_response_object = (typeof List_models_response_objectObject)[keyof typeof List_models_response_objectObject]; +export interface List_providers_response extends Parsable { + /** + * The providers property + */ + providers?: Provider_summary[] | null; +} +export interface List_sessions_response extends Parsable { + /** + * The pagination property + */ + pagination?: Pagination | null; + /** + * The sessions property + */ + sessions?: Public_session_policy[] | null; +} +export interface List_toolkits_response extends Parsable { + /** + * The toolkits property + */ + toolkits?: Toolkit[] | null; + /** + * The version property + */ + version?: string | null; +} +export interface List_tools_response extends Parsable { + /** + * The definitions property + */ + definitions?: Tool_definition[] | null; + /** + * The pagination property + */ + pagination?: Pagination | null; + /** + * The tools property + */ + tools?: Tool[] | null; + /** + * The version property + */ + version?: string | null; +} +export interface List_users_response extends Parsable { + /** + * The pagination property + */ + pagination?: Pagination | null; + /** + * The user_ids property + */ + userIds?: string[] | null; +} export interface Load_balancer extends Load_balancer_base, Parsable { /** * An array containing the IDs of the Droplets assigned to the load balancer. @@ -36815,6 +38716,31 @@ export interface Maintenance_policy extends AdditionalDataHolder, Parsable { startTime?: string | null; } export type Maintenance_policy_day = (typeof Maintenance_policy_dayObject)[keyof typeof Maintenance_policy_dayObject]; +/** + * MCPExecution describes how to invoke a tool that is fronted by a remoteMCP server (as opposed to a plain HTTP endpoint). endpoint is the remoteMCP server's URL, tool_name is the name the remote server expects ontools/call (may differ from this tool's registry name), transportselects the wire protocol ("streamable_http" is the only kind implementedtoday), and server_ref is an opaque label identifying the remote serverfor logging/metrics/allowlisting. + */ +export interface Mcp_execution extends Parsable { + /** + * The allowedHosts property + */ + allowedHosts?: string[] | null; + /** + * The endpoint property + */ + endpoint?: string | null; + /** + * The serverRef property + */ + serverRef?: string | null; + /** + * The toolName property + */ + toolName?: string | null; + /** + * The transport property + */ + transport?: string | null; +} export interface Member extends AdditionalDataHolder, Parsable { /** * The creation time of the Droplet in ISO8601 combined date and time format. @@ -37269,6 +39195,10 @@ export interface Multiregistry_create extends AdditionalDataHolder, Parsable { export type Multiregistry_create_region = (typeof Multiregistry_create_regionObject)[keyof typeof Multiregistry_create_regionObject]; export type Multiregistry_create_subscription_tier_slug = (typeof Multiregistry_create_subscription_tier_slugObject)[keyof typeof Multiregistry_create_subscription_tier_slugObject]; export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { + /** + * When enabled, grants `EXECUTE` and `ALTER ROUTINE` privileges to the creator of a stored routine. When disabled, these privileges are not granted automatically. + */ + automaticSpPrivileges?: boolean | null; /** * The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. */ @@ -37289,6 +39219,18 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or 'SYSTEM' to use the MySQL server default. */ defaultTimeZone?: string | null; + /** + * The number of digits by which to increase the scale of the result of division operations performed with the `/` operator. + */ + divPrecisionIncrement?: number | null; + /** + * When enabled, the JSON output of `EXPLAIN FORMAT=JSON` includes end markers for nested structures. + */ + endMarkersInJson?: boolean | null; + /** + * The number of equality ranges in an equality comparison condition when the optimizer should switch from using index dives to index statistics. + */ + eqRangeIndexDiveLimit?: number | null; /** * The maximum permitted result length, in bytes, for the GROUP_CONCAT() function. */ @@ -37305,14 +39247,34 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent. - 0 — disables this functionality, dirty pages in the same extent are not flushed. - 1 — flushes contiguous dirty pages in the same extent. - 2 — flushes dirty pages in the same extent. */ innodbFlushNeighbors?: number | null; + /** + * When enabled, the InnoDB FULLTEXT index stopword list is used. Disabled by default when a custom stopword table is configured. + */ + innodbFtEnableStopword?: boolean | null; + /** + * The maximum length of words that an InnoDB FULLTEXT index stores. Changing this parameter will lead to a restart of the MySQL service. + */ + innodbFtMaxTokenSize?: number | null; /** * The minimum length of words that an InnoDB FULLTEXT index stores. */ innodbFtMinTokenSize?: number | null; + /** + * The number of words to process during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. + */ + innodbFtNumWordOptimize?: number | null; + /** + * The InnoDB FULLTEXT index query result cache size limit, in bytes. + */ + innodbFtResultCacheLimit?: number | null; /** * The InnoDB FULLTEXT index stopword list for all InnoDB tables. */ innodbFtServerStopwordTable?: string | null; + /** + * The InnoDB FULLTEXT index stopword list for user-created FULLTEXT indexes. Must be in the form `db_name/table_name`. Set to `null` to clear a previously configured value. + */ + innodbFtUserStopwordTable?: string | null; /** * The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up. */ @@ -37325,6 +39287,10 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables. */ innodbOnlineAlterLogMaxSize?: number | null; + /** + * When enabled, OPTIMIZE TABLE rebuilds only the InnoDB FULLTEXT index, not the table itself. + */ + innodbOptimizeFulltextOnly?: boolean | null; /** * When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default. */ @@ -37365,10 +39331,18 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M). */ maxAllowedPacket?: number | null; + /** + * The execution timeout for `SELECT` statements, in milliseconds. A value of `0` disables the timeout (no limit). + */ + maxExecutionTime?: number | null; /** * The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) */ maxHeapTableSize?: number | null; + /** + * Limits the assumed maximum number of seeks when looking up rows based on a key. Lower values cause the query optimizer to prefer indexes over table scans for non-covering indexes. + */ + maxSeeksForKey?: number | null; /** * MySQL Incremental Backup configuration settings */ @@ -37385,6 +39359,18 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * The number of seconds to wait for a block to be written to a connection before aborting the write. */ netWriteTimeout?: number | null; + /** + * Controls the heuristics applied during query optimization to prune less promising partial plans from the optimizer search space. `0` disables pruning and `1` enables it. + */ + optimizerPruneLevel?: number | null; + /** + * The maximum depth of search performed by the query optimizer. Smaller values can reduce compilation time for large joins; a value of `0` lets the server automatically pick a reasonable value. + */ + optimizerSearchDepth?: number | null; + /** + * Controls query optimizer behavior as a comma-separated list of `option=value` pairs, or `default` to restore server defaults. Each value must be `on`, `off`, or `default`. + */ + optimizerSwitch?: string | null; /** * When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false. */ @@ -37409,6 +39395,10 @@ export interface Mysql_advanced_config extends AdditionalDataHolder, Parsable { * The number of seconds the server waits for activity on a noninteractive connection before closing it. */ waitTimeout?: number | null; + /** + * When enabled, window functions use a higher precision for internal calculations, which can be more accurate but slower. + */ + windowingUseHighPrecision?: boolean | null; } export type Mysql_advanced_config_internal_tmp_mem_storage_engine = (typeof Mysql_advanced_config_internal_tmp_mem_storage_engineObject)[keyof typeof Mysql_advanced_config_internal_tmp_mem_storage_engineObject]; export type Mysql_advanced_config_log_output = (typeof Mysql_advanced_config_log_outputObject)[keyof typeof Mysql_advanced_config_log_outputObject]; @@ -37858,6 +39848,57 @@ export interface Nvidia_gpu_device_plugin extends AdditionalDataHolder, Parsable */ enabled?: boolean | null; } +/** + * -----------------------------------------------------------------------------OAuth connection resources-----------------------------------------------------------------------------OAuthConnection is the public, team-scoped connection metadata returned tothe UI. It deliberately excludes the team ID, Secrets Manager assignment,actor identifiers, poll URL, and authorization handle. + */ +export interface Oauth_connection extends Parsable { + /** + * The connection_parameters property + */ + connectionParameters?: Oauth_connection_connection_parameters | null; + /** + * The created_at property + */ + createdAt?: Date | null; + /** + * The granted_at property + */ + grantedAt?: Date | null; + /** + * The id property + */ + id?: string | null; + /** + * The provider property + */ + provider?: string | null; + /** + * The provider_display_name property + */ + providerDisplayName?: string | null; + /** + * The revoked_at property + */ + revokedAt?: Date | null; + /** + * The scopes property + */ + scopes?: string[] | null; + /** + * The status property + */ + status?: string | null; + /** + * The updated_at property + */ + updatedAt?: Date | null; + /** + * The user_id property + */ + userId?: string | null; +} +export interface Oauth_connection_connection_parameters extends AdditionalDataHolder, Parsable { +} export interface OneClicks extends AdditionalDataHolder, Parsable { /** * The slug identifier for the 1-Click application. @@ -38464,6 +40505,15 @@ export interface Options_version_availability extends AdditionalDataHolder, Pars */ valkey?: Database_version_availability[] | null; } +/** + * An object specifying whether the Peer-to-peer OCI registry component should be enabled for the Kubernetes cluster. + */ +export interface P2p_oci_registry_plugin extends AdditionalDataHolder, Parsable { + /** + * Indicates whether the Peer-to-peer OCI registry component is enabled. + */ + enabled?: boolean | null; +} export interface Page_links extends AdditionalDataHolder, Parsable { /** * The pages property @@ -38473,12 +40523,26 @@ export interface Page_links extends AdditionalDataHolder, Parsable { export type Page_links_pages = Backward_links | Forward_links | Page_links_pagesMember1; export interface Page_links_pagesMember1 extends AdditionalDataHolder, Parsable { } -export interface Pagination extends AdditionalDataHolder, Parsable { +export interface Pages_pagination extends AdditionalDataHolder, Parsable { /** * The links property */ links?: Page_links | null; } +export interface Pagination extends Parsable { + /** + * The page property + */ + page?: number | null; + /** + * The per_page property + */ + perPage?: number | null; + /** + * The total property + */ + total?: number | null; +} export interface Partner_attachment extends AdditionalDataHolder, Parsable { /** * The BGP configuration for the partner attachment. @@ -38739,6 +40803,12 @@ export interface Pgbouncer_advanced_config extends AdditionalDataHolder, Parsabl } export type Pgbouncer_advanced_config_autodb_pool_mode = (typeof Pgbouncer_advanced_config_autodb_pool_modeObject)[keyof typeof Pgbouncer_advanced_config_autodb_pool_modeObject]; export type Pgbouncer_advanced_config_ignore_startup_parameters = (typeof Pgbouncer_advanced_config_ignore_startup_parametersObject)[keyof typeof Pgbouncer_advanced_config_ignore_startup_parametersObject]; +export interface Policy_spec extends Parsable { + /** + * The permission property + */ + permission?: string | null; +} export interface Postgres_advanced_config extends AdditionalDataHolder, Parsable { /** * Specifies a fraction, in a decimal value, of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size). @@ -39070,6 +41140,74 @@ export interface Project_base extends AdditionalDataHolder, Parsable { updatedAt?: Date | null; } export type Project_base_environment = (typeof Project_base_environmentObject)[keyof typeof Project_base_environmentObject]; +export interface Provider_summary extends Parsable { + /** + * The auth_type property + */ + authType?: string | null; + /** + * The connection_parameters property + */ + connectionParameters?: Connection_parameter_spec[] | null; + /** + * The description property + */ + description?: string | null; + /** + * The display_name property + */ + displayName?: string | null; + /** + * The name property + */ + name?: string | null; + /** + * The scopes property + */ + scopes?: string[] | null; +} +/** + * A session and the tool-permission policy bound to it. + */ +export interface Public_session_policy extends Parsable { + /** + * actor_id is empty when the session is not bound to an actor. + */ + actorId?: string | null; + /** + * Preserved as an opaque object. Gateway currently interpretsconfig.preloadTools to add selected direct tools to the session MCP. + */ + config?: Public_session_policy_config | null; + /** + * The createdAt property + */ + createdAt?: Date | null; + /** + * name is the required human-readable session name. + */ + name?: string | null; + /** + * SessionPolicySpec is the Gateway-relevant subset of a session's permissionpolicy. Filesystem and network policy remain enforced by the sandbox. + */ + policy?: Session_policy_spec | null; + /** + * The sessionUrn property + */ + sessionUrn?: string | null; + /** + * Omitted when the request omitted tools (all tools). A present selectionwith no references represents tools: []. + */ + tools?: Session_tool_selection | null; + /** + * The updatedAt property + */ + updatedAt?: Date | null; +} +/** + * Preserved as an opaque object. Gateway currently interpretsconfig.preloadTools to add selected direct tools to the session MCP. + */ +export interface Public_session_policy_config extends AdditionalDataHolder, Parsable { +} export interface Purge_cache extends AdditionalDataHolder, Parsable { /** * An array of strings containing the path to the content to be purged from the CDN cache. @@ -39236,6 +41374,20 @@ export interface Registry_run_gc extends AdditionalDataHolder, Parsable { type?: Registry_run_gc_type | null; } export type Registry_run_gc_type = (typeof Registry_run_gc_typeObject)[keyof typeof Registry_run_gc_typeObject]; +export interface Reliability_spec extends Parsable { + /** + * The maxOutputBytes property + */ + maxOutputBytes?: string | null; + /** + * The retry property + */ + retry?: Retry_spec | null; + /** + * The timeoutMs property + */ + timeoutMs?: number | null; +} export interface Repository extends AdditionalDataHolder, Parsable { /** * The latest_tag property @@ -39517,6 +41669,20 @@ export interface Response_usage_output_tokens_details extends AdditionalDataHold */ toolOutputTokens?: number | null; } +export interface Retry_spec extends Parsable { + /** + * The backoff property + */ + backoff?: string | null; + /** + * The maxAttempts property + */ + maxAttempts?: number | null; + /** + * The retryOn property + */ + retryOn?: string[] | null; +} /** * An object specifying whether the routing-agent component should be enabled for the Kubernetes cluster. */ @@ -45090,7 +47256,7 @@ export function serializeApp_event_autoscaling_components(writer: SerializationW // @ts-ignore export function serializeApp_events(writer: SerializationWriter, app_events: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!app_events || isSerializingDerivedType) { return; } - serializePagination(writer, app_events, isSerializingDerivedType) + serializePages_pagination(writer, app_events, isSerializingDerivedType) writer.writeCollectionOfObjectValues("events", app_events.events, serializeApp_event); } /** @@ -45400,7 +47566,7 @@ export function serializeApp_job_invocation_trigger_scheduled_schedule(writer: S // @ts-ignore export function serializeApp_job_invocations(writer: SerializationWriter, app_job_invocations: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!app_job_invocations || isSerializingDerivedType) { return; } - serializePagination(writer, app_job_invocations, isSerializingDerivedType) + serializePages_pagination(writer, app_job_invocations, isSerializingDerivedType) writer.writeCollectionOfObjectValues("job_invocations", app_job_invocations.jobInvocations, serializeApp_job_invocation); } /** @@ -46603,6 +48769,37 @@ export function serializeAsync_invoke_response_output(writer: SerializationWrite if (!async_invoke_response_output || isSerializingDerivedType) { return; } writer.writeAdditionalData(async_invoke_response_output.additionalData); } +/** + * Serializes information the current object + * @param Auth_injection The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAuth_injection(writer: SerializationWriter, auth_injection: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!auth_injection || isSerializingDerivedType) { return; } + writer.writeStringValue("location", auth_injection.location); + writer.writeStringValue("name", auth_injection.name); + writer.writeStringValue("scheme", auth_injection.scheme); +} +/** + * Serializes information the current object + * @param Auth_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeAuth_spec(writer: SerializationWriter, auth_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!auth_spec || isSerializingDerivedType) { return; } + writer.writeObjectValue("baseUrlResolution", auth_spec.baseUrlResolution, serializeBase_url_resolution); + writer.writeStringValue("credentialBinding", auth_spec.credentialBinding); + writer.writeStringValue("credentialRefSource", auth_spec.credentialRefSource); + writer.writeStringValue("doManagedCredentialRef", auth_spec.doManagedCredentialRef); + writer.writeObjectValue("injection", auth_spec.injection, serializeAuth_injection); + writer.writeCollectionOfPrimitiveValues("modes", auth_spec.modes); + writer.writeStringValue("provider", auth_spec.provider); + writer.writeCollectionOfPrimitiveValues("scopes", auth_spec.scopes); +} /** * Serializes information the current object * @param Autoscale_pool The instance to serialize from. @@ -46752,6 +48949,17 @@ export function serializeBalance(writer: SerializationWriter, balance: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!base_url_resolution || isSerializingDerivedType) { return; } + writer.writeObjectValue("httpLookup", base_url_resolution.httpLookup, serializeHttp_lookup_spec); +} /** * Serializes information the current object * @param Batch The instance to serialize from. @@ -47452,6 +49660,19 @@ export function serializeCheck_updatable(writer: SerializationWriter, check_upda writer.writeEnumValue("type", check_updatable.type); writer.writeAdditionalData(check_updatable.additionalData); } +/** + * Serializes information the current object + * @param Classification The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeClassification(writer: SerializationWriter, classification: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!classification || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("dataClasses", classification.dataClasses); + writer.writeStringValue("operation", classification.operation); + writer.writeStringValue("risk", classification.risk); +} /** * Serializes information the current object * @param Cluster The instance to serialize from. @@ -47473,6 +49694,7 @@ export function serializeCluster(writer: SerializationWriter, cluster: Partial("node_pools", cluster.nodePools, serializeKubernetes_node_pool); writer.writeObjectValue("nvidia_gpu_device_plugin", cluster.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("p2p_oci_registry_plugin", cluster.p2pOciRegistryPlugin, serializeP2p_oci_registry_plugin); writer.writeObjectValue("rdma_shared_dev_plugin", cluster.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); writer.writeStringValue("region", cluster.region); writer.writeObjectValue("routing_agent", cluster.routingAgent, serializeRouting_agent); @@ -47521,6 +49743,7 @@ export function serializeCluster_read(writer: SerializationWriter, cluster_read: writer.writeStringValue("name", cluster_read.name); writer.writeCollectionOfObjectValues("node_pools", cluster_read.nodePools, serializeKubernetes_node_pool); writer.writeObjectValue("nvidia_gpu_device_plugin", cluster_read.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("p2p_oci_registry_plugin", cluster_read.p2pOciRegistryPlugin, serializeP2p_oci_registry_plugin); writer.writeObjectValue("rdma_shared_dev_plugin", cluster_read.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); writer.writeStringValue("region", cluster_read.region); writer.writeCollectionOfPrimitiveValues("registries", cluster_read.registries); @@ -47604,6 +49827,7 @@ export function serializeCluster_update(writer: SerializationWriter, cluster_upd writer.writeObjectValue("maintenance_policy", cluster_update.maintenancePolicy, serializeMaintenance_policy); writer.writeStringValue("name", cluster_update.name); writer.writeObjectValue("nvidia_gpu_device_plugin", cluster_update.nvidiaGpuDevicePlugin, serializeNvidia_gpu_device_plugin); + writer.writeObjectValue("p2p_oci_registry_plugin", cluster_update.p2pOciRegistryPlugin, serializeP2p_oci_registry_plugin); writer.writeObjectValue("rdma_shared_dev_plugin", cluster_update.rdmaSharedDevPlugin, serializeRdma_shared_dev_plugin); writer.writeObjectValue("routing_agent", cluster_update.routingAgent, serializeRouting_agent); writer.writeObjectValue("sso", cluster_update.sso, serializeSso); @@ -47700,6 +49924,39 @@ export function serializeCompletion_usage_cache_creation(writer: SerializationWr writer.writeNumberValue("ephemeral_5m_input_tokens", completion_usage_cache_creation.ephemeral5mInputTokens); writer.writeAdditionalData(completion_usage_cache_creation.additionalData); } +/** + * Serializes information the current object + * @param Connection_authorization The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeConnection_authorization(writer: SerializationWriter, connection_authorization: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!connection_authorization || isSerializingDerivedType) { return; } + writer.writeStringValue("connect_url", connection_authorization.connectUrl); + writer.writeDateValue("expires_at", connection_authorization.expiresAt); + writer.writeStringValue("status", connection_authorization.status); + writer.writeStringValue("verification_code", connection_authorization.verificationCode); +} +/** + * Serializes information the current object + * @param Connection_parameter_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeConnection_parameter_spec(writer: SerializationWriter, connection_parameter_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!connection_parameter_spec || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("allowed_host_suffixes", connection_parameter_spec.allowedHostSuffixes); + writer.writeCollectionOfPrimitiveValues("allowed_values", connection_parameter_spec.allowedValues); + writer.writeStringValue("description", connection_parameter_spec.description); + writer.writeStringValue("input_kind", connection_parameter_spec.inputKind); + writer.writeStringValue("key", connection_parameter_spec.key); + writer.writeStringValue("label", connection_parameter_spec.label); + writer.writeNumberValue("max_length", connection_parameter_spec.maxLength); + writer.writeStringValue("normalization", connection_parameter_spec.normalization); + writer.writeBooleanValue("required", connection_parameter_spec.required); +} /** * Serializes information the current object * @param Connection_pool The instance to serialize from. @@ -47771,6 +50028,43 @@ export function serializeCoredns_autoscaler(writer: SerializationWriter, coredns writer.writeBooleanValue("enabled", coredns_autoscaler.enabled); writer.writeAdditionalData(coredns_autoscaler.additionalData); } +/** + * Serializes information the current object + * @param Create_connection_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_connection_request(writer: SerializationWriter, create_connection_request: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_connection_request || isSerializingDerivedType) { return; } + writer.writeObjectValue("connection_parameters", create_connection_request.connectionParameters, serializeCreate_connection_request_connection_parameters); + writer.writeStringValue("provider", create_connection_request.provider); + writer.writeCollectionOfPrimitiveValues("scopes", create_connection_request.scopes); + writer.writeStringValue("user_id", create_connection_request.userId); +} +/** + * Serializes information the current object + * @param Create_connection_request_connection_parameters The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_connection_request_connection_parameters(writer: SerializationWriter, create_connection_request_connection_parameters: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_connection_request_connection_parameters || isSerializingDerivedType) { return; } + writer.writeAdditionalData(create_connection_request_connection_parameters.additionalData); +} +/** + * Serializes information the current object + * @param Create_connection_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_connection_response(writer: SerializationWriter, create_connection_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_connection_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("authorization", create_connection_response.authorization, serializeConnection_authorization); + writer.writeObjectValue("connection", create_connection_response.connection, serializeOauth_connection); +} /** * Serializes information the current object * @param Create_image_request The instance to serialize from. @@ -48064,6 +50358,46 @@ export function serializeCreate_secret_response(writer: SerializationWriter, cre writer.writeNumberValue("version", create_secret_response.version); writer.writeAdditionalData(create_secret_response.additionalData); } +/** + * Serializes information the current object + * @param Create_session_request The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_session_request(writer: SerializationWriter, create_session_request: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_session_request || isSerializingDerivedType) { return; } + writer.writeStringValue("actor_id", create_session_request.actorId); + writer.writeObjectValue("config", create_session_request.config, serializeCreate_session_request_config); + writer.writeStringValue("name", create_session_request.name); + writer.writeObjectValue("policy", create_session_request.policy, serializeSession_policy_spec); + writer.writeCollectionOfPrimitiveValues("tools", create_session_request.tools); +} +/** + * Serializes information the current object + * @param Create_session_request_config The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_session_request_config(writer: SerializationWriter, create_session_request_config: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_session_request_config || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("preloadTools", create_session_request_config.preloadTools); + writer.writeAdditionalData(create_session_request_config.additionalData); +} +/** + * Serializes information the current object + * @param Create_session_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeCreate_session_response(writer: SerializationWriter, create_session_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!create_session_response || isSerializingDerivedType) { return; } + writer.writeStringValue("mcpUrl", create_session_response.mcpUrl); + writer.writeObjectValue("session", create_session_response.session, serializePublic_session_policy); + writer.writeCollectionOfPrimitiveValues("tools", create_session_response.tools); +} /** * Serializes information the current object * @param Create_trigger The instance to serialize from. @@ -48684,6 +51018,27 @@ export function serializeDedicated_inference_update_request_access_tokens(writer if (!dedicated_inference_update_request_access_tokens || isSerializingDerivedType) { return; } writer.writeStringValue("hugging_face_token", dedicated_inference_update_request_access_tokens.huggingFaceToken); } +/** + * Serializes information the current object + * @param Delete_connection_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDelete_connection_response(writer: SerializationWriter, delete_connection_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!delete_connection_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("connection", delete_connection_response.connection, serializeOauth_connection); +} +/** + * Serializes information the current object + * @param Delete_session_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeDelete_session_response(writer: SerializationWriter, delete_session_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!delete_session_response || isSerializingDerivedType) { return; } +} /** * Serializes information the current object * @param Destination The instance to serialize from. @@ -49347,7 +51702,7 @@ export function serializeEmbeddings_request(writer: SerializationWriter, embeddi writer.writeStringValue("input", embeddings_request.input as string); } else { - writer.writeCollectionOfPrimitiveValues("input", embeddings_request.input); + writer.writeCollectionOfObjectValues("input", embeddings_request.input as string[] | undefined | null, serializeEmbeddings_request_input); } writer.writeStringValue("model", embeddings_request.model); writer.writeStringValue("user", embeddings_request.user); @@ -49439,6 +51794,21 @@ export function serializeEvents_logs(writer: SerializationWriter, events_logs: P writer.writeStringValue("id", events_logs.id); writer.writeAdditionalData(events_logs.additionalData); } +/** + * Serializes information the current object + * @param Execution_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeExecution_spec(writer: SerializationWriter, execution_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!execution_spec || isSerializingDerivedType) { return; } + writer.writeStringValue("adapterVersion", execution_spec.adapterVersion); + writer.writeStringValue("configRef", execution_spec.configRef); + writer.writeObjectValue("http", execution_spec.http, serializeHttp_execution); + writer.writeObjectValue("mcp", execution_spec.mcp, serializeMcp_execution); + writer.writeStringValue("type", execution_spec.type); +} /** * Serializes information the current object * @param Firewall The instance to serialize from. @@ -49734,6 +52104,29 @@ export function serializeGenerated_image(writer: SerializationWriter, generated_ writer.writeStringValue("revised_prompt", generated_image.revisedPrompt); writer.writeAdditionalData(generated_image.additionalData); } +/** + * Serializes information the current object + * @param Get_connection_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGet_connection_response(writer: SerializationWriter, get_connection_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!get_connection_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("authorization", get_connection_response.authorization, serializeConnection_authorization); + writer.writeObjectValue("connection", get_connection_response.connection, serializeOauth_connection); +} +/** + * Serializes information the current object + * @param Get_user_response The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeGet_user_response(writer: SerializationWriter, get_user_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!get_user_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("user", get_user_response.user, serializeUser); +} /** * Serializes information the current object * @param Glb_settings The instance to serialize from. @@ -49849,6 +52242,53 @@ export function serializeHistory(writer: SerializationWriter, history: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!hook_spec || isSerializingDerivedType) { return; } + writer.writeObjectValue("usage", hook_spec.usage, serializeUsage_spec); +} +/** + * Serializes information the current object + * @param Http_execution The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeHttp_execution(writer: SerializationWriter, http_execution: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!http_execution || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("allowedHosts", http_execution.allowedHosts); + writer.writeStringValue("baseUrl", http_execution.baseUrl); + writer.writeStringValue("method", http_execution.method); + writer.writeStringValue("path", http_execution.path); + writer.writeStringValue("requestEncoding", http_execution.requestEncoding); + writer.writeStringValue("responseFormat", http_execution.responseFormat); +} +/** + * Serializes information the current object + * @param Http_lookup_spec The instance to serialize from. + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeHttp_lookup_spec(writer: SerializationWriter, http_lookup_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!http_lookup_spec || isSerializingDerivedType) { return; } + writer.writeStringValue("baseUrlTemplate", http_lookup_spec.baseUrlTemplate); + writer.writeBooleanValue("caseInsensitive", http_lookup_spec.caseInsensitive); + writer.writeStringValue("extractField", http_lookup_spec.extractField); + writer.writeStringValue("matchField", http_lookup_spec.matchField); + writer.writeStringValue("matchValue", http_lookup_spec.matchValue); + writer.writeStringValue("match_value_parameter", http_lookup_spec.matchValueParameter); + writer.writeStringValue("method", http_lookup_spec.method); + writer.writeCollectionOfPrimitiveValues("requiredScopes", http_lookup_spec.requiredScopes); + writer.writeBooleanValue("trimTrailingSlash", http_lookup_spec.trimTrailingSlash); + writer.writeStringValue("url", http_lookup_spec.url); +} /** * Serializes information the current object * @param Image The instance to serialize from. @@ -50497,6 +52937,18 @@ export function serializeLb_firewall(writer: SerializationWriter, lb_firewall: P writer.writeCollectionOfPrimitiveValues("deny", lb_firewall.deny); writer.writeAdditionalData(lb_firewall.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_connections_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_connections_response(writer: SerializationWriter, list_connections_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_connections_response || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("connections", list_connections_response.connections, serializeOauth_connection); + writer.writeObjectValue("pagination", list_connections_response.pagination, serializePagination); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -50510,6 +52962,67 @@ export function serializeList_models_response(writer: SerializationWriter, list_ writer.writeEnumValue("object", list_models_response.object); writer.writeAdditionalData(list_models_response.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_providers_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_providers_response(writer: SerializationWriter, list_providers_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_providers_response || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("providers", list_providers_response.providers, serializeProvider_summary); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_sessions_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_sessions_response(writer: SerializationWriter, list_sessions_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_sessions_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("pagination", list_sessions_response.pagination, serializePagination); + writer.writeCollectionOfObjectValues("sessions", list_sessions_response.sessions, serializePublic_session_policy); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_toolkits_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_toolkits_response(writer: SerializationWriter, list_toolkits_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_toolkits_response || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("toolkits", list_toolkits_response.toolkits, serializeToolkit); + writer.writeStringValue("version", list_toolkits_response.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_tools_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_tools_response(writer: SerializationWriter, list_tools_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_tools_response || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("definitions", list_tools_response.definitions, serializeTool_definition); + writer.writeObjectValue("pagination", list_tools_response.pagination, serializePagination); + writer.writeCollectionOfObjectValues("tools", list_tools_response.tools, serializeTool); + writer.writeStringValue("version", list_tools_response.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param List_users_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeList_users_response(writer: SerializationWriter, list_users_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!list_users_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("pagination", list_users_response.pagination, serializePagination); + writer.writeCollectionOfPrimitiveValues("user_ids", list_users_response.userIds); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -50694,6 +53207,21 @@ export function serializeMaintenance_policy(writer: SerializationWriter, mainten writer.writeStringValue("start_time", maintenance_policy.startTime); writer.writeAdditionalData(maintenance_policy.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Mcp_execution The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeMcp_execution(writer: SerializationWriter, mcp_execution: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!mcp_execution || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("allowedHosts", mcp_execution.allowedHosts); + writer.writeStringValue("endpoint", mcp_execution.endpoint); + writer.writeStringValue("serverRef", mcp_execution.serverRef); + writer.writeStringValue("toolName", mcp_execution.toolName); + writer.writeStringValue("transport", mcp_execution.transport); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -51158,20 +53686,30 @@ export function serializeMultiregistry_create(writer: SerializationWriter, multi // @ts-ignore export function serializeMysql_advanced_config(writer: SerializationWriter, mysql_advanced_config: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!mysql_advanced_config || isSerializingDerivedType) { return; } + writer.writeBooleanValue("automatic_sp_privileges", mysql_advanced_config.automaticSpPrivileges); writer.writeNumberValue("backup_hour", mysql_advanced_config.backupHour); writer.writeNumberValue("backup_minute", mysql_advanced_config.backupMinute); writer.writeNumberValue("binlog_retention_period", mysql_advanced_config.binlogRetentionPeriod); writer.writeNumberValue("connect_timeout", mysql_advanced_config.connectTimeout); writer.writeStringValue("default_time_zone", mysql_advanced_config.defaultTimeZone); + writer.writeNumberValue("div_precision_increment", mysql_advanced_config.divPrecisionIncrement); + writer.writeBooleanValue("end_markers_in_json", mysql_advanced_config.endMarkersInJson); + writer.writeNumberValue("eq_range_index_dive_limit", mysql_advanced_config.eqRangeIndexDiveLimit); writer.writeNumberValue("group_concat_max_len", mysql_advanced_config.groupConcatMaxLen); writer.writeNumberValue("information_schema_stats_expiry", mysql_advanced_config.informationSchemaStatsExpiry); writer.writeNumberValue("innodb_change_buffer_max_size", mysql_advanced_config.innodbChangeBufferMaxSize); writer.writeNumberValue("innodb_flush_neighbors", mysql_advanced_config.innodbFlushNeighbors); + writer.writeBooleanValue("innodb_ft_enable_stopword", mysql_advanced_config.innodbFtEnableStopword); + writer.writeNumberValue("innodb_ft_max_token_size", mysql_advanced_config.innodbFtMaxTokenSize); writer.writeNumberValue("innodb_ft_min_token_size", mysql_advanced_config.innodbFtMinTokenSize); + writer.writeNumberValue("innodb_ft_num_word_optimize", mysql_advanced_config.innodbFtNumWordOptimize); + writer.writeNumberValue("innodb_ft_result_cache_limit", mysql_advanced_config.innodbFtResultCacheLimit); writer.writeStringValue("innodb_ft_server_stopword_table", mysql_advanced_config.innodbFtServerStopwordTable); + writer.writeStringValue("innodb_ft_user_stopword_table", mysql_advanced_config.innodbFtUserStopwordTable); writer.writeNumberValue("innodb_lock_wait_timeout", mysql_advanced_config.innodbLockWaitTimeout); writer.writeNumberValue("innodb_log_buffer_size", mysql_advanced_config.innodbLogBufferSize); writer.writeNumberValue("innodb_online_alter_log_max_size", mysql_advanced_config.innodbOnlineAlterLogMaxSize); + writer.writeBooleanValue("innodb_optimize_fulltext_only", mysql_advanced_config.innodbOptimizeFulltextOnly); writer.writeBooleanValue("innodb_print_all_deadlocks", mysql_advanced_config.innodbPrintAllDeadlocks); writer.writeNumberValue("innodb_read_io_threads", mysql_advanced_config.innodbReadIoThreads); writer.writeBooleanValue("innodb_rollback_on_timeout", mysql_advanced_config.innodbRollbackOnTimeout); @@ -51182,17 +53720,23 @@ export function serializeMysql_advanced_config(writer: SerializationWriter, mysq writer.writeEnumValue("log_output", mysql_advanced_config.logOutput ?? Mysql_advanced_config_log_outputObject.NONE); writer.writeNumberValue("long_query_time", mysql_advanced_config.longQueryTime); writer.writeNumberValue("max_allowed_packet", mysql_advanced_config.maxAllowedPacket); + writer.writeNumberValue("max_execution_time", mysql_advanced_config.maxExecutionTime); writer.writeNumberValue("max_heap_table_size", mysql_advanced_config.maxHeapTableSize); + writer.writeNumberValue("max_seeks_for_key", mysql_advanced_config.maxSeeksForKey); writer.writeObjectValue("mysql_incremental_backup", mysql_advanced_config.mysqlIncrementalBackup, serializeMysql_incremental_backup); writer.writeNumberValue("net_buffer_length", mysql_advanced_config.netBufferLength); writer.writeNumberValue("net_read_timeout", mysql_advanced_config.netReadTimeout); writer.writeNumberValue("net_write_timeout", mysql_advanced_config.netWriteTimeout); + writer.writeNumberValue("optimizer_prune_level", mysql_advanced_config.optimizerPruneLevel); + writer.writeNumberValue("optimizer_search_depth", mysql_advanced_config.optimizerSearchDepth); + writer.writeStringValue("optimizer_switch", mysql_advanced_config.optimizerSwitch); writer.writeBooleanValue("slow_query_log", mysql_advanced_config.slowQueryLog); writer.writeNumberValue("sort_buffer_size", mysql_advanced_config.sortBufferSize); writer.writeStringValue("sql_mode", mysql_advanced_config.sqlMode); writer.writeBooleanValue("sql_require_primary_key", mysql_advanced_config.sqlRequirePrimaryKey); writer.writeNumberValue("tmp_table_size", mysql_advanced_config.tmpTableSize); writer.writeNumberValue("wait_timeout", mysql_advanced_config.waitTimeout); + writer.writeBooleanValue("windowing_use_high_precision", mysql_advanced_config.windowingUseHighPrecision); writer.writeAdditionalData(mysql_advanced_config.additionalData); } /** @@ -51662,6 +54206,38 @@ export function serializeNvidia_gpu_device_plugin(writer: SerializationWriter, n writer.writeBooleanValue("enabled", nvidia_gpu_device_plugin.enabled); writer.writeAdditionalData(nvidia_gpu_device_plugin.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Oauth_connection The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOauth_connection(writer: SerializationWriter, oauth_connection: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!oauth_connection || isSerializingDerivedType) { return; } + writer.writeObjectValue("connection_parameters", oauth_connection.connectionParameters, serializeOauth_connection_connection_parameters); + writer.writeDateValue("created_at", oauth_connection.createdAt); + writer.writeDateValue("granted_at", oauth_connection.grantedAt); + writer.writeStringValue("id", oauth_connection.id); + writer.writeStringValue("provider", oauth_connection.provider); + writer.writeStringValue("provider_display_name", oauth_connection.providerDisplayName); + writer.writeDateValue("revoked_at", oauth_connection.revokedAt); + writer.writeCollectionOfPrimitiveValues("scopes", oauth_connection.scopes); + writer.writeStringValue("status", oauth_connection.status); + writer.writeDateValue("updated_at", oauth_connection.updatedAt); + writer.writeStringValue("user_id", oauth_connection.userId); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Oauth_connection_connection_parameters The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeOauth_connection_connection_parameters(writer: SerializationWriter, oauth_connection_connection_parameters: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!oauth_connection_connection_parameters || isSerializingDerivedType) { return; } + writer.writeAdditionalData(oauth_connection_connection_parameters.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52040,6 +54616,18 @@ export function serializeOptions_version_availability(writer: SerializationWrite writer.writeCollectionOfObjectValues("valkey", options_version_availability.valkey, serializeDatabase_version_availability); writer.writeAdditionalData(options_version_availability.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param P2p_oci_registry_plugin The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeP2p_oci_registry_plugin(writer: SerializationWriter, p2p_oci_registry_plugin: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!p2p_oci_registry_plugin || isSerializingDerivedType) { return; } + writer.writeBooleanValue("enabled", p2p_oci_registry_plugin.enabled); + writer.writeAdditionalData(p2p_oci_registry_plugin.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52075,6 +54663,18 @@ export function serializePage_links_pagesMember1(writer: SerializationWriter, pa if (!page_links_pagesMember1 || isSerializingDerivedType) { return; } writer.writeAdditionalData(page_links_pagesMember1.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Pages_pagination The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePages_pagination(writer: SerializationWriter, pages_pagination: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!pages_pagination || isSerializingDerivedType) { return; } + writer.writeObjectValue("links", pages_pagination.links, serializePage_links); + writer.writeAdditionalData(pages_pagination.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52084,8 +54684,9 @@ export function serializePage_links_pagesMember1(writer: SerializationWriter, pa // @ts-ignore export function serializePagination(writer: SerializationWriter, pagination: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!pagination || isSerializingDerivedType) { return; } - writer.writeObjectValue("links", pagination.links, serializePage_links); - writer.writeAdditionalData(pagination.additionalData); + writer.writeNumberValue("page", pagination.page); + writer.writeNumberValue("per_page", pagination.perPage); + writer.writeNumberValue("total", pagination.total); } /** * Serializes information the current object @@ -52268,6 +54869,17 @@ export function serializePgbouncer_advanced_config(writer: SerializationWriter, writer.writeBooleanValue("server_reset_query_always", pgbouncer_advanced_config.serverResetQueryAlways); writer.writeAdditionalData(pgbouncer_advanced_config.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Policy_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePolicy_spec(writer: SerializationWriter, policy_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!policy_spec || isSerializingDerivedType) { return; } + writer.writeStringValue("permission", policy_spec.permission); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52417,6 +55029,51 @@ export function serializeProject_base(writer: SerializationWriter, project_base: writer.writeStringValue("purpose", project_base.purpose); writer.writeAdditionalData(project_base.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Provider_summary The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeProvider_summary(writer: SerializationWriter, provider_summary: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!provider_summary || isSerializingDerivedType) { return; } + writer.writeStringValue("auth_type", provider_summary.authType); + writer.writeCollectionOfObjectValues("connection_parameters", provider_summary.connectionParameters, serializeConnection_parameter_spec); + writer.writeStringValue("description", provider_summary.description); + writer.writeStringValue("display_name", provider_summary.displayName); + writer.writeStringValue("name", provider_summary.name); + writer.writeCollectionOfPrimitiveValues("scopes", provider_summary.scopes); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Public_session_policy The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePublic_session_policy(writer: SerializationWriter, public_session_policy: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!public_session_policy || isSerializingDerivedType) { return; } + writer.writeStringValue("actorId", public_session_policy.actorId); + writer.writeObjectValue("config", public_session_policy.config, serializePublic_session_policy_config); + writer.writeDateValue("createdAt", public_session_policy.createdAt); + writer.writeStringValue("name", public_session_policy.name); + writer.writeObjectValue("policy", public_session_policy.policy, serializeSession_policy_spec); + writer.writeStringValue("sessionUrn", public_session_policy.sessionUrn); + writer.writeObjectValue("tools", public_session_policy.tools, serializeSession_tool_selection); + writer.writeDateValue("updatedAt", public_session_policy.updatedAt); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Public_session_policy_config The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializePublic_session_policy_config(writer: SerializationWriter, public_session_policy_config: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!public_session_policy_config || isSerializingDerivedType) { return; } + writer.writeAdditionalData(public_session_policy_config.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52557,6 +55214,19 @@ export function serializeRegistry_run_gc(writer: SerializationWriter, registry_r writer.writeEnumValue("type", registry_run_gc.type); writer.writeAdditionalData(registry_run_gc.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Reliability_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeReliability_spec(writer: SerializationWriter, reliability_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!reliability_spec || isSerializingDerivedType) { return; } + writer.writeStringValue("maxOutputBytes", reliability_spec.maxOutputBytes); + writer.writeObjectValue("retry", reliability_spec.retry, serializeRetry_spec); + writer.writeNumberValue("timeoutMs", reliability_spec.timeoutMs); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -52860,6 +55530,19 @@ export function serializeResponse_usage_output_tokens_details(writer: Serializat writer.writeNumberValue("tool_output_tokens", response_usage_output_tokens_details.toolOutputTokens); writer.writeAdditionalData(response_usage_output_tokens_details.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Retry_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeRetry_spec(writer: SerializationWriter, retry_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!retry_spec || isSerializingDerivedType) { return; } + writer.writeStringValue("backoff", retry_spec.backoff); + writer.writeNumberValue("maxAttempts", retry_spec.maxAttempts); + writer.writeCollectionOfPrimitiveValues("retryOn", retry_spec.retryOn); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -53053,6 +55736,66 @@ export function serializeSelective_destroy_associated_resource(writer: Serializa writer.writeCollectionOfPrimitiveValues("volume_snapshots", selective_destroy_associated_resource.volumeSnapshots); writer.writeAdditionalData(selective_destroy_associated_resource.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Session_policy_rule The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSession_policy_rule(writer: SerializationWriter, session_policy_rule: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!session_policy_rule || isSerializingDerivedType) { return; } + writer.writeEnumValue("action", session_policy_rule.action ?? Session_policy_actionObject.Ask); + writer.writeObjectValue("match", session_policy_rule.match, serializeSession_policy_rule_match); + writer.writeStringValue("tool", session_policy_rule.tool); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Session_policy_rule_match The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSession_policy_rule_match(writer: SerializationWriter, session_policy_rule_match: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!session_policy_rule_match || isSerializingDerivedType) { return; } + writer.writeAdditionalData(session_policy_rule_match.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Session_policy_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSession_policy_spec(writer: SerializationWriter, session_policy_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!session_policy_spec || isSerializingDerivedType) { return; } + writer.writeEnumValue("defaultAction", session_policy_spec.defaultAction ?? Session_policy_actionObject.Ask); + writer.writeCollectionOfObjectValues("rules", session_policy_spec.rules, serializeSession_policy_rule); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Session_tool_reference The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSession_tool_reference(writer: SerializationWriter, session_tool_reference: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!session_tool_reference || isSerializingDerivedType) { return; } + writer.writeEnumValue("kind", session_tool_reference.kind); + writer.writeStringValue("name", session_tool_reference.name); + writer.writeStringValue("version", session_tool_reference.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Session_tool_selection The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeSession_tool_selection(writer: SerializationWriter, session_tool_selection: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!session_tool_selection || isSerializingDerivedType) { return; } + writer.writeCollectionOfObjectValues("references", session_tool_selection.references, serializeSession_tool_reference); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -53511,6 +56254,256 @@ export function serializeTimescaledb_advanced_config(writer: SerializationWriter writer.writeNumberValue("max_background_workers", timescaledb_advanced_config.maxBackgroundWorkers); writer.writeAdditionalData(timescaledb_advanced_config.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool(writer: SerializationWriter, tool: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool || isSerializingDerivedType) { return; } + writer.writeObjectValue("annotations", tool.annotations, serializeTool_annotations); + writer.writeStringValue("description", tool.description); + writer.writeObjectValue("inputSchema", tool.inputSchema, serializeTool_inputSchema); + writer.writeStringValue("name", tool.name); + writer.writeObjectValue("outputSchema", tool.outputSchema, serializeTool_outputSchema); + writer.writeBooleanValue("parallelizable", tool.parallelizable); + writer.writeBooleanValue("streamingSafe", tool.streamingSafe); + writer.writeStringValue("title", tool.title); + writer.writeStringValue("toolkitId", tool.toolkitId); + writer.writeStringValue("toolSlug", tool.toolSlug); + writer.writeStringValue("version", tool.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_annotations The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_annotations(writer: SerializationWriter, tool_annotations: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_annotations || isSerializingDerivedType) { return; } + writer.writeBooleanValue("destructiveHint", tool_annotations.destructiveHint); + writer.writeBooleanValue("idempotentHint", tool_annotations.idempotentHint); + writer.writeBooleanValue("openWorldHint", tool_annotations.openWorldHint); + writer.writeBooleanValue("readOnlyHint", tool_annotations.readOnlyHint); + writer.writeStringValue("title", tool_annotations.title); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_definition The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_definition(writer: SerializationWriter, tool_definition: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_definition || isSerializingDerivedType) { return; } + writer.writeObjectValue("annotations", tool_definition.annotations, serializeTool_annotations); + writer.writeObjectValue("auth", tool_definition.auth, serializeAuth_spec); + writer.writeObjectValue("classification", tool_definition.classification, serializeClassification); + writer.writeStringValue("description", tool_definition.description); + writer.writeObjectValue("execution", tool_definition.execution, serializeExecution_spec); + writer.writeStringValue("flipperName", tool_definition.flipperName); + writer.writeObjectValue("hooks", tool_definition.hooks, serializeHook_spec); + writer.writeObjectValue("inputSchema", tool_definition.inputSchema, serializeTool_definition_inputSchema); + writer.writeStringValue("name", tool_definition.name); + writer.writeObjectValue("outputSchema", tool_definition.outputSchema, serializeTool_definition_outputSchema); + writer.writeBooleanValue("parallelizable", tool_definition.parallelizable); + writer.writeObjectValue("policy", tool_definition.policy, serializePolicy_spec); + writer.writeObjectValue("reliability", tool_definition.reliability, serializeReliability_spec); + writer.writeStringValue("schemaVersion", tool_definition.schemaVersion); + writer.writeStringValue("status", tool_definition.status); + writer.writeBooleanValue("streamingSafe", tool_definition.streamingSafe); + writer.writeCollectionOfPrimitiveValues("tags", tool_definition.tags); + writer.writeStringValue("title", tool_definition.title); + writer.writeStringValue("toolId", tool_definition.toolId); + writer.writeStringValue("toolkitId", tool_definition.toolkitId); + writer.writeStringValue("toolSlug", tool_definition.toolSlug); + writer.writeObjectValue("transform", tool_definition.transform, serializeTransform_spec); + writer.writeStringValue("version", tool_definition.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_definition_inputSchema The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_definition_inputSchema(writer: SerializationWriter, tool_definition_inputSchema: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_definition_inputSchema || isSerializingDerivedType) { return; } + writer.writeAdditionalData(tool_definition_inputSchema.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_definition_outputSchema The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_definition_outputSchema(writer: SerializationWriter, tool_definition_outputSchema: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_definition_outputSchema || isSerializingDerivedType) { return; } + writer.writeAdditionalData(tool_definition_outputSchema.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_inputSchema The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_inputSchema(writer: SerializationWriter, tool_inputSchema: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_inputSchema || isSerializingDerivedType) { return; } + writer.writeAdditionalData(tool_inputSchema.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Tool_outputSchema The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTool_outputSchema(writer: SerializationWriter, tool_outputSchema: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!tool_outputSchema || isSerializingDerivedType) { return; } + writer.writeAdditionalData(tool_outputSchema.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelt The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelt(writer: SerializationWriter, toolbelt: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelt || isSerializingDerivedType) { return; } + writer.writeDateValue("created_at", toolbelt.createdAt); + writer.writeStringValue("description", toolbelt.description); + writer.writeStringValue("display_name", toolbelt.displayName); + writer.writeStringValue("name", toolbelt.name); + writer.writeStringValue("reference", toolbelt.reference); + writer.writeStringValue("reference_latest", toolbelt.referenceLatest); + writer.writeEnumValue("status", toolbelt.status); + writer.writeNumberValue("tool_count", toolbelt.toolCount); + writer.writeCollectionOfPrimitiveValues("tools", toolbelt.tools); + writer.writeDateValue("updated_at", toolbelt.updatedAt); + writer.writeStringValue("version", toolbelt.version); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelt_create The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelt_create(writer: SerializationWriter, toolbelt_create: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelt_create || isSerializingDerivedType) { return; } + writer.writeStringValue("description", toolbelt_create.description); + writer.writeStringValue("display_name", toolbelt_create.displayName); + writer.writeStringValue("name", toolbelt_create.name); + writer.writeCollectionOfPrimitiveValues("tools", toolbelt_create.tools); + writer.writeStringValue("version", toolbelt_create.version ?? "1"); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelt_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelt_response(writer: SerializationWriter, toolbelt_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelt_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("toolbelt", toolbelt_response.toolbelt, serializeToolbelt); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelt_summary The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelt_summary(writer: SerializationWriter, toolbelt_summary: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelt_summary || isSerializingDerivedType) { return; } + writer.writeStringValue("description", toolbelt_summary.description); + writer.writeStringValue("display_name", toolbelt_summary.displayName); + writer.writeStringValue("latest_version", toolbelt_summary.latestVersion); + writer.writeStringValue("name", toolbelt_summary.name); + writer.writeStringValue("reference_latest", toolbelt_summary.referenceLatest); + writer.writeEnumValue("status", toolbelt_summary.status); + writer.writeNumberValue("tool_count", toolbelt_summary.toolCount); + writer.writeDateValue("updated_at", toolbelt_summary.updatedAt); + writer.writeNumberValue("version_count", toolbelt_summary.versionCount); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelt_tools The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelt_tools(writer: SerializationWriter, toolbelt_tools: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelt_tools || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("tools", toolbelt_tools.tools); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolbelts_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolbelts_response(writer: SerializationWriter, toolbelts_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolbelts_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("pagination", toolbelts_response.pagination, serializePagination); + writer.writeCollectionOfObjectValues("toolbelts", toolbelts_response.toolbelts, serializeToolbelt_summary); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Toolkit The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeToolkit(writer: SerializationWriter, toolkit: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!toolkit || isSerializingDerivedType) { return; } + writer.writeStringValue("description", toolkit.description); + writer.writeStringValue("id", toolkit.id); + writer.writeStringValue("name", toolkit.name); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Transform_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTransform_spec(writer: SerializationWriter, transform_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!transform_spec || isSerializingDerivedType) { return; } + writer.writeObjectValue("input", transform_spec.input, serializeTransform_spec_input); + writer.writeStringValue("language", transform_spec.language); + writer.writeObjectValue("output", transform_spec.output, serializeTransform_spec_output); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Transform_spec_input The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTransform_spec_input(writer: SerializationWriter, transform_spec_input: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!transform_spec_input || isSerializingDerivedType) { return; } + writer.writeAdditionalData(transform_spec_input.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Transform_spec_output The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeTransform_spec_output(writer: SerializationWriter, transform_spec_output: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!transform_spec_output || isSerializingDerivedType) { return; } + writer.writeAdditionalData(transform_spec_output.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -53544,6 +56537,40 @@ export function serializeTrigger_info_scheduled_runs(writer: SerializationWriter writer.writeStringValue("next_run_at", trigger_info_scheduled_runs.nextRunAt); writer.writeAdditionalData(trigger_info_scheduled_runs.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_connection_parameters_request The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_connection_parameters_request(writer: SerializationWriter, update_connection_parameters_request: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!update_connection_parameters_request || isSerializingDerivedType) { return; } + writer.writeObjectValue("connection_parameters", update_connection_parameters_request.connectionParameters, serializeUpdate_connection_parameters_request_connection_parameters); + writer.writeStringValue("id", update_connection_parameters_request.id); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_connection_parameters_request_connection_parameters The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_connection_parameters_request_connection_parameters(writer: SerializationWriter, update_connection_parameters_request_connection_parameters: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!update_connection_parameters_request_connection_parameters || isSerializingDerivedType) { return; } + writer.writeAdditionalData(update_connection_parameters_request_connection_parameters.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Update_connection_parameters_response The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUpdate_connection_parameters_response(writer: SerializationWriter, update_connection_parameters_response: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!update_connection_parameters_response || isSerializingDerivedType) { return; } + writer.writeObjectValue("connection", update_connection_parameters_response.connection, serializeOauth_connection); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -53583,6 +56610,31 @@ export function serializeUpdate_trigger(writer: SerializationWriter, update_trig writer.writeObjectValue("scheduled_details", update_trigger.scheduledDetails, serializeScheduled_details); writer.writeAdditionalData(update_trigger.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Usage_meter The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUsage_meter(writer: SerializationWriter, usage_meter: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!usage_meter || isSerializingDerivedType) { return; } + writer.writeStringValue("quantitySource", usage_meter.quantitySource); + writer.writeStringValue("sku", usage_meter.sku); + writer.writeStringValue("unit", usage_meter.unit); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param Usage_spec The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUsage_spec(writer: SerializationWriter, usage_spec: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!usage_spec || isSerializingDerivedType) { return; } + writer.writeBooleanValue("billable", usage_spec.billable); + writer.writeCollectionOfObjectValues("meters", usage_spec.meters, serializeUsage_meter); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -53592,21 +56644,23 @@ export function serializeUpdate_trigger(writer: SerializationWriter, update_trig // @ts-ignore export function serializeUser(writer: SerializationWriter, user: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { if (!user || isSerializingDerivedType) { return; } - writer.writeObjectValue("kubernetes_cluster_user", user.kubernetesClusterUser, serializeUser_kubernetes_cluster_user); - writer.writeAdditionalData(user.additionalData); + writer.writeCollectionOfObjectValues("connections", user.connections, serializeOauth_connection); + writer.writeCollectionOfObjectValues("sessions", user.sessions, serializeUser_session); + writer.writeStringValue("user_id", user.userId); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. - * @param User_kubernetes_cluster_user The instance to serialize from. + * @param User_session The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore -export function serializeUser_kubernetes_cluster_user(writer: SerializationWriter, user_kubernetes_cluster_user: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { - if (!user_kubernetes_cluster_user || isSerializingDerivedType) { return; } - writer.writeCollectionOfPrimitiveValues("groups", user_kubernetes_cluster_user.groups); - writer.writeStringValue("username", user_kubernetes_cluster_user.username); - writer.writeAdditionalData(user_kubernetes_cluster_user.additionalData); +export function serializeUser_session(writer: SerializationWriter, user_session: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!user_session || isSerializingDerivedType) { return; } + writer.writeDateValue("created_at", user_session.createdAt); + writer.writeStringValue("name", user_session.name); + writer.writeStringValue("session_urn", user_session.sessionUrn); + writer.writeDateValue("updated_at", user_session.updatedAt); } /** * Serializes information the current object @@ -53663,6 +56717,31 @@ export function serializeUser_settings_opensearch_acl(writer: SerializationWrite writer.writeEnumValue("permission", user_settings_opensearch_acl.permission); writer.writeAdditionalData(user_settings_opensearch_acl.additionalData); } +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User2 The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser2(writer: SerializationWriter, user2: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!user2 || isSerializingDerivedType) { return; } + writer.writeObjectValue("kubernetes_cluster_user", user2.kubernetesClusterUser, serializeUser2_kubernetes_cluster_user); + writer.writeAdditionalData(user2.additionalData); +} +/** + * Serializes information the current object + * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. + * @param User2_kubernetes_cluster_user The instance to serialize from. + * @param writer Serialization writer to use to serialize this model + */ +// @ts-ignore +export function serializeUser2_kubernetes_cluster_user(writer: SerializationWriter, user2_kubernetes_cluster_user: Partial | undefined | null = {}, isSerializingDerivedType: boolean = false) : void { + if (!user2_kubernetes_cluster_user || isSerializingDerivedType) { return; } + writer.writeCollectionOfPrimitiveValues("groups", user2_kubernetes_cluster_user.groups); + writer.writeStringValue("username", user2_kubernetes_cluster_user.username); + writer.writeAdditionalData(user2_kubernetes_cluster_user.additionalData); +} /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. @@ -54278,6 +57357,60 @@ export function serializeVpc_peering_updatable(writer: SerializationWriter, vpc_ writer.writeStringValue("name", vpc_peering_updatable.name); writer.writeAdditionalData(vpc_peering_updatable.additionalData); } +export type Session_policy_action = (typeof Session_policy_actionObject)[keyof typeof Session_policy_actionObject]; +/** + * SessionPolicyRule applies an action to a tool or version-pinned toolbelt.action must be allow, ask, or deny. match optionally narrows the rule tocalls with matching arguments. + */ +export interface Session_policy_rule extends Parsable { + /** + * SessionPolicyAction is the disposition applied to a tool call. Lowercasevalues are canonical so ProtoJSON matches the public REST vocabulary; theprefixed aliases preserve compatibility for existing protobuf clients. + */ + action?: Session_policy_action | null; + /** + * The match property + */ + match?: Session_policy_rule_match | null; + /** + * The tool property + */ + tool?: string | null; +} +export interface Session_policy_rule_match extends AdditionalDataHolder, Parsable { +} +/** + * SessionPolicySpec is the Gateway-relevant subset of a session's permissionpolicy. Filesystem and network policy remain enforced by the sandbox. + */ +export interface Session_policy_spec extends Parsable { + /** + * SessionPolicyAction is the disposition applied to a tool call. Lowercasevalues are canonical so ProtoJSON matches the public REST vocabulary; theprefixed aliases preserve compatibility for existing protobuf clients. + */ + defaultAction?: Session_policy_action | null; + /** + * The rules property + */ + rules?: Session_policy_rule[] | null; +} +export interface Session_tool_reference extends Parsable { + /** + * The kind property + */ + kind?: Session_tool_reference_kind | null; + /** + * The name property + */ + name?: string | null; + /** + * The version property + */ + version?: string | null; +} +export type Session_tool_reference_kind = (typeof Session_tool_reference_kindObject)[keyof typeof Session_tool_reference_kindObject]; +export interface Session_tool_selection extends Parsable { + /** + * The references property + */ + references?: Session_tool_reference[] | null; +} export interface Settings extends AdditionalDataHolder, Parsable { /** * The plan_downgrades property @@ -54774,6 +57907,338 @@ export interface Timescaledb_advanced_config extends AdditionalDataHolder, Parsa */ maxBackgroundWorkers?: number | null; } +export interface Tool extends Parsable { + /** + * The annotations property + */ + annotations?: Tool_annotations | null; + /** + * The description property + */ + description?: string | null; + /** + * The inputSchema property + */ + inputSchema?: Tool_inputSchema | null; + /** + * The name property + */ + name?: string | null; + /** + * The outputSchema property + */ + outputSchema?: Tool_outputSchema | null; + /** + * The parallelizable property + */ + parallelizable?: boolean | null; + /** + * The streamingSafe property + */ + streamingSafe?: boolean | null; + /** + * The title property + */ + title?: string | null; + /** + * The toolkitId property + */ + toolkitId?: string | null; + /** + * tool_slug is the provider-qualified, stable tool identifier"_". Pass this value back verbatim to the toolbeltadd/remove endpoints; clients should treat it as opaque rather thanreconstructing it from toolkit_id and name. + */ + toolSlug?: string | null; + /** + * The version property + */ + version?: string | null; +} +export interface Tool_annotations extends Parsable { + /** + * The destructiveHint property + */ + destructiveHint?: boolean | null; + /** + * The idempotentHint property + */ + idempotentHint?: boolean | null; + /** + * The openWorldHint property + */ + openWorldHint?: boolean | null; + /** + * The readOnlyHint property + */ + readOnlyHint?: boolean | null; + /** + * The title property + */ + title?: string | null; +} +export interface Tool_definition extends Parsable { + /** + * The annotations property + */ + annotations?: Tool_annotations | null; + /** + * The auth property + */ + auth?: Auth_spec | null; + /** + * The classification property + */ + classification?: Classification | null; + /** + * The description property + */ + description?: string | null; + /** + * The execution property + */ + execution?: Execution_spec | null; + /** + * The flipperName property + */ + flipperName?: string | null; + /** + * The hooks property + */ + hooks?: Hook_spec | null; + /** + * The inputSchema property + */ + inputSchema?: Tool_definition_inputSchema | null; + /** + * The name property + */ + name?: string | null; + /** + * The outputSchema property + */ + outputSchema?: Tool_definition_outputSchema | null; + /** + * The parallelizable property + */ + parallelizable?: boolean | null; + /** + * The policy property + */ + policy?: Policy_spec | null; + /** + * The reliability property + */ + reliability?: Reliability_spec | null; + /** + * The schemaVersion property + */ + schemaVersion?: string | null; + /** + * The status property + */ + status?: string | null; + /** + * The streamingSafe property + */ + streamingSafe?: boolean | null; + /** + * The tags property + */ + tags?: string[] | null; + /** + * The title property + */ + title?: string | null; + /** + * The toolId property + */ + toolId?: string | null; + /** + * The toolkitId property + */ + toolkitId?: string | null; + /** + * tool_slug is the provider-qualified, stable tool identifier"_". Pass this value back verbatim to the toolbeltadd/remove endpoints; clients should treat it as opaque. + */ + toolSlug?: string | null; + /** + * The transform property + */ + transform?: Transform_spec | null; + /** + * The version property + */ + version?: string | null; +} +export interface Tool_definition_inputSchema extends AdditionalDataHolder, Parsable { +} +export interface Tool_definition_outputSchema extends AdditionalDataHolder, Parsable { +} +export interface Tool_inputSchema extends AdditionalDataHolder, Parsable { +} +export interface Tool_outputSchema extends AdditionalDataHolder, Parsable { +} +export interface Toolbelt extends Parsable { + /** + * The created_at property + */ + createdAt?: Date | null; + /** + * The description property + */ + description?: string | null; + /** + * The display_name property + */ + displayName?: string | null; + /** + * The name property + */ + name?: string | null; + /** + * A reference pinned to this immutable toolbelt version. + */ + reference?: string | null; + /** + * An unversioned reference to the latest active version. + */ + referenceLatest?: string | null; + /** + * The status property + */ + status?: Toolbelt_status | null; + /** + * The tool_count property + */ + toolCount?: number | null; + /** + * The tools property + */ + tools?: string[] | null; + /** + * The updated_at property + */ + updatedAt?: Date | null; + /** + * The version property + */ + version?: string | null; +} +export interface Toolbelt_create extends Parsable { + /** + * The description property + */ + description?: string | null; + /** + * The display_name property + */ + displayName?: string | null; + /** + * The name property + */ + name?: string | null; + /** + * The tools property + */ + tools?: string[] | null; + /** + * The version property + */ + version?: string | null; +} +export interface Toolbelt_response extends Parsable { + /** + * The toolbelt property + */ + toolbelt?: Toolbelt | null; +} +export type Toolbelt_status = (typeof Toolbelt_statusObject)[keyof typeof Toolbelt_statusObject]; +export interface Toolbelt_summary extends Parsable { + /** + * The description property + */ + description?: string | null; + /** + * The display_name property + */ + displayName?: string | null; + /** + * The latest_version property + */ + latestVersion?: string | null; + /** + * The name property + */ + name?: string | null; + /** + * The reference_latest property + */ + referenceLatest?: string | null; + /** + * The status property + */ + status?: Toolbelt_summary_status | null; + /** + * The tool_count property + */ + toolCount?: number | null; + /** + * The updated_at property + */ + updatedAt?: Date | null; + /** + * The version_count property + */ + versionCount?: number | null; +} +export type Toolbelt_summary_status = (typeof Toolbelt_summary_statusObject)[keyof typeof Toolbelt_summary_statusObject]; +export interface Toolbelt_tools extends Parsable { + /** + * The tools property + */ + tools?: string[] | null; +} +export interface Toolbelts_response extends Parsable { + /** + * The pagination property + */ + pagination?: Pagination | null; + /** + * The toolbelts property + */ + toolbelts?: Toolbelt_summary[] | null; +} +export interface Toolkit extends Parsable { + /** + * The description property + */ + description?: string | null; + /** + * The id property + */ + id?: string | null; + /** + * The name property + */ + name?: string | null; +} +export interface Transform_spec extends Parsable { + /** + * The input property + */ + input?: Transform_spec_input | null; + /** + * The language property + */ + language?: string | null; + /** + * The output property + */ + output?: Transform_spec_output | null; +} +export interface Transform_spec_input extends AdditionalDataHolder, Parsable { +} +export interface Transform_spec_output extends AdditionalDataHolder, Parsable { +} export interface Trigger_info extends AdditionalDataHolder, Parsable { /** * UTC time string. @@ -54822,6 +58287,24 @@ export interface Trigger_info_scheduled_runs extends AdditionalDataHolder, Parsa */ nextRunAt?: string | null; } +export interface Update_connection_parameters_request extends Parsable { + /** + * The connection_parameters property + */ + connectionParameters?: Update_connection_parameters_request_connection_parameters | null; + /** + * The id property + */ + id?: string | null; +} +export interface Update_connection_parameters_request_connection_parameters extends AdditionalDataHolder, Parsable { +} +export interface Update_connection_parameters_response extends Parsable { + /** + * -----------------------------------------------------------------------------OAuth connection resources-----------------------------------------------------------------------------OAuthConnection is the public, team-scoped connection metadata returned tothe UI. It deliberately excludes the team ID, Secrets Manager assignment,actor identifiers, poll URL, and authorization handle. + */ + connection?: Oauth_connection | null; +} export interface Update_endpoint extends AdditionalDataHolder, Parsable { /** * The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. @@ -54852,21 +58335,64 @@ export interface Update_trigger extends AdditionalDataHolder, Parsable { */ scheduledDetails?: Scheduled_details | null; } -export interface User extends AdditionalDataHolder, Parsable { +export interface Usage_meter extends Parsable { /** - * The kubernetes_cluster_user property + * The quantitySource property + */ + quantitySource?: string | null; + /** + * The sku property + */ + sku?: string | null; + /** + * The unit property */ - kubernetesClusterUser?: User_kubernetes_cluster_user | null; + unit?: string | null; } -export interface User_kubernetes_cluster_user extends AdditionalDataHolder, Parsable { +export interface Usage_spec extends Parsable { /** - * A list of in-cluster groups that the user belongs to. + * When usage metadata is present, false prevents billing. Omitting usagemetadata leaves consumers' legacy billing classification unchanged. */ - groups?: string[] | null; + billable?: boolean | null; /** - * The username for the cluster admin user. + * The meters property */ - username?: string | null; + meters?: Usage_meter[] | null; +} +/** + * User is a derived, team-scoped view across sessions and OAuth connections. + */ +export interface User extends Parsable { + /** + * The connections property + */ + connections?: Oauth_connection[] | null; + /** + * The sessions property + */ + sessions?: User_session[] | null; + /** + * The user_id property + */ + userId?: string | null; +} +export interface User_session extends Parsable { + /** + * The created_at property + */ + createdAt?: Date | null; + /** + * The name property + */ + name?: string | null; + /** + * The session_urn property + */ + sessionUrn?: string | null; + /** + * The updated_at property + */ + updatedAt?: Date | null; } export interface User_settings extends AdditionalDataHolder, Parsable { /** @@ -54882,7 +58408,7 @@ export interface User_settings extends AdditionalDataHolder, Parsable { */ opensearchAcl?: User_settings_opensearch_acl[] | null; /** - * For Postgres clusters, set to `true` for a user with replication rights.This option is not currently supported for other database engines. + * For PostgreSQL clusters, set to `true` to grant the user replicationprivileges. When omitted on create or update, the value defaults to`false` and replication privileges are not granted. This option is notcurrently supported for other database engines. */ pgAllowReplication?: boolean | null; } @@ -54926,6 +58452,22 @@ export interface User_settings_opensearch_acl extends AdditionalDataHolder, Pars permission?: User_settings_opensearch_acl_permission | null; } export type User_settings_opensearch_acl_permission = (typeof User_settings_opensearch_acl_permissionObject)[keyof typeof User_settings_opensearch_acl_permissionObject]; +export interface User2 extends AdditionalDataHolder, Parsable { + /** + * The kubernetes_cluster_user property + */ + kubernetesClusterUser?: User2_kubernetes_cluster_user | null; +} +export interface User2_kubernetes_cluster_user extends AdditionalDataHolder, Parsable { + /** + * A list of in-cluster groups that the user belongs to. + */ + groups?: string[] | null; + /** + * The username for the cluster admin user. + */ + username?: string | null; +} export interface Validate_registry extends AdditionalDataHolder, Parsable { /** * A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. @@ -56863,10 +60405,11 @@ export const Destination_typeObject = { Opensearch_ext: "opensearch_ext", } as const; /** - * The type of disk. All Droplets contain a `local` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. + * The type of disk. All Droplets contain a `local` or `remote` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. */ export const Disk_info_typeObject = { Local: "local", + Remote: "remote", Scratch: "scratch", } as const; /** @@ -57826,6 +61369,18 @@ export const Scan_statusObject = { CSPM_NOT_ENABLED: "CSPM_NOT_ENABLED", SCAN_NOT_RUN: "SCAN_NOT_RUN", } as const; +/** + * SessionPolicyAction is the disposition applied to a tool call. Lowercasevalues are canonical so ProtoJSON matches the public REST vocabulary; theprefixed aliases preserve compatibility for existing protobuf clients. + */ +export const Session_policy_actionObject = { + Allow: "allow", + Ask: "ask", + Deny: "deny", +} as const; +export const Session_tool_reference_kindObject = { + SESSION_TOOL_REFERENCE_KIND_TOOL: "SESSION_TOOL_REFERENCE_KIND_TOOL", + SESSION_TOOL_REFERENCE_KIND_TOOLBELT: "SESSION_TOOL_REFERENCE_KIND_TOOLBELT", +} as const; /** * The type of resource that the snapshot originated from. */ @@ -57858,6 +61413,14 @@ export const Tags_resource_resources_resource_typeObject = { Volume: "volume", Volume_snapshot: "volume_snapshot", } as const; +export const Toolbelt_statusObject = { + Active: "active", + Deprecated: "deprecated", +} as const; +export const Toolbelt_summary_statusObject = { + Active: "active", + Deprecated: "deprecated", +} as const; /** * Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). */ diff --git a/src/dots/v2/actionGateway/connections/index.ts b/src/dots/v2/actionGateway/connections/index.ts new file mode 100644 index 000000000..8e61ee6f4 --- /dev/null +++ b/src/dots/v2/actionGateway/connections/index.ts @@ -0,0 +1,148 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createCreate_connection_responseFromDiscriminatorValue, createErrorEscapedFromDiscriminatorValue, createList_connections_responseFromDiscriminatorValue, serializeCreate_connection_request, serializeCreate_connection_response, type Create_connection_request, type Create_connection_response, type ErrorEscaped, type List_connections_response } from '../../../models/index.js'; +// @ts-ignore +import { ConnectionsItemRequestBuilderRequestsMetadata, type ConnectionsItemRequestBuilder } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/connections + */ +export interface ConnectionsRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.v2.actionGateway.connections.item collection + * @param id The connection UUID. + * @returns {ConnectionsItemRequestBuilder} + */ + byId(id: string) : ConnectionsItemRequestBuilder; + /** + * Lists OAuth connections owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Creates or begins authorization for an OAuth connection to an Action Gateway provider. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 409 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + post(body: Create_connection_request, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists OAuth connections owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Creates or begins authorization for an OAuth connection to an Action Gateway provider. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: Create_connection_request, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Lists OAuth connections owned by the authenticated team. + */ +export interface ConnectionsRequestBuilderGetQueryParameters { + /** + * Which 'page' of paginated results to return. + */ + page?: number; + /** + * Number of items returned per page + */ + perPage?: number; + /** + * Filter by provider name. + */ + provider?: string; + /** + * Field used to sort results. + */ + sort?: string; + /** + * Sort direction. + */ + sortDirection?: string; + /** + * Filter by connection status. + */ + status?: string; + /** + * Filter by end-user identifier. + */ + userId?: string; +} +/** + * Uri template for the request builder. + */ +export const ConnectionsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/connections{?page*,per_page*,provider*,sort*,sort_direction*,status*,user_id*}"; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const ConnectionsRequestBuilderGetQueryParametersMapper: Record = { + "perPage": "per_page", + "sortDirection": "sort_direction", + "userId": "user_id", +}; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ConnectionsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byId: { + requestsMetadata: ConnectionsItemRequestBuilderRequestsMetadata, + pathParametersMappings: ["id"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const ConnectionsRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: ConnectionsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_connections_responseFromDiscriminatorValue, + queryParametersMapper: ConnectionsRequestBuilderGetQueryParametersMapper, + }, + post: { + uriTemplate: ConnectionsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 409: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createCreate_connection_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeCreate_connection_request, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/connections/item/index.ts b/src/dots/v2/actionGateway/connections/item/index.ts new file mode 100644 index 000000000..1acd046ee --- /dev/null +++ b/src/dots/v2/actionGateway/connections/item/index.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createDelete_connection_responseFromDiscriminatorValue, createErrorEscapedFromDiscriminatorValue, createGet_connection_responseFromDiscriminatorValue, createUpdate_connection_parameters_responseFromDiscriminatorValue, serializeUpdate_connection_parameters_request, serializeUpdate_connection_parameters_response, type Delete_connection_response, type ErrorEscaped, type Get_connection_response, type Update_connection_parameters_request, type Update_connection_parameters_response } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/connections/{id} + */ +export interface ConnectionsItemRequestBuilder extends BaseRequestBuilder { + /** + * Revokes and deletes an OAuth connection owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + delete(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Retrieves an OAuth connection owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Updates non-sensitive connection parameters for an OAuth connection. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + patch(body: Update_connection_parameters_request, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Revokes and deletes an OAuth connection owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Retrieves an OAuth connection owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Updates non-sensitive connection parameters for an OAuth connection. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPatchRequestInformation(body: Update_connection_parameters_request, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const ConnectionsItemRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/connections/{id}"; +/** + * Metadata for all the requests in the request builder. + */ +export const ConnectionsItemRequestBuilderRequestsMetadata: RequestsMetadata = { + delete: { + uriTemplate: ConnectionsItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createDelete_connection_responseFromDiscriminatorValue, + }, + get: { + uriTemplate: ConnectionsItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createGet_connection_responseFromDiscriminatorValue, + }, + patch: { + uriTemplate: ConnectionsItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createUpdate_connection_parameters_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeUpdate_connection_parameters_request, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/index.ts b/src/dots/v2/actionGateway/index.ts new file mode 100644 index 000000000..00a87e710 --- /dev/null +++ b/src/dots/v2/actionGateway/index.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { ConnectionsRequestBuilderNavigationMetadata, ConnectionsRequestBuilderRequestsMetadata, type ConnectionsRequestBuilder } from './connections/index.js'; +// @ts-ignore +import { SessionsRequestBuilderNavigationMetadata, SessionsRequestBuilderRequestsMetadata, type SessionsRequestBuilder } from './sessions/index.js'; +// @ts-ignore +import { ToolbeltsRequestBuilderNavigationMetadata, ToolbeltsRequestBuilderRequestsMetadata, type ToolbeltsRequestBuilder } from './toolbelts/index.js'; +// @ts-ignore +import { ToolsRequestBuilderNavigationMetadata, ToolsRequestBuilderRequestsMetadata, type ToolsRequestBuilder } from './tools/index.js'; +// @ts-ignore +import { type UsersRequestBuilder, UsersRequestBuilderNavigationMetadata, UsersRequestBuilderRequestsMetadata } from './users/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway + */ +export interface ActionGatewayRequestBuilder extends BaseRequestBuilder { + /** + * The connections property + */ + get connections(): ConnectionsRequestBuilder; + /** + * The sessions property + */ + get sessions(): SessionsRequestBuilder; + /** + * The toolbelts property + */ + get toolbelts(): ToolbeltsRequestBuilder; + /** + * The tools property + */ + get tools(): ToolsRequestBuilder; + /** + * The users property + */ + get users(): UsersRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const ActionGatewayRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ActionGatewayRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + connections: { + requestsMetadata: ConnectionsRequestBuilderRequestsMetadata, + navigationMetadata: ConnectionsRequestBuilderNavigationMetadata, + }, + sessions: { + requestsMetadata: SessionsRequestBuilderRequestsMetadata, + navigationMetadata: SessionsRequestBuilderNavigationMetadata, + }, + toolbelts: { + requestsMetadata: ToolbeltsRequestBuilderRequestsMetadata, + navigationMetadata: ToolbeltsRequestBuilderNavigationMetadata, + }, + tools: { + requestsMetadata: ToolsRequestBuilderRequestsMetadata, + navigationMetadata: ToolsRequestBuilderNavigationMetadata, + }, + users: { + requestsMetadata: UsersRequestBuilderRequestsMetadata, + navigationMetadata: UsersRequestBuilderNavigationMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/sessions/index.ts b/src/dots/v2/actionGateway/sessions/index.ts new file mode 100644 index 000000000..4dca9b7e5 --- /dev/null +++ b/src/dots/v2/actionGateway/sessions/index.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createCreate_session_responseFromDiscriminatorValue, createErrorEscapedFromDiscriminatorValue, createList_sessions_responseFromDiscriminatorValue, serializeCreate_session_request, serializeCreate_session_response, type Create_session_request, type Create_session_response, type ErrorEscaped, type List_sessions_response } from '../../../models/index.js'; +// @ts-ignore +import { type WithSession_urnItemRequestBuilder, WithSession_urnItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/sessions + */ +export interface SessionsRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.v2.actionGateway.sessions.item collection + * @param session_urn The URL-encoded managed agents session URN. + * @returns {WithSession_urnItemRequestBuilder} + */ + bySession_urn(session_urn: string) : WithSession_urnItemRequestBuilder; + /** + * Lists Action Gateway sessions owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Creates a session with a tool selection, invocation policy, and optional direct-tool preload configuration. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + post(body: Create_session_request, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists Action Gateway sessions owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Creates a session with a tool selection, invocation policy, and optional direct-tool preload configuration. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: Create_session_request, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Lists Action Gateway sessions owned by the authenticated team. + */ +export interface SessionsRequestBuilderGetQueryParameters { + /** + * Filter sessions by actor identifier. + */ + endUserId?: string; + /** + * Which 'page' of paginated results to return. + */ + page?: number; + /** + * Number of items returned per page + */ + perPage?: number; +} +/** + * Uri template for the request builder. + */ +export const SessionsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/sessions{?end_user_id*,page*,per_page*}"; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const SessionsRequestBuilderGetQueryParametersMapper: Record = { + "endUserId": "end_user_id", + "perPage": "per_page", +}; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const SessionsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + bySession_urn: { + requestsMetadata: WithSession_urnItemRequestBuilderRequestsMetadata, + pathParametersMappings: ["session_urn"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const SessionsRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: SessionsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_sessions_responseFromDiscriminatorValue, + queryParametersMapper: SessionsRequestBuilderGetQueryParametersMapper, + }, + post: { + uriTemplate: SessionsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createCreate_session_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeCreate_session_request, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/sessions/item/index.ts b/src/dots/v2/actionGateway/sessions/item/index.ts new file mode 100644 index 000000000..d3586f74a --- /dev/null +++ b/src/dots/v2/actionGateway/sessions/item/index.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createDelete_session_responseFromDiscriminatorValue, createErrorEscapedFromDiscriminatorValue, type Delete_session_response, type ErrorEscaped } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/sessions/{session_urn} + */ +export interface WithSession_urnItemRequestBuilder extends BaseRequestBuilder { + /** + * Deletes an Action Gateway session owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + delete(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Deletes an Action Gateway session owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithSession_urnItemRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/sessions/{session_urn}"; +/** + * Metadata for all the requests in the request builder. + */ +export const WithSession_urnItemRequestBuilderRequestsMetadata: RequestsMetadata = { + delete: { + uriTemplate: WithSession_urnItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createDelete_session_responseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/toolbelts/index.ts b/src/dots/v2/actionGateway/toolbelts/index.ts new file mode 100644 index 000000000..401941fbc --- /dev/null +++ b/src/dots/v2/actionGateway/toolbelts/index.ts @@ -0,0 +1,137 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createToolbelt_responseFromDiscriminatorValue, createToolbelts_responseFromDiscriminatorValue, serializeToolbelt_create, serializeToolbelt_response, type ErrorEscaped, type Toolbelt_create, type Toolbelt_response, type Toolbelts_response } from '../../../models/index.js'; +// @ts-ignore +import { type WithNameItemRequestBuilder, WithNameItemRequestBuilderNavigationMetadata, WithNameItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +export type GetStatusQueryParameterType = (typeof GetStatusQueryParameterTypeObject)[keyof typeof GetStatusQueryParameterTypeObject]; +/** + * Builds and executes requests for operations under /v2/action-gateway/toolbelts + */ +export interface ToolbeltsRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.v2.actionGateway.toolbelts.item collection + * @param name The natural key identifying the toolbelt. + * @returns {WithNameItemRequestBuilder} + */ + byName(name: string) : WithNameItemRequestBuilder; + /** + * Lists the latest version of each toolbelt owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Creates a versioned collection of provider-qualified Action Gateway tool names. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 409 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + post(body: Toolbelt_create, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists the latest version of each toolbelt owned by the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Creates a versioned collection of provider-qualified Action Gateway tool names. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: Toolbelt_create, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Lists the latest version of each toolbelt owned by the authenticated team. + */ +export interface ToolbeltsRequestBuilderGetQueryParameters { + /** + * Which 'page' of paginated results to return. + */ + page?: number; + /** + * Number of items returned per page + */ + perPage?: number; + /** + * Filter toolbelts by status. + */ + status?: GetStatusQueryParameterType; +} +/** + * Uri template for the request builder. + */ +export const ToolbeltsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/toolbelts{?page*,per_page*,status*}"; +export const GetStatusQueryParameterTypeObject = { + Active: "active", + Deprecated: "deprecated", + All: "all", +} as const; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const ToolbeltsRequestBuilderGetQueryParametersMapper: Record = { + "perPage": "per_page", +}; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ToolbeltsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byName: { + requestsMetadata: WithNameItemRequestBuilderRequestsMetadata, + navigationMetadata: WithNameItemRequestBuilderNavigationMetadata, + pathParametersMappings: ["name"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const ToolbeltsRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: ToolbeltsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelts_responseFromDiscriminatorValue, + queryParametersMapper: ToolbeltsRequestBuilderGetQueryParametersMapper, + }, + post: { + uriTemplate: ToolbeltsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 409: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelt_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeToolbelt_create, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/toolbelts/item/index.ts b/src/dots/v2/actionGateway/toolbelts/item/index.ts new file mode 100644 index 000000000..e7c8d3452 --- /dev/null +++ b/src/dots/v2/actionGateway/toolbelts/item/index.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createToolbelt_responseFromDiscriminatorValue, type ErrorEscaped, type Toolbelt_response } from '../../../../models/index.js'; +// @ts-ignore +import { ToolsRequestBuilderNavigationMetadata, type ToolsRequestBuilder } from './tools/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/toolbelts/{name} + */ +export interface WithNameItemRequestBuilder extends BaseRequestBuilder { + /** + * The tools property + */ + get tools(): ToolsRequestBuilder; + /** + * Deprecates the latest active version of a toolbelt. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + delete(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Retrieves the latest active version or a specified immutable version of a toolbelt. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Deprecates the latest active version of a toolbelt. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toDeleteRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; + /** + * Retrieves the latest active version or a specified immutable version of a toolbelt. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Retrieves the latest active version or a specified immutable version of a toolbelt. + */ +export interface WithNameItemRequestBuilderGetQueryParameters { + /** + * An immutable numeric toolbelt version. Omit to retrieve the latest active version. + */ + version?: string; +} +/** + * Uri template for the request builder. + */ +export const WithNameItemRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/toolbelts/{name}{?version*}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const WithNameItemRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + tools: { + navigationMetadata: ToolsRequestBuilderNavigationMetadata, + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const WithNameItemRequestBuilderRequestsMetadata: RequestsMetadata = { + delete: { + uriTemplate: WithNameItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelt_responseFromDiscriminatorValue, + }, + get: { + uriTemplate: WithNameItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelt_responseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/toolbelts/item/tools/add/index.ts b/src/dots/v2/actionGateway/toolbelts/item/tools/add/index.ts new file mode 100644 index 000000000..e3e61cd9e --- /dev/null +++ b/src/dots/v2/actionGateway/toolbelts/item/tools/add/index.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createToolbelt_responseFromDiscriminatorValue, serializeToolbelt_response, serializeToolbelt_tools, type ErrorEscaped, type Toolbelt_response, type Toolbelt_tools } from '../../../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/toolbelts/{name}/tools/add + */ +export interface AddRequestBuilder extends BaseRequestBuilder { + /** + * Adds provider-qualified tool names and creates a new immutable toolbelt version. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + post(body: Toolbelt_tools, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Adds provider-qualified tool names and creates a new immutable toolbelt version. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: Toolbelt_tools, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const AddRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/toolbelts/{name}/tools/add"; +/** + * Metadata for all the requests in the request builder. + */ +export const AddRequestBuilderRequestsMetadata: RequestsMetadata = { + post: { + uriTemplate: AddRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelt_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeToolbelt_tools, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/toolbelts/item/tools/index.ts b/src/dots/v2/actionGateway/toolbelts/item/tools/index.ts new file mode 100644 index 000000000..b3aea797b --- /dev/null +++ b/src/dots/v2/actionGateway/toolbelts/item/tools/index.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { AddRequestBuilderRequestsMetadata, type AddRequestBuilder } from './add/index.js'; +// @ts-ignore +import { RemoveRequestBuilderRequestsMetadata, type RemoveRequestBuilder } from './remove/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/toolbelts/{name}/tools + */ +export interface ToolsRequestBuilder extends BaseRequestBuilder { + /** + * The add property + */ + get add(): AddRequestBuilder; + /** + * The remove property + */ + get remove(): RemoveRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const ToolsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/toolbelts/{name}/tools"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ToolsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + add: { + requestsMetadata: AddRequestBuilderRequestsMetadata, + }, + remove: { + requestsMetadata: RemoveRequestBuilderRequestsMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/toolbelts/item/tools/remove/index.ts b/src/dots/v2/actionGateway/toolbelts/item/tools/remove/index.ts new file mode 100644 index 000000000..909207342 --- /dev/null +++ b/src/dots/v2/actionGateway/toolbelts/item/tools/remove/index.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createToolbelt_responseFromDiscriminatorValue, serializeToolbelt_response, serializeToolbelt_tools, type ErrorEscaped, type Toolbelt_response, type Toolbelt_tools } from '../../../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/toolbelts/{name}/tools/remove + */ +export interface RemoveRequestBuilder extends BaseRequestBuilder { + /** + * Removes tool names and creates a new immutable toolbelt version. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 400 status code + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + post(body: Toolbelt_tools, requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Removes tool names and creates a new immutable toolbelt version. + * @param body The request body + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toPostRequestInformation(body: Toolbelt_tools, requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const RemoveRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/toolbelts/{name}/tools/remove"; +/** + * Metadata for all the requests in the request builder. + */ +export const RemoveRequestBuilderRequestsMetadata: RequestsMetadata = { + post: { + uriTemplate: RemoveRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 400: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createToolbelt_responseFromDiscriminatorValue, + requestBodyContentType: "application/json", + requestBodySerializer: serializeToolbelt_tools, + requestInformationContentSetMethod: "setContentFromParsable", + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/tools/index.ts b/src/dots/v2/actionGateway/tools/index.ts new file mode 100644 index 000000000..9c130612a --- /dev/null +++ b/src/dots/v2/actionGateway/tools/index.ts @@ -0,0 +1,112 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createList_tools_responseFromDiscriminatorValue, type ErrorEscaped, type List_tools_response } from '../../../models/index.js'; +// @ts-ignore +import { type WithNameItemRequestBuilder, WithNameItemRequestBuilderNavigationMetadata } from './item/index.js'; +// @ts-ignore +import { ProvidersRequestBuilderRequestsMetadata, type ProvidersRequestBuilder } from './providers/index.js'; +// @ts-ignore +import { ToolkitsRequestBuilderRequestsMetadata, type ToolkitsRequestBuilder } from './toolkits/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/tools + */ +export interface ToolsRequestBuilder extends BaseRequestBuilder { + /** + * The providers property + */ + get providers(): ProvidersRequestBuilder; + /** + * The toolkits property + */ + get toolkits(): ToolkitsRequestBuilder; + /** + * Gets an item from the ApiSdk.v2.actionGateway.tools.item collection + * @param name The provider-qualified tool name. + * @returns {WithNameItemRequestBuilder} + */ + byName(name: string) : WithNameItemRequestBuilder; + /** + * Lists active Action Gateway tools visible to the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists active Action Gateway tools visible to the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Lists active Action Gateway tools visible to the authenticated team. + */ +export interface ToolsRequestBuilderGetQueryParameters { + /** + * Which 'page' of paginated results to return. + */ + page?: number; + /** + * Number of items returned per page + */ + perPage?: number; + /** + * Filter tools by toolkit identifier. + */ + toolkitId?: string; +} +/** + * Uri template for the request builder. + */ +export const ToolsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/tools{?page*,per_page*,toolkit_id*}"; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const ToolsRequestBuilderGetQueryParametersMapper: Record = { + "perPage": "per_page", + "toolkitId": "toolkit_id", +}; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ToolsRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byName: { + navigationMetadata: WithNameItemRequestBuilderNavigationMetadata, + pathParametersMappings: ["name"], + }, + providers: { + requestsMetadata: ProvidersRequestBuilderRequestsMetadata, + }, + toolkits: { + requestsMetadata: ToolkitsRequestBuilderRequestsMetadata, + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const ToolsRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: ToolsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_tools_responseFromDiscriminatorValue, + queryParametersMapper: ToolsRequestBuilderGetQueryParametersMapper, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/tools/item/definition/index.ts b/src/dots/v2/actionGateway/tools/item/definition/index.ts new file mode 100644 index 000000000..c917192ea --- /dev/null +++ b/src/dots/v2/actionGateway/tools/item/definition/index.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createTool_definitionFromDiscriminatorValue, type ErrorEscaped, type Tool_definition } from '../../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/tools/{name}/definition + */ +export interface DefinitionRequestBuilder extends BaseRequestBuilder { + /** + * Retrieves the executable definition for an active Action Gateway tool. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Retrieves the executable definition for an active Action Gateway tool. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Retrieves the executable definition for an active Action Gateway tool. + */ +export interface DefinitionRequestBuilderGetQueryParameters { + /** + * The toolkit identifier used to disambiguate a bare tool name. + */ + toolkitId?: string; + /** + * The tool version. Omit to retrieve the current version. + */ + version?: string; +} +/** + * Uri template for the request builder. + */ +export const DefinitionRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/tools/{name}/definition{?toolkit_id*,version*}"; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const DefinitionRequestBuilderGetQueryParametersMapper: Record = { + "toolkitId": "toolkit_id", +}; +/** + * Metadata for all the requests in the request builder. + */ +export const DefinitionRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: DefinitionRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createTool_definitionFromDiscriminatorValue, + queryParametersMapper: DefinitionRequestBuilderGetQueryParametersMapper, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/tools/item/index.ts b/src/dots/v2/actionGateway/tools/item/index.ts new file mode 100644 index 000000000..1c9b341bc --- /dev/null +++ b/src/dots/v2/actionGateway/tools/item/index.ts @@ -0,0 +1,31 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { DefinitionRequestBuilderRequestsMetadata, type DefinitionRequestBuilder } from './definition/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/tools/{name} + */ +export interface WithNameItemRequestBuilder extends BaseRequestBuilder { + /** + * The definition property + */ + get definition(): DefinitionRequestBuilder; +} +/** + * Uri template for the request builder. + */ +export const WithNameItemRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/tools/{name}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const WithNameItemRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + definition: { + requestsMetadata: DefinitionRequestBuilderRequestsMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/tools/providers/index.ts b/src/dots/v2/actionGateway/tools/providers/index.ts new file mode 100644 index 000000000..8081b5ee8 --- /dev/null +++ b/src/dots/v2/actionGateway/tools/providers/index.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createList_providers_responseFromDiscriminatorValue, type ErrorEscaped, type List_providers_response } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/tools/providers + */ +export interface ProvidersRequestBuilder extends BaseRequestBuilder { + /** + * Lists Action Gateway providers and their connection requirements. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists Action Gateway providers and their connection requirements. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const ProvidersRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/tools/providers"; +/** + * Metadata for all the requests in the request builder. + */ +export const ProvidersRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: ProvidersRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_providers_responseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/tools/toolkits/index.ts b/src/dots/v2/actionGateway/tools/toolkits/index.ts new file mode 100644 index 000000000..2baf79998 --- /dev/null +++ b/src/dots/v2/actionGateway/tools/toolkits/index.ts @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createList_toolkits_responseFromDiscriminatorValue, type ErrorEscaped, type List_toolkits_response } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/tools/toolkits + */ +export interface ToolkitsRequestBuilder extends BaseRequestBuilder { + /** + * Lists the toolkits that group Action Gateway tools. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists the toolkits that group Action Gateway tools. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const ToolkitsRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/tools/toolkits"; +/** + * Metadata for all the requests in the request builder. + */ +export const ToolkitsRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: ToolkitsRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_toolkits_responseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/users/index.ts b/src/dots/v2/actionGateway/users/index.ts new file mode 100644 index 000000000..e6dc7fd41 --- /dev/null +++ b/src/dots/v2/actionGateway/users/index.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createList_users_responseFromDiscriminatorValue, type ErrorEscaped, type List_users_response } from '../../../models/index.js'; +// @ts-ignore +import { type WithUser_ItemRequestBuilder, WithUser_ItemRequestBuilderRequestsMetadata } from './item/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/users + */ +export interface UsersRequestBuilder extends BaseRequestBuilder { + /** + * Gets an item from the ApiSdk.v2.actionGateway.users.item collection + * @param user_id The end-user identifier. + * @returns {WithUser_ItemRequestBuilder} + */ + byUser_id(user_id: string) : WithUser_ItemRequestBuilder; + /** + * Lists end-user identifiers derived from sessions and OAuth connections for the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Lists end-user identifiers derived from sessions and OAuth connections for the authenticated team. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Lists end-user identifiers derived from sessions and OAuth connections for the authenticated team. + */ +export interface UsersRequestBuilderGetQueryParameters { + /** + * Which 'page' of paginated results to return. + */ + page?: number; + /** + * Number of items returned per page + */ + perPage?: number; +} +/** + * Uri template for the request builder. + */ +export const UsersRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/users{?page*,per_page*}"; +/** + * Mapper for query parameters from symbol name to serialization name represented as a constant. + */ +const UsersRequestBuilderGetQueryParametersMapper: Record = { + "perPage": "per_page", +}; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const UsersRequestBuilderNavigationMetadata: Record, NavigationMetadata> = { + byUser_id: { + requestsMetadata: WithUser_ItemRequestBuilderRequestsMetadata, + pathParametersMappings: ["user_id"], + }, +}; +/** + * Metadata for all the requests in the request builder. + */ +export const UsersRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: UsersRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createList_users_responseFromDiscriminatorValue, + queryParametersMapper: UsersRequestBuilderGetQueryParametersMapper, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/actionGateway/users/item/index.ts b/src/dots/v2/actionGateway/users/item/index.ts new file mode 100644 index 000000000..29eb0d911 --- /dev/null +++ b/src/dots/v2/actionGateway/users/item/index.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { createErrorEscapedFromDiscriminatorValue, createGet_user_responseFromDiscriminatorValue, type ErrorEscaped, type Get_user_response } from '../../../../models/index.js'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /v2/action-gateway/users/{user_id} + */ +export interface WithUser_ItemRequestBuilder extends BaseRequestBuilder { + /** + * Retrieves a derived end-user view containing its sessions and OAuth connections. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + * @throws {ErrorEscaped} error when the service returns a 401 status code + * @throws {ErrorEscaped} error when the service returns a 404 status code + * @throws {ErrorEscaped} error when the service returns a 429 status code + * @throws {ErrorEscaped} error when the service returns a 500 status code + * @throws {ErrorEscaped} error when the service returns a 4XX or 5XX status code + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Retrieves a derived end-user view containing its sessions and OAuth connections. + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const WithUser_ItemRequestBuilderUriTemplate = "{+baseurl}/v2/action-gateway/users/{user_id}"; +/** + * Metadata for all the requests in the request builder. + */ +export const WithUser_ItemRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: WithUser_ItemRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + errorMappings: { + 401: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 404: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 429: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + 500: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + XXX: createErrorEscapedFromDiscriminatorValue as ParsableFactory, + }, + adapterMethodName: "send", + responseBodyFactory: createGet_user_responseFromDiscriminatorValue, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/dots/v2/index.ts b/src/dots/v2/index.ts index cca78a458..ecafbf558 100644 --- a/src/dots/v2/index.ts +++ b/src/dots/v2/index.ts @@ -4,6 +4,8 @@ // @ts-ignore import { AccountRequestBuilderNavigationMetadata, AccountRequestBuilderRequestsMetadata, type AccountRequestBuilder } from './account/index.js'; // @ts-ignore +import { ActionGatewayRequestBuilderNavigationMetadata, type ActionGatewayRequestBuilder } from './actionGateway/index.js'; +// @ts-ignore import { ActionsRequestBuilderNavigationMetadata, ActionsRequestBuilderRequestsMetadata, type ActionsRequestBuilder } from './actions/index.js'; // @ts-ignore import { AddOnsRequestBuilderNavigationMetadata, type AddOnsRequestBuilder } from './addOns/index.js'; @@ -96,6 +98,10 @@ export interface V2RequestBuilder extends BaseRequestBuilder { * The account property */ get account(): AccountRequestBuilder; + /** + * The actionGateway property + */ + get actionGateway(): ActionGatewayRequestBuilder; /** * The actions property */ @@ -273,6 +279,9 @@ export const V2RequestBuilderNavigationMetadata: Record { + afterEach(() => nock.cleanAll()); + + it("delegates session creation to the generated public API", async () => { + const requests: unknown[] = []; + const sessionsApi = { + post: async (body: unknown) => { + requests.push(body); + return sessionResponse(); + }, + } as unknown as SessionsRequestBuilder; + const sessions = new SessionsOperations( + "test-token", + new ChatCompletionsProvider(), + sessionsApi, + ); + + const session = await sessions.create({ + actorId: "user-123", + name: "support-session", + tools: ["toolbelt:search-toolbelt@1"], + config: { preloadTools: ["exa_web_search@v1"] }, + }); + + expect(requests).toEqual([{ + actorId: "user-123", + name: "support-session", + policy: { defaultAction: "ask", rules: [] }, + tools: ["toolbelt:search-toolbelt@1"], + config: { preloadTools: ["exa_web_search@v1"] }, + }]); + expect(session.url).toBe(MCP_URL); + }); + + it("creates sessions with typed policy, tools, and config", async () => { + const api = nock(API_BASE_URL) + .post("/v2/action-gateway/sessions", (body) => { + expect(body).toEqual({ + actor_id: "user-123", + name: "support-session", + policy: { + defaultAction: "ask", + rules: [{ tool: "toolbelt:search-toolbelt@1", action: "allow" }], + }, + tools: ["toolbelt:search-toolbelt@1"], + config: { preloadTools: ["exa_web_search@v1"] }, + }); + return true; + }) + .reply(200, sessionResponse()); + + const session = await client().session.create({ + actorId: "user-123", + name: "support-session", + permissions: { + defaultAction: "ask", + rules: [{ tool: "toolbelt:search-toolbelt@1", action: "allow" }], + }, + tools: ["toolbelt:search-toolbelt@1"], + config: { preloadTools: ["exa_web_search@v1"] }, + }); + + expect(session.id).toBe("session-123"); + expect(session.url).toBe(MCP_URL); + expect(session.selectedTools).toEqual(["exa_web_search@v1"]); + api.done(); + }); + + it("defaults session policy to ask", async () => { + const api = nock(API_BASE_URL) + .post("/v2/action-gateway/sessions", (body) => body.policy.defaultAction === "ask") + .reply(200, sessionResponse()); + + await client().session.create({ actorId: "user-123" }); + api.done(); + }); + + it("uses the returned MCP URL with session and actor headers", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .reply(200, sessionResponse()); + const gateway = nock(GATEWAY_BASE_URL, { + reqheaders: { + "X-Session-Id": "session-123", + "X-Actor-Id": "user-123", + "MCP-Protocol-Version": "2025-06-18", + }, + }) + .post("/mcp/session/session-123", (body) => { + expect(body.method).toBe("tools/call"); + expect(body.params).toEqual({ + name: "action_invoke", + arguments: { + tools: [{ tool: "exa_web_search", arguments: { query: "DigitalOcean" } }], + }, + }); + return true; + }) + .reply(200, mcpResult({ + structuredContent: { + results: [{ + tool: "exa_web_search", + result: { status: "succeeded", output: { hits: 3 } }, + }], + }, + isError: false, + })); + + const session = await client().session.create({ actorId: "user-123" }); + const result = await session.toolsOperations.invokeOne("exa_web_search", { + query: "DigitalOcean", + }); + + expect(result).toEqual({ hits: 3 }); + gateway.done(); + }); + + it("accepts tool_slug from the META_INVOKE schema", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .reply(200, sessionResponse()); + const gateway = nock(GATEWAY_BASE_URL) + .post("/mcp/session/session-123", (body) => { + expect(body.params.arguments.tools).toEqual([ + { tool: "exa_web_search", arguments: { query: "DigitalOcean" } }, + ]); + return true; + }) + .reply(200, mcpResult({ structuredContent: { results: [] }, isError: false })); + + const session = await client().session.create({ actorId: "user-123" }); + await session.toolsOperations.invoke([ + { tool_slug: "exa_web_search", arguments: { query: "DigitalOcean" } }, + ]); + + gateway.done(); + }); + + it("rejects a returned mcpUrl that would send the token in cleartext", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .reply(200, { ...sessionResponse(), mcpUrl: "http://actions.do-ai.test/mcp/session/session-123" }); + + await expect(client().session.create({ actorId: "user-123" })) + .rejects.toThrow(/non-HTTPS mcpUrl/); + }); + + it("approves and denies pending invocations", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .reply(200, sessionResponse()); + const gateway = nock(GATEWAY_BASE_URL, { + reqheaders: { + "X-Session-Id": "session-123", + "X-Actor-Id": "user-123", + }, + }) + .post("/approvals/approval-1", { decision: "approve" }) + .reply(200, { status: "approved" }) + .post("/approvals/approval-2", { decision: "deny" }) + .reply(200, { status: "denied" }); + + const session = await client().session.create({ actorId: "user-123" }); + await expect(session.approve("approval-1")).resolves.toEqual({ status: "approved" }); + await expect(session.deny("approval-2")).resolves.toEqual({ status: "denied" }); + gateway.done(); + }); + + it("creates toolbelts through the generated public API", async () => { + const api = nock(API_BASE_URL) + .post("/v2/action-gateway/toolbelts", { + name: "search-toolbelt", + tools: ["exa_web_search", "exa_web_fetch"], + version: "1", + }) + .reply(200, { + toolbelt: { + name: "search-toolbelt", + version: "1", + tools: ["exa_web_search", "exa_web_fetch"], + status: "active", + reference: "search-toolbelt@1", + reference_latest: "search-toolbelt", + tool_count: 2, + created_at: "2026-07-24T00:00:00Z", + updated_at: "2026-07-24T00:00:00Z", + }, + }); + + const toolbelt = await client().createToolbelt({ + name: "search-toolbelt", + tools: ["exa_web_search", "exa_web_fetch"], + }); + + expect(toolbelt.reference).toBe("search-toolbelt@1"); + expect(toolbelt.ref).toBe("search-toolbelt@1"); + api.done(); + }); + + it("exposes generated list, get, add, remove, and delete operations", async () => { + const gateway = client(); + const toolbelt = { + name: "search-toolbelt", + version: "2", + tools: ["exa_web_search"], + status: "active", + reference: "search-toolbelt@2", + reference_latest: "search-toolbelt", + tool_count: 1, + created_at: "2026-07-24T00:00:00Z", + updated_at: "2026-07-24T00:00:00Z", + }; + + nock(API_BASE_URL) + .get("/v2/action-gateway/toolbelts") + .query({ status: "active" }) + .reply(200, { toolbelts: [], pagination: { page: 1, per_page: 20, total: 0 } }); + nock(API_BASE_URL) + .get("/v2/action-gateway/toolbelts/search-toolbelt") + .query({ version: "2" }) + .reply(200, { toolbelt }); + nock(API_BASE_URL) + .post("/v2/action-gateway/toolbelts/search-toolbelt/tools/add", { tools: ["exa_web_fetch"] }) + .reply(200, { toolbelt }); + nock(API_BASE_URL) + .post("/v2/action-gateway/toolbelts/search-toolbelt/tools/remove", { tools: ["exa_web_fetch"] }) + .reply(200, { toolbelt }); + nock(API_BASE_URL) + .delete("/v2/action-gateway/toolbelts/search-toolbelt") + .reply(200, { toolbelt }); + + await gateway.toolbelts.get({ queryParameters: { status: "active" } }); + const item = gateway.toolbelts.byName("search-toolbelt"); + await item.get({ queryParameters: { version: "2" } }); + await item.tools.add.post({ tools: ["exa_web_fetch"] }); + await item.tools.remove.post({ tools: ["exa_web_fetch"] }); + const deleted = await item.delete(); + + expect(deleted?.toolbelt?.status).toBe("active"); + expect(nock.isDone()).toBe(true); + }); + + it("formats tools for every inference surface", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .times(3) + .reply(200, sessionResponse()); + + const chatSession = await client().session.create({ actorId: "user-123" }); + expect((await chatSession.tools())[0]).toMatchObject({ + type: "function", + function: { name: "action_search" }, + }); + + const messagesSession = await client(new MessagesProvider()).session.create({ actorId: "user-123" }); + expect((await messagesSession.tools())[0]).toMatchObject({ + name: "action_search", + input_schema: { type: "object" }, + }); + + const responsesSession = await client(new ResponsesProvider()).session.create({ actorId: "user-123" }); + expect((await responsesSession.tools())[0]).toMatchObject({ + type: "function", + name: "action_search", + }); + }); + + it("executes and formats model tool calls", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .times(3) + .reply(200, sessionResponse()); + nock(GATEWAY_BASE_URL) + .post("/mcp/session/session-123") + .times(3) + .reply(200, mcpResult({ + structuredContent: { + results: [{ + tool: "exa_web_search", + result: { status: "succeeded", output: { hits: 1 } }, + }], + }, + isError: false, + })); + + const chatSession = await client().session.create({ actorId: "user-123" }); + expect(await chatSession.handleToolCalls({ + choices: [{ message: { tool_calls: [{ + id: "chat-1", + function: { name: "exa_web_search", arguments: '{"query":"DO"}' }, + }] } }], + })).toEqual([{ role: "tool", tool_call_id: "chat-1", content: '{"hits":1}' }]); + + const messagesSession = await client(new MessagesProvider()).session.create({ actorId: "user-123" }); + expect(await messagesSession.handleToolCalls({ + content: [{ type: "tool_use", id: "message-1", name: "exa_web_search", input: { query: "DO" } }], + })).toEqual([{ role: "user", content: [{ + type: "tool_result", + tool_use_id: "message-1", + content: '{"hits":1}', + }] }]); + + const responsesSession = await client(new ResponsesProvider()).session.create({ actorId: "user-123" }); + expect(await responsesSession.handleToolCalls({ + output: [{ + type: "function_call", + call_id: "response-1", + name: "exa_web_search", + arguments: '{"query":"DO"}', + }], + })).toEqual([{ + type: "function_call_output", + call_id: "response-1", + output: '{"hits":1}', + }]); + }); + + it("preserves approval metadata in model tool results", async () => { + nock(API_BASE_URL) + .post("/v2/action-gateway/sessions") + .reply(200, sessionResponse()); + nock(GATEWAY_BASE_URL) + .post("/mcp/session/session-123") + .reply(200, mcpResult({ + structuredContent: { + results: [{ + tool: "exa_web_search", + result: { + status: "failed", + error: { message: "approval required" }, + _meta: { + status: "requires_approval", + approval_id: "approval-123", + }, + }, + }], + }, + isError: false, + })) + .post("/mcp/session/session-123") + .reply(200, mcpResult({ + content: [{ type: "text", text: "approval required" }], + isError: true, + _meta: { + status: "requires_approval", + approval_id: "approval-123", + }, + })); + + const session = await client().session.create({ actorId: "user-123" }); + const messages = await session.handleToolCalls({ + choices: [{ message: { tool_calls: [{ + id: "chat-1", + function: { name: "exa_web_search", arguments: '{"query":"DO"}' }, + }] } }], + }); + + expect(JSON.parse(String(messages[0].content))).toMatchObject({ + error: { message: "approval required" }, + _meta: { approval_id: "approval-123" }, + }); + + const directMessages = await session.handleToolCalls({ + choices: [{ message: { tool_calls: [{ + id: "chat-2", + function: { name: "action_search", arguments: '{"queries":["search"]}' }, + }] } }], + }); + + expect(JSON.parse(String(directMessages[0].content))).toMatchObject({ + error: { message: "approval required" }, + _meta: { approval_id: "approval-123" }, + }); + }); +});