/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a7cb50d5cb41 */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Represents a minimal summary of an action. */ export type ActionSummary = { /** * The unique identifier of the action. */ toolId: string; /** * The display name of the action. */ displayName: string; /** * The type of tool - RETRIEVAL for read-only operations, ACTION for operations that modify data. */ type?: string | undefined; /** * The authentication type required - OAUTH_USER, OAUTH_ADMIN, API_KEY, BASIC_AUTH, DWD (domain-wide delegation), or NONE. */ authType?: string | undefined; /** * For write actions only - REDIRECT (client renders URL) or EXECUTION (external server call). */ writeActionType?: string | undefined; /** * Whether this action has been fully configured and validated. */ isSetupFinished?: boolean | undefined; /** * Indicates the kind of knowledge a tool would access or modify. * * @remarks * Company knowledge: * - Glean search, and any native tools that derive from it (e.g., expert search, code search) * - Native federated tools to company data sources (e.g., outlook search) * World knowledge: * - Platform action like bravewebsearch, geminiwebsearch, etc * Neutral knowledge: * - Native tools that don't access or modify content via APIs (e.g., file analyst, think) * - Platform read or write tools (creator has to determine their knowledge implications) */ dataSource?: string | undefined; }; /** @internal */ export const ActionSummary$inboundSchema: z.ZodType< ActionSummary, z.ZodTypeDef, unknown > = z.object({ tool_id: z.string(), display_name: z.string(), type: z.string().optional(), auth_type: z.string().optional(), write_action_type: z.string().optional(), is_setup_finished: z.boolean().optional(), data_source: z.string().optional(), }).transform((v) => { return remap$(v, { "tool_id": "toolId", "display_name": "displayName", "auth_type": "authType", "write_action_type": "writeActionType", "is_setup_finished": "isSetupFinished", "data_source": "dataSource", }); }); export function actionSummaryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ActionSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActionSummary' from JSON`, ); }